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

# Document CSV content

> Retrieves the content of a CSV document as a structured JSON array.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml get /api/v2/documents/{documentId}/csv-content
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/documents/{documentId}/csv-content:
    get:
      tags:
        - Document
      summary: Document CSV content
      description: Retrieves the content of a CSV document as a structured JSON array.
      parameters:
        - schema:
            type: string
          in: path
          name: documentId
          required: true
          description: The unique identifier of the CSV document.
      responses:
        '200':
          description: Successfully retrieved CSV content.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: string
                    description: >-
                      An array of objects, where each object represents a row
                      from the CSV.
                required:
                  - data
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The error message.
                  message:
                    type: string
                    description: The message.
                  statusCode:
                    type: number
                    description: The status code.
                  details:
                    type: object
                    additionalProperties: {}
                    description: The details of the error
                additionalProperties: true
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: >-
                      Not Found, the document with the specified ID does not
                      exist or is not a CSV.
                required:
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: >-
                      Internal server error while parsing or retrieving CSV
                      content.
                required:
                  - error
                additionalProperties: false
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from samplehc import SampleHealthcare

            client = SampleHealthcare(
                api_key=os.environ.get("SAMPLEHC_API_KEY"),  # This is the default and can be omitted
            )
            response = client.v2.documents.retrieve_csv_content(
                "documentId",
            )
            print(response.data)

````