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

# Retrieve a Document

> Retrieves one document by its `document_uuid`. The response provides the
document both as a `download_url` (valid for **1 hour**, regenerated on
every call) and as a Base64-encoded string.



## OpenAPI

````yaml /specs/public-api-v5.yaml get /v5/shipments/documents/{document_uuid}/
openapi: 3.1.0
info:
  title: Perform.AI Public API (v5)
  version: 5.0.0
  description: |-
    The Perform.AI Public API lets you create and manage shipments, returns,
    bookings, tracking events, and documents, and retrieve reference data such
    as PUDO locations and carrier configurations.

    All endpoints accept HTTPS connections only and are secured with OAuth 2.0.
    Generate a Bearer access token with your API credentials (Client ID and
    Client Secret, from **Integrations > API** in your account), then send it in
    the `Authorization` header of every request.

    This specification covers the following endpoints:
    - `POST /auth/oauth/token/`
    - `POST /v5/shipment/`
    - `POST /v5/shipment/update/`
    - `POST /v5-2-0/shipment/update/`
    - `GET /v5/shipment/list/`
    - `GET /v5/shipment/details/`
    - `GET /v5-2-0/shipment/details/`
    - `POST /v5/events/create/`
    - `POST /v5/return/`
    - `POST /v5/return/update/`
    - `GET /v5/shipments/documents/`
    - `GET /v5/shipments/documents/{document_uuid}/`
    - `GET /v5/shipments/documents/labels/`
    - `POST /v5/booking/`
    - `GET /v5/pudo-locations/`
    - `GET /v5/carrier-configs/`
servers:
  - url: https://api.perform.ai
security:
  - BearerAuth: []
tags:
  - name: Authentication
    description: Generate the Bearer access token used by every other endpoint.
  - name: Shipments
    description: Create, update, search, and retrieve Shipments.
  - name: Events
    description: Add manual tracking events to Shipments.
  - name: Returns
    description: Create and update Returns and their Return Shipments.
  - name: Documents
    description: Retrieve documents attached to Shipments.
  - name: Booking
    description: Book Open Shipments with carriers and provision shipping labels.
  - name: PUDO locations
    description: Search pick-up/drop-off locations across your configured carriers.
  - name: Carrier configurations
    description: Discover the carriers configured in your account.
  - name: Webhooks
    description: Shipment update payloads Perform.AI pushes to your endpoint.
paths:
  /v5/shipments/documents/{document_uuid}/:
    get:
      tags:
        - Documents
      summary: Retrieve a Document
      description: |-
        Retrieves one document by its `document_uuid`. The response provides the
        document both as a `download_url` (valid for **1 hour**, regenerated on
        every call) and as a Base64-encoded string.
      operationId: get-v5-shipments-documents-document-uuid
      parameters:
        - name: document_uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Perform.AI identifier of the document to retrieve.
      responses:
        '200':
          description: The document.
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_response:
                    type: string
                  status:
                    type: string
                  message:
                    type: string
                  data:
                    allOf:
                      - $ref: '#/components/schemas/DocumentRecord'
                      - type: object
                        properties:
                          base64_content:
                            type: string
                            description: The document as a Base64-encoded string.
              example:
                api_response: '200'
                status: success
                message: Success
                data:
                  shipment_uuid: 0236beab-3dcc-4abf-a21a-24f9842b0587
                  shipment_id: SHP-2026-000002
                  tracking_number: '00340434616780000001'
                  document_uuid: c49ff8f4-33c1-4c5f-a1c5-cfa84c18d305
                  document_id: LBL-000114
                  name: Shipping Label QR
                  type: shipping_label_qr
                  file_format: png
                  download_url: https://documents.perform.ai/org_5123/lbl-000114.png
                  base64_content: JVBERi0xLjUKJeLjz9MKNCAwIG9iago8PC9GaWx0ZXIvRmxhdGVEZWNvZGUK
                  created_date: '2026-09-19T03:30:00+00:00'
                  additional_info: {}
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: No document was found for the provided `document_uuid`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestError'
              example:
                api_response: '404'
                message: No document is found
        '429':
          $ref: '#/components/responses/Throttled'
        '500':
          $ref: '#/components/responses/SystemError'
components:
  schemas:
    DocumentRecord:
      type: object
      description: A document with its Shipment context and download link.
      properties:
        shipment_uuid:
          type: string
          format: uuid
        shipment_id:
          type:
            - string
            - 'null'
        tracking_number:
          type:
            - string
            - 'null'
        document_uuid:
          type: string
          format: uuid
        document_id:
          type:
            - string
            - 'null'
        name:
          type: string
        type:
          type: string
          description: E.g. `shipping_label`, `shipping_label_qr`, `invoice`.
        file_format:
          type: string
          description: E.g. `pdf`, `zpl`, `png`.
        download_url:
          type: string
          format: uri
          description: Valid for 1 hour; regenerated on every call.
        created_date:
          type: string
        additional_info:
          type: object
          description: E.g. label size (A6, 4x6) or format specifics (ZPL II).
    RequestError:
      type: object
      description: >-
        A request-level error such as `4000` (invalid request format), `4041`
        (no results found), or a `5XX` system error.
      required:
        - api_response
        - message
      properties:
        api_response:
          type: string
          description: Error code as a string, e.g. `"4000"`, `"4041"`, `"500"`.
        message:
          type: string
    GatewayError:
      type: object
      description: >-
        An error generated at the API gateway — authorization (`403`) or
        throttling (`429`). Note `api_response` is a number here, unlike
        application-level responses where it is a string.
      required:
        - api_response
        - message
      properties:
        api_response:
          type: integer
          description: '`403` or `429`.'
        message:
          type: string
          description: E.g. `Key not authorized`, `Quota exceeded`, `Throttled`.
  responses:
    Unauthorized:
      description: >-
        The Bearer token is expired, invalid, or missing — or the account lacks
        access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            api_response: 403
            message: Key not authorized
    Throttled:
      description: Rate limit exceeded (40 requests per second per account).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GatewayError'
          example:
            api_response: 429
            message: Throttled
    SystemError:
      description: Internal system error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestError'
          example:
            api_response: '500'
            message: System error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Used by every functional endpoint. Generate the token with `POST
        /auth/oauth/token/` and send it as `Authorization: Bearer {token}`.

````