The REST Admin API is a legacy API as of October 1, 2024. All apps and integrations should be built with the GraphQL Admin API. For details and migration steps, visit our migration guide.

Multiple access scopes needed — refer to each endpoint for access scope requirements.

The CancellationRequest resource represents a cancellation request made by the merchant or an order management app to a fulfillment service for a fulfillment order. A fulfillment service can accept or reject the cancellation request.

Retrieving cancellation request details

The FulfillmentOrder resource and the merchant_requests field can be used to retrieve the merchant requests which have been made. The overall status of these requests is also available using the request_status field of the fulfillment order.

To learn more about the cancellation request process in the fulfillment workflow, refer to Manage fulfillments as a fulfillment service app guide.

Was this section helpful?

Properties

Was this section helpful?
{}The CancellationRequest resource
{}

Requires third_party_fulfillment_orders access scope.

Sends a cancellation request to the fulfillment service of a fulfillment order.

api_version
string
required

fulfillment_order_id
string
required

message
An optional reason for the cancellation request.

Was this section helpful?
Path parameters
fulfillmentorderid=1046000823
string
required
Was this section helpful?
post
/admin/api/2024-07/fulfillment_orders/1046000823/cancellation_request.json
Copy
curl -d '{"cancellation_request":{"message":"The customer changed his mind."}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-07/fulfillment_orders/1046000823/cancellation_request.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1046000823,
    "created_at": "2024-09-19T10:51:32-04:00",
    "updated_at": "2024-09-19T10:51:32-04:00",
    "shop_id": 548380009,
    "order_id": 450789469,
    "assigned_location_id": 24826418,
    "request_status": "cancellation_requested",
    "status": "in_progress",
    "fulfill_at": null,
    "supported_actions": [
      "create_fulfillment",
      "cancel_fulfillment_order"
    ],
    "destination": {
      "id": 1042572146,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@mail.example.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "+1(502)-459-2181",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 24826418,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1058737541,
        "shop_id": 548380009,
        "fulfillment_order_id": 1046000823,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": [],
    "international_duties": null,
    "fulfillment_holds": [],
    "fulfill_by": null,
    "delivery_method": null
  }
}

Requires assigned_fulfillment_orders access scope.

Accepts a cancellation request sent to a fulfillment service for a fulfillment order.

api_version
string
required

fulfillment_order_id
string
required

message
An optional reason for accepting the cancellation request.

Was this section helpful?
Path parameters
fulfillmentorderid=1046000822
string
required
Was this section helpful?
post
/admin/api/2024-07/fulfillment_orders/1046000822/cancellation_request/accept.json
Copy
curl -d '{"cancellation_request":{"message":"We had not started any processing yet."}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-07/fulfillment_orders/1046000822/cancellation_request/accept.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1046000822,
    "created_at": "2024-09-19T10:51:31-04:00",
    "updated_at": "2024-09-19T10:51:31-04:00",
    "shop_id": 548380009,
    "order_id": 450789469,
    "assigned_location_id": 24826418,
    "request_status": "cancellation_accepted",
    "status": "cancelled",
    "fulfill_at": null,
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment",
      "hold"
    ],
    "destination": {
      "id": 1042572145,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@mail.example.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "+1(502)-459-2181",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 24826418,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1058737540,
        "shop_id": 548380009,
        "fulfillment_order_id": 1046000822,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": [],
    "international_duties": null,
    "fulfillment_holds": [],
    "fulfill_by": null,
    "delivery_method": null
  }
}

Requires assigned_fulfillment_orders access scope.

Rejects a cancellation request sent to a fulfillment service for a fulfillment order.

api_version
string
required

fulfillment_order_id
string
required

message
An optional reason for rejecting the cancellation request.

Was this section helpful?
Path parameters
fulfillmentorderid=1046000824
string
required
Was this section helpful?
post
/admin/api/2024-07/fulfillment_orders/1046000824/cancellation_request/reject.json
Copy
curl -d '{"cancellation_request":{"message":"We have already sent the shipment out."}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2024-07/fulfillment_orders/1046000824/cancellation_request/reject.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
{}Response
JSON
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1046000824,
    "created_at": "2024-09-19T10:51:33-04:00",
    "updated_at": "2024-09-19T10:51:33-04:00",
    "shop_id": 548380009,
    "order_id": 450789469,
    "assigned_location_id": 24826418,
    "request_status": "cancellation_rejected",
    "status": "in_progress",
    "fulfill_at": null,
    "supported_actions": [
      "create_fulfillment"
    ],
    "destination": {
      "id": 1042572147,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@mail.example.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "+1(502)-459-2181",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 24826418,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1058737542,
        "shop_id": 548380009,
        "fulfillment_order_id": 1046000824,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": [],
    "international_duties": null,
    "fulfillment_holds": [],
    "fulfill_by": null,
    "delivery_method": null
  }
}