Create 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 warranty contracts for a specific order.
🛠️ Contract Creation Logic
Warranty contracts are created in a 1:1 ratio with the quantity of the associated product purchased.
The warranty quantity is automatically inferred from the product quantity.
Contracts are only created for the exact number of products purchased—warranty coverage cannot exceed or fall short of the product quantity.
🏷️ Using policySKU
The policySKU is a required field that determines the parameters of each warranty contract, including:
- Coverage Type (e.g., accidental damage, mechanical breakdown)
- Tenure (duration of coverage)
- Country (to apply relevant terms and conditions)
- Category (product type classification)
Merchants must ensure that the appropriate policySKU is used for each product to ensure accurate coverage assignment.
🔁 Handling Updates
If this endpoint is called for an order where contracts already exist:
- Existing contracts will be updated if the quantity or details have changed.
- Warranty price, tenure, and coverage type are handled automatically based on the provided policySKU.
Authorizations
X-SureBright-Access-TokenstringrequiredAccess token for authentication
Body
{
"storeId": "f4c059b2-5b74-4e4c-a3c5-85bc80cf8a09",
"orderId": "83737121380",
"manufacturerWarrantyDuration": 24,
"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
}