Zum Hauptinhalt springen
PUT
/
api
/
commissions
/
plans
/
{id}
Update a commission plan
curl --request PUT \
  --url https://coreapi.io/api/commissions/plans/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "percentage": "0.10",
  "triggerEvent": "invoice_finalized",
  "commissionScope": "all_invoices",
  "requireDeal": true,
  "payoutThresholdAmount": {
    "amount": 123,
    "currency": "EUR",
    "precision": 2
  },
  "monthlyRevenueThreshold": {
    "amount": 123,
    "currency": "EUR",
    "precision": 2
  },
  "isActive": true,
  "rules": [
    {
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "externalProductReference": "<string>",
      "percentage": "0.20",
      "priority": 0
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "type": "<string>",
  "percentage": "<string>",
  "basisType": "<string>",
  "triggerEvent": "<string>",
  "commissionScope": "<string>",
  "requireDeal": true,
  "payoutThresholdAmount": {
    "amount": 123,
    "displayAmount": 123,
    "currency": "<string>",
    "precision": 123
  },
  "monthlyRevenueThreshold": {
    "amount": 123,
    "displayAmount": 123,
    "currency": "<string>",
    "precision": 123
  },
  "isActive": true,
  "rules": [
    {
      "id": "<string>",
      "productId": "<string>",
      "externalProductReference": "<string>",
      "percentage": "<string>",
      "priority": 123
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Autorisierungen

Authorization
string
header
erforderlich

Bearer token of your Organisation with the commission-plans permission (read for GET, write for POST/PUT/DELETE). Send it as Authorization: Bearer .

Pfadparameter

id
string
erforderlich

The commission plan id.

Body

application/json

All fields are optional. Only the fields you send are changed.

name
string | null
Maximum string length: 255
percentage
string | null
Beispiel:

"0.10"

basisType
enum<string> | null

Whether the commission is based on the net or gross invoice amount.

Verfügbare Optionen:
net,
gross
triggerEvent
enum<string> | null
Standard:invoice_finalized

When the commission is calculated.

Verfügbare Optionen:
invoice_finalized,
invoice_paid
commissionScope
enum<string> | null
Standard:all_invoices

Which invoices generate commission.

Verfügbare Optionen:
all_invoices,
first_contract_period
requireDeal
boolean | null
payoutThresholdAmount
object

Minimum commission a sales rep must accumulate on this plan within a calendar month for that month's commissions to be paid out. Evaluated per sales rep, per plan, per month. Null means no minimum.

monthlyRevenueThreshold
object

Minimum invoice revenue a sales rep must generate on this plan within a calendar month before any commission for that month is paid out. If the revenue stays below this, the whole month is withheld. Evaluated per sales rep, per plan, per month. Null means no minimum.

isActive
boolean | null

Whether the plan is active.

rules
object[] | null

Antwort

The updated commission plan.

id
string
name
string
type
string
percentage
string | null

Base commission rate as a decimal fraction.

basisType
string | null
triggerEvent
string
commissionScope
string
requireDeal
boolean
payoutThresholdAmount
object

Minimum commission a sales rep must accumulate on this plan within a calendar month for that month's commissions to be paid out. Evaluated per sales rep, per plan, per month. Null means no minimum.

monthlyRevenueThreshold
object

Minimum invoice revenue a sales rep must generate on this plan within a calendar month before any commission for that month is paid out. If the revenue stays below this, the whole month is withheld. Evaluated per sales rep, per plan, per month. Null means no minimum.

isActive
boolean
rules
object[]
createdAt
string<date-time>
updatedAt
string<date-time>