Partner API
Credit WellPoints to one of your members with a single authenticated request. No API of your own required — you call us. Most teams integrate in an afternoon.
When one of your members chooses to move points to Wellthie, you deduct the points on your side as you normally would, then make one HTTPS POST to Wellthie to credit them. That single call is the whole integration.
You send us the number of your points the member moved — we convert to WellPoints at the rate agreed during onboarding. You don’t calculate WellPoints yourself.
Wellthie issues you a secret API key during onboarding. Contact us to get one. Keep it server-side only — never embed it in a mobile app or web page.
Your Wellthie partner account must be active before credits are accepted. An inactive account returns a 401 “partner account is not active.”
Every request is authenticated with your API key, sent in the x-api-token header.
x-api-token: YOUR_API_KEY| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | The member’s email (must match their Wellthie account). | |
| partner_points | number | Yes | How many of your points the member moved. We convert. |
| reference_id | string | Yes | Your unique id for this transfer. Enables safe retries (see Idempotency). |
| description | string | No | Optional note stored with the transfer. |
description has a 500-character limit. Sending unknown/extra fields will return a 400 — send only the fields listed above.
POST https://server.wellthie.me/api/points/credit
x-api-token: YOUR_API_KEY
Content-Type: application/json
{
"email": "member@example.com",
"partner_points": 1000,
"reference_id": "your-unique-id-123",
"description": "Points moved to Wellthie"
}200 OK
{
"status": { "code": 200, "success": true },
"data": {
"status": "credited",
"transfer_id": "9f905f94-...",
"user_id": "3c1e8f20-...",
"wellpoints_credited": 500,
"new_balance": 700,
"reference_id": "your-unique-id-123"
},
"error": null,
"message": "WellPoints credited successfully"
}curl -X POST https://server.wellthie.me/api/points/credit \
-H "x-api-token: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"member@example.com","partner_points":1000,"reference_id":"txn-123","description":"Moved to Wellthie"}'await fetch("https://server.wellthie.me/api/points/credit", {
method: "POST",
headers: {
"x-api-token": process.env.WELLTHIE_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
email: member.email,
partner_points: pointsMoved,
reference_id: transferId,
description: "Points moved to Wellthie",
}),
});import requests
requests.post(
"https://server.wellthie.me/api/points/credit",
headers={"x-api-token": WELLTHIE_API_KEY},
json={
"email": member_email,
"partner_points": points_moved,
"reference_id": transfer_id,
"description": "Points moved to Wellthie",
},
)Send a unique reference_id for every transfer — any string that’s unique on your side (your own transfer or order id works well).
Safe retries
| Status | Meaning | What to do |
|---|---|---|
| 200 credited | Points credited to the member. | Done. Show success. |
| 200 already_processed | You already sent this reference_id. | Treat as success (safe retry). |
| 400 | A field is missing or invalid, or the member’s account is inactive. | Check email / partner_points / reference_id, and check member status. |
| 401 | API key wrong/missing, or account inactive. | Check the x-api-token header / your account status. |
| 404 no_member | No Wellthie account with that email. | Ask the member to sign up / use their Wellthie email. |
| 409 ambiguous_email | Multiple Wellthie accounts share this email. | Rare — contact Wellthie; we resolve which account to credit. |
Your API key can create value