-
Notifications
You must be signed in to change notification settings - Fork 2
User Endpoints
Below are the currently supported user endpoints.
$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]);$operator = $api->getUserApi()->getOperator(1);$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
$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
$api->getUserApi()->deleteOperator($id);$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]);$organisation = $api->getUserApi()->getOrganisation(1);$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
$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
$api->getUserApi()->deleteOrganisation($id);$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']);$group = $api->getUserApi()->getOperatorGroup(1);$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]);$customfield = $api->getUserApi()->getOrganisationCustomField(1);$settings = $api->getUserApi()->getSettings();$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]);$user = $api->getUserApi()->getUser(1);$createUser = new \SupportPal\ApiClient\Model\User\Request\CreateUser([
'firstname' => 'Joe',
'lastname' => 'Bloggs',
'email' => 'email@email.com',
]);
$user = $api->getUserApi()->createUser($createUser);$updateUser = new \SupportPal\ApiClient\Model\User\Request\UpdateUser(['email' => 'newemail@email.com']);
$user = $api->getUserApi()->updateUser($id, $updateUser);$api->getUserApi()->deleteUser($id);$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]);$customfield = $api->getUserApi()->getUserCustomField(1);$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']);$group = $api->getUserApi()->getUserGroup(1);