API Reference
Errors
Response codes
Wafeq uses standard HTTP response codes:
Code | Description |
---|---|
200 OK | Everything working as expected. |
400 Bad request | The request was unacceptable, often due to missing required parameters or Locked Periods. |
401 Unauthorized | Valid Authorization header was not provided. |
402 Request failed | The parameters were valid but the request failed. |
403 Forbidden | Either the API key or the OAuth token does not have the correct scope. |
404 Not found | The requested resource or a referenced object is not found. |
429 Too many requests | Too many requests, the API is being throttled. |
5xx Server error | Something went wrong on Wafeq's end. |
Lock Periods
An organization may lock a period to prevent users from posting transactions that affect the general ledger.
A 400 Bad Request
is returned if a transaction is attempting to be created in a locked period:
{
"detail": "Your books up to 2022-06-30 are closed. Reach out to your accountant to make changes."
}