API Reference

Tyms' API uses a simple and secure method for authentication - the secret API key. This key should be included in the headers of your API requests to ensure that only authorized users can access your account.

Some notes about Tyms' API keys:

  1. Secret API keys should be kept secure and should not be surfaced publicly.
  2. Tyms provides separate keys for sandbox and production data. The production API key grants access to real-time data, while the sandbox API key grants access to test data. Make sure that you always use each key in its correct environment.

Visit the Tyms Dashboard to retrieve your API keys.

API environments

Tyms' API operates in two environments: sandbox and production.

EnvironmentUsageURL
SandboxTo facilitate development and enable thorough testing of Tyms' features, without any impact on actual data.https://staging-api.tymsbook.com/
ProductionTo access real-time data when your product is ready to go live.https://api.tyms.io/

Requests

The Tyms' API accepts POST and GET requests. Your requests must follow these formal requirements:

  • The authorization header must contain your secret API key.
  • The request body must be in valid JSON format.

Responses

The Tyms API responds with HTTP codes to indicate status and errors. The API provides all responses in standard JSON format.

{
  "status": "success",
  "message": "Authorization request initiated successfully",
  "data": "https://tymsbook-web.web.app/auth?client_id=tyms_pub_e7cad0bd-3d11-4646-8b02-b62441c9c204?redirect_url=https://tymsbook-web.web.app/dashboard/home?code=192303"
}

Pagination

Endpoint operations that return multiple data sets, for example: "Get all sales" use paginated responses. Use the limit and page parameters to control the number of results that you want to receive in a response:

limit limits the number of results that the API returns in a single page. If you do not specify a value for this parameter, the API will limit the response to 10 results per page.