company logo

Help center

Go to Agentcis
Follow us on FacebookFollow us on Linkedin
All collectionsAPI DocumentationAgents API Documentation

Agents API Documentation

The Agents API allows you to manage agents (Super Agents and Sub Agents) within the system. You can list active or inactive agents, create new agents, and update existing agent details.

List Active Agents 🔒

  • Endpoint: {{Base URL}}/referrer

  • Method: GET

  • Description: Fetch the list of available Active Agents

Query String Parameters

page=1&per_page=10


Response

{

    "data": [

        {

            "id": 1123,

            "name": "Super Sub agent",

            "email": "[email protected]",

            "phone": "+9779843232448",

            "photo": "",

            "city": "Kathmandu",

            "agent_type": [

                "Super Agent",

                "Sub Agent"

            ],

            "structure": "individual",

            "contact_sources_count": 0,

            "related_offices": [

                {

                    "id": 1,

                    "name": "Head Office {SDF'FSF}",

                    "pivot": {

                        "officeable_id": 1123,

                        "office_id": 1,

                        "officeable_type": "referrer",

                        "created_at": "2025-10-08T07:43:43.000000Z",

                        "updated_at": "2025-10-08T07:43:43.000000Z"

                    }

                }

            ],

            "applications_count": 0,

            "sent_applications_count": 0,

            "referred_applications_count": 0,

            "agent_connect_status": "request_sent"

        }

    ],

    "links": {

        "first": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=1",

        "last": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=3",

        "prev": null,

        "next": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=2"

    },

    "meta": {

        "current_page": 1,

        "from": 1,

        "last_page": 3,

        "links": [

            {

                "url": null,

                "label": "« Previous",

                "active": false

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=1",

                "label": "1",

                "active": true

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=2",

                "label": "2",

                "active": false

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=3",

                "label": "3",

                "active": false

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=2",

                "label": "Next »",

                "active": false

            }

        ],

        "path": "http:\/\/demoagency.agentcisapp.com\/api\/referrer",

        "per_page": 10,

        "to": 10,

        "total": 25

    }

}

List Inactive Agents 🔒

  • Endpoint: {{Base URL}}/referrer

  • Method: GET

  • Description: Fetch the list of available Active Agents

Query String Parameters

page=1&per_page=10&archived=true


Response

{

    "data": [

         {

            "id": 1069,

            "name": "Planner Practical",

            "email": "[email protected]",

            "phone": null,

            "photo": "",

            "city": "",

            "agent_type": [

                "Super Agent",

                "Sub Agent"

            ],

            "structure": "individual",

            "contact_sources_count": 0,

            "related_offices": [

                {

                    "id": 250,

                    "name": "Lowe - Langosh",

                    "pivot": {

                        "officeable_id": 1069,

                        "office_id": 250,

                        "officeable_type": "referrer",

                        "created_at": "2023-05-25T09:32:51.000000Z",

                        "updated_at": "2023-05-25T09:32:51.000000Z"

                    }

                }

            ],

            "applications_count": 0,

            "sent_applications_count": 0,

            "referred_applications_count": 0,

            "agent_connect_status": "not_connected"

        },

        {

            "id": 1068,

            "name": "payment e-enable models",

            "email": "[email protected]",

            "phone": "",

            "photo": "",

            "city": "",

            "agent_type": [

                "Super Agent",

                "Sub Agent"

            ],

            "structure": "individual",

            "contact_sources_count": 0,

            "related_offices": [

                {

                    "id": 127,

                    "name": "Jenkins, Cummerata and Stroman",

                    "pivot": {

                        "officeable_id": 1068,

                        "office_id": 127,

                        "officeable_type": "referrer",

                        "created_at": "2023-05-25T09:32:22.000000Z",

                        "updated_at": "2023-05-25T09:32:22.000000Z"

                    }

                }

            ],

            "applications_count": 0,

            "sent_applications_count": 0,

            "referred_applications_count": 0,

            "agent_connect_status": "not_connected"

        }

    ],

    "links": {

        "first": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=1",

        "last": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=3",

        "prev": null,

        "next": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=2"

    },

    "meta": {

        "current_page": 1,

        "from": 1,

        "last_page": 3,

        "links": [

            {

                "url": null,

                "label": "« Previous",

                "active": false

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=1",

                "label": "1",

                "active": true

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=2",

                "label": "2",

                "active": false

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=3",

                "label": "3",

                "active": false

            },

            {

                "url": "http:\/\/demoagency.agentcisapp.com\/api\/referrer?page=2",

                "label": "Next »",

                "active": false

            }

        ],

        "path": "http:\/\/demoagency.agentcisapp.com\/api\/referrer",

        "per_page": 10,

        "to": 10,

        "total": 25

    }

}

Create Agents 🔒

  • Endpoint: {{Base URL}}/referrer

  • Method: POST [Form Data]

  • Description: Create Agent

Payload

{

             agent_type[]: 1  (Super Agent)

                                                              > (required: either 1 or 2 | array)

agent_type[]: 2  (Sub Agent)


type: individual                           (required: either individual or business | string)

photo_tmp: (binary)                    (optional | file)

name: Super Sub agent               (required | string)

email: [email protected] (required | string)

street: Kadaghari                         (optional | string)

city: Kathmandu                          (optional | string)

state: Kathmandu test                  (optional | string)

zip_code: 44600                          (optional | string)

country: 150                                (optional | int : countries->id)

income_sharing_percentage: 100 (optional | int)

claim_revenue_percentage: 100   (optional | int)

send_connection_request: true      (optional | boolean)

related_offices[]: 1                        (required | int: branches->id)

phone[number]: 9843232448        (optional | string)

phone[country_code]: NP              (optional | string)

}

Response

{

    "agent_type": [

        1,

        2

    ],

    "type": "individual",

    "name": "Super Sub agent",

    "email": "[email protected]",

    "street": "Kadaghari",

    "city": "Kathmandu",

    "state": "Kathmandu test",

    "zip_code": "44600",

    "country": "150",

    "income_sharing_percentage": "100",

    "claim_revenue_percentage": "100",

    "phone": "+9779843232448",

    "phone_number_country_code": "NP",

    "updated_at": "2025-10-08T07:43:43.000000Z",

    "created_at": "2025-10-08T07:43:43.000000Z",

    "id": 1123,

    "photo_url": "",

    "address": "Kadaghari, Suncity, Kathmandu, 44600, Nepal",

    "nation": {

        "id": 150,

        "country_name": "Nepal",

        "currency_name": "Nepalese rupee",

        "currency_code": "NPR",

        "country_code": "NP",

        "country_dialing_code": "977",

        "country_code_iso_alpha3": "NPL"

    }

}


Update Agents 🔒

  • Endpoint: {{Base URL}}/referrer/{referrer_id}

  • Method: POST [Form Data]

  • Description: Create Agent

Payload

{

             agent_type[]: 1  (Super Agent)

                                                              > (required: either 1 or 2 | array)

agent_type[]: 2  (Sub Agent)


type: individual                           (required: either individual or business | string)

photo_tmp: (binary)                    (optional | file)

name: Super Sub agent               (required | string)

email: [email protected] (required | string)

street: Kadaghari                         (optional | string)

city: Kathmandu                          (optional | string)

state: Kathmandu test                  (optional | string)

zip_code: 44600                          (optional | string)

country: 150                                (optional | int : countries->id)

income_sharing_percentage: 100 (optional | int)

claim_revenue_percentage: 100   (optional | int)

send_connection_request: true      (optional | boolean)

related_offices[]: 1                        (required | int: branches->id)

phone[number]: 9843232448        (optional | string)

phone[country_code]: NP              (optional | string)

_method: PUT

}

Response

{

    "agent_type": [

        1,

        2

    ],

    "type": "individual",

    "name": "Super Sub agent",

    "email": "[email protected]",

    "street": "Kadaghari",

    "city": "Kathmandu",

    "state": "Kathmandu test",

    "zip_code": "44600",

    "country": "150",

    "income_sharing_percentage": "100",

    "claim_revenue_percentage": "100",

    "phone": "+9779843232448",

    "phone_number_country_code": "NP",

    "updated_at": "2025-10-08T07:43:43.000000Z",

    "created_at": "2025-10-08T07:43:43.000000Z",

    "id": 1123,

    "photo_url": "",

    "address": "Kadaghari, Suncity, Kathmandu, 44600, Nepal",

    "nation": {

        "id": 150,

        "country_name": "Nepal",

        "currency_name": "Nepalese rupee",

        "currency_code": "NPR",

        "country_code": "NP",

        "country_dialing_code": "977",

        "country_code_iso_alpha3": "NPL"

    }

}


Did this answer your question?
😞
😐
😁