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>
PUThttps://hermeticor.com/v1/loyalty/programs/{id}/wallet

Set up Apple and Google Wallet passes (secrets are write-only and stored sealed)

Parameters

idstringpathrequired

Request body

application/json
organizationNamestringrequired
backgroundColorstring
= #1f2937
foregroundColorstring
= #ffffff
labelColorstring
= #d1d5db
applePassTypeIdstring
appleTeamIdstring
appleCertPemstring
appleKeyPemstring
appleKeyPassphrasestring
appleWwdrPemstring
googleIssuerIdstring
googleServiceAccountJsonstring
logoPngBase64string
{
  "organizationName": "string",
  "backgroundColor": "#1f2937",
  "foregroundColor": "#ffffff",
  "labelColor": "#d1d5db",
  "applePassTypeId": "string",
  "appleTeamId": "string",
  "appleCertPem": "string",
  "appleKeyPem": "string",
  "appleKeyPassphrase": "string",
  "appleWwdrPem": "string",
  "googleIssuerId": "string",
  "googleServiceAccountJson": "string",
  "logoPngBase64": "string"
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/loyalty/programs/{id}/wallet" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"organizationName":"string","backgroundColor":"#1f2937","foregroundColor":"#ffffff","labelColor":"#d1d5db","applePassTypeId":"string","appleTeamId":"string","appleCertPem":"string","appleKeyPem":"string","appleKeyPassphrase":"string","appleWwdrPem":"string","googleIssuerId":"string","googleServiceAccountJson":"string","logoPngBase64":"string"}'
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
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
POSThttps://hermeticor.com/v1/loyalty/programs/{id}/passes

Issue (or fetch) a member card or reward pass and its install links

Parameters

idstringpathrequired

Request body

application/json
profileIdstringrequired
voucherIdstring
{
  "profileId": "string",
  "voucherId": "string"
}

Code samples

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

Responses

200 Default Response
Example
{
  "serialNumber": "string",
  "appleUrl": "string",
  "googleUrl": "string"
}
Schema
serialNumberstringrequired
appleUrlstringrequired
googleUrlstringrequired
POSThttps://hermeticor.com/v1/loyalty/programs/{id}/passes/{serial}/replace-link

Parameters

idstringpathrequired
serialstringpathrequired

Code samples

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

Responses

GEThttps://hermeticor.com/v1/loyalty/hub

Customer hub settings and its public URL

Code samples

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

Responses

200 Default Response
Example
{
  "enabled": true,
  "title": "string",
  "accentColor": "string",
  "shopUrl": "string",
  "programId": "string",
  "sections": {
    "orders": true,
    "wishlist": true,
    "recommendations": true,
    "loyalty": true,
    "preferences": true
  },
  "url": "string"
}
Schema
enabledbooleanrequired
titlestringrequired
accentColorstringrequired
shopUrlstring
programIdstring
sectionsobjectrequired
Show child parameters
ordersbooleanrequired
wishlistbooleanrequired
recommendationsbooleanrequired
loyaltybooleanrequired
preferencesbooleanrequired
urlstringrequired
PUThttps://hermeticor.com/v1/loyalty/hub

Request body

application/json
enabledbooleanrequired
titlestringrequired
accentColorstringrequired
shopUrlstring
programIdstring
sectionsobjectrequired
Show child parameters
ordersbooleanrequired
wishlistbooleanrequired
recommendationsbooleanrequired
loyaltybooleanrequired
preferencesbooleanrequired
{
  "enabled": true,
  "title": "string",
  "accentColor": "string",
  "shopUrl": "string",
  "programId": "string",
  "sections": {
    "orders": true,
    "wishlist": true,
    "recommendations": true,
    "loyalty": true,
    "preferences": true
  }
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/loyalty/hub" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":true,"title":"string","accentColor":"string","shopUrl":"string","programId":"string","sections":{"orders":true,"wishlist":true,"recommendations":true,"loyalty":true,"preferences":true}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · GET /v1/loyalty/hub

GEThttps://hermeticor.com/wallet/logo/{ws}/{file}

A programme's wallet logo (Google Wallet fetches it from here)

Parameters

wsstringpathrequired
filestringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/wallet/logo/{ws}/{file}"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
{}
GEThttps://hermeticor.com/loyalty/v1/program

Programme name, tiers and rewards for a storefront widget (no member data)

Parameters

programIdstringquery

Code samples

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

Responses

200 Default Response
Example
{
  "id": "string",
  "name": "string",
  "pointsName": "string",
  "tiers": [
    {
      "id": "string",
      "name": "string",
      "threshold": 0,
      "benefits": [
        "string"
      ]
    }
  ],
  "rewards": [
    {
      "id": "string",
      "name": "string",
      "description": "string",
      "cost": 0
    }
  ]
}
Schema
idstringrequired
namestringrequired
pointsNamestringrequired
tiersobject[]required
Show child parameters
idstringrequired
namestringrequired
thresholdintegerrequired
benefitsstring[]required
rewardsobject[]required
Show child parameters
idstringrequired
namestringrequired
descriptionstringrequired
costintegerrequired
GEThttps://hermeticor.com/wallet/install/{token}

Add a pass to Apple Wallet (download) or Google Wallet (redirect)

Parameters

tostringqueryrequired
apple | google
tokenstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/wallet/install/{token}?to=apple"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
{}
POSThttps://hermeticor.com/wallet/apple/{ws}/v1/devices/{device}/registrations/{passType}/{serial}

Parameters

wsstringpathrequired
devicestringpathrequired
passTypestringpathrequired
serialstringpathrequired

Request body

application/json
pushTokenstringrequired
{
  "pushToken": "string"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/wallet/apple/{ws}/v1/devices/{device}/registrations/{passType}/{serial}" \
  -H "Content-Type: application/json" \
  -d '{"pushToken":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Default Response
{}

Updated