Sage 200 Online Purchase Transaction XML
Purchase posted transactions are created when transactions, such as orders invoiced, receipts, refunds or credit notes, are posted against the purchase ledger. Further information can be found on the Sage 200 Online Purchase Posted Transactions API Documentation.
Tasks
Fields for Download Only
id
Read Only
Id.
Type | Example | XML |
---|---|---|
integer(int64) | 27107 | <id>27107</id> |
supplier_id
Read Only
Supplier Id, will also return supplier data.
Type | Example | XML |
---|---|---|
integer(int64) | 27006 | <supplier_id>27006</supplier_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
vat_adjustment_doc_expected
Read Only
Whether a further VAT adjustment document is expected.
Type | Example | XML |
---|---|---|
boolean() | false | <vat_adjustment_doc_expected>0</vat_adjustment_doc_expected> |
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 purchase transactions are also included in the exported XML.
Supplier
Dependant (see supplier_id)
On a download all the related information of the supplier will be included in the XML, see Sage 200 Online Supplier XML.
Export example showing related information
<supplier>
<id>15326</id>
<date_time_updated>2016-05-17T14:27:58.18</date_time_updated>
<reference>ZYN001</reference>
<name>Zynk Software</name>
<short_name>Zynk Sof</short_name>
<balance>0.00</balance>
<on_hold>false</on_hold>
<currency_id>1</currency_id>
<exchange_rate_type>ExchangeRateSingle</exchange_rate_type>
<telephone_country_code />
<telephone_area_code />
<telephone_subscriber_number />
<fax_country_code />
<fax_area_code />
<fax_subscriber_number />
<website />
<credit_limit>0.00</credit_limit>
<country_code_id>13</country_code_id>
<default_tax_code_id>2</default_tax_code_id>
<vat_number />
<analysis_code_1 />
<analysis_code_2 />
<analysis_code_3 />
<analysis_code_4 />
<analysis_code_5 />
</supplier>
Example XML
Purchase Payment
<PurchaseTransactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PurchaseTransaction>
<id>17351</id>
<date_time_updated>2016-05-17T14:28:25.213</date_time_updated>
<trader_transaction_type>TradingAccountEntryTypePurchasePaymentSalesReceipt</trader_transaction_type>
<reference>789</reference>
<second_reference>321</second_reference>
<queried />
<transaction_date>2016-05-17T00:00:00</transaction_date>
<posted_date>2016-05-17T00:00:00</posted_date>
<due_date>2016-05-17T00:00:00</due_date>
<document_goods_value>-240.00</document_goods_value>
<document_gross_value>-240.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>-240.00</document_allocated_value>
<document_outstanding_value>0.00</document_outstanding_value>
<base_goods_value>-240.0</base_goods_value>
<base_gross_value>-240.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>-240.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>3</urn>
<user_name>Demo Site</user_name>
<tax_analysis_items />
<nominal_analysis_items>
<nominal_analysis_item>
<code />
<cost_centre />
<department />
<narrative>PP / ZYN001</narrative>
<value>-240.00</value>
</nominal_analysis_item>
<nominal_analysis_item>
<code />
<cost_centre />
<department />
<narrative>PP / ZYN001</narrative>
<value>240.00</value>
</nominal_analysis_item>
</nominal_analysis_items>
<bank_items>
<bank_item>
<bank_code>DEFAULT</bank_code>
<name>Default</name>
<bank_entry_type>Payment</bank_entry_type>
<reference>789</reference>
<cheque_value>-240.00</cheque_value>
<statement_date xsi:nil="true" />
<statement_page_number xsi:nil="true" />
<urn>3</urn>
</bank_item>
</bank_items>
<allocation_session_items>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerPurchase</ledger_type>
<urn>3</urn>
<allocation_date>2016-05-17T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypePurchasePaymentSalesReceipt</trader_transaction_type>
<reference>789</reference>
<value>-240.00</value>
<allocation_value>-240.00</allocation_value>
</allocation_session_item>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerPOP</ledger_type>
<urn>2</urn>
<allocation_date>2016-05-17T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type>
<reference>123</reference>
<value>240.00</value>
<allocation_value>240.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>-240.00</allocation_value>
</allocation_history_item>
</allocation_history_items>
<supplier_id>15326</supplier_id>
<supplier>
<id>15326</id>
<date_time_updated>2016-05-17T14:27:58.18</date_time_updated>
<reference>ZYN001</reference>
<name>Zynk Software</name>
<short_name>Zynk Sof</short_name>
<balance>0.00</balance>
<on_hold>false</on_hold>
<currency_id>1</currency_id>
<exchange_rate_type>ExchangeRateSingle</exchange_rate_type>
<telephone_country_code />
<telephone_area_code />
<telephone_subscriber_number />
<fax_country_code />
<fax_area_code />
<fax_subscriber_number />
<website />
<credit_limit>0.00</credit_limit>
<country_code_id>13</country_code_id>
<default_tax_code_id>2</default_tax_code_id>
<vat_number />
<analysis_code_1 />
<analysis_code_2 />
<analysis_code_3 />
<analysis_code_4 />
<analysis_code_5 />
</supplier>
<vat_adjustment_doc_expected>false</vat_adjustment_doc_expected>
</PurchaseTransaction>
</PurchaseTransaction>
</PurchaseTransactions>
Purchase Invoice
<PurchaseTransactions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<PurchaseTransaction>
<id>17277</id>
<date_time_updated>2016-05-17T14:28:25.227</date_time_updated>
<trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type>
<reference>123</reference>
<second_reference>456</second_reference>
<queried />
<transaction_date>2016-05-17T00:00:00</transaction_date>
<posted_date>2016-05-17T00:00:00</posted_date>
<due_date>2016-06-16T00:00:00</due_date>
<document_goods_value>200.00</document_goods_value>
<document_gross_value>240.00</document_gross_value>
<document_tax_value>40.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>240.00</document_allocated_value>
<document_outstanding_value>0.00</document_outstanding_value>
<base_goods_value>200.0</base_goods_value>
<base_gross_value>240.0</base_gross_value>
<base_tax_value>40.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>240.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>2</urn>
<user_name>Demo Site</user_name>
<tax_analysis_items>
<tax_analysis_item>
<id>2</id>
<goods_amount>200.00</goods_amount>
<discount_amount xsi:nil="true" />
<tax_amount>40.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>PI / ZYN001</narrative>
<value>40.00</value>
</nominal_analysis_item>
<nominal_analysis_item>
<code />
<cost_centre />
<department />
<narrative>PI / ZYN001</narrative>
<value>-240.00</value>
</nominal_analysis_item>
<nominal_analysis_item>
<code>4000</code>
<cost_centre />
<department />
<narrative>PI / ZYN001</narrative>
<value>200.00</value>
</nominal_analysis_item>
</nominal_analysis_items>
<bank_items />
<allocation_session_items>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerPurchase</ledger_type>
<urn>3</urn>
<allocation_date>2016-05-17T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypePurchasePaymentSalesReceipt</trader_transaction_type>
<reference>789</reference>
<value>-240.00</value>
<allocation_value>-240.00</allocation_value>
</allocation_session_item>
<allocation_session_item>
<user_name>Demo Site</user_name>
<ledger_type>LedgerPOP</ledger_type>
<urn>2</urn>
<allocation_date>2016-05-17T00:00:00</allocation_date>
<trader_transaction_type>TradingAccountEntryTypeInvoice</trader_transaction_type>
<reference>123</reference>
<value>240.00</value>
<allocation_value>240.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>240.00</allocation_value>
</allocation_history_item>
</allocation_history_items>
<supplier_id>15326</supplier_id>
<supplier>
<id>15326</id>
<date_time_updated>2016-05-17T14:27:58.18</date_time_updated>
<reference>ZYN001</reference>
<name>Zynk Software</name>
<short_name>Zynk Sof</short_name>
<balance>0.00</balance>
<on_hold>false</on_hold>
<currency_id>1</currency_id>
<exchange_rate_type>ExchangeRateSingle</exchange_rate_type>
<telephone_country_code />
<telephone_area_code />
<telephone_subscriber_number />
<fax_country_code />
<fax_area_code />
<fax_subscriber_number />
<website />
<credit_limit>0.00</credit_limit>
<country_code_id>13</country_code_id>
<default_tax_code_id>2</default_tax_code_id>
<vat_number />
<analysis_code_1 />
<analysis_code_2 />
<analysis_code_3 />
<analysis_code_4 />
<analysis_code_5 />
</supplier>
<vat_adjustment_doc_expected>false</vat_adjustment_doc_expected>
</PurchaseTransaction>
</PurchaseTransactions>