B2B for Adobe Commerce only. Learn more.

deleteRequisitionListItems mutation

The deleteRequisitionListItems mutation removes items from the specified requisiton 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 {
  deleteRequisitionListItems(
    requisitionListUid: ID!
    requisitionListItemUids: [ID!]!
  ) {
    DeleteRequisitionListItemsOutput
  }
}

Example usage

The following example removes the specified items from the requisition list.

Request:

1
2
3
4
5
6
7
8
9
10
11
mutation {
  deleteRequisitionListItems(
    requisitionListUid: "Mg==",
    requisitionListItemUids: ["NA==","NQ=="]
  ) {
    requisition_list {
      uid
      items_count
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
{
  "data": {
    "deleteRequisitionListItems": {
      "requisition_list": {
        "uid": "Mg==",
        "items_count": 1
      }
    }
  }
}

Input attributes

The deleteRequisitionListItems mutation requires the following input.

Attribute Data Type Description
requisitionListItemUids [ID!]! An array of UIDs representing products to be removed from the requisition list
requisitionListUid ID! The unique ID of the requisition list

Output attributes

The deleteRequisitionListItems object returns the requisition list after the deletion of items.

Attribute Data Type Description
requisition_list RequisitionList The requisition list after removing items

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