> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tolt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Commission

> This endpoint updates a commission.

## Base URL `https://api.tolt.com`

<br />

### Body Parameters

<ParamField body="amount" type="number - optional">
  The commission amount in cents
</ParamField>

<ParamField body="transaction_id" type="string - optional">
  Associated transaction identifier
</ParamField>

<ParamField body="charge_id" type="string - optional">
  Associated charge identifier
</ParamField>

<ParamField body="source" type="string - optional">
  Source of the commission
</ParamField>

<ParamField body="status" type="string - optional">
  Commission status. Valid values are: 'pending', 'approved', 'paid',
  'rejected', 'refunded'
</ParamField>

<ParamField body="revenue" type="number - optional">
  The revenue amount in cents
</ParamField>

<ParamField body="created_at" type="string - optional">
  ISO 8601 timestamp of when the commission was created
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="array[object]">
  <Expandable title="properties" defaultOpen={true}>
    <ResponseField name="id" type="string">
      Unique identifier for the commission
    </ResponseField>

    <ResponseField name="amount" type="number">
      Commission amount in cents
    </ResponseField>

    <ResponseField name="customer_id" type="string">
      ID of the associated customer
    </ResponseField>

    <ResponseField name="transaction_id" type="string">
      Associated transaction identifier
    </ResponseField>

    <ResponseField name="charge_id" type="string">
      Associated charge identifier
    </ResponseField>

    <ResponseField name="charge_status" type="string">
      Status of the related charge (e.g. "paid", "failed")
    </ResponseField>

    <ResponseField name="source" type="string">
      Source of the commission
    </ResponseField>

    <ResponseField name="status" type="string">
      Commission status
    </ResponseField>

    <ResponseField name="type" type="string">
      Type of commission (e.g. "reward", "referral")
    </ResponseField>

    <ResponseField name="currency" type="string | null">
      Currency of the commission (ISO currency code) or null if not set
    </ResponseField>

    <ResponseField name="revenue" type="number">
      Revenue amount in cents
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601 timestamp of creation
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      ISO 8601 timestamp of update
    </ResponseField>

    <ResponseField name="partner_id" type="string">
      ID of the partner who earned the commission
    </ResponseField>

    <ResponseField name="program_id" type="string">
      Program ID the commission belongs to
    </ResponseField>

    <ResponseField name="organization_id" type="string">
      Organization ID
    </ResponseField>

    <ResponseField name="payout_id" type="string | null">
      ID of the payout if the commission has been paid, otherwise null
    </ResponseField>

    <ResponseField name="scheduled_approval_date" type="string | null">
      Scheduled approval date if applicable, otherwise null
    </ResponseField>

    <ResponseField name="approval_type" type="string">
      Approval type for the commission (e.g. "immediate", "manual")
    </ResponseField>

    <ResponseField name="flow_id" type="string">
      ID of the flow that generated the commission
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X PUT 'https://api.tolt.com/v1/commissions/comm_eK9bzRGn46BhVgNFHD6fDgXW' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
      "amount": 2999,
      "status": "approved",
      "revenue": 14999
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={"system"}
  {
    "success": true,
    "data": [
      {
        "id": "comm_eK9bzRGn46BhVgNFHD6fDgXW",
        "revenue": "14999",
        "charge_id": "ch_9bzRGn46BhVgNFHD6fDgXW",
        "charge_status": "paid",
        "source": "manual",
        "status": "approved",
        "type": "reward",
        "currency": null,
        "partner_id": "part_JE3mfL9dfdffci7sFaJazAv2",
        "organization_id": "org_JEsdfL9dfci7sFaJazAv2",
        "program_id": "prg_YRdddbPDAKhWfdqhJbeh",
        "transaction_id": "txn_7m46BhVkjkgNFHD6fDgXW",
        "customer_id": "cust_d6BhVgNFHD6fDgkjkjXW",
        "payout_id": null,
        "created_at": "2025-04-25T09:36:10.858Z",
        "updated_at": "2025-04-25T09:36:10.858Z",
        "amount": "2999",
        "scheduled_approval_date": null,
        "approval_type": "immediate",
        "flow_id": "flw_FX567GZjkn7RtaKbEuFatWw"
      }
    ]
  }
  ```
</ResponseExample>
