Skip to content

Get started · Step 1

1. Register your fleet ​

Tell Stage who you are and which vehicles you run. You do this once, then keep the vehicle list in sync as your fleet changes.

What you'll do

  • Create an API key in a workspace, with the scopes your services need
  • Check the key and its workspace with GET /fleet/v1/account
  • Add your vehicles, one at a time or in batches

Before you begin

  • A Stage organization: PMC creates it after you contact sales
  • A backend service that can call HTTPS APIs. Keys never leave your servers.

Contact sales ​

Contact PMC sales about your fleet; there is no self-serve signup. PMC creates your organization with a sandbox workspace and emails you an invitation. Accept it to sign in to the Fleet Console. The production workspace follows when PMC approves your fleet. See Workspaces.

Create an API key ​

In the Fleet Console, open the profile menu (bottom of the sidebar), pick the workspace under Workspace (start with your sandbox workspace), then open Developers → API keys from the same menu and create a key. A key belongs to the workspace you create it in, and that workspace decides whether your requests work on sandbox or production data: keys look the same in both. Choose its scopes: what the key may do. New keys get every scope unless you narrow them.

The full key is shown once, when you create it; Stage stores only a hash of it and cannot show it again. Treat it as an opaque string and don't rely on its length or characters. Afterwards the Fleet Console shows a mask, its first 4 and last 8 characters (for example e1j0...rlEPUdyY), and when it was last used, so you can tell keys apart.

sh
export STAGE_API_KEY=e1j0viAoPkPobPI-XCzAi_1KgrqkUI6_HaZsn1fUhDpyHkuhwjZBQhkMzfavP2anrlEPUdyY

Scopes ​

A :write scope implies the matching :read scope. GET /fleet/v1/account needs no scope.

ScopeGrants
locations:readList services, search locations, retrieve a location, check availability
reservations:readList and retrieve reservations
reservations:writeCreate, extend or change, and cancel reservations, and check reservations in and out
vehicles:readList and retrieve vehicles and their service history
vehicles:writeCreate, update, and delete vehicles, one by one or in batches
webhooks:readList and retrieve webhook endpoints
webhooks:writeCreate, update, and delete webhook endpoints

A request without the required scope gets 403 insufficient_scope. Give each service only what it needs: a dispatch service that reserves services needs locations:read and reservations:write; a job that keeps the vehicle list in sync needs vehicles:write.

Authenticate and verify ​

Send the key as a bearer token in the Authorization header of every request, over HTTPS; no other authentication scheme is accepted. Requests without a valid key get 401 unauthorized. Authentication is checked before the request reaches Stage, so rely on the 401 status rather than on the response body.

GET /fleet/v1/account tells you who Stage thinks is calling: the fleet, the key's workspace, the key's scopes, and your rate limit. Any valid key can call it, so use it as a startup health check.

GET/fleet/v1/accountRetrieve the account
sh
curl https://fleet.parkingmgt.com/fleet/v1/account \
  -H "Authorization: Bearer $STAGE_API_KEY"
js
const API = 'https://fleet.parkingmgt.com/fleet/v1'
const headers = { Authorization: `Bearer ${process.env.STAGE_API_KEY}` }

const res = await fetch(`${API}/account`, { headers })
const account = await res.json()
json
{
  "object": "account",
  "fleet": {
    "id": "3de8244e-8fcd-44d5-ada3-561ef75e26d2",
    "name": "Northside Rideshare Co.",
    "status": "production"
  },
  "workspace": {
    "id": "ec955a02-3694-4138-aac9-c9d361704dee",
    "name": "Sandbox",
    "type": "sandbox"
  },
  "livemode": false,
  "key": {
    "id": "4d585f88-af48-4015-ad30-2d74559dc6ec",
    "name": "Dispatch backend",
    "mask": "e1j0...rlEPUdyY",
    "scopes": ["locations:read", "reservations:write", "vehicles:write", "webhooks:read"],
    "created_at": "2026-11-01T15:04:05Z",
    "expires_at": null
  },
  "rate_limit": { "limit": 25, "window_seconds": 1 },
  "api_version": "2026-11-01"
}

Check that workspace.type is the one you expect (sandbox while you build, production in production), and compare key.scopes with what your integration calls, so a wrong key or a missing scope shows up at startup rather than as a 404 not_found or 403 insufficient_scope later. A 403 forbidden here means the fleet is suspended.

Keys are for servers only

Call Stage from your backend, never from a browser, a mobile app, or software on the vehicle. Anyone who can read the client can read the key. Store keys in a secrets manager, use separate keys per service, and revoke a key right away if it may have leaked.

To rotate a key, create a new one in the same workspace with the same scopes, deploy it, wait until the old key's last used time stops changing in the Fleet Console, then revoke the old key. You can hold several active keys at once, so rotation needs no downtime. Last used is updated every few minutes, and a revoked key stops working within about a minute.

Add vehicles ​

Reservations are made for a vehicle, so register every vehicle you want to reserve services for. external_id is your own identifier.

POST/fleet/v1/vehiclesCreate a vehicle
sh
curl https://fleet.parkingmgt.com/fleet/v1/vehicles \
  -H "Authorization: Bearer $STAGE_API_KEY" \
  -H "Idempotency-Key: 3e4f5a6b-7c8d-4e9f-a0b1-c2d3e4f5a6b7" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "car-1042",
    "plate": "7ABC123",
    "plate_state": "IL",
    "make": "Toyota",
    "model": "Camry",
    "year": 2024,
    "body_type": "sedan",
    "fuel_type": "hybrid"
  }'
js
const res = await fetch(`${API}/vehicles`, {
  method: 'POST',
  headers: {
    ...headers,
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    external_id: 'car-1042',
    plate: '7ABC123',
    plate_state: 'IL',
    make: 'Toyota',
    model: 'Camry',
    year: 2024,
    body_type: 'sedan',
    fuel_type: 'hybrid'
  })
})
const vehicle = await res.json()

The response is 201 Created with the vehicle:

json
{
  "object": "vehicle",
  "id": "7da8aca7-40fc-47d8-a1b1-2bb93405532d",
  "external_id": "car-1042",
  "plate": "7ABC123",
  "plate_state": "IL",
  "vin": null,
  "make": "Toyota",
  "model": "Camry",
  "year": 2024,
  "color": null,
  "body_type": "sedan",
  "fuel_type": "hybrid",
  "is_driverless": false,
  "status": "active",
  "metadata": {},
  "updated_at": "2026-11-01T15:04:05Z",
  "created_at": "2026-11-01T15:04:05Z",
  "livemode": false
}

A second vehicle with the same external_id gets 409 duplicate_vehicle. So does a second active vehicle with the same plate_state and plate; spaces and hyphens are ignored when plates are compared, so KX 0007 and KX-0007 are the same plate.

Vehicle fields ​

FieldTypeNotes
idstringA UUID, assigned by Stage.
external_idstringRequired. Your ID, unique per workspace. 1–64 characters: letters, digits, and . _ : - /.
platestringRequired. Up to 10 letters, digits, spaces, or hyphens. Trimmed and uppercased.
plate_statestringRequired. 2-letter issuing state or province, uppercased.
vinstringnull17 characters, without I, O, or Q.
make, model, colorstringnullFree text.
yearintegernull1980–2100.
body_typestringnullsedan, suv, minivan, van, truck, or other.
fuel_typestringnullgasoline, diesel, hybrid, plug_in_hybrid, electric, hydrogen, or other; null (the default) means unknown. The basis for future energy services such as EV charging.
is_driverlessbooleantrue for a driverless vehicle. Defaults to false.
statusstringactive or inactive. Inactive vehicles cannot get reservations.
metadataobjectUp to 50 string key/value pairs for anything else you want to keep with the vehicle, such as a depot or a vehicle height.
created_at, updated_at, livemodeStandard fields.

The vehicle record is deliberately small. Stage does not store vehicle dimensions: a location's height_limit_cm is information for you, not a check, so compare it with your vehicles when you pick a location.

Keep vehicles in sync ​

Vehicles join and leave your fleet. Update or delete them one at a time, or sync the whole list in batches.

Update a vehicle ​

PATCH/fleet/v1/vehicles/{id}Update a vehicle

PATCH changes only the fields you send; null clears a nullable field. Vehicles return an ETag; send it as If-Match to avoid overwriting a concurrent change. To take a vehicle out of service without deleting it, set it inactive:

sh
curl -X PATCH https://fleet.parkingmgt.com/fleet/v1/vehicles/7da8aca7-40fc-47d8-a1b1-2bb93405532d \
  -H "Authorization: Bearer $STAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "inactive" }'

List vehicles with GET /fleet/v1/vehicles, filtering by status, external_id, plate, fuel_type, or is_driverless, or searching with q (part of a plate, ignoring case, spaces and dashes, or part of an external_id as typed, in upper case or in lower case), and retrieve one with GET /fleet/v1/vehicles/{id}.

Delete a vehicle ​

DELETE/fleet/v1/vehicles/{id}Delete a vehicle
sh
curl -X DELETE https://fleet.parkingmgt.com/fleet/v1/vehicles/7da8aca7-40fc-47d8-a1b1-2bb93405532d \
  -H "Authorization: Bearer $STAGE_API_KEY"

Deletion fails with 409 conflict while the vehicle has confirmed or checked_in reservations. Deletion is soft: the vehicle disappears from reads and lists, its external_id and plate can be reused, and its service history is kept.

Batch upsert ​

POST/fleet/v1/vehicles/batchCreate or upsert vehicles in bulk

Load a whole fleet in batches. Up to 1,000 vehicles per request. Valid rows are written and invalid rows are reported with their zero-based index, so one bad row never blocks the rest. With "upsert": true, vehicles whose external_id already exists are updated instead of reported as errors, which makes a nightly sync from your fleet system a single call per 1,000 vehicles. For larger fleets, send several requests. In this example the second row is invalid on purpose:

sh
curl https://fleet.parkingmgt.com/fleet/v1/vehicles/batch \
  -H "Authorization: Bearer $STAGE_API_KEY" \
  -H "Idempotency-Key: 6c7d8e9f-0a1b-4c2d-8e3f-4a5b6c7d8e9f" \
  -H "Content-Type: application/json" \
  -d '{
    "upsert": true,
    "vehicles": [
      { "external_id": "car-1042", "plate": "7ABC123", "plate_state": "IL", "fuel_type": "hybrid" },
      { "external_id": "car-1043", "plate": "8XYZ552", "plate_state": "Illinois" }
    ]
  }'

The response is 200 with per-row results: car-1042 is updated, and row 1 is reported in errors.

Row error codes: validation_failed (the row is invalid), duplicate_vehicle (its external_id, or its plate among active vehicles, is already taken, or repeats an earlier row of the same request; field says which), conflict (the vehicle changed while it was being written) and service_unavailable (Stage was too busy to write the row). Retry conflict and service_unavailable rows in a new request.

Response: 200 OK
json
{
  "object": "vehicle_batch_result",
  "created": [],
  "updated": [
    {
      "object": "vehicle",
      "id": "7da8aca7-40fc-47d8-a1b1-2bb93405532d",
      "external_id": "car-1042",
      "plate": "7ABC123",
      "plate_state": "IL",
      "vin": null,
      "make": "Toyota",
      "model": "Camry",
      "year": 2024,
      "color": null,
      "body_type": "sedan",
      "fuel_type": "hybrid",
      "is_driverless": false,
      "status": "active",
      "metadata": {},
      "updated_at": "2026-11-01T16:20:00Z",
      "created_at": "2026-11-01T15:04:05Z",
      "livemode": false
    }
  ],
  "errors": [
    {
      "index": 1,
      "external_id": "car-1043",
      "code": "validation_failed",
      "message": "plate_state: Must be a 2-letter state or province code",
      "field": "plate_state"
    }
  ]
}

Batch delete ​

POST/fleet/v1/vehicles/batch-deleteDelete vehicles in bulk

Delete many vehicles at once by Stage ids or by your external_ids. Up to 1,000 ids or external_ids per request. Send exactly one of the two lists; sending both, neither, an empty list, or too many entries returns 400 validation_failed.

sh
curl https://fleet.parkingmgt.com/fleet/v1/vehicles/batch-delete \
  -H "Authorization: Bearer $STAGE_API_KEY" \
  -H "Idempotency-Key: 9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d" \
  -H "Content-Type: application/json" \
  -d '{ "external_ids": ["car-1042", "car-1099", "car-1043"] }'

The response is 200. deleted lists the vehicles this request deleted, in request order; errors lists the rest with their index:

Response: 200 OK
json
{
  "object": "vehicle_batch_delete_result",
  "deleted": [
    { "id": "7da8aca7-40fc-47d8-a1b1-2bb93405532d", "external_id": "car-1042" }
  ],
  "errors": [
    {
      "index": 1,
      "id": null,
      "external_id": "car-1099",
      "code": "not_found",
      "message": "Vehicle with external_id car-1099 was not found"
    },
    {
      "index": 2,
      "id": "86ff020a-b60a-4fd7-9709-58d41fbafca2",
      "external_id": "car-1043",
      "code": "conflict",
      "message": "Vehicle 86ff020a-b60a-4fd7-9709-58d41fbafca2 has 1 active reservation (a684a7dd-44da-4c71-8264-9d15eb9465e0). Cancel or complete them first."
    }
  ]
}
Error codeMeaning
not_foundNo such vehicle in this workspace, or it was already deleted. The side you did not send (id or external_id) is null.
conflictThe vehicle has confirmed or checked_in reservations (cancel or complete them first), or it changed while being deleted (retry).

Repeated entries are processed once. Retrying with the same Idempotency-Key returns the original response; a new key reports already-deleted vehicles as not_found.

Vehicle history ​

GET/fleet/v1/vehicles/{id}/historyList vehicle service history

Every vehicle has an append-only service history, newest first. It is kept when the vehicle is deleted.

sh
curl -G https://fleet.parkingmgt.com/fleet/v1/vehicles/7da8aca7-40fc-47d8-a1b1-2bb93405532d/history \
  -H "Authorization: Bearer $STAGE_API_KEY" \
  -d type=checked_in \
  -d since=2026-10-01T00:00:00Z
Event typeRecorded when
reservedA reservation is created and confirmed.
updatedA reservation's times change.
checked_inThe vehicle checks in.
checked_outThe vehicle checks out.
cancelledA reservation is cancelled.
no_showThe vehicle never checked in.
expiredA reservation's time ended unused.
overstayThe vehicle stayed past end_at.

Each event carries the reservation, location, service_id, occurred_at, the source that recorded it (see who recorded it), and event-specific details. Filter with type, since, and until.

Next ​

2

Request services

Your fleet is registered. Search for a service near a vehicle and reserve it.

Driverless vehicle example

Every request and response for one complete stay, in order.