Sage 200 Online Sales Transaction XML
Sales posted transactions are created when transactions, such as orders invoiced, receipts, refunds or credit notes, are posted against the sales ledger. Further information can be found on the Sage 200 Online Sales Posted Transactions API Documentation.
Tasks
Fields for Download Only
id
Read Only
Id.
Type | Example | XML |
---|---|---|
integer(int64) | 27107 | <id>27107</id> |
customer_id
Read Only
Customer Id, will also return customer data.
Type | Example | XML |
---|---|---|
integer(int64) | 27006 | <customer_id>27006</customer_id> |
trader_transaction_type
Read Only
Transaction type.
Type | Example | XML |
---|---|---|
string(30) | TradingAccountEntryTypePurchasePaymentSalesReceipt | <trader_transaction_type>TradingAccountEntryTypePurchasePaymentSalesReceipt</trader_transaction_type> |
Available Values
- TradingAccountEntryTypeDeletedRecord - Deleted
- TradingAccountEntryTypePurchasePaymentSalesReceipt - Purchase Payment / Sales Receipt
- TradingAccountEntryTypePurchaseReceiptSalesPayment - Purchase Receipt / Sales Payment
- TradingAccountEntryTypeNOTUSED - Unknown
- TradingAccountEntryTypeInvoice - Invoice
- TradingAccountEntryTypeCreditNote - Credit Note
- TradingAccountEntryTypeOpeningBalanceInvoice - Opening Bal. Invoice
- TradingAccountEntryTypeOpeningBalanceCreditNote - Opening Bal. Credit Note
reference
Read Only
Transaction reference.
Type | Example | XML |
---|---|---|
string(20) | Web Sales | <reference>Web Sales</reference> |
second_reference
Read Only
Second reference.
Type | Example | XML |
---|---|---|
string(20) | Order #12345 | <second_reference>Order #12345</second_reference> |
queried
Read Only
Query flag.
Type | Example | XML |
---|---|---|
string(1) | <queried /> |
transaction_date
Read Only
Transaction date.
Type | Example | XML |
---|---|---|
datetime | 2017-06-01T00:00:00 | <transaction_date>2017-06-01T00:00:00</transaction_date> |
posted_date
Read Only
Posted date.
Type | Example | XML |
---|---|---|
datetime | 2017-06-02T00:00:00 | <posted_date>2017-06-02T00:00:00</posted_date> |
due_date
Read Only
Due date.
Type | Example | XML |
---|---|---|
datetime | 2017-06-01T00:00:00 | <due_date>2017-06-01T00:00:00</due_date> |
document_goods_value
Read Only
Value of the goods.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | -120.00 | <document_goods_value>-120.00</document_goods_value> |
document_gross_value
Read Only
Gross value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | -120.00 | <document_gross_value>-120.00</document_gross_value> |
document_tax_value
Read Only
Tax value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.00 | <document_tax_value>0.00</document_tax_value> |
document_discount_value
Read Only
Document discount value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.00 | <document_discount_value>0.00</document_discount_value> |
discount_percent
Read Only
Percentage discount.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.00 | discount_percent>0.00</discount_percent> |
document_tax_discount_value
Read Only
Tax discount value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.00 | <document_tax_discount_value>0.00</document_tax_discount_value> |
document_allocated_value
Read Only
Allocated value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.00 | <document_allocated_value>0.00</document_allocated_value> |
document_outstanding_value
Read Only
Outstanding value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | -120.00 | <document_outstanding_value>-120.00</document_outstanding_value> |
base_goods_value
Read Only
Value of the goods in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | -120.0< | <base_goods_value>-120.0</base_goods_value> |
base_gross_value
Read Only
Gross value in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | -120.0 | <base_gross_value>-120.0</base_gross_value> |
base_tax_value
Read Only
Tax value in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.0 | <base_tax_value>0.0</base_tax_value> |
base_discount_value
Read Only
Discount value in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.0 | <base_discount_value>0.0</base_discount_value> |
base_tax_discount_value
Read Only
Tax discount value in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.0 | <base_tax_discount_value>0.0</base_tax_discount_value> |
base_allocated_value
Read Only
Allocated value in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0.0 | <base_allocated_value>0.0</base_allocated_value> |
control_value_in_base_currency
Read Only
Control value in base currency.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | -120.00 | <control_value_in_base_currency>-120.00</control_value_in_base_currency> |
exchange_rate
Read Only
Exchange rate used for transaction.
Type | Example | XML |
---|---|---|
number(decimal 6dp) | 1.000000 | <exchange_rate>1.000000</exchange_rate> |
settled_immediately
Read Only
Immediately settled.
Type | Example | XML |
---|---|---|
boolean | false | <settled_immediately>false</settled_immediately> |
Available Values
- true
- false
discount_days
Read Only
Number of days discount valid.
Type | Example | XML |
---|---|---|
integer(int16) | 0 | <discount_days>0</discount_days> |
urn
Read Only
Unique reference number.
Type | Example | XML |
---|---|---|
integer(int64) | 31 | <urn>31</urn> |
user_name
Read Only
User who entered the transaction.
Type | Example | XML |
---|---|---|
string(20) | Demo Site | <user_name>Demo Site</user_name> |
date_time_updated
Read Only
The date and time this entity was last updated (UTC).
Type | Example | XML |
---|---|---|
datetime | 2017-06-02T15:08:33.673 | <date_time_updated>2017-06-02T15:08:33.673</date_time_updated> |
tax_analysis_items
Read Only
A collection of tax analysis items, see full example XML below.
id
Read Only
Tax code Id.
Type | Example | XML |
---|---|---|
integer(int64) | 2 | <id>2</id |
goods_amount
Read Only
Goods amount.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 20.00 | <goods_amount>20.00</goods_amount> |
tax_amount
Read Only
Tax amount.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 4.00 | <tax_amount>4.00</tax_amount> |
nominal_analysis_items
Read Only
A collection of nominal analysis items, see full example XML below.
code
Read Only
Nominal account code.
Type | Example | XML |
---|---|---|
string(8) | 1200 | <code>1200</code> |
cost_centre
Read Only
Cost centre.
Type | Example | XML |
---|---|---|
string(3) | <cost_centre /> |
department
Read Only
Department.
Type | Example | XML |
---|---|---|
string(3) | <department /> |
narrative
Read Only
Narrative.
Type | Example | XML |
---|---|---|
string(6000) | SR / ZYNK001 | <narrative>SR / ZYNK001</narrative> |
value
Read Only
Goods value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 120.00 | <value>120.00</value> |
bank_items
Read Only
A collection of bank items, see full example XML below.
bank_code
Read Only
Bank account code.
Type | Example | XML |
---|---|---|
string() | DEFAULT | <bank_code>DEFAULT</bank_code> |
name
Read Only
Account name.
Type | Example | XML |
---|---|---|
string(60) | Default | <name>Default</name> |
bank_entry_type
Read Only
Bank entry type.
Type | Example | XML |
---|---|---|
string(30) | Receipt | <bank_entry_type>Receipt</bank_entry_type> |
reference
Read Only
Reference.
Type | Example | XML |
---|---|---|
string(20) | Web Sales | <reference>Web Sales</reference> |
cheque_value
Read Only
Value of item.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | <cheque_value>120.00</cheque_value> |
allocation_session_items
Read Only
A collection of allocation session items, see full example XML below.
user_name
Read Only
Name of user that entered item.
Type | Example | XML |
---|---|---|
string() | Demo Site | <user_name>Demo Site</user_name> |
ledger_type
Read Only
Ledger type.
Type | Example | XML |
---|---|---|
string(30) | LedgerSales | <ledger_type>LedgerSales</ledger_type> |
Available Values
- LedgerNotSpecified - Not Specified
- LedgerSales - Sales
- LedgerPurchase - Purchase
- LedgerNominal - Nominal
- LedgerPayroll - Payroll
- LedgerProjectCosting - Project Accounting
- LedgerStockControl - Stock Control
- LedgerSOP - SOP
- LedgerPOP - POP
- LedgerInvoicing - Invoicing
- LedgerCashBook - Cash Book
- LedgerBOM - BOM
- LedgerFixedAssets - Fixed Assets
- LedgerRetail - Retail
- LedgerManufacturing - Manufacturing
- LedgerWebAPI - Web API
- LedgerBankFeeds - Bank Feeds
- LedgerEducation - Education
- LedgerExcelReporting - Excel Reporting
- LedgerBI - Business Intelligence
- LedgerPriceBook - Price Book
- LedgerTax - Tax
- LedgerUnknownSource - Unknown
urn
Read Only
Unique reference number.
Type | Example | XML |
---|---|---|
integer(int64) | 4 | <urn>4</urn> |
allocation_date
Read Only
Date of allocation.
Type | Example | XML |
---|---|---|
datetime | 2016-07-07T00:00:00 | <allocation_date>2016-07-07T00:00:00</allocation_date> |
trader_transaction_type
Read Only
Transaction type.
Type | Example | XML |
---|---|---|
string(30) | TradingAccountEntryTypeInvoice | <trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type> |
Available Values
- TradingAccountEntryTypeDeletedRecord - Deleted
- TradingAccountEntryTypePurchasePaymentSalesReceipt - Purchase Payment / Sales Receipt
- TradingAccountEntryTypePurchaseReceiptSalesPayment - Purchase Receipt / Sales Payment
- TradingAccountEntryTypeNOTUSED - Unknown
- TradingAccountEntryTypeInvoice - Invoice
- TradingAccountEntryTypeCreditNote - Credit Note
- TradingAccountEntryTypeOpeningBalanceInvoice - Opening Bal. Invoice
- TradingAccountEntryTypeOpeningBalanceCreditNote - Opening Bal. Credit Note
reference
Read Only
Reference.
Type | Example | XML |
---|---|---|
string(20) | 0000000123 | <reference>0000000123</reference> |
value
Read Only
Value of allocation item.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 12.00 | <value>12.00</value> |
allocation_value
Read Only
Value of allocation.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 12.00 | <allocation_value>12.00</allocation_value> |
allocation_history_items
Read Only
A collection of allocation history items, see full example XML below.
allocation_value
Read Only
Value of allocation.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 12.00 | <allocation_value>12.00</allocation_value> |
Expandable Fields
Related information linked to sales transactions are also included in the exported XML.
Customer
Dependant (see customer_id)
On a download all the related information of the customer will be included in the XML, see Sage 200 Online Customer XML.
Export example showing related information
<customer
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<id>27006</id>
<date_time_updated>2017-06-05T15:24:29.723</date_time_updated>
<reference>ZYNK001</reference>
<name>Zynk Software Ltd.</name>
<short_name>Zynk</short_name>
<balance>-480.00</balance>
<on_hold>false</on_hold>
<account_status_type>AccountStatusActive</account_status_type>
<currency_id>1</currency_id>
<exchange_rate_type>ExchangeRateSingle</exchange_rate_type>
<telephone_country_code>+44</telephone_country_code>
<telephone_area_code>191</telephone_area_code>
<telephone_subscriber_number>303 7279</telephone_subscriber_number>
<fax_country_code>+44</fax_country_code>
<fax_area_code>845</fax_area_code>
<fax_subscriber_number>123 2920</fax_subscriber_number>
<website>http://zynk.com</website>
<credit_limit>10000.00</credit_limit>
<country_code_id>13</country_code_id>
<default_tax_code_id>2</default_tax_code_id>
<vat_number>796 5763 59</vat_number>
<analysis_code_1>North</analysis_code_1>
<analysis_code_2>Software</analysis_code_2>
<analysis_code_3>01/01/2005</analysis_code_3>
<analysis_code_4>10</analysis_code_4>
<analysis_code_5>true</analysis_code_5>
<duns_code>424458615</duns_code>
</customer>
Example XML
Sales Receipt
<?xml version="1.0" encoding="utf-8"?>
<SalesTransactions>
<SalesTransaction>
<id>27107</id>
<date_time_updated>2017-06-02T15:08:33.673</date_time_updated>
<trader_transaction_type>TradingAccountEntryTypePurchasePaymentSalesReceipt</trader_transaction_type>
<reference>Web Sales</reference>
<second_reference>Order #12345</second_reference>
<queried />
<transaction_date>2017-06-01T00:00:00</transaction_date>
<posted_date>2017-06-02T00:00:00</posted_date>
<due_date>2017-06-01T00:00:00</due_date>
<document_goods_value>-120.00</document_goods_value>
<document_gross_value>-120.00</document_gross_value>
<document_tax_value>0.00</document_tax_value>
<document_discount_value>0.00</document_discount_value>
<discount_percent>0.00</discount_percent>
<document_tax_discount_value>0.00</document_tax_discount_value>
<document_allocated_value>0.00</document_allocated_value>
<document_outstanding_value>-120.00</document_outstanding_value>
<base_goods_value>-120.0</base_goods_value>
<base_gross_value>-120.0</base_gross_value>
<base_tax_value>0.0</base_tax_value>
<base_discount_value>0.0</base_discount_value>
<base_tax_discount_value>0.0</base_tax_discount_value>
<base_allocated_value>0.0</base_allocated_value>
<control_value_in_base_currency>-120.00</control_value_in_base_currency>
<exchange_rate>1.000000</exchange_rate>
<settled_immediately>false</settled_immediately>
<discount_days>0</discount_days>
<urn>31</urn>
<user_name>Demo Site</user_name>
<tax_analysis_items />
<nominal_analysis_items>
<nominal_analysis_item>
<code>1100</code>
<cost_centre />
<department />
<narrative>SR / ZYNK001</narrative>
<value>-120.00</value>
</nominal_analysis_item>
<nominal_analysis_item>
<code>1200</code>
<cost_centre />
<department />
<narrative>SR / ZYNK001</narrative>
<value>120.00</value>
</nominal_analysis_item>
</nominal_analysis_items>
<bank_items>
<bank_item>
<bank_code>DEFAULT</bank_code>
<name>Default</name>
<bank_entry_type>Receipt</bank_entry_type>
<reference>Web Sales</reference>
<cheque_value>120.00</cheque_value>
<statement_date xsi:nil="true" />
<statement_page_number xsi:nil="true" />
<urn>31</urn>
</bank_item>
</bank_items>
<allocation_session_items />
<allocation_history_items />
<customer_id>27006</customer_id>
<customer>
<id>27006</id>
<date_time_updated>2017-06-06T11:45:50.363</date_time_updated>
<reference>ZYNK001</reference>
<name>Zynk Software Ltd.</name>
<short_name>Zynk</short_name>
<balance>-480.00</balance>
<on_hold>false</on_hold>
<account_status_type>AccountStatusActive</account_status_type>
<currency_id>1</currency_id>
<exchange_rate_type>ExchangeRateSingle</exchange_rate_type>
<telephone_country_code>+44</telephone_country_code>
<telephone_area_code>191</telephone_area_code>
<telephone_subscriber_number>303 7279</telephone_subscriber_number>
<fax_country_code>+44</fax_country_code>
<fax_area_code>845</fax_area_code>
<fax_subscriber_number>123 2920</fax_subscriber_number>
<website>http://zynk.com</website>
<credit_limit>10000.00</credit_limit>
<country_code_id>13</country_code_id>
<default_tax_code_id>2</default_tax_code_id>
<vat_number>796 5763 59</vat_number>
<analysis_code_1>North</analysis_code_1>
<analysis_code_2>Software</analysis_code_2>
<analysis_code_3>01/01/2005</analysis_code_3>
<analysis_code_4>10</analysis_code_4>
<analysis_code_5>true</analysis_code_5>
<duns_code>424458615</duns_code>
</customer>
</SalesTransaction>
</SalesTransactions>
Sales Invoice
<?xml version="1.0" encoding="utf-8"?>
<SalesTransactions>
<SalesTransaction>
<id>18406</id>
<date_time_updated>2016-07-07T14:27:49.053</date_time_updated>
<trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type>
<reference>0000000123</reference>
<second_reference>0000000123</second_reference>
<queried />
<transaction_date>2016-05-22T00:00:00</transaction_date>
<posted_date>2016-05-23T00:00:00</posted_date>
<due_date>2016-06-07T00:00:00</due_date>
<document_goods_value>10.00</document_goods_value>
<document_gross_value>12.00</document_gross_value>
<document_tax_value>2.00</document_tax_value>
<document_discount_value>0.00</document_discount_value>
<discount_percent>0.00</discount_percent>
<document_tax_discount_value>0.00</document_tax_discount_value>
<document_allocated_value>12.00</document_allocated_value>
<document_outstanding_value>0.00</document_outstanding_value>
<base_goods_value>10.0</base_goods_value>
<base_gross_value>12.0</base_gross_value>
<base_tax_value>2.0</base_tax_value>
<base_discount_value>0.0</base_discount_value>
<base_tax_discount_value>0.0</base_tax_discount_value>
<base_allocated_value>12.0</base_allocated_value>
<control_value_in_base_currency>0.00</control_value_in_base_currency>
<exchange_rate>1.000000</exchange_rate>
<settled_immediately>false</settled_immediately>
<discount_days>0</discount_days>
<urn>4</urn>
<user_name>Demo Site</user_name>
<tax_analysis_items>
<tax_analysis_item>
<id>2</id>
<goods_amount>10.00</goods_amount>
<discount_amount xsi:nil="true" />
<tax_amount>2.00</tax_amount>
<goods_discount_amount xsi:nil="true" />
</tax_analysis_item>
</tax_analysis_items>
<nominal_analysis_items>
<nominal_analysis_item>
<code />
<cost_centre />
<department />
<narrative>SI / ZYNK0001</narrative>
<value>-10.00</value>
</nominal_analysis_item>
<nominal_analysis_item>
<code />
<cost_centre />
<department />
<narrative>SI / ZYNK0001</narrative>
<value>-2.00</value>
</nominal_analysis_item>
<nominal_analysis_item>
<code />
<cost_centre />
<department />
<narrative>SI / ZYNK0001</narrative>
<value>12.00</value>
</nominal_analysis_item>
</nominal_analysis_items>
<bank_items />
<allocation_session_items>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerSales</ledger_type>
<urn>12</urn>
<allocation_date>2016-07-07T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypePurchasePaymentSalesReceipt</trader_transaction_type>
<reference>receipt</reference>
<value>-20.00</value>
<allocation_value>-20.00</allocation_value>
</allocation_session_item>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerSales</ledger_type>
<urn>4</urn>
<allocation_date>2016-07-07T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type>
<reference>0000000123</reference>
<value>12.00</value>
<allocation_value>12.00</allocation_value>
</allocation_session_item>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerSales</ledger_type>
<urn>5</urn>
<allocation_date>2016-07-07T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type>
<reference>0000000123</reference>
<value>12.00</value>
<allocation_value>8.00</allocation_value>
</allocation_session_item>
</allocation_session_items>
<allocation_history_items>
<allocation_history_item>
<urn xsi:nil="true" />
<allocation_date xsi:nil="true" />
<value xsi:nil="true" />
<allocation_value>12.00</allocation_value>
</allocation_history_item>
</allocation_history_items>
<customer_id>14950</customer_id>
<customer>
<id>14950</id>
<date_time_updated>2017-01-25T11:05:10.687</date_time_updated>
<reference>ZYNK0001</reference>
<name>Zynk Software</name>
<short_name>Zynk Sof</short_name>
<balance>-1929.60</balance>
<on_hold>false</on_hold>
<account_status_type>AccountStatusActive</account_status_type>
<currency_id>1</currency_id>
<exchange_rate_type>ExchangeRateSingle</exchange_rate_type>
<telephone_country_code>00</telephone_country_code>
<telephone_area_code>11</telephone_area_code>
<telephone_subscriber_number>22</telephone_subscriber_number>
<fax_country_code>33</fax_country_code>
<fax_area_code>44</fax_area_code>
<fax_subscriber_number>55</fax_subscriber_number>
<website>web</website>
<credit_limit>10000.00</credit_limit>
<country_code_id>100224</country_code_id>
<default_tax_code_id>2</default_tax_code_id>
<vat_number>vat num</vat_number>
<analysis_code_1>analysis 1</analysis_code_1>
<analysis_code_2>analysis 2</analysis_code_2>
<analysis_code_3>analysis 3</analysis_code_3>
<analysis_code_4>analysis 4</analysis_code_4>
<analysis_code_5>analysis 5</analysis_code_5>
<duns_code>014785236</duns_code>
</customer>
</SalesTransaction>
</SalesTransactions>