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",
  "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"
  },
  "warrantyQuoteItemList": [
    {
      "coverageYears": 2,
      "quotePrice": 40,
      "warrantyQuoteItemId": "a7defcbd-aa07-4e01-9076-c1935af20a98"
    }
  ],
  "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."
    }
  ],
  "partnerProposalId": "9f3e21c6-6bdb-4c7f-9b91-2a4f9a2c7d11"
}
'
{
  "contractIdList": [
    "54a3a238407f426e862a0a11cab11164"
  ],
  "transactionResponse": {
    "isError": false,
    "order": {
      "sourcePlatform": "SERVICE_PORTAL",
      "merchantId": "dc087e7938cc4d6aa6d5ef8e4a09720f",
      "sellerID": "dc087e7938cc4d6aa6d5ef8e4a09720f",
      "sbSalesLeadId": "8c7cee7c-4521-4eb2-9e48-0528035d525f",
      "transactionDate": "2025-12-08T16:24:52.223Z",
      "transactionReason": "1",
      "saleType": "O",
      "customerDetails": {
        "customerEmail": "[email protected]",
        "customerPhone": "+1 (615) 555-0123",
        "customerFirstName": "John",
        "customerLastName": "Doe",
        "customerAddress1": "1234 Tulip Grove Rd",
        "customerAddress2": "Suite 100",
        "customerCity": "Nashville",
        "customerState": "TN",
        "customerCountry": "USA",
        "customerZipCode": "37076",
        "addressType": "BILLING"
      },
      "orderId": "dc087e7938cc4d6aa6d5ef8e4a09720f#7a9501126439-46a3-9bad-28019ed511fd",
      "orderItems": [
        {
          "contractStatus": "A",
          "quoteId": "c8152608-83bf-479f-8f59-ee8278ca14c0",
          "quoteItemId": "53ba3d22-3afa-4330-b315-e42e5ef69ffb",
          "termMonths": 24,
          "modelName": "SureBright Whole System Warranty Plan",
          "modelNumber": "8c7cee7c-4521-4eb2-9e48-0528035d525f",
          "manufacturerName": "",
          "policyTax": "0.0",
          "productListPrice": 50,
          "productPurchasePrice": 50,
          "productTax": "0.0",
          "purchaseDate": "2025-12-08",
          "productId": "LEAD_8c7cee7c-4521-4eb2-9e48-0528035d525f",
          "coveredLineItemsList": [
            {
              "Model_Name": "TV",
              "Model_Number": "",
              "Product_Purchase_Price": "50",
              "Product_Tax": "0.0",
              "Quantity": "1",
              "sbCategoryTag": "TV_MONITOR",
              "Product_Condition": "NEW"
            }
          ]
        }
      ],
      "policyPrice": "2",
      "source": "SERVICE_PORTAL",
      "installerWarrantyDuration": "3 Months"
    }
  }
}

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
  • warrantyQuoteItemList - The selected warranty plan(s) with coverage years and pricing
  • lineItemList - The complete list of products with their coverage status (isCovered: true/false)

Response

On success, you will receive:
  • contractIdList - Array of created contract IDs
  • 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"

customerDetails
object
required

Customer information for the warranty contract

warrantyQuoteItemList
object[]
required

List of selected warranty quote items with coverage details

lineItemList
object[]
required

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

partnerProposalId
string

A unique identifier for the partner's proposal

Example:

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

Response

Contracts Created Successfully

contractIdList
string[]

List of unique contract IDs created for the warranty

Example:
["54a3a238407f426e862a0a11cab11164"]
transactionResponse
object

Transaction response containing order details