Cost splitting
How a booking's cost divides when more than one person is on it. Each person is billed separately, so a shared booking produces one invoice per payer. An organization that sets no rules bills one person for the whole booking.
4 endpoints · base URL https://api.aerscheduler.com
/organizations/splitRulesYour cost-splitting rules
How this organization divides a booking's cost when more than one person is on it. Requires the admin role.
Returns the stored rules, the effective rule for every bookable type (resolved), the vocabulary this server accepts (apportionments, chargeLines, bookableTypes, personnelLimits), human copy for each option, the four starting-point presets, and worked examples computed by the actual billing engine — so an integration can show a customer what a rule will do without reimplementing the arithmetic.
The rules table is SPARSE. An organization with no rules divides nothing: one person is billed for the whole booking, which is how AerScheduler has always behaved.
Responses
200 | OK | Success.→ { data: object } |
401 | Unauthorized | No token, an expired token, or a malformed one. Sign in again. |
403 | Forbidden | Authenticated, but not allowed to do this. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl https://api.aerscheduler.com/organizations/splitRules \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/organizations/splitRulesSet a cost-splitting rule
Sets how one charge divides, for one booking type or as the organization-wide default. Requires the admin role.
Send apportionment: null to REMOVE the rule and return that charge to the product default. Absence is meaningful here — an explicit whole is not the same thing, because it would survive a later change to what the default is.
Omit reservationType (or send null) to set the organization-wide default for that charge.
Request body
The rule to set.
reservationType | string | Which booking type, e.g. ground. Omit for the organization-wide default. |
chargeLinerequired | string | aircraft (machine or room time) or instruction. |
apportionment | string | whole (one person pays), equal (divided evenly), measured (each pays their own logged time), full_to_each (each pays the full amount — this MULTIPLIES what you collect), or weighted (set shares). Null removes the rule. |
Responses
200 | OK | Success.→ { data: object } |
400 | Bad Request | Unknown charge, unknown apportionment, or a booking type that only ever has one person paying. |
401 | Unauthorized | No token, an expired token, or a malformed one. Sign in again. |
403 | Forbidden | Authenticated, but not allowed to do this. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl -X PUT https://api.aerscheduler.com/organizations/splitRules \
-H "Authorization: Bearer $AERSCHEDULER_KEY" \
-H "Content-Type: application/json" \
-d '{"chargeLine":"…"}'/organizations/splitRulesClear all cost-splitting rules
Removes every rule, returning the organization to one invoice per booking. Requires the admin role.
Responses
200 | OK | Success.→ { data: object } |
401 | Unauthorized | No token, an expired token, or a malformed one. Sign in again. |
403 | Forbidden | Authenticated, but not allowed to do this. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl -X DELETE https://api.aerscheduler.com/organizations/splitRules \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/organizations/splitRules/presetApply a starting point
Replaces the organization's rules with the defaults for a kind of operation. Requires the admin role.
Replaces rather than merges: a preset is a statement about the whole shape of an operation, and merging would leave you half-configured as one thing and half as another with no way to tell which rule came from where. GET first to see exactly which rules a preset writes.
Request body
Which kind of operation you run.
presetrequired | string | flight_school, flying_club, fbo or partnership. |
Responses
200 | OK | Success.→ { data: object } |
400 | Bad Request | Not one of the four presets. |
401 | Unauthorized | No token, an expired token, or a malformed one. Sign in again. |
403 | Forbidden | Authenticated, but not allowed to do this. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl -X POST https://api.aerscheduler.com/organizations/splitRules/preset \
-H "Authorization: Bearer $AERSCHEDULER_KEY" \
-H "Content-Type: application/json" \
-d '{"preset":"…"}'