View Company Locations
An overview of the View Company Locations endpoint.
Endpoint Description
The View Company Locations endpoint provides the list of locations associated for a specific company setup within R1 Discover. This information is used for managing users and administrators alignments. This is important for both reporting and setting permissions.
Endpoint URL
GET
https://api.r1learning.com/api/v1/view-company-locations/{companyId}/{page}/{limit}
Authentication
Required: Bearer token authentication is mandated to ensure secure access to company data.
Headers
Content-Type:
application/json
Accept:
application/json
Authorization:
Bearer {token}
URL Parameters
companyId (integer): Unique identifier for the company.
page (integer): Specifies the page number of the results to retrieve.
limit (integer): Specifies the maximum number of location entries to return in one response.
Data Dictionary
company_id: Unique identifier for the company.
Locations: A collection of locations associated with the company.
id: Unique identifier for each location.
facility_name: Name of the facility or location.
Request Examples
curl --request GET \
--get "https://api.r1learning.com/api/v1/view-company-locations/1/1/50" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
Response Examples
{
"error": 0,
"message": "",
"companyId": "1",
"page": "1",
"limit": "50",
"data": [
{"id": 1, "facility_name": "R1 Learning Loc #1"},
{"id": 5, "facility_name": "R1 Learning Loc #2"},
{"id": 16, "facility_name": "R1 Learning Loc #3"},
{"id": 156, "facility_name": "R1 Learning Loc #4"}
]
}
Notes
Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to access the endpoint.
Response Handling: The response includes pagination details to handle large datasets effectively.
Data Validation: Ensure the provided
companyId
is correct to retrieve the appropriate location details.
Last updated