Fleet integrations

Partner API reference

The endpoints your fleet serves, and REMI calls.

Base URLhttps://fleet.example.com
OpenAPI
Markdown

Authentication

REMI sends the token you set with PATCH /fleet as Authorization: Bearer <token>.

State

REMI calls this to read your bots.

List bots with state

GET/bots

REMI polls this while your transport is http and you are not pushing state. Return every bot on every call, complete, without pagination: a bot left out, or with an invalid state, counts as a failed sample for that bot.

  • Answer within 5 seconds and under 1 MiB. REMI never runs two polls at once: the interval (poll_interval_active_ms while any bot holds a job, poll_interval_idle_ms otherwise) starts when the previous answer ends.
  • A bot becomes disconnected after 3 failed or missing polls in a row, or when its state is 60 seconds old. It reconnects after 2 polls in a row with connected: true and a fresh timestamp.

Response 200

botsrequiredComplete bot states, as BotState.

Errors

401Reject a missing or wrong bearer token. REMI counts any non-2xx answer as a failed poll.
500Any other non-2xx status, a timeout, or a body that is not { "bots": [...] } counts as a failed poll for every bot.
Request
curl -X GET 'https://fleet.example.com/bots' \
  -H "Authorization: Bearer $FLEET_API_TOKEN"
Example response 200
{
  "bots": [
    {
      "bot_id": "ACME-4T001",
      "seq": 88214,
      "timestamp": "2026-06-17T15:48:08.000Z",
      "available": true,
      "connected": true,
      "position": {
        "lat": 4.6498,
        "lng": -74.0712,
        "azimuth": 90.3
      },
      "battery": {
        "percentage": 74
      },
      "motion": {
        "speed_mps": 0
      },
      "door": "closed",
      "current_command": {
        "id": "ES-5867/pickup",
        "state": "succeeded",
        "accepted_at": "2026-06-17T15:46:31.220Z",
        "updated_at": "2026-06-17T15:48:05.400Z"
      }
    },
    {
      "bot_id": "ACME-4T002",
      "seq": 51002,
      "timestamp": "2026-06-17T15:48:08.000Z",
      "available": false,
      "connected": true,
      "position": {
        "lat": 4.6498,
        "lng": -74.0712,
        "azimuth": 90.3
      },
      "battery": {
        "percentage": 31
      },
      "motion": {
        "speed_mps": 1.4
      },
      "door": "closed",
      "current_command": {
        "id": "ES-5868/dropoff",
        "state": "executing",
        "accepted_at": "2026-06-17T15:47:55.000Z"
      }
    }
  ]
}

Commands

REMI calls this to give a bot an order.

Accept a command

POST/bots/{bot_id}/commands

REMI gives one bot one command and expects 202 as soon as it is queued, not when the bot finishes. Progress comes back in current_command of the bot state.

  • Be idempotent on (bot_id, id). An unconfirmed command is resent with the same id every 10 seconds, 3 sends in total.
  • Only 202 with a valid CommandStatus body counts as received. Any other 2xx, or an invalid body, is treated as not received and resent.
  • A 202 body with state: rejected ends the command. With state: failed (its mission already ended), REMI sends a navigate_to again under a new id, <id>~1, <id>~2 and so on, at most 5 times.
  • A navigate_to during another navigation must replace it if you declared supports_command_interrupt: true. Otherwise REMI sends cancel_navigation first and waits for it.
  • set_door is never sent to a bot with has_door: false, and closed never to one with manual_close_door: true.
  • A corrected destination is information: REMI neither resends nor cancels, and expects the bot to drive to corrected_position. Report position and motion so REMI can see the bot stop within 25 m of it.

Answer a 4xx with a problem body whose code is one of the codes below. REMI also reads reason and correction_distance_m.

Path parameters

bot_idrequired
string
The bot_id REMI registered, not the fleet_serial.

Response 202

idrequired
string
The command id REMI sent.
staterequired
'accepted' | 'executing' | 'succeeded' | 'failed' | 'rejected'
accepted: queued. executing: in progress. succeeded, failed and rejected are terminal. failed: accepted but cannot finish. rejected: you will not take it, with error.code and rejected_at.
accepted_at
string (date-time)
Required unless state is rejected.
rejected_at
string (date-time)
Required when state is rejected, absent otherwise.
updated_at
string (date-time)
When state last changed.
error
object
Set when state is failed or rejected. On a rejection, code is one of the four rejection codes.
error.coderequired
string
error.messagerequired
string
corrected_position
object
Where the bot will really stop when you moved a navigate_to destination. Only while accepted or executing.
corrected_position.latrequired
number
Latitude in decimal degrees, WGS 84. -90 to 90.
corrected_position.lngrequired
number
Longitude in decimal degrees, WGS 84. -180 to 180.
correction_distance_m
number
Meters between the requested destination and corrected_position, or, on a DESTINATION_UNREACHABLE rejection, your network.

Errors

404BOT_NOT_FOUNDUnknown bot. Final: REMI does not resend.
409COMMAND_EXPIREDexpires_at is in the past. Final: REMI does not resend.
409BOT_BUSYThe bot cannot take the command in its current state, not transiently. Final: REMI does not resend.
422UNSUPPORTED_COMMANDThe bot does not support the command type or a parameter. Final: REMI does not resend.
422DESTINATION_UNREACHABLEThe destination is too far from your drivable network. Include correction_distance_m. Final: REMI does not resend.
500Any 5xx, a timeout or a network failure means not received: REMI resends the same id after 10 seconds, 3 sends in total.
Request
curl -X POST 'https://fleet.example.com/bots/{bot_id}/commands' \
  -H "Authorization: Bearer $FLEET_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"id":"ES-5867/pickup","type":"navigate_to","params":{"lat":4.6512,"lng":-74.0689},"issued_at":"2026-06-17T15:46:31.000Z"}'
Example body
{
  "id": "ES-5867/pickup",
  "type": "navigate_to",
  "params": {
    "lat": 4.6512,
    "lng": -74.0689
  },
  "issued_at": "2026-06-17T15:46:31.000Z"
}
Example response 202
{
  "id": "ES-5867/pickup",
  "state": "accepted",
  "accepted_at": "2026-06-17T15:46:31.220Z",
  "corrected_position": {
    "lat": 4.6513,
    "lng": -74.0688
  },
  "correction_distance_m": 14.2
}

Types

Problem

Fields

typerequired
string
Always about:blank.
titlerequired
string
The HTTP status text.
statusrequired
integer
-9007199254740991 to 9007199254740991.
detailrequired
string
Human-readable. Do not parse it: branch on code.
instancerequired
string
The request path.
code
string
Stable machine-readable error code, when the error has one.
params
Record<string, unknown>
Values that explain the error, keyed by name.

BotState

Fields

bot_idrequired
string
seq
integer
Increasing per bot. A state is kept only if its timestamp is later than the last accepted one, or equal with a higher seq. Without it, states are not ordered. 0 to 9007199254740991.
timestamprequired
string (date-time)
When the state was measured on your side, not when it was sent.
availablerequired
boolean
Whether the bot can take new work right now, by your own verdict. Do not fold in connectivity, staleness or out of service.
out_of_service
boolean
True when you took the bot out of service. Operators are alerted while it holds a job, and new navigate_to commands are held back. Absent means false.
connectedrequired
boolean
Whether you have a live link to the bot. In MQTT mode the broker connection decides instead.
positionrequired
object
position.latrequired
number
Latitude in decimal degrees, WGS 84. -90 to 90.
position.lngrequired
number
Longitude in decimal degrees, WGS 84. -180 to 180.
position.azimuth
number
Compass bearing in degrees: 0 = North, clockwise, nominally [0, 360).
batteryrequired
object
battery.percentagerequired
integer
State of charge, 0 to 100. Below 20 the bot gets no new jobs. 0 to 100.
motion
object
motion.speed_mpsrequired
number
Ground speed in meters per second.
doorrequired
enum
Cargo door state. Send unknown when you cannot read it and unsupported when the bot has no controllable door, never closed. One of opened, closed, opening, closing, stalled, unknown, unsupported.
current_commandrequiredThe latest command this bot accepted. REMI counts a command as delivered when its id appears here. Null if none yet.

BotCommand

CommandStatus

Fields

idrequired
string
The command id REMI sent.
staterequired
'accepted' | 'executing' | 'succeeded' | 'failed' | 'rejected'
accepted: queued. executing: in progress. succeeded, failed and rejected are terminal. failed: accepted but cannot finish. rejected: you will not take it, with error.code and rejected_at.
accepted_at
string (date-time)
Required unless state is rejected.
rejected_at
string (date-time)
Required when state is rejected, absent otherwise.
updated_at
string (date-time)
When state last changed.
error
object
Set when state is failed or rejected. On a rejection, code is one of the four rejection codes.
error.coderequired
string
error.messagerequired
string
corrected_position
object
Where the bot will really stop when you moved a navigate_to destination. Only while accepted or executing.
corrected_position.latrequired
number
Latitude in decimal degrees, WGS 84. -90 to 90.
corrected_position.lngrequired
number
Longitude in decimal degrees, WGS 84. -180 to 180.
correction_distance_m
number
Meters between the requested destination and corrected_position, or, on a DESTINATION_UNREACHABLE rejection, your network.

BotEvent

Fields

bot_idrequired
string
typerequired
'arrived' | 'blocked' | 'unblocked'
arrived: a navigation finished. blocked and unblocked open and close an operator task.
command_id
string
Required for arrived: the id of the navigation command that just completed.
occurred_atrequired
string (date-time)
When it happened on your side, not when you sent it.
detail
Record<string, unknown>
For blocked: { "reason": string, "message": string }.

FleetCapabilities

Fields

supports_command_interruptrequired
boolean
Whether a navigate_to sent during another navigation is accepted and replaces it. Fleet-wide. Without a document this is false.
defaultrequired
object
Applies to every bot unless overridden.
default.has_doorrequired
boolean
Whether the bot has a remotely controllable cargo door. False: set_door is never sent.
default.supported_commandsrequired
('navigate_to' | 'cancel_navigation' | 'set_door')[]
The command types this bot accepts.
overrides
Record<string, { has_door?: boolean, supported_commands?: ('navigate_to' | 'cancel_navigation' | 'set_door')[] }>
Keyed by bot id and merged over default, field by field. Default {}.