Skip to main content
POST
/
loyalty-transactions
Create a loyalty transaction
curl --request POST \
  --url https://api.sandbox.primer.io/loyalty-transactions \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "connectionId": "waon-123",
  "customerId": "waon-customer-123",
  "orderId": "order-123",
  "value": 200,
  "type": "REDEMPTION"
}'
{
  "date": "2023-01-01",
  "id": "t101",
  "connectionId": "waon-123",
  "orderId": "order-123",
  "customerId": "waon-customer-123",
  "connectionTransactionId": "waonTx1",
  "connectionName": "WOAN",
  "type": "REDEMPTION",
  "value": 200
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
connectionId
string<uuid>
required

ID of the Primer connection configuration.

customerId
string
required

The unique identifier for the customer on the loyalty provider.

orderId
string
required

Unique identifier for the order.

value
integer
required

The value of points to redeem.

type
enum<string>

The type of the transaction.

Available options:
REDEMPTION,
REFUND

Response

Successful Response

date
string<date-time>

Creation date & time of the transaction (UTC)

id
string

Unique Primer identifier for the loyalty transaction.

connectionId
string<uuid>

ID of the Primer connection configuration.

customerId
string

The unique identifier for the customer on the loyalty provider.

orderId
string

Unique identifier for the order.

connectionTransactionId
string

ID of the transaction on the loyalty provider's side.

connectionName
string

Name of the loyalty provider.

type
enum<string>

The type of the transaction.

Available options:
REDEMPTION,
REFUND
value
integer

The value of the transaction.