Skip to main content
PUT
/
partner
/
api
/
v1
/
order
Update Warranty
curl --request PUT \
  --url https://{HOST_NAME}/partner/api/v1/order \
  --header 'Content-Type: application/json' \
  --header 'X-SureBright-Access-Token: <x-surebright-access-token>' \
  --data '
{
  "storeId": "f4c059b2-5b74-4e4c-a3c5-85bc80cf8a09",
  "orderId": "83737121380",
  "orderPurchaseDate": "2024-01-07T10:15:30Z",
  "orderLineItemList": [
    {
      "lineItemId": "374dc3c3-94a3-4b85-a876-8651e461446d",
      "totalPrice": 3300,
      "quantity": 3,
      "productTitle": "GreatCircleUSA 3-in-1 Wood Chipper - 7HP Engine, 3 Max Branch Capacity",
      "productId": "6673746231399",
      "productSKU": "ALH05",
      "salePrice": 1100,
      "planDetails": {
        "policyPurchaseDate": "2024-01-07T10:15:30Z",
        "policySKU": "SBW-1U-SHAB-2900",
        "policyPrice": 29
      },
      "optionId": "8577825144935",
      "listPrice": 1299,
      "discountAmount": 199,
      "productURL": "https://example.com/products/wood-chipper-alh05"
    }
  ],
  "customerDetails": {
    "firstName": "John",
    "lastName": "Doe",
    "addressLine1": "123 Hathway Street",
    "city": "New York City",
    "state": "NY",
    "country": "US",
    "zipCode": "10005",
    "customerEmail": "johndoe@gmail.com",
    "addressLine2": "Apt 4B",
    "mobileNumber": "7872323781"
  },
  "discount": {
    "discountAmount": 10
  },
  "totalOrderValue": 1000,
  "isTestOrder": false,
  "taxAmount": 100
}
'
{
  "storeId": "f4c059b2-5b74-4e4c-a3c5-85bc80cf8a09",
  "orderId": "83737121380",
  "contractList": [
    {
      "lineItemId": "374dc3c3-94a3-4b85-a876-8651e461446d",
      "contractId": "abc12345-6789-4abc-bcde-ef1234567890",
      "isCancelled": false
    }
  ]
}

Headers

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

Headers

X-SureBright-Access-Token
string
required

Access token for authentication

Body

application/json
storeId
string
required

A unique identifier for a store will be shared as part of the integration kit

Example:

"f4c059b2-5b74-4e4c-a3c5-85bc80cf8a09"

orderId
string
required

Unique identifier for the complete successful order placed by a customer on the merchant site. This represents the whole order that can have multiple line items of different quantities.

Maximum string length: 48
Example:

"83737121380"

orderPurchaseDate
string<date-time>
required

Date time at which the order was purchased by customer.

Example:

"2024-01-07T10:15:30Z"

orderLineItemList
object[]
required

The lineItemList consists of individual line items representing purchased products and/or products with policies. Each line item is uniquely identified by a lineItemId (String: maximum length 48 characters). The planDetails serve to identify the specific quote option acquired by the customer. OptionId is the combination of product attributes separated by #.

customerDetails
object
required
discount
object
totalOrderValue
number
Example:

1000

isTestOrder
boolean
Example:

false

taxAmount
number
Example:

100

Response

Warranty created successfully

storeId
string

A unique identifier for a store will be shared as part of the integration kit

Example:

"f4c059b2-5b74-4e4c-a3c5-85bc80cf8a09"

orderId
string

A unique identifier for the complete successful order placed by a customer on the merchant site. This represents the whole order that can have multiple line items of different quantities.

Maximum string length: 48
Example:

"83737121380"

contractList
object[]

The list of contracts generated for each quantity in each line item. If any error in generating a contract, the error code and msg will be added for that item instead of the contract id.