Order Related Object Types
Order
Orders contain the details of a checkout attempt by a customer.
An order can exist in one of these statuses:
CREATED
IN_PROGRESS
PARTIALLY_SHIPPED
ONHOLD
COMPLETED
CANCELLED
FAILED
AWAITING_EXCHANGE
note
Currently, Elastic Path Commerce does not support import or export of return or exchange orders.
When importing orders, if the order_number
already exists, the order will be updated. Otherwise, a new order will be inserted into the database.
Sample XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orders>
<order order_number="2000">
<account_guid>CatalogBrowserRole</account_guid>
<created_date>2023-04-12T03:48:59Z</created_date>
<currency>CAD</currency>
<customer_guid>80E0B57C-EEF0-646D-105E-056DD9C1D25D</customer_guid>
<account_guid></account_guid>
<exchange_order>false</exchange_order>
<external_order_number>200</external_order_number>
<last_modified_date>2023-04-12T03:53:24Z</last_modified_date>
<locale>en</locale>
<status>COMPLETED</status>
<store_code>MOBEE</store_code>
<total>26.40</total>
<billing_address guid="9ba7e100-5965-452f-abdc-8ab50e4cfa6d">
<last_name>Potter</last_name>
<first_name>Harry</first_name>
<street1>1234 Hogwarts Avenue</street1>
<street2></street2>
<city>Vancouver</city>
<sub_country>BC</sub_country>
<zip_postal_code>V6A 1N4</zip_postal_code>
<country>CA</country>
<phone_number>7789994564</phone_number>
</billing_address>
<order_skus>
<order_sku guid="3b6f03cd-a480-4c34-b333-cbb99cc9ceaf">
<last_modified_date>2023-08-09T22:04:25Z</last_modified_date>
<created_date>2023-04-12T03:48:59Z</created_date>
<sku_code>physical_sku</sku_code>
<tax_code>NONE</tax_code>
<quantity>1</quantity>
<display_name>physicalProduct</display_name>
<amount>25.00</amount>
<tax_amount>0.00</tax_amount>
<list_unit_price>25.00</list_unit_price>
<sale_unit_price>0.00</sale_unit_price>
<promo_unit_price>25.00</promo_unit_price>
<unit_price>25.00</unit_price>
<discount_amount>0.00</discount_amount>
<display_sku_options></display_sku_options>
<weight>0</weight>
<allocated_quantity>1</allocated_quantity>
<ordering>1</ordering>
<sku_guid>563FD18F-C410-4E86-9CDD-BF726107BAB9</sku_guid>
<fields/>
<tax_lines>
<tax_line>
<journal_type>purchase</journal_type>
<transaction_type>Order</transaction_type>
<tax_calculation_date>2023-04-28T10:12:35Z</tax_calculation_date>
<document_id>2000-1.41F0F7EE-F487-630A-56AA-A0471B272FE3</document_id>
<item_object_type>Order SKU</item_object_type>
<item_amount>25.00</item_amount>
<name>NO_TAX</name>
<tax_code>NONE</tax_code>
<tax_amount>0.00</tax_amount>
<tax_rate>0.000000</tax_rate>
<jurisdiction>NO_TAX_JURISDICTION</jurisdiction>
<region>NO_TAX_REGION</region>
<provider>ElasticPath</provider>
<tax_is_inclusive>false</tax_is_inclusive>
</tax_line>
</tax_lines>
<bundle_child_order_skus>
<order_sku guid="da667b51-0503-4992-98cf-6cef30817216">
...
</order_sku>
</bundle_child_order_skus>
<child_order_skus>
<order_sku guid="886b7367-9f11-4ae1-9cd8-78edc57a07e8">
...
</order_sku>
</child_order_skus>
</order_sku>
</order_skus>
<events>
<event>
<created_date>2023-04-12T03:48:59Z</created_date>
<detail>Order is placed by Harry Potter.</detail>
<originator_type>CUSTOMER</originator_type>
<title>Order Placed</title>
<last_modified_date>2023-04-28T10:12:34Z</last_modified_date>
</event>
<event>
<created_date>2023-04-12T03:49:00Z</created_date>
<detail>Order is accepted.</detail>
<originator_type>CUSTOMER</originator_type>
<title>Order Accepted</title>
<last_modified_date>2023-04-28T10:12:34Z</last_modified_date>
</event>
<event>
<created_date>2023-04-12T03:49:00Z</created_date>
<detail>Order is released for fulfilment.</detail>
<originator_type>SYSTEM</originator_type>
<title>Order Released for Fulfilment</title>
<last_modified_date>2023-04-28T10:12:34Z</last_modified_date>
</event>
<event>
<created_date>2023-04-12T03:53:24Z</created_date>
<detail>Payment Captured at Wed Apr 12 09:53:24 MSK 2023 with total $26.40 on d.</detail>
<originator_type>SYSTEM</originator_type>
<title>Payment Captured</title>
<last_modified_date>2023-04-28T10:12:34Z</last_modified_date>
</event>
</events>
<payments>
<payment guid="de72551f-f0e1-4fbb-874c-f0dad737e0d2">
<transaction_date>2023-04-12T06:49:00Z</transaction_date>
<transaction_type>RESERVE</transaction_type>
<payment_status>APPROVED</payment_status>
<amount>26.40</amount>
<payment_instrument_guid>a5f44594-6c96-45cc-af56-44bb0ae39c06</payment_instrument_guid>
<is_original_pi>true</is_original_pi>
<payment_provider_config_guid>happy-path-payment-provider-config</payment_provider_config_guid>
<fields>
<field key="Config A">Value of Config A</field>
<field key="Config B">Value of Config B</field>
</fields>
</payment>
<payment guid="156f033c-d20d-4275-9ce8-4cba24cb178b">
<transaction_date>2023-04-12T06:53:25Z</transaction_date>
<transaction_type>CHARGE</transaction_type>
<payment_status>APPROVED</payment_status>
<amount>26.40</amount>
<payment_instrument_guid>a5f44594-6c96-45cc-af56-44bb0ae39c06</payment_instrument_guid>
<parent_order_payment_guid>de72551f-f0e1-4fbb-874c-f0dad737e0d2</parent_order_payment_guid>
<is_original_pi>true</is_original_pi>
<payment_provider_config_guid>happy-path-payment-provider-config</payment_provider_config_guid>
<fields>
<field key="Config B">Value of Config B</field>
<field key="Config A">Value of Config A</field>
</fields>
</payment>
</payments>
<order_payment_instruments>
<order_payment_instrument guid="271acc18-5586-434c-a4e1-1d18f7a3f3cf">
<payment_instrument_guid>a5f44594-6c96-45cc-af56-44bb0ae39c06</payment_instrument_guid>
<limit_amount>0.00</limit_amount>
</order_payment_instrument>
</order_payment_instruments>
<payment_instruments>
<payment_instrument guid="a5f44594-6c96-45cc-af56-44bb0ae39c06" payment_provider_config_guid="happy-path-payment-provider-config">
<is_single_reserve_per_pi>false</is_single_reserve_per_pi>
<is_supporting_multi_charges>false</is_supporting_multi_charges>
<name>d</name>
<fields>
<field key="details">c4b0ebbc-bf23-43e8-9b4a-e6a4cc4edb1e</field>
</fields>
</payment_instrument>
</payment_instruments>
<holds/>
<fields>
<field key="name">default</field>
</fields>
<shipments>
<shipment shipment_number="2000-1">
<status>SHIPPED</status>
<type>PHYSICAL</type>
<created_date>2023-04-12T03:48:59Z</created_date>
<last_modified_date>2023-08-09T22:04:25Z</last_modified_date>
<carrier_code>Canada Post</carrier_code>
<carrier_name>Canada Post</carrier_name>
<shipping_option_code>CanadaPostTwoDays</shipping_option_code>
<shipping_option_name>Canada Post 2 days</shipping_option_name>
<shipment_date>2023-04-12T03:53:24Z</shipment_date>
<tracking_code></tracking_code>
<item_subtotal>25.00</item_subtotal>
<subtotal_discount>0.00</subtotal_discount>
<item_tax>0.00</item_tax>
<before_tax_shipping_cost>1.25</before_tax_shipping_cost>
<shipping_tax>0.15</shipping_tax>
<shipping_cost>1.25</shipping_cost>
<inclusive_tax>false</inclusive_tax>
<tax_document_id>2000-1.41F0F7EE-F487-630A-56AA-A0471B272FE3</tax_document_id>
<shipping_address guid="717fab0d-7776-4e1f-b5c9-f23faeaf1762">
<last_name>Potter</last_name>
<first_name>Harry</first_name>
<street1>1234 Hogwarts Avenue</street1>
<street2></street2>
<city>Vancouver</city>
<sub_country>BC</sub_country>
<zip_postal_code>V6A 1N4</zip_postal_code>
<country>CA</country>
<phone_number>7789994564</phone_number>
</shipping_address>
<order_skus>
<order_sku guid="3b6f03cd-a480-4c34-b333-cbb99cc9ceaf"/>
</order_skus>
<total_tax_lines>
<total_tax_line>
<tax_category_name>GST</tax_category_name>
<tax_category_display_name>GST</tax_category_display_name>
<amount>0.06</amount>
</total_tax_line>
<total_tax_line>
<tax_category_name>PST</tax_category_name>
<tax_category_display_name>PST</tax_category_display_name>
<amount>0.09</amount>
</total_tax_line>
</total_tax_lines>
<shipping_cost_tax_lines>
<tax_line>
<journal_type>purchase</journal_type>
<transaction_type>Order</transaction_type>
<tax_calculation_date>2023-04-28T10:12:35Z</tax_calculation_date>
<document_id>2000-1.41F0F7EE-F487-630A-56AA-A0471B272FE3</document_id>
<item_object_type>Order Shipment</item_object_type>
<item_amount>1.25</item_amount>
<name>GST</name>
<tax_code>SHIPPING</tax_code>
<tax_amount>0.06</tax_amount>
<tax_rate>0.050000</tax_rate>
<jurisdiction>CA</jurisdiction>
<region>CA</region>
<provider>ElasticPath</provider>
<tax_is_inclusive>false</tax_is_inclusive>
</tax_line>
<tax_line>
<journal_type>purchase</journal_type>
<transaction_type>Order</transaction_type>
<tax_calculation_date>2023-04-28T10:12:35Z</tax_calculation_date>
<document_id>2000-1.41F0F7EE-F487-630A-56AA-A0471B272FE3</document_id>
<item_object_type>Order Shipment</item_object_type>
<item_amount>1.25</item_amount>
<name>PST</name>
<tax_code>SHIPPING</tax_code>
<tax_amount>0.09</tax_amount>
<tax_rate>0.070000</tax_rate>
<jurisdiction>CA</jurisdiction>
<region>BC</region>
<provider>ElasticPath</provider>
<tax_is_inclusive>false</tax_is_inclusive>
</tax_line>
</shipping_cost_tax_lines>
</shipment>
</shipments>
</order>
</orders>