Skip to main content
POST
/
partner
/
api
/
v1
/
whole-system
/
order
Create Contracts for Whole System Order
curl --request POST \
  --url https://{HOST_NAME}/partner/api/v1/whole-system/order \
  --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",
  "sbSalesLeadId": "9f3e21c6-6bdb-4c7f-9b91-2a4f9a2c7d11",
  "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"
  },
  "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 contracts 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 contracts

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)

Response

On success, you will receive:
  • contractId - The unique identifier for the warranty contract created
  • transactionResponse - Complete transaction details including order information and customer details

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"

sbSalesLeadId
string
required

A unique identifier for the SureBright sales lead

Example:

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

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

lineItemList
object[]
required

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

Response

Contracts Created Successfully

isError
boolean

Indicates if an error occurred

Example:

false

contractId
string

The unique identifier for the warranty contract created

Example:

"54a3a238407f426e862a0a11cab11164"