Endpoints
GET /v1/contacts/
GET /v1/contacts/:id/
POST /v1/contacts/
PATCH /v1/contacts/:id/
DELETE /v1/contacts/:id/
Attributes | Type | Description |
---|
id | string | id of the contact |
name | string | Name |
email | string | Email |
address | string | Address |
city | string | City |
country | string | ISO 3166 two-letter country code |
tax_registration_number | string | Tax Registration Number |
relationship | string[] | A list of tags, can be Customer , Supplier , Investor , Partner , Other |
Example
{
"id": "co_hTNcixkrGGnhWnCiAxnCjP",
"name": "Honest Veggies",
"relationship": ["Supplier"],
"email": "info@honestveggies.com",
"address": "Malek street, 1st floor, office 1000",
"city": "Riyadh",
"country": "SA",
"tax_registration_number": "100092309810991",
}
GET /v1/contacts/
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/contacts/' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
Filters
Query param | Possible values | Description |
---|
relationship | Comma separated list of a subset of Customer , Supplier , Investor , Partner , Other | The relationship to the contact. |
country | string | The country code of the contact. |
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/contacts/?relationship=Supplier,Partner' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
POST /v1/contacts/
Request body
Attributes | Type | Description |
---|
name | string | Name (required) |
email | string | Email |
address | string | Address |
city | string | City |
country | string | ISO 3166 two-letter country code |
tax_registration_number | string | Tax Registration Number |
relationship | string[] | A list of tags, can be Customer , Supplier , Investor , Partner , Other |
Request
curl --location \
--request POST 'https://api.wafeq.com/v1/contacts/' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Ahmad",
"relationship": [
"Partner"
],
"email": "ahmad@honestveggies.com",
"city": "Riyadh",
"country": "SA",
"tax_registration_number": "100092309810991"
}'
PATCH /v1/contacts/:id/
Request body
Attributes | Type | Description |
---|
name | string | Name |
email | string | Email |
address | string | Address |
city | string | City |
country | string | ISO 3166 two-letter country code |
tax_registration_number | string | Tax Registration Number |
relationship | string[] | A list of tags, can be Customer , Supplier , Investor , Partner , Other |
DELETE /v1/contacts/:id/