Lookups
General Lookups API Calls
General Lookups
This API returns all lookup values to be used in all other API calls including the Contact Centre API.
| Path |
|---|
GET /lookups |
Request (GET)
Any of the following query parameters can be provided for filtering results.
| Query Parameter | Data type | Description |
|---|---|---|
| type | string | Filter by lookup type |
| category | string | Filter by lookup category |
Response (JSON)
Data is returned as a JSON object in the following format:
| JSON response |
|---|
{
"lookups": [{
"id": "56926d84-6039-4f32-b46a-73d2d5d7f7c5",
...
}, ...]
}
To filter general lookups pass the type and/or category query parameters, e.g. /lookups?type=Bank&category=BankAccounts.
Bank Names
This API returns all the banks along with their default branch codes.
| Path |
|---|
GET /lookups/bank/names |
Success Response:
{
"status": true,
"records": [{
"id": "{bank lookups id}",
"name": "ABSA",
"branch": "632005"
}, ...]
}
| Field | Type | Description | Example |
|---|---|---|---|
| id | string | Lookup ID of the bank, used in other API calls | "{bank lookups id}" |
| name | string | Name of the bank | "ABSA" |
| branch | string | Default branch code of the bank | "632005" |
Bank Account Types
This API returns all the bank account types.
| Path |
|---|
GET /lookups/bank/accounts |
Success Response:
{
"status": true,
"records": [{
"id": "{bank account type lookups id}",
"title": "Cheque/Current",
"code": "1"
}, ...]
}
| Field | Type | Description | Example |
|---|---|---|---|
| id | string | Lookup ID of the bank account type, used in other API calls | "{bank account type lookups id}" |
| title | string | Name of the bank account type | "Cheque/Current" |
| code | string | Code associated with the bank account type | "1" |
Agents
This API returns the ID and name of all active agents. For full agent details see the Contacts API.
| Path |
|---|
GET /lookups/agents |
Success Response:
{
"status": true,
"records": [{
"id": "{agents record_id}",
"name": "John Doe"
}, ...]
}
Custom Field Lookups
This API returns lookup values to be used in all other API calls.
| Path |
|---|
GET /lookups/custom_fields/{people|companies} |
Request (GET)
Response (JSON)
Data is returned as a JSON object in the following format:
{
"status": true,
"records": {
"Farm Type": {
"type": "enum",
"name": "Farm Type",
"description": "Main produce",
"options": ["Pork", "Veggies"]
},
...
}
}