Get Credential Types

overview here.... what are Credential types? why do we need it? ,,,,,

For better parsing and display of reward data, we have added the credentialType key to the credentialList object in the order response. Note that the categorization of credentialType(s) is based on internal factors of the Tango Card system and many of the definitions found in the GET {URI}/credentialtypes call have similar or identical definitions. GET {URI}/catalogs provides the credential types information for each item in the catalog.

Our Use Case

(use case here,,,,,)

Get a List of Credential Types

Use the following endpoint to get a list of credential types. There is no parameters for this endpoint.

EndpointPurpose
GET {URI}/credentialtypesGet a List of Credential Types

The response message for this endpoint is:

  • 200 OK
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden

The following code snippet shows the credentialTypes such as redemptionUrl or expirationDate as part of the credentialList object in the order response when performing the GET {URI}/orders/{referenceOrderID} call:

"credentialList": [
            {
                "label": "Redemption Link",
                "value": "https://sandbox.rewardlink.io/r/1/_KBqZ9x056xOCrp34qxM74R2KQqYJlHoaJKZAXbwkSQ",
                "type": "url",
                "credentialType": "redemptionUrl"
            },
            {
                "label": "Expiration",
                "value": "",
                "type": "date",
                "credentialType": "expirationDate"
            }

How to Handle Reward Types?

Tango Card returns the following types of reward credentials. If your integration requires displaying reward data in app or creating custom reward emails you may need to add logic to parse the returned reward data correctly.

Reward TypeDescriptionIntegration Example
textPlain TextWrap in a tag
urlURL to a reward landing pageWrap in an tag
barcodeURL for a barcode imageAdd an tag
dateISO datedtimeDisplay in localized date format based on locale of reward according to RFC 3339, i.e. "2016-01-01T00:00:00Z"

Credential Type

For better parsing and display of reward data, we have added the credentialType key to the credentialList object in the order response.

📘

Note:

We are continuously expanding our catalog and it is likely that new reward types will arise over time. For this reason we recommend a fallback / default to handle unspecified types as text.