Orderbot uses OpenAPI to automatically generate the API Reference. As well, this page can be used to try out any API calls you want without having to use any code.
Authentication
Any user created within orderbot can use their username and password with the API, as long as they generate a token. If you don't have a user and password, contact your Implementation Specialist or Orderbot Support for them to create one for you.
Tokens expire every 30 days so ensure that regenerating the token is handled by your application. You can generate tokens as often as you'd like, as generating a new token does not invalidate your old one.
Example URL
GET https://api-beta.orderbot.com/AccessToken
Example Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1YXRhcGlAb3JkZXJib3QuY29tIiwianR
pIjoiOTUxODdmMWMtY2I2NS00MDY0LThlMWItY2I0MDFjNmE1ZDczIiwib2JkYXRhIjoiYTdydk5ibzJJaXFIZHMv..."
}
Making Calls
Typically we recommend that any API calls are made in bulk, rather than for one resource at a time. You'll notice on the Endpoints themselves what kind of bulk operations are supported.
For GET calls, data will be returned paginated, and you can set how many items per page are returned using the "items_per_page" parameter. For example, GET Accounts will let you have up to 250 accounts returned per page.
For POST, PUT, or PATCH requests, it'll typically be in the description of the endpoint. If there is no information about the limit, you can always contact support@orderbot.com and they'll usually have the answer for you. For example, POST Fulfillments has a limit of 100 fulfillments per request.
Reading the Documentation
Response Models
GET endpoints support different response models that return different information based on the needs of your application. You can check which GET endpoints support different models. The example shown in the documentation is always the default response model.
For example, GET Products has a response model just for returning custom field data (response_model=CustomField), or returning integration level data (response_model=Integration).
Schema
For each endpoint, there is a schema that will tell you what the required fields are, what the data type is, and the field length if applicable. There is also an example, and a description of what the field is as well.
These can be found in each individual endpoint, where the example is, by clicking "Schema".
Error Codes
The Error Codes section shows the supported error codes for every endpoint. If the call was successful, but a validation was not, the response will contain a property labelled "orderbot_success_message" with a value true or false, and any reasons why it failed.
Try it Out
If you want to test any of the endpoints, you can on the documentation itself using your own orderbot credentials.
You'll want to get an access token first.
Click the "Authorize" button at the top of the page, and enter your orderbot username and password. This is the same user and password you use to login to the admin portal of orderbot.
When done, click "Authorize" and your details will be saved.
Click on the "GET AccessToken" endpoint, and click the "Try it Out" button.
You'll notice an "execute" button appear, and click it to get an access token. You'll see the request that was made in cURL, the request URL, the response that was provided by the API, and the response headers. If it was successful, you'll get a token in the response.
The last step before making any further calls is to take your token and enter it into that same "Authorize" section you had put your credentials previously.
- Click "Logout" to remove your username and password.
- Type the word "bearer" with a space.
- Paste the token beside it, and click "Authorize" to save it.
Now you're ready to use the "Try it Out" feature on any of the endpoints! You can enter your own payloads for POST, PUT, and PATCH requests, as well as adjust any parameters for GET Endpoints.
Rate Limits
The general rate limits are 2 calls per second, 30 calls per minute. These rules can be adjusted by company, user, and IP address. For special scenarios, the rules can be applied to the API as a whole, or per endpoint. Should you want to raise your rate limits, please submit a request to support@orderbot.com with the following information: company name (or client if developing on behalf of), user that is accessing API, IP addresses, requested rates, endpoints that need updating, business case, example of a call being made. This is mostly to ensure that the most efficient way of calling our API is being used before we can raise the limits.
Feedback
If there's any improvements, feedback, or minor issues you want to let Orderbot know about, you can use the POST ApiFeedback endpoint. Our team will periodically review these and perhaps implement one of your ideas.