Order
POST https://api.ecartapi.com/api/v2/orders
Request Body
{"order"=>{"totals"=>{"subtotal"=>"90", "total"=>"100", "tax"=>"10", "discount"=>"0", "weight"=>"300"}, "currency"=>"MX", "status"=>{"status"=>"pending"}, "tags"=>["imported"], "billingAddress"=>{"firstName"=>"Enrique", "lastName"=>"Carreon", "address1"=>"123 fake streed", "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"}, "state"=>{"code"=>"ON"}, "city"=>"Fakecity", "postalCode"=>"K2P 1L4", "phone"=>"555-555-5555", "company"=>"envia.com"}, "items"=>[{"productId"=>"374642845", "name"=>"Producto creado con EcartApi v2", "quantity"=>"1", "price"=>"2000", "tax"=>"320"}, {"productId"=>"374643063", "name"=>"Producto creado con EcartApi v2", "quantity"=>"1", "price"=>"2000", "tax"=>"320"}]}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |
RESPONSES
status: OK
{"success":true,"order":{"id":"ITT1R","number":"273156764","marketPlaceId":null,"groupId":null,"name":"Enrique Carreon","email":null,"fulfillmentStatus":{"id":null,"status":"AWAITING_PROCESSING","ecartapi":"unfulfilled","ecartapiId":"3","partiallAvailable":"false"},"currency":"MXN","totals":"100","taxesIncluded":10,"taxLines":null,"units":{"weight":"KILOGRAM"},"status":{"id":null,"status":"AWAITING_PAYMENT","financial":"other","ecartapi":"other","ecartapiId":"5"},"locationId":null,"reference":null,"tags":null,"payment":{"method":null,"status":"pending"},"billingAddress":{"id":null,"firstName":"Enrique Carreon","lastName":null,"address1":"123 fake streed","address2":"Fakecity","address3":null,"country":{"code":"CA","name":null,"codeIso2":null,"codeIso3":null},"state":{"code":null,"name":null,"codeIso2":null,"codeIso3":null},"city":"Fakecity","postalCode":"K2P 1L4","phone":null,"company":null,"references":null},"shippingMethod":null,"shippingAddress":{"id":null,"firstName":"Enrique Carreon","lastName":null,"address1":"123 Fake Street","address2":"Fakecity","address3":null,"country":{"code":"CA","name":null,"codeIso2":null,"codeIso3":null},"state":{"code":null,"name":null,"codeIso2":null,"codeIso3":null},"city":"Fakecity","postalCode":"K2P 1L4","phone":null,"company":null,"references":null},"items":[null,null],"packages":null,"meta":null,"dates":{"canceledAt":null,"closedAt":null,"createdAt":"2021-07-14 16:14:01 +0000","updatedAt":"2021-07-14 16:14:01 +0000","paidAt":null},"cancelReason":null,"note":null,"checkoutId":null}}