Home > Materials > Advanced Topics > Import Export Data > Empower API > Using the API To Retrieve Data > Suppliers
Suppliers
Supplier related information can be retrieved through the API using the following function calls
1. GetSupplierDetails(SupplierName As String)
This function takes a single argument of data type String and returns the SupplierData if it exists.
As a result the request body should be based on the following
<soapenv:Body>
<web:GetSupplierDetails>
<web:SupplierName>SUPPLIER NAME</web:SupplierName>
</web:GetSupplierDetails>
</soapenv:Body>
Response XML Format,
<soap:Body>
<GetSupplierDetailsResponse xmlns="http://empowersoftware.co.nz/WebService">
<GetSupplierDetailsResult>
<SupplierName>SUPPLIER NAME</SupplierName>
<ContactFirstName>CONTACT FIRST NAME</ContactFirstName>
<ContactLastName>CONTACT LAST NAME</ContactLastName>
<ContactTitle>CONTACT TITLE</ContactTitle>
<ContactPosition>CONTACT POSITION</ContactPosition>
<SupplierAddress1>SUPPLIER ADDRESS LINE 1</SupplierAddress1>
<SupplierAddress2>SUPPLIER ADDRESS LINE 2</SupplierAddress2>
<SupplierAddress3>SUPPLIER ADDRESS LINE 3</SupplierAddress3>
<SupplierPhone>SUPPLIER PHONE</SupplierPhone>
<SupplierEmail>SUPPLIER EMAIL</SupplierEmail>
<SupplierFax>SUPPLIER FAX</SupplierFax>
<SupplierStatus>SUPPLIER STATUS</SupplierStatus>
<SupplierWebsite>SUPPLIER WEBSITE</SupplierWebsite>
<SupplierNotes>SUPPLIER NOTES</SupplierNotes>
<SupplierPrefferedNumber>SUPPLIER PREFERRED NUMBER</SupplierPrefferedNumber>
<SupplierOrderMode>SUPPLIER ORDER MODE</SupplierOrderMode>
<SupplierAccountNo>SUPPLIER ACCOUNT NUMBER</SupplierAccountNo>
</GetSupplierDetailsResult>
</GetSupplierDetailsResponse>
</soap:Body>
2. Get Materials for a Supplier
Materials for a Supplier can be retrieved through the API using the function call
GetMaterialSupplierDetails(SupplierName As String)
As a result the request body should be based on the following
<soapenv:Body>
<web:GetMaterialSupplierDetails>
<web:supplierName>SUPPLIER NAME</web:supplierName>
</web:GetMaterialSupplierDetails>
</soapenv:Body>
Response XML Format,
<soap:Body>
<GetMaterialSupplierDetailsResponse xmlns="http://empowersoftware.co.nz/WebService">
<GetMaterialSupplierDetailsResult>
<SupplierName>SUPPLIER NAME</SupplierName>
<ContactFirstName>CONTACT FIRST NAME</ContactFirstName>
<ContactLastName>CONTACT LAST NAME</ContactLastName>
<ContactTitle>CONTACT TITLE</ContactTitle>
<ContactPosition>CONTACT POSITION</ContactPosition>
<SupplierAddress1>SUPPLIER ADDRESS LINE 1</SupplierAddress1>
<SupplierAddress2>SUPPLIER ADDRESS LINE 2</SupplierAddress2>
<SupplierAddress3>SUPPLIER ADDRESS LINE 3</SupplierAddress3>
<SupplierPhone>SUPPLIER PHONE</SupplierPhone>
<SupplierEmail>SUPPLIER EMAIL</SupplierEmail>
<SupplierFax>SUPPLIER FAX</SupplierFax>
<SupplierStatus>SUPPLIER STATUS</SupplierStatus>
<SupplierWebsite>SUPPLIER WEBSITE</SupplierWebsite>
<SupplierNotes>SUPPLIER NOTES</SupplierNotes>
<SupplierPrefferedNumber>SUPPLIER PREFERRED NUMBER</SupplierPrefferedNumber>
<SupplierOrderMode>SUPPLIER ORDER MODE</SupplierOrderMode>
<SupplierAccountNo>SUPPLIER ACCOUNT NUMBER</SupplierAccountNo>
<MatSuppliers>
<!--Zero or more repetitions:-->
<MaterialSupplierData>
<MaterialName>MATERIAL NAME</MaterialName>
<MaterialCost>MATERIAL COST</MaterialCost>
<UtilizationPercentage>UTILIZATION PERC</UtilizationPercentage>
<MarkupPercentage>MARKUP PERC</MarkupPercentage>
<MinimumOrderSize>MINIMUM ORDER QUANTITY</MinimumOrderSize>
</MaterialSupplierData>
</MatSuppliers>
</GetMaterialSupplierDetailsResult>
</GetMaterialSupplierDetailsResponse>
</soap:Body>
3. Get Material Stock for a Material and Supplier
Stock information for a particular Material for a particular Supplier can be retrieved through the API using the function call
GetStockForMaterialForSupplier(SupplierName As String, MaterialName as String)
As a result the request body should be based on the following
<soapenv:Body>
<web:GetStockForMaterialForSupplier>
<!--Optional:-->
<web:supplierName>SUPPLIER NAME</web:supplierName>
<!--Optional:-->
<web:materialName>MATERIAL NAME</web:materialName>
</web:GetStockForMaterialForSupplier>
</soapenv:Body>
Response XML Format,
<soap:Body>
<GetStockForMaterialForSupplierResponse xmlns="http://empowersoftware.co.nz/WebService">
<GetStockForMaterialForSupplierResult>
<MaterialName>MATERIAL NAME</MaterialName>
<SupplierName>SUPPLIER NAME</SupplierName>
<MaterialCost>MATERIAL COST</MaterialCost>
<MaterialQtyInStock>MATERIAL QUANTITY IN STOCK</MaterialQtyInStock>
<MaterialQtyOnOrder>MATERIAL QUANTITY ON ORDER</MaterialQtyOnOrder>
<MaterialMinQtyLevel>MATERIAL MIN QTY LEVEL</MaterialMinQtyLevel>
<MaterialUnitOfMeasure>MATERIAL UNIT MEASURE</MaterialUnitOfMeasure>
</GetStockForMaterialForSupplierResult>
</GetStockForMaterialForSupplierResponse>
</soap:Body>
The following data types are used
SupplierData
SupplierName as String (mandatory)
ContactFirstName As String(mandatory)
ContactLastName As String(non mandatory)
ContactTitle As String (non mandatory)
ContactPosition As String(mandatory)
SupplierAddress1 As String(non mandatory)
SupplierAddress2 As String(non mandatory)
SupplierAddress3 As String
SupplierPhone As String
SupplierEmail As String
SupplierFax As String
SupplierStatus As String
SupplierZip As String
SupplierWebsite As String
SupplierNotes As String
SupplierPrefferedNumber As String
SupplierOrderMode As String
SupplierAccountNo As String
MaterialSupplierData
MaterialName As String (mandatory)
MaterialCost As String
UtilizationPercentage As String
MarkupPercentage As String
MinimumOrderSize As String
SupplierReference As String
MaterialNoOfUnits As String
MaterialQtyInStock As String
MaterialQtyOnOrder As String
MaterialMinQtyLevel As String
MaterialUnitOfMeasure As String
For more information see
Example Code
WDSL Schema
See also
Setting Up Suppliers
See also
|