Menu

Product Record

XML API for Sage 50 Product Record

The PostTrans XML API for Sage 50 provides to ability to update, or create Product Record details in Sage 50, from a simple to understand XML file, which can be combined to update Product details before importing and Sales Order, Invoice, Credit, Product Adjustment etc.

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 Product details and override settings which can also be set in XML_API_mappings.xml (“View >> Mapping Settings” menu)

Click here for an overview of the XML API for Sage 50

List of Examples

 

Example - 80 Product.xml

<?xml version="1.0" ?>
<sage50Data>

   <settings>  <!-- Optional overide settings/mappings -->
      <companyCode>DEMO01</companyCode>
      <mappings>
         mappingReset // Clear all settings 50_XML_API_mappings.xml
         
      </mappings>
   </settings>
   
   <!-- see https://www.posttrans.co.uk/XML-API/XML-API-for-Sage-50/Product-Record -->
     <Product>  
         <PrCode>TEST03</PrCode>
         <PrDesc>Test product</PrDesc>
         <PrCategory>1</PrCategory>          <!--  Must be valid 1-999 -->
         <PrCountryOrigin>GB</PrCountryOrigin>
         <PrLocation>Under the shelf</PrLocation>
         <PrSalesNom>4000</PrSalesNom>       <!--  Must be valid -->
         <PrPurchaseNom>5000</PrPurchaseNom> <!--  Must be valid -->
         <PrTaxCode>1</PrTaxCode>  <!-- Sage 50 0=0%,1=Standard Rate, etc.-->
         
         <PrPartNo>2636fjje</PrPartNo>     <!-- Supplier Part NO -->
         <PrSuppAccount>NEW001</PrSuppAccount>   <!-- Supplier account code -->
         
         <PrDept>1</PrDept>  <!--  Must be valid 1-99 -->
         
         <PrSalesPrice>100</PrSalesPrice>   <!-- Normal Sales Price -->
         <PrLastCost>50</PrLastCost>
         <PrLastCostDisc>48</PrLastCostDisc>
   
         <PrCust1>User 1</PrCust1>   
         <PrCust2>User 2</PrCust2>  
         <PrCust3>User 3</PrCust3> 
         
     </Product>
</sage50Data>

XML API Tags for Sage 50 'Product Record'

Tag Name

Data Type

Description

PrCode

Text 30

Stock Code

PrType^

Text 1

Item Type
        In Cell Searching values:Stock Type
                  0, Stock
                  1, NonStock
                  2, Service

PrDesc

Text 60

Description (120 chars in 2023 onwards)

PrCategory^

Integer

Stock Category Number
    In Cell Searching values in table ProdCatCode

Product Details:

PrCountryOrigin^

Text 2

Country code of origin. Irish data sets only.
    Sage V21 2015 onwards
    In Cell Searching values in table CountryCode

PrComCodeDesc

Text 30

Com. Code Description
    Sage V21 2015 onwards

PrIntrastatComCode

Text 8

Intrastat Commodity Code
    Sage V20 2014 onwards

PrIntrastatImportDutyCode

Text 8

Intrastat Import Duty code
    Sage V20 2014 onwards

PrSuppUnitQty

Double

Supplementary Unit Quantity
    Sage V20 2014 onwards

PrWeight

Double

Unit of Weight

PrBarCode

Text 60

BarCode

PrInactive

Yes/No-

Inactive Flag - yes/No
    Sage V21 2015 onwards

PrLocation

Text 16

Location

Defaults:

PrSalesNom^

Text 8

Nominal Code
    In Cell Searching values in table NomCode

PrTaxCode^

Integer

Tax Code (0 to 99)
    In Cell Searching values in table TaxCode

PrPurchaseNom^

Text 8

Purchase Nominal Code
    In Cell Searching values in table NomCode

PrPartNo

Text 16

Supplier`s Part Number

PrSuppAccount^

Text 8

Supplier`s Account Reference
    In Cell Searching values in table SupplierCode

PrDept^

Integer

Department No
    In Cell Searching values in table DeptCode

PrLastPurPrice

Currency

Last Purchase Price

PrLastCostDisc

Currency

Last Cost Discounted Price

PrLastCost

Currency

Last Cost Price

Sales Price:

PrSalesPrice

Currency

Sale Price

PrUnitOfSale

Text 8

Unit of Sale

Web:

PrWebDescription

Text 60

Web Description

PrWebLongDesc

Text 1023

Web Long Description

PrWebPublish

Yes/No-

Web Publish Flag

PrWebSpecialOffer

Yes/No-

Web Special Offer

PrWebImage

Text 60

Web Image Filename of the image which should be copied to the \ACCDATA\IMAGES sub folder of your data

Custom Fields:

PrCust1

Text 60

Custom Field 1

PrCust2

Text 60

Custom Field 2

PrCust3

Text 60

Custom Field 3

Memo:

PrMemo

Memo

Stock Record Memo


Req = Field is required    EOF = End of file, Stop when no more values    

With data type Yes/No fields, if cell starts with 'y' or 'Y' is taken as TRUE

Where ^ denotes a In Cell Code Search, delete ^ at end of tag, to turn off code search

All Text fields are trimmed (spaces before) by default. Add ' to the end of the tag name to stop this.