Sample API Workflow

Overview

You can explore the API by using our reference documentation/ test console. Our test console comes with default credentials you can use for exploring our API. Do not enter proprietary/confidential information in the default platform provided. This default platform is available to the public and any information you enter can be retrieved by others.

When you are ready, contact [email protected] to request your own sandbox credentials and schedule an API review.

Once you receive your own credentials you can set up your organization in our Sandbox environment.

Sample Workflow

Retrieve Platform Name and Key

1. Retrieve your platform name and key, provided by Tango Card securely or via Rewards Genius

Create Customer Identifier

2. Create a Customer Identifier (must be lowercase).

{
  "customerIdentifier": "string",
  "displayName": "string"
}

Create Account Identifier

3. Create a n Account Identifier under the Customer you created. (must be lowercase).

{
  "accountIdentifier": "string",
  "contactEmail": "string",
  "displayName": "string"
}

Register Credit Card

4. Register a Fake Credit Card to your Account Funding Operations

{
  "accountIdentifier": "accountId",
  "billingAddress": {
    "addressLine1": "123 Street",
    "addressLine2": "Suite 456",
    "city": "Seattle",
    "country": "US",
    "emailAddress": "[email protected]",
    "firstName": "First",
    "lastName": "Last",
    "postalCode": "12345",
    "state": "WA"
  },
  "creditCard": {
    "expiration": "2025-12",
    "number": "4111111111111111",
    "verificationNumber": "123"
  },
  "customerIdentifier": "customerId",
  "ipAddress": "100.10.SAMPLE.10",
  "label": "Test Card"
}

Fund Account

  1. Fund your account.
{
  "accountIdentifier": "accountId",
  "amount": 1000,
  "creditCardToken": "aedafa88-9363-4d1a-a812-a912ceff2c98",
  "customerIdentifier": "customerId"
}

Check Balance

  1. View your account balance. Perform a GET …/accounts to confirm the funding of your Account. Note your balance.
{
    "accountIdentifier": "string",
    "accountNumber": "string",
    "displayName": "string",
    "currencyCode": "USD",
    "currentBalance": 7850.94,
    "createdAt": "2016-07-19T18:19:30.855Z",
    "status": "ACTIVE",
    "contactEmail": "[email protected]"
}

Retrieve Catalog Items

  1. See what you can order in your catalog. Perform GET …/catalogs call to view the items in your platform’s catalog.
{
    "catalogName": "BrianBiz120ca73b-51d6-4b9",
    "brands": [
        {
            "brandKey": "B077325",
            "brandName": "Reward Link Preferred",
            "disclaimer": "<p>THE FOLLOWING TERMS AND CONDITIONS APPLY TO REWARD LINK: Reward Link is managed by Tango Card, Inc. Reward Links expire on the date stated on the Reward and are valid within the USA only. Reward Links are issued to Reward Recipient without charge for loyalty, award, or promotional purposes, and are not sold to consumers. Your Reward Link balance may be redeemed for national gift cards and can be accessed at any time by clicking the Reward Link URL. Reward can only be redeemed by the Reward Recipient; Reward cannot be transferred, sold or exchanged. All redemptions are final. Reward Link balances from different programs cannot be combined. No fees apply to Reward Link. Please treat like cash. Please view our full terms of service at <a href=\"https://www.rewardsgenius.com/reward-link-terms-of-service\">https://www.rewardsgenius.com/reward-link-terms-of-service</a>. Use of this Reward constitutes acceptance of the Reward Link terms of service. Separate terms and conditions apply after Reward Link redemption based on merchant selected for redemption.</p>\r\n",
            "description": "<p>A Reward Link is simply the easiest way to give the gift of choice.&nbsp;You&rsquo;ll find dozens of premium gift cards, and with digital delivery you will receive the reward value instantly.&nbsp;You are a few simple clicks away from choosing the gift card you really want.</p>\r\n",
            "shortDescription": "<p>A Reward Link is simply the easiest way to give the gift of choice.&nbsp;You&rsquo;ll find dozens of premium gift cards, and with digital delivery you will receive the reward value instantly.&nbsp;You are a few simple clicks away from choosing the gift card you really want.</p>\r\n",
            "terms": "<p>THE FOLLOWING TERMS AND CONDITIONS APPLY TO REWARD LINK: Reward Link is managed by Tango Card, Inc. Reward Links expire on the date stated on the Reward and are valid within the USA only. Reward Links are issued to Reward Recipient without charge for loyalty, award, or promotional purposes, and are not sold to consumers. Your Reward Link balance may be redeemed for national gift cards and can be accessed at any time by clicking the Reward Link URL. Reward can only be redeemed by the Reward Recipient; Reward cannot be transferred, sold or exchanged. All redemptions are final. Reward Link balances from different programs cannot be combined. No fees apply to Reward Link. Please treat like cash. Please view our full terms of service at <a href=\"https://www.rewardsgenius.com/reward-link-terms-of-service\">https://www.rewardsgenius.com/reward-link-terms-of-service</a>. Use of this Reward constitutes acceptance of the Reward Link terms of service. Separate terms and conditions apply after Reward Link redemption based on merchant selected for redemption.</p>\r\n",
            "createdDate": "2016-10-14T20:46:49Z",
            "lastUpdateDate": "2019-01-14T22:33:08Z",
            "brandRequirements": {
                "displayInstructions": "",
                "termsAndConditionsInstructions": "",
                "disclaimerInstructions": "",
                "alwaysShowDisclaimer": false
            },
            "imageUrls": {
                "80w-326ppi": "https://dwwvg90koz96l.cloudfront.net/images/brands/b674993-80w-326ppi.png",
                "130w-326ppi": "https://dwwvg90koz96l.cloudfront.net/images/brands/b674993-130w-326ppi.png",
                "200w-326ppi": "https://dwwvg90koz96l.cloudfront.net/images/brands/b674993-200w-326ppi.png",
                "278w-326ppi": "https://dwwvg90koz96l.cloudfront.net/images/brands/b674993-278w-326ppi.png",
                "300w-326ppi": "https://dwwvg90koz96l.cloudfront.net/images/brands/b674993-300w-326ppi.png",
                "1200w-326ppi": "https://dwwvg90koz96l.cloudfront.net/images/brands/b674993-1200w-326ppi.png"
            },
            "status": "active",
            "items": [
                {
                    "utid": "U561593",
                    "rewardName": "Reward Link",
                    "currencyCode": "USD",
                    "status": "active",
                    "valueType": "VARIABLE_VALUE",
                    "rewardType": "reward link",
                    "isWholeAmountValueRequired": false,
                    "minValue": 0.01,
                    "maxValue": 2000,
                    "createdDate": "2016-11-01T17:18:31.027Z",
                    "lastUpdateDate": "2020-05-13T16:10:18.44Z",
                    "countries": [
                        "US"
                    ],
                    "credentialTypes": [
                        "expirationDate",
                        "redemptionUrl"
                    ],
                    "redemptionInstructions": "<p><a href=\"https://www.rewardsgenius.com/reward-link-terms-of-service/\">Read Terms &amp; Conditions</a></p>\r\n\r\n<ul>\r\n\t<li>Click the redemption link above to activate your Reward Link.</li>\r\n\t<li>Next, you will be able to spend your balance on retail gift cards.</li>\r\n</ul>\r\n\r\n<p>If you don&#39;t want to spend your entire Reward Link value right away, save the email or URL and return via the redemption link before the expiration date provided with your Reward Link.</p>\r\n"
                }
            ]
        }
    ]
}

Create an Order

  1. Create an order. Perform a POST .../orders call to order one of the UTIDs that was returned in your GET catalog call.
{
  "accountIdentifier": "accountId",
  "amount": 10,
  "campaign": "",
  "customerIdentifier": "customerId",
  "emailSubject": "",
  "externalRefID": "",
  "message": "",
  "notes": "",
  "recipient": {
    "email": "[email protected]",
    "firstName": "First",
    "lastName": ""
  },
  "sendEmail": true,
  "sender": {
    "email": "",
    "firstName": "",
    "lastName": ""
  },
  "utid": "U561593"
}

Check Balance

  1. Observe your adjusted balance. Perform a GET …/accounts call or GET /accounts/{accountName} call to see the adjusted balance of your account following the order.
RESPONSE
{
    "accountIdentifier": "accountId",
    "accountNumber": "A123456",
    "displayName": "Account Name",
    "currencyCode": "USD",
    "currentBalance": 9127.88,
    "createdAt": "2016-07-19T18:19:30.855Z",
    "status": "ACTIVE",
    "contactEmail": "[email protected]"
}

Retrieve an Order

  1. View a past order. Perform a GET .../orders/{referenceOrderID} call to view the details of an order you have already sent
{
    "referenceOrderID": "RA201222-29331-30",
    "externalRefID": "",
    "customerIdentifier": "customerId",
    "accountIdentifier": "accountId",
    "accountNumber": "A123456",
    "amountCharged": {
        "value": 10.00,
        "currencyCode": "USD",
        "total": 10.0
    },
    "denomination": {
        "value": 10,
        "currencyCode": "USD"
    },
    "utid": "U561593",
    "rewardName": "Reward Link",
    "sender": {
        "firstName": "",
        "lastName": "",
        "email": ""
    },
    "recipient": {
        "email": "[email protected]",
        "firstName": "First",
        "lastName": "Last"
    },
    "emailSubject": "",
    "message": "",
    "sendEmail": true,
    "etid": "E000000",
    "status": "COMPLETE",
    "campaign": "",
    "createdAt": "2020-12-22T18:23:23.472Z",
    "notes": "",
    "reward": {
        "credentials": {
            "Redemption Link": "https://sandbox.rewardlink.io/r/1/_KBqZ9x056xOCrp34qxM74R2KQqYJlHoaJKZAXbwkSQ",
            "Expiration": ""
        },
        "credentialList": [
            {
                "label": "Redemption Link",
                "value": "https://sandbox.rewardlink.io/r/1/_KBqZ9x056xOCrp34qxM74R2KQqYJlHoaJKZAXbwkSQ",
                "type": "url",
                "credentialType": "redemptionUrl"
            },
            {
                "label": "Expiration",
                "value": "",
                "type": "date",
                "credentialType": "expirationDate"
            }
        ],
        "redemptionInstructions": "<p><a href=\"https://www.rewardsgenius.com/reward-link-terms-of-service/\">Read Terms &amp; Conditions</a></p>\r\n\r\n<ul>\r\n\t<li>Click the redemption link above to activate your Reward Link.</li>\r\n\t<li>Next, you will be able to spend your balance on retail gift cards.</li>\r\n</ul>\r\n\r\n<p>If you don&#39;t want to spend your entire Reward Link value right away, save the email or URL and return via the redemption link before the expiration date provided with your Reward Link.</p>\r\n"
    }
}

Resend an Order

  1. Resend a past order. Perform a POST …/{referenceOrderID}/resends to resend the order
{
  "newEmail": "[email protected]"
}