The PostTrans XML API for Sage 50 provides to ability to update, or create Customer details in Sage 50 , from a simple to understand XML file, which can be combined to update account details before importing and Sales Order, Invoice, Credit etc. See Transaction examples.
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 or update Customer details and override settings which can also be set in XML_API_mappings.xml (“View >> Mapping Settings” menu) more info
List of Tags/Entities for mapping are at bottom of page.
Click here for an overview of the XML API for Sage 50
Example - 50 Simple Supplier Account update.xml
<?xml version="1.0" ?>
<sage50Data>
<settings> <!-- Optional overide settings/mappings -->
<companyCode>DEMO01</companyCode>
<mappings>
mappingReset // Clear all settings 50_XML_API_mappings.xml
CuCreditLimit,onlyOnCreate //Do not set if account already exisits
CuTaxCode,onlyOnCreate
CuCurrency,onlyOnCreate
cuDateOpened,onlyOnCreate
</mappings>
</settings>
<Supplier>
<SuCode>TEST03</SuCode>
<SuName>Comtek Accounts</SuName>
<SuAdd1>Venture House</SuAdd1>
<SuAdd2>Venture Court</SuAdd2>
<SuAdd3>Bolness Rd.</SuAdd3>
<SuAdd4>Wisbech</SuAdd4>
<SuPostcode>PE13 2QL</SuPostcode>
<SuContactName>Mr Sam Smith</SuContactName> <!-- Contact can only be updated on creation -->
<SuPhone>+44 945 463523</SuPhone>
<Sue-mail1>ss@ss.com</Sue-mail1>
<SuCreditLimit>1000</SuCreditLimit>
<SuCurrency>1</SuCurrency> <!-- 1,GBP,2,USD -->
<SuTaxCode>1</SuTaxCode> <!-- Sage 50 0=0%,1=Standard Rate, etc.-->
<SuVATRegNo>612 5749 32</SuVATRegNo>
<SuDateOpened>2020-02-20</SuDateOpened>
<SuTermsAgreed>True</SuTermsAgreed>
<SuSettDays>30</SuSettDays> <!-- 30 Days payment term -->
<SuAnal1>Midlands</SuAnal1>
<SuAnal2>CVR Coverings</SuAnal2>
<SuAnal3>B</SuAnal3>
</Supplier>
</sage50Data>
Results in new or updated Sage 50 Supplier:
