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

# Get Patient Attachments Raw Bundle

> Return a zip containing every attachment's raw bytes keyed by attachment id.

A single request keeps the network round-trips O(1) regardless of how
many attachments the patient has. GCS signed URLs aren't CORS-enabled
for browser ``fetch``, which is why we proxy bytes through the API at
all; bundling avoids the per-attachment fan-out.

Entries are named ``{attachment_id}{ext}`` where ``ext`` is derived from
the GCS path (e.g. ``.jpeg``). Attachments whose GCS object can't be
fetched are skipped — the frontend already tolerates missing entries by
counting them as client render errors in the final manifest.



## OpenAPI

````yaml get /user/patient/{patient_id}/note-attachments/raw-bundle
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/{patient_id}/note-attachments/raw-bundle:
    get:
      tags:
        - Patient Documents
      summary: Get Patient Attachments Raw Bundle
      description: >-
        Return a zip containing every attachment's raw bytes keyed by attachment
        id.


        A single request keeps the network round-trips O(1) regardless of how

        many attachments the patient has. GCS signed URLs aren't CORS-enabled

        for browser ``fetch``, which is why we proxy bytes through the API at

        all; bundling avoids the per-attachment fan-out.


        Entries are named ``{attachment_id}{ext}`` where ``ext`` is derived from

        the GCS path (e.g. ``.jpeg``). Attachments whose GCS object can't be

        fetched are skipped — the frontend already tolerates missing entries by

        counting them as client render errors in the final manifest.
      operationId: >-
        get_patient_attachments_raw_bundle_user_patient__patient_id__note_attachments_raw_bundle_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````