By calling the URL endpoint with the POST method, this endpoint returns a JSON object with new created Supplier ID.
Example:
Post the JSON object in body request for the item whose JSON looks like sample below (call URL https://api.erpag.com/supplier/add with POST method and JSON body).
Body JSON sample:
{
"key": "0214",
"name": "Example Supplier D",
"address1": "225 Moon str.",
"address2": null,
"city":"Chicago",
"zipcode": "60324",
"tin":" "3433463663",
"email":"[email protected]"
}Explanation:
- key – The Suppler Key (optional). If not provided, ERPAG will generate a new Key.
- name – Supplier Name (mandatory)
- address1 – Supplier address 1 (optional)
- address2 – Supplier address 2 (optional)
- city – Supplier city (optional)
- zipcode – Supplier ZIP code (optional)
- tin – Supplier Tax Identification Number (TIN) (optional)
- email – Supplier email address (optional)
Result:
{
"id": "551YGBOGF19EDWRE"
}Explanation:
id – ID of created Supplier
Note: Access to this API endpoint is allowed only for selected API User account using the API key and API password in the request header with the key name “Authorization” and key value “Basic base64encoded(api_key:api_password)“, or URL parameters ApiKey and ApiSecret for example https://api.erpag.com/item/add?ApiKey=key_056a9spfg1qubg34e409ee233d&ApiSecret=sec_IKJ4Sc2G8jHfr3sHbxQwEfev-Az-1YaF