Creating Offers Overview

Creating Offers

You can create offers for products in real-time by passing product details to the Mulberry API. It is best practice to provide the full payload below or as much as possible, so Mulberry can properly categorize products automatically and accurately.

HTTP method: POST

Authentication: Public Bearer Token

Staging Endpoint: https://partner-staging.getmulberry.com/api/warranty-offers

Production Endpoint: https://partner.getmulberry.com/api/warranty-offers

import requests

payload = {
  "title": "Dining Room Table",
  "id": "DINING-XYZ",
  "price": "1500.00",
  "url": "https://yoursite.com/this/product",
  "description": "your product description",
  "meta": {
    "breadcrumbs": [
       {"category": "All Products", "url": "https://yoursite.com/products"},
       {"category": "Kitchen & Dining", "url": "https://yoursite.com/products/kitchen-and-dining"},
       {"category": "Kitchen & Dining Furniture", "url": "https://yoursite.com/products/kitchen-and-dining-furniture"},
       {"category": "Dining Tables", "url": "https://yoursite.com/products/dining-chairs"}
      ]
  },
  "images": [
    {"src": "https://yourcdn.net/images/104_736ae11f50-front_large.jpg"},
    {"src": "https://yourcdn.net/images/104_736ae11f50-side_large.jpg"}
  ]
}

headers = {"Authorization": "Bearer {{insert_bearer}}"}
url = "https://partner-staging.getmulberry.com/api/warranty-offers"

response = requests.post(url, json=payload, headers=headers)
warranty_offers = response.json()
const offers = await mulberry.core.getWarrantyOffer({
  title: 'Dining Room Table',
  id: 'DINING-XYZ',
  price: '1500.00',
  meta: {
    breadcrumbs: [
       {"category": "All Products", "url": "https://yoursite.com/products"},
       {"category": "Kitchen & Dining", "url": "https://yoursite.com/products/kitchen-and-dining"},
       {"category": "Kitchen & Dining Furniture", "url": "https://yoursite.com/products/kitchen-and-dining-furniture"},
       {"category": "Dining Tables", "url": "https://yoursite.com/products/dining-chairs"}
      ]
  },
  images: [
    {"src": "https://yourcdn.net/images/104_736ae11f50-front_large.jpg"},
    {"src": "https://yourcdn.net/images/104_736ae11f50-side_large.jpg"},
  ]
});

Parameter

Description

Required

Type

Details

title

Product title

Yes

string

id

Product SKU

Yes

string

price

Product price

Yes

string

url

Product page URL

no

string

description

Product description

no

string

retailer categories

Product categorization assigned by the retailer

no

object

Retailer Categories are not required, but providing this detail will make it easier for Mulberry to identify the appropriate warranty category for the product in question. Example retailer categories - furniture > living room > sofas

images

Product images

no

array

While images are not required, it is highly recommended that Mulberry receives all product images available as they are used to return the appropriate warranty offers for the product in question

meta

Product metadata

no

object

This object contains the retailer categories

Mulberry will automatically detect what the product is and the coverage available for it and will respond with JSON that looks something like this:

[
  {
    "cost": "60.00",
    "coverage_details": [
      {
        "long": [
          "Stains, rips & tears",
          "Burn & heat marks",
          "Seam separation",
          "Broken zippers & buttons",
          "Damage from liquid marks & rings",
          "Broken mirrors & glass",
          "Loss of mirror silvering",
          "Chipped, dented & scratched surfaces",
          "Bubbling, cracked & peeling finishes",
          "Product defects, once the manufacturer's warranty expires",
          "Online claims filing",
          "24/7 customer support"
        ],
        "short": [
          "Stains, rips & tears",
          "Burn & heat marks",
          "Seam separation",
          "Broken zippers & buttons",
          "Online claims filing",
          "24/7 customer support"
        ]
      }
    ],
    "created_date": "2020-10-09 16:41:33.628619-04:00",
    "customer_cost": "60.00",
    "duration_months": "36",
    "mb_category": "furniture",
    "product": {
      "name": "Dining Room Table",
      "price": "1500.00"
    },
    "service_type": "repair_replace",
    "warranty_offer_id":"1df1b252-3301-4192-bcde-1ab2f1f4fe43",
    "recommended": true,
    "policy_terms_url: "https://mulberry-documents.s3.amazonaws.com/shield/Shield_Multi_Extended.pdf"
  }
]

Once you've got the data above, it's time to display it to the customer.