Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

this page is in progress

Purpose

The Update Points Balance endpoint is used to add or remove loyalty points from a customer’s account. This endpoint can be leveraged by Gamification partners such as Brame to be able assign loyalty points to a customer that has successfully played a game. For more information on Brame, please refer to: Gamification Offer and Points Assignment via Brame.

Request format

Endpoint

POST /loyalty/user/{loyaltyUserId}/points

Headers

As documented here: Loyalty API - Getting Started.

Body

  • points <integer>: positive value: Will award points to the user. Negative value: Will remove points from the user’s account.

  • partner <enum>: please, contact your RBI Representative to get your assigned partner ID.

  • reference <string>: reference to the reason for why the points were assigned. (Eg: “Gamification Campaign Prize #3”).

Example Request

  • Assigning 100 points to the user:

{
    "partner": "Partner",
    "points": 100,
    "reference": "Gamification Campaign Prize #3"
}
  • Deducting 100 points from the user:

{
    "partner": "Partner",
    "points": -100,
    "reference": "Guest needs to spend 100 points to participate of the Brame game"
}

Response format

Success response body

  • sanityId <string>: sanity ID of the offer redeemed.

Expected Response Payload (assigning points):

{
    "id": "45601bf3-6d2a-4318-8842-affc38f563ba",
    "shortId": "EZMHC05S5AYMO2G9",
    "loyaltyId": "6d13456a-1304-5109-a117-af4de20b2487",
    "channel": "CAMPAIGN",
    "status": "CLAIMED",
    "createdAt": "2024-02-28T02:14:05.453Z",
    "impactedExpirationBuckets": [
        {
            "expirationDate": "2024-06-28",
            "points": 100
        }
    ],
    "claimedAt": "2024-02-28T02:14:05.453Z",
    "pointsEarned": 100,
    "bonusPointsEarned": 0,
    "pointsUsed": 0,
    "transactionDetails": {
        "fulfillment": {
            "autoRelease": true,
            "type": "POINT_ASSIGNMENT"
        },
        "orders": [],
        "payments": []
    },
    "metadata": {
        "partner": "Partner",
        "reference": "Gamification Campaign Prize #3"
    },
    "pointsDeducted": 0
}

 

Expected Response Payload (assigning points):

{
    "id": "1ae098e0-dc41-42cc-a4ea-b75b44148381",
    "shortId": "GM2CKQ2QRUAPP90K",
    "loyaltyId": "6d13456a-1304-5109-a117-af4de20b2487",
    "channel": "CAMPAIGN",
    "status": "CLAIMED",
    "createdAt": "2024-02-28T02:15:27.784Z",
    "impactedExpirationBuckets": [
        {
            "expirationDate": "2024-06-28",
            "points": -100
        }
    ],
    "claimedAt": "2024-02-28T02:15:27.784Z",
    "pointsEarned": 0,
    "bonusPointsEarned": 0,
    "pointsUsed": 0,
    "transactionDetails": {
        "fulfillment": {
            "autoRelease": true,
            "type": "POINT_ASSIGNMENT"
        },
        "orders": [],
        "payments": []
    },
    "metadata": {
        "partner": "Partner",
        "reference": "Reason why points were deducted"
    },
    "pointsDeducted": 100
}

 

  • No labels