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

# List Depots

> List your company's depots, paginated with `page` and `size` and filtered with the query parameters below. Set `include_children_companies` to also list those of your child companies.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: Insufficient permissions
- **422**: Invalid filter, sort field or page parameters

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



## OpenAPI

````yaml /api-reference/openapi.json get /operations/depots
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://api.getswitch.io
    description: Production
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:
    get:
      tags:
        - Fleet Management
      summary: List Depots
      description: >-
        List your company's depots, paginated with `page` and `size` and
        filtered with the query parameters below. Set
        `include_children_companies` to also list those of your child companies.


        **Failure Modes:**

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

        - **403**: Insufficient permissions

        - **422**: Invalid filter, sort field or page parameters


        **Required Auth Scopes:**

        - `depots:read`
      operationId: list_depots
      parameters:
        - name: include_children_companies
          in: query
          required: false
          schema:
            type: boolean
            description: Also include the records of your child companies.
            default: false
            title: Include Children Companies
          description: Also include the records of your child companies.
        - name: order_by
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Comma-separated fields to sort by; prefix a field with `-` for
              descending order, e.g. `-created_at,name`.
            title: Order By
          description: >-
            Comma-separated fields to sort by; prefix a field with `-` for
            descending order, e.g. `-created_at,name`.
        - name: search
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: Case-insensitive text matched anywhere in depot name or address.
            title: Search
          description: Case-insensitive text matched anywhere in depot name or address.
        - name: name__ilike
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Case-insensitive match within depot name (a substring match unless
              you include `%` wildcards).
            title: Name  Ilike
          description: >-
            Case-insensitive match within depot name (a substring match unless
            you include `%` wildcards).
        - name: address__ilike
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: >-
              Case-insensitive match within depot address (a substring match
              unless you include `%` wildcards).
            title: Address  Ilike
          description: >-
            Case-insensitive match within depot address (a substring match
            unless you include `%` wildcards).
        - name: company_slug
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: Only records of this company (exact slug).
            title: Company Slug
          description: Only records of this company (exact slug).
        - name: company_slug__in
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            description: Only records of these companies (comma-separated slugs).
            title: Company Slug  In
          description: Only records of these companies (comma-separated slugs).
        - name: created_at__gte
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
            description: Depots created at or after this time (ISO 8601).
            title: Created At  Gte
          description: Depots created at or after this time (ISO 8601).
        - name: created_at__lte
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
            description: Depots created at or before this time (ISO 8601).
            title: Created At  Lte
          description: Depots created at or before this time (ISO 8601).
      responses:
        '200':
          description: >-
            Depots retrieved successfully. Returns a paginated list of depot
            profiles matching the specified filter criteria.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page__T_Customized_DepotPublic_'
              example:
                items:
                  - id: 7
                    name: Lambrate Depot
                    address: Via Rombon 11, 20134 Milano MI
                    latitude: 45.4887
                    longitude: 9.2415
                    company_slug: acme-mobility
                    created_at: '2026-09-18T10:02:00Z'
                    updated_at: '2026-11-03T08:30:00Z'
                total: 1
                page: 1
                size: 10
                pages: 1
        '401':
          description: >-
            Unauthorized. Token is missing, invalid, malformed, expired, or
            revoked.
        '403':
          description: >-
            Forbidden. The authenticated user does not have sufficient
            permissions to list depots.
        '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:
    Page__T_Customized_DepotPublic_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/DepotPublic'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
        pages:
          type: integer
          minimum: 0
          title: Pages
      type: object
      required:
        - items
        - total
        - page
        - size
        - pages
      title: Page[~T]Customized[DepotPublic]
    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.