Articles (Products)¶
Endpoints for listing, creating, and updating article records.
GET /articles¶
List articles 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 article code |
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 |
options |
query | string | No | Additional options for filtering or expanding the result set |
skip |
query | integer | No | Number of records to skip (pagination) |
limit |
query | integer | No | Max records to return. Max: 1000, default: 50 |
Tip
Use the options parameter to expand related data (e.g., stock levels, warehouse breakdown).
Responses¶
200 — Success¶
Returns an array of article objects (empty array if none found).
400 — Invalid input parameters¶
POST /articles¶
Add a new article to the system.
Request¶
POST /api/{account}/v4.0.0/articles?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¶
An article object. Set the default selling price with unit_price; GET returns it under the same field name. See selling-price semantics.
Ordinary article:
For a batch / lot tracked article, send only the desired tracking flag as "1":
{
"item_code": "WIDGET-LOT",
"description": "Lot-tracked widget",
"unit_price": 9.99,
"sales_tax": 23.0,
"track_batch_number": "1"
}
For a serial-number-tracked article:
{
"item_code": "WIDGET-SERIAL",
"description": "Serial-tracked widget",
"unit_price": 9.99,
"sales_tax": 23.0,
"track_serial_number": "1"
}
Omit the other flag, including its "0" value. The article model lists the corresponding GET flags. Creation itself creates no stock, lots, serial records or movements.
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 /articles¶
Update an existing article record.
Request¶
PUT /api/{account}/v4.0.0/articles?id={id}&nonce={nonce}
Authorization: Bearer <xa-token>
Content-Type: application/json
Parameters¶
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
query | integer | Yes | Internal ID of the article to update |
nonce |
query | integer (int64) | Yes | Client-generated unique sequential number |
Request Body¶
An article object containing the fields to update. Identify the existing article with the id query parameter.
This updates the default selling price; read it back as unit_price with GET. See selling-price semantics, including the zero-value limitation.
Responses¶