Orders
Create order
POST
/
v1
/
orders
curl --request POST \
--url https://api.production.orderprotection.com/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sourceOrderId": "#517AB",
"originalSourceOrderNumber": "12345",
"sourceOrderNumber": "#634C",
"sourceCreatedAt": "2000-05-15T21:00:00.000Z",
"sourceUpdatedAt": "2000-05-15T21:00:00.000Z",
"sourceCancelledAt": "2000-05-15T21:00:00.000Z",
"platformId": "api",
"premiumPaid": 1.5,
"premiumCost": 1,
"premiumDiscount": 1,
"riskLevel": "low",
"currency": "USD",
"total": 15.4,
"discountTotal": 1.2,
"shippingCost": 3.5,
"tax": 0.55,
"subtotal": 11.3,
"customerEmail": "john@doe.com",
"customerName": "John",
"customerPhone": "+1-555-796-3644",
"shippingCostTax": 23.55,
"orderItems": [
{
"productName": "Handcrafted Wooden Table",
"productUrl": "https://bogus-clarity.name/",
"productImage": "https://bogus-clarity.name/product/image.jpg",
"sku": "978-0-10-081434-9",
"quantity": 4,
"price": 45.43,
"sourceItemId": "387179",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"description": "Variant: White Oak. Size: 10'\''x10'\''"
},
{
"productName": "Another prod",
"productUrl": "https://test.site/",
"sku": "5555",
"quantity": 4,
"price": 45.43,
"sourceItemId": "387180",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"description": "Variant: White Oak. Size: 10'\''x10'\''"
}
],
"address": {
"firstName": "Milford",
"lastName": "Mayert",
"address1": "991 Nicolas Landing",
"address2": "Apt. 796",
"city": "Rippinfurt",
"state": "AZ",
"zip": "08731",
"country": "PR"
},
"tags": "test,this,out",
"fulfillments": [
{
"sourceItemIds": [
{
"sourceItemId": "1478",
"quantity": 1
},
{
"sourceItemId": "1479",
"quantity": 2
}
],
"fulfillmentStatus": "Fulfilled",
"trackingCompany": "FedEx",
"trackingNumber": [
"AB0303456"
],
"trackingUrl": [
"https://example-follow-shipment.com/AB0303456"
],
"sourceFulfillmentId": "fulfillment-123"
}
]
}'
{
"status": "ok"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
201
application/json
The order passes validation and has been successfully created.
The response is of type object
.
curl --request POST \
--url https://api.production.orderprotection.com/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"sourceOrderId": "#517AB",
"originalSourceOrderNumber": "12345",
"sourceOrderNumber": "#634C",
"sourceCreatedAt": "2000-05-15T21:00:00.000Z",
"sourceUpdatedAt": "2000-05-15T21:00:00.000Z",
"sourceCancelledAt": "2000-05-15T21:00:00.000Z",
"platformId": "api",
"premiumPaid": 1.5,
"premiumCost": 1,
"premiumDiscount": 1,
"riskLevel": "low",
"currency": "USD",
"total": 15.4,
"discountTotal": 1.2,
"shippingCost": 3.5,
"tax": 0.55,
"subtotal": 11.3,
"customerEmail": "john@doe.com",
"customerName": "John",
"customerPhone": "+1-555-796-3644",
"shippingCostTax": 23.55,
"orderItems": [
{
"productName": "Handcrafted Wooden Table",
"productUrl": "https://bogus-clarity.name/",
"productImage": "https://bogus-clarity.name/product/image.jpg",
"sku": "978-0-10-081434-9",
"quantity": 4,
"price": 45.43,
"sourceItemId": "387179",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"description": "Variant: White Oak. Size: 10'\''x10'\''"
},
{
"productName": "Another prod",
"productUrl": "https://test.site/",
"sku": "5555",
"quantity": 4,
"price": 45.43,
"sourceItemId": "387180",
"sourceProductId": "477353",
"sourceVariantId": "17742",
"description": "Variant: White Oak. Size: 10'\''x10'\''"
}
],
"address": {
"firstName": "Milford",
"lastName": "Mayert",
"address1": "991 Nicolas Landing",
"address2": "Apt. 796",
"city": "Rippinfurt",
"state": "AZ",
"zip": "08731",
"country": "PR"
},
"tags": "test,this,out",
"fulfillments": [
{
"sourceItemIds": [
{
"sourceItemId": "1478",
"quantity": 1
},
{
"sourceItemId": "1479",
"quantity": 2
}
],
"fulfillmentStatus": "Fulfilled",
"trackingCompany": "FedEx",
"trackingNumber": [
"AB0303456"
],
"trackingUrl": [
"https://example-follow-shipment.com/AB0303456"
],
"sourceFulfillmentId": "fulfillment-123"
}
]
}'
{
"status": "ok"
}
Assistant
Responses are generated using AI and may contain mistakes.