List contacts
Clients and suppliers with name, tax ID, email and phone.
GET https://cotlet.dev/api/v1/alegra/contacts
read
Lists contacts from the Contactos menu. Search matches the name or the identification number. A contact is a client, a supplier or both. Use contact_id from each item for create_invoice and list_invoices. Pass next_cursor back as cursor for the next page.
Parameters
| Name | Type | Description |
|---|---|---|
| query string | string | Part of the name or the identification number. |
| kind enum | enum | client or supplier. Default: both. |
| limit integer | integer | Contacts per page. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/alegra/contacts \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("alegra", "list_contacts") const result = await cotlet.call('alegra', 'list_contacts'); cotlet call alegra list_contacts Example response
{
"contacts": [
{
"contact_id": "20",
"name": "Northwind Studio",
"identification": "900123456",
"kind": "client",
"email": "accounts@northwind.example",
"mobile": "+57 300 555 0142",
"city": "Bogota"
}
],
"next_cursor": null
}