Invoices
Billing for completed flights.
7 endpoints · base URL https://api.aerscheduler.com
get
/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. |
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. |
Example request
curl https://api.aerscheduler.com/invoices \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"get
/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. |
Example request
curl https://api.aerscheduler.com/invoices/:invoiceId \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"patch
/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. |
Example request
curl -X PATCH https://api.aerscheduler.com/invoices/:invoiceId \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"post
/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. |
Example request
curl -X POST https://api.aerscheduler.com/invoices/:invoiceId/remind \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"get
/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. |
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. |
Example request
curl https://api.aerscheduler.com/invoices/orgUsers/:orgUserId \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"get
/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. |
Example request
curl https://api.aerscheduler.com/invoices/reservation/:reservationId \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"get
/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. |
Example request
curl https://api.aerscheduler.com/invoices/reservation/:reservationId/invoiceTotals \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"