Global Endpoints (System)

An overview of the global endpoint collection.

Overview of Global Endpoints

The Global Endpoints category in the R1 Discover API provides a set of system-wide utilities that support broader operations across the platform. These endpoints are designed to retrieve foundational data and metadata that can be used across various other API categories, such as company management, user management, or activity tracking. They are particularly useful for initializing your application, ensuring proper configuration, and accessing universal reference data like country codes or API endpoint metadata. Proper utilization of these endpoints ensures that your integration can dynamically adapt to the R1 Discover ecosystem, retrieve necessary system-level information, and maintain compatibility with the API's structure.

Endpoints in This Category The "Global Endpoints" collection includes the following endpoints:

  • List API Endpoints (#list-api-endpoints) Retrieve a comprehensive list of all available API endpoints in the R1 Discover API. This is useful for dynamically discovering the API's capabilities and ensuring your application stays up-to-date with the latest endpoints.

  • List Countries (#list-countries) Fetch a list of supported countries, including their ISO country codes and names. This endpoint is essential for populating country selection fields in forms, such as when creating or updating company locations.

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 Overview on the R1 API: Getting Started page.

Use Cases

The Global Endpoints are typically used in the following scenarios:

  • API Discovery: Use the List API Endpoints endpoint to programmatically discover all available endpoints, which is particularly helpful for building dynamic integrations or generating client libraries.

  • Form Population: Leverage the List Countries endpoint to populate dropdowns or selection fields with valid country codes and names, ensuring consistency when managing company or user data.

  • System Integration: These endpoints provide foundational data that can be cached or used to initialize your application, reducing the need for hard-coded values and improving maintainability.

Best Practices

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

  • Pagination: Both endpoints support pagination parameters (page and limit). Use these to manage large datasets efficiently and avoid overwhelming your application with too much data at once.

  • Error Handling: Be prepared to handle common errors such as 401 Unauthenticated, 403 Unauthorized, and 500 Server Error. Refer to the individual endpoint documentation for detailed error responses.

  • Caching: Since the data returned by these endpoints (e.g., country lists or API metadata) is relatively static, consider caching the responses to reduce unnecessary API calls and improve performance.

Integration Points

To effectively use the Global 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 Guide (#) for detailed steps.

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

    • Content-Type: application/json

    • Accept: application/json

    • Authorization: Bearer {token}

For more advanced integrations, you can combine these endpoints with other categories, such as:

  • Company Management: Use the List Countries endpoint to populate country fields when creating or updating a company via the Create Company or Update Company endpoints.

  • Dynamic API Clients: Use the List API Endpoints endpoint to build a dynamic API client that automatically adapts to changes in the R1 Discover API structure.

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