B2B for Adobe Commerce only. Learn more.

createRequisitionList mutation

The createRequisitionList mutation creates a requisition list for the logged in customer.

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 {
  createRequisitionList(
    name: String!
    description: String
  ) {
    CreateRequisitionListOutput
  }
}

Example usage

The following example creates the Frequently Ordered Products requisition list.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
mutation {
  createRequisitionList(input:{
    name: "Frequently Ordered Products"
    description: "Frequently ordered products list"
  }
  ) {
    requisition_list {
      uid
      name
      description
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
{
  "data": {
    "createRequisitionList": {
      "requisition_list": {
          "uid": "Mw=="
          "name": "Frequently Ordered Products"
          "description": "Frequently ordered products list"
        }
    }
  }
}

Input attributes

The createRequisitionList mutation requires the following input.

Attribute Data Type Description
description String Description of the customer’s requisition list
name String! The name of the customer’s requisition list

Output attributes

The createRequisitionList mutation returns the new requisition list.

Attribute Data Type Description
requisition_list [RequisitionList] The created requisition list

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