B2B feature. Learn more
addRequisitionListItemsToCart mutation
The addRequisitionListItemsToCart
mutation adds requisition list items to the cart. The requisition list does not change after adding items to the cart.
Use the storeConfig query with the is_requisition_list_active
attribute to determine whether requisition lists are enabled.
This mutation requires a valid customer authentication token.
Syntax
Copied to your clipboardmutation {addRequisitionListItemsToCart (requisitionListUid: IDrequisitionListItemUids: [ID!]) {AddRequisitionListItemsToCartOutput}}
Reference
The addRequisitionListItemsToCart
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example adds items to the cart.
Request:
Copied to your clipboardmutation {addRequisitionListItemsToCart (requisitionListUid: "Mg=="requisitionListItemUids:["Mw==", "Ng==", "Nw=="]){statuscart {items {uidproduct {uidskuname}}}}}
Response:
Copied to your clipboard{"data": {"addRequisitionListItemsToCart": {"status": true,"cart": {"items": [{"uid": "NQ==","product": {"uid": "NTk2","sku": "MS10","name": "Logan HeatTec® Tee"}},{"uid": "Nw==","product": {"uid": "MTI=","sku": "24-WB03","name": "Driven Backpack"}},{"uid": "OA==","product": {"uid": "Mg==","sku": "24-MB04","name": "Strive Shoulder Pack"}}]}}}}