PurchaseOrderLineItemPatch
A line item you send when updating a draft purchase order. Send id (or a client_line_id you used before) to change or remove an existing line; leave both out to add a new line, which then needs quantity_ordered and at least one of sku, variant_id or inventory_item_id.
Your own identifier for the line. It must be unique within the purchase order, and within one request: two lines with the same value in one request return 422. Send it again on a later PATCH to update the line without knowing its id.
replen-7731-1The product's SKU in your Shopify store. A new line sent with a sku and no variant_id or inventory_item_id is matched to the one product in Bookkeep's copy of your catalog with exactly that SKU, and the response fills in its variant_id, inventory_item_id, product_id and title. A SKU that matches no product returns 422, and so does a SKU shared by more than one product; send variant_id or inventory_item_id for that line instead. A product added in Shopify in the last few minutes may not be in Bookkeep yet, so retry later or send its variant_id or inventory_item_id.
TSHIRT-BLK-MThe Shopify product variant ID, in the form gid://shopify/ProductVariant/<id>.
gid://shopify/ProductVariant/44120183865627The Shopify inventory item ID, in the form gid://shopify/InventoryItem/<id>.
gid://shopify/InventoryItem/46217359098139Number of units to order. Must be greater than zero.
Possible values: >= 1
24Cost per unit, in the purchase order's currency.
6.25Tax rate for the line as a percentage, for example 8.25 for 8.25%. Defaults to 0.
8.25The supplier's own code for this item.
ACME-TS-BLK-MA note on this line.
nullThe item's barcode.
nullProduct title. When the line is matched to a product in your Shopify store, the store's product title replaces it.
Classic T-ShirtDisplay order of the line on the purchase order. Lines are sorted by position, then by the order they were added. Defaults to 0.
1The line item's id from an earlier response. Send it to change or remove that line.
31842Set to true, together with id or client_line_id, to remove the line. A line that already has stock received against it cannot be removed.
false{
"client_line_id": "replen-7731-1",
"sku": "TSHIRT-BLK-M",
"variant_id": "gid://shopify/ProductVariant/44120183865627",
"inventory_item_id": "gid://shopify/InventoryItem/46217359098139",
"quantity_ordered": 24,
"unit_cost": 6.25,
"tax_percent": 8.25,
"supplier_sku": "ACME-TS-BLK-M",
"note": null,
"barcode": null,
"title": "Classic T-Shirt",
"position": 1,
"id": 31842,
"_destroy": false
}