POST https://api.ecartapi.com/api/v2/orders
Creates order based on information provided. You can create draft orders. Important information:
Params:
draft ( Boolean )
-
Creates draft order when true.
Body
PARAM
Key | Datatype | Required | Description |
HEADERS
Key | Datatype | Required | Description |
Content-Type
|
string | ||
Authorization
|
string |
RESPONSES
status OK
{
"success": true,
"order": {
"id": "1172888977508",
"number": "18",
"name": "#1018",
"fulfillmentStatus": null,
"subtotalPrice": "0.00",
"totalPrice": "10.00",
"totalTax": "10.00",
"totalDiscounts": "0.00",
"currency": "MXN",
"taxesIncluded": "false",
"totalWeight": "300",
"weightUnit": "g",
"status": "paid",
"locationId": null,
"reference": null,
"tags": [
"imported"
],
"payment": null,
"billingAddress": {
"id": null,
"firstName": "Alex",
"lastName": "de la Cruz",
"address1": "123 Fake Street",
"address2": null,
"country": {
"code": "CA",
"name": "Canada"
},
"state": {
"code": "ON",
"name": "Ontario"
},
"city": "Fakecity",
"postalcode": "K2P 1L4",
"phone": "555-555-5555",
"company": "envia.com",
"references": null
},
"shippingAddress": {
"id": null,
"firstName": "John",
"lastName": "Silver",
"address1": "123 Fake Street",
"address2": null,
"country": {
"code": "CA",
"name": "Canada"
},
"state": {
"code": "ON",
"name": "Ontario"
},
"city": "Fakecity",
"postalcode": "K2P 1L4",
"phone": "555-555-5555",
"company": "envia.com",
"references": null
},
"products": [
{
"id": "2502740443236",
"variantId": "26432842956900",
"sku": null,
"fulfillableQuantity": "1",
"fulfillmentService": "manual",
"fulfillmentStatus": null,
"name": "Burton Custom Freestyle 151",
"requiresShipping": "true",
"quantity": "1",
"price": "0.00",
"totalDiscount": "0.00",
"t Curl curl -X POST 'https://api.ecartapi.com/api/v2/orders' -H 'Content-Type: application/json' -H 'Authorization: access_token' -d '{"order":{"totals":{"tax":"100","discount":"10","weight":"300"},"currency":"MXN","taxesIncluded":"false","status":{"status":"pending"},"tags":["imported"],"billingAddress":{"firstName":"Alex","lastName":"de la Cruz","address1":"123 Fake Street","country":{"code":"CA","name":"Canada"},"state":{"code":"ON","name":"Ontario"},"city":"Fakecity","postalCode":"K2P 1L4","phone":"555-555-5555","company":"envia.com"},"shippingAddress":{"firstName":"John","lastName":"Silver","address1":"123 Fake Street","country":{"code":"CA","name":"Canada"},"state":{"code":"ON","name":"Ontario"},"city":"Fakecity","postalCode":"K2P 1L4","phone":"555-555-5555","company":"envia.com"},"items":[{"variantId":"31842877210668","quantity":"1","discount":"0","taxable":"false"}]}}' ENDPOINTS |