- Product protection plans
- Shipping warranties
🔧 Key Functions of the Order API
✅ Create Warranty Contracts
When a new order is submitted:- The API checks if the
partnerOrderIdexists in SureBright’s records. - If it does not exist, the API automatically generates warranty contracts for the order’s line items based on the provided details.
♻️ Update Existing Contracts
When thepartnerOrderId already exists:
- Use the
PUT methodto update the existing order and its associated warranty contracts. - If a lower quantity is specified for any line item compared to the original order, the system will automatically cancel the corresponding number of warranty contracts to reflect the reduced coverage.
❌ Cancel Specific Line Items
To cancel warranty coverage on a particular product line:- Set the
warrantyQuantityfield to0for that line item in thelineItemListvia thePUTmethod. - This action cancels only the warranty contracts for that specific line item, leaving the rest of the order unaffected.
🧾 Summary of API Capabilities
| Operation | Description |
|---|---|
| Create Order (POST) | Generates new warranty contracts if the order is not yet recorded (partnerOrderId not found). |
| Update Order (PUT) | Modifies existing warranty contracts and adjusts quantities. Cancels contracts if quantity decreases. |
| Cancel Line Item(PUT) | To cancel a specific line item, Using PUT method of order API set the field “warrantyQuantity” in lineItem inside lineItemList to 0 as part of the lineItem details. |
This API provides a robust way to keep your warranty contracts in sync with your order lifecycle, ensuring accurate coverage management across sales, returns, and cancellations.
