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.

200Receipts that match the filters.
{
  "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

locationIdstring

Filter by branch.

entryTypestring

Filter by entry type. Accepted values: purchase_order, transfer, return.

sourceIdstring

Filter by source: the purchase order, the transfer or the returned order.

pagenumber

Page, 0-based. Default: 0.

limitnumber

Results 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.

200The receipt and its progress.
{
  "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 }]
  }
}
404The receipt does not exist in your tenant.
{ "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

idstringrequired

Receipt identifier.

Receiving tray

Lists a branch's in-process merchandise, with its receipt, manufacturer batch, expiration and stage.

200In-process positions.
{
  "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

locationIdstringrequired

Branch whose tray you query.

stageIdstring

Filter by flow stage.

receiptIdstring

Filter by receipt.

skustring

Filter by exact SKU. Useful for barcode scanning: resolve the SKU and pass it here.

pagenumber

Page, 0-based. Default: 0.

limitnumber

Results 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 }
200Pieces moved. If the destination stage is AVAILABLE, it is equivalent to a release.
{ "moved": 60, "toStageId": "st_calidad", "positionId": "pos_01J9B" }
400The destination stage is not an allowed branch from the current stage, or the quantity exceeds the position.
{ "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

idstringrequired

Position identifier.

toStageIdstringrequired

Destination stage. It must be a transition of the current stage in the flow the merchandise entered with.

quantitynumberrequired

Pieces 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 }
200Pieces released. Stock goes up and the channels are updated.
{ "released": 57, "lotId": "lot_01J9C", "stock": 57, "inProcess": 43 }
400The position's stage has no AVAILABLE exit, or the quantity exceeds the position.
{ "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 active again.
  • Merchandise without a source lot: raises stock without 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

idstringrequired

Position identifier.

quantitynumberrequired

Pieces 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" }
200Pieces written off as scrap.
{ "scrapped": 3, "lossAmount": 2400, "currency": "MXN" }
400The quantity exceeds the position, or the stage has no SCRAP exit.
{ "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

idstringrequired

Position identifier.

quantitynumberrequired

Pieces to scrap. Integer greater than 0 and not greater than the position's quantity.

reasonstringrequired

Reason 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