Record items received against a purchase order’s lines, then list, read, update and delete item receipts.
An item receipt records items received against the lines of a purchase order. These endpoints create, list, read, update and delete receipts, list a purchase order’s receipts, and delete a receipt’s note. This area has 7 endpoints, each available in all seven SDKs.
A completed item receipt cannot be deleted. The delete is refused with 400stock_committed.
Register your API credentials once when your app starts, as shown in
Authentication. Every SDK sample on these pages then gets its client in one line.
With cURL, send the access token in an Authorization header: Authorization: Bearer $ACCESS_TOKEN.
Writes are wrapped in item_receipt. A create names the purchase_order, a receipt_status such as STARTED, a receipt_date, and lines, each with a purchase_order_line id and a receipt_quantity. Reads return receipt_status in lower case, such as started.
Receipt ids start with ir_, and note ids with note_. Pass them in the paths as they are.
The update changes a receipt’s details. It takes fields such as tracking_number, receipt_note and receipt_date, and raises the receipt’s version.
The listing pages by cursor. Pass limit, then send the next_cursor from pagination as cursor until has_more is false.