Receipts and receiving tray
A receipt records what merchandise entered a branch and through which operation: a purchase order, a transfer or a returned order. If the branch has a receiving flow, the merchandise is held in positions: in-process pieces, in a stage, with their cost. The receiving tray lists those positions and lets you move them, release them to sale or scrap them.
There is no public endpoint to create a receipt
A receipt is born inside Fenicia: when a purchase order is received (see Purchase order receiving), when a transfer is received or when a return is accepted. This page only queries receipts and operates on in-process merchandise.
A receipt is unique per entry type, source and receipt number within the source. Retrying the same call does not duplicate the receipt or its lots.
List receipts
Lists the tenant's merchandise receipts, newest first.
{
"data": [
{
"id": "rcp_01J9A",
"tenantId": "69db07c8bce4d49b18c42a49",
"locationId": "670a1b2c3d4e5f6a7b8c9d01",
"entryType": "purchase_order",
"sourceId": "po_4471",
"sourceSequence": 1,
"flowId": "flw_01J8Z",
"items": [
{ "sku": "CAM-ROJO-M", "productSku": "CAM-ROJO", "quantity": 60, "unitCost": 800, "currency": "MXN", "batchNumber": "L-2291", "expirationDate": "2027-03-31T00:00:00.000Z" }
],
"receivedBy": "usr_88",
"receivedAt": "2026-10-05T16:30:00.000Z"
}
],
"total": 1,
"page": 0,
"limit": 50,
"totalPages": 1,
"hasMore": false
}
Returns the receipts in data, with the total and pagination.
Required permission: inventory:read
Parameters
locationIdstringFilter by branch.
entryTypestringFilter by entry type. Accepted values: purchase_order, transfer, return.
sourceIdstringFilter by source: the purchase order, the transfer or the returned order.
pagenumberPage, 0-based. Default: 0.
limitnumberResults per page. Default: 50.
Receipt progress
Returns a receipt with its progress: what was received, released, what is still in process by stage, and the scrap.
{
"receipt": {
"id": "rcp_01J9A",
"locationId": "670a1b2c3d4e5f6a7b8c9d01",
"entryType": "purchase_order",
"sourceId": "po_4471",
"sourceSequence": 1,
"flowId": "flw_01J8Z",
"items": [{ "sku": "CAM-ROJO-M", "quantity": 100, "unitCost": 800, "currency": "MXN" }],
"receivedBy": "usr_88",
"receivedAt": "2026-10-05T16:30:00.000Z"
},
"progress": {
"received": 100,
"released": 50,
"scrapped": 3,
"inProcess": [{ "stageId": "st_calidad", "stageName": "Control de calidad", "quantity": 47 }]
}
}
{ "code": "not-found", "message": "Receipt not found" }
Returns the receipt and its progress, which Fenicia computes by joining the receipt, its positions and its movements. The purchase order does not store this progress: it is always read from inventory.
Required permission: inventory:read
Parameters
idstringrequiredReceipt identifier.
Receiving tray
Lists a branch's in-process merchandise, with its receipt, manufacturer batch, expiration and stage.
{
"data": [
{
"id": "pos_01J9B",
"tenantId": "69db07c8bce4d49b18c42a49",
"locationId": "670a1b2c3d4e5f6a7b8c9d01",
"flowId": "flw_01J8Z",
"stageId": "st_calidad",
"receiptId": "rcp_01J9A",
"sku": "CAM-ROJO-M",
"quantity": 47,
"unitCost": 800,
"currency": "MXN",
"batchNumber": "L-2291",
"expirationDate": "2027-03-31T00:00:00.000Z"
}
],
"total": 1,
"page": 0,
"limit": 50,
"totalPages": 1,
"hasMore": false
}
Returns the positions in data. A position exists only while the merchandise is in a HOLD stage: when it is released or scrapped, it disappears.
Required permission: inventory:read
Parameters
locationIdstringrequiredBranch whose tray you query.
stageIdstringFilter by flow stage.
receiptIdstringFilter by receipt.
skustringFilter by exact SKU. Useful for barcode scanning: resolve the SKU and pass it here.
pagenumberPage, 0-based. Default: 0.
limitnumberResults per page. Default: 50.
Move merchandise between stages
Moves pieces of a position to another flow stage, through one of the branches the stage allows.
{ "toStageId": "st_calidad", "quantity": 60 }{ "moved": 60, "toStageId": "st_calidad", "positionId": "pos_01J9B" }
{ "code": "bad-request", "message": "La etapa st_piso no es un destino de st_recepcion" }
Returns the quantity moved and the destination stage. Moving between HOLD stages changes neither stock nor inProcess and does not update the channels. Each movement is kept in the history with the branch label and the user.
Required permission: inventory:update
Parameters
idstringrequiredPosition identifier.
toStageIdstringrequiredDestination stage. It must be a transition of the current stage in the flow the merchandise entered with.
quantitynumberrequiredPieces to move. Integer greater than 0 and not greater than the position's quantity.
Release to sale
Releases pieces of a position to sellable stock. It can be partial.
{ "quantity": 57 }{ "released": 57, "lotId": "lot_01J9C", "stock": 57, "inProcess": 43 }
{ "code": "bad-request", "message": "La posición no puede liberarse desde la etapa st_recepcion" }
Returns the pieces released, the lot they entered, and the resulting stock and inProcess. What happens on release depends on the entry type:
- Purchase order: creates that receipt's lot, or adds to the one that already exists. Partial releases of the same receipt add to the same lot.
- Transfer: creates one derived lot per source lot, with its cost. Costs are not averaged.
- Customer return: puts each piece back into its original lot. A depleted lot that receives a return becomes
activeagain. - Merchandise without a source lot: raises
stockwithout a lot.
Releasing emits one inventory update, and the channels learn of it from there. If an ERP governs the branch's stock, the release is rejected.
Required permission: inventory:update
Parameters
idstringrequiredPosition identifier.
quantitynumberrequiredPieces to release. Integer greater than 0 and not greater than the position's quantity.
Scrap
Writes off pieces of a position as scrap, with a reason.
{ "quantity": 3, "reason": "Empaque dañado en control de calidad" }{ "scrapped": 3, "lossAmount": 2400, "currency": "MXN" }
{ "code": "bad-request", "message": "La cantidad excede las piezas de la posición" }
Returns the pieces written off and the loss. The loss is computed at the position's cost and the merchandise never enters a lot. Scrap does not emit an inventory update.
Required permission: inventory:update
Parameters
idstringrequiredPosition identifier.
quantitynumberrequiredPieces to scrap. Integer greater than 0 and not greater than the position's quantity.
reasonstringrequiredReason for the scrap. Free text; it is kept in the movement history.
Examples
# Release 57 pieces of a position to sale
curl -X POST https://api.fenicia.io/inventory/flow-positions/pos_01J9B/release \
-H "Authorization: Bearer fkapi_tu_api_key" \
-H "Content-Type: application/json" \
-d '{ "quantity": 57 }'Next steps
- Receiving flows
- Lots and valuation
- Inventory adjustments — differences in a stage are fixed with an adjustment
sourceType: "flow". - Error Catalog