Skip to content

Common Response Models

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


documentCreated

Returned by POST endpoints that create documents (invoices, orders, receipts, purchases, purchase orders, transfer orders).

Schema

Field Type Required Description
id integer (int64) Yes Internal ID of the newly created document
documentSeries string Document series / set (e.g., FT)
documentNumber string Full document number (e.g., FT2024/1002)
url string Optional URL to fetch or print the document PDF

Example

{
  "id": 1002,
  "documentSeries": "FT",
  "documentNumber": "FT2024/1002",
  "url": "https://gestix.pt/api/03101176/v4.0.0/invoices?id=1002&print=1"
}

Used By


entityCreated

Returned by POST endpoints that create master data entities (customers, suppliers, articles).

Schema

Field Type Required Description
id integer (int64) Yes Internal ID of the newly created entity
entity_code string Auto-assigned entity code (e.g., C0042, S0015, ART001)

Example

{
  "id": 42,
  "entity_code": "C0042"
}

Used By


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.0)
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.0",
    "current_api_version": "v4.0.1"
  },
  "errors": []
}

apiError

Standard error response returned on 400 and 409 responses from write endpoints.

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 request_id and timestamp values — these help the support team trace the issue in server logs.