B2B feature. Learn more
addProductsToRequisitionList mutation
The addProductsToRequisitionList
mutation adds products to a requisition list.
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 {addProductsToRequisitionList(requisitionListUid: ID!requisitionListItems: [RequisitionListItemsInput!]!) {AddProductsToRequisitionListOutput}}
Reference
The addProductsToRequisitionList
reference provides detailed information about the types and fields defined in this mutation.
Example usage
The following example adds products to a requisition list.
Request:
Copied to your clipboardmutation {addProductsToRequisitionList(requisitionListUid: "Mg=="requisitionListItems: [{sku: "MS10"quantity: 1selected_options: ["Y29uZmlndXJhYmxlLzkzLzUw","Y29uZmlndXJhYmxlLzE2MC8xNjg"]}]) {requisition_list {uiditems {items {... on RequisitionListItemInterface {uidproduct {uidskuname}quantity}}}items_count}}}
Response:
Copied to your clipboard{"data": {"addProductsToRequisitionList": {"requisition_list": {"uid": "Mg==","items": {"items": [{"uid": "Mw==","product": {"uid": "NTk2","sku": "MS10","name": "Logan HeatTec® Tee"},"quantity": 1}]},"items_count": `}}}}