Loyalty API

Get a loyalty customer's points balance

GET

The Loyalty API is currently in beta.

Please contact our Support Team via our JIRA Service Desk for access to the Beta. If you don’t have access, please contact your account administrator for assistance.

Not yet integrated with Primer and interested in learning more? Contact us.

Create an API key with the loyalty-transactions:read scopes.

Get a loyalty customer by ID and connection ID. This includes the customer’s points balance.

The connectionId is the unique Primer identifier for your loyalty provider connection. Primer will provide this once the loyalty provider connection is created.

The customerId refers to the customer identifier on the loyalty provider’s side.

Path parameters

idstringRequired
The unique identifier for the customer on the loyalty provider.

Query parameters

connectionIdstringRequired
ID of the Primer connection configuration.

Response

This endpoint returns an object
id
stringOptional
The unique identifier for the customer on the loyalty provider.
connectionId
stringOptional
ID of the Primer connection configuration.
connectionName
stringOptional
Name of the loyalty provider.
balance
integerOptional
The loyalty customer's points balance.

Errors

GET
$curl -G https://api.sandbox.primer.io/loyalty-customers/string \
> -H "X-API-KEY: <apiKey>" \
> -d connectionId=string
Response
1{}