Skip to content

User Endpoints

Jay edited this page Jun 5, 2024 · 13 revisions

Below are the currently supported user endpoints.

Operators

GET /user/operator

$operators = $api->getUserApi()->getOperators();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-operator-get

$operators = $api->getUserApi()->getOperators(['active' => 1]);

GET /user/operator/{id}

$operator = $api->getUserApi()->getOperator(1);

POST /user/operator

$createOperator = new \SupportPal\ApiClient\Model\User\Request\CreateOperator([
    'firstname' => 'Joe',
    'lastname'  => 'Bloggs',
    'email'     => 'email@email.com',
])
    ->addToGroup(1);

$operator = $api->getUserApi()->createOperator($createOperator);

For a full list of parameters, see https://api.supportpal.com/api.html#user-operator-post

PUT /user/operator/{id}

$updateOperator = new \SupportPal\ApiClient\Model\User\Request\UpdateOperator(['email' => 'newemail@email.com']);
$operator = $api->getUserApi()->updateOperator($id, $updateOperator);

For a full list of parameters, see https://api.supportpal.com/api.html#user-operator-put

DELETE /user/operator/{id}

$api->getUserApi()->deleteOperator($id);

Organisations

GET /user/organisation

$organisations = $api->getUserApi()->getOrganisations();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-organisation-get

$organisations = $api->getUserApi()->getOrganisations(['brand_id' => 1]);

GET /user/organisation/{id}

$organisation = $api->getUserApi()->getOrganisation(1);

POST /user/organisation

$createOrganisation = new \SupportPal\ApiClient\Model\User\Request\CreateOrganisation(['name' => 'Company Name'])
    ->addUser($userId = 1, $accessLevel = 0);

$organisation = $api->getUserApi()->createOrganisation($createOrganisation);

For a full list of parameters, see https://api.supportpal.com/api.html#user-organisation-post

PUT /user/organisation/{id}

$updateOrganisation = new \SupportPal\ApiClient\Model\User\Request\UpdateOrganisation(['name' => 'New Company Name']);
$organisation = $api->getUserApi()->updateOrganisation($id, $updateOrganisation);

For a full list of parameters, see https://api.supportpal.com/api.html#user-organisation-put

DELETE /user/organisation/{id}

$api->getUserApi()->deleteOrganisation($id);

Operator Groups

GET /user/operatorgroup

$groups = $api->getUserApi()->getOperatorGroups();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-operator-group-get

$groups = $api->getUserApi()->getOperatorGroups(['order_column' => 'name']);

GET /user/operatorgroup/{id}

$group = $api->getUserApi()->getOperatorGroup(1);

Organisation Custom Fields

GET /user/organisationcustomfield

$customfields = $api->getUserApi()->getOrganisationCustomFields();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-organisation-custom-field-get

$customfields = $api->getUserApi()->getOrganisationCustomFields(['brand_id' => 1]);

GET /user/organisationcustomfield/{id}

$customfield = $api->getUserApi()->getOrganisationCustomField(1);

Settings

GET /user/settings

$settings = $api->getUserApi()->getSettings();

Users

GET /user/user

$users = $api->getUserApi()->getUsers();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-user-get

$users = $api->getUserApi()->getUsers(['active' => 1]);

GET /user/user/{id}

$user = $api->getUserApi()->getUser(1);

POST /user/user

$createUser = new \SupportPal\ApiClient\Model\User\Request\CreateUser([
    'firstname' => 'Joe',
    'lastname'  => 'Bloggs',
    'email'     => 'email@email.com',
]);
$user = $api->getUserApi()->createUser($createUser);

PUT /user/user/{id}

$updateUser = new \SupportPal\ApiClient\Model\User\Request\UpdateUser(['email' => 'newemail@email.com']);
$user = $api->getUserApi()->updateUser($id, $updateUser);

DELETE /user/user/{id}

$api->getUserApi()->deleteUser($id);

User Custom Fields

GET /user/customfield

$customfields = $api->getUserApi()->getUserCustomFields();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-custom-field-get

$customfields = $api->getUserApi()->getUserCustomFields(['brand_id' => 1]);

GET /user/customfield/{id}

$customfield = $api->getUserApi()->getUserCustomField(1);

User Groups

GET /user/usergroup

$groups = $api->getUserApi()->getUserGroups();

You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#user-user-group-get

$groups = $api->getUserApi()->getUserGroups(['order_column' => 'name']);

GET /user/usergroup/{id}

$group = $api->getUserApi()->getUserGroup(1);

Clone this wiki locally