# CancellationRequest

        <p>
          The <code>CancellationRequest</code> resource represents a cancellation request made by the merchant
          or an order management app to a
          <a href="/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillmentservice">fulfillment service</a>
          for a <a href="/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillmentorder">fulfillment order</a>.
          A fulfillment service can accept or reject the cancellation request.
        </p>
        <h2>Retrieving cancellation request details</h2>
        <p>
          The <code>FulfillmentOrder</code> resource and the <code>merchant_requests</code> field can be used to retrieve
          the merchant requests which have been made.
          The overall status of these requests is also available using the <code>request_status</code> field of the fulfillment order.
        </p>
        <p>
          To learn more about the cancellation request process in the fulfillment workflow, refer to
          <a href="/apps/fulfillment/fulfillment-service-apps/manage-fulfillments">Manage fulfillments as a fulfillment service app</a> guide.
        </p>

## Resource Properties

### CancellationRequest

## Sends a cancellation request

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

### Endpoint
/admin/api/#{api_version}/fulfillment_orders/{fulfillment_order_id}/cancellation_request.json (POST)

### Parameters
* api_version (required): 
* fulfillment_order_id (required): 
* message: An optional reason for the cancellation request.

### Responses
#### 200
Sends a cancellation request

Examples:
##### Sends a cancellation request to the fulfillment service of a fulfillment order and updates the fulfillment order
Request:
```
POST /admin/api/unstable/fulfillment_orders/1046000803/cancellation_request.json
{"cancellation_request":{"message":"The customer changed his mind."}}
```

Response:
```
HTTP/1.1 200 OK
{"fulfillment_order":{"id":1046000803,"created_at":"2025-01-02T11:35:24-05:00","updated_at":"2025-01-02T11:35:24-05:00","shop_id":548380009,"order_id":450789469,"assigned_location_id":24826418,"request_status":"cancellation_requested","status":"in_progress","fulfill_at":null,"fulfill_by":null,"supported_actions":["create_fulfillment","cancel_fulfillment_order"],"destination":{"id":1042572135,"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":1072503299,"shop_id":548380009,"fulfillment_order_id":1046000803,"quantity":1,"line_item_id":518995019,"inventory_item_id":49148385,"fulfillable_quantity":1,"variant_id":49148385}],"outgoing_requests":[],"international_duties":null,"fulfillment_holds":[],"delivery_method":null}}
```
## Accepts a cancellation request

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

### Endpoint
/admin/api/#{api_version}/fulfillment_orders/{fulfillment_order_id}/cancellation_request/accept.json (POST)

### Parameters
* api_version (required): 
* fulfillment_order_id (required): 
* message: An optional reason for accepting the cancellation request.

### Responses
#### 200
Accepts a cancellation request

Examples:
##### Accepts a cancellation request sent to a fulfillment service and updates the fulfillment order
Request:
```
POST /admin/api/unstable/fulfillment_orders/1046000804/cancellation_request/accept.json
{"cancellation_request":{"message":"We had not started any processing yet."}}
```

Response:
```
HTTP/1.1 200 OK
{"fulfillment_order":{"id":1046000804,"created_at":"2025-01-02T11:35:24-05:00","updated_at":"2025-01-02T11:35:25-05:00","shop_id":548380009,"order_id":450789469,"assigned_location_id":24826418,"request_status":"cancellation_accepted","status":"cancelled","fulfill_at":null,"fulfill_by":null,"supported_actions":["request_fulfillment","create_fulfillment","hold"],"destination":{"id":1042572136,"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":1072503300,"shop_id":548380009,"fulfillment_order_id":1046000804,"quantity":1,"line_item_id":518995019,"inventory_item_id":49148385,"fulfillable_quantity":1,"variant_id":49148385}],"outgoing_requests":[],"international_duties":null,"fulfillment_holds":[],"delivery_method":null}}
```
## Rejects a cancellation request

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

### Endpoint
/admin/api/#{api_version}/fulfillment_orders/{fulfillment_order_id}/cancellation_request/reject.json (POST)

### Parameters
* api_version (required): 
* fulfillment_order_id (required): 
* message: An optional reason for rejecting the cancellation request.

### Responses
#### 200
Rejects a cancellation request

Examples:
##### Rejects a cancellation request sent to a fulfillment service and updates the fulfillment order
Request:
```
POST /admin/api/unstable/fulfillment_orders/1046000802/cancellation_request/reject.json
{"cancellation_request":{"message":"We have already sent the shipment out."}}
```

Response:
```
HTTP/1.1 200 OK
{"fulfillment_order":{"id":1046000802,"created_at":"2025-01-02T11:35:23-05:00","updated_at":"2025-01-02T11:35:24-05:00","shop_id":548380009,"order_id":450789469,"assigned_location_id":24826418,"request_status":"cancellation_rejected","status":"in_progress","fulfill_at":null,"fulfill_by":null,"supported_actions":["create_fulfillment"],"destination":{"id":1042572134,"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":1072503298,"shop_id":548380009,"fulfillment_order_id":1046000802,"quantity":1,"line_item_id":518995019,"inventory_item_id":49148385,"fulfillable_quantity":1,"variant_id":49148385}],"outgoing_requests":[],"international_duties":null,"fulfillment_holds":[],"delivery_method":null}}
```