Get Loyalty Programs

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint allows channels to retrieve a list of loyalty programs available to a customer. It supports two different use cases, each requiring a different level of detail in the request payload.

Request Schema and Structure

FieldTypeRequiredDescription
sessionIdstringYesA unique session identifier to Get programs/validate programs/create order.
orderobjectYesThe order payload.
order.customerobjectYesThe customer's details.
order.customer.namestringNoThe customer's full name.
order.customer.emailstringNoThe customer's email address.
order.customer.phoneNumberstringNoThe customer's phone number (E.164 standard).
order.customer.
loyaltyProviderCustomerId
stringYesThe customer's unique ID from the loyalty provider.
order.orderTypeintegerYesThe type of order.
order.itemsarray of objectsNoAn empty array.

For more information on the order schema, see the order schema documentation:

https://developers.deliverect.com/page/channel-orders#/

Response Schema and Structure

FieldTypeRequiredDeprecatedDescription
programIdstringYesNoThe unique identifier of the loyalty program.
titlestringYesNoThe title or display name of the program.
typestring (enum)YesYesThe legacy type of the loyalty program. This field is deprecated and will be removed in future versions.
applicablebooleanNoNoIndicates if the customer meets the basic requirements for this program. Default is true.
descriptionstringNoNoA description of the loyalty program.
costnumberNoNoThe cost of the program, e.g., the number of loyalty points to redeem.
mediaobjectNoNoMedia assets associated with the program, such as an image or icon.
media.mediaTypestringYesNoValues may be: image / video
media.urlstringYesNoThe url of the resource
expiresAtstring (ISO 8601)NoNoThe expiration date and time of the program.
discountnumberNoYesThe specific discount value. This field is deprecated and its details are now found in the discounts object of the validation endpoint response.
itemPLUstringNoYesThe PLU of the item to which the program applies. This field is deprecated.
quantitynumberNoYesThe quantity of items affected by the program. This field is deprecated.
minOrderValuenumberNoYesThe minimum order value required for this program to be applicable. This field is deprecated as business rules are now handled by the loyalty provider.

Case 1: Listing All Available Programs

Use this case to display a list of all potential loyalty programs a customer can access, before they start building their order basket.

Request Payload:
To list all programs, the request payload should include the sessionId and the customer's details.

URL Parameters:

  • channelLinkId (string): The unique identifier for the channel.

Example Request:

{
  "sessionId": "mysessionId123",
  "programIds": [],
  "order": {
    "customer": {
      "name": "John Doe",
      "email": "[email protected]",
      "phoneNumber": "+32121212121",
      "loyaltyProviderCustomerId": "{{loyaltyCustomerProviderId}}"
    },
    "orderType": 2,
    "items": []
  }
}

Response Payload:
The response returns a list of all programs the customer has access to. Since no order items are provided, many programs may be marked as not applicable.

The applicable field indicates whether a customer meets the basic requirements for the program to be applied, such as having enough points or the program not being expired. The loyalty partner may perform extra checks to determine which programs can be marked as applicable.

Example Response (Current):

[
  {
    "programId": "1",
    "title": "$2 OFF",
    "type": "discount_amount",
    "applicable": true,
    "description": "",
    "cost": 10,
    "media": {
      "url": "...",
      "mediaType": "image"
    },
    "expiresAt": null,
    "discount": 200,
    "itemPLU": null,
    "quantity": null,
    "minOrderValue": 1000
  }
]

Note: The fields type, discount, itemPLU, quantity, minOrderValue, and validationError are deprecated and will be removed in a future version.

Example Response (Future):

[
  {
    "programId": "15036747082",
    "title": "$2 OFF",
    "applicable": true,
    "description": "",
    "cost": 10,
    "media": {
      "url": "https://res..png",
      "mediaType": "image"
    },
    "expiresAt": null
  }
]

Case 2: Listing Programs Applicable to a Current Basket

Use this case to show which programs can be successfully applied to the customer's current order.

Request Payload:
For this case, the full order payload should be included.

URL Parameters:

  • channelLinkId (string): The unique identifier for the channel.

Body Parameters:

  • sessionId (string, required): A unique session identifier.
  • order (object, required): A complete order schema (items, discounts, payment, etc.).

Example Request:

{
  "sessionId": "mysessionId123",
  "order": {
    "customer": {
      "name": "{{loyaltyCustomerFirstName}} {{loyaltyCustomerLastName}}",
      "email": "{{loyaltyCustomerEmail}}",
      "phoneNumber": "{{loyaltyCustomerPhone}}",
      "loyaltyProviderCustomerId": "{{loyaltyCustomerProviderId}}"
    },
    "orderType": 2,
    "items": [
      {
        "plu": "P-TE-zxb3-2",
        "name": "Burger",
        "price": 10000,
        "quantity": 1,
        "subItems": [],
        "productType": 1
      }
    ],
    "payment": {
      "amount": 10000
    },
    "discounts": []
  }
}

Response Payload:
The response returns a list of all programs, with the applicable field indicating whether they can be applied to the basket.

The applicable field indicates whether a customer meets the basic requirements for the program to be applied, such as having enough points or the program not being expired. The loyalty partner may perform extra checks to determine which programs can be marked as applicable.

Example Response (Current):

[
  {
    "programId": "1",
    "title": "$2 OFF",
    "type": "discount_amount",
    "applicable": true,
    "description": "",
    "cost": 10,
    "media": {
      "url": "...",
      "mediaType": "image"
    },
    "expiresAt": null,
    "discount": 200,
    "itemPLU": null,
    "quantity": null,
    "minOrderValue": 1000
  }
]

Note: The fields type, discount, itemPLU, quantity, and minOrderValue are deprecated and will be removed in a future version.

Example Response (Future):

[
  {
    "programId": "15036747082",
    "title": "$2 OFF",
    "applicable": true,
    "description": "",
    "cost": 10,
    "media": {
      "url": "https://res..png",
      "mediaType": "image"
    },
    "expiresAt": null
  }
]
Path Params
string
required
Body Params
order
object
required
Responses

Language
Credentials
OAuth2
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json