DocumentationAPI ReferenceContact UsGet Started
Introduction

Affiliates

List affiliates GETGet affiliate GETCreate affiliate POSTUpdate affiliate PUT

Campaigns

List campaigns GETGet campaign GETCreate campaign POSTUpdate campaign PUT

Referrals

List referrals GETCreate referral POSTUpdate referral PUT

Commissions

List commissions GETGet commission GETCreate commission POSTUpdate commission PUT

Payouts

List payouts GETGet payout GET
Commissions

Create commission

Manually creates a commission for a referral.

Commissions are automatically created from Stripe payments made by referrals. Only use this endpoint to manually create commissions that aren't tracked through Stripe.

POST
/commissions
/commissions

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

API key authentication. Use your API key as the bearer token. The organization that owns the key must have an active or trialing PromoteKit subscription; otherwise requests fail with a 403 subscription_error.

In: header

Request Body

application/jsonRequired

referral_id
Required
string

UUID of the referral this commission is for (required)

Format: "uuid"

revenue_amount
Required
number

Transaction/revenue amount (required, must be greater than 0)

commission_amount
Required
number

Commission earned (required, must be greater than 0)

referral_datestring

Date of the referral (defaults to now)

Format: "date-time"

stripe_payment_idstring

Stripe payment ID reference

curl -X POST "https://www.promotekit.com/api/v1/commissions" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "referral_id": "2d946960-d63d-4137-b67f-4dc8d4a3067c",
    "revenue_amount": 0,
    "commission_amount": 0,
    "referral_date": "2019-08-24T14:15:22Z",
    "stripe_payment_id": "string"
  }'

Previous

Get commission GET

Next

Update commission PUT

Commission created

{
  "success": true,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "revenue_amount": 0,
    "currency": "string",
    "commission_amount": 0,
    "payout_status": "not_paid",
    "referral_date": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "stripe_payment_id": "string",
    "affiliate": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "email": "user@example.com",
      "first_name": "string",
      "last_name": "string",
      "payout_email": "user@example.com",
      "links": [
        {
          "url": "string",
          "code": "string"
        }
      ],
      "promo_codes": [
        {
          "code": "string",
          "external_id": "string"
        }
      ],
      "clicks": 0,
      "approved": true,
      "banned": true,
      "details": "string",
      "custom_fields": [
        {
          "id": "string",
          "label": "string",
          "value": "string"
        }
      ],
      "new_paid_referral_notifications": true,
      "created_at": "2019-08-24T14:15:22Z",
      "campaign": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "name": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "website_url": "string",
        "commission_type": "percentage",
        "commission_amount": 0,
        "is_default": true,
        "limit_type": "string",
        "limit_amount": 0,
        "code_mode": "link",
        "reference_coupon": "string",
        "custom_commission_type": "string",
        "welcome_message": "string",
        "approval_needed": true,
        "collect_details": true,
        "details_text": "string",
        "custom_fields": [
          {
            "id": "string",
            "label": "string",
            "type": "text",
            "options": [
              "string"
            ],
            "required": true
          }
        ],
        "hide_emails": true,
        "dashboard_text": "string",
        "cookie_duration": 0,
        "first_payment_commission": {
          "enabled": true,
          "type": "string",
          "amount": 0
        }
      }
    },
    "referral": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "email": "user@example.com",
      "subscription_status": "active",
      "signup_date": "2019-08-24T14:15:22Z",
      "stripe_customer_id": "string",
      "created_at": "2019-08-24T14:15:22Z"
    },
    "payout": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "affiliate_name": "string",
      "payout_email": "user@example.com",
      "amount": 0,
      "currency": "string",
      "period": "string",
      "payment_count": 0,
      "created_at": "2019-08-24T14:15:22Z"
    }
  }
}