api.hirepos.com/WebsiteBookings

Edited

WebsiteBookings endpoint to submit bookings from third-party Online Stores to HirePOS. The bookings can then be managed through the HirePOS app by accepting or declining them.

Note: an Online Store instance must be provisioned before access to this endpoint will become available. Please see the following help guide: https://docs.hirepos.com/en/articles/2325313

Submitting Bookings to HirePOS

To submit a booking, a JSON structured like the example below must be sent via the POST method to https://api.hirepos.com/WebsiteBookings

Branches Module

To specify a Branch for the booking, include a BranchCode value in the JSON, which matches the relevant Branch Code in Setup > Branches.

POST https://api.hirepos.com/WebsiteBookings

Headers:
AuthKey={YourAPIKey}
AuthSecret={YourAPISecret}

Parameters:
GET
Id=545


// Example Request...

{
    "BookingDate": "1/01/2021",
    "EstDateFrom": "1/02/2021 8:00 am",
    "EstDateTo": "1/03/2021 4:00 pm",
    "EventDate": "10/02/2021 6:00 pm",
    "Company": "AnyDay Hire",
    "FirstName": "John",
    "LastName": "Smith",
    "AddressLine1": "1 Any Street",
    "AddressLine2": "",
    "City": "Cairns",
    "State": "QLD",
    "Postcode": "4870",
    "Country": "Australia",
    "Phone1": "(07) 1000 0000",
    "Phone2": "",
    "Phone3": "",
    "Fax": "",
    "Email": "",
    "DeliveryAddressLine1": "10 Somewhere",
    "DeliveryAddressLine2": "",
    "DeliveryCity": "Cairns",
    "DeliveryState": "QLD",
    "DeliveryPostcode": "4870",
    "Reference": "Holiday Special",
    "InvoiceCategoryName": "Baby Equipment Hire",
    "Message": "Thank you for your business.",
    "Comments": "Call on arrival.",
    "Items": [{"Code": "1000", "Quantity": 7}, {"Code": "2000", "Quantity": 3}],
    "CustomField1": "Pick up from airport.",
    "CustomField2": "",
    "CustomField3": "",
    "CustomField4": "",
    "CustomField5": "",
    "CustomField6": "",
    "CustomField7": "",
    "CustomField8": ""
}

// Example Response...

{
    "ErrorRaised": "False",
    "ErrorType": null,
    "ErrorMessage": null,
    "Bookings": [
        {
            "Id": "545",
            "BookingDate": "1/01/2021",
            "EstDateFrom": "1/02/2021 8:00 am",
            "EstDateTo": "1/03/2021 4:00 pm",
            "EventDate": "10/02/2021 6:00 pm",
            "Company": "AnyDay Hire",
            "FirstName": "John",
            "LastName": "Smith",
            "AddressLine1": "1 Any Street",
            "AddressLine2": "",
            "City": "Cairns",
            "State": "QLD",
            "Postcode": "4870",
            "Country": "Australia",
            "Phone1": "(07) 1000 0000",
            "Phone2": "",
            "Phone3": "",
            "Email": "",
            "DeliveryAddressLine1": "10 Somewhere",
            "DeliveryAddressLine2": "",
            "DeliveryCity": "Cairns",
            "DeliveryState": "QLD",
            "DeliveryPostcode": "4870",
            "Reference": "Holiday Special",
            "InvoiceCategoryName": "Baby Equipment Hire",
            "Message": "Thank you for your business.",
            "Comments": "Call on arrival.",
            "CustomField1": "Pick up from airport.",
            "CustomField2": "",
            "CustomField3": "",
            "CustomField4": "",
            "CustomField5": "",
            "CustomField6": "",
            "CustomField7": "",
            "CustomField8": "",
            "Items": [
                {
                    "Code": "1000",
                    "Quantity": 7
                },
                {
                    "Code": "2000",
                    "Quantity": 3
                }
            ]
        }
}

Retrieving Order Details

To retrieve the details of an existing booking, developers should make use of a GET request. In the request, ensure to include the Id of the order as a parameter. This will allow you to access specific information related to the booking stored within the system.

Troubleshooting WebsiteBookings API Submissions

If you are having trouble submitting bookings to the WebsiteBookings endpoint or receive an API error, work through the following checks.

  1. Check your API Key and Secret
    Confirm that the API Key and API Secret used by your website or integration are correct and belong to the intended HirePOS account.

  2. Confirm the Online Store has been provisioned
    The HirePOS Online Store must be provisioned in the backend before WebsiteBookings submissions can be processed correctly. If you are unsure whether this has been completed, contact HirePOS Support.

  3. Review the Online Store preferences
    In HirePOS, go to Setup > Preferences > Online Store and review the configuration, particularly the settings under the Checkout tab.

  4. Save the Online Store settings
    Click Save Changes, even if you have not made any changes.

    Saving the Online Store preferences also ensures that the required database schema is up to date. This can be particularly important for newly provisioned Online Store instances where the latest database changes may not yet have been applied.

After completing these steps, try submitting to the WebsiteBookings endpoint again. If the problem continues, contact HirePOS Support and provide details of the API error being returned.

Was this article helpful?

Sorry about that! Care to tell us more?

Thanks for the feedback!

There was an issue submitting your feedback
Please check your connection and try again.