Locations
Bases of operation.
5 endpoints · base URL https://api.aerscheduler.com
get
/locationsList locations
Every location in your organization.
Responses
200 | OK | The locations.→ { data: Location[] } |
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/locations \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"post
/locationsCreate a location
Adds a location to your organization. Requires the admin role.
Request body
The new location. The address is geocoded on the way in and is rejected if it cannot be resolved.
namerequired | string | |
addressrequired | Address |
Responses
201 | Created | The location that was created.→ { data: Location } |
400 | Bad Request | The body failed validation. message says which field. |
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/locations \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…","address":"…"}'get
/locations/{id}Get a location
Fetches one location by id.
Path parameters
idrequired | integer | The location id. |
Responses
200 | OK | Success.→ { data: Location } |
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 location, or it belongs to another organization. |
429 | Too Many Requests | Rate limited. Retry-After says how long to wait. |
Example request
curl https://api.aerscheduler.com/locations/:id \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"patch
/locations/{id}Update a location
Changes the fields you send and leaves the rest alone. Requires the admin role.
Path parameters
idrequired | integer | The location id. |
Request body
Fields to change.
name | string | |
timeZone | string | |
address | Address |
Responses
200 | OK | The updated location.→ { data: Location } |
400 | Bad Request | The body 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. |
Example request
curl -X PATCH https://api.aerscheduler.com/locations/:id \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"…","timeZone":"…"}'delete
/locations/{id}Delete a location
Removes the location. Requires the admin role.
Path parameters
idrequired | integer | The location id. |
Responses
204 | No Content | Success. No body. |
400 | Bad Request | The location could not be deleted — usually because something still references it. |
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 DELETE https://api.aerscheduler.com/locations/:id \
-H "Authorization: Bearer $AERSCHEDULER_TOKEN"