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

# Transform JSON to HTML

> Transforms a Sample JSON document to HTML



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v2/documents/json-to-html
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/documents/json-to-html:
    post:
      tags:
        - Document
      summary: Transform JSON to HTML
      description: Transforms a Sample JSON document to HTML
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                json:
                  description: The JSON object to transform.
              additionalProperties: false
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  html:
                    type: string
                    description: The HTML string.
                required:
                  - html
                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.transform_json_to_html()
            print(response.html)

````