Cancel Order(s)

Cancels Mulberry plans on an order. Authenticate with your private API token.

Omit line_items to cancel every active plan on the order. Otherwise each line_items entry cancels one unit of its product; repeat an entry to cancel more units of the same product. Each unit takes the plan that best fits the request: first one covering more of the request's products, such as a bundle the request cancels in full, then one covering fewer products the request leaves out, then the oldest. That plan is cancelled, unless it's a bundle that also covers products the request leaves out: then the unit's product is removed from the bundle, which stays active at a new price. Entries for products with no Mulberry plan on the order are ignored, and so are entries without a product_id, except on an order from the Mulberry WooCommerce plugin: there an entry with an empty product_id cancels one plan on a product that no other entry names, which is how the plugin sends a product that has no SKU. Fulfilled plans (a claim was paid out) and plans already marked expired are never cancelled.

A request whose plans are all already cancelled answers 200 and changes nothing, so retrying a whole-order cancellation is safe. A partial request is not idempotent: sending the same line_items again cancels that many more units, while any remain active. Requests for the same order are processed one at a time, and one that waits more than five seconds for another to finish answers 503 without changing anything, so it can be retried.

A request answers 400 when it matches no plan on the order, when it matches only fulfilled or already-expired plans, or when its only change would be a bundle that can't be repriced. It answers 404 when your account has no order under order_id at all, in any status: the order may not have been created yet, so a client may retry the cancellation later. It answers 500 when an error stops it partway, and plans it cancelled before the error stay cancelled.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

Body Params
string
required
Defaults to 7689dde5c0f64fffa7ad217432f6f73

unique order ID

string
required
Defaults to 2018-09-04

Date of the cancellation

line_items
array of objects

Units to cancel, one entry per unit: to cancel three units of a product, send three entries with its product_id. Each entry cancels one active plan for that product. Omit to cancel every active plan on the order.

line_items
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Choose an example:
application/json