API Reference

Modified on Wed, 2 Dec at 10:30 AM

Our Public API is a set of HTTP REST endpoints that allows you to interact with our platform. It also provides webhooks for booking lifecycle updates. All API payloads are in JSON, and responses are in JSON only. For all the endpoints you need to be authenticated to perform the operation.


During development and testing phase of the integration a sandbox environment can be made available for you. Sandbox accounts do not carry over to Production. Please reach out to our Support team.


If you have any questions about integrating our Public API, please contact us. We are happy to help!


How to use

Server: https://api.briqbookings.com/public/
Authentication: 
Required x-api-key header
Swagger: 
See attached file


Authentication

Briq uses API token-based authentication on the Public API. We accept the API-token as a request header x-api-key. Please contact our team to provide you an API key.

To test your API key, we suggest using the WhoAmI endpoint. When supplied with a correct API key, this endpoint will return the name and the domain ({domain}.briqbookings.com) of the merchant. If the API key is not valid, you will receive HTTP 401 - Unauthorized. Example response:


{
    "name": "your company name",
    "domain": "your-company-domain"
}


Error handling

An HTTP response containing a status code in the 2XX range, typically 200 OK, indicates that the API call was made successfully. In case of failed API call the response body will contain an error in the following format:


{
    "code": "InvalidInput",
    "FriendlyDescription": "Invalid input provided.",
    "TechnicalDescription": "InvalidData",
    "AdditionalInformation": {
        "Name": [
            "Product name is not provided"
        ]
    }
}
FieldDataTypeDescription
codestringThe main error code. Gives the generic error that happened. 
Possible values:
 
- InvalidInput
 
- NotFound
 
- ProcessingError
FriendlyDescriptionstringA friendly (localized) error description, which could be shown to the user.
TechnicalDescriptionstringA technical error description (always in English).
AdditionalInformationRecord<string, object>Contains additional information about the error. 
Example: which fields in the model are not correct and why.


Troubleshooting

In general, 2xx-range codes suggest a successful request, while 4xx and 5xx range codes suggest errors in either authorization or input.


Error codes

CodeSemanticMeaning
200OKRequest was succesful.
400Bad requestParameters for the request are missing or malformed.
401UnauthorizedYour API Key is not accepted.
403ForbiddenYour IP is blacklisted for API usage.
404Not foundEntity not found.
5XXServer ErrorsSomething went wrong on our end.


Logging
Currently, Briq does not provide an event logging and/or debugging solution for our API. Please roll your own logging solution.



Attachments (1)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article