For the complete documentation index, see llms.txt. This page is also available as Markdown.

Core Concepts

Overview

This section explains the fundamental concepts and patterns used throughout our API. Understanding these principles will help you build robust integrations that work efficiently with our platform.


HATEOAS Principles

Our API follows HATEOAS (Hypermedia as the Engine of Application State) principles. This means responses include hyperlinks that guide you to related resources, reducing the need to construct URLs manually.

Benefits

  • Discoverability - Navigate the API through links rather than hardcoding URLs

  • Flexibility - URL structures can evolve without breaking your integration

  • Self-documenting - Relationships between resources are explicit

Every link in our API follows this format:

json

{
  "href": "v1/organization/employees/123"
}

Important: All href values are relative paths from the base URL. You need to prepend the base URL to construct the full URL.

Example:


Resource Structures

Our API returns two types of resource representations: lists and detail views.

List Resources

List endpoints return collections of resources with pagination support and navigation links.

Structure:

json

Fields:

Field
Type
Description

items

array

Array of resource objects

total

integer

Total number of resources matching the query (across all pages)

self

object

Link to the current page

next

object

Link to the next page (null if on last page)

previous

object

Link to the previous page (null if on first page)

Detail Resources

Detail endpoints return a single resource with complete information and links to related resources.

Structure:

json

Key characteristics:

  • Every detail resource includes a self link pointing to itself

  • Related resources include their id and basic information

  • Related resources include a self link for fetching full details

  • Collection references (like items in the example) include an href to the collection endpoint


Pagination

All list endpoints support pagination to handle large datasets efficiently.

Parameters

Parameter
Type
Required
Default
Description

limit

integer

No

100

Number of items per page (min: 1)

offset

integer

No

0

Number of items to skip (min: 0)

Maximum limit: Varies by endpoint, typically 1000 items per page. Check the specific endpoint documentation for limits.

Example Requests

First page (default):

Second page:

Custom page size:

Using Navigation Links

The simplest way to paginate is to follow the next and previous links in the response.

javascript

You can also calculate pagination manually.

Pagination Best Practices

  • Use consistent page sizes - Don't change limit mid-iteration

  • Follow navigation links - They handle edge cases automatically

  • Check the total field - Useful for progress indicators and estimating completion time

  • Handle empty pages gracefully - items will be an empty array when no results match


Date Filtering

Many endpoints support date-based filtering to retrieve only new or recently modified resources. This is essential for efficient polling and synchronization.

Date Format

All dates must be provided in ISO 8601 format with UTC timezone:

Examples:

  • 2026-01-15T00:00:00Z - January 15, 2026 at midnight UTC

  • 2026-02-06T14:30:45Z - February 6, 2026 at 2:30:45 PM UTC

Common Date Filter Parameters

The available date filters vary by endpoint, but these are the most common:

Parameter
Description
Example

after

Resources created/updated after this date

?after=2026-01-01T00:00:00Z

before

Resources created/updated before this date

?before=2026-02-01T00:00:00Z

createdAfter

Resources created after this date

?createdAfter=2026-01-15T00:00:00Z

createdBefore

Resources created before this date

?createdBefore=2026-01-31T23:59:59Z

updatedAfter

Resources updated after this date

?updatedAfter=2026-02-01T00:00:00Z

updatedBefore

Resources updated before this date

?updatedBefore=2026-02-06T23:59:59Z

Check the specific endpoint documentation in the API Reference to see which date filters are available for each resource.

Example Requests

Get all employees created today:

Combining Date Filters with Pagination

Date filters work seamlessly with pagination:

The next and previous links will automatically include your date filters (also apply for other optional filters).


Polling Strategy

Date filtering enables efficient polling to keep your system synchronized with our platform.

javascript

Polling Best Practices

  • Use updatedAfter filters - Only fetch resources that have changed

  • Store the last sync timestamp - Persist it across application restarts

  • Handle pagination - Changes might span multiple pages

  • Choose appropriate intervals - Balance freshness vs. API load

    • Real-time needs: Every 1-5 minutes

    • Regular updates: Every 15-30 minutes

    • Batch processing: Hourly or daily

  • Use UTC timestamps - Avoid timezone-related issues

  • Add a small overlap - Subtract a few seconds from lastSync to account for clock drift

Initial Synchronization

For the first sync, you might want to fetch all historical data:

javascript

Example POST request:

bash

Date and Time Format

  • Format: ISO 8601 with UTC timezone

  • Pattern: YYYY-MM-DDTHH:MM:SSZ

  • Example: 2026-02-06T14:30:00Z

All datetime fields in requests and responses use this format.

Null Values

  • Missing optional fields are typically omitted from responses

  • When explicitly null, fields appear as: "fieldName": null

  • Empty arrays appear as: "items": []

  • Empty objects appear as: "metadata": {}


Resource Relationships

Resources in our API often reference other resources. We provide links to navigate these relationships efficiently.

Embedded References

Some related resources are embedded with basic information:

json

To get complete customer details, follow the self link:

javascript


Filtering and Sorting

Beyond date filters, many endpoints support additional filtering and sorting options.

Common Filter Parameters

Check the API Reference for endpoint-specific filters, but these are commonly available:

Parameter
Description
Example

status

Filter by status

?status=active

Combining Filters

Multiple filters can be combined:

Sorting

Some endpoints support sorting (check API Reference for availability):

Best Practices

Efficient API Usage

  1. Use date filters for polling - Don't fetch all resources repeatedly

  2. Follow HATEOAS links - Let the API guide navigation

  3. Respect pagination limits - Don't request excessive page sizes

  4. Cache when appropriate - Store stable data locally

  5. Batch requests when possible - Reduce round trips

Handling Changes

  1. Track updatedAt timestamps - Identify what changed since last sync

  2. Handle deletions gracefully - Deleted resources return 404

  3. Check status fields - Resource states can change (e.g., order cancelled)

  4. Verify relationships - Related resources might be deleted or modified

Performance Considerations

  1. Avoid unnecessary detail fetches - List responses often contain enough information

  2. Parallelize independent requests - Fetch unrelated resources simultaneously

  3. Use appropriate polling intervals - Balance freshness vs. load

  4. Implement exponential backoff - For retry logic on errors

We Value Your Feedback

We're continuously improving our API based on developer feedback. If you find that:

  • Important information is missing from embedded resource references

  • You need to make excessive API calls to gather related data

  • Specific filters or query parameters would improve your workflow

  • Any concept needs better documentation

Please don't hesitate to reach out to our support team. Your input directly influences our API development.

Last updated

Was this helpful?