B2B feature. Learn more
placePurchaseOrder mutation
The placePurchaseOrder
mutation places a purchase order using the specified cart_id
. If the request is successful, the status of the purchase order is ORDER_PLACED
.
To convert a purchase order to an order using the purchase order UID instead of the cart ID, use the placeOrderforPurchase
mutation.
Syntax
Copied to your clipboardmutation {placePurchaseOrder(input: PlacePurchaseOrderInput!) {PlacePurchaseOrderOutput}}
Reference
The placePurchaseOrder
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example places a purchase order.
Request:
Copied to your clipboardmutation {placePurchaseOrder(input: {cart_id: "hJUrIcPm77uCyYkSTBRGyjSvS40mw1Qd"}) {purchase_order {number}}}
Response:
Copied to your clipboard{"data": {"placePurchaseOrder": {"purchase_order": {"number": "000000002"}}}}