Cancellations Overview

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 unit

Each line_items entry 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 answers 400. 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 answers 503 without changing anything, so it can be retried.

🚧

Resending a partial cancellation cancels more units

Plans 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 a 200; if a request times out, check the order in your partner dashboard before sending it again.

ParameterDefinitionRequiredType
cancelled_dateDate of the cancellationyesdate
order_idUnique order ID from your ecommerce platformyesstring
line_itemsOne entry per unit to cancel. Repeat an entry to cancel more than one unit of the same productnoarray
product_idSKU of the product that you'd like to cancel the warranty ofnostring

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"
}
ParameterDefinitionRequiredType
cancelled_dateThe date of the cancellationYesstring
order_idThe unique order ID from your ecommerce platformYesstring