Skip to main content
POST
/
v1
/
loyalty
/
program_events
Create a loyalty program event
curl --request POST \
  --url https://api.yorlet.com/v1/loyalty/program_events \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "loyalty_program": "<string>",
  "recipient": {
    "type": "customer",
    "customer": "<string>"
  },
  "expires_at": 123,
  "loyalty_program_override": {
    "points": 123
  },
  "statement_descriptor": "<string>"
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "loyalty.program_event",
  "expires_at": 123,
  "loyalty_program": "<string>",
  "loyalty_program_override": {
    "points": 123
  },
  "recipient": {
    "type": "customer",
    "customer": "<string>"
  },
  "statement_descriptor": "<string>",
  "status": "expired",
  "value": 123,
  "account": "<string>",
  "deleted": false,
  "earn_rate": {
    "spend_amount": 123
  }
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
loyalty_program
string
required

The loyalty program ID.

recipient
object
required
earn_rate
object
expires_at
integer | null

The date and time the points expire.

loyalty_program_override
object

The number of points to award. If provided, this will override the default points set on the loyalty program.

statement_descriptor
string | null

The statement descriptor. This appears on the customer's statement. If provided, this overrides the statement descriptor set on the loyalty program.

Response

200 - application/json

Create a loyalty program event

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
loyalty.program_event
expires_at
integer | null
required

The date and time the points expire.

loyalty_program
string
required

The loyalty program ID.

loyalty_program_override
object
required

The number of points to award. If provided, this will override the default points set on the loyalty program.

recipient
object
required
statement_descriptor
string | null
required

The statement descriptor. This appears on the customer's statement. If provided, this overrides the statement descriptor set on the loyalty program.

status
enum<string>
required

The status of the event.

Available options:
expired,
pending,
succeeded
value
number | null
required

The points value of the event.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

earn_rate
object