v1
latestOpenAPI 3.0.12026-07-243902.3 MBCreate an Order
This endpoint creates a representation of an order in Extend’s system. Orders should represent the complete order as processed through a merchant’s store, including line details that enable Extend to determine how to process each line.
Orders will require at least one order line item to be created. Extend will automatically categorize each order line item based on the information that is sent with it. The four line item types are:
- Contract
- Determined by receiving a Product and a Plan ID
- Will trigger creation of a product protection contract
- Lead
- Determined by receiving a warrantable Product without a Plan ID
- Will trigger creation of a lead token
- Shipping Protection Contract
- Determined by receiving Shipment Info and a Quote ID
- Will trigger creation of a shipping protection contract
- Non-Warrantable
- determined by receiving a non-warrantable product
Orders created after items have been received by the customer and sent with a fulfilled status will immediately trigger contract creation. Orders can also be created at the time of purchase with line items sent in an unfulfilled status and subsequently updated to fulfill line items triggering contract creation once the customers receive the product.
Important
Order Line Items should include all items purchased on the order regardless of contract status.
Request body
Example request
{
"cartId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"storeId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"transactionId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"analytics": {
"contractPlanCategory": "Service Contract",
"customerStatus": "existing",
"customerType": "Consumer",
"discountSource": "Email promo",
"loyaltyStatus": "elite",
"paymentMethod": "Credit",
"paymentInstrument": "Visa",
"marketingOptIn": true
},
"discounts": [
{
"discountCode": "WELCOME20",
"discountType": "percentage",
"amountValue": 20,
"description": "One-time welcome 20% off entire order discount"
}
],
"discountAmountTotal": 430,
"formId": "12cyx",
"isHistorical": true,
"merchantCustomerId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"poNumber": "PO1403X9",
"productCostTotal": 19000,
"resellerMerchant": {
"id": "154ebea0-6c1b-46a4-b166-032246330526",
"name": "Acme Reseller Company",
"domain": "https://acme.reseller.com"
},
"customerReturnPolicyId": "123e4567-e89b-12d3-a456-426614174000",
"shippingTaxCostTotal": 137,
"storeName": "Bright Jewelers",
"taxCostTotal": 1299,
"total": 5999,
"transactionDate": 1668561247000,
"waitPeriod": 2,
"customer": {
"billingAddress": {
"address1": "535 Mission Street",
"address2": "11th Floor",
"city": "San Francisco",
"countryCode": "US",
"postalCode": "94526",
"province": "CA"
},
"email": "customer@gmail.com",
"name": "John Smith",
"locale": "en-us",
"loyaltyStatus": "member",
"phone": "123-456-7890",
"region": "US",
"shippingAddress": {
"address1": "535 Mission Street",
"address2": "11th Floor",
"city": "San Francisco",
"countryCode": "US",
"postalCode": "94526",
"province": "CA"
},
"subdivision": "CA"
},
"saleOrigin": {
"agentId": "sales agent",
"channel": "web",
"integratorId": "vs03jskavj",
"locationId": "Store #123",
"platform": "BigCommerce",
"storeAddress": {
"address1": "535 Mission Street",
"address2": "11th Floor",
"city": "San Francisco",
"countryCode": "US",
"postalCode": "94526",
"province": "CA"
}
}
}Response
Successful creation of the order.
Example response
{
"analytics": {
"contractPlanCategory": "Service Contract",
"customerStatus": "existing",
"customerType": "Consumer",
"discountSource": "Email promo",
"loyaltyStatus": "elite",
"paymentMethod": "Credit",
"paymentInstrument": "Visa",
"marketingOptIn": true
},
"discounts": [
{
"discountCode": "WELCOME20",
"discountType": "percentage",
"amountValue": 20,
"description": "One-time welcome 20% off entire order discount"
}
],
"cartId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"createdAt": 1557267465,
"customer": {
"billingAddress": {
"address1": "535 Mission Street",
"address2": "11th Floor",
"city": "San Francisco",
"countryCode": "US",
"postalCode": "94526",
"province": "CA"
},
"email": "customer@gmail.com",
"name": "John Smith",
"locale": "en-us",
"loyaltyStatus": "member",
"phone": "123-456-7890",
"region": "US",
"shippingAddress": {
"address1": "535 Mission Street",
"address2": "11th Floor",
"city": "San Francisco",
"countryCode": "US",
"postalCode": "94526",
"province": "CA"
},
"subdivision": "CA"
},
"discountAmountTotal": 430,
"formId": "12cyx",
"id": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"consumerProfileId": "c57ed096-24ef-49a4-a20a-d1b8bf770981",
"lineItems": [
{
"contractId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"lineItemTransactionId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"offerId": "7cdabc72-227d-8f76-a9e7-c91de35c2781",
"offerPlanId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"plan": {
"id": "10001-misc-elec-adh-replace-1y",
"purchasePrice": 1999,
"termsId": "12A",
"termsVersion": "2",
"version": "2"
},
"product": {
"deliveryStatus": "shipped",
"id": "SKU-123-456",
"purchasePrice": 1999,
"serialNumber": "123SAD3",
"purchaseDate": 1652403703000,
"listPrice": 1999,
"name": "Shiny Hat 2",
"mfrWarranty": {
"url": "https://www.manufacturer.com/warranty"
},
"parentReferenceId": "550e8400-e29b-41d4-a716-446655440000"
},
"leadToken": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"id": "3f87b162-3462-4c0c-bb9c-af2b14e025c3",
"accountId": "3f87b162-3462-4c0c-bb9c-af2b14e025c3",
"status": "fulfilled",
"storeId": "3f87b162-3462-4c0c-bb9c-af2b14e025c3",
"orderId": "3f87b162-3462-4c0c-bb9c-af2b14e025c3",
"transactionId": "3f87b162-3462-4c0c-bb9c-af2b14e025c3",
"isProductWarrantabilityVerified": true,
"fulfilledAt": 1652402394000,
"refundedAt": 1652402394000,
"cancelledAt": 1652402394000,
"createdAt": 1652402394000,
"updatedAt": 1652402394000,
"discountAmount": 399,
"taxCost": 199,
"adjustments": {
"calculatedListPrice": 5999,
"originalPlanId": "3f87b162-3462-4c0c-bb9c-af2b14e025c3"
},
"contractFailedReasons": [
"Contract line requested more coverage than available quantities on the order for at least one product"
],
"analytics": {
"fulfillmentMethod": "BOPIS"
}
}
],
"merchantCustomerId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"parentReferenceId": "550e8400-e29b-41d4-a716-446655440000",
"poNumber": "PO1403X9",
"productCostTotal": 19000,
"refundedAt": 1557267465,
"resellerMerchant": {
"id": "154ebea0-6c1b-46a4-b166-032246330526",
"name": "Acme Reseller Company",
"domain": "https://acme.reseller.com"
},
"customerReturnPolicyId": "123e4567-e89b-12d3-a456-426614174000",
"saleOrigin": {
"agentId": "sales agent",
"channel": "web",
"integratorId": "vs03jskavj",
"locationId": "Store #123",
"platform": "BigCommerce",
"storeAddress": {
"address1": "535 Mission Street",
"address2": "11th Floor",
"city": "San Francisco",
"countryCode": "US",
"postalCode": "94526",
"province": "CA"
}
},
"shippingCostTotal": 1999,
"shippingTaxCostTotal": 137,
"status": "closed",
"storeId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"storeName": "Bright Jewelers",
"taxCostTotal": 1299,
"total": 5999,
"transactionDate": 1668561247000,
"transactionId": "c57ed096-24ef-49a4-a20a-d1b8bf770980",
"updatedAt": 1557267465,
"waitPeriod": 2,
"coveredProducts": [
{
"lineItemTransactionId": "07746dc6-53c2-4278-8ba8-0d8905150409"
}
]
}