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}"
    }, ...]
}
FieldTypeDescriptionOptionsExample
idstringUnique ID of the agent and used in other API callsUUID"{unique record_id}"
namestringName of the agent"John Doe"
agent_codestringCode associated with the agent"ABC 123"
emailstringEmail of the agent"john@mail.com"
mobilestringMobile number of the agent"+27123456789"
addressstringAddress of the agent"Pretoria"
company_lookups_idstringCompany lookups ID associated with the agentUUID"d133b2f8-faf3-41d7-be50-a657717d290a"
is_commissionbooleanIf this agent is entitled to comissiontrue, falsetrue
is_activebooleanIf this agent is considired to be activetrue, falsetrue
branches_regions_idstringBranch ID associated with this agentUUID"{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
    }, ...]
}
FieldTypeDescriptionOptionsExample
idstringUnique ID of the branch and used in other API callsUUID"{unique record_id}"
branches_regions_idstringRegion ID associated with this branchUUID"{branches_regions record_id}"
titlestringTitle of this branch"Pretoria Branch"
is_activebooleanIf this branch is considered to be active or nottrue, falsetrue

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
    }, ...]
}
FieldTypeDescriptionOptionsExample
idstringUnique ID associated with this project and used in other API callsUUID"{unique record_id}"
branches_idstringBranch ID associated with this projectUUID"{branches record_id}"
branches_regions_idstringBranch Region ID associated with the projectUUID"{branches_regions record_id}"
titlestringTitle of the project"Retirement Care"
is_commissionbooleanIf this project ears comissiontrue, falsefalse
is_activeboleanIf this project is considered to be activetrue, falsetrue

Copyright © 2024 SwitchTransact