Skip to main content
POST
/
partner
/
api
/
v1
/
order
/
whole-system
Create Contracts for Whole System Order
curl --request POST \
  --url https://{HOST_NAME}/partner/api/v1/order/whole-system \
  --header 'Content-Type: application/json' \
  --header 'X-SureBright-Access-Token: <x-surebright-access-token>' \
  --data '
{
  "storeId": "test-store-id",
  "warrantyQuoteId": "36eaa6e3-ca1f-4bc1-86da-76caf7a7114d",
  "warrantyQuoteItemId": "a7defcbd-aa07-4e01-9076-c1935af20a98",
  "warrantyPrice": 40,
  "warrantyCoverageYears": 2,
  "customerDetails": {
    "customerEmail": "[email protected]",
    "customerFirstName": "John",
    "customerLastName": "Doe",
    "customerAddress1": "1234 Tulip Grove Rd",
    "customerCity": "Nashville",
    "customerState": "TN",
    "customerCountry": "USA",
    "customerZipCode": "37076",
    "customerPhone": "+1 (615) 555-0123",
    "customerAddress2": "Suite 100",
    "addressType": "BILLING"
  },
  "sbSalesLeadId": "9f3e21c6-6bdb-4c7f-9b91-2a4f9a2c7d11",
  "lineItemList": [
    {
      "title": "PMC Prophecy5 2-Way Floorstanding Speaker (Pair)",
      "unitPrice": 6500,
      "quantity": 1,
      "isCovered": true,
      "sbCategoryName": "Speaker Floorstanding",
      "description": "High-performance floorstanding speaker pair for immersive audio systems."
    }
  ]
}
'
{
  "isError": false,
  "contractId": "54a3a238407f426e862a0a11cab11164"
}

Headers

HeaderDescriptionRequired
X-SureBright-Access-TokenAccess token for authenticationYes
Content-Typeapplication/jsonYes

Overview

This endpoint creates warranty contract for a whole system order. It is used after obtaining warranty quotes from the List Quotes for Whole System Warranty endpoint.

Flow

  1. First, call the List Quotes for Whole System Warranty endpoint to get available warranty quotes for your system order
  2. Select the desired warranty plan from the returned warrantyQuoteItemList
  3. Submit the selected warranty details along with the line items to this endpoint to create the contract

Request Details

  • warrantyQuoteId - The unique quote Id received from the quote endpoint
  • warrantyQuoteItemId - The unique identifier for the warranty quote item obtained from the quote endpoint
  • lineItemList - The complete list of products with their coverage status (isCovered: true/false)
Either sbSalesLeadId or lineItemList is required in the request:
  • sbSalesLeadId - Use this if you have already obtained quotes and have the sales lead Id from the List Quotes API response
  • lineItemList - Use this to provide the complete list of products with their coverage status when creating a new contract
Updating Existing ContractsIf a contract already exists for the provided sbSalesLeadId, calling this endpoint will update the existing contract instead of creating a new one:
  • Updates to line items are not permitted beyond 30 days from the date of sale.
  • Customer details and other non-line item fields can be updated at any time

Response

On success, you will receive:
  • contractId - The unique identifier for the warranty contract created

Headers

X-SureBright-Access-Token
string
required

Access token for authentication

Body

application/json
storeId
string
required

A unique identifier for the store

Example:

"test-store-id"

warrantyQuoteId
string
required

The unique identifier for the warranty quote obtained from the List Quotes for Whole System Warranty endpoint

Example:

"36eaa6e3-ca1f-4bc1-86da-76caf7a7114d"

warrantyQuoteItemId
string
required

The unique identifier for the warranty quote item obtained from the List Quotes for Whole System Warranty endpoint

Example:

"a7defcbd-aa07-4e01-9076-c1935af20a98"

warrantyPrice
number<float>
required

Price of the warranty quote

Example:

40

warrantyCoverageYears
integer
required

Duration of the warranty coverage in years

Example:

2

customerDetails
object
required

Customer information for the warranty contract

sbSalesLeadId
string

A unique identifier for the SureBright sales lead

Example:

"9f3e21c6-6bdb-4c7f-9b91-2a4f9a2c7d11"

lineItemList
object[]

A list of line items representing the products in the order with coverage status

Response

Contract Created Successfully

isError
boolean

Indicates if an error occurred

Example:

false

contractId
string

The unique identifier for the warranty contract created

Example:

"54a3a238407f426e862a0a11cab11164"