CancellationRequest

Version 2020-01 (Latest)

The CancellationRequest resource represents a cancellation request made by the merchant to a fulfillment service for a fulfillment order.

What you can do with CancellationRequest

The Shopify API lets you do the following with the CancellationRequest resource. More detailed versions of these general actions may be available:

Endpoints

POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request.json
Sends a cancellation request to the fulfillment service of a fulfillment order.
message

An optional reason for the cancellation request.

Sends a cancellation request to the fulfillment service of a fulfillment order and updates the fulfillment order

POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request.json
{
  "cancellation_request": {
    "message": "The customer changed his mind."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578628,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "shipwire-app",
    "request_status": "cancellation_requested",
    "status": "in_progress",
    "supported_actions": [
      "cancel_fulfillment_order",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578623,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1025578633,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578628,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": []
  }
}
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/accept.json
Accepts a cancellation request sent to a fulfillment service for a fulfillment order.
message

An optional reason for accepting the cancellation request.

Accepts a cancellation request sent to a fulfillment service and updates the fulfillment order

POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/accept.json
{
  "cancellation_request": {
    "message": "We had not started any processing yet."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578629,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "shipwire-app",
    "request_status": "cancellation_accepted",
    "status": "cancelled",
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578624,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1025578634,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578629,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": []
  }
}
POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/reject.json
Rejects a cancellation request sent to a fulfillment service for a fulfillment order.
message

An optional reason for rejecting the cancellation request.

Rejects a cancellation request sent to a fulfillment service and updates the fulfillment order

POST /admin/api/2020-01/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/reject.json
{
  "cancellation_request": {
    "message": "We have already send the shipment out."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578630,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "shipwire-app",
    "request_status": "cancellation_rejected",
    "status": "in_progress",
    "supported_actions": [
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578625,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1025578635,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578630,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": []
  }
}
Version 2020-04 (Release candidate)

The CancellationRequest resource represents a cancellation request made by the merchant to a fulfillment service for a fulfillment order.

What you can do with CancellationRequest

The Shopify API lets you do the following with the CancellationRequest resource. More detailed versions of these general actions may be available:

Endpoints

POST /admin/api/2020-04/fulfillment_orders/#{fulfillment_order_id}/cancellation_request.json
Sends a cancellation request to the fulfillment service of a fulfillment order.
message

An optional reason for the cancellation request.

Sends a cancellation request to the fulfillment service of a fulfillment order and updates the fulfillment order

POST /admin/api/2020-04/fulfillment_orders/#{fulfillment_order_id}/cancellation_request.json
{
  "cancellation_request": {
    "message": "The customer changed his mind."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578628,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "shipwire-app",
    "request_status": "cancellation_requested",
    "status": "in_progress",
    "supported_actions": [
      "cancel_fulfillment_order",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578623,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1025578633,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578628,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": []
  }
}
POST /admin/api/2020-04/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/accept.json
Accepts a cancellation request sent to a fulfillment service for a fulfillment order.
message

An optional reason for accepting the cancellation request.

Accepts a cancellation request sent to a fulfillment service and updates the fulfillment order

POST /admin/api/2020-04/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/accept.json
{
  "cancellation_request": {
    "message": "We had not started any processing yet."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578629,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "shipwire-app",
    "request_status": "cancellation_accepted",
    "status": "cancelled",
    "supported_actions": [
      "request_fulfillment",
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578624,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1025578634,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578629,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": []
  }
}
POST /admin/api/2020-04/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/reject.json
Rejects a cancellation request sent to a fulfillment service for a fulfillment order.
message

An optional reason for rejecting the cancellation request.

Rejects a cancellation request sent to a fulfillment service and updates the fulfillment order

POST /admin/api/2020-04/fulfillment_orders/#{fulfillment_order_id}/cancellation_request/reject.json
{
  "cancellation_request": {
    "message": "We have already send the shipment out."
  }
}
View Response
HTTP/1.1 200 OK
{
  "fulfillment_order": {
    "id": 1025578630,
    "shop_id": 690933842,
    "order_id": 450789469,
    "assigned_location_id": 48752903,
    "fulfillment_service_handle": "shipwire-app",
    "request_status": "cancellation_rejected",
    "status": "in_progress",
    "supported_actions": [
      "create_fulfillment"
    ],
    "destination": {
      "id": 1025578625,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "company": null,
      "country": "United States",
      "email": "bob.norman@hostmail.com",
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "province": "Kentucky",
      "zip": "40202"
    },
    "origin": {
      "address1": null,
      "address2": null,
      "city": null,
      "country_code": "DE",
      "location_id": 48752903,
      "name": "Apple Api Shipwire",
      "phone": null,
      "province": null,
      "zip": null
    },
    "line_items": [
      {
        "id": 1025578635,
        "shop_id": 690933842,
        "fulfillment_order_id": 1025578630,
        "quantity": 1,
        "line_item_id": 518995019,
        "inventory_item_id": 49148385,
        "fulfillable_quantity": 1,
        "variant_id": 49148385
      }
    ],
    "outgoing_requests": []
  }
}