Skip to main content
Aria Knowledge Central

Sample XML Payloads for Events in the Orders Class

Sample Payload 1: New Order Creation Event

This payload represents a notification triggered by the creation of a new order for an item, including account and order details.

<?xml version="1.0" encoding="UTF-8"?>
<apf2doc>
    <request>
        <version>3.0</version>
        <sender>A</sender>
        <transaction_id>76543210</transaction_id>
        <action>A</action>
        <class>O</class>
        <auth_key>orderkey789</auth_key>
    </request>
    <account>
        <client_no>1001</client_no>
        <acct_no>50001</acct_no>
        <client_acct_id>ACCT-001</client_acct_id>
        <userid>johndoe</userid>
        <resp_level_cd>1</resp_level_cd>
        <resp_plan_instance_no>60001</resp_plan_instance_no>
        <order_no>80001</order_no>
        <order_status>1</order_status>
        <order_fulfill_date>2025-03-15</order_fulfill_date>
        <plan_instance_no>60001</plan_instance_no>
        <client_plan_instance_id>MPI-001</client_plan_instance_id>
    </account>
    <item>
        <sku>ITEM-123</sku>
        <units>2</units>
        <unit_rate>25.00</unit_rate>
    </item>
    <event_data>
        <event>
            <event_id>801</event_id>
            <event_label>Order Created</event_label>
        </event>
    </event_data>
</apf2doc>

Notes

  • The <action> is set to "A" for "add," indicating a new order creation.
  • The class is "O" to identify this as an "Order" event.
  • The <account> section includes order-specific fields like <order_no>, <order_status> (e.g., 1 for "Pending"), and <order_fulfill_date>.
  • The <item> section details the ordered item (SKU, quantity, and rate), which is optional but relevant for a new order.
  • The <event_data> specifies a hypothetical "Order Created" event (ID 801).

Sample Payload 2: Order Modification Event

This payload represents a notification triggered by a modification to an existing order (e.g., updating the number of units), with minimal item details.

<?xml version="1.0" encoding="UTF-8"?>
<apf2doc>
    <request>
        <version>3.0</version>
        <sender>A</sender>
        <transaction_id>76543211</transaction_id>
        <action>M</action>
        <class>O</class>
    </request>
    <account>
        <client_no>1001</client_no>
        <acct_no>50001</acct_no>
        <client_acct_id>ACCT-001</client_acct_id>
        <userid>johndoe</userid>
        <resp_level_cd>1</resp_level_cd>
        <resp_plan_instance_no>60001</resp_plan_instance_no>
        <order_no>80002</order_no>
        <order_status>2</order_status>
        <order_fulfill_date>2025-03-16</order_fulfill_date>
        <plan_instance_no>60001</plan_instance_no>
        <client_plan_instance_id>MPI-001</client_plan_instance_id>
    </account>
    <item>
        <sku>ITEM-456</sku>
        <units>3</units>
        <unit_rate>30.00</unit_rate>
    </item>
    <event_data>
        <event>
            <event_id>802</event_id>
            <event_label>Order Units Updated</event_label>
        </event>
    </event_data>
</apf2doc>

Notes

  • The <action> is set to "M" for "modify," indicating an update to an existing order (e.g., changing units from 2 to 3).
  • The class remains "O" for this event class.
  • The <account> section reflects the modified order with order_status updated to 2 (e.g., "Processing") and a new order_fulfill_date.
  • The <item> section is included to show the updated order details (optional but relevant here).
  • The <event_data> specifies a hypothetical "Order Units Updated" event (ID 802).

General Observations

  • Both payloads conform to the XSD structure, with <request> and <account> as required elements, and <item> and <event_data> included as optional but contextually appropriate.
  • The version is set to "3.0" as per the schema, and sender is "A" (Aria).
  • The <item> element is optional and included in both examples to provide details about the order, though it could be omitted for events not directly tied to item changes.
  • Fields like <units> and <unit_rate> are typed as strings in the XSD, so they are presented as such (e.g., "2" and "25.00"), though they represent numeric values.
  • Dates (e.g., "2025-03-15") are simple strings for readability.
  • The <event_data> section includes a single event, though the schema allows multiple events if applicable.
  • Was this article helpful?