General
Contacts
Contacts API documentation
Introduction
These API calls relate to agents, branches and projects.
Get Agents
Used by subscriptions products for example. All lookup values can be found under: Lookups API
Path |
---|
GET /contacts/agents |
Success Response:
{
"status": true,
"records": [{
"id": "{unique record_id}",
"name": "John Doe",
"agent_code": "ABC 123",
"email": "john@mail.com",
"mobile": "+27123456789",
"address": "Pretoria",
"company_lookups_id": "d133b2f8-faf3-41d7-be50-a657717d290a",
"is_commission": true,
"is_active": true,
"branches_regions_id": "{branches_regions record_id}"
}, ...]
}
Field | Type | Description | Options | Example |
---|---|---|---|---|
id | string | Unique ID of the agent and used in other API calls | UUID | "{unique record_id}" |
name | string | Name of the agent | "John Doe" | |
agent_code | string | Code associated with the agent | "ABC 123" | |
string | Email of the agent | "john@mail.com" | ||
mobile | string | Mobile number of the agent | "+27123456789" | |
address | string | Address of the agent | "Pretoria" | |
company_lookups_id | string | Company lookups ID associated with the agent | UUID | "d133b2f8-faf3-41d7-be50-a657717d290a" |
is_commission | boolean | If this agent is entitled to comission | true, false | true |
is_active | boolean | If this agent is considired to be active | true, false | true |
branches_regions_id | string | Branch ID associated with this agent | UUID | "{branches_regions record_id}" |
Get Branches
Used by subscriptions products for example. All lookup values can be found under: Lookups API
Path |
---|
GET /contacts/branches |
Success Response:
{
"status": true,
"records": [{
"id": "{unique record_id}",
"branches_regions_id": "{branches_regions record_id}",
"title": "Pretoria Branch",
"is_active": true
}, ...]
}
Field | Type | Description | Options | Example |
---|---|---|---|---|
id | string | Unique ID of the branch and used in other API calls | UUID | "{unique record_id}" |
branches_regions_id | string | Region ID associated with this branch | UUID | "{branches_regions record_id}" |
title | string | Title of this branch | "Pretoria Branch" | |
is_active | boolean | If this branch is considered to be active or not | true, false | true |
Get Projects
Used by subscriptions products for example. All lookup values can be found under: Lookups API
Path |
---|
GET /contacts/projects |
Success Response:
{
"status": true,
"records": [{
"id": "{unique record_id}",
"branches_id": "{branches record_id}",
"branches_regions_id": "{branches_regions record_id}",
"title": "Retirement Care",
"is_commission": false,
"is_active": true
}, ...]
}
Field | Type | Description | Options | Example |
---|---|---|---|---|
id | string | Unique ID associated with this project and used in other API calls | UUID | "{unique record_id}" |
branches_id | string | Branch ID associated with this project | UUID | "{branches record_id}" |
branches_regions_id | string | Branch Region ID associated with the project | UUID | "{branches_regions record_id}" |
title | string | Title of the project | "Retirement Care" | |
is_commission | boolean | If this project ears comission | true, false | false |
is_active | bolean | If this project is considered to be active | true, false | true |