Purchase Orders/Lines
Purchase Order Line Items API.
The purchase orders API and stock transfer API are common.
The URL param document_type is used to determine the type of document.
ordersfor purchase ordersstock-transfersfor stock transfers
A Stock Transfer (ST) is used for moving stock from one warehouse to another.
A Purchase Order (PO) is used for purchasing products from suppliers.
Against each PO/ST,
- You can make changes in relevant data only when PO status is
DRAFTorINCOMING. - You can make 1 or more Receive Notes (GRNs) to receive the goods.
Conditions applicable to Purchase Order Line Items
- A maximum of 10000 Line items are allowed in a document.
- A document cannot have duplicate products in its line items.
- A line item cannot have negative quantity.
List PO Lines
Lists PO Lines for a given PO.
path Parameters
document_type^orders|stock-transf… · requiredpo_idquery Parameters
error__isnullSet to false to filter lines that have an error.
is_dueSet to true to filter lines that have a due quantity.
limitNumber of results to return per page.
notesoOrdering
id- Id-id- Id (descending)
offsetThe initial index from which to return the results.
orderingWhich field to use when ordering the results.
productquantity__isnullsupplier_skuuomList PO Lines › Responses
countnextpreviousCreate PO Line
Creates a purchase order line.
The pack_size data is added at the time of creation,
so quantity cannot be added at the time of creation.
This is becuase quantity should be a multiple of the pack size value.
Use the line update API to add the quantity.
Raises:
- ValidationError if the PO is not in DRAFT status.
- ValidationError if the product is already added in the PO.
- ValidationError if the product is archived.
- ValidationError if the product is a bundle product.
- ValidationError if the PO already has 10000 lines.
path Parameters
document_type^orders|stock-transf… · requiredpo_idCreate PO Line › Request Body
idcreatedproduct_idProduct object.
quantitypurchase_order_idis_stock_transfertax_iddelivered_quantityuompack_sizesupplier_skunotestax_rate^-?\d{0,8}(?:\.\d{0,… · requiredcost^-?\d{0,10}(?:\.\d{0… · requiredshipping_cost^-?\d{0,10}(?:\.\d{0… · requiredmoqline_subtotal^-?\d{0,10}(?:\.\d{0… · requiredline_tax^-?\d{0,10}(?:\.\d{0… · requiredline_total^-?\d{0,10}(?:\.\d{0… · requirederrorReason the line is not ready yet. Null when the line is fine. Blocks all document actions.
Create PO Line › Responses
idcreatedproduct_idProduct object.
quantitypurchase_order_idis_stock_transfertax_iddelivered_quantityuompack_sizesupplier_skunotestax_rate^-?\d{0,8}(?:\.\d{0,… · requiredcost^-?\d{0,10}(?:\.\d{0… · requiredshipping_cost^-?\d{0,10}(?:\.\d{0… · requiredmoqline_subtotal^-?\d{0,10}(?:\.\d{0… · requiredline_tax^-?\d{0,10}(?:\.\d{0… · requiredline_total^-?\d{0,10}(?:\.\d{0… · requirederrorReason the line is not ready yet. Null when the line is fine. Blocks all document actions.
Update PO Line
Update a purchase order line.
Raises:
- ValidationError if the PO is not in DRAFT status.
path Parameters
document_type^orders|stock-transf… · requiredidpo_idUpdate PO Line › Request Body
idcreatedproduct_idProduct object.
quantityquantity in multiple of pack_size.
purchase_order_idis_stock_transfertax_iddelivered_quantityuompack_sizesupplier_skutax_rate^-?\d{0,8}(?:\.\d{0,… · requiredmoqline_subtotal^-?\d{0,10}(?:\.\d{0… · requiredline_tax^-?\d{0,10}(?:\.\d{0… · requiredline_total^-?\d{0,10}(?:\.\d{0… · requirederrorReason the line is not ready yet. Null when the line is fine. Blocks all document actions.
notescost^-?\d{0,10}(?:\.\d{0…shipping_cost^-?\d{0,10}(?:\.\d{0…Update PO Line › Responses
idcreatedproduct_idProduct object.
quantityquantity in multiple of pack_size.
purchase_order_idis_stock_transfertax_iddelivered_quantityuompack_sizesupplier_skutax_rate^-?\d{0,8}(?:\.\d{0,… · requiredmoqline_subtotal^-?\d{0,10}(?:\.\d{0… · requiredline_tax^-?\d{0,10}(?:\.\d{0… · requiredline_total^-?\d{0,10}(?:\.\d{0… · requirederrorReason the line is not ready yet. Null when the line is fine. Blocks all document actions.
notescost^-?\d{0,10}(?:\.\d{0…shipping_cost^-?\d{0,10}(?:\.\d{0…