1. Home
  2. ERPAG
  3. API Script
  4. Add Customer

Add Customer

By calling the URL endpoint with the POST method, this endpoint returns a JSON object with new created Customer ID.

Example:


Post the JSON object in body request for the item whose JSON looks like sample below (call URL https://api.erpag.com/customer/add with POST method and JSON body).

Body JSON sample:

Explanation:

key – The Customer Key (optional). If not provided, ERPAG will generate a new Key.

name – Customer Name (mandatory)

address1 – Customer address 1 (optional)

address2 – Customer address 2 (optional)

city – Customer city (optional)

zipcode – Customer ZIP code (optional)

tin – Customer Tax Identification Number (TIN) (optional)

email – Customer email address (optional)

Result:

Explanation:

id – ID of created Customer


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

How can we help?