How to call the APIs
Providing an User-Agent header in your requests
In order to identify who is sending requests to the byrd backend and to give you a better support we require every API client connection to send an easy to identify user agent header.
We recommend using the following format: User-Agent: <company-name-registered-in-byrd> (tech-contact-email) - <optional integration version>
How your User-Agent string should look like
Let's say your company is registered in byrd as WingTip Toys (you can find this name in your byrd Dashboard), the technical contact email is [email protected] and you named your integration version 1.1. This is how your User Agent string should look like:
WingTip Toys ([email protected]) - 1.1
Sending User-Agent header is needed!
In case we see any issues with the received requests, we can use this information to contact you and work on a fix rather than blocking the IP address or user.
byrd API basics
- The byrd API follows the REST API architecture.
- Use HTTPS, SSL, and TLS v1.2 or above when calling any of the endpoints.
- Set the Content-type HTTP header to application/json.
- Transmit your token as a bearer token in the Authorization HTTP header.
Pass arguments as:
GET, DELETE | querystring parameters |
POST, PATCH, PUT | parameters presented as application/json |
Error specific to passing JSON
If the posted JSON is invalid, you'll receive the error Request.InvalidSchema.
Please read carefully the content of the error details to try to understand why the request has failed. If you are not able to solve the issue by your means, feel free to contact our tech team.
Example of error when sending an invalid country_code under destination_address:
{
"code": "Request.InvalidSchema",
"message": "The input data did not pass the schema validation.",
"errors": [
{
"code": "SchemaError.destination_address",
"message": "Invalid list item.",
"extra": {
"field": "destination_address"
},
"tags": {},
"errors": [
{
"code": "SchemaError.country_code",
"message": "String does not match expected pattern.",
"extra": {
"field": "country_code"
},
"tags": {},
"errors": []
}
]
}
]
}
Updated 5 months ago