Company List
An overview of the Company List endpoint.
Endpoint Description
Retrieve a list of all companies within the R1 Discover platform and their R1 Discover IDs.
HTTP Method
GET /api/v1/company-list/{page}/{limit}
Headers:
Content-Type:
application/json- Specifies that the request body format is JSON.Accept:
application/json- Indicates that the client expects a JSON response.Authorization:
Bearer {token}- A valid Bearer token must be provided to authenticate the request.
URL Parameters:
page (Integer, Required): Specifies the page number in the pagination sequence to retrieve a specific set of results.
limit (Integer, Required): Specifies the number of records to retrieve per page, controlling the volume of data returned.
Data Dictionary:
id (Integer): The unique identifier for the company within the R1 Discover system.
name (String): The name of the company.
Request Examples
curl --request GET \
--get "https://api.r1learning.com/api/v1/company-list/1/50" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"const url = new URL(
"https://api.r1learning.com/api/v1/company-list/1/50"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.r1learning.com/api/v1/company-list/1/50");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer {token}");
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Response Examples
{
"error": 0,
"message": "",
"page": "1",
"limit": "50",
"data": {
"company_list": [
{
"id": 1,
"name": "R1 Learning"
}
]
}
}Notes
Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to access the endpoint.
Response Handling: Implement pagination to manage data effectively, especially when dealing with large datasets.
Last updated