Calculate the income splits of an expectation

POST /api/v1/expectation/calculate

Headers

application/json

Body Required

  • chargeable_type string Required

    Chargeable model type to run calculation on. Valid types are: client, plan

  • chargeable_uuid string Required

    Chargeable model UUID to run calculation on.

  • amount integer Required

    Expected net amount to calculate on in pennies.

  • ongoing boolean

    Whether to run the calculation based on ongoing charges. Leave as false for initial charges. Defaults to false.

  • tax_exempt boolean

    Denotes whether the net amount given is tax exempt or not. Defaults to true.

  • tax number Required

    Custom tax rate to apply to the net amount. Defaults to firm setting or defaults to Plannr setting of 20%.

POST /api/v1/expectation/calculate
curl \
 -X POST https://api.plannrcrm.com/api/v1/expectation/calculate \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -H "X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}" \
 -d '{"chargeable_type":"plan","chargeable_uuid":"709f9b14-373b-44af-bb52-35706b038103","amount":12500,"ongoing":false,"tax_exempt":false,"tax":0.0}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
X-PLANNR-ACCOUNT-UUID: {YOUR_PLANNR_ACCOUNT_UUID}

# Payload
{
  "chargeable_type": "plan",
  "chargeable_uuid": "709f9b14-373b-44af-bb52-35706b038103",
  "amount": 12500,
  "ongoing": false,
  "tax_exempt": false,
  "tax": 0.0
}