Overview
This guide explains how to integrate subscriber ingestion using the Thanx Partner API. This integration allows partners and merchants to programmatically opt email addresses into a merchant’s Thanx loyalty marketing. Common use cases include syncing newsletter signups, importing CRM contacts, connecting email marketing platforms, and ingesting subscribers from website signup forms. The integration is entirely server-to-server. Partners submit subscriber information on behalf of merchants, and Thanx handles targeted loyalty outreach to encourage full loyalty program enrollment. This is one of the simplest Thanx API integrations — it requires a single endpoint and minimal configuration.Credentials You Will Need
For this kind of integration, you will be provided the following credentials:- Client ID — used in the
X-ClientIdheader - Access Token — used in the
Authorizationheader
subscribers.write scope. Use the Get Scopes endpoint to verify which scopes your credentials have access to.
All API requests must include the required headers documented in the Partner API Overview — including Authorization, X-ClientId, Accept-Version, Content-Type, and User-Agent.
Endpoints We Will Be Using
The following endpoints are required for this integration:- Get Merchants — Retrieve your merchant ID
- Create Subscriber — Opt an email address into a merchant’s loyalty marketing
Postman API Collection
Here you will find the Partner API Postman Collection to import directly within your API testing tool. This collection includes sample values for credentials. Replace them with those provided by your Thanx representative to ensure successful API calls. Partner API Postman CollectionAPI Interaction Workflow
Integration Flow
1 — Setup & Discovery
Before creating subscribers, the partner must retrieve the merchant ID for the merchant whose loyalty marketing subscribers will be opted into. Call the Get Merchants endpoint to retrieve the list of merchants that have opted into the integration. Each merchant in the response includes anid that is required when creating subscribers.
For single-merchant integrations, this only needs to be done once. The merchant ID can then be stored and reused for all subsequent subscriber creation requests.
Endpoints used in this step:
- Get Merchants Lists all merchants accessible to the integration partner.
-
Get Scopes (Optional)
Verifies which API scopes your credentials have access to. Useful for confirming
subscribers.writeis available.
2 — Creating Subscribers
This is the core action. When a user signs up for a newsletter, submits a form, or is otherwise identified as a marketing prospect, the partner calls the Create Subscriber endpoint to opt them into the merchant’s Thanx loyalty marketing. The request requires:merchant_id— The merchant to subscribe the user toemail— The subscriber’s email address
first_name— Subscriber’s first namelast_name— Subscriber’s last namebirth_date— Subscriber’s birth date as a nested object:{ "month": 8, "day": 14 }zip_code— Subscriber’s zip code
subscriber key in the request body. See the Create Subscriber endpoint reference for the exact payload structure.
Important behavior notes:
- The endpoint responds with
201 Createdfor any valid email address, even if the email already exists in the system. This is by design — it prevents unintentional PII exposure for existing records. - The response only contains the accepted email address.
- The only time the endpoint returns
400 Bad Requestis when the input email address is invalid. - All subscriber information submitted via API must have explicit user consent to participate in the merchant’s marketing.
- Create Subscriber Opts an email address into the specified merchant’s loyalty marketing.
Subscriber vs. User
It is important to understand the distinction between a subscriber and a user in the Thanx platform:| Subscriber | User | |
|---|---|---|
| Created via | POST /partner/subscribers (Partner API) | POST /users (Consumer API) |
| What they receive | Targeted marketing from the merchant to encourage loyalty enrollment | Full loyalty program access: rewards, points, tiers, cards |
| Requirements | Email address + marketing consent | Full enrollment flow with legal requirements (card linkage, ToS acceptance) |
| Complexity | Low — single endpoint | High — requires Consumer API integration with SSO, card enrollment, legal compliance |
Rate Limits
Integration partners should not exceed a rate of 5 requests per second and 2,000 requests per 15 minutes. These are hard limits and the API will return429 Too Many Requests once exceeded.
Rate-limited requests can and should be retried. One such strategy is through an exponential backoff approach.
Should your specific integration use-case require higher API throughput, please reach out to developer.support@thanx.com to request an increase.
Certification
Before receiving production credentials, all integrations must go through Thanx’s certification process. For subscriber ingestion, the certification team will validate the following:Interactions
- Subscriber creation with valid email addresses
- Handling of optional subscriber fields (name, birth date, zip code)
- Bulk ingestion workflow (if applicable)
- Ongoing sync mechanism (if applicable)
API
- Requests include all required headers
- Requests are not unnecessarily duplicated
- Error messages are handled gracefully
- Requests are issued at a reasonable frequency (e.g., not rapidly submitting the same email)
Consent
- All subscriber data submitted to Thanx has explicit user consent for the merchant’s marketing
- Partners do not submit email addresses obtained without proper opt-in
Additional Endpoints to Enhance the Experience
| Endpoint | Purpose |
|---|---|
| Get Merchants | Retrieve the list of merchants accessible to the integration. Use this to populate merchant selection in your platform. |
| Get Locations | Retrieve locations for accessible merchants. Useful if your platform operates at the location level rather than the merchant level. |
| Get Scopes | Verify which API scopes your credentials have access to. Useful for onboarding diagnostics. |