Suppliers¶
Endpoints for listing, creating, and updating supplier records.
GET /suppliers¶
List suppliers with optional filtering and pagination.
Request¶
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
nonce |
query | integer (int64) | No | Client-generated unique sequential number |
searchString |
query | string | No | Search by supplier code or number |
searchColumn |
query | string | No | Column to search instead of the default field |
searchOperator |
query | string | No | Comparison operator: lt, lte, gt, gte, ne; from 7.2.03 also contains |
skip |
query | integer | No | Number of records to skip (pagination) |
limit |
query | integer | No | Max records to return. Max: 1000, default: 50 |
Responses¶
200 — Success¶
Returns an array of thirdParty objects (empty array if none found).
400 — Invalid input parameters¶
POST /suppliers¶
Add a new supplier to the system.
Request¶
POST /api/{account}/v4.0.0/suppliers?nonce={nonce}
Authorization: Bearer <xa-token>
Content-Type: application/json
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
nonce |
query | integer (int64) | Yes | Client-generated unique sequential number |
Request Body¶
Creation requires sufficient identifying data under the applicable entity/tenant validation rules: provide vat_id or email in the workflow where either is accepted. Email is not universally mandatory. Name alone is not a reliable unique identifier because different real entities may share the same name. See third-party creation requirements for identification, additional validation and the supplier routing caveat.
A thirdParty object. Required on creation: name and country_iso (two-letter ISO country code, such as PT). You may supply code; otherwise Gestix assigns one. Omitting country_iso fails validation with Especifique por favor País (CEF).
{
"code": "S0015",
"name": "New Supplier Lda",
"country_iso": "PT",
"vat_id": "PT111222333",
"email": "orders@supplier.com"
}
Responses¶
201 — Created¶
The response has no ID or code. Before 7.2.03 the body is empty; from 7.2.03 it is {"status":201,"error":false,"message":"Gestix: resource created"}. Read the record back by its code to get its id.
400 — Invalid input¶
Nothing is stored. See Error Handling for how to read the reason.
409 — Duplicate entry¶
PUT /suppliers¶
Update an existing supplier record.
Request¶
PUT /api/{account}/v4.0.0/suppliers?nonce={nonce}
Authorization: Bearer <xa-token>
Content-Type: application/json
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
nonce |
query | integer (int64) | Yes | Client-generated unique sequential number |
Request Body¶
A thirdParty object with the id or identifying code of the record to update.