API Reference

Contacts

Endpoints

GET /v1/contacts/
GET /v1/contacts/:id/
POST /v1/contacts/
PATCH /v1/contacts/:id/
DELETE /v1/contacts/:id/

Contact object

AttributesTypeDescription
idstringid of the contact
namestringName
emailstringEmail
addressstringAddress
citystringCity
countrystringISO 3166 two-letter country code
tax_registration_numberstringTax Registration Number
relationshipstring[]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",
}

List contacts

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 paramPossible valuesDescription
relationshipComma separated list of a subset of Customer, Supplier, Investor, Partner, OtherThe relationship to the contact.
countrystringThe 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'

Create contact

POST /v1/contacts/

Request body

AttributesTypeDescription
namestringName (required)
emailstringEmail
addressstringAddress
citystringCity
countrystringISO 3166 two-letter country code
tax_registration_numberstringTax Registration Number
relationshipstring[]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"
}'

Update contact

PATCH /v1/contacts/:id/

Request body

AttributesTypeDescription
namestringName
emailstringEmail
addressstringAddress
citystringCity
countrystringISO 3166 two-letter country code
tax_registration_numberstringTax Registration Number
relationshipstring[]A list of tags, can be Customer, Supplier, Investor, Partner, Other

Delete contact

DELETE /v1/contacts/:id/
Previous
Expenses