Orders
POST localhost:3000/api/v2/orders
Request Body
{"order"=>{"totals"=>{"subtotal"=>"90", "total"=>"100", "tax"=>"10", "discount"=>"5", "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"=>"31658933452874", "quantity"=>"15", "discount"=>"0", "taxable"=>"false"}]}}
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","taxable":"false","vendor":"Burton"},{"id":"2502740476004","variantId":"26756554817636","sku":null,"fulfillableQuantity":"2","fulfillmentService":"manual","fulfillmentStatus":null,"name":"Burton Custom Freestyle 151","requiresShipping":"true","quantity":"2","price":"0.00","totalDiscount":"0.00","taxable":"false","vendor":"Burton"}],"cancelReason":null,"canceledAt":null,"closedAt":null,"createdAt":"2019-05-27T15:46:08-04:00","updatedAt":"2019-05-27T15:46:08-04:00","note":null}}