Get Credential Types

Tango API returns the credential type. For better parsing and display of reward data, we have added the credentialType key to the credentialList object in the order response. We categorize credentialType(s) based on internal factors of the Tango system. You can see all possible credntialTypes using the GET{URI}/credentiallist end point. The GET {URI}/catalogs provides the credential types information for each item in the catalog. Note that many of the definitions found in the GET {URI}/credentialtypes are similar or identical.

Get a list of credential types

The GET{URI}credentialTypes provides the list of what credentialTypes you might encounter and the GET {URI}/catalogs provides the credential types information for each item in the catalog. 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"
            }

Handle reward types

Tango 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 typeDescriptionCredential typeIntegration example
textPlain TextcardNumber, PIN, securityCode, claimCode, etc.Wrap in a <span> tag
urlURL to a reward landing pageredemptionUrl, securityUrlWrap in an <a> tag
barcodeURL for a barcode imagebarcodeAdd an <img> tag
dateISO datedtimeexpirationDateDisplay 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. For more details, see our document about credential type.

πŸ“˜

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.


What’s Next