Cancellations can be done at any time by sending a POST request to our /api/order_cancelled endpoint. Cancellations are supported on both an order and line item basis. If the line_items array is omitted, every active plan on the order is cancelled; otherwise each entry cancels one unit, meaning one plan for that product. Once cancelled, the refund will be factored into the next invoice.
Cancelling a specific warranty
HTTP method: POST
Authentication: Private Bearer Token
Staging Endpoint: https://partner-staging.getmulberry.com/api/order_cancelled
Production Endpoint: https://partner.getmulberry.com/api/order_cancelled
{
"cancelled_date": "2018-09-04",
"order_id": "7689dde5c0f64fffa7ad217432f6f73",
"line_items": [{
"product_id": "123456"
}]
}
One entry per unitEach
line_itemsentry cancels the plan for that product that best fits the request, such as a bundle the request cancels in full, and otherwise the oldest plan still active. When that plan is a bundle that also covers products the request leaves out, the entry removes its product from the bundle, which stays active at a new price. To cancel three units of the same product, send its entry three times. Entries for products without a Mulberry plan are ignored, and a request that matches no plan answers400. Plans that are fulfilled (a claim was paid out) or already expired aren't cancelled. Requests for the same order are processed one at a time, and one that waits more than five seconds answers503without changing anything, so it can be retried.
Resending a partial cancellation cancels more unitsPlans that are already cancelled are skipped, and a request whose plans are all already cancelled answers
200, so retrying a whole-order cancellation, or one that named every unit, is safe. A partial request is not idempotent: sending it again cancels that many more units. Don't resend a partial cancellation after a200; if a request times out, check the order in your partner dashboard before sending it again.
| Parameter | Definition | Required | Type |
|---|---|---|---|
| cancelled_date | Date of the cancellation | yes | date |
| order_id | Unique order ID from your ecommerce platform | yes | string |
| line_items | One entry per unit to cancel. Repeat an entry to cancel more than one unit of the same product | no | array |
| product_id | SKU of the product that you'd like to cancel the warranty of | no | string |
Cancelling an entire order
Omit line_items to cancel every active plan on the order. Plans already cancelled are skipped, so this request is safe to retry: once everything is cancelled it answers 200 and changes nothing.
HTTP method: POST
Authentication: Private Bearer Token
Staging Endpoint: https://partner-staging.getmulberry.com/api/order_cancelled
Production Endpoint: https://partner.getmulberry.com/api/order_cancelled
{
"cancelled_date": "2018-09-04",
"order_id": "7689dde5c0f64fffa7ad217432f6f73"
}| Parameter | Definition | Required | Type |
|---|---|---|---|
| cancelled_date | The date of the cancellation | Yes | string |
| order_id | The unique order ID from your ecommerce platform | Yes | string |
