Goods receipts
Goods received from a supplier: lines with the delivery note price and cost, before-and-after corrections. A reversal sets voided_at.
Goods receipts
Objects
GoodsReceipt
idintegerrequiredID of the record, unique among records of its kind in the store.
numberstring or nullrequiredReceipt number; null on a receipt created before numbering.
supplier_idinteger or nullrequiredSupplier ID (/v1/suppliers); null on a receipt without a supplier.
location_idintegerrequiredLocation the goods were received at (/v1/locations).
legal_entity_idinteger or nullrequiredBuying legal entity of the store (/v1/legal-entities): its tax regime decides whether the purchase tax is recoverable; null on older receipts.
purchase_order_idinteger or nullrequiredPurchase order the goods were received against (/v1/purchase-orders); null — received without an order.
received_atstring (date-time)requiredWhen the goods were received.
currencystringrequiredReceipt currency, ISO 4217: delivery note prices, line totals and subtotals are in it.
exchange_ratestring or nullrequiredRate of the receipt currency to the store currency as a decimal string, captured on receipt; null on a receipt without a captured rate.
settlement_modestring or nullrequiredHow the store pays for the delivery: on_receipt — for what was received; on_sale — when sold, by a consignment settlement; null on older receipts.
- Values:
on_receipton_salenull
supplier_documentobjectrequiredSupplier delivery note as confirmed by staff.
Fields · 3
type_codestring or nullrequiredDocument type code of the tax provider of the store country (in Argentina, the ARCA comprobante code); null — no document.
numberstring or nullrequiredDelivery note number; null if not given.
datestring or nullrequiredDelivery note date, YYYY-MM-DD; null if not given.
prices_include_taxboolean or nullrequiredtrue — line prices include tax; false — they do not; null — not specified.
input_tax_treatmentstring or nullrequiredWhere the tax in the purchase price went: recoverable — it is credited, cost excludes tax; cost — nothing to credit it against, tax is part of cost; null — cost as entered.
- Values:
recoverablecostnull
lines_subtotalinteger or nullrequiredValue received: the sum of line_total in the receipt currency; null — the document has no prices.
payable_totalinteger or nullrequiredAmount owed to the supplier in the receipt currency; null — unknown.
voided_atstring (date-time) or nullrequiredWhen the receipt was reversed: goods left stock, the delivery debt was voided; null on an active receipt.
notestring or nullrequiredStaff note; null if there is none.
linesarray of objectrequiredReceipt lines; values are after corrections.
Fields · 16
idintegerrequiredID of the record, unique among records of its kind in the store.
variant_idinteger or nullrequiredProduct variant ID (/v1/variants).
lot_idinteger or nullrequiredLot of the line (/v1/lots); null for a product without lots.
purchase_order_line_idinteger or nullrequiredPurchase order line (lines[].id of the order) the line was received against; null without an order.
added_by_correction_idinteger or nullrequiredCorrection (corrections[].id) that added the line; null on a line from posting.
supplier_descriptionstring or nullrequiredItem name as on the delivery note; null if not recorded.
supplier_quantitystring or nullrequiredQuantity as on the delivery note, in supplier_unit, as a decimal string; null if not recorded.
supplier_unitstring or nullrequiredDelivery note unit as written: "kg", "15 kg", "pcs"; null if not given.
unitstring or nullrequiredBase unit of quantity and cost_per_quantity: pcs — pieces, g — grams, ml — milliliters.
quantitystring or nullrequiredQuantity received into stock, a decimal string in the base unit.
unit_costinteger or nullrequiredDelivery note price in the receipt currency per cost_per_quantity; null — no price.
cost_per_quantitystring or nullrequiredQuantity in the base unit the price is for: "1000" on a weighed product means per kilogram.
line_totalinteger or nullrequiredLine total in the receipt currency: price times the delivery note quantity; null without a price or delivery note quantity.
store_unit_cost_microinteger or nullrequiredLine price in the store currency at the receipt rate per cost_per_quantity, in millionths of the minor unit; null without a price.
tax_rate_bpsinteger or nullrequiredTax rate the cost was computed with, in basis points; null — no tax treatment.
landed_unit_cost_microinteger or nullrequiredCost after the tax treatment that the line set on the item: store currency, per cost_per_quantity, in millionths of the minor unit; null without a price.
correctionsarray of objectrequiredCorrections of the posted receipt in order: what was fixed and why.
Fields · 8
idintegerrequiredID of the record, unique among records of its kind in the store.
numberstringrequiredCorrection number.
reasonstringrequiredWhy it was corrected, in the words of staff.
subtotal_beforeinteger or nullrequiredlines_subtotal before the correction; null — there were no prices.
subtotal_afterinteger or nullrequiredlines_subtotal after the correction; null — there are no prices.
consumed_varianceintegerrequiredPrice difference on goods that had already left stock, in the store currency: it went to the cost of goods sold.
linesarray of objectrequiredCorrected lines, before and after.
Fields · 11
goods_receipt_line_idintegerrequiredReceipt line ID (lines[].id).
quantity_beforestring or nullrequiredReceived quantity before the correction, in the base unit.
quantity_afterstring or nullrequiredReceived quantity after the correction, in the base unit.
supplier_quantity_beforestring or nullrequiredDelivery note quantity before the correction; null if there was none.
supplier_quantity_afterstring or nullrequiredDelivery note quantity after the correction; null if there is none.
unit_cost_beforeinteger or nullrequiredDelivery note price before the correction; null — no price.
unit_cost_afterinteger or nullrequiredDelivery note price after the correction; null — no price.
store_unit_cost_before_microinteger or nullrequiredPrice in the store currency before the correction, in millionths of the minor unit.
store_unit_cost_after_microinteger or nullrequiredPrice in the store currency after the correction, in millionths of the minor unit.
consumed_quantitystring or nullrequiredHow much of the line had already left stock at the time of the correction.
consumed_varianceintegerrequiredPrice difference on what had left stock, in the store currency.
created_atstring (date-time)requiredWhen the correction was posted.
created_atstring (date-time)requiredWhen the record was created.
updated_atstring (date-time)requiredWhen the record last changed.
Endpoints
Goods receipts: deliveries from suppliers with lines, delivery note prices and corrections
get/goods-receipts
Scope: procurement:read
Parameters
Query
limitintegerPage size: up to 250 records; 50 by default.
- Minimum:
- 1
- Maximum:
- 250
cursorstringOpaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it.
- Max length:
- 4096
updated_sincestring (date-time)Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor.
- Pattern:
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:\d{2})$
supplier_idintegerOnly documents of this supplier.
- Minimum:
- 1
purchase_order_idintegerOnly goods receipts against this purchase order.
- Minimum:
- 1
Responses
200Success
application/json
Records of the page.
deletedarray of objectrequiredRecords erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor.
Fields · 2
idintegerrequiredID of the erased record.
deleted_atstring (date-time)requiredWhen the record was erased.
next_cursorstring or nullrequiredCursor of the next page; null on the last page.
has_morebooleanrequiredtrue when there is a next page.
sync_cursorstring or nullrequiredOn the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages.
401The token is missing, invalid, expired or revoked
Headers
WWW-AuthenticatestringrequiredAuthentication scheme (RFC 6750).
- Example:
Bearer
application/problem+json
Returns Problem
403The plan, the IP address or the token scopes do not allow the request
Headers
WWW-AuthenticatestringAuthentication scheme (RFC 6750).
- Example:
Bearer error="insufficient_scope", scope="locations:read"
application/problem+json
Returns ForbiddenProblem
410The sync cursor is older than the deletion retention period or was issued before the database was restored
application/problem+json
Returns Problem
422A parameter is invalid or unknown
application/problem+json
Returns ValidationProblem
429The rate limit is exhausted
Headers
Retry-AfterintegerrequiredSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns RateLimitProblem
503The store is temporarily unavailable
Headers
Retry-AfterintegerSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns Problem
Errors of this endpoint
Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors
curl "https://api.saleya.app/v1/goods-receipts" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"data": [
{
"id": 0,
"number": "string",
"supplier_id": 0,
"location_id": 0,
"legal_entity_id": 0,
"purchase_order_id": 0,
"received_at": "2026-01-15T12:00:00Z",
"currency": "string",
"exchange_rate": "string",
"settlement_mode": "on_receipt",
"supplier_document": {
"type_code": "string",
"number": "string",
"date": "string"
},
"prices_include_tax": true,
"input_tax_treatment": "recoverable",
"lines_subtotal": 0,
"payable_total": 0,
"voided_at": "2026-01-15T12:00:00Z",
"note": "string",
"lines": [
{
"id": 0,
"variant_id": 0,
"lot_id": 0,
"purchase_order_line_id": 0,
"added_by_correction_id": 0,
"supplier_description": "string",
"supplier_quantity": "string",
"supplier_unit": "string",
"unit": "string",
"quantity": "string",
"unit_cost": 0,
"cost_per_quantity": "string",
"line_total": 0,
"store_unit_cost_micro": 0,
"tax_rate_bps": 0,
"landed_unit_cost_micro": 0
}
],
"corrections": [
{
"id": 0,
"number": "string",
"reason": "string",
"subtotal_before": 0,
"subtotal_after": 0,
"consumed_variance": 0,
"lines": [
{
"goods_receipt_line_id": 0,
"quantity_before": "string",
"quantity_after": "string",
"supplier_quantity_before": "string",
"supplier_quantity_after": "string",
"unit_cost_before": 0,
"unit_cost_after": 0,
"store_unit_cost_before_micro": 0,
"store_unit_cost_after_micro": 0,
"consumed_quantity": "string",
"consumed_variance": 0
}
],
"created_at": "2026-01-15T12:00:00Z"
}
],
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}
],
"deleted": [
{
"id": 0,
"deleted_at": "2026-01-15T12:00:00Z"
}
],
"next_cursor": "string",
"has_more": true,
"sync_cursor": "string"
}Goods receipt
get/goods-receipts/{goods_receipt}
Scope: procurement:read
Parameters
Path
goods_receiptintegerrequiredGoods receipt ID.
Responses
200Success
application/json
Returns GoodsReceipt
401The token is missing, invalid, expired or revoked
Headers
WWW-AuthenticatestringrequiredAuthentication scheme (RFC 6750).
- Example:
Bearer
application/problem+json
Returns Problem
403The plan, the IP address or the token scopes do not allow the request
Headers
WWW-AuthenticatestringAuthentication scheme (RFC 6750).
- Example:
Bearer error="insufficient_scope", scope="locations:read"
application/problem+json
Returns ForbiddenProblem
404The object does not exist or is not available to the app
application/problem+json
Returns Problem
422A parameter is invalid or unknown
application/problem+json
Returns ValidationProblem
429The rate limit is exhausted
Headers
Retry-AfterintegerrequiredSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns RateLimitProblem
503The store is temporarily unavailable
Headers
Retry-AfterintegerSeconds to wait before retrying.
- Minimum:
- 0
application/problem+json
Returns Problem
Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors
curl "https://api.saleya.app/v1/goods-receipts/{goods_receipt}" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"{
"id": 0,
"number": "string",
"supplier_id": 0,
"location_id": 0,
"legal_entity_id": 0,
"purchase_order_id": 0,
"received_at": "2026-01-15T12:00:00Z",
"currency": "string",
"exchange_rate": "string",
"settlement_mode": "on_receipt",
"supplier_document": {
"type_code": "string",
"number": "string",
"date": "string"
},
"prices_include_tax": true,
"input_tax_treatment": "recoverable",
"lines_subtotal": 0,
"payable_total": 0,
"voided_at": "2026-01-15T12:00:00Z",
"note": "string",
"lines": [
{
"id": 0,
"variant_id": 0,
"lot_id": 0,
"purchase_order_line_id": 0,
"added_by_correction_id": 0,
"supplier_description": "string",
"supplier_quantity": "string",
"supplier_unit": "string",
"unit": "string",
"quantity": "string",
"unit_cost": 0,
"cost_per_quantity": "string",
"line_total": 0,
"store_unit_cost_micro": 0,
"tax_rate_bps": 0,
"landed_unit_cost_micro": 0
}
],
"corrections": [
{
"id": 0,
"number": "string",
"reason": "string",
"subtotal_before": 0,
"subtotal_after": 0,
"consumed_variance": 0,
"lines": [
{
"goods_receipt_line_id": 0,
"quantity_before": "string",
"quantity_after": "string",
"supplier_quantity_before": "string",
"supplier_quantity_after": "string",
"unit_cost_before": 0,
"unit_cost_after": 0,
"store_unit_cost_before_micro": 0,
"store_unit_cost_after_micro": 0,
"consumed_quantity": "string",
"consumed_variance": 0
}
],
"created_at": "2026-01-15T12:00:00Z"
}
],
"created_at": "2026-01-15T12:00:00Z",
"updated_at": "2026-01-15T12:00:00Z"
}