Order API overview
How the Order API creates, updates and cancels protection plan contracts for an order.
The Order entity serves as the foundational record that captures detailed information about the line items purchased by a customer. Each line item within an order represents a product eligible for various warranty offerings, such as:
Product protection plans
Shipping warranties
The SureBright Order API is designed to transmit sold contract details to our system and to manage related operations such as order updates and cancellations. It acts as the primary interface for creating, updating, or canceling warranty contracts associated with your sales.
What the Order API does#
Create contracts#
When a new order is submitted:
The API checks if the order's
orderIdalready exists 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 the orderId 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 one line item#
To cancel warranty coverage on a particular product line:
Set
quantityto0for that line item inorderLineItemListvia thePUTmethod.This action cancels only the warranty contracts for that specific line item, leaving the rest of the order unaffected.
Summary of operations#
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.