Offers API
Overview
Offers
URL | https://api.resonance-api.com/offers/v1/offers |
Method | POST |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
Content-Type | application/json |
x-api-key | [INSERT YOUR API KEY HERE] |
Payload
Field | Type | Required? | Description | Examples |
---|---|---|---|---|
userId | string | yes | The offer will be made to the user specified by this id | "kraig_123", "dbdfe729-6166-49a9-9993-4bbbc9e985a8" |
code | string | yes | The sharing code for the offer campaign that this offer is coming from | "cybermonday2024", "my-cool-sharing-code" |
URL | https://api.resonance-api.com/offers/v1/offers |
Method | GET |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
x-api-key | [INSERT YOUR API KEY HERE] |
URL | https://api.resonance-api.com/offers/v1/offers/{offer_id} |
Method | GET |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
x-api-key | [INSERT YOUR API KEY HERE] |
Offer Campaigns
URL | https://api.resonance-api.com/offers/v1/offer-campaigns |
Method | POST |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
Content-Type | application/json |
x-api-key | [INSERT YOUR API KEY HERE] |
Payload
Field | Type | Required? | Description | Examples |
---|---|---|---|---|
name | string | yes | A human-readable name for this campaign. Must be unique. | "My cool campaign" |
description | string | no | Short description of this campaign to help other folks working on campaigns. | "This campaign is testing two variants of our intro cash offer." |
offerVariantIds | string[] | yes | A list of offer variant ids to include in this campaign. They will be weighted evenly and users who enter the campaign will be shown one of the variants. They will remain in that variant for the duration of the campaign. | ["dbdfe729-6166-49a9-9993-4bbbc9e985a8", "eadfe729-6166-49a9-9993-4bbbc9e985b7"] |
audienceId | object | no | Id of the audience filter to use for this campaign. The offer can only be made to users in the audience. If left blank the offer can be made to anyone. | "dbdfe729-6166-49a9-9993-4bbbc9e985a8" |
start | object | no | When to begin the campaign. If left blank it will default to the campaign creation time. If set to a time in the past, offers may be retroactively made if applicable. Must be a RFC 3339 formatted string. | "2024-04-12T01:18:37Z" |
end | object | no | The time to end the campaign. If left blank the campaign will be "evergreen" and must be turned off manually. Must be a RFC 3339 formatted string. | "2024-04-12T01:18:37Z" |
offerCode | object | no | A string that users can use to enter an offer. Typically this would be entered at signup time, or may be attached to a URL a user uses to come to sign up. | "getstarted20", "summer2024" |
Rewards
URL | https://api.resonance-api.com/rewards/v1/rewards |
Method | POST |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
Content-Type | application/json |
x-api-key | [INSERT YOUR API KEY HERE] |
Payload
Field | Type | Required? | Description | Examples |
---|---|---|---|---|
name | string | yes | A human-readable name for this reward. Rewards must have unique names. | "$20", "30 day free trial" |
data | object | yes | Arbitrary key value pairs you want to associate with this reward | { "currency": "USD", "amount": 20 } |
URL | https://api.resonance-api.com/rewards/v1/rewards |
Method | GET |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
x-api-key | [INSERT YOUR API KEY HERE] |
URL | https://api.resonance-api.com/rewards/v1/rewards/{reward_id} |
Method | GET |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
x-api-key | [INSERT YOUR API KEY HERE] |
Conditions
URL | https://api.resonance-api.com/conditions/v1/conditions |
Method | POST |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
Content-Type | application/json |
x-api-key | [INSERT YOUR API KEY HERE] |
Payload
Field | Type | Required? | Description | Examples |
---|---|---|---|---|
predicate | enum | yes | See "Examples" for enum variants | { "name": "userEvent", "eventName": "<fill in value>", "minCount": number (greater than 0) | null } |
URL | https://api.resonance-api.com/conditions/v1/conditions |
Method | GET |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
x-api-key | [INSERT YOUR API KEY HERE] |
URL | https://api.resonance-api.com/conditions/v1/conditions/{condition_id} |
Method | GET |
Authorization Required? | Yes |
Headers
Key | Value |
---|---|
x-api-key | [INSERT YOUR API KEY HERE] |