Company Management

An overview of the Company Management collection of endpoints.

Overview of Company Management

The Company Management category in the R1 Discover API provides a comprehensive set of endpoints designed to manage various aspects of companies within the platform. These endpoints are essential for creating, updating, and retrieving detailed information about companies, including their topics and activities. Proper management of this data ensures that companies can efficiently organize and access the information needed for their operations, such as license tracking, topic assignments, and activity management.

This category is particularly useful for administrators or developers who need to programmatically manage company data, ensuring seamless integration with the R1 Discover ecosystem.

Endpoints in This Category

The "Company Management" collection includes the following endpoints:

  • List Companies Retrieve a paginated list of companies, including details such as total licenses, assigned licenses, and license renewal dates.

  • Create Company Create a new company with details such as name, address, contact information, and license allocation.

  • Update Company Update an existing company’s details, such as its status, total licenses, or license renewal date.

  • List Company Topics Fetch a list of topics associated with a specific company or across all companies, including topic names and video URLs.

  • List Company Activities Retrieve a list of activities associated with a company’s topics, including activity types and URLs.

Each endpoint in this category requires authentication via a Bearer token, which must be included in the Authorization header of your requests. For more details on authentication, refer to the Authentication Guide section.

Use Cases

The Company Management endpoints are typically used in the following scenarios:

  • Company Onboarding: Use the Create Company endpoint to onboard new companies (subscriptions) into the R1 Discover platform, setting up their initial details and license allocations.

  • License Management: Leverage the List Companies and Update Company endpoints to monitor and adjust license allocations.

  • Content Assignment: Use the List Company Topics and List Company Activities endpoints to retrieve and manage educational content (topics and activities) assigned to companies, enabling better program delivery.

  • Data Synchronization: Integrate these endpoints into your system to keep company data in sync with the R1 Discover platform, ensuring consistency across applications.

Best Practices

  • Authentication: Always include a valid Bearer token in the Authorization header to avoid 401 Unauthenticated errors.

  • Pagination: Endpoints like List Companies, List Company Topics, and List Company Activities support pagination parameters (page and limit). Use these to manage large datasets efficiently and avoid performance issues.

  • Sorting Options: Utilize the sortby parameter (e.g., in List Companies) to sort results in a way that best fits your application’s needs (e.g., oldest, newest, alphabetical).

  • Error Handling: Be prepared to handle common errors such as 401 Unauthenticated, 403 Unauthorized, and validation errors (e.g., missing required fields in Create Company). Refer to the individual endpoint documentation for detailed error responses.

  • Data Validation: When using Create Company or Update Company, ensure that required fields (e.g., name, status) are provided and conform to expected formats to avoid validation errors.

Integration Points

To effectively use the Company Management endpoints, ensure your application is properly authenticated. You will need to:

  1. Obtain an API Token: Follow the authentication flow to obtain a Bearer token. Refer to the Authentication overview for detailed steps.

  2. Set Up Headers: Include the following headers in your requests:

    • Content-Type: application/json

    • Accept: application/json

    • Authorization: Bearer {token}

These endpoints can be combined with other categories for more advanced integrations, such as:

  • Locations & Programs: After creating a company with the Create Company endpoint, use the Create/Update Location endpoint in the Locations & Programs category to add locations to the company.

  • User Management: Once a company is set up, use the Create/Update User endpoint in the User Management category to add users to the company, associating them with specific locations or programs.

  • Activity Results: Use the List Company Activities endpoint to retrieve activity IDs, then fetch detailed activity results using the List Activities endpoint in the Activity Results category.

Additional Resources

  • Postman Collection: Explore the full R1 Discover API Postman collection for pre-built requests and examples: R1 Discover API Postman Collection.

  • Support: For further assistance, contact the R1 Discover API support team at [email protected].

  • Changelog: Stay updated with the latest API changes by reviewing the API Changelog (#).

Last updated