Adjustments
List quantity and cost adjustments
Stock adjustments: quantity adjustments and cost adjustments are stored together in Evyoo POS. The type field tells them apart (quantity or cost), and the type filter reads only one kind.
Statuses: hold (draft, hidden by default), posted. An adjustment talks about quantities or about costs: the cost fields (the total of the document, and the costs of the lines) require costs:read.
Endpoints#
List: GET/api/v1/adjustments One record: GET/api/v1/adjustments/{id}
Example request#
List with a page size and a sort:
curl "https://votre-entreprise.evyooht.com/api/v1/adjustments?per_page=5&sort=-date" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/adjustments?per_page=5&sort=-date" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/adjustments?per_page=5&sort=-date", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/adjustments?per_page=5&sort=-date");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/adjustments",
params={"per_page": 5, "sort": "-date"},
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())One record by its identifier:
curl "https://votre-entreprise.evyooht.com/api/v1/adjustments/17" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/adjustments/17" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/adjustments/17", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/adjustments/17");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/adjustments/17",
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Query parameters of the list#
All filters can be combined: they add up (AND). An unknown parameter or an invalid value is refused with a 400 error, never ignored.
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number, starting at 1. A page beyond the data is empty, not an error. At most 10000 pages: filter instead of paging deeper. Default: 1. |
per_page | integer | Results per page, from 1 to 100. Default: 25. |
sort | string | Sort fields, separated by commas, with - in front for descending order. Up to 3 fields. Sortable fields: id, date, updated_at. Default: -date. Default: -date. |
status | string | hold, posted, or all. When omitted, drafts (status hold) are not listed. Allowed values: hold, posted, all. |
type | string | quantity or cost. Allowed values: quantity, cost. |
store_id | integer | Only documents of this store. |
date_from | string (date) | Only documents dated on or after this day (YYYY-MM-DD). |
date_to | string (date) | Only documents dated on or before this day (YYYY-MM-DD), the whole day included. |
search | string | Text contained in the adjustment number or the reason. |
updated_since | string | Only records modified since this date (YYYY-MM-DD) or date and time (YYYY-MM-DDTHH:MM:SS). |
Response fields#
The list and the detail route return these fields. A field is null when the value is not recorded. A field marked needs permission is absent (not empty) unless your client holds that permission.
| Field | Type | Description |
|---|---|---|
id | integer | Unique identifier. Use it in the detail route. |
number | string| null | Human-readable document number, for example I1-4149. |
type | "quantity"| "cost" | null | quantity (stock quantity adjustment) or cost (product cost adjustment). |
store_id | integer| null | Identifier of the store that owns the document (see the stores resource). |
date | string(date-time, local) | null | Document date and time (store local time, no time zone). |
status | "hold"| "posted" | null | hold or posted. |
reason | string| null | Reason given for the adjustment. |
currency | string| null | Currency of the document: USD or HTG. |
exchange_rate | number| null | Exchange rate between USD and HTG recorded on the document. |
total needs costs:read | number| null | Total value of the adjustment. Requires costs:read. |
created_at | string(date-time, local) | null | When the record was created (local time, no time zone). |
updated_at | string(date-time, local) | null | When the record was last modified (local time, no time zone). Use it with the updated_since filter to synchronize. |
Relation: lines#
Returned by the detail route only. The products adjusted.
| Field | Type | Description |
|---|---|---|
id | integer | Identifier of the line. |
product_id | integer| null | Identifier of the product. |
name | string| null | Item name. |
description | string| null | Item description. |
unit | string| null | Unit of the line. |
previous_quantity | number| null | Quantity before the adjustment. |
new_quantity | number| null | Quantity after the adjustment. |
quantity_difference | number| null | Difference between the new and the previous quantity. |
on_hand_quantity | number| null | Quantity on hand when the adjustment was made. |
average_cost needs costs:read | number| null | Average cost. Requires costs:read. |
previous_cost needs costs:read | number| null | Cost before the adjustment. Requires costs:read. |
new_cost needs costs:read | number| null | Cost after the adjustment. Requires costs:read. |
cost_difference needs costs:read | number| null | Difference between the new and the previous cost. Requires costs:read. |
Example response: list#
{
"data": [
{
"id": 17,
"number": "A1-17",
"type": "quantity",
"store_id": 1,
"date": "2026-03-15T14:30:00",
"status": "hold",
"reason": "Stock count correction",
"currency": "USD",
"exchange_rate": 130.5,
"total": 1250,
"created_at": "2026-03-15T14:30:00",
"updated_at": "2026-03-15T14:30:00"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 1,
"total_pages": 1
}
}Example response: one record#
{
"data": {
"id": 17,
"number": "A1-17",
"type": "quantity",
"store_id": 1,
"date": "2026-03-15T14:30:00",
"status": "hold",
"reason": "Stock count correction",
"currency": "USD",
"exchange_rate": 130.5,
"total": 1250,
"created_at": "2026-03-15T14:30:00",
"updated_at": "2026-03-15T14:30:00",
"lines": [
{
"id": 9001,
"product_id": 463,
"name": "Thermal paper roll 57x18m",
"description": "Thermal paper roll for receipt printers",
"unit": "Box of 100",
"previous_quantity": 40,
"new_quantity": 45,
"quantity_difference": 5,
"on_hand_quantity": 45,
"average_cost": 92.5,
"previous_cost": 88,
"new_cost": 90,
"cost_difference": 2
}
]
}
}Errors#
The error format and the full list of codes are described in Errors.
| Status | When |
|---|---|
400 | A query parameter is invalid or unknown. Every fault is reported at once in error.details. Nothing is ignored silently. |
401 | The token is missing, malformed, expired or revoked (missing_token or invalid_token). Ask for a new token. |
403 | Your token does not carry the permission this route needs (insufficient_scope), or the request was not made over HTTPS (https_required). |
429 | Too many requests this minute. Wait for the number of seconds in the Retry-After header. |