Sage 200 Online Sales Receipt XML
Receipts are used to record a sales receipt against a particular customer's account. Uploading a sales receipt will create a posted transaction, to download receipts see Sage 200 Online Sales Transaction XML format. Further information can be found on the Sage 200 Online Sales Receipts API Documentation.
Tasks
Identifiers
external_id
Optional (recommended)
To prevent duplicates sales receipts being imported into Sage 200 we would recommend to always set the external_id field to a unique id from the source system. When the field is provided it will be stored within Zynk's internal database along with the URN assigned by Sage 200.
Type | Example | XML |
---|---|---|
string(255) | 12345 | <external_id>12345</external_id> |
Fields for Download and Upload
customer_id
Dependant (see customer)
Customer record Id, can also be set using customer reference, see customer.
Type | Example | XML |
---|---|---|
integer(int64) | 27006 | <customer_id>27006</customer_id> |
bank_id
Dependant (see bank)
Bank record Id, can also be set using bank code, see bank.
Type | Example | XML |
---|---|---|
integer(int64) | 1 | <bank_id>1</bank_id> |
cheque_value
Required
Value of the receipt.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 120 | <cheque_value>120</cheque_value> |
cheque_currency_id
Optional (see cheque_currency)
Receipt currency record Id, can also be set using cheque currency code, see cheque_currency.
Type | Example | XML |
---|---|---|
integer(int64) | 1 | <cheque_currency_id>1</cheque_currency_id> |
customer_cheque_value
Optional
Value to post to the customer account
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 120 | <customer_cheque_value>120</customer_cheque_value> |
transaction_date
Optional
Transaction date.
Type | Example | XML |
---|---|---|
datetime | 2017-06-02T00:00:00 | <transaction_date>2017-06-02T00:00:00</transaction_date> |
exchange_rate
Optional
Exchange rate for the receipt.
Type | Example | XML |
---|---|---|
number(decimal 6dp) | 1.000000 | <exchange_rate>1.000000</exchange_rate> |
settlement_discount_value
Optional
Settlement discount value.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 0 | <settlement_discount_value>0</settlement_discount_value> |
reference
Optional
Receipt reference.
Type | Example | XML |
---|---|---|
string(20) | Web Sales | <reference>Web Sales</reference> |
second_reference
Optional
Receipt second reference.
Type | Example | XML |
---|---|---|
string(20) | Order #12345 | <second_reference>Order #12345</second_reference> |
nominal_analysis_items
Optional
Nominal analysis lines. The <nominal_analysis_items>
node is a collection of <nominal_analysis_item>
nodes that allow you analyse the value of the sales receipt to specific nominal codes. See full example XML below.
code
Required
Nominal account code.
Type | Example | XML |
---|---|---|
string(8) | 4000 | <code>4000</code> |
cost_centre
Optional
Cost centre. If specified must correspond to the code.
Type | Example | XML |
---|---|---|
string(3) | 020 | <cost_centre>020</cost_centre> |
department
Optional
Department. If specified must correspond to the code.
Type | Example | XML |
---|---|---|
string(3) | SAL | <department>SAL</department> |
value
Optional
Value to post to the nominal account.
Type | Example | XML |
---|---|---|
number(decimal 2dp) | 120 | <value>120</value> |
Expandable Fields
Related information linked to sales receipts are also included in the downloaded XML, these can also be used to set certain fields on sales receipt uploads using lookups rather than needing to know the internal id of the related record.
customer
Dependant (see customer_id)
The sales receipts customer. On an upload you can set the reference of the customer to use for the sales receipt and Zynk will lookup the correct internal id from Sage.
Upload example using the reference
<customer>
<reference>ZYNK001</reference>
</customer>
bank
Dependant (see bank_id)
The sales receipts bank. On an upload you can set the code of the bank to use for the sales receipt and Zynk will lookup the correct internal id from Sage.
Upload example using the code
<bank>
<code>DEFAULT</code>
</bank>
cheque_currency
Optional (see cheque_currency_id)
The cheque currency of the receipt. On an upload you can set the code of the currency to use for the sales receipt and Zynk will lookup the correct internal id from Sage.
Upload example using the code
<cheque_currency>
<code>GBP</code>
</cheque_currency>
Example XML
Minimal Example
<?xml version="1.0" encoding="utf-8"?>
<SalesReceipts
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SalesReceipt>
<cheque_value>120</cheque_value>
<bank>
<code>DEFAULT</code>
</bank>
<customer>
<reference>ZYNK001</reference>
</customer>
</SalesReceipt>
</SalesReceipts>
Full Example
<?xml version="1.0" encoding="utf-8"?>
<SalesReceipts
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SalesReceipt>
<external_id>12345</external_id>
<customer_id>27006</customer_id>
<cheque_value>120</cheque_value>
<cheque_currency_id>1</cheque_currency_id>
<customer_cheque_value>120</customer_cheque_value>
<transaction_date>2017-06-02T00:00:00</transaction_date>
<exchange_rate>1.000000</exchange_rate>
<settlement_discount_value>0</settlement_discount_value>
<reference>Web Sales</reference>
<second_reference>Order #12345</second_reference>
<bank>
<code>DEFAULT</code>
</bank>
<customer>
<reference>ZYNK001</reference>
</customer>
<cheque_currency>
<code>GBP</code>
</cheque_currency>
<nominal_analysis_items>
<nominal_analysis_item>
<code>4000</code>
<cost_centre>020</cost_centre>
<department>SAL</department>
<value>120</value>
</nominal_analysis_item>
</nominal_analysis_items>
</SalesReceipt>
</SalesReceipts>