post
https://api.apicbase.com/api/v2/procurement/supplier_deliveries/
Creates a delivery.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Creates a delivery in a draft state. Also creates an aggregated delivery related to the same purchase order if it doesn't exist yet. A delivery can only be created for a purchase order in the ORDERED state, or in the DELIVERED state if it is still accepting deliveries.
Check the guide page on receiving purchase orders for more information.
Returnable packages
Returnable packages, such as crates, kegs and pallets, go in returnable_packages, one line per item and direction. Without the Returnables module, a request with returnable lines is refused with 400.
- The sign gives the direction. A line coming in has a positive
quantity, and a line going back to the supplier has a negative one.deposit_valuehas the same sign asquantityor is0, and a deposit with the opposite sign is refused with 400.directioncan be left out, and when it is sent it must agree with the sign ofquantity. - Each line's supplier package must be from the order's supplier, and its stock item must be marked as returnable. In
delivered_packages, such an item is refused with 400 unless it is on the order. - An item can be listed once in each direction. A second line for the same item and direction is refused with 400, and so is a
quantityof0. returnables_inandreturnables_outfollow the lines. In a direction that has lines, the total is the sum of their deposits, as a positive amount. Sending a different value is refused with 400.
