> ## 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.

# Get Depot by ID

> Get one depot by ID.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: Insufficient permissions, or the depot belongs to a company you cannot access
- **404**: No depot with this ID

**Required Auth Scopes:**
- `depots:read`



## OpenAPI

````yaml /api-reference/openapi.json get /operations/depots/{depot_id}
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:
  /operations/depots/{depot_id}:
    get:
      tags:
        - Fleet Management
      summary: Get Depot by ID
      description: >-
        Get one depot by ID.


        **Failure Modes:**

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

        - **403**: Insufficient permissions, or the depot belongs to a company
        you cannot access

        - **404**: No depot with this ID


        **Required Auth Scopes:**

        - `depots:read`
      operationId: get_depot_by_id
      parameters:
        - name: depot_id
          in: path
          required: true
          schema:
            type: integer
            description: ID of the depot.
            title: Depot Id
          description: ID of the depot.
      responses:
        '200':
          description: >-
            Depot retrieved successfully. Returns the complete depot profile
            including coordinates, address, and company ownership.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DepotPublic'
        '401':
          description: >-
            Unauthorized. Token is missing, invalid, malformed, expired, or
            revoked.
        '403':
          description: >-
            Forbidden. The authenticated user does not have sufficient
            permissions to read depots.
        '404':
          description: Not Found. No depot exists with the specified ID in the system.
        '422':
          description: >-
            Unprocessable Entity. Request validation failed due to malformed
            data, missing required fields, or invalid field types.
        '500':
          description: Internal Server Error.
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    DepotPublic:
      properties:
        id:
          type: integer
          title: Id
          description: Unique ID.
          examples:
            - 1
        name:
          type: string
          title: Name
          description: Depot name.
          examples:
            - Lambrate Depot
        address:
          type: string
          title: Address
          description: Full address.
          examples:
            - Via Rombon 11, 20134 Milano MI
        latitude:
          type: number
          title: Latitude
          description: Latitude.
          examples:
            - 45.4887
        longitude:
          type: number
          title: Longitude
          description: Longitude.
          examples:
            - 9.2415
        company_slug:
          type: string
          title: Company Slug
          description: Owning company slug.
          examples:
            - acme-mobility
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Datetime when the record was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          title: Updated At
          description: Datetime when the record was last updated, if ever.
      type: object
      required:
        - id
        - name
        - address
        - latitude
        - longitude
        - company_slug
        - created_at
      title: DepotPublic
      description: |-
        Public schema for a depot resource.

        Exposes depot details to API consumers, including coordinates,
        address, and company ownership.
      examples:
        - address: Via Rombon 11, 20134 Milano MI
          company_slug: acme-mobility
          created_at: '2026-09-18T10:02:00Z'
          id: 7
          latitude: 45.4887
          longitude: 9.2415
          name: Lambrate Depot
          updated_at: '2026-11-03T08:30:00Z'
  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.