LogoLogo
REST APIWebhooksHelp Center →
  • Introduction
  • JavaScript API
    • Overview
  • REST API
    • Overview
    • Campaigns
      • The campaign object
      • List campaigns
      • Create campaign
      • Retrieve campaign
      • Update campaign
    • Affiliates
      • The affiliate object
      • List affiliates
      • Create affiliate
      • Retrieve affiliate
      • Update affiliate
      • Magic Link (SSO)
    • Affiliate Links
      • The affiliate link object
      • List affiliate links
      • Create affiliate link
      • Retrieve affiliate link
      • Update affiliate link
    • Affiliate Coupons
      • The affiliate coupon object
      • List affiliate coupons
      • Create affiliate coupon
      • Retrieve affiliate coupon
    • Referrals
      • The referral object
      • List referrals
    • Commissions
      • The commission object
      • List commissions
      • Retrieve commission
      • Update commission
      • Delete commission
    • Payouts
      • The payout object
      • List payouts
      • Retrieve a payout
      • Mark a payout as paid
  • Webhooks
    • Overview
    • Endpoints
    • Requests
    • Event types
    • Signed webhooks
  • Links
    • Help Center
    • Sign up
    • Login
    • Learn more about Rewardful
Powered by GitBook
On this page
  • Request
  • Parameters
  • Examples
  • Response

Was this helpful?

Export as PDF
  1. REST API
  2. Commissions

Update commission

Updates the specified commission by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

PreviousRetrieve commissionNextDelete commission

Last updated 6 months ago

Was this helpful?

Note: While still supported, this is no longer the preferred method for marking a commission as paid. For that, use the method, which allows you to mark a batch of commissions for a single affiliate as paid with a single API call.

Request

Method

URL

PUT

https://api.getrewardful.com/v1/commissions/:id

Parameters

Parameter

Description

paid_at

due_at

Examples

Mark a commission as paid

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:

Mark a commission as unpaid

curl --request PUT \
  --url https://api.getrewardful.com/v1/commissions/01342824-914a-4aee-9f42-de823a8b74e2 \
  --data paid_at=
  -u YOUR_API_SECRET:

Change the due date of a commission

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:

Response

Response code

Body

200

{
  "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": "freddie@example.com"
      },
      "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": "jb007@mi.co.uk",
      "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"
      }
    }
  }
}

Invalid parameters

Response code

Body

422

JSON object describing validation errors.

{
  "error": "Could not update commission.",
  "details": [
    "Due at can't be blank"
  ]
}

Authentication failure

Response code

Body

401

Description of the authentication failure.

{  "error": "Invalid API Secret." }

Timestamp (as an formatted string) representing when this commission was paid. Can be any time in the past/future.

Timestamp (as an formatted string) indicating when this commission should be considered payable to the affiliate. Can be any time in the past/future, but cannot be blank.

JSON object describing the updated .

Mark a payout as paid
ISO 8601
ISO 8601
commission