v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Issue badge to multiple customers

post/api_gateway/v1/badges/customer/earnBulk

Request body

badgeMetaIdstring required

Unique identifier ("id") generated during the creation of the badge.

customerIdnumber required

Unique identifier for the customer.

requestIdstring required

Enter a unique identifier to identify the request.

earnEventDatestring date

Defines the date on which the customer performed the activity. This date can be set up to 24 hours in the future from the current time, which allows badges to be earned based on when the customer's action occurred, not just when the system processes it.

  • The earn event date has to be between the badge start date and end date if it is a direct earn type of badge.
  • The earn event date has to be set between the badge issual start date and end date if it is an issue & earn type of badge.
  • You can enter a past date to issue a badge against an older transaction.
  • This field will be deprecated in the future and is being replaced by earnEventDateISO.
earnEventDateISOstring

Defines the date on which the customer performed the activity in ISO 8601 format in UTC and is independent of the user's local time zone. For example: The activity was performed at 11:20:00 on March 15, 2026. Format for the request parameter: 2026-03-15T11:20:00Z. Notes: * This date can be set up to 24 hours in the future from the current time. * For direct earn badges, the date must be between the badge start and end date. * For issue & earn badges, the date must be between the badge issue's start and end date. * A past date can be entered to issue a badge against an older transaction. * Only if earnEventDateISO is null, earnEventDate parameter will be used. Time format: ISO 8601 time format eg. "2025-09-10T15:00:00+05:30"

issueEventDatestring

Specifies when the badge issuance event happened, in ISO 8601 format, including the region offset. (Optional: defaults to current time). For example, the badge issuance event happened at 14:30:45 on December 16, 2025, in India. Format for the request parameter: 2025-12-16T14:30:45+05:30. Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.

Response

200

OR

Example response

{
  "data": {
    "badgeMetaId": "653de334b3cda7078c7c68eb",
    "triggeredBy": {
      "ownerType": "Loyalty",
      "referenceId": "123457"
    },
    "expiresOn": 1717935013.12171,
    "issuedBadges": [
      {
        "customerId": 553162563,
        "issuedId": "661681a535bc684e9e72553a"
      }
    ],
    "requestId": "1234"
  }
}