Empower Help

Search:

Display Legacy Contents

IndexBookmarkPrint

Home > Materials > Advanced Topics > Import Export Data > Empower API > Using The API To Post Data > Suppliers

Suppliers


Suppliers and Supplier/Materials can be created or modified through the API using the function calls


1. CreateOrModifySupplier(supplier As SupplierData)

This function takes a single argument of data type SupplierData and returns the Supplier Name if created with a success message.



The following data types and whether they are mandatory or not are used


SupplierData


SupplierName As String (Mandatory)
ContactFirstName As String (Non Mandatory)
ContactLastName As String (Non Mandatory)
ContactTitle As String (Non Mandatory)
ContactPosition As String (Non Mandatory)
SupplierAddress1 As String (Non Mandatory)
SupplierAddress2 As String (Non Mandatory)
SupplierAddress3 As String (Non Mandatory)
SupplierPhone As String (Non Mandatory)
SupplierEmail As String (Non Mandatory)
SupplierFax As String (Non Mandatory)
SupplierStatus As String (Mandatory)
SupplierZip As String (Non Mandatory)
SupplierWebsite As String (Non Mandatory)
SupplierNotes As String (Non Mandatory)
SupplierPrefferedNumber As String (Non Mandatory)
SupplierOrderMode As String (Mandatory)
SupplierAccountNo As String (Non Mandatory)

As a result the request body should be based on the following

  <soapenv:Body>
      <web:CreateOrModifySupplier>
         <web:supplier>
            <web:SupplierName>SUPPLIER NAME</web:SupplierName>
            <web:ContactFirstName>CONTACT FIRST NAME</web:ContactFirstName>
            <web:ContactLastName>CONTACT LAST NAME</web:ContactLastName>
            <web:ContactTitle>CONTACT TITLE</web:ContactTitle>
            <web:ContactPosition>CONTACT POSITION</web:ContactPosition>
            <web:SupplierAddress1>SUPPLIER ADDRESS 1</web:SupplierAddress1>
            <web:SupplierAddress2>SUPPLIER ADDRESS 2</web:SupplierAddress2>
            <web:SupplierAddress3>SUPPLIER ADDRESS 3</web:SupplierAddress3>
            <web:SupplierPhone>SUPPLIER PHONE</web:SupplierPhone>
            <web:SupplierEmail>SUPPLIER EMAIL</web:SupplierEmail>
            <web:SupplierFax>SUPPLIER FAX</web:SupplierFax>
            <web:SupplierStatus>SUPPLIER STATUS - Current</web:SupplierStatus>
            <web:SupplierZip>SUPPLIER ZIP</web:SupplierZip>
            <web:SupplierWebsite>SUPPLIER WEBSITE</web:SupplierWebsite>
            <web:SupplierNotes>SUPPLIER NOTES</web:SupplierNotes>
            <web:SupplierPrefferedNumber>SUPPLIER PREFFERED NUMBER</web:SupplierPrefferedNumber>
            <web:SupplierOrderMode>SUPPLIER ORDER MODE(Print/Email)</web:SupplierOrderMode>
            <web:SupplierAccountNo>SUPPLIER ACCOUNT NUMBER</web:SupplierAccountNo>
         </web:supplier>
      </web:CreateOrModifySupplier>
   </soapenv:Body>




2. AddOrModifySupplierForMaterial(materialSupplier As MaterialSupplierData) 


This function takes a single argument of data type MaterialSupplierData and returns the Supplier Name /Material Name if created with a success message.


The following data types and whether they are mandatory or not are used


MaterialSupplierData
 
MaterialName As String (Mandatory)
SupplierName As String (Mandatory)
MaterialCost As String (Non Mandatory)
SupplierReference As String (Non Mandatory)
UtilizationPercentage As String (Non Mandatory)
MarkupPercentage As String  (Non Mandatory)
MinimumOrderSize As String  (Non Mandatory)

As a result the request body should be based on the following

 <soapenv:Body>
      <web:AddOrModifySupplierForMaterial>
         <web:materialSupplier>
            <web:MaterialName>MATERIAL NAME</web:MaterialName>
            <web:SupplierName>SUPPLIER NAME</web:SupplierName>
            <web:MaterialCost>MATERIAL COST</web:MaterialCost>
            <web:SupplierReference>SUPPLIER REFERENCE</web:SupplierReference>
            <web:UtilizationPercentage>UTILIZATION PERCENTAGE</web:UtilizationPercentage>
            <web:MarkupPercentage>MARKUP PERCENTAGE</web:MarkupPercentage>
            <web:MinimumOrderSize>MINIMUM ORDER SIZE</web:MinimumOrderSize>
         </web:materialSupplier>
      </web:AddOrModifySupplierForMaterial>
   </soapenv:Body>




For more information see

Example Code
WDSL Schema



 

See also

Setting Up Suppliers



 



 



See also