Skip to content
sadhasivam edited this page Sep 10, 2024 · 1 revision

Add Client

URL: /api/admin/clients/add

Method: POST

Description: Adds a new client.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required API key for authentication.
client_fname String Required First name of the client.
client_lname String Required Last name of the client.
client_email String Required Email address of the client. Must be a valid email format.
client_username String Optional Username for the client.
client_status Integer Required Status of the client. Must be an integer between 0 and 2.
client_role String Optional Role of the client. Defaults to "client". If set to 0, role is "admin".

Response

{
    "success":true,
    "message":"Contact has been Added Successfully",
    "data":1
}

View All Client

URL: /api/admin/viewClients/{client_id}

Method: GET

Description: Displays the details of a All clients.

Parameters

Parameter Type Required/Optional Description
client_id Integer Required The client ID to exclude from the results.

Response

{
    "success": true,
    "message": "All the Details of the contact's registered so far are displayed",
    "data": [
        {
                "full_name": "demoAdmin Admindemo",
                "client_id": 13,
                "client_email": "1234sxdhjecfvgbh@gmail.com",
                "client_role": "client",
                "client_status": 1,
                "client_cancel_date": "2024-09-09",
                "client_active_date": "2024-09-09",
                "is_2fa_enabled": 0
            },
            {
                "full_name": "test",
                "client_id": 12,
                "client_email": "client05sep@gmail.com",
                "client_role": "admin",
                "client_status": 1,
                "client_cancel_date": "2024-09-05",
                "client_active_date": "2024-09-05",
                "is_2fa_enabled": 0
            },
    ]
}

Delete Client

URL: /api/admin/clients/delete

Method: POST

Description: Deletes a client.

Parameters

Parameter Type Required/Optional Description
client_id Integer Required ID of the client to be deleted.

Response

{
    "success":true,
    "message":"Contact has been deleted Successfully",
    "data":1
}

Edit Client

URL: /api/admin/clients/edit

Method: POST

Description: Updates client details.

Parameters

Parameter Type Required/Optional Description
api_key_secret String Required API key for authentication.
client_id Integer Required ID of the client to be updated.
client_fname String Optional First name of the client.
client_lname String Optional Last name of the client.
client_email String Optional Email address of the client.
client_username String Optional Username of the client.
client_status Integer Optional Status of the client (0 for inactive, 1 for active).
client_role Integer Optional Role of the client (0 for admin, 1 for client).

Response

{
    "success": true,
    "message": "Contact Details has been updated Successfully",
    "data": 1
}

Get Client for Editing

URL: /api/admin/client/{client_id}

Method: GET

Description: Fetches client details for editing.

Parameters

Parameter Type Required/Optional Description
client_id Integer Required The ID of the client to be edited.

Response

{
    "success": true,
    "data": {
        "client": {
            "client_id": 12,
            "client_fname": "admin",
            "client_lname": "demo",
            "client_username": "demoadmin",
            "client_email": "client05sep@gmail.com",
            "client_active_date": "2024-09-05",
            "client_cancel_date": "0000-00-00",
            "client_status": 1,
            "client_role": 0,
            "created_at": null,
            "updated_at": "2024-09-09T19:59:14.000000Z",
            "client_mobile": "",
            "client_mobile_code": "91",
            "client_timezone_id": 1,
            "client_profile_pic": "https:\/\/secure.gravatar.com\/avatar\/914fxjhvjcbjskhsq81f4a5b21c?s=80&r=g&d=mm",
            "client_iso2": "IN",
            "google2fa_secret": null,
            "google2fa_activation_date": null,
            "is_2fa_enabled": 0,
            "client_address": null,
            "client_organization": null
        }
    }
}

View Client Info

URL: /api/admin/clientView/{client_id}

Method: GET

Description: Displays detailed information about a client.

Parameters

Parameter Type Required/Optional Description
client_id Integer Required The ID of the client whose information is being retrieved.

Response

{
    "success": true,
    "message": "Client details are displayed here",
    "data": {
        "client_id": 12,
        "client_email": "client05sep@gmail.com",
        "client_role": "admin",
        "client_active_date": "2024-09-05",
        "client_profile_pic": "https:\/\/secure.gravatar.com\/avatar\/914f74787dgajkbaws64c00df81f4a5b21c?s=80&r=g&d=mm",
        "client_address": null,
        "client_organization": null,
        "client_status": 1,
        "full_name": "demo admin"
    }
}

View Client Installations

URL: /api/admin/clientInstallations/{client_id}

Method: GET

Description: Displays the installations associated with a client.

Parameters

Parameter Type Required/Optional Description
client_id Integer Required The ID of the client whose installations are being retrieved.

Response

{
    "success": true,
    "message": "All client installation details are displayed here",
     "data": [
            {
                "installation_id": 44,
                "client_id": 12,
                "installation_domain": "demo.ga\/update\/public",
                "installation_ip": "173.249.17.198",
                "installation_date": "2018-12-13",
                "installation_status": 1,
                "product": null
            },
            {
                "installation_id": 43,
                "client_id": 12,
                "installation_domain": "localhost\/demo-licensing\/public",
                "installation_ip": "106.51.140.178",
                "installation_date": "2018-12-13",
                "installation_status": 0,
                "product": null
            }
        ],
}

View Client Licenses

URL: /api/admin/clientLicenses/{client_id}

Method: GET

Description: Displays the licenses associated with a client.

Parameters

Parameter Type Required/Optional Description
client_id Integer Required The ID of the client whose licenses are being retrieved.

Response

{
    "success": true,
    "message": "All client licenses are displayed here",
    "data": [
            {
                "license_id": 1164,
                "product_id": 15,
                "client_id": 12,
                "license_code": "CFMHGVVDYSJKP09D8",
                "license_order_number": "6776172",
                "license_date": "0000-00-00",
                "license_expire_date": "0000-00-00",
                "license_updates_date": "2018-04-12",
                "license_support_date": "0000-00-00",
                "license_status": 1,
                "product_title": "Helpdesk Enterprise",
                "latest_call_backs": null,
                "installation_counts": 0,
                "license_order_url": "<a id=\"href_link\" href=\"https:\/\/demo.localhost\/invoice\/public\/orders\/license\/6776172\">6776172<\/a>",
                "product": {
                    "product_id": 15,
                    "product_title": "Product Test"
                }
            },
            {
                "license_id": 1161,
                "product_id": 15,
                "client_id": 12,
                "license_code": "YTFTAQ4NMESSOYR3",
                "license_order_number": "878039718",
                "license_date": "0000-00-00",
                "license_expire_date": "0000-00-00",
                "license_updates_date": "2018-03-01",
                "license_support_date": "0000-00-00",
                "license_status": 1,
                "product_title": "Helpdesk Enterprise",
                "latest_call_backs": null,
                "installation_counts": 0,
                "license_order_url": "<a id=\"href_link\" href=\"https:\/\/demo.localhost\/invoice\/public\/orders\/license\/878039718\">878039718<\/a>",
                "product": {
                    "product_id": 15,
                    "product_title": "Product Test"
                }
            },
        ],
}

Clone this wiki locally