Get embedded URL
You can embed Tango’s hosted gift card landing page directly into your application using an iFrame (for web) or a WebView (for mobile). After retrieving the embedded reward URL, load it within your app’s interface, allowing recipients to view and redeem their gift card without receiving an email or opening a new browser window or tab. This provides a seamless, in‑app redemption experience while keeping users fully within your application.
Endpoint
Use this Tango endpoint to obtain the secure, temporary embedded reward URL after placing an order. Not all UTIDs support embedded URL. Use the following endpoint to get an embedded URL for eligible rewards:
| Endpoint | Description |
|---|---|
GET {URI}/lineItems/{referenceLineItemID}/embeddedUrl | Returns the embedded URL for integration into your application. |
How does it work?
If a UTID supports embedded, you can:
- Use
GET {URI}/catalogsto list all UTIDs available in catalog. The UTIDs provideitemAttributewhich shows the delivery method. - Take the UTID with the embedded delivery method and place an order with
POST {URI}/orders. - After placing the order, the response payload returns a
referenceLineItemID. - Use that
referenceLineItemIDto call theGET {URI}/lineItems/{referenceLineItemID}/embeddedUrlendpoint to return a URL with a temporary token. - Take the embeddedURL and load it in your software's iframe to load the reward experience into your application:
- The token expires after five minutes and is evaluated on page load.
- Once displayed, your recipient has eight hours to unlock the reward.
Note:This endpoint only works for items that return
credentialTypesofrewardSecurityUrlandrewardSecurityCode.
Parameters
The following path parameter can be used for this endpoint:
| Path parameter | Data type | Requirement | Description |
|---|---|---|---|
referenceLineItemId | string | required | Reference line item Id is returned in the line item response payload. |
Examples
Here's an example payload of a successful response:
{
"url": "https://sandbox.rewardcodes.com/r2/1/F4I45887987"
}Response codes
The possible response codes for this endpoint are as follows. For details, see i18nkey codes and their error messages:
| Response code | Meaning |
|---|---|
| 200 | The request was successful. |
| 400 | The server could not understand the request due to invalid syntax. |
| 500 | Something went wrong on the server, but the server cannot be more specific about what the exact problem is. |
Updated 16 days ago
