Cancel / Update contracts for Order
Headers#
| Header | Description | Required |
| X-SureBright-Access-Token | Access token for authentication | Yes |
| Content-Type | application/json | Yes |
https://{HOST_NAME}/partner/api/v1/orderThis endpoint is used to create, update, or cancel warranty contracts for a specific order.
🔄 Updating Line Item Quantities
If the quantity of a product in the original order is changed (e.g., reduced), the corresponding warranty contract quantity is automatically adjusted to match the updated product quantity.
To reduce or cancel warranty coverage for a line item, update the quantity field inside the relevant lineItem object in the orderLineItemList.
❌ Cancelling Line Items
To cancel warranty coverage for a specific line item, set its quantity to 0 in the orderLineItemList.
Once cancelled, a warranty contract cannot be reactivated.
This applies to both partial cancellations (some items in the order) and full order cancellations.
🧾 Handling Full Order Cancellation
For full order cancellations, merchants have two options:
- Remove the planDetails object entirely from the request payload.
- Set the quantity of each relevant lineItem in orderLineItemList to 0.
⚙️ Automatic Price and Tenure Updates
Any changes to warranty price or tenure (e.g., due to product updates or plan revisions) are handled automatically by the system.
Authorizations
X-SureBright-Access-TokenstringrequiredAccess token for authentication
Body
{
"storeId": "f4c059b2-5b74-4e4c-a3c5-85bc80cf8a09",
"orderId": "83737121380",
"orderPurchaseDate": "2024-01-07T10:15:30Z",
"orderLineItemList": [
{
"lineItemId": "374dc3c3-94a3-4b85-a876-8651e461446d",
"planDetails": {
"policyPurchaseDate": "2024-01-07T10:15:30Z",
"policySKU": "SBW-1U-SHAB-2900",
"policyPrice": 29
},
"totalPrice": 3300,
"quantity": 3,
"productTitle": "GreatCircleUSA 3-in-1 Wood Chipper - 7HP Engine, 3 Max Branch Capacity",
"productId": "6673746231399",
"optionId": "8577825144935",
"productSKU": "ALH05",
"salePrice": 1100,
"listPrice": 1299,
"discountAmount": 199,
"productURL": "https://example.com/products/wood-chipper-alh05"
}
],
"customerDetails": {
"firstName": "John",
"lastName": "Doe",
"addressLine1": "123 Hathway Street",
"addressLine2": "Apt 4B",
"city": "New York City",
"state": "NY",
"country": "US",
"zipCode": "10005",
"customerEmail": "johndoe@gmail.com",
"mobileNumber": "7872323781"
},
"discount": {
"discountAmount": 10
},
"totalOrderValue": 1000,
"isTestOrder": false,
"taxAmount": 100
}