Errors and rate limits
A request that does not succeed answers with an HTTP status code of 400 or above and a JSON body that says what went wrong:
{ "status": "fail", "message": "A short sentence saying why the request was refused."}status is fail when the request itself can be corrected (a 4xx code) and error when the problem is on OneSuite’s side (a 5xx code). message is meant for people: show it or log it, but decide what to do from the status code.
Status codes
Section titled “Status codes”| Code | Meaning |
|---|---|
200 |
Done. The answer holds the record, the list, or a message after a delete. |
201 |
Created. The answer holds the new record. |
400 |
The request is not valid: a missing or malformed parameter, or a value the endpoint does not accept. Correct the request before sending it again. |
402 |
Payment is needed: inviting this person needs a seat the business has not paid for. The message gives the new seat total; send the invitation again with that total to agree to the cost. |
403 |
The token is missing, is not valid or has been revoked, or its person is not allowed to do this. See Authentication. |
404 |
The record does not exist, or the token’s person may not see it. |
409 |
The request conflicts with the record’s state: for example the time is locked, the entry is already invoiced, or the record is still in use. |
429 |
Too many requests with this token. See below. |
500 |
Something went wrong on OneSuite’s side. Try again later; if it keeps happening, contact OneSuite support. |
Rate limit
Section titled “Rate limit”Each token may make 100 requests per minute. Every token has its own allowance, so two tokens do not share one.
A request over the limit answers 429. Wait a little before trying again. To stay under the limit, read lists with a large limit rather than many small pages, and, where a list takes updatedSince, use it to read only what changed (see Lists, paging and filtering).