AerScheduler

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

get/organizations/splitRules

Your 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

200OKSuccess.{ data: object }
401UnauthorizedNo token, an expired token, or a malformed one. Sign in again.
403ForbiddenAuthenticated, but not allowed to do this.
429Too Many RequestsRate limited. Retry-After says how long to wait.
Example request
curl https://api.aerscheduler.com/organizations/splitRules \
  -H "Authorization: Bearer $AERSCHEDULER_KEY"
put/organizations/splitRules

Set 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.

reservationTypestringWhich booking type, e.g. ground. Omit for the organization-wide default.
chargeLinerequiredstringaircraft (machine or room time) or instruction.
apportionmentstringwhole (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

200OKSuccess.{ data: object }
400Bad RequestUnknown charge, unknown apportionment, or a booking type that only ever has one person paying.
401UnauthorizedNo token, an expired token, or a malformed one. Sign in again.
403ForbiddenAuthenticated, but not allowed to do this.
429Too Many RequestsRate limited. Retry-After says how long to wait.
Example request
curl -X PUT https://api.aerscheduler.com/organizations/splitRules \
  -H "Authorization: Bearer $AERSCHEDULER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"chargeLine":"…"}'
delete/organizations/splitRules

Clear all cost-splitting rules

Removes every rule, returning the organization to one invoice per booking. Requires the admin role.

Responses

200OKSuccess.{ data: object }
401UnauthorizedNo token, an expired token, or a malformed one. Sign in again.
403ForbiddenAuthenticated, but not allowed to do this.
429Too Many RequestsRate limited. Retry-After says how long to wait.
Example request
curl -X DELETE https://api.aerscheduler.com/organizations/splitRules \
  -H "Authorization: Bearer $AERSCHEDULER_KEY"
post/organizations/splitRules/preset

Apply 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.

presetrequiredstringflight_school, flying_club, fbo or partnership.

Responses

200OKSuccess.{ data: object }
400Bad RequestNot one of the four presets.
401UnauthorizedNo token, an expired token, or a malformed one. Sign in again.
403ForbiddenAuthenticated, but not allowed to do this.
429Too Many RequestsRate limited. Retry-After says how long to wait.
Example request
curl -X POST https://api.aerscheduler.com/organizations/splitRules/preset \
  -H "Authorization: Bearer $AERSCHEDULER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"preset":"…"}'