Get an Offer
GEThttps://api.tripleup.dev/partner/offers/:id
Get an Offer
Request
Path Parameters
Possible values: non-empty
and <= 100 characters
Responses
- 200
- 400
- 403
- 404
- 409
- 415
- 422
- 500
- 501
- 503
Offer
- application/json
- Schema
- Example (auto)
Schema
- a period of years (Y) must be 1-3
- a period of months (M) must be 1-36
- a period of weeks (W) must be 1-156
- a period of days (D) must be 1-365
- a period of years (Y) must be 1-3
- a period of months (M) must be 1-36
- a period of weeks (W) must be 1-156
- a period of days (D) must be 1-365
If specified, the number of days (inclusive) for which an offer activation is valid.
If a transaction falls outside of this duration, it will not qualify for the offer. The day of activation is considered day 1. So, if a cardholder activates an offer on Monday with a 3 day duration, they must make their transaction on or before Wednesday.
Indicates whether or not a cardholder must activate this offer prior to transacting and qualifying for the offer reward.
If true, transactions that occur prior to the date of the cardholder activating the offer will not qualify for the offer's reward.
The date on which the offer campaign ends.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}
2021-12-01
triple Offer Category
Possible values: [AUTOMOTIVE
, CHILDREN_AND_FAMILY
, ELECTRONICS
, ENTERTAINMENT
, FINANCIAL_SERVICES
, FOOD
, HEALTH_AND_BEAUTY
, HOME
, OFFICE_AND_BUSINESS
, RETAIL
, SERVICES_AND_SUBSCRIPTIONS
, TRAVEL
, UTILITIES_AND_TELECOM
]
A comma-delimited collection of Offer tags
RFC 3339 date time used for creation and mod times
2021-12-01T01:59:59.000Z
The currency for the offer reward, minimum spend requirement, and maximum reward limitations. The value is an ISO-4217 currency code.
Possible values: >= 3 characters
and <= 3 characters
, Value must match regular expression ^[A-Z]{3}$
USD
USD
A long-form text description of or promotional content for an offer
Possible values: >= 6 characters
and <= 65535 characters
The first date on which the offer is valid.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}
2021-12-01
Dates for which the offer is not valid. Transactions made on these dates will not qualify for a reward.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}
If specified, the last date on which the offer is valid.
Possible values: Value must match regular expression ^\d{4}-\d{2}-\d{2}
2021-12-31
Partner-provided, external ID for an Offer.
External IDs should be stable and never sensitive.
External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Offer within the scope of its parent Content Provider.
To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)
id-for-entity
The headline or title for the offer, appropriate for top-level display.
Possible values: >= 6 characters
and <= 100 characters
The triple-defined ID for the entity.
Possible values: non-empty
and <= 100 characters
triple-abc-123
invalid_day_parts object
The ISO-3166 label for marketing currency. Defaults to 'USD' if omitted or null.
Possible values: >= 3 characters
and <= 3 characters
, Value must match regular expression ^[A-Z]{3}$
USD
USD
The share percentage if this offer has a marketing_fee_type of percentage, the amount will be between 0.0 and 100.0. The value is a string but can be parsed as a double precision floating point number.
Possible values: [FIXED
, PERCENTAGE
]
The fixed share value if this offer has a marketing_fee_type of fixed, the amount must be greater than or equal to 0. The value is a string but can be parsed as a double precision floating point number.
The maximum number of times a cardholder may receive a reward for this offer over a given period of time.
The numerator of this value is the number of times a reward can be earned. The numerator must be less than 1000. The denominator is the period of time over which the limit is enforced.
Time periods must conform to the following restrictions:
Possible values: Value must match regular expression ^\d{1,3}\/\d{1,3}[YMWD]$
1/3M
The maximum monetary value a cardholder may earn for this offer across multiple transactions over a given period of time.
The numerator of this value is the maximum monetary value a reward can earn. The numerator must be less than 1000000000000. The denominator is the period of time over which the limit is enforced.
Time periods must conform to the following restrictions:
Possible values: Value must match regular expression ^\d{1,12}\/\d{1,3}[YMWD]$
1/3M
The maximum monetary value a cardholder may earn for a percentage-based reward on any single transaction. The value is a string but can be parsed as a double precision floating point number.
Possible values: > 0
The Merchant Category Codes included for a categorical offer.
Possible values: >= 1
, <= 25
Partner-provided, external ID for a Merchant.
External IDs should be stable and never sensitive.
External IDs do not need to be globally unique, but we encourage the use of UUIDs. They must be unique for the Merchant within the scope of its parent Content Provider.
To protect against accidental inclusion of sensitive personal information, external IDs may not be 9-digit numbers or use the US Tax ID format (###-##-####).
Possible values: non-empty
and <= 255 characters
, Value must match regular expression ^(?!\d{3}-\d\d-\d{4}$)
id-for-entity
Possible values: <= 2000 characters
, Value must match regular expression ^https://.+$
https://merchant-website.com
The minimum monetary value that a cardholder must spend for a transaction to qualify for this offer. The value is a string but can be parsed as a double precision floating point number.
Possible values: >= 0
The offer delivery mode
Possible values: [ONLINE
, IN_PERSON
, IN_PERSON_AND_ONLINE
]
offer_budget object
The type of offer - card-linked, affiliate, categorical, etc.
Possible values: [CARD_LINKED
, AFFILIATE
, CATEGORICAL
]
The reward percentage if this offer has a reward_type of percentage, the amount will be between 0.0 and 100.0. The value is a string but can be parsed as a double precision floating point number.
Possible values: > 0
Indicates whether this offer is for a fixed or percentage-based amount.
Possible values: [FIXED
, PERCENTAGE
]
The fixed reward value if this offer has a reward_type of fixed, the amount must be greater than or equal to 0. The value is a string but can be parsed as a double precision floating point number.
Possible values: > 0
Terms and conditions for the offer, not inclusive of other limits specified by the offer properties, such as minimum spend, excluded dates, or activation requirements.
RFC 3339 date time used for creation and mod times
2021-12-01T01:59:59.000Z
valid_day_parts object
{
"activation_duration_in_days": 0,
"activation_required": true,
"campaign_ends_on": "2021-12-01",
"category": "AUTOMOTIVE",
"category_tags": "string",
"created_at": "2021-12-01T01:59:59.000Z",
"currency_code": "USD",
"description": "string",
"effective_date": "2021-12-01",
"excluded_dates": [
"2021-12-25"
],
"expiration_date": "2021-12-31",
"external_id": "id-for-entity",
"headline": "string",
"id": "triple-abc-123",
"invalid_day_parts": {
"friday": {
"times": [
"00:30-13:30"
]
},
"monday": {
"times": [
"00:30-13:30"
]
},
"saturday": {
"times": [
"00:30-13:30"
]
},
"sunday": {
"times": [
"00:30-13:30"
]
},
"thursday": {
"times": [
"00:30-13:30"
]
},
"tuesday": {
"times": [
"00:30-13:30"
]
},
"wednesday": {
"times": [
"00:30-13:30"
]
}
},
"marketing_fee_currency_code": "USD",
"marketing_fee_rate": "string",
"marketing_fee_type": "FIXED",
"marketing_fee_value": "string",
"maximum_redemptions": "1/3M",
"maximum_reward_cumulative": "1/3M",
"maximum_reward_per_transaction": "string",
"merchant_category_codes": [
"7998"
],
"merchant_external_id": "id-for-entity",
"merchant_website": "https://merchant-website.com",
"minimum_spend": "string",
"mode": "ONLINE",
"offer_budget": {
"currency_code": "USD",
"estimated_allocation": "string",
"excluded_from_search": true,
"limit": 0
},
"offer_type": "CARD_LINKED",
"reward_rate": "string",
"reward_type": "FIXED",
"reward_value": "string",
"terms": "string",
"updated_at": "2021-12-01T01:59:59.000Z",
"valid_day_parts": {
"friday": {
"times": [
"00:30-13:30"
]
},
"monday": {
"times": [
"00:30-13:30"
]
},
"saturday": {
"times": [
"00:30-13:30"
]
},
"sunday": {
"times": [
"00:30-13:30"
]
},
"thursday": {
"times": [
"00:30-13:30"
]
},
"tuesday": {
"times": [
"00:30-13:30"
]
},
"wednesday": {
"times": [
"00:30-13:30"
]
}
}
}
TripleBadRequestError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [400
]
content required
{
"status_code": 400,
"content": {
"details": [
null
],
"error_message": "The request is malformed.",
"exception": "TripleBadRequestError"
}
}
TripleNotAuthenticatedError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [401
]
content required
{
"status_code": 401,
"content": {
"details": [
null
],
"error_message": "Client authentication failed.",
"exception": "TripleNotAuthenticatedError"
}
}
TripleInvalidPathError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [404
]
content required
{
"status_code": 404,
"content": {
"details": [
null
],
"error_message": "The url path or path parameter is invalid.",
"exception": "TripleInvalidPathError"
}
}
TripleIntegrityError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [409
]
content required
{
"status_code": 409,
"content": {
"details": [
null
],
"error_message": "The request was well-formed but violated entity integrity constraints.",
"exception": "TripleIntegrityError"
}
}
TripleUnsupportedMediaType
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [415
]
content required
{
"status_code": 415,
"content": {
"details": [
null
],
"error_message": "The request defined an unsupported media type.",
"exception": "TripleUnsupportedMediaType"
}
}
TripleUnprocessableEntity
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [422
]
content required
{
"status_code": 422,
"content": {
"details": [
null
],
"error_message": "The request was well-formed but could not be processed.",
"exception": "TripleUnprocessableEntity"
}
}
TripleInternalServerError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [500
]
content required
{
"status_code": 500,
"content": {
"details": [
null
],
"error_message": "Triple was unable to process the request due to an internal error.",
"exception": "TripleInternalServerError"
}
}
TripleNotImplementedError
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [501
]
content required
{
"status_code": 501,
"content": {
"details": [
null
],
"error_message": "The request failed because it requires a feature that is not yet implemented.",
"exception": "TripleNotImplementedError"
}
}
TripleServiceUnavailable
- application/json
- Schema
- Example (auto)
Schema
The 3-digit HTTP Response Status code
Possible values: [503
]
content required
{
"status_code": 503,
"content": {
"details": [
null
],
"error_message": "The request failed due to a triple service interruption.",
"exception": "TripleServiceUnavailable"
}
}
Authorization: oauth2
name: triple_authtype: oauth2scopes:api.tripleup.com/partner.content_providers
description: The triple API uses OAuth2 with a client id and client secret. The URL to get an OAuth2 token is here: https://auth.tripleup.dev/oauth2/token This is an example of how to call the API from the command line. Code will need to be developed by the partner in their servers. ```bash # Fetch an access token TOKEN_URL=https://auth.tripleup.dev/oauth2/token CLIENT_ID=fake CLIENT_SECRET=another-fake # Fetch a space-separated list of scopes # If not provided, will return an access token # with all scopes to which the client has access SCOPE=api.tripleup.com/partner.publishers TOKEN_RESPONSE=$(curl -s -X POST $TOKEN_URL \ --user $CLIENT_ID:$CLIENT_SECRET \ --data grant_type=client_credentials \ --data-urlencode "scope=$SCOPE") # Use an access token ACCESS_TOKEN=$(echo $TOKEN_RESPONSE | jq -r '.access_token') TOKEN_TYPE=$(echo $TOKEN_RESPONSE | jq -r '.token_type') API_URL=https://api.tripleup.dev curl -X GET "$API_URL/partner/publishers" \ --header "Authorization: $TOKEN_TYPE $ACCESS_TOKEN" ``` See the _Client credentials grant_ section at the bottom of this [AWS blog post](https://aws.amazon.com/blogs/mobile/understanding-amazon-cognito-user-pool-oauth-2-0-grants/) for more information.flows: { "clientCredentials": { "tokenUrl": "https://auth.tripleup.dev/oauth2/token", "scopes": { "api.tripleup.com/partner.portfolios": "Manage Portfolio Manager details and portfolios of Publishers\n", "api.tripleup.com/partner.publishers": "Manage Publisher details, Card Programs, Consumers, Card Accounts,\nand Transactions\n", "api.tripleup.com/partner.view_offers": "View recommended Offers, search Offers, and view Offer details\n", "api.tripleup.com/partner.content_providers": "Manage Content Provider details, Merchants, Merchant Locations,\nand Offers\n" } } }
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
conn = http.client.HTTPSConnection("api.tripleup.dev")
payload = ''
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("GET", "/partner/offers/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))