Appearance
2. Request services
Every service follows the same loop: find locations that offer it near a vehicle, create a reservation for the time you need, and follow the reservation from check-in to check-out. The examples use parking, the service available today.
What you'll do
- Pick a service from the catalog
- Search locations and check availability
- Create a reservation and get the vehicle in
- Follow it to completion with webhooks
Before you begin
- A registered fleet with vehicles (step 1)
- A key with
locations:readandreservations:write
- Find and reserve List services
- Search locations
- Check availability
- Create a reservation
- On site Check in
- Check out
For a complete run with real payloads, see the driverless vehicle example.
See what's available
GET/fleet/v1/servicesList servicesGET /services lists the services your fleet can search for and reserve right now. PMC owns the catalog: it enables services across the network and decides which ones each fleet can use, so the list can change over time.
sh
curl https://fleet.parkingmgt.com/fleet/v1/services \
-H "Authorization: Bearer $STAGE_API_KEY"Response: 200 OK
json
{
"object": "list",
"data": [
{
"object": "service",
"id": "5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60",
"name": "Parking",
"description": "A space for a vehicle at a location, from a short stay between trips to overnight.",
"status": "available"
}
],
"has_more": false,
"next_cursor": null
}Each service has an id (a UUID). Pass it as service_id when you search, check availability and reserve; the examples use Parking's 5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60. A service that is not in your list, because PMC has not enabled it for your fleet or has paused it, is refused with 422 service_not_available. Reservations you already hold are not affected: you can still check in, check out and cancel them. Read the list at startup (and from time to time) instead of hard-coding it, and treat a service you don't know as "skip".
The time window decides
You never pick a product variant. The time you request, from start_at to end_at, defines what you reserve: for parking, a 45-minute window is a short idle stay between trips, and 22:00 to 06:00 is an overnight stay. The window decides:
- Whether it fits. The window has to fit the location's
hours(in itstimezone). Locations that arealways_openaccept any time; otherwise a reservation that does not fit gets422 outside_operating_hours.
Find a location
GET/fleet/v1/locationsSearch locationsSearch returns locations within a radius of a point that offer the service, nearest first.
| Parameter | Required | Description |
|---|---|---|
lat, lng | Yes | The search point, for example the vehicle's position. |
service_id | Yes | The service to search for: an id from GET /services. Only locations where your fleet can reserve it are returned. |
radius_meters | No | Search radius in meters. Default 5000, maximum 50000. |
start_at, end_at | No | The time you need (ISO-8601). Pass both or neither. With them, each location's service includes available for that time. |
limit, cursor | No | Pagination. |
sh
curl -G https://fleet.parkingmgt.com/fleet/v1/locations \
-H "Authorization: Bearer $STAGE_API_KEY" \
-d service_id=5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60 \
-d lat=41.8781 -d lng=-87.6298 \
-d radius_meters=3000 \
-d start_at=2026-11-02T14:00:00Z -d end_at=2026-11-02T17:00:00Zjs
const query = new URLSearchParams({
service_id: '5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60',
lat: '41.8781',
lng: '-87.6298',
radius_meters: '3000',
start_at: '2026-11-02T14:00:00Z',
end_at: '2026-11-02T17:00:00Z'
})
const res = await fetch(`${API}/locations?${query}`, { headers })
const { data: locations } = await res.json()Response: 200 OK
json
{
"object": "list",
"data": [
{
"object": "location",
"id": "eec93d2d-5729-441b-99b2-f764872ca895",
"name": "Monroe Street Garage",
"address": {
"line1": "55 E Monroe St",
"line2": null,
"city": "Chicago",
"region": "IL",
"postal_code": "60603",
"country": "US"
},
"coordinates": { "lat": 41.8807, "lng": -87.6256 },
"timezone": "America/Chicago",
"distance_meters": 420,
"access_method": "open",
"access_instructions": "Enter on Monroe St. Use lanes 3–4 marked \"Fleet\".",
"hours": { "always_open": true, "weekly": null },
"height_limit_cm": 210,
"amenities": ["restrooms", "covered", "security"],
"services": [
{
"service_id": "5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60",
"capacity": 40,
"available": 12
}
],
"created_at": "2026-11-01T15:04:05Z",
"livemode": false
}
],
"has_more": false,
"next_cursor": null
}Pick by distance and available; results are sorted by distance only. Stage does not match vehicles to locations by size: if your vehicles are tall (vans, or vehicles with roof sensors), compare them with height_limit_cm yourself. GET /fleet/v1/locations/{id} returns one location (without distance_meters).
| Location field | Description |
|---|---|
name, address, coordinates | Where the location is. |
timezone | IANA time zone. hours are in local time. |
access_method | How the vehicle gets in: open (it drives in, and your system checks it in and out). See Check in. |
access_instructions | Directions for the driver or the vehicle's route planner, or null. |
hours | { "always_open": true, "weekly": null }, or opening times per weekday (null means closed that day; "close": "24:00" is midnight). |
height_limit_cm | Posted clearance in centimeters, for information, or null if none is recorded. Stage does not check vehicle height. |
services[] | Per service: capacity held for fleets, plus available for the requested time (or right now without one). |
Check availability
GET/fleet/v1/locations/{id}/availabilityCheck availabilityTo check one location for one time window, ask for its availability. service_id, start_at, and end_at are required.
sh
curl -G https://fleet.parkingmgt.com/fleet/v1/locations/eec93d2d-5729-441b-99b2-f764872ca895/availability \
-H "Authorization: Bearer $STAGE_API_KEY" \
-d service_id=5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60 \
-d start_at=2026-11-02T14:00:00Z \
-d end_at=2026-11-02T17:00:00Zjson
{
"object": "availability",
"location": "eec93d2d-5729-441b-99b2-f764872ca895",
"service_id": "5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60",
"start_at": "2026-11-02T14:00:00Z",
"end_at": "2026-11-02T17:00:00Z",
"available": 12,
"capacity": 40,
"bookable": true,
"reason": null
}available is the capacity left across the whole requested time; for parking, the number of additional vehicles that fit. Stage does not assign stalls: each location holds capacity for fleets, and a reservation can never overbook it. When bookable is false, reason holds the error code a reservation would get, such as capacity_unavailable or outside_operating_hours.
Availability is a snapshot, not a hold
Create a reservation to hold the capacity.
Create a reservation
POST/fleet/v1/reservationsCreate a reservationReserve the service at a location, for a vehicle and a time window. Always send an Idempotency-Key: if the connection drops, retry with the same key and you get the original reservation instead of a second one.
sh
curl https://fleet.parkingmgt.com/fleet/v1/reservations \
-H "Authorization: Bearer $STAGE_API_KEY" \
-H "Idempotency-Key: 0b9c2f7e-8f4b-4c1e-9a77-5d1c2b3a4e5f" \
-H "Content-Type: application/json" \
-d '{
"location": "eec93d2d-5729-441b-99b2-f764872ca895",
"vehicle": "7da8aca7-40fc-47d8-a1b1-2bb93405532d",
"service_id": "5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60",
"start_at": "2026-11-02T14:00:00Z",
"end_at": "2026-11-02T17:00:00Z",
"external_reference": "trip-88213",
"metadata": { "driver_shift": "night" }
}'js
const res = await fetch(`${API}/reservations`, {
method: 'POST',
headers: {
...headers,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json'
},
body: JSON.stringify({
location: 'eec93d2d-5729-441b-99b2-f764872ca895',
vehicle: '7da8aca7-40fc-47d8-a1b1-2bb93405532d',
service_id: '5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60',
start_at: '2026-11-02T14:00:00Z',
end_at: '2026-11-02T17:00:00Z',
external_reference: 'trip-88213',
metadata: { driver_shift: 'night' }
})
})
const reservation = await res.json()| Field | Required | Description |
|---|---|---|
location | Yes | Location ID |
vehicle | Yes | Vehicle ID. The vehicle must be active. |
service_id | Yes | A service the location offers: an id from GET /services. |
start_at | No | When the vehicle needs the service. Defaults to now. |
end_at | No | When the vehicle will be done, after start_at. A reservation can touch at most 97 clock hours (UTC), a little over four days. Omit it for an open-ended reservation: the vehicle stays until it checks out. |
external_reference | No | Your trip, shift, or job ID (up to 128 characters). Filterable in lists. |
metadata | No | Up to 50 string key/value pairs. |
Capacity is held synchronously. On success you get 201 Created with status confirmed and an access object that tells the vehicle how to get in.
Response: 201 Created
json
{
"object": "reservation",
"id": "ee8aced1-100f-45fa-a267-8fa27978f9e3",
"status": "confirmed",
"location": "eec93d2d-5729-441b-99b2-f764872ca895",
"vehicle": "7da8aca7-40fc-47d8-a1b1-2bb93405532d",
"service_id": "5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60",
"start_at": "2026-11-02T14:00:00Z",
"end_at": "2026-11-02T17:00:00Z",
"hold_until": "2026-11-02T17:00:00Z",
"access": {
"method": "open",
"plate": null,
"instructions": "Enter on Monroe St. Use lanes 3–4 marked \"Fleet\"."
},
"checked_in_at": null,
"check_in_source": null,
"checked_out_at": null,
"check_out_source": null,
"cancelled_at": null,
"cancellation_reason": null,
"external_reference": "trip-88213",
"metadata": { "driver_shift": "night" },
"updated_at": "2026-11-01T15:04:05Z",
"created_at": "2026-11-01T15:04:05Z",
"livemode": false
}The usual failures, and what to do about them:
| HTTP status | Code | Why | What to do |
|---|---|---|---|
409 | capacity_unavailable | The location has no capacity left for the service for part of the requested time. | Try the next location. |
409 | conflict | The vehicle already has a confirmed or checked_in reservation that overlaps. Rarely, under heavy load: a concurrent request touched the same capacity (the detail says so). | Extend or cancel that one; for the concurrent case, retry with a new Idempotency-Key. |
422 | outside_operating_hours | The time does not fit the location's hours. | Pick another location or time. |
422 | service_not_offered | The location does not offer the service to your fleet. | Search with service_id set. |
422 | service_not_available | Your fleet cannot use the service right now (not in your GET /services). | Re-read GET /services; contact your PMC representative to enable a service. |
422 | vehicle_not_eligible | The vehicle is inactive. | Set it active, or use another vehicle. |
400 | validation_failed | A field is invalid, for example end_at is not after start_at. | Fix the fields in errors[]. |
403 | forbidden | The fleet is suspended. | Contact your PMC representative. |
Every code, with what it means and what to do, is in the API reference.
Open-ended reservations
A vehicle that waits for its next job, such as a robotaxi between rides, often doesn't know when it will leave. Omit end_at (and start_at, to start now) for an open-ended reservation: the vehicle stays until your system checks it out.
sh
curl https://fleet.parkingmgt.com/fleet/v1/reservations \
-H "Authorization: Bearer $STAGE_API_KEY" \
-H "Idempotency-Key: 3c2b1a09-8f7e-4d6c-9b5a-4e3d2c1b0a99" \
-H "Content-Type: application/json" \
-d '{
"location": "eec93d2d-5729-441b-99b2-f764872ca895",
"vehicle": "7da8aca7-40fc-47d8-a1b1-2bb93405532d",
"service_id": "5f1c2a8e-3b47-4d9a-8e6f-1c2d3b4a5e60"
}'end_atisnull, andhold_untiltells how long capacity is held. The first hold runs a few hours fromstart_at, or shorter when the location closes first. Check-in closes athold_until. While the vehicle is checked in, Stage extends the hold an hour at a time, about 15 minutes before it ends, as long as the location has room, and sendsreservation.updatedwith the newhold_until. If the location is full, the vehicle may stay, but 15 minutes pasthold_untilthe stay is recorded as anoverstay.- No-shows work as for any reservation. See Cancel.
- Set an end later if you learn it.
PATCHwithend_at(any time in the future, also once checked in) turns it into a reservation with a fixed end.
For fixed reservations hold_until equals end_at. The driverless example walks through a complete open-ended stay.
Check in
Locations admit vehicles by the location's access_method, today always open: the vehicle drives in, and your system checks the reservation in when it parks and out when it leaves, with /check-in and /check-out. Nothing on site knows the vehicle is there: if you never check it out, the reservation stays checked_in past end_at. Pass the reservation's access.instructions to the driver app or the vehicle's mission plan as-is. Check-in is accepted from 30 minutes before start_at until hold_until (the end of the reservation).
New access methods may be added later; treat a value you don't know like open.
/fleet/v1/reservations/{id}/check-inCheck insh
curl https://fleet.parkingmgt.com/fleet/v1/reservations/ee8aced1-100f-45fa-a267-8fa27978f9e3/check-in \
-H "Authorization: Bearer $STAGE_API_KEY" \
-H "Idempotency-Key: 5f0c1d2e-3a4b-4c5d-8e9f-0a1b2c3d4e5f" \
-H "Content-Type: application/json" \
-d '{
"occurred_at": "2026-11-02T14:03:00Z",
"coordinates": { "lat": 41.8807, "lng": -87.6256 }
}'js
const res = await fetch(`${API}/reservations/ee8aced1-100f-45fa-a267-8fa27978f9e3/check-in`, {
method: 'POST',
headers: {
...headers,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json'
},
body: JSON.stringify({
occurred_at: '2026-11-02T14:03:00Z',
coordinates: { lat: 41.8807, lng: -87.6256 }
})
})The reservation moves to checked_in. Both fields are optional: occurred_at defaults to now (send it when you check in from a queue after the fact), and coordinates is your GPS fix.
Sandbox workspace
Nothing is sent to sandbox locations: check reservations in and out yourself, exactly as in production.
Check out, extend, or cancel
Check out
POST/fleet/v1/reservations/{id}/check-outCheck outCheck-out works the same way and moves a checked_in reservation to completed:
sh
curl -X POST https://fleet.parkingmgt.com/fleet/v1/reservations/ee8aced1-100f-45fa-a267-8fa27978f9e3/check-out \
-H "Authorization: Bearer $STAGE_API_KEY" \
-H "Idempotency-Key: 9f8e7d6c-5b4a-4f3e-8d2c-1b0a9f8e7d6c"Leaving before end_at releases the capacity for others. Staying past end_at is recorded as an overstay in the vehicle's history: extend before end_at instead.
Extend or change
PATCH/fleet/v1/reservations/{id}Extend or change a reservationPATCH changes the requested time or the metadata; every field is optional. On an open-ended reservation, end_at sets a fixed end (any time in the future, also once checked in); without end_at it stays open-ended.
| Reservation status | What can change |
|---|---|
confirmed | start_at and end_at |
checked_in | end_at, and only later (extend); open-ended: any future end_at |
| Any final status | Nothing: 409 invalid_state_transition |
Stage re-checks availability for the new time (409 capacity_unavailable if it doesn't fit). Send the reservation's ETag as If-Match so you never overwrite a change you haven't seen; a stale value gets 412 precondition_failed.
sh
curl -i https://fleet.parkingmgt.com/fleet/v1/reservations/ee8aced1-100f-45fa-a267-8fa27978f9e3 \
-H "Authorization: Bearer $STAGE_API_KEY"
# HTTP/2 200
# etag: "q3cWd0mN2b1yG8xQf5LkTzR7pVh"
curl -X PATCH https://fleet.parkingmgt.com/fleet/v1/reservations/ee8aced1-100f-45fa-a267-8fa27978f9e3 \
-H "Authorization: Bearer $STAGE_API_KEY" \
-H 'If-Match: "q3cWd0mN2b1yG8xQf5LkTzR7pVh"' \
-H "Content-Type: application/json" \
-d '{ "end_at": "2026-11-02T18:00:00Z" }'Cancel
POST/fleet/v1/reservations/{id}/cancelCancel a reservationCancelling a confirmed reservation releases the capacity immediately. An optional reason is stored as cancellation_reason. A checked_in reservation cannot be cancelled: check it out instead.
sh
curl https://fleet.parkingmgt.com/fleet/v1/reservations/ee8aced1-100f-45fa-a267-8fa27978f9e3/cancel \
-H "Authorization: Bearer $STAGE_API_KEY" \
-H "Idempotency-Key: 7d6c5b4a-3f2e-4d1c-9b8a-7f6e5d4c3b2a" \
-H "Content-Type: application/json" \
-d '{ "reason": "Trip cancelled by rider" }'A reservation that is never checked in is marked no_show (or expired, if the time ends first), and the capacity is released.
Who recorded it
check_in_source and check_out_source on the reservation, and source on vehicle history events, tell you who recorded each event:
| Source | Recorded by |
|---|---|
api | Your call to /check-in or /check-out (or your team in the Fleet Console) |
admin | PMC staff, for example checking a vehicle out for you on request |
system | Stage itself, for example marking a no-show or extending an open-ended hold |
Track status
A reservation moves from confirmed to checked_in to completed, or ends as cancelled, no_show, or expired. Each change sends a signed webhook.
| Status | Meaning | Webhook |
|---|---|---|
confirmed | The capacity is held and access is issued. | reservation.confirmed |
checked_in | The vehicle is checked in and on site. | reservation.checked_in |
completed | The vehicle checked out. Final. | reservation.completed |
cancelled | You cancelled before check-in. The capacity is released. Final. | reservation.cancelled |
no_show | The vehicle never checked in. The capacity is released. Final. | reservation.no_show |
expired | The requested time ended while still confirmed. Final. | reservation.expired |
/fleet/v1/reservations/{id}Retrieve a reservation GET/fleet/v1/reservationsList reservationsRetrieve one reservation by ID, or list them newest first, filtered by status, location, vehicle, service_id, external_reference, starts_after, and starts_before:
sh
curl -G https://fleet.parkingmgt.com/fleet/v1/reservations \
-H "Authorization: Bearer $STAGE_API_KEY" \
-d status=checked_in \
-d external_reference=trip-88213Prefer webhooks to polling
Subscribe to webhooks: Stage sends a signed reservation.* event to your backend on every status change, and reservation.updated when the times change, an open-ended hold is extended, or a vehicle overstays.