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

# Download a job document

> Download a POD or shipping label for one job using GET /dn/jobs/export. Returns the raw file as an octet-stream attachment.

Use this endpoint to download a single job document directly. Select the job with the `do_number` query parameter, plus `date` and `type` if you need to narrow it down. The response is a raw file stream with `Content-Type: application/octet-stream` and a `Content-Disposition: attachment` header.

## Related endpoints

* [Bulk export](/api-reference/jobs/bulk-export) to queue an export for many jobs at once
* [Get export status](/api-reference/jobs/get-export-status) to poll for the generated download URL


## OpenAPI

````yaml GET /dn/jobs/export
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/jobs/export:
    get:
      tags:
        - Jobs
      summary: Download a job document
      description: Downloads one job's POD or shipping label as a file.
      operationId: downloadJobDocument
      parameters:
        - $ref: '#/components/parameters/DoNumberQuery'
        - $ref: '#/components/parameters/DateQuery'
        - $ref: '#/components/parameters/TypeQuery'
        - name: format
          in: query
          schema:
            type: string
            enum:
              - pdf
              - tiff
            default: pdf
          description: >-
            File format. Always send it, so the downloaded file gets the right
            extension.
        - name: document
          in: query
          schema:
            type: string
            enum:
              - pod
              - shipping-label
            default: pod
          description: >-
            Document type. `shipping-label` is singular here; bulk export uses
            `shipping-labels`.
      responses:
        '200':
          description: The file.
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/JobNotFound'
        default:
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    DoNumberQuery:
      name: do_number
      in: query
      required: true
      schema:
        type: string
        example: DO-10001
      description: DO number of the job.
    DateQuery:
      name: date
      in: query
      schema:
        type: string
        format: date
        example: '2026-09-15'
      description: >-
        Job date (`YYYY-MM-DD`). If several jobs share the DO number and you
        leave this out, the one with the latest date is used.
    TypeQuery:
      name: type
      in: query
      schema:
        type: string
        enum:
          - Delivery
          - Collection
      description: Job type.
  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
    JobNotFound:
      description: No job matches the DO number (and `date` / `type`, if given).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: not_found
            message: Could not find job with this DO number
    ServerError:
      description: >-
        Unexpected server error. Retry with exponential backoff, and contact
        Detrack support if it persists.
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
          example: not_found
        message:
          type: string
          example: Could not find job with this DO number
  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.