Promotion Memberships

Promotion Memberships represents an Account's membership to a Promotion . Each Promotion Membership carries progress towards completing the Promotion. Promotion Memberships are created automatically for the account when a Loyalty Program Membership is created.

Promotion Membership Model

Attributes

  • id

    string

    The unique identifier for the Promotion Membership.

  • accountId

    string

    The ID of the Account that has the membership to the Promotion.

  • name

    string

    The display name of the Promotion.

  • programId

    string

    The ID of the Loyalty Program that the Promotion belongs to.

  • promotionId

    string

    The ID of the Promotion.

  • summary

    string

    The display summary for the Promotion.

  • mediaUploadId

    string

    The ID of the Media Upload image of the Promotion.

  • img

    string

    The img URL of the Promotion.

  • startsAt

    timestamp

    The timestamp of when the Promotion starts.

  • endsAt

    timestamp

    The timestamp of when the Promotion ends.

  • rewards

    array

    A list of Rewards that the account will receive upon completing the Promotion.

  • eventType

    string

    The type of Event that will trigger increments and completions of the Promotion.

  • target

    object

    Describes how to complete the promotion. See Promotion Target .

  • type

    string

    The type of Promotion. Can be cashback or challenge. challenge rewards the account once, after the challenge target is met. cashback gives a reward based on the payment amount, which can be completed an unlimited number of times.

  • conditions

    array

    The list of Conditions that need to be met when incrementing/completing the Promotion.

  • description

    string

    Displayable description for the Promotion.

  • progress

    number

    The Account's progress towards completing the Promotion.

  • status

    number

    The status of the Promotion Membership. Can be "active", "expired", or "complete".

  • createdAt

    string

    The timestamp of when the Promotion Membership was created.

  • createdBy

    crn

    The User or API Key that created the Promotion Membership.

  • modifiedAt

    string

    The timestamp of when the Promotion Membership was last modified.

  • modifiedBy

    crn

    The User or API Key that last modified the Promotion Membership.

  • test

    boolean

    true if the promotion membership is for testing purposes only.


List Promotion Memberships by Account experimental

Returns a paginated list of Promotion Memberships for an Account

Request
curl -X GET \
https://service.centrapay.com/api/accounts/57SyRRgZ1U8Kq2wKpCnSR5/promotion-memberships \
-H 'x-api-key: <TOKEN>'
Response
{
"items": [
{
"id": "8aoMfscvtuewsuJzmzBzAs",
"accountId": "57SyRRgZ1U8Kq2wKpCnSR5",
"programId": "WRhAxxWpTKb5U7pXyxQjjY",
"promotionId": "8aoMfscvtuewsuJzmzBzAs",
"name": "Spend a Buck",
"summary": "Make a payment",
"mediaUploadId": "26yUWG6wFgmva8UaDiCTWq",
"img": "https://media-upload.centrapay.com/image.png?jhbdsfau67ewejshb=487hsdjhbdgs743",
"startsAt": "2023-02-16T00:47:54.131Z",
"endsAt": "2024-02-16T00:47:54.131Z",
"rewards": [
{
"assetType": "centrapay.nzd.main",
"amount": "500"
}
],
"eventType": "payment",
"target": {
"type": "count",
"amount": 1
},
"type": "challenge",
"conditions": [
{
"field": "amount",
"value": "99",
"operator": "greater-than"
}
],
"description": "The amount of the payment must be greater than $1.",
"createdAt": "2023-02-08T04:04:27.426Z",
"createdBy": "crn::user:1234",
"modifiedAt": "2023-02-08T04:04:27.426Z",
"modifiedBy": "crn::user:1234",
"progress": 0,
"status": "active",
"test": true
}
]
}