B2B for Adobe Commerce only. Learn more.

updateRequisitionListItems mutation

The updateRequisitionListItems mutation updates products in a requisition list.

This mutation requires a valid customer authentication token.

Use the storeConfig query with the is_requisition_list_active attribute to determine whether requisition lists are enabled.

Syntax

1
2
3
4
5
6
7
8
mutation {
  updateRequisitionListItems(
    requisitionListUid: ID!
    requisitionListItems: [UpdateRequisitionListItemsInput!]!
  ) {
    UpdateRequisitionListItemsOutput
  }
}

Example usage

The following example updates the quantity of an item in a requisition list.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
mutation {
  updateRequisitionListItems(
    requisitionListUid: "Mg==",
    requisitionListItems: [
      {
          item_id: "Mw=="
          quantity: 2
      }
    ]
    ){
    requisition_list {
      uid
      name
      items_count
      items {
        items {
          uid
          quantity
          product {
            uid
            name
            sku
          }
        }
      }
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
{
  "data": {
    "updateRequisitionListItems": {
      "requisition_list": {
        "uid": "Mg==",
        "name": "Frequently Ordered Products",
        "items_count": 1,
        "items": {
          "items": [
            {
              "uid": "Mw==",
              "quantity": 2,
              "product": {
                "uid": "NTk2",
                "name": "Logan  HeatTec® Tee",
                "sku": "MS10"
              }
            }
          ]
        }
      }
    }
  }
}

Input attributes

The updateRequisitionListItems mutation requires the following input.

Attribute Data Type Description
requisitionListItems [UpdateRequisitionListItemsInput!]! An array of products to be updated in the requisition list
requisitionListUid ID! The unique ID of the requisition list

UpdateRequisitionListItemsInput attributes

The UpdateRequisitionListItemsInput type contains the list of products to be updated in the requisition list.

Attribute Data Type Description
entered_options [EnteredOptionInput!] An array of customer entered option IDs
item_id ID! The ID of the requisition list item to update
quantity Float The new quantity of the item
selected_options [String!] An array of selected option IDs

Output attributes

The updateRequisitionListItems object returns the requisition list object.

Attribute Data Type Description
requisition_list [RequisitionList] The requisition list after the items were updated

RequisitionList attributes

The RequisitionList object contains the following attributes.

Attribute Data Type Description
description String Optional text that describes the requisition list
items RequistionListItems An array of products added to the requisition list
items_count Int! The number of items in the list
name String! The requisition list name
uid ID! The unique requisition list ID
updated_at String The time of the last modification of the requisition list

RequistionListItems attributes

The RequistionListItems object contains the following attributes.

Attribute Data Type Description
items [RequisitionListItemInterface]! An array of items in the requisition list
page_info SearchResultPageInfo Contains pagination metadata
total_pages Int! The number of pages returned