By calling the URL endpoint with the POST method, this endpoint returns a JSON object with new created Item ID.
Example:
Post the JSON object in body request for the item whose JSON looks like sample below (call URL https://api.erpag.com/item/add with POST method and JSON body).
Body JSON sample:
{
"sku": "00125",
"description": "test product",
"uom": "pc",
"image_url": "https://mycompany.example.com/images/product234345.png"
}
Explanation:
- sku – The Item SKU number (optional). If not provided, ERPAG will generate a new SKU.
- description – Item Description/Name (mandatory)
- uom – Unit of measure (optional)
- image_url – URL address of the product image (optional)
Result:
{
"id": "ED1HPIW0YU9J5167"
}
Explanation:
id – ID of created Item
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