Fetch the warranty offers still available on an order after the sale
Returns the warranty offers still available on an order after the original sale, together with the coverage that order already carries. It backs Mulberry's hosted post purchase experience, which reads it to render the landing page a customer lands on from a remarketing email.
Offers exist on an order because it was submitted to POST /api/carts without a warranty. Look an order up by its own id, or look up every order for a customer by email. Either way only orders belonging to the retailer in the path are returned.
What is returned here is bought either by the customer, on the Mulberry landing page the order's link leads to, or by you, through Post Purchase Checkout once you have collected the payment yourself.
Post Purchase Offers Endpoint
HTTP method: GET
Authentication: None. This endpoint backs Mulberry's hosted post purchase experience and is not part of the partner integration surface.
Staging Endpoint: https://partner-staging.getmulberry.com/api/purchase-warranties/{retailer_uuid}
Production Endpoint: https://partner.getmulberry.com/api/purchase-warranties/{retailer_uuid}
| Parameter | Description | Required | Type |
|---|---|---|---|
| retailer_uuid | Path parameter. The retailer whose orders are searched | yes | string |
| order_id | Query parameter. The order's id in your ecommerce platform | one of* | string |
| Query parameter. Returns every order for this customer under the retailer | one of* | string |
* Exactly one of order_id or email is required. Sending both, or neither, is a 400.
Response
Each order carries two lists, and they answer different questions.
line_items is what is still purchasable. One entry per line item, carrying the offers the customer can choose between and every product that line item covers — more than one when the line item covers a bundle. An empty offers list means the purchase window has closed, which the landing page renders as protection expired; that is not the same as the order having no line item.
products is what is already protected and out of the checkout flow. There is one entry per coverage issued, so a product covered twice appears twice, and product_id is what to group on for display.
customer.tax_rate is only present for orders billed to New York. customer.has_subscription is only present when the customer has an active subscription with Mulberry.
Line item fields:
| Parameter | Description | Type |
|---|---|---|
| line_item_id | Stable identifier for the line item. Send it back as line_item_id when buying, since position in this response shifts as items sell | integer |
| warranty_offer_id | Set when the line item is pinned to a single offer, null when the customer still chooses from offers | string |
| offers | The warranty offers still buyable on this line item. Empty when the purchase window has closed | array |
| products | Every product this line item covers. More than one for a bundle | array |
| products_total | The price the offers were priced against. Already the bundle total for a bundle | string |
Covered product fields:
| Parameter | Description | Type |
|---|---|---|
| product_id | Your product id for the covered product | string |
| product_title | Product title | string |
| product_price | Product price | string |
| product_image | Product image url, or an empty string when none was sent | string |
| is_subscription_eligible | Whether the product can be offered on a subscription instead | boolean |
Purchased product fields:
| Parameter | Description | Type |
|---|---|---|
| name | Product name | string |
| product_id | Your product id. Group on this rather than on name | string |
| product_image | First product image url, or null when the product has none | string |
| warranty.duration_months | Term of the coverage that was issued | string |
{
"customer": {
"email": "[email protected]",
"first_name": "John",
"tax_rate": 0
},
"orders": [
{
"id": "testing1234567-33",
"merchant": null,
"merchant_logo": "",
"line_items": [
{
"line_item_id": 91827,
"warranty_offer_id": null,
"offers": [
{
"cost": "100.00",
"customer_cost": "100.00",
"currency": "USD",
"duration_months": "36",
"expiration_date": "2022-05-01",
"mb_category": "indoor_furniture",
"policy_terms_url": "https://terms.getmulberry.com/20210305_fortegra_furniture_plus",
"service_type": "Replacement",
"warranty_offer_id": "0e2ac3d8-5965-45fd-9e8a-9aa6860829dc",
"warranty_type": "regular"
}
],
"products": [
{
"product_id": "9393939",
"product_title": "deluxe couch",
"product_price": "179.99",
"product_image": "",
"is_subscription_eligible": false
}
],
"products_total": "179.99"
}
],
"products": [
{
"name": "deluxe couch",
"product_id": "9393939",
"product_image": null,
"warranty": {
"duration_months": "36"
}
}
]
}
]
}| Status | Description |
|---|---|
| 200 | Offers returned. An order with nothing left to sell returns empty lists |
| 400 | Neither or both of order_id and email were given |
| 404 | No retailer matches the retailer_uuid |
| 500 | Internal error |
