Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Create, retrieve, and update campaigns through REST API calls.
Create, retrieve, and update affiliates through REST API calls.
A referral represents a unique visitor that arrived on your website through an affiliate link, which may have gone on to become a lead or paying customer (conversion).
Create, retrieve, and update affiliate links through REST API calls.
curl https://api.getrewardful.com/v1/affiliates/7B016217-18AF-44DD-A30C-0DE0C1534D2A \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/affiliates \
-u ABC123:{ "error": "Invalid API Secret." }{ "error": "Affiliate not found: " }{
"error": "Could not create affiliate.",
"details": ["Email can't be blank"]
}{
"pagination": {
"previous_page": 1,
"current_page": 2,
"next_page": 3,
"count": 50,
"limit": 50,
"total_pages": 3,
"total_count": 150
},
"data": [
// Array of objects
]
}?expand=affiliate?expand[]=affiliate&expand=salePayouts represent a set of one or more due commissions owed to a given affiliate which have been or may be marked as paid collectively.
List, create, retrieve, and update affiliate coupons through REST API calls.
Commissions represent a reward issues to an affiliate in return for a payment made by a referred customer.
curl --request GET \
--url https://api.getrewardful.com/v1/affiliate_links \
-u YOUR_API_SECRET:Introduction to Rewardful's JavaScript API
An introduction to Rewardful's webhooks.
<script>(function(w,r){w._rwq=r;w[r]=w[r]||function(){(w[r].q=w[r].q||[]).push(arguments)}})(window,'rewardful');</script><script>(function(w,r){w._rwq=r;w[r]=w[r]||function(){(w[r].q=w[r].q||[]).push(arguments)}})(window,'rewardful');</script>
<script async src='https://r.wdfl.co/rw.js' data-rewardful='YOUR-API-KEY'></script><script>
rewardful('convert', { email: '[email protected]' })
</script><script>
rewardful('ready', function() {
console.log('Rewardful Ready!')
});
</script><script>
rewardful('ready', function() {
if(Rewardful.referral) {
// The current website visitor is a referral from an affiliate.
}
});
</script><script>
rewardful('ready', function() {
console.log('This will fire first.')
});
rewardful('ready', function() {
console.log('This will fire second.')
});
rewardful('ready', function() {
console.log('This will fire third.')
});
</script><script>
rewardful('source', AFFILIATE_LINK_TOKEN)
</script><script>
rewardful('source', 'bond007')
</script>https://www.example.com/pricing?referral=bffa8b94-b25a-45a4-97a0-1c8ecb8018b9rewardful('ready', function() {
const iframe = document.createElement('iframe')
iframe.src = 'https://checkout.example.com'
if(Rewardful.referral) {
iframe.src += `?referral=${Rewardful.referral}`
}
document.appendChild(iframe)
});<script>
rewardful('ready', function() {
if(Rewardful.referral) {
console.log('Current referral ID: ', Rewardful.referral);
} else {
console.log('No referral present.');
}
});
</script>{
id: "b533bfca-7c70-4dec-9691-e136a8d9a26c",
name: "James Bond",
first_name: "James",
last_name: "Bond",
token: "james007"
}<script>
rewardful('ready', function() {
if(Rewardful.affiliate) {
$('.affiliate-banner').text(
`Hi there, friend of ${Rewardful.affiliate.first_name}!`
).show();
}
});
</script>{
"campaign": {
"id": "1f51675a-646d-4a83-898b-16e0ceeb0373",
"name": "Friends of Acme, Inc."
}
}{
id: "bf-2019",
name: "Black Friday 2019",
duration: "repeating",
duration_in_months: 12,
percent_off: 25,
amount_off: null,
currency: null
}{
id: "save-25",
name: "One-time $25 credit",
duration: "once",
duration_in_months: null,
percent_off: null,
amount_off: 2500,
currency: "usd"
}<script>
rewardful('ready', function() {
if(Rewardful.coupon) {
showCouponBanner(Rewardful.coupon);
}
});
</script><form action="/signup" method="post" data-rewardful="true">
<input type="text" name="name">
<input type="email" name="email">
<button>Sign Up</button>
</form><form action="/signup" method="post" data-rewardful="true">
<input type="text" name="name">
<input type="email" name="email">
<button>Sign Up</button>
<!-- Inserted automatically by Rewardful: -->
<input type="hidden" name="referral" value="78476c40-0137-11eb">
</form>document.addEventListener("turbolinks:load", function() {
Rewardful.Forms.attach();
});$('#signup-modal').on('shown.bs.modal', function (e) {
Rewardful.Forms.attach();
});const signupForm = document.getElementById('signup-form');
Rewardful.Forms.add(signupForm);{
"id": "c4b3c530-3d7b-4f01-89bf-12ce7cbe1e4b",
"created_at": "2021-01-10T13:27:16.766-07:00",
"affiliate": {
"id": "b533bfca-7c70-4dec-9691-e136a8d9a26c",
"name": "James Bond",
"first_name": "James",
"last_name": "Bond",
"token": "jb007"
},
"campaign": {
"id": "1f51675a-646d-4a83-898b-16e0ceeb0373",
"name": "Friends of Acme, Inc."
},
"coupon": null,
"cookie": {
"domain": "example.com"
}
}curl --request GET \
--url https://api.getrewardful.com/v1/campaigns \
-u YOUR_API_SECRET:Returns a list of your payouts. Records are returned sorted by creation date, with the most recent items appearing first.
curl https://api.getrewardful.com/v1/campaigns/ceaef6d9-767e-49aa-a6ab-46c02aa79604 \
-u YOUR_API_SECRET:curl https://api.getrewardful.com/v1/affiliate_links/d0ed8392-8880-4f39-8715-60230f9eceab \
-u YOUR_API_SECRET:curl https://api.getrewardful.com/v1/affiliates/d0ed8392-8880-4f39-8715-60230f9eceab \
-u YOUR_API_SECRET:curl --request DELETE \
--url https://api.getrewardful.com/v1/commissions/39e68c88-d84a-4510-b3b4-43c75016a080 \
-u YOUR_API_SECRET:curl https://api.getrewardful.com/v1/affiliate_coupons/d0ed8392-8880-4f39-8715-60230f9eceab \
-u YOUR_API_SECRET:{
"id": "75434e84-255b-4314-a278-820df5e76813",
"external_id": "promo_1a2b3c",
"token": "CODE",
"leads": 0,
"conversions": 0,
"affiliate_id": "95d48f70-f1d4-42d9-b929-21996b6d9eb4"
}{ "error": "Campaign not found: " }{ "error": "Invalid API Secret." }{ "error": "Affiliate link not found: " }{ "error": "Invalid API Secret." }{ "error": "Affiliate not found: " }{ "error": "Invalid API Secret." }{ "error": "Commission not found: 39e68c88-d84a-4510-b3b4-43c75016a080" }{ "error": "Invalid API Secret." }{ "error": "Affiliate coupon not found: " }{ "error": "Invalid API Secret." }curl --request GET \
--url https://api.getrewardful.com/v1/payouts \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/payouts?expand[]=affiliate&expand[]=commissions \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/payouts?affiliate_id=5768bd90-7953-493f-ae6c-6562eb4d7e72 \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/payouts?state= \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/payouts?state[]=due&state[]=pending \
-u YOUR_API_SECRET:Returns a list of your affiliates. The affiliates are returned sorted by creation date, with the most recent affiliates appearing first. The list can also be filtered using various criteria.
curl --request PUT \
--url https://api.getrewardful.com/v1/affiliate_links/d0ed8392-8880-4f39-8715-60230f9eceab \
-u YOUR_API_SECRET: \
-d token=darth-vadercurl --request POST \
--url https://api.getrewardful.com/v1/affiliate_coupons \
-u YOUR_API_SECRET: \
-d affiliate_id=f46a912b-08bc-4332-8771-c857e11ad9dd \
-d token=MYCODE{ "error": "Affiliate link not found: " }{ "error": "Invalid API Secret." }{
"error": "Could not create affiliate coupon.",
"details": ["Token can't be blank. "]
}{ "error": "Invalid API Secret." }{
"id": "3b03791a-3fb5-4bd6-8ec3-614c9fd978ca",
"currency": "USD",
"paid_at": "2022-10-12T14:55:11.242Z",
"state": "paid",
"paid_by_id": "3e5c04ae-af80-4964-b280-23df034690d4",
"created_at": "2022-10-12T14:54:52.148Z",
"updated_at": "2022-10-12T14:55:11.276Z",
"amount": 1470,
"affiliate": {
"id": "5768bd90-7953-493f-ae6c-6562eb4d7e72",
"created_at": "2022-10-12T14:25:09.323Z",
"updated_at": "2022-11-08T09:13:05.954Z",
"state": "active",
"first_name": "Joe",
"last_name": "Example",
"email": "[email protected]",
"confirmed_at": "2022-10-12T14:25:09.323Z",
"paypal_email": null,
"paypal_email_confirmed_at": null,
"wise_email": null,
"wise_email_confirmed_at": null,
"receive_new_commission_notifications": false,
"sign_in_count": 0,
"unconfirmed_email": null,
"stripe_customer_id": null,
"stripe_account_id": null,
"visitors": 376,
"leads": 142,
"conversions": 56
},
"commissions": [
{
"id": "3a4a775c-b660-4d7f-a733-6f259a2646a7",
"currency": "USD",
"state": "paid",
"stripe_account_id": "acct_1GWIyRDLlKlZvFB2",
"due_at": "2022-07-31T15:55:19.000Z",
"paid_at": "2022-08-08T09:07:11.242Z",
"voided_at": null,
"created_at": "2022-07-01T15:57:18.742Z",
"updated_at": "2022-07-01T15:57:18.742Z",
"amount": 1470
}
]
}{
"id": "e523da29-6157-4aac-b4b5-05b3b7b14fb6",
"link": {
"id": "32a19d65-2b68-434d-a401-e72ca7f24d81",
"url": "http://www.example.com/?via=jb007",
"leads": 6,
"token": "jb007",
"visitors": 7,
"conversions": 5
},
"visits": 42,
"customer": {
"id": "cus_ABC123",
"name": "Fred Durst",
"email": "[email protected]",
"platform": "stripe"
},
"affiliate": {
"id": "dc939584-a94a-4bdf-b8f4-8d255aae729c",
"email": "[email protected]",
"leads": 6,
"campaign": {
"id": "ae37c8ce-f82b-4e1b-9653-b802ae459a62",
"name": "Friends of MI6",
"created_at": "2020-04-27T00:24:08.199Z",
"updated_at": "2020-04-27T00:24:08.199Z"
},
"visitors": 7,
"last_name": "Bond",
"created_at": "2020-04-27T00:24:08.334Z",
"first_name": "James",
"updated_at": "2020-05-03T19:39:03.028Z",
"conversions": 5,
"confirmed_at": "2020-04-27T00:24:08.331Z",
"paypal_email": null,
"sign_in_count": 0,
"stripe_account_id": null,
"unconfirmed_email": null,
"stripe_customer_id": null,
"paypal_email_confirmed_at": null,
"receive_new_commission_notifications": true
},
"created_at": "2020-04-27T00:34:28.448Z",
"became_lead_at": "2020-04-27T00:36:28.448Z",
"became_conversion_at": "2020-04-27T00:38:28.448Z",
"expires_at": "2020-06-26T00:34:28.448Z",
"updated_at": "2020-04-27T00:38:28.448Z",
"deactivated_at": null,
"conversion_state": "conversion",
"stripe_account_id": "acct_ABC123",
"stripe_customer_id": "cus_ABC123"
}{
"object": {
"id": "3433fffa-8255-4843-81b1-22aebc21eb34",
"first_name": "James",
"last_name": "Bond",
"email": "[email protected]",
"created_at": "2019-06-24T00:43:36.097Z",
"updated_at": "2019-06-27T18:38:41.684Z",
"referrals": 42,
"conversions": 3,
"confirmed_at": "2019-06-24T00:43:36.095Z",
"links": [{
"id": "81bf1128-0ba1-4c1c-835c-286521f8791a",
"url": "http://www.demo.com:8080/?via=james",
"token": "james",
"referrals": 42,
"conversions": 3
}],
"campaign": {
"id": "82f26208-778e-4e98-a467-6ee264cf96d5",
"name": "Friends of Acme",
"created_at": "2019-06-24T00:43:35.985Z",
"updated_at": "2019-06-24T00:43:35.985Z"
},
"paypal_email": null,
"sign_in_count": 0,
"stripe_account_id": null,
"unconfirmed_email": null,
"stripe_customer_id": null,
"paypal_email_confirmed_at": null,
"receive_new_commission_notifications": true
},
"event": {
"id": "7fcdc81d-996a-4b7b-8faf-1db98b9d5507",
"type": "affiliate.confirmed",
"created_at": "2019-07-11T05:25:43.940Z",
"api_version": "v1"
},
"request": {
"id": "66a94f49-2b36-403c-83b8-91677cb1f460"
}
}expected_signature = OpenSSL::HMAC.hexdigest(
'sha256',
'my-rewardful-signing-secret',
request.raw_post
)
if expected_signature == request.headers['X-Rewardful-Signature']
# The request is legitimate and can be safely processed.
end<?php
$payload = @file_get_contents('php://input');
if (strlen($payload) == 0) {
http_response_code(401);
die("rejected");
}
$headers = getallheaders();
if (!array_key_exists("X-Rewardful-Signature", $headers)) {
http_response_code(401);
die("rejected");
}
$expectedSignature = hash_hmac('sha256', $payload, 'my-rewardful-signing-secret');
if($expectedSignature !== $headers["X-Rewardful-Signature"]) {
http_response_code(401);
die("rejected");
}
// The request is legitimate and can be safely processed.
?>import hmac
import hashlib
expected_signature = hmac.new(
'my-rewardful-signing-secret',
msg=request.body,
digestmod=hashlib.sha256
).hexdigest()
if expected_signature == request.headers['X-Rewardful-Signature']:
# The request is legitimate and can be safely processed.curl https://api.getrewardful.com/v1/payouts/3b03791a-3fb5-4bd6-8ec3-614c9fd978ca \
-u YOUR_API_SECRET:{ "error": "Payout not found: 3b03791a-3fb5-4bd6-8ec3-614c9fd978c" }{ "error": "Invalid API Secret." }{
"error": "Could not create affiliate link.",
{ "error": "Invalid API Secret." }{
"id": "3b03791a-3fb5-4bd6-8ec3-614c9fd978ca",
A complete list of the webhook events Rewardful will send to your endpoints.
Creates a new affiliate in your account with the specified parameters.
curl --request POST \
--url https://api.getrewardful.com/v1/affiliate_links \
-u YOUR_API_SECRET: \
-d affiliate_id=f46a912b-08bc-4332-8771-c857e11ad9dd \
-d token=luke-skywalkercurl --request GET \
--url https://api.getrewardful.com/v1/affiliates \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/affiliates?expand=campaign \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/affiliates?expand[]=campaign&expand[]=links \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/affiliates?campaign_id=c3482343-8680-40c5-af9a-9efa119713b5 \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/[email protected] \
-u YOUR_API_SECRET:curl --request PUT \
--url https://api.getrewardful.com/v1/affiliates/d0ed8392-8880-4f39-8715-60230f9eceab \
-u YOUR_API_SECRET: \
-d first_name=Jamie \
-d [email protected]{
"sso": {
"url": "https://affiliates.example.com/sso?token=eyJhbGciOiJIUzI1NiJ9",
"expires": "2020-08-28T05:32:02.471Z"
},
"affiliate": {
"id": "d049c0c6-5caf-440e-a774-8d5e87086d0b",
"email": "[email protected]"
}
}require 'httparty'
get '/rewardful' do
response = HTTParty.get(
"https://api.getrewardful.com/v1/affiliates/#{current_user.affiliate_id}/sso",
basic_auth: { username: ENV['REWARDFUL_API_SECRET'] }
)
magic_link = response.parsed_response.dig('sso', 'url')
redirect_to magic_link
end
curl --request GET \
--url https://api.getrewardful.com/v1/affiliates/d049c0c6-5caf-440e-a774-8d5e87086d0b/sso \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?expand[]=affiliate \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?affiliate_id=b533bfca-7c70-4dec-9691-e136a8d9a26c \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?conversion_state=lead \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?conversion_state[]=lead&conversion_state[]=conversion \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?updated_until=2024-12-04T13:02:57+02:00 \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?updated_since=2024-12-04T13:02:57+02:00 \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/referrals?page=3&limit=50
-u YOUR_API_SECRET:curl --request PUT \
--url https://api.getrewardful.com/v1/payouts/3b03791a-3fb5-4bd6-8ec3-614c9fd978ca/pay \
-u YOUR_API_SECRET:{ "error": "Affiliate not found: " }{ "error": "Invalid API Secret." }{ "error": "Payout not found: 3b03791a-3fb5-4bd6-8ec3-614c9fd978c" }{ "error": "Invalid API Secret." }curl --request POST \
--url https://api.getrewardful.com/v1/campaigns \
-u YOUR_API_SECRET: \
-d "name=Special Friends of Rewardful" \
-d url=https://rewardful.com \
-d private=true \
-d reward_type=percent \
-d commission_percent=50.0 \
-d minimum_payout_cents=5000{
"error": "Could not create campaign.",
"details": ["Name can't be blank"]
}{ "error": "Invalid API Secret." }curl --request PUT \
--url https://api.getrewardful.com/v1/campaigns/ceaef6d9-767e-49aa-a6ab-46c02aa79604 \
-u YOUR_API_SECRET: \
-d "name=Best All Time Friends of Rewardful" \
-d minimum_payout_cents=1000{ "error": "Campaign not found: " }{ "error": "Invalid API Secret." }{
"id": "39e68c88-d84a-4510-b3b4-43c75016a080",
"created_at": "2020-08-19T16:28:31.164Z",
"updated_at": "2020-08-19T16:28:31.164Z",
"amount": 3000,
"currency": "USD",
"state": "due",
"due_at": "2020-09-18T16:28:25.000Z",
"paid_at": null,
"voided_at": null,
"campaign": {
"id": "c3482343-8680-40c5-af9a-9efa119713b5",
"created_at": "2020-05-22T02:55:19.802Z",
"updated_at": "2020-08-19T16:28:16.177Z",
"name": "Friends Of MI6"
},
"sale": {
"id": "74e37d3b-03c5-4bfc-841c-a79d5799551a",
"currency": "USD",
"charged_at": "2020-08-19T16:28:25.000Z",
"stripe_account_id": "acct_ABC123",
"stripe_charge_id": "ch_ABC123",
"invoiced_at": "2020-08-19T16:28:25.000Z",
"created_at": "2020-08-19T16:28:31.102Z",
"updated_at": "2020-08-19T16:28:31.102Z",
"charge_amount_cents": 10000,
"refund_amount_cents": 0,
"tax_amount_cents": 0,
"sale_amount_cents": 10000,
"referral": {
"id": "d154e622-278a-4103-b191-5cbebae4047a",
"stripe_account_id": "acct_ABC123",
"stripe_customer_id": "cus_ABC123",
"conversion_state": "conversion",
"deactivated_at": null,
"expires_at": "2020-10-18T16:13:12.109Z",
"created_at": "2020-08-19T16:13:12.109Z",
"updated_at": "2020-08-19T16:28:31.166Z",
"customer": {
"platform": "stripe",
"id": "cus_ABC123",
"name": "Freddie Mercury",
"email": "[email protected]"
},
"visits": 2,
"link": {
"id": "b759a9ed-ed63-499f-b621-0221f2712086",
"url": "http://www.demo.com:8080/?via=james",
"token": "james",
"visitors": 197,
"leads": 196,
"conversions": 156
}
},
"affiliate": {
"id": "07d8acc5-c689-4b4a-bbab-f88a71ffc012",
"created_at": "2020-05-22T02:55:19.934Z",
"updated_at": "2020-08-19T16:28:31.168Z",
"first_name": "James",
"last_name": "Bond",
"email": "[email protected]",
"paypal_email": "",
"confirmed_at": "2020-07-09T03:53:06.760Z",
"paypal_email_confirmed_at": "2020-07-03T17:49:23.489Z",
"receive_new_commission_notifications": true,
"sign_in_count": 1,
"unconfirmed_email": null,
"stripe_customer_id": null,
"stripe_account_id": null,
"visitors": 197,
"leads": 196,
"conversions": 156,
"campaign": {
"id": "c3482343-8680-40c5-af9a-9efa119713b5",
"created_at": "2020-05-22T02:55:19.802Z",
"updated_at": "2020-08-19T16:28:16.177Z",
"name": "Friends Of MI6"
}
}
}
}curl --request POST \
--url https://api.getrewardful.com/v1/affiliates \
-u YOUR_API_SECRET: \
-d first_name=James \
-d last_name=Bond \
-d [email protected] \
-d token=jb007 \
-d stripe_customer_id=cus_ABC123{ "error": "Affiliate not found: " }{ "error": "Invalid API Secret." }{
"id": "d0ed8392-8880-4f39-8715-60230f9eceab",
"created_at": "2019-05-09T16:18:59.920Z",
"updated_at": "2019-05-09T16:25:42.614Z",
"first_name": "Adam",
"last_name": "Jones",
"email": "[email protected]",
"paypal_email": null,
"state": "active",
"stripe_customer_id": "cus_ABCDEF123456",
"stripe_account_id": "acct_ABCDEF123456",
"visitors": 100,
"leads": 42,
"conversions": 18,
"campaign": {
"id": "a638ebe4-291d-47cd-a1dc-1519f9331bbd",
"created_at": "2019-04-27T18:13:13.123Z",
"updated_at": "2019-05-05T20:58:24.200Z",
"name": "Best Friends of Kyle"
},
"links": [
{
"id": "eb844960-6c42-4a3b-8009-f588a42d8506",
"url": "http://www.example.com/?via=adam",
"token": "adam",
"visitors": 100,
"leads": 42,
"conversions": 18,
}
],
"coupon": {
"id": "75434e84-255b-4314-a278-820df5e76813",
"external_id": "promo_1a2b3c",
"token": "CODE",
"leads": 0,
"conversions": 0,
"affiliate_id": "95d48f70-f1d4-42d9-b929-21996b6d9eb4"
}
}{
"error": "Could not create affiliate.",
"details": ["Email can't be blank"]
}{ "error": "Invalid API Secret." }{
"id": "39e68c88-d84a-4510-b3b4-43c75016a080",
"created_at": "2020-08-19T16:28:31.164Z",
"updated_at": "2020-08-19T16:28:31.164Z",
"amount": 3000,
"currency": "USD",
"due_at": "2020-09-18T16:28:25.000Z",
"paid_at": null,
"campaign": {
"id": "c3482343-8680-40c5-af9a-9efa119713b5",
"created_at": "2020-05-22T02:55:19.802Z",
"updated_at": "2020-08-19T16:28:16.177Z",
"name": "Friends Of MI6"
},
"sale": {
"id": "74e37d3b-03c5-4bfc-841c-a79d5799551a",
"currency": "USD",
"charged_at": "2020-08-19T16:28:25.000Z",
"stripe_account_id": "acct_ABC123",
"stripe_charge_id": "ch_ABC123",
"invoiced_at": "2020-08-19T16:28:25.000Z",
"created_at": "2020-08-19T16:28:31.102Z",
"updated_at": "2020-08-19T16:28:31.102Z",
"charge_amount_cents": 10000,
"refund_amount_cents": 0,
"tax_amount_cents": 0,
"sale_amount_cents": 10000,
"referral": {
"id": "d154e622-278a-4103-b191-5cbebae4047a",
"stripe_account_id": "acct_ABC123",
"stripe_customer_id": "cus_ABC123",
"conversion_state": "conversion",
"deactivated_at": null,
"expires_at": "2020-10-18T16:13:12.109Z",
"created_at": "2020-08-19T16:13:12.109Z",
"updated_at": "2020-08-19T16:28:31.166Z",
"customer": {
"platform": "stripe",
"id": "cus_ABC123",
"name": "Freddie Mercury",
"email": "[email protected]"
},
"visits": 2,
"link": {
"id": "b759a9ed-ed63-499f-b621-0221f2712086",
"url": "http://www.demo.com:8080/?via=james",
"token": "james",
"visitors": 197,
"leads": 196,
"conversions": 156
}
},
"affiliate": {
"id": "07d8acc5-c689-4b4a-bbab-f88a71ffc012",
"created_at": "2020-05-22T02:55:19.934Z",
"updated_at": "2020-08-19T16:28:31.168Z",
"first_name": "James",
"last_name": "Bond",
"email": "[email protected]",
"paypal_email": "",
"confirmed_at": "2020-07-09T03:53:06.760Z",
"paypal_email_confirmed_at": "2020-07-03T17:49:23.489Z",
"receive_new_commission_notifications": true,
"sign_in_count": 1,
"unconfirmed_email": null,
"stripe_customer_id": null,
"stripe_account_id": null,
"visitors": 197,
"leads": 196,
"conversions": 156,
"campaign": {
"id": "c3482343-8680-40c5-af9a-9efa119713b5",
"created_at": "2020-05-22T02:55:19.802Z",
"updated_at": "2020-08-19T16:28:16.177Z",
"name": "Friends Of MI6"
}
}
}
}curl --request PUT \
--url https://api.getrewardful.com/v1/commissions/01342824-914a-4aee-9f42-de823a8b74e2 \
--data paid_at=2020-08-23T20:37:59.256Z
-u YOUR_API_SECRET:curl --request PUT \
--url https://api.getrewardful.com/v1/commissions/01342824-914a-4aee-9f42-de823a8b74e2 \
--data paid_at=
-u YOUR_API_SECRET:curl --request PUT \
--url https://api.getrewardful.com/v1/commissions/01342824-914a-4aee-9f42-de823a8b74e2 \
--data due_at=2020-08-23T20:37:59.256Z
-u YOUR_API_SECRET:{
"id": "ceaef6d9-767e-49aa-a6ab-46c02aa79604",
"created_at": "2021-11-24T06:31:06.672Z",
"updated_at": "2022-02-22T23:17:55.119Z",
"name": "Best Friends of Rewardful",
"url": "https://rewardful.com/",
"private": false,
"private_tokens": false,
"commission_amount_cents": null,
"commission_amount_currency": null,
"minimum_payout_cents": 0,
"max_commission_period_months": null,
"max_commissions": null,
"days_before_referrals_expire": 30,
"days_until_commissions_are_due": 30,
"affiliate_dashboard_text": "",
"custom_reward_description": "",
"welcome_text": "",
"customers_visible_to_affiliates": false,
"sale_description_visible_to_affiliates": true,
"parameter_type": "query",
"stripe_coupon_id": "jo45MTj3",
"default": false,
"reward_type": "percent",
"commission_percent": 30.0,
"minimum_payout_currency": "USD",
"visitors": 150,
"leads": 39,
"conversions": 7,
"affiliates": 12
}{
"error": "Could not update commission.",
"details": [
"Due at can't be blank"
]
}{ "error": "Invalid API Secret." }Returns a list of your commissions. The commissions are returned sorted by creation date, with the most recent commissions appearing first.

curl --request GET \
--url https://api.getrewardful.com/v1/affiliate_coupons \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/affiliate_coupons?affiliate_id=a3482343-8680-40c5-af9a-9efa119713b5 \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/commissions \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/commissions?expand[]=sale \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/commissions?affiliate_id=b533bfca-7c70-4dec-9691-e136a8d9a26c \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/commissions?state=paid \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/commissions?state[]=due&state[]=pending \
-u YOUR_API_SECRET:curl --request GET \
--url https://api.getrewardful.com/v1/commissions?page=3&limit=50
-u YOUR_API_SECRET:{
"id": "3b03791a-3fb5-4bd6-8ec3-614c9fd978ca",
"currency": "USD",
"paid_at": "2022-10-12T14:55:11.242Z",
"state": "paid",
"paid_by_id": "3e5c04ae-af80-4964-b280-23df034690d4",
"created_at": "2022-10-12T14:54:52.148Z",
"updated_at": "2022-10-12T14:55:11.276Z",
"amount": 1470,
"affiliate": {
"id": "5768bd90-7953-493f-ae6c-6562eb4d7e72",
"created_at": "2022-10-12T14:25:09.323Z",
"updated_at": "2022-11-08T09:13:05.954Z",
"state": "active",
"first_name": "Joe",
"last_name": "Example",
"email": "[email protected]",
"confirmed_at": "2022-10-12T14:25:09.323Z",
"paypal_email": null,
"paypal_email_confirmed_at": null,
"wise_email": null,
"wise_email_confirmed_at": null,
"receive_new_commission_notifications": false,
"sign_in_count": 0,
"unconfirmed_email": null,
"stripe_customer_id": null,
"stripe_account_id": null,
"visitors": 376,
"leads": 142,
"conversions": 56
},
"commissions": [
{
"id": "3a4a775c-b660-4d7f-a733-6f259a2646a7",
"currency": "USD",
"stripe_account_id": "acct_1GWIyRDLlKlZvFB2",
"due_at": "2022-07-31T15:55:19.000Z",
"paid_at": "2022-08-08T09:07:11.242Z",
"created_at": "2022-07-01T15:57:18.742Z",
"updated_at": "2022-07-01T15:57:18.742Z",
"amount": 1470
}
]
}{
"id": "39e68c88-d84a-4510-b3b4-43c75016a080",
"created_at": "2020-08-19T16:28:31.164Z",
"updated_at": "2020-08-19T16:28:31.164Z",
"amount": 3000,
"currency": "USD",
"state": "due",
"due_at": "2020-09-18T16:28:25.000Z",
"paid_at": null,
"voided_at": null,
"campaign": {
"id": "c3482343-8680-40c5-af9a-9efa119713b5",
"created_at": "2020-05-22T02:55:19.802Z",
"updated_at": "2020-08-19T16:28:16.177Z",
"name": "Friends Of MI6"
},
"sale": {
"id": "74e37d3b-03c5-4bfc-841c-a79d5799551a",
"currency": "USD",
"charged_at": "2020-08-19T16:28:25.000Z",
"stripe_account_id": "acct_ABC123",
"stripe_charge_id": "ch_ABC123",
"invoiced_at": "2020-08-19T16:28:25.000Z",
"created_at": "2020-08-19T16:28:31.102Z",
"updated_at": "2020-08-19T16:28:31.102Z",
"charge_amount_cents": 10000,
"refund_amount_cents": 0,
"tax_amount_cents": 0,
"sale_amount_cents": 10000,
"referral": {
"id": "d154e622-278a-4103-b191-5cbebae4047a",
"stripe_account_id": "acct_ABC123",
"stripe_customer_id": "cus_ABC123",
"conversion_state": "conversion",
"deactivated_at": null,
"expires_at": "2020-10-18T16:13:12.109Z",
"created_at": "2020-08-19T16:13:12.109Z",
"updated_at": "2020-08-19T16:28:31.166Z",
"customer": {
"platform": "stripe",
"id": "cus_ABC123",
"name": "Freddie Mercury",
"email": "[email protected]"
},
"visits": 2,
"link": {
"id": "b759a9ed-ed63-499f-b621-0221f2712086",
"url": "http://www.demo.com:8080/?via=james",
"token": "james",
"visitors": 197,
"leads": 196,
"conversions": 156
}
},
"affiliate": {
"id": "07d8acc5-c689-4b4a-bbab-f88a71ffc012",
"created_at": "2020-05-22T02:55:19.934Z",
"updated_at": "2020-08-19T16:28:31.168Z",
"first_name": "James",
"last_name": "Bond",
"email": "[email protected]",
"paypal_email": "",
"confirmed_at": "2020-07-09T03:53:06.760Z",
"paypal_email_confirmed_at": "2020-07-03T17:49:23.489Z",
"receive_new_commission_notifications": true,
"sign_in_count": 1,
"unconfirmed_email": null,
"stripe_customer_id": null,
"stripe_account_id": null,
"visitors": 197,
"leads": 196,
"conversions": 156,
"campaign": {
"id": "c3482343-8680-40c5-af9a-9efa119713b5",
"created_at": "2020-05-22T02:55:19.802Z",
"updated_at": "2020-08-19T16:28:16.177Z",
"name": "Friends Of MI6"
}
}
}
}curl https://api.getrewardful.com/v1/commissions/39e68c88-d84a-4510-b3b4-43c75016a080 \
-u YOUR_API_SECRET:{ "error": "Commission not found: 49e68c88-d84a-4510-b3b4-43c75016a080" }{ "error": "Invalid API Secret." }