XML File Structure
This document provides a detailed description of the XML file structure.
The XML structure consists of two primary elements:
- Order: Represents an order placed by an agent, including its status, date, and associated order items.
- OrderItem: Represents a single booking or reservation for a particular passenger included within an order. It provides details like passenger information, product information, pricing and etc.
XML file structure
Order
| Field | Type | Description |
|---|---|---|
saleStatus | enum issued | refunded | Indicates whether the order is being created (issued) or refunded (refunded) |
date | string | The date and time of the order creation or refund event in ISO 8601 format and UTC timezone |
author | string | The name of the person who created or refunded the order |
contractId | string | The unique identifier of the agent contract |
orderId | string | The unique identifier of the order within the system |
widgetId | string | Widget ID the order has been placed from |
pspType | enum external | internal | Payment service provider type |
Order Item
| Field | Type | Description |
|---|---|---|
orderItemId | string | The unique identifier of the order item within the system |
refundLatestDate | string | The latest time a refund can be initiated for this order item specified in ISO 8601 format and UTC timezone |
couponCode | string | The coupon code associated with the order item |
productVariantId | string | An identifier for the product variant of the order item |
paxType | enum adult | child | The type of passenger (adult or child) |
paxId | string | The passenger ID assigned by the Agent |
firstName | string | The passenger's first name |
lastName | string | The passenger's last name |
date | string | The date of the visit for the order item specified in ISO 8601 format and UTC timezone |
value | integer | The duration of the visit in hours |
type | string | The type of product associated with the order item |
title | string | The title of the product associated with the order item |
airportIata | string | The IATA code of the airport associated with the order item |
terminalTitle | string | The name of the terminal associated with the order item |
terminalType | enum arrival | departure | transit | The type of terminal associated with the order item |
grossPrice | decimal | The gross price of the order item |
netPrice | decimal | The net price of the order item (price excluding the agent's margin) |
currency | string | Currency for mutual settlements between the Agent and ETT (USD) |
salesCurrency | string | The sales currency used by the Agent |
grossPriceInSalesCurrency | decimal | The gross price of the order item in the sales currency |
rateToUsd | decimal | The exchange rate between the sales currency and USD |
Automated XML Delivery
Our system automatically generates XML documents based on specific events:
- Order creation
- Order item refund
The generated XML documents are automatically uploaded to your designated sFTP server. You can configure your preferred sFTP server details within the Agent portal for seamless data delivery.
Order Creation
When a new order is created by an Agent, the system generates an XML document with the corresponding issued status.
File Name
File name consists of Agent Order ID and .xml extension.
Example: pwNO43Id.xml
File Content Example
<order>
<saleStatus>issued</saleStatus>
<date>2024-07-02T09:32:08Z</date>
<author>Islombek Rakhmonov</author>
<contractId>AC-000000002</contractId>
<orderId>pwNO43Id</orderId>
<widgetId>W-7vd094z2yugj</widgetId>
<pspType>external</pspType>
<orderItem>
<orderItemId>t8tgPja4</orderItemId>
<refundLatestDate>2024-07-01T00:00:00.000Z</refundLatestDate>
<couponCode>ETTXZZXXSXZIB@test</couponCode>
<productVariantId>PV-000000158</productVariantId>
<paxType>adult</paxType>
<paxId></paxId>
<firstName>Adam</firstName>
<lastName>Abraham</lastName>
<date>2024-07-05T00:00:00Z</date>
<value>3</value>
<type>hours</type>
<title>Plaza Premium Lounge</title>
<airportIata>HKG</airportIata>
<terminalTitle>Terminal 1</terminalTitle>
<terminalType>departure</terminalType>
<grossPrice>90.2</grossPrice>
<netPrice>83.9</netPrice>
<currency>USD</currency>
<salesCurrency>USD</salesCurrency>
<grossPriceInSalesCurrency>90.20</grossPriceInSalesCurrency>
<rateToUsd>1.000000</rateToUsd>
</orderItem>
</order>
Order Item Refunding
When an order item is refunded, the system generates an XML document with the corresponding refunded status.
File Name
File name consists of Agent Order ID, suffix refund and .xml extension.
Example: fhXkTMvx_refund.xml
If the order has multiple refunded items then a refund iteration index (starting from 1) is added to the suffix.
Example: fhXkTMvx_refund_1.xml, fhXkTMvx_refund_2.xml, ..., fhXkTMvx_refund_N.xml
File Content Example
<order>
<saleStatus>refunded</saleStatus>
<date>2024-07-02T09:45:54Z</date>
<author>Islombek Rakhmonov</author>
<contractId>AC-000000002</contractId>
<orderId>pwNO43Id</orderId>
<widgetId></widgetId>
<pspType></pspType>
<orderItem>
<orderItemId>t8tgPja4</orderItemId>
<refundLatestDate>2024-07-01T00:00:00.000Z</refundLatestDate>
<couponCode>ETTXZZXXSXZIB@test</couponCode>
<productVariantId>PV-000000158</productVariantId>
<paxType>adult</paxType>
<paxId></paxId>
<firstName>Adam</firstName>
<lastName>Abraham</lastName>
<date>2024-07-05T00:00:00Z</date>
<value>3</value>
<type>hours</type>
<title>Plaza Premium Lounge</title>
<airportIata>HKG</airportIata>
<terminalTitle>Terminal 1</terminalTitle>
<terminalType>departure</terminalType>
<grossPrice>90.2</grossPrice>
<netPrice>83.9</netPrice>
<currency>USD</currency>
<salesCurrency>USD</salesCurrency>
<grossPriceInSalesCurrency>90.20</grossPriceInSalesCurrency>
<rateToUsd>1.000000</rateToUsd>
</orderItem>
</order>