loyalty

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-loyalty"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/c47a3b2d-9cb6-4aa8-8a09-6a1cefb21e33/social-card.svg?v=3e7ae33eec8b" alt="loyalty" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/loyalty/programs/{id}/members/{profileId}

Parameters

idstringpathrequired
profileIdstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/loyalty/programs/{id}/members/{profileId}" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "programId": "string",
  "profileId": "string",
  "balance": 0,
  "lifetimePoints": 0,
  "tierId": "string",
  "tierName": "string",
  "expiringSoon": 0,
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}
Schema
programIdstringrequired
profileIdstringrequired
balanceintegerrequired
lifetimePointsintegerrequired
tierIdstringrequired
tierNamestringrequired
expiringSoonintegerrequired
createdAtstringrequired
updatedAtstringrequired
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
GEThttps://hermeticor.com/v1/loyalty/programs/{id}/members/{profileId}/vouchers

Parameters

limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page
idstringpathrequired
profileIdstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/loyalty/programs/{id}/members/{profileId}/vouchers" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "programId": "string",
      "profileId": "string",
      "rewardId": "string",
      "code": "string",
      "status": "issued",
      "usedAt": "2024-01-01T00:00:00Z",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem235[]required
Show child parameters
idstringrequired
programIdstringrequired
profileIdstringrequired
rewardIdstringrequired
codestringrequired
statusstringrequired
issued | used | cancelled
usedAtstringrequired
createdAtstringrequired
nextCursorstringrequired
GEThttps://hermeticor.com/v1/loyalty/programs/{id}/transactions

The points ledger (append-only), newest first

Parameters

limitintegerquery
= 50
cursorstringquery
profileIdstringquery
kindstringquery
earn | redeem | adjust | expire | reverse
idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/loyalty/programs/{id}/transactions" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "programId": "string",
      "profileId": "string",
      "delta": 0,
      "kind": "earn",
      "reason": "string",
      "sourceKey": "string",
      "ruleId": "string",
      "rewardId": "string",
      "expiresAt": "2024-01-01T00:00:00Z",
      "balanceAfter": 0,
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsItemsItem236[]required
Show child parameters
idstringrequired
programIdstringrequired
profileIdstringrequired
deltaintegerrequired
kindstringrequired
earn | redeem | adjust | expire | reverse
reasonstringrequired
sourceKeystringrequired
ruleIdstringrequired
rewardIdstringrequired
expiresAtstringrequired
balanceAfterintegerrequired
createdAtstringrequired
nextCursorstringrequired
POSThttps://hermeticor.com/v1/loyalty/programs/{id}/adjust

Add or remove points by hand (send `key` to make a retry count once)

Parameters

idstringpathrequired

Request body

application/json
profileIdstringrequired
deltaintegerrequired
reasonstringrequired
keystring
{
  "profileId": "string",
  "delta": 0,
  "reason": "string",
  "key": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/loyalty/programs/{id}/adjust" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profileId":"string","delta":0,"reason":"string","key":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "programId": "string",
  "profileId": "string",
  "delta": 0,
  "kind": "earn",
  "reason": "string",
  "sourceKey": "string",
  "ruleId": "string",
  "rewardId": "string",
  "expiresAt": "2024-01-01T00:00:00Z",
  "balanceAfter": 0,
  "createdAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
programIdstringrequired
profileIdstringrequired
deltaintegerrequired
kindstringrequired
earn | redeem | adjust | expire | reverse
reasonstringrequired
sourceKeystringrequired
ruleIdstringrequired
rewardIdstringrequired
expiresAtstringrequired
balanceAfterintegerrequired
createdAtstringrequired
POSThttps://hermeticor.com/v1/loyalty/programs/{id}/redeem

Spend points on a reward; returns the coupon code

Parameters

idstringpathrequired

Request body

application/json
profileIdstringrequired
rewardIdstringrequired
keystring
{
  "profileId": "string",
  "rewardId": "string",
  "key": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/loyalty/programs/{id}/redeem" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profileId":"string","rewardId":"string","key":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "id": "string",
  "programId": "string",
  "profileId": "string",
  "rewardId": "string",
  "code": "string",
  "status": "issued",
  "usedAt": "2024-01-01T00:00:00Z",
  "createdAt": "2024-01-01T00:00:00Z"
}
Schema
idstringrequired
programIdstringrequired
profileIdstringrequired
rewardIdstringrequired
codestringrequired
statusstringrequired
issued | used | cancelled
usedAtstringrequired
createdAtstringrequired
POSThttps://hermeticor.com/v1/loyalty/vouchers/{id}/use

Mark a reward code used (also redeems the coupon code)

Parameters

idstringpathrequired

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/loyalty/vouchers/{id}/use" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

GEThttps://hermeticor.com/v1/loyalty/programs/{id}/wallet

Wallet pass settings (never the certificate or keys)

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/loyalty/programs/{id}/wallet" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "programId": "string",
  "organizationName": "string",
  "backgroundColor": "string",
  "foregroundColor": "string",
  "labelColor": "string",
  "applePassTypeId": "string",
  "appleTeamId": "string",
  "appleReady": true,
  "googleIssuerId": "string",
  "googleReady": true,
  "logoUrl": "string"
}
Schema
programIdstringrequired
organizationNamestringrequired
backgroundColorstringrequired
foregroundColorstringrequired
labelColorstringrequired
applePassTypeIdstringrequired
appleTeamIdstringrequired
appleReadybooleanrequired
googleIssuerIdstringrequired
googleReadybooleanrequired
logoUrlstringrequired

Updated