Skip to main content
PUT
/
deals
/
{uuid}
/
commission
Set the commission calculation for a deal
curl --request PUT \
  --url https://api.journeybee.io/v1/deals/{uuid}/commission \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "calculation": {
    "entries": [
      {
        "payment_stage_id": 123,
        "calculation": {
          "value": "<string>",
          "scalingConfig": {
            "customFieldId": 123,
            "tiers": [
              {
                "optionId": 123,
                "value": 123
              }
            ]
          },
          "number_of_occurrences": 123,
          "periodRates": {
            "enabled": true,
            "periods": [
              {
                "periodNumber": 123,
                "startOccurrence": 123,
                "endOccurrence": 123,
                "value": 123
              }
            ]
          }
        }
      }
    ]
  }
}
'
{
  "calculation": {
    "entries": [
      {
        "payment_stage_id": 123,
        "calculation": {
          "value": "<string>",
          "scalingConfig": {
            "customFieldId": 123,
            "tiers": [
              {
                "optionId": 123,
                "value": 123
              }
            ]
          },
          "number_of_occurrences": 123,
          "periodRates": {
            "enabled": true,
            "periods": [
              {
                "periodNumber": 123,
                "startOccurrence": 123,
                "endOccurrence": 123,
                "value": 123,
                "scalingConfig": {
                  "customFieldId": 123,
                  "tiers": [
                    {
                      "optionId": 123,
                      "value": 123
                    }
                  ]
                }
              }
            ]
          },
          "split": {
            "oneOff": {
              "value": "<string>",
              "scalingConfig": {
                "customFieldId": 123,
                "tiers": [
                  {
                    "optionId": 123,
                    "value": 123
                  }
                ]
              },
              "number_of_occurrences": 123,
              "periodRates": {
                "enabled": true,
                "periods": [
                  {
                    "periodNumber": 123,
                    "startOccurrence": 123,
                    "endOccurrence": 123,
                    "value": 123,
                    "scalingConfig": {
                      "customFieldId": 123,
                      "tiers": [
                        {
                          "optionId": 123,
                          "value": 123
                        }
                      ]
                    }
                  }
                ]
              }
            },
            "recurring": {
              "value": "<string>",
              "scalingConfig": {
                "customFieldId": 123,
                "tiers": [
                  {
                    "optionId": 123,
                    "value": 123
                  }
                ]
              },
              "number_of_occurrences": 123,
              "periodRates": {
                "enabled": true,
                "periods": [
                  {
                    "periodNumber": 123,
                    "startOccurrence": 123,
                    "endOccurrence": 123,
                    "value": 123,
                    "scalingConfig": {
                      "customFieldId": 123,
                      "tiers": [
                        {
                          "optionId": 123,
                          "value": 123
                        }
                      ]
                    }
                  }
                ]
              }
            }
          }
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Use "Bearer <api_key>" or "Api-Key <api_key>".

Path Parameters

uuid
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$

Body

application/json
calculation
object
required

Commission calculation with one or more payment entries triggered by deal stage changes.

Response

200 - application/json

Default Response

calculation
object
required

Commission calculation with one or more payment entries triggered by deal stage changes.