Orders

POST https://api.ecartapi.com/api/v2/orders

Creates new orders.

Important information:

Request Body

{"order"=>{"totals"=>{"subtotal"=>"90", "total"=>"100", "tax"=>"10", "discount"=>"0", "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"=>"28921600409674", "quantity"=>"1", "discount"=>"0", "taxable"=>"false"}, {"variantId"=>"28921600409674", "quantity"=>"2", "discount"=>"0", "taxable"=>"false"}]}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Authorizationstring

RESPONSES

status: OK

{"success":true,"order":{"id":"1833117155402","number":"1096","name":"#1096","email":null,"fulfillmentStatus":{"id":null,"status":null,"ecartapi":"unfulfilled","ecartapiId":"3","partiallAvailable":"true"},"currency":"MXN","totals":{"subtotal":"3.00","total":"13.00","tax":"10.00","discount":"0.00","weight":"300"},"taxesIncluded":"false","units":{"weight":"g"},"status":{"id":null,"status":"open","financial":"paid","ecartapi":"paid","ecartapiId":"1"},"locationId":null,"reference":null,"tags":["imported"],"payment":null,"customer":null,"billingAddress":{"id":null,"firstName":"Alex","lastName":"de la Cruz","address1":"123 Fake Street","address2":null,"country":{"code":"CA","name":"Canada","codeIso2":null,"codeIso3":null},"state":{"code":"ON","name":"Ontario","codeIso2":null,"codeIso3":null},"city":"Fakecity","postalCode":null,"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","codeIso2":null,"codeIso3":null},"state":{"code":"ON","name":"Ontario","codeIso2":null,"codeIso3":null},"city":"Fakecity","postalCode":null,"phone":"555-555-5555","company":"envia.com","references":null},"items":[{"id":"4091390263370","variantId":"28921600409674","productId":"3720760000586","sku":"CCC003","fulfillment":{"quantity":"1","service":"manual","status":null},"name":"Todas Las Medidas - Red Updated / 20 piezas / size","requiresShipping":"true","quantity":"1","price":"1.00","discount":"0.00","tax":null,"taxable":"false","vendor":"ParaPaquetes","imageUrl":null,"ecartapiUrl":"https://api.ecartapi.com/api/v2/products/3720760000586"},{"id":"4091390296138","variantId":"28921600409674","productId":"3720760000586","sku":"CCC003","fulfillment":{"quantity":"2","service":"manual","status":null},"name":"Todas Las Medidas - Red Updated / 20 piezas / size","requiresShipping":"true","quantity":"2","price":"1.00","discount":"0.00","tax":null,"taxable":"false","vendor":"ParaPaquetes","imageUrl":null,"ecartapiUrl":"https://api.ecartapi.com/api/v2/products/3720760000586"}],"meta":null,"dates":{"canceledAt":null,"closedAt":null,"createdAt":"2019-10-25T11:50:09-04:00","updatedAt":"2019-10-25T11:50:09-04:00"},"cancelReason":null,"note":null,"checkoutId":null}}