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

# Bulk export PODs or shipping labels

> Queue an async POD or shipping label export using POST /dn/jobs/bulk/export. Poll the returned status URL to retrieve the download link.

Use this endpoint to request a bulk export of shipping labels or proof-of-delivery (POD) documents. The export runs asynchronously. The response contains a `status_url` that you poll until the export finishes and a signed `download_url` becomes available.

## Document types

| Value | Output |
| - | - |
| `job` (default) | One PDF containing the proof of delivery for every selected job. |
| `pod` | A ZIP file with a separate POD PDF for each job. |
| `shipping-labels` | One PDF of shipping labels. Note the plural; [Download document](/api-reference/jobs/export) uses the singular `shipping-label`. |

The server picks the file format from the document type, so any `format` you send is ignored.

## Polling for the result

Send a GET request to the `status_url` every 5 to 10 seconds. When the export is complete, the response contains a `download_url`. The download URL is signed and expires after about 15 minutes. Each status request returns a freshly signed URL.

See [Get export status](/api-reference/jobs/get-export-status) for the polling endpoint details and example response.


## OpenAPI

````yaml POST /dn/jobs/bulk/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/bulk/export:
    post:
      tags:
        - Jobs
      summary: Bulk export PODs or shipping labels
      description: >-
        Queues an export of PODs or shipping labels. Poll the returned
        `status_url` until the export completes.
      operationId: bulkExportJobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  description: >-
                    Select jobs with `query.do_numbers`, with `query.date`
                    (every job on that date), or with `ids`.
                  properties:
                    ids:
                      type: array
                      items:
                        type: string
                      description: Detrack job IDs to export. Replaces `query` when set.
                    query:
                      type: object
                      properties:
                        do_numbers:
                          type: array
                          items:
                            type: string
                          example:
                            - DO-10001
                            - DO-10002
                        date:
                          type: string
                          format: date
                          example: '2026-09-15'
                        type:
                          type: string
                          enum:
                            - Delivery
                            - Collection
                    document:
                      type: string
                      enum:
                        - job
                        - pod
                        - shipping-labels
                      default: job
                      description: >-
                        `job`: one PDF of PODs. `pod`: a ZIP with one POD PDF
                        per job. `shipping-labels` (plural): one PDF of labels.
                        Any `format` you send is ignored.
      responses:
        '201':
          description: Queued. The body isn't wrapped in `data`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_url:
                    type: string
                    example: >-
                      https://app.detrack.com/api/v2/dn/jobs/export/status/5b22033310c92b1a086ece03
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        default:
          $ref: '#/components/responses/ServerError'
components:
  responses:
    BadRequest:
      description: The request body isn't valid JSON.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: invalid_json_format
    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
    ValidationFailed:
      description: >-
        The record couldn't be saved, or the body has no `data`
        (`invalid_data`). `errors` lists each failing field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    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
    ValidationError:
      type: object
      properties:
        code:
          type: string
          example: validation_failed
        message:
          type: string
          example: Validation Failed
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
    FieldError:
      type: object
      properties:
        field:
          type: string
          example: do_number
        codes:
          type: array
          items:
            type: string
          example:
            - can't be blank
  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.