Skip to content

Common Response Models

These models are used across multiple endpoints as standard response objects.


Write responses

POST endpoints return no ID, number or Location header. Read the record back by your reference (documents) or code (customers, suppliers, articles). From 7.2.03 the body is {"status","error","message"}, for example {"status":202,"error":false,"message":"Gestix document accepted"} or {"status":201,"error":false,"message":"Gestix: resource created"}; before 7.2.03 it is empty. See Error Handling.


statusResponse

Returned by GET /status.

Schema

Field Type Required Description
status string Yes Human-readable health summary (e.g., "ready - login: john, company: Demo")
server_time string (date-time) Yes Server time at the moment of the response (ISO 8601)
versions statusVersions Yes API version comparison
errors array of apiError Yes Recent session errors (may be empty)

statusVersions

Field Type Required Description
called_api_version string Yes API version inferred from the request URL (e.g., v4.0.1)
current_api_version string Yes Current API version active on the server (e.g., v4.0.1)

Example

{
  "status": "ready - login: john, company: Demo Westix DEMO",
  "server_time": "2024-11-15T10:30:00Z",
  "versions": {
    "called_api_version": "v4.0.1",
    "current_api_version": "v4.0.1"
  },
  "errors": []
}

apiError

Error model of the errors array of GET /status. Error responses do not use it: from 7.2.03 they have a body {"status","error","message"}, and before that an empty body; see Error Handling.

Schema

Field Type Required Description
code string Yes Machine-readable error code (e.g., INVALID_ARGUMENT, AUTH_FAILED, DB_TIMEOUT)
message string Yes Human-readable error description
timestamp string (date-time) Yes When the error occurred on the server (ISO 8601)
path string — Request path that triggered the error (e.g., /articles)
request_id string — Server-generated ID for correlating logs and traces

Example

{
  "code": "INVALID_ARGUMENT",
  "message": "Field 'currency' is required",
  "timestamp": "2024-11-15T10:30:00Z",
  "path": "/invoices",
  "request_id": "req-abc123"
}

Used By

Using request_id for support

If you contact support@gestix.com about an API error, include the HTTP status and available error information, plus request_id and timestamp values when present — these help the support team trace the issue in server logs.