Creates several receipts in one call.

POST /inventory/receipts/bulk

Group: Inventory › Receipts · Operation ID: bulkCreateReceipts

Creates several receipts in one call, each in draft status. All or nothing: if any receipt is rejected, none is written, and 'index' on the error says which, counting from zero. Each entry is exactly what POST inventory/receipts takes, and the results come back in input order.

Open in the interactive reference

Parameters

Name In Type Required Description
Api-Version header "v1" yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
Idempotency-Key header string no An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored.

Request body

Required, application/json: bulkCreateReceiptsInput.

Field Type Required Description
receipts array of object yes The receipts to create. At least one, and each is exactly what POST inventory/receipts takes.
receipts[].businessPartnerId string yes The vendor the goods came from. Required.
receipts[].entityId string no The legal entity. Omit it and the first line's warehouse decides it, but a receipt of only service lines has no warehouse, so supply it there.
receipts[].documentDate string (date) no The date of the receipt. Use format YYYY-MM-DD. Defaults to today.
receipts[].deliveryDate string (date) no The date the goods arrived. Use format YYYY-MM-DD.
receipts[].currency string no The currency for every amount on the receipt. Format ISO 4217, for example 'EUR'. Defaults to the vendor's or the entity's, as the platform resolves it.
receipts[].referenceNumber string no The vendor's own reference, typically their delivery note number.
receipts[].notes string no Free text on the receipt.
receipts[].lines array of object yes The lines of the receipt. At least one is required.
receipts[].lines[].lineType string, one of "Inventory", "Service", "Expense" no What this line receives. Defaults to Inventory. An Inventory line needs itemId, unitId, locationId and quantity, because it moves stock into a warehouse. A Service or Expense line needs serviceDescription and an amount, and has no item or warehouse. A line with a description and no item is taken as a Service line.
receipts[].lines[].itemId string no The item received. Required on an Inventory line, and not used on a Service or Expense line.
receipts[].lines[].serviceDescription string no What was bought. Required on a Service or Expense line, and not used on an Inventory line.
receipts[].lines[].locationId string no The warehouse the goods go into. Required on an Inventory line.
receipts[].lines[].unitId string no The unit the quantity is counted in. Required on an Inventory line.
receipts[].lines[].quantity string (decimal) no The quantity received, in that unit. Required on an Inventory line, and greater than zero.
receipts[].lines[].unitPrice string (decimal) no The price of one unit, in the receipt's currency.
receipts[].lines[].lineTotal string (decimal) no The total for the line, in the receipt's currency. On a Service or Expense line, give this or a unitPrice.
receipts[].lines[].expenseAccountId string no The GL account to charge. Required on a Service or Expense line, and not used on an Inventory line. Without it, the commit fails when it posts the journal entry.
receipts[].lines[].sourceDocumentLineId string no The purchase order line this line receives against, as its id under lines on GET accounting/purchase-orders/:id. Its numeric id in string form is also accepted. The line type is set from it.
receipts[].lines[].notes string no Free text on the line.
receipts[].lines[].batches array of object no The batches received on this line. Required for a batch-tracked item, and the quantities must add up to the line's quantity. When you send it on update, it replaces the line's batches.
receipts[].lines[].batches[].batchNumberId string no The unique identifier for an existing batch. Omit it and give batchNumber for a batch arriving for the first time, and the batch record is created.
receipts[].lines[].batches[].batchNumber string no The batch number as printed on the delivery. Required unless batchNumberId is given.
receipts[].lines[].batches[].expirationDate string (date) no The expiration date of the batch. Format YYYY-MM-DD.
receipts[].lines[].batches[].quantity string (decimal) yes The quantity of this batch received, in the line's unit. The batch quantities of a line must add up to the line's quantity.
receipts[].lines[].serials array of object no The serialized units received, one entry per unit. Required for a serialized item, and the count must equal the line's quantity. When you send it on update, it replaces the line's serials.
receipts[].lines[].serials[].serialNumberId string no The unique identifier for an existing serial record. Omit it and give serialNumber for a unit arriving for the first time.
receipts[].lines[].serials[].serialNumber string no The serial number stamped on the unit. Required unless serialNumberId is given.
receipts[].lines[].binLocations array of object no The bins the goods go into, in a bin-tracked warehouse. One flat array, where an entry may name a batchNumber or serialNumber of its own line. When you send it on update, it replaces the line's bin entries.
receipts[].lines[].binLocations[].binLocationId string yes The bin the goods go into.
receipts[].lines[].binLocations[].quantity string (decimal) yes The quantity going into this bin, in the line's unit.
receipts[].lines[].binLocations[].batchNumber string no Names one of this line's batches, when the bin entry belongs to it.
receipts[].lines[].binLocations[].serialNumber string no Names one of this line's serialized units, when the bin entry belongs to it.

Example:

{
  "receipts": [
    {
      "businessPartnerId": "b62e4f17-0c93-4a58-8d21-5f70e3b9a4c6",
      "documentDate": "2026-08-14",
      "deliveryDate": "2026-08-14",
      "referenceNumber": "DN-77120",
      "currency": "EUR",
      "notes": "Received at the back dock",
      "lines": [
        {
          "lineType": "Inventory",
          "itemId": "5f21c8b0-9d34-4a76-8e12-04b93c7de5a8",
          "locationId": "e1d84c07-5b39-4a26-9f70-2c8b613ad495",
          "unitId": "3b7d5e9c-1a24-4f80-9c6d-2e8f70b13a45",
          "quantity": "200.00",
          "unitPrice": "3.20",
          "sourceDocumentLineId": "551043",
          "notes": "Two pallets"
        },
        {
          "lineType": "Service",
          "serviceDescription": "Inbound freight",
          "lineTotal": "85.00",
          "expenseAccountId": "4b7c0e29-6d15-4830-9f42-8a3e57c1d604"
        }
      ]
    }
  ]
}

Response

200 Success

Under data (bulkCreateReceiptsOutput):

Field Type Required Description
items array of object yes The created receipts, in input order. Match them to inputs by index.
items[].id string yes The unique identifier for the receipt.
items[].documentNumber string no The receipt number, for example 'GR-2291'. Assigned when the receipt is created.
items[].documentStatus string yes The status of the receipt. It is DRAFT when the receipt is created through this API and COMMITTED once you commit it with POST inventory/receipts/:id/commit. The receiving and invoicing processes set the other statuses.
items[].documentDate string (date) yes The date of the receipt. Format YYYY-MM-DD.
items[].deliveryDate string (date) no The date the goods arrived or are expected. Format YYYY-MM-DD.
items[].entityId string yes The legal entity the receipt belongs to.
items[].entityName string no The name of that legal entity.
items[].businessPartnerId string yes The vendor the goods came from.
items[].businessPartnerName string no The name of that vendor.
items[].referenceNumber string no The vendor's own reference, typically their delivery note number.
items[].currency string no The currency of the receipt's amounts. Format ISO 4217, for example 'EUR'. This is the vendor's currency, which need not be the entity's functional currency. See functionalUnitPrice on the line for the functional-currency amounts.
items[].totalAmount string (decimal) no The total value of the receipt, in the receipt's currency.
items[].notes string no Free text on the receipt.
items[].createdDate string (date-time) no The date and time the receipt was created, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
items[].lastModifiedDate string (date-time) no The date and time the receipt last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ.
items[].lines array of object yes The lines of the receipt, oldest first. A receipt always has at least one line.
items[].lines[].id string yes The unique identifier for the line. Use it in updateLines and deleteLines.
items[].lines[].lineType string no The type of the line. Possible values: 'Inventory', 'Service', 'Expense'. Only an Inventory line moves stock. A Service or Expense line records something bought that does not enter a warehouse and has a description instead of an item.
items[].lines[].itemId string no The item received. Absent on a Service or Expense line.
items[].lines[].itemCode string no The short code of that item.
items[].lines[].itemName string no The name of that item.
items[].lines[].serviceDescription string no What a Service or Expense line is for. Absent on an Inventory line.
items[].lines[].locationId string no The warehouse the goods went into. Absent on a Service or Expense line.
items[].lines[].locationCode string no The short code of that warehouse.
items[].lines[].locationName string no The name of that warehouse.
items[].lines[].unitId string no The unit the quantity is counted in.
items[].lines[].unitCode string no The short code of that unit.
items[].lines[].quantity string (decimal) no The quantity received, in the line's unit.
items[].lines[].inventoryQuantity string (decimal) no The same quantity in the item's stocking unit.
items[].lines[].receivedQuantity string (decimal) no The quantity actually received, where the receiving process records it separately.
items[].lines[].openQuantity string (decimal) no The quantity still to be invoiced.
items[].lines[].returnedQuantity string (decimal) no The quantity that has gone back on a purchase return.
items[].lines[].unitPrice string (decimal) no The price of one unit, in the receipt's currency.
items[].lines[].lineTotal string (decimal) no The total for the line, in the receipt's currency.
items[].lines[].functionalUnitPrice string (decimal) no The unit price in the entity's functional currency. Present when the receipt is in another currency.
items[].lines[].functionalLineTotal string (decimal) no The line total in the entity's functional currency.
items[].lines[].expenseAccountId string no The GL account a Service or Expense line is charged to. Absent on an Inventory line.
items[].lines[].expenseAccountNumber string no The number of that account.
items[].lines[].expenseAccountName string no The name of that account.
items[].lines[].status string no Where the line is in the receiving process. This is free text, with no fixed set of values.
items[].lines[].sourceDocumentLineId string no The purchase order line this line was received against. It is a numeric id in string form, not a UUID. Purchase order lines are not individually addressable, so there is no endpoint that takes it.
items[].lines[].sourceDocumentLineType string, one of "IMInventorySalesOrderLine", "IMInventorySalesDeliveryLine", "IMSalesOrderLine", "IMInventoryPurchaseReturnLine", "IMInventorySalesReturnLine", "IMWarehouseTransferLine", "IMInventoryDecreaseLine", "IMInventoryIncreaseLine", "IMInventoryRevaluationLine", "IMInventoryTransferLine", "IMInventoryAdjustmentLine", "IMInventoryCountLine", "IMInventoryPutAwayTask", "IMInventoryPurchaseReturnReversal", "PurchaseOrderLine", "IMLandedCostAllocationLine", "SalesOrderProductItem", "IMWarehouseTransferOrderLine", "VendorBillItemBase", "InvPurchaseDeliveryLine" no The kind of source document line this receipt line was created from.
items[].lines[].notes string no Free text on the line.
items[].lines[].batches array of object no The batches received on this line, for a batch-tracked item. Absent when the item is not batch-tracked.
items[].lines[].batches[].batchNumberId string no The unique identifier for the batch record this entry created or matched.
items[].lines[].batches[].batchNumber string yes The batch number as printed.
items[].lines[].batches[].expirationDate string (date) no The expiration date of the batch. Format YYYY-MM-DD.
items[].lines[].batches[].quantity string (decimal) yes The quantity of this batch received, in the line's unit.
items[].lines[].batches[].inventoryQuantity string (decimal) no The same quantity in the item's stocking unit.
items[].lines[].batches[].openQuantity string (decimal) no The quantity of this batch still to be invoiced.
items[].lines[].batches[].returnedQuantity string (decimal) no The quantity of this batch that has gone back to the vendor.
items[].lines[].batches[].unitCost string (decimal) no The cost of one unit of this batch, in the receipt's currency.
items[].lines[].serials array of object no The serialized units received, one entry per unit. Absent when the item is not serialized.
items[].lines[].serials[].serialNumberId string no The unique identifier for the serial record this entry created or matched.
items[].lines[].serials[].serialNumber string yes The serial number as stamped on the unit.
items[].lines[].serials[].openQuantity string (decimal) no The quantity of this unit still to be invoiced.
items[].lines[].serials[].returnedQuantity string (decimal) no The quantity of this unit that has gone back to the vendor.
items[].lines[].serials[].unitCost string (decimal) no The cost of this unit, in the receipt's currency.
items[].lines[].binLocations array of object no The bins the goods went into, in a bin-tracked warehouse. One flat array per line: an entry that names a batchNumber or serialNumber belongs to that batch or unit, and one that names neither belongs to the line.
items[].lines[].binLocations[].binLocationId string yes The bin the goods went into.
items[].lines[].binLocations[].binLocationCode string no The short code of that bin.
items[].lines[].binLocations[].quantity string (decimal) yes The quantity put into this bin, in the line's unit.
items[].lines[].binLocations[].inventoryQuantity string (decimal) no The same quantity in the item's stocking unit.
items[].lines[].binLocations[].batchNumber string no The batch this bin entry belongs to, when it belongs to one of the line's batches.
items[].lines[].binLocations[].serialNumber string no The serialized unit this bin entry belongs to, when it belongs to one of the line's units.

Response headers

Errors

Code Status
NOTHING_TO_CREATE 400
REFERENCE_NOT_FOUND 400
NO_LINES 400
INVALID_QUANTITY 400
INCOMPLETE_LINE 400
DUPLICATE_TRACKING_NUMBER 400
UNKNOWN_TRACKING_REFERENCE 400
POSTING_REJECTED 400
IDEMPOTENCY_KEY_CONFLICT 409
IDEMPOTENCY_PAYLOAD_MISMATCH 422

Statuses