Get an order by ID in the account associated with your API key. Requires orders:read. The account is taken from the authenticated key; account selectors in headers, query or body cannot change it. Unknown and foreign-account orders return the same 404. Service and network failures remain errors; there is no unscoped fallback.
Path Parameters
The order ID
Header Parameters
Your API Key for authentication
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/orders/string" \ -H "X-Api-Key: string"{ "id": "string", "account_id": "string", "organization_id": "string", "account_user_id": "string", "last_account_user_id": "string", "document_type": "string", "document_number": "string", "document_reference_id": "string", "number": 0, "customer_id": "string", "contact_seller_id": "string", "order_channel_id": "string", "warehouse_id": "string", "allow_logistics_service": true, "shipment": { "id": "string", "account_id": "string", "order_id": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "status_updated_at": "2019-08-24T14:15:22Z", "ship_from_id": "string", "ship_from": { "id": "string", "street": "string", "city": "string", "state": "string", "state_code": "string", "postal_code": "string", "country": "string", "country_code": "string", "contact_name": "string", "contact_email": "string", "contact_phone_code": "string", "contact_phone": "string", "additional_information": "string", "lat": 0, "lng": 0, "location_info": { "input_address": "string", "formatted_address": "string", "lat": 0, "lng": 0, "type": "string" } }, "ship_to_id": "string", "ship_to": { "id": "string", "street": "string", "city": "string", "state": "string", "state_code": "string", "postal_code": "string", "country": "string", "country_code": "string", "contact_name": "string", "contact_email": "string", "contact_phone_code": "string", "contact_phone": "string", "additional_information": "string", "lat": 0, "lng": 0, "location_info": { "input_address": "string", "formatted_address": "string", "lat": 0, "lng": 0, "type": "string" } }, "courier_id": "string", "archived": true, "cash_on_delivery_order": true, "stock_processed": true, "is_gift": true, "shipping_label": { "comment": "string", "customer_document_number": true, "organization_phone": true, "organization_address": true, "observation": true, "order_number": true, "invoice_number": true, "order_value": true, "shipping_value": true, "payment_status": true, "payment_method": true, "tracking_number": true, "tracking_qr": true, "contact_seller": true }, "status_logs": [ { "status_id": "string", "date": "2019-08-24T14:15:22Z", "comments": [ { "key": "string", "comment": "string", "visibility": "string", "date": "2019-08-24T14:15:22Z" } ] } ], "status_id": "string", "status": { "id": "string", "account_id": "string", "alias_name": "string", "name": "string", "icon": "string", "active": true, "required_notification": true, "index": 0, "color": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "stock_action": "string" }, "out_of_order_costs": true, "includes_accounts_payable": true, "shipping_cost": 0, "cost_items": [ { "name": "string", "value": 0 } ], "shipping_method": "string", "total_weight": 0, "is_insured": true, "insurance_value": 0, "custom_details": { "property1": {}, "property2": {} }, "shipping_tracking_link": "string", "shipping_tracking_number": "string" }, "status": "string", "internal_status": "string", "subtotal": 0, "total_amount": 0, "total_amount_items": 0, "total_items_discount": 0, "total_manual_percentage_discount_items": 0, "total_tax_items": 0, "items_count": 0, "items_quantity_count": 0, "total_discount": 0, "total_tip": 0, "total_delivery": 0, "percentage_tip": 0, "percentage_discount": 0, "tip_before_tax": true, "discount_before_tax": true, "total_tax": 0, "total": 0, "total_amount_returns": 0, "total_paid": 0, "total_payment": 0, "total_refund": 0, "payment_terms_days": 0, "payment_terms_description": "string", "invoice_number": "string", "invoice_created_at": "2019-08-24T14:15:22Z", "invoice_available": true, "is_billed": true, "e_billing_resolution_id": "string", "e_billing_operation_mode_id": "string", "e_billing_url": "string", "e_billing_cufe": "string", "e_billing_generated": true, "e_billing_number": "string", "e_billing_document_type": "string", "e_billing_created_at": "2019-08-24T14:15:22Z", "includes_tax_withholding": true, "total_tax_withholdings": 0, "tax_type": "string", "picking_available": true, "has_returns": true, "has_document_returns": true, "comments_count": 0, "takeout_order": true, "is_restaurant": true, "is_restaurant_close": true, "is_delivery": true, "is_delivery_close": true, "comment": "string", "client_ip_address": "string", "device_id": "string", "last_cash_register_id": "string", "source": "string", "tracking_number": "string", "has_notifications": true, "ecommerce_id": "string", "default_price": "string", "currency": "string", "include_invoice": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "billing_date": "2019-08-24T14:15:22Z", "date_created_custom": "2019-08-24T14:15:22Z", "last_payment_date": "2019-08-24T14:15:22Z", "items": [ { "id": "string", "order_id": "string", "product_id": "string", "account_id": "string", "organization_id": "string", "product_variant_id": "string", "product_category_id": "string", "warehouse_id": "string", "location_code": "string", "quantity": 0, "quantity_returned": 0, "unit_price": 0, "base_price": 0, "subtotal": 0, "total": 0, "manual_percentage_discount": 0, "manual_percentage_discount_value": 0, "total_discount": 0, "total_tax": 0, "total_tax_percentage": 0, "cost_weighted_average": 0, "cost_base_weighted_average": 0, "cost_average": 0, "cost_base_average": 0, "cost_last_purchase": 0, "cost_base_last_purchase": 0, "comment": "string", "account_user_id": "string", "position": 0, "is_custom_item": true, "custom_item_name": "string", "has_returns": true, "last_return_date": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "preparation_status": "string", "serials": [ "string" ], "optionals_config": {}, "taxes": [ { "id": "string", "tax_id": "string", "account_id": "string", "organization_id": "string", "tax_tribute_type": "string", "tax_name": "string", "tax_description": "string", "tax_value": 0, "total_tax_value": 0, "tax_percentage": 0, "tax_is_include": true, "tax_is_percentage": true, "accounting_account_id": "b9afe7f3-cb7f-4c0b-a3dc-077fc90c6430", "order_item_id": "string" } ], "discounts": [ { "id": "string", "value_base": 0, "discount_id": "string", "discount_type": "string", "discount_code": "string", "discount_name": "string", "discount_description": "string", "discount_percentage": 0, "value": 0, "order_item_id": "string" } ], "details": { "property1": {}, "property2": {} }, "custom_fields": { "property1": {}, "property2": {} } } ], "tax_withholdings": [ {} ], "tax_total_calculations": [ {} ], "files": [ {} ], "error_messages": [ {} ], "additional_details": { "property1": {}, "property2": {} }, "custom_fields": { "property1": {}, "property2": {} }, "order_invoice_numeration_id": "string"}Create Order POST
Create a new order in the authenticated account. Requires organization_id, document_type and at least one item. Account selectors in the body are ignored; related resources must belong to the same account. Supplied child IDs do not update existing rows.
Create invoice POST
Create an invoice for an existing order in the authenticated account. The order and numeration must belong to this account; missing or foreign resources return 404. Generates an invoice for the specified order using the provided numeration.