Difference between revisions of "Get Current User Company People Role"

From docs
Jump to: navigation, search
(Created page with "== Retrieve People Roles == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contact/people-role === Purpose === Returns the list of people roles conf...")
 
(Successful Response (200))
 
Line 33: Line 33:
 
==== Request Body ====
 
==== Request Body ====
 
None.
 
None.
 +
 +
=== cURL Example for Android ===
 +
<pre>
 +
curl --location 'https://apimobile.callproof.com/api/contact/people-role' \
 +
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
 +
</pre>
 +
=== cURL Example for iOS ===
 +
<pre>
 +
curl --location 'https://apimobile.callproof.com/api/contact/people-role' \
 +
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
 +
</pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 08:31, 17 July 2026

Retrieve People Roles

Base URL

https://apimobile.callproof.com

Endpoint

/api/contact/people-role

Purpose

Returns the list of people roles configured for the authenticated user’s company. These roles are used when assigning or displaying a person’s role on a contact, such as during contact personnel management or appointment checkout.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

None.

cURL Example for Android

curl --location 'https://apimobile.callproof.com/api/contact/people-role' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

cURL Example for iOS

curl --location 'https://apimobile.callproof.com/api/contact/people-role' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Successful Response (200)

Indicates that people roles for the authenticated user’s company were retrieved successfully.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data object People role payload
data.people_role array List of people roles, ordered by name
data.people_role[].id integer Unique people role identifier
data.people_role[].name string People role name
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – people roles could not be retrieved successfully
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – The service encountered an error while retrieving people roles for the company.
  • 401 – Authentication failed or the access token is missing/expired.