XML API for Sage 50 Product Movement/Adjustment
The PostTrans XML API for Sage 50 provides to ability to create Product Movement/Adjustment Transactions in Sage 50, from a simple to understand XML file.
The following XML file if submitted to import directory or IMAP e-mail account. At the top of the XML file, we can optionally set the Sage 50 Company for the Sage 50 API to import the Project Movement/Adjustment Transaction.
List of Tags/Entities for mapping are at bottom of page.
Click here for an overview of the XML API for Sage 50
List of Examples
Example – 200 Product Movement AI.xml
Example of Adjustment IN of Products in Sage 50
<?xml version="1.0" ?>
<sage50Data>
<!-- see https://www.posttrans.co.uk/XML-API/XML-API-for-Sage-50/Product-Adjustment -->
<settings> <!-- Optional overide settings/mappings -->
<companyCode>DEMO01</companyCode>
<mappings>
mappingReset // Clear all settings XML_API_mappings.xml
</mappings>
</settings>
<MoveHeader>
<THAdjType>AI</THAdjType>
<!-- Stock Adjustment Type,AI,Adjustment In ,AO,Adjustment Out,MI,Movement In,MO,Movement Out,
GI,Goods IN,GO,Goods Out,GR,Goods Returned,DI,Damages In,DO,Damages Out,WO,Write Off -->
<THTranRef>WOP 2516</THTranRef> <!-- Movement Referance -->
<THTransDate>2021-02-20</THTransDate>
<MoveLine>
<TLProduct>KEY001</TLProduct>
<TLDetails>3 moved in for manufacture APP</TLDetails>
<TLQty>3</TLQty>
<TLCostPrice>250</TLCostPrice> <!-- Optional, else will lookup value -->
</MoveLine>
<MoveLine>
<TLProduct>CAS001</TLProduct>
<!-- Product Description will be looked up -->
<TLQty>3</TLQty>
</MoveLine>
</MoveHeader>
</sage50Data>
Example – 201 Product Movement AO.xml
Example of Adjustment OUT of Products in Sage 50
<?xml version="1.0" ?>
<sage50Data>
<!-- see https://www.posttrans.co.uk/XML-API/XML-API-for-Sage-50/Product-Adjustment -->
<settings> <!-- Optional overide settings/mappings -->
<companyCode>DEMO01</companyCode>
<mappings>
mappingReset // Clear all settings XML_API_mappings.xml
</mappings>
</settings>
<MoveHeader>
<THAdjType>AO</THAdjType>
<!-- Stock Adjustment Type,AI,Adjustment In ,AO,Adjustment Out,MI,Movement In,MO,Movement Out,
GI,Goods IN,GO,Goods Out,GR,Goods Returned,DI,Damages In,DO,Damages Out,WO,Write Off -->
<THTranRef>WOP 2516</THTranRef> <!-- Movement Referance -->
<THTransDate>2021-02-20</THTransDate>
<MoveLine>
<TLProduct>ENV002</TLProduct>
<TLDetails>Build WOP 2516</TLDetails>
<TLQty>1</TLQty>
</MoveLine>
<MoveLine>
<TLProduct>ENV003</TLProduct>
<TLDetails>Build WOP 2516</TLDetails>
<TLQty>2</TLQty>
</MoveLine>
</MoveHeader>
</sage50Data>
Example – 205 Product Movement WO.xml
Example of Write Off Products in Sage 50
<?xml version="1.0" ?>
<sage50Data>
<!-- see https://www.posttrans.co.uk/XML-API/XML-API-for-Sage-50/Product-Adjustment -->
<settings> <!-- Optional overide settings/mappings -->
<companyCode>DEMO01</companyCode>
<mappings>
mappingReset // Clear all settings XML_API_mappings.xml
</mappings>
</settings>
<MoveHeader>
<THAdjType>WO</THAdjType>
<!-- Stock Adjustment Type,AI,Adjustment In ,AO,Adjustment Out,MI,Movement In,MO,Movement Out,
GI,Goods IN,GO,Goods Out,GR,Goods Returned,DI,Damages In,DO,Damages Out,WO,Write Off -->
<THTranRef>Stock Take</THTranRef> <!-- Movement Referance -->
<THTransDate>2021-02-20</THTransDate>
<MoveLine>
<TLProduct>ENV002</TLProduct>
<TLDetails>Broken</TLDetails>
<TLQty>1</TLQty>
</MoveLine>
</MoveHeader>
</sage50Data>
Example – 210 Product Movement GO.xml
Example of Goods Out Movement, relating to a Sales Order or Invoice, in Sage 50
<?xml version="1.0" ?>
<sage50Data>
<!-- see https://www.posttrans.co.uk/XML-API/XML-API-for-Sage-50/Product-Adjustment -->
<settings> <!-- Optional overide settings/mappings -->
<companyCode>DEMO01</companyCode>
<mappings>
mappingReset // Clear all settings XML_API_mappings.xml
</mappings>
</settings>
<MoveHeader>
<THAdjType>GO</THAdjType>
<!-- Stock Adjustment Type,AI,Adjustment In ,AO,Adjustment Out,MI,Movement In,MO,Movement Out,
GI,Goods IN,GO,Goods Out,GR,Goods Returned,DI,Damages In,DO,Damages Out,WO,Write Off -->
<THTranRef>TEST02</THTranRef> <!-- Movement Referance -->
<THTransDate>2017-02-20</THTransDate>
<MoveLine>
<!-- Sage 50 Product Line -->
<TLProduct>KEY001</TLProduct>
<TLDetails>3 moved in for manufacture APP</TLDetails>
<TLQty>3</TLQty>
<TLCostPrice>250</TLCostPrice>
<!-- GI/GO should relateto a PO/SO transaction -->
<TLTransRef>31</TLTransRef> <!-- Ref to SO31 -->
<TLTransRefType>2</TLTransRefType> <!-- Related to 1,Invoice,2,SOP,3,POP -->
</MoveLine>
</MoveHeader>
</sage50Data>
Example – 211 Product Movement GI.xml
Example of Goods In Movement, relating to a Purchase Order, in Sage 50
<?xml version="1.0" ?>
<sage50Data>
<!-- see https://www.posttrans.co.uk/XML-API/XML-API-for-Sage-50/Product-Adjustment -->
<settings> <!-- Optional overide settings/mappings -->
<companyCode>DEMO01</companyCode>
<mappings>
mappingReset // Clear all settings XML_API_mappings.xml
</mappings>
</settings>
<MoveHeader>
<THAdjType>GI</THAdjType>
<!-- Stock Adjustment Type,AI,Adjustment In ,AO,Adjustment Out,MI,Movement In,MO,Movement Out,
GI,Goods IN,GO,Goods Out,GR,Goods Returned,DI,Damages In,DO,Damages Out,WO,Write Off -->
<THTranRef>Stock Take</THTranRef> <!-- Movement Referance -->
<THTransDate>2021-02-20</THTransDate>
<MoveLine>
<TLProduct>ENV002</TLProduct>
<TLDetails>Delivery </TLDetails>
<TLQty>1</TLQty>
<!-- GI/GO should relateto a PO/SO transaction -->
<TLTransRef>31</TLTransRef> <!-- Ref to PO31 -->
<TLTransRefType>3</TLTransRefType> <!-- Related to 1,Invoice,2,SOP,3,POP -->
</MoveLine>
</MoveHeader>
</sage50Data>