Invoices
Billing for completed flights.
9 endpoints · base URL https://api.aerscheduler.com
/invoicesList invoices
Every invoice in the organization. Administrators only , this is the whole membership's payment history plus revenue aggregates, so it is treated as a financial surface rather than an operational one. Dispatchers get the per-reservation invoice instead.
Query parameters
startDate | string | Start of the window, ISO 8601. Include an offset or Z. |
endDate | string | End of the window, ISO 8601. |
q | string | Free-text filter. Matches the fields a person would search on. |
paid | boolean | Filter on paid state. |
voided | boolean | Filter on voided state. paid=false on its own still includes voided invoices, which nobody owes; pass voided=false for outstanding. |
overdue | boolean | Only invoices that are past due: unpaid, not voided, and carrying a dueAt in the past. An invoice with no due date is never overdue. Matches the Overdue status of the revenue report. |
limit | integer | Rows to return, 1,1000. Defaults to 1000; a larger value is clamped rather than rejected. |
offset | integer | Rows to skip, for paging. Defaults to 0. |
sort | string | Field to order by before paging, as a dot path into the row , total, user.firstName. Omit to keep the endpoint's own order. Numbers and ISO timestamps order as numbers and instants, not as text, and empty values always sort last regardless of direction. Ordering happens before the page is cut, so it orders the whole collection rather than the page you are holding. |
order | "asc" | "desc" | asc (default) or desc. Only meaningful with sort. |
Responses
200 | OK | The invoices.→ { data: Invoice[] } |
400 | Bad Request | The date range is unparseable. |
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/invoices \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoicesCreate an invoice
Bills a member for something that isn't a flight , a checkout fee, a headset, a late cancellation. Line items are validated against the organization before anything is written.
For billing a completed flight, use POST /reservations/{id}/invoices instead: it prices the booking from the meters you recorded.
Request body
The invoice. Exactly one of customer or guest is required.
customer | object | Bill a member. Mutually exclusive with guest. |
guest | object | Bill a non-member by name and email. Mutually exclusive with customer. |
memo | string | Optional note shown on the invoice. |
itemsrequired | object[] | Line items. unitPrice is in cents. |
dueAt | string | When payment is due. |
dueIn | integer | Days until due, used when Stripe needs a relative due. |
Responses
200 | OK | Success.→ { data: Invoice } |
201 | Created | The invoice.→ { data: Invoice } |
400 | Bad Request | A line item or the customer failed validation. |
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/invoices \
-H "Authorization: Bearer $AERSCHEDULER_KEY" \
-H "Content-Type: application/json" \
-d '{"items":[]}'/invoices/{invoiceId}Get an invoice
One invoice with its line items.
Path parameters
invoiceIdrequired | integer | The invoice id. |
Responses
200 | OK | Success.→ { data: Invoice } |
401 | Unauthorized | No token, an expired token, or a malformed one. Sign in again. |
403 | Forbidden | Authenticated, but not allowed to do this. |
404 | Not Found | No such invoice. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl https://api.aerscheduler.com/invoices/:invoiceId \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoices/{invoiceId}Update an invoice
Adjusts line items or marks it paid. Requires the admin role.
Path parameters
invoiceIdrequired | integer | The invoice id. |
Responses
200 | OK | Success.→ { data: Invoice } |
400 | Bad Request | Validation failed. |
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 PATCH https://api.aerscheduler.com/invoices/:invoiceId \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoices/summarySummarise invoices
Revenue and outstanding totals for a window, in cents, with the counts behind them. Administrators only, like the list.
Takes the same startDate, endDate and q as GET /invoices, so it describes exactly the invoices that endpoint would return , except paid, which narrows the list but not this. Use it instead of adding up a list you fetched: lists are capped at 1,000 rows, so summing what you received would give you the total of an arbitrary thousand invoices for any organization with more than that.
Query parameters
startDate | string | Start of the window, ISO 8601. Include an offset or Z. |
endDate | string | End of the window, ISO 8601. |
q | string | Free-text filter. Matches the fields a person would search on. |
voided | boolean | Filter on voided state. outstanding already excludes voided invoices; this narrows revenue too. |
Responses
200 | OK | The totals.→ { data: object } |
400 | Bad Request | The date range is unparseable. |
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/invoices/summary \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoices/{invoiceId}/remindSend a payment reminder
Emails the member about an outstanding invoice. Requires the admin role.
Path parameters
invoiceIdrequired | integer | The invoice id. |
Responses
200 | OK | Success.→ { data: object } |
204 | No Content | Success. No body. |
400 | Bad Request | Already paid, or reminded too recently. |
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/invoices/:invoiceId/remind \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoices/orgUsers/{orgUserId}List a member's invoices
Your own, or anyone's if you are an administrator.
Path parameters
orgUserIdrequired | integer | The membership id. |
Query parameters
startDate | string | Start of the window, ISO 8601. Include an offset or Z. |
endDate | string | End of the window, ISO 8601. |
paid | boolean | Filter on paid state. |
voided | boolean | Filter on voided state. paid=false on its own still includes voided invoices, which nobody owes; pass voided=false for outstanding. |
overdue | boolean | Only invoices that are past due: unpaid, not voided, and carrying a dueAt in the past. An invoice with no due date is never overdue. Matches the Overdue status of the revenue report. |
limit | integer | Rows to return, 1,1000. Defaults to 1000; a larger value is clamped rather than rejected. |
offset | integer | Rows to skip, for paging. Defaults to 0. |
sort | string | Field to order by before paging, as a dot path into the row , total, user.firstName. Omit to keep the endpoint's own order. Numbers and ISO timestamps order as numbers and instants, not as text, and empty values always sort last regardless of direction. Ordering happens before the page is cut, so it orders the whole collection rather than the page you are holding. |
order | "asc" | "desc" | asc (default) or desc. Only meaningful with sort. |
Responses
200 | OK | The invoices.→ { data: Invoice[] } |
400 | Bad Request | Not your invoices, and you are not an administrator. |
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/invoices/orgUsers/:orgUserId \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoices/reservation/{reservationId}Get a reservation's invoice
The bill for one flight. Dispatchers can read this even though they cannot list the organization's invoices.
Path parameters
reservationIdrequired | integer | The reservation id. |
Responses
200 | OK | Success.→ { data: Invoice } |
401 | Unauthorized | No token, an expired token, or a malformed one. Sign in again. |
403 | Forbidden | Authenticated, but not allowed to do this. |
404 | Not Found | That flight has not been invoiced. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl https://api.aerscheduler.com/invoices/reservation/:reservationId \
-H "Authorization: Bearer $AERSCHEDULER_KEY"/invoices/reservation/{reservationId}/invoiceTotalsGet a reservation's totals
What the flight comes to, broken down, without creating an invoice.
Path parameters
reservationIdrequired | integer | The reservation id. |
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. |
404 | Not Found | No such reservation. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
curl https://api.aerscheduler.com/invoices/reservation/:reservationId/invoiceTotals \
-H "Authorization: Bearer $AERSCHEDULER_KEY"