API Reference


Response codes

Wafeq uses standard HTTP response codes:

200 OKEverything working as expected.
400 Bad requestThe request was unacceptable, often due to missing required parameters or Locked Periods.
401 UnauthorizedValid Authorization header was not provided.
402 Request failedThe parameters were valid but the request failed.
403 ForbiddenEither the API key or the OAuth token does not have the correct scope.
404 Not foundThe requested resource or a referenced object is not found.
429 Too many requestsToo many requests, the API is being throttled.
5xx Server errorSomething 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."