deleteRequisitionList mutation

Magento Commerce for B2B only

The content on this page is for Magento Commerce for B2B only. Learn more

The deleteRequisitionList mutation deletes a requisition list of the logged in customer. The response can include any remaining requisition lists.

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
mutation {
  deleteRequisitionList(
    requisitionListUid: ID!
  ) {
    deleteRequisitionListOutput
  }
}

Example usage

The following example deletes a requisition list.

Request:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
mutation {
  deleteRequisitionList(
    requisitionListUid: "Mw=="
  ) {
    status
    requisition_lists {
      total_count
      items {
        uid
        name
      }
    }
  }
}

Response:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "data": {
    "deleteRequisitionList": {
      "status": true,
      "requisition_lists": {
        "total_count": 1
        "items": [
          {
            "uid": "Mg==",
            "name": "Frequently Ordered Products"
          }
        ]
      }
    }
  }
}

Input attributes

The deleteRequisitionList mutation requires the following input.

Attribute Data Type Description
requisitionListUid ID! The ID of the requisition list to delete

Output attributes

The deleteRequisitionList mutation returns the status of the operation and any undeleted requisition lists.

Attribute Data Type Description
requisition_lists [RequisitionLists] Contains the customer’s remaining requisition lists
status Boolean Indicates whether the request to delete the requisition list was successful

RequisitionLists attributes

The RequisitionLists object contains array of requisition list items and pagination information.

Attribute Data Type Description
items [RequisitionList] An array of requisition lists
page_info SearchResultPageInfo Contains pagination metadata
total_count Int The number of returned requisition lists

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