Skip to content

Sage 200 Online Purchase Order Line XML

All purchase orders contain 'line items' that define what an order consists of (e.g. items on an order). If the contents of an order are modified by adding/updating/deleting order lines, this will affect the overall value of the order. Further information can be found on the Sage 200 Online Purchase Order Line API Documentation.

Tasks

Zynk does not currently support downloading or uploading purchase order lines directly, but can be used within Sage 200 Online Purchase Order XML as part of the export and import of purchase order records.

Fields for Download and Upload

line_number

Required
The line number.

Type Example XML
integer(int16) 1 <line_number>1</line_number>

line_type

Required
The purchase order line type.

Type Example XML
string(20) EnumLineTypeStandard <line_type>EnumLineTypeStandard</line_type>

Available Values

  • EnumLineTypeStandard
  • EnumLineTypeFreeText
  • EnumLineTypeCharge
  • EnumLineTypeComment

code

Dependant
The stock item code. In case of an additional charge, this can only be set for lines of type EnumLineTypeCharge and is required if description is not specified.

Type Example XML
string(30) CAR001 <code>CAR001</code>

description

Dependant
The item description. This could be stock item description, free text, additional charge or comment. Required for lines of type EnumLineTypeFreeText and is required for lines of type EnumLineTypeCharge if code is not specified.

Type Example XML
string(6000) Shipping Charges <description>Shipping Charges</description>

supplier_part_ref

Dependant
The supplier's part reference.

Type Example XML
string(60) FDV-411 <supplier_part_ref>FDV-411</supplier_part_ref>

for_direct_delivery

Dependant
Specifies if line is flagged for direct delivery

Type Example XML
boolean() false <for_direct_delivery>false</for_direct_delivery>

show_on_supplier_docs

Optional
Specifies if line will show on Supplier documents.

Type Example XML
boolean true <show_on_supplier_docs>true</show_on_supplier_docs>

confirmation_intent_type

Optional
The type of confirmation intent associated with the line.

Type Example XML
enum ConfirmOnDespatch <confirmation_intent_type>ConfirmOnDespatch</confirmation_intent_type>

Available Values

  • ConfirmOnDespatch
  • Confirm
  • NoConfirmation

tax_code_id

Dependant (see tax_code)
Tax code Id, can also be set using tax code, see tax_code.

Type Example XML
integer(int64) 2 <tax_code_id>2</tax_code_id>

line_quantity

Optional
Item quantity. Note: Decimals cannot be used as quantity values for traceable items that use serial numbers. These will be rounded up/down at the time of posting via the API.

Type Example XML
number(decimal 5dp) 1 <line_quantity>1</line_quantity>

buying_unit_description

Optional
Buying unit description.

Type Example XML
string(20) Each <buying_unit_description>Each</buying_unit_description>

unit_buying_price

Optional
Unit buying price.

Type Example XML
number(decimal 5dp) 10.0 <unit_buying_price>10.0</unit_buying_price>

unit_discount_percent

Optional
Unit discount percent. Note if unit_discount_value is provided as well, this value will be adjusted accordingly.

Type Example XML
number(decimal 2dp) 10.0 <unit_discount_percent>10.0</unit_discount_percent>

unit_discount_value

Optional
Unit discount value. Note if unit_discount_percent is provided as well, this value will be used and the percentage will be adjusted accordingly.

Type Example XML
number(decimal 5dp) 5.0 <unit_discount_value>5.0</unit_discount_value>

Analysis Codes

Optional
Analysis codes are only supported on POP Orders from version 2016.sp3 (12/09/2017). They are numbered from 1 to 5 (or 1 to 20 if you are using Sage 200 Professional), and can be specified in the XML using <analysis_code_X>, where X is the analysis code number.

Type Example XML
string(60) North <analysis_code_1>North</analysis_code_1>

product_id

Dependant (see product)
Product record Id, can also be set using product code, see product.

Type Example XML
integer(int64) 27256 <product_id>27256</product_id>

warehouse_id

Dependant (see warehouse)
Warehouse record Id, can also be set using warehouse name, see warehouse.

Type Example XML
integer(int64) 34821 <warehouse_id>34821</warehouse_id>

Fields for Download Only

id

Read Only
Purchase order line record Id.

Type Example XML
integer(int64) 27767 <id>27767</id>

pop_order_id

Read Only
Purchase order record Id.

Type Example XML
integer(int64) 28006 <pop_order_id>28006</pop_order_id>

receipt_return_quantity

Read Only
Receipt quantity.

Type Example XML
number(decimal 5dp) 0.0 <receipt_return_quantity>0.0</receipt_return_quantity>

invoice_credit_quantity

Read Only
Invoiced quantity.

Type Example XML
number(decimal 5dp) 0.0 <invoice_credit_quantity>0.0</invoice_credit_quantity>

line_total_value

Read Only
The total value of the line.

Type Example XML
number(decimal 2dp) 5.0 <line_total_value>5.0</line_total_value>

line_tax_value

Read Only
The tax value of the line.

Type Example XML
number(decimal 2dp) 1.0 <line_tax_value>1.0</line_tax_value>

date_time_created

Read Only
The date and time this entity was created (UTC).

Type Example XML
datetime 2017-06-05T15:24:29.44 <date_time_created>2017-06-05T15:24:29.44</date_time_created>

date_time_updated

Read Only
The date and time this entity was last updated (UTC).

Type Example XML
datetime 2017-06-05T16:27:25.623 <date_time_updated>2017-06-05T16:27:25.623</date_time_updated>

Expandable Fields

Related information linked to purchase order lines are also included in the exported XML, these can also be used to set certain fields on purchase order imports using lookups rather than needing to know the internal id of the related record.

Product

Dependant (see product_id)
The purchase order lines product code. On an import you can set the code of the product to use for the purchase order line and Zynk will lookup the correct internal id from Sage.

Import example only setting the code

<product>
    <code>BOARD001</code>
</product>

Tax Code

Dependant (see tax_code_id)
The purchase order lines tax code. On an import you can set the code of the tax code to use for the purchase order line and Zynk will lookup the correct internal id from Sage.

Import example only setting the code

<tax_code>
    <code>1</code>
</tax_code>

Warehouse

Dependant (see warehouse_id)
The purchase order lines warehouse name. On an import you can set the name of the warehouse to use for the purchase order line and Zynk will lookup the correct internal id from Sage.

Import example only setting the name

<warehouse>
    <name>HOME</name>
</warehouse>