Success — Single Resource
| Field | Type | Description |
|---|---|---|
success | boolean | Always true on success |
data | object | array | Response payload |
Example — Booking Status
Success — Paginated List
| Field | Type | Description |
|---|---|---|
data | array | Current page items |
meta.page | number | Current page (1-based) |
meta.limit | number | Page size |
meta.total | number | Total matching records |
meta.totalPages | number | ceil(total / limit) |
Error Response
| Field | Type | Description |
|---|---|---|
success | boolean | Always false on error |
error.code | string | Machine-readable error code (see Errors) |
error.message | string | Human-readable summary |
error.details | object | Optional validation details or extra context |
error.requestId | string | Trace ID — include when contacting support |
requestId is returned in the X-Request-Id response header.
HTTP Status Codes
| Status | Meaning |
|---|---|
200 | Success (GET, PATCH, POST actions) |
201 | Created (booking, webhook subscription) |
400 | Validation error |
401 | Missing or invalid API key |
403 | Forbidden (permission or domain) |
404 | Resource not found |
409 | Conflict (e.g. duplicate externalReference) |
422 | Business rule violation |
429 | Rate limit exceeded |
500 | Internal server error |
Validation Errors
Whenerror.code is VALIDATION_ERROR, error.details may contain field-level messages from class-validator:
Null & Omitted Fields
- Optional fields may be omitted or
nulldepending on the endpoint. - Empty arrays are returned as
[], notnull. - Monetary amounts are numbers in SAR with up to two decimal places in API output.