API: Addresses
Table of Contents
The ERP API Addresses endpoint provides a list of addresses and their associated information from the Enapps ERP system. As standard, this method returns 1000 records per page. It is recommended that the results of this API request are stored locally with the view to map e-commerce users with the associated company. This, should be used in conjunction with Partners and Contacts APIs.
Please note: Partners, Contacts and Addresses are read-only. Currently the only method to create new adrresses is at the time of sale order creation. We are in the process of developing a new API method which will allow new company/contact creation.
Base URL | |
https://<server>:<port>/api/v1 |
Endpoint | /addresses |
Method | GET |
Retrieve addresses
Request params | |||
Name | Type | Required | Description |
_id | integer | No |
ID of a specific address to obtain only 1 record. |
partner_id | integer | No |
ID of a partner obtained from Partners API response. |
page | integer | No |
Optional pagination parameter. |
additional_fields | array/list | No |
Provide field names of additional fields not part of the standard Endpoint. For more information please refer to Additional Fields |
Response params | ||
Name | Type | Description |
id | integer | Address unique ID |
partner_id | integer | Associated partner ID |
type | string | Type of the address. “Default” is initial value |
street | string | Street name |
street2 | string | Extra street name |
city | string | City |
zip | string | Zip-code |
country_id | array | Country ID, name |
Examples | |
HTTP |
GET /api/v1/addresses/ HTTP/1.1 Host: company.erp.zone:4095 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI35IkpXVCJ9.eyJleHAiOjE2OTc2MzEwOTgsInQiOiJhY2Nlc3MiLCJsIjoid29vY29tbWVyY2VhcGkiLCJkYiI6InByb2R1Y3Rpb25fZGV2In0.WXymUki1f_3-_qVm1cKp8gTDqHBFGJs9uEEzhy4 |