> ## Documentation Index
> Fetch the complete documentation index at: https://stage-docs.getswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Vehicle Statuses

> The vehicle statuses your fleet platform accepts, for every location: use a `slug` with `POST /integrations/statuses/{vehicle_id}/set`. `role` marks the status to set while a vehicle is being moved (`repositioning`) and once it is back in service (`available`). Filtering, sorting and pagination (`filter`, `sort`, `limit`, `cursor`) apply to the whole list; follow `next_cursor` while `has_more` is true. The list is cached for up to 60 minutes.

Integrations talk to the fleet platform your company is linked to (for example Wunder, ATOM or an MDS feed) and return its data in one common format, whatever the platform. They need a fleet integration configured for your company; `GET /integrations/availability` shows which kinds of data and operations your platform supports.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: `access_denied` when your role or API key lacks the permission below
- **404**: `no_data_binding` (`kind: fleet`) when no fleet integration is configured for your company
- **422**: Invalid parameters, or your fleet platform does not support this (`Unknown provider: ...`)
- **502**: The fleet platform returned an error (`Upstream provider error: ...`)

**Required Auth Scopes:**
- `integrations:statuses:read`



## OpenAPI

````yaml /api-reference/openapi.json get /integrations/statuses
openapi: 3.1.0
info:
  title: SWITCH API
  version: '1.0'
  description: >-
    The SWITCH API gives mobility and logistics teams programmatic access to
    SWITCH forecasts, fleet operations, routing and analytics. Every request is
    authenticated with an API key sent as a bearer token.
servers:
  - url: https://stage-api.getswitch.io
    description: Stage
security: []
tags:
  - name: Forecast
    description: Demand forecasts per zone and time window.
  - name: Operations
    description: Fleet imbalance, rebalancing suggestions and generated tasks.
  - name: Routing
    description: Route optimisation for single and multiple fleets.
  - name: Routing Sessions
    description: Saved routing sessions, their routes and drivers.
  - name: Routing Operations
    description: Complete, undo and re-route the stops of a route.
  - name: Fleet Management
    description: Your depots, stations, drivers and cargo vehicles.
  - name: Integrations
    description: Vehicles, statuses and commands on your fleet platform.
  - name: Station Based Analytics
    description: Analytics for station-based (docked) services.
  - name: Zone Based Analytics
    description: Analytics for free-floating services, by zone.
  - name: Free Float Analytics
    description: Trip history for free-floating services.
  - name: Transit Analytics
    description: Punctuality and service delivery for public transit.
  - name: Live
    description: Real-time fleet, delivery and transit status.
  - name: Grids
    description: Spatial grids used by forecasts and analytics.
  - name: API Keys
    description: Create and manage the API keys you call this API with.
paths:
  /integrations/statuses:
    get:
      tags:
        - Integrations
      summary: List Vehicle Statuses
      description: >-
        The vehicle statuses your fleet platform accepts, for every location:
        use a `slug` with `POST /integrations/statuses/{vehicle_id}/set`. `role`
        marks the status to set while a vehicle is being moved (`repositioning`)
        and once it is back in service (`available`). Filtering, sorting and
        pagination (`filter`, `sort`, `limit`, `cursor`) apply to the whole
        list; follow `next_cursor` while `has_more` is true. The list is cached
        for up to 60 minutes.


        Integrations talk to the fleet platform your company is linked to (for
        example Wunder, ATOM or an MDS feed) and return its data in one common
        format, whatever the platform. They need a fleet integration configured
        for your company; `GET /integrations/availability` shows which kinds of
        data and operations your platform supports.


        **Failure Modes:**

        - **401**: Token is missing or invalid

        - **403**: `access_denied` when your role or API key lacks the
        permission below

        - **404**: `no_data_binding` (`kind: fleet`) when no fleet integration
        is configured for your company

        - **422**: Invalid parameters, or your fleet platform does not support
        this (`Unknown provider: ...`)

        - **502**: The fleet platform returned an error (`Upstream provider
        error: ...`)


        **Required Auth Scopes:**

        - `integrations:statuses:read`
      operationId: list_statuses_integrations_statuses_get
      parameters:
        - name: config_source
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ConfigSource'
            description: >-
              Legacy parameter, kept for compatibility and ignored: the
              integration is always the one configured for your company.
            default: mobile
          description: >-
            Legacy parameter, kept for compatibility and ignored: the
            integration is always the one configured for your company.
        - name: filter
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            description: >-
              Filter on a field of the returned items, as `field:op:value` (or
              `field:value` for `eq`); repeat the parameter to combine filters
              (AND). Operators: `eq`, `neq`, `contains` (case-insensitive, text
              fields), `gt`, `gte`, `lt`, `lte` (numbers), `in` (comma-separated
              values). Nested fields use dots, e.g. `extra_params.zone`. A
              filter with an unknown operator is ignored. Example:
              `battery_level:lt:20`.
            default: []
            title: Filter
          description: >-
            Filter on a field of the returned items, as `field:op:value` (or
            `field:value` for `eq`); repeat the parameter to combine filters
            (AND). Operators: `eq`, `neq`, `contains` (case-insensitive, text
            fields), `gt`, `gte`, `lt`, `lte` (numbers), `in` (comma-separated
            values). Nested fields use dots, e.g. `extra_params.zone`. A filter
            with an unknown operator is ignored. Example: `battery_level:lt:20`.
        - name: sort
          in: query
          required: false
          schema:
            type: string
            description: >-
              Sort order as comma-separated `field:dir` pairs, `dir` being `asc`
              (default) or `desc`; items without the field come last. Example:
              `battery_level:asc,last_seen:desc`.
            default: ''
            title: Sort
          description: >-
            Sort order as comma-separated `field:dir` pairs, `dir` being `asc`
            (default) or `desc`; items without the field come last. Example:
            `battery_level:asc,last_seen:desc`.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            description: Items per page (1-500).
            default: 50
            title: Limit
          description: Items per page (1-500).
        - name: cursor
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Opaque cursor from the previous page's `next_cursor`; omit it for
              the first page. Keep the same filters and sort between pages.
            title: Cursor
          description: >-
            Opaque cursor from the previous page's `next_cursor`; omit it for
            the first page. Keep the same filters and sort between pages.
      responses:
        '200':
          description: Statuses retrieved. One page of statuses and the pagination state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_IntegrationStatus_'
              example:
                items:
                  - slug: available
                    label: Available
                    icon: CircleCheck
                    role: available
                    extra_params: {}
                next_cursor: NTA=
                has_more: true
                total_count: 8
        '401':
          description: Unauthorized. Token is missing or invalid.
        '403':
          description: Forbidden. Insufficient permissions.
        '404':
          description: Not Found. No fleet integration configured for your company.
        '422':
          description: >-
            Unprocessable Entity. Invalid parameters, or not supported by your
            fleet platform.
        '502':
          description: Bad Gateway. The fleet platform returned an error.
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    ConfigSource:
      type: string
      enum:
        - mobile
        - ops
      title: ConfigSource
      description: Accepted for compatibility (``?config_source=``) and ignored.
    PaginatedResponse_IntegrationStatus_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/IntegrationStatus'
          type: array
          title: Items
        next_cursor:
          type:
            - string
            - 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
          default: false
        total_count:
          type: integer
          title: Total Count
          default: 0
      type: object
      required:
        - items
      title: PaginatedResponse[IntegrationStatus]
    IntegrationStatus:
      properties:
        slug:
          type: string
          title: Slug
          description: Machine-readable identifier
        label:
          type: string
          title: Label
          description: Human-readable display label
        icon:
          type: string
          title: Icon
          description: Suggested icon name
          default: CircleDot
        role:
          type:
            - string
            - 'null'
          enum:
            - repositioning
            - available
          title: Role
          description: >-
            Semantic role used by field apps: the status to set when a vehicle
            is being moved (repositioning) or is back in service (available)
        extra_params:
          additionalProperties: true
          type: object
          title: Extra Params
          description: Provider-specific fields not covered by the schema
      type: object
      required:
        - slug
        - label
      title: IntegrationStatus
      description: Available vehicle status option from upstream.
      examples:
        - extra_params: {}
          icon: CircleCheck
          label: Available
          role: available
          slug: available
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer <key>`. Create one in the
        SWITCH Copilot under **Settings → API keys** (needs the API keys
        permission in your company), or with `POST /auth/api-keys`. The key is
        shown once, at creation.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.