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

# List depots

> GET /dn/depots returns a paginated list of depot locations in your account with geocoded coordinates and navigation links.

Retrieve every depot configured in your Detrack account. This endpoint returns a paginated array of depot objects that include geocoded coordinates, useful for validating saved locations or building map views. Use `page` and `limit` query parameters to control the result set.

For errors and rate limits, see [Errors](/errors) and [Rate limits](/rate-limits).


## OpenAPI

````yaml GET /dn/depots
openapi: 3.0.3
info:
  title: Detrack REST API v2
  version: '2.0'
  description: >-
    Detrack REST API v2. Checked against detrack-webapp origin/main (production)
    on 2026-09-29: dn_jobs.rb @ d246ad006, dn_depots.rb @ 2a5f387, dn_routes.rb
    @ 50a73a9, app_helper.rb @ d745ad2, dn_jobs_helper.rb @ d296e30,
    job_decorator.rb @ 3041da7, run_location_decorator.rb @ 0f0274d,
    vehicle_route_plan_decorator.rb and tsp_route_decorator.rb @ 7d1f3ef,
    data_export.rb @ ed4e135.
servers:
  - url: https://app.detrack.com/api/v2
security:
  - apiKey: []
tags:
  - name: Jobs
    description: Deliveries and collections.
  - name: Depots
    description: Saved warehouse and pickup locations.
  - name: Routes
    description: Optimized multi-stop plans across vehicles.
paths:
  /dn/depots:
    get:
      tags:
        - Depots
      summary: List depots
      description: Returns a paginated list of depots, newest first.
      operationId: listDepots
      parameters:
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: A page of depots.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Depot'
                  links:
                    $ref: '#/components/schemas/Links'
                  total_count:
                    type: integer
                    example: 2
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: The query couldn't be run.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    Page:
      name: page
      in: query
      schema:
        type: integer
        default: 1
      description: Page number.
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        default: 25
      description: Records per page. The API doesn't cap it, but keep it to 100 or fewer.
  schemas:
    Depot:
      type: object
      properties:
        id:
          type: string
          readOnly: true
          example: 68f0d416e8ec54cbf4a04dba
        name:
          type: string
          example: Main Depot
        address:
          type: string
          example: >-
            SM Megamall, EDSA corner Doña Julia Vargas Ave, Mandaluyong, 1550
            Metro Manila
        addr_1:
          type: string
          nullable: true
        addr_2:
          type: string
          nullable: true
        addr_3:
          type: string
          nullable: true
        zip_code:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        country_id:
          type: string
          nullable: true
          readOnly: true
        location:
          type: array
          readOnly: true
          description: Coordinates as `[longitude, latitude]`.
          items:
            type: number
          example:
            - 121.055626
            - 14.583941
        address_lat:
          type: number
          readOnly: true
          example: 14.583941
        address_lng:
          type: number
          readOnly: true
          example: 121.055626
    Links:
      type: object
      properties:
        first:
          type: string
          nullable: true
        last:
          type: string
          nullable: true
        next:
          type: string
          nullable: true
        prev:
          type: string
          nullable: true
    Error:
      type: object
      properties:
        code:
          type: string
          example: not_found
        message:
          type: string
          example: Could not find job with this DO number
  responses:
    Unauthorized:
      description: >-
        The API key is missing or invalid. A missing `X-API-KEY` returns `{
        "error": "Missing Authorization header" }`; an invalid key returns `{
        "code": "invalid_key", "message": "Invalid key" }`.
      content:
        application/json:
          schema:
            oneOf:
              - type: object
                title: Missing key
                required:
                  - error
                properties:
                  error:
                    type: string
                    example: Missing Authorization header
              - type: object
                title: Invalid key
                required:
                  - code
                properties:
                  code:
                    type: string
                    example: invalid_key
                  message:
                    type: string
                    example: Invalid key
          example:
            code: invalid_key
            message: Invalid key
    Forbidden:
      description: Your API key's user doesn't have permission for this action.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                example: forbidden
          example:
            code: forbidden
    ServerError:
      description: >-
        Unexpected server error. Retry with exponential backoff, and contact
        Detrack support if it persists.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Your Detrack API key, from **Integrations > API Key** in the dashboard.

````

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