> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

These APIs are designed to be leveraged by integrating partners and merchants
to fulfill a variety of non-consumer UX integration use-cases. If you are a new
partner that is interested in establishing a partnership and building technical
integration with the Thanx platform, please reach out to
<a href="mailto:partnerships@thanx.com">[partnerships@thanx.com](mailto:partnerships@thanx.com)</a>.

For partners who already have API access, each API credential is configured
with an agreed upon scope — granting access to a subset of the API endpoints
available. Each partnership API endpoint has a section describing the required
scopes. The [GET /scopes](/partner/metadata/get-scopes) endpoint can be used to
list the scopes your API credentials have access to.

## Environments

All integrations should be developed against the sandbox Thanx API environment. Before production API credentials are issued, integrations should be certified with the Thanx team.

The Partner API is served from the following base URLs:

| Environment | Base URL                       |
| ----------- | ------------------------------ |
| Sandbox     | `https://api.thanxsandbox.com` |
| Production  | `https://api.thanx.com`        |

Partner API endpoints are served under the `/partner/*` path prefix (for example, `https://api.thanxsandbox.com/partner/locations`).

All examples in this reference use the sandbox base URL. Swap in the production URL once your integration has been certified and production credentials have been issued.

## Certification

Once your integration has been built and developed against the sandbox
environment, please reach out to
<a href="mailto:developer.support@thanx.com">[developer.support@thanx.com](mailto:developer.support@thanx.com)</a>
go through a lightweight but mandatory certification process. For basic
integration use-cases, certification is quick and normally takes no more than
a few days depending on the scope of integration. This process is mainly
designed to ensure the integration is working as intended without risking any
negative impact on live customers (merchant or consumer).

Each net new integration use-case should be re-certified as new use-cases will
very likely require different scoping.

Launching new merchants on certified integration use-cases does not require
re-certification.

### Product Guide

<Snippet file="certification/product-guide.mdx" />

## Access

Upon gaining access to the Thanx APIs, integration partners will be issued the
following:

* Client ID - used in the required `X-ClientId` header
* Access Token - used in the required `Authorization` header

These credentials grant access to all merchants that have explicitly opted into
the specified integration. All merchants accessible to these credentials can be
listed in [GET /merchants](/partner/metadata/get-merchants).

## Headers

| HEADER           | Value                   | Description                                                                                                                                                                                     |
| ---------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Authorization`  | `Bearer {access_token}` | This value should be set to provided access token                                                                                                                                               |
| `X-ClientId`     | `{client_id}`           | This value should be set to the provided client ID                                                                                                                                              |
| `Accept-Version` | `v4.0`                  | This value **must** be specified in API calls. This denotes the current API version that is in use. Any other value specified will cause undefined behavior and may risk API access revokation. |
| `Content-Type`   | `application/json`      | This value specifies the request body format. Only JSON is supported at this time.                                                                                                              |
| `User-Agent`     | `{partner}/1.0.0`       | This value should be set to something that indicates the name of the partner. This is useful for debugging purposes.                                                                            |

## Postman API Collection

Here you will find the **Partner API Postman Collection** to import directly within your API testing tool.
This collection is already completed and includes sample values for the credentials.

Please replace them with the ones provided by your Thanx representative in order to achieve successful API calls.

<a href="/assets/Partner_API_Postman_Collection.json" download>
  Download Postman Collection
</a>

## Global Rate Limits

Integration partners should not exceed a rate of 5 requests per second and
2,000 requests per 15 minutes. These default rate limits are hard-limits and
APIs will return `429 Too Many Requests` once these limits are crossed.

Rate-limited API requests can and should be retried. One such strategy to handle
this is through an exponential backoff strategy.

Should your specific integration use-case require higher API throughput, please
reach out to <a href="mailto:developer.support@thanx.com">[developer.support@thanx.com](mailto:developer.support@thanx.com)</a>
to request an increase to these default values.
