Post Purchase Offers

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}

ParameterDescriptionRequiredType
retailer_uuidPath parameter. The retailer whose orders are searchedyesstring
order_idQuery parameter. The order's id in your ecommerce platformone of*string
emailQuery parameter. Returns every order for this customer under the retailerone 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:

ParameterDescriptionType
line_item_idStable identifier for the line item. Send it back as line_item_id when buying, since position in this response shifts as items sellinteger
warranty_offer_idSet when the line item is pinned to a single offer, null when the customer still chooses from offersstring
offersThe warranty offers still buyable on this line item. Empty when the purchase window has closedarray
productsEvery product this line item covers. More than one for a bundlearray
products_totalThe price the offers were priced against. Already the bundle total for a bundlestring

Covered product fields:

ParameterDescriptionType
product_idYour product id for the covered productstring
product_titleProduct titlestring
product_priceProduct pricestring
product_imageProduct image url, or an empty string when none was sentstring
is_subscription_eligibleWhether the product can be offered on a subscription insteadboolean

Purchased product fields:

ParameterDescriptionType
nameProduct namestring
product_idYour product id. Group on this rather than on namestring
product_imageFirst product image url, or null when the product has nonestring
warranty.duration_monthsTerm of the coverage that was issuedstring
{
  "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"
          }
        }
      ]
    }
  ]
}
StatusDescription
200Offers returned. An order with nothing left to sell returns empty lists
400Neither or both of order_id and email were given
404No retailer matches the retailer_uuid
500Internal error