Skip to main content
POST
/
commissions
/
generate_payouts
Generate payouts for commissions
curl --request POST \
  --url https://api.firstpromoter.com/api/v2/company/commissions/generate_payouts \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ids": [
    123
  ]
}'
{
  "id": 123,
  "status": "<string>",
  "total": 123,
  "selected_total": 123,
  "processed_count": 123,
  "failed_count": 123,
  "action_label": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "meta": {},
  "progress": 123,
  "processing_errors": [
    "<any>"
  ]
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys

Headers

Account-ID
string
required

Account id. You can find your Account ID on Your FirstPromoter Dashboard. Navigate to Settings → Integrations

Body

application/json
ids
integer[]
required

Commission IDs to generate payouts for. If there are more than 5 ids on the ids param/field, the action will be processed asynchronously. The response for the batch status will most likely be in_progress. The available statuses are pending, in_progress, completed, failed and stopped.

Response

Successful operation

id
integer

Operation ID

status
string

Status of the operation

total
integer

Total number of commissions

selected_total
integer

Number of selected commissions

processed_count
integer

Number of processed commissions

failed_count
integer

Number of failed operations

action_label
string

Action identifier

created_at
string<date-time>

Creation timestamp

updated_at
string<date-time>

Last update timestamp

meta
object

Additional metadata

progress
number

Progress indicator (0-1)

processing_errors
any[]

List of processing errors

I