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

# Get file

> Retrieve one file by its id, along with a signed URL to download it

Get a file by id along with a signed URL to download it.
More information coming soon.


## OpenAPI

````yaml GET /files/{id}
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /files/{id}:
    get:
      summary: Get one file
      description: Retrieve one file by its id, along with a signed URL to download it
      operationId: getFile
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The unique identifier of the file to fetch.
      responses:
        '200':
          description: File along with a download URL
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/FileInfo'
                      - type: object
                        properties:
                          signed_url:
                            type: string
                            description: >-
                              Signed URL to download the file. Expires after 20
                              minutes.
                            example: >-
                              https://bucket-name.s3.amazonaws.com/example.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20240912%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20240912T120000Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6
                  message:
                    type: string
                    example: Successfully fetched file.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FileInfo:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        name:
          type: string
          example: example.pdf
          description: File name.
        size:
          type: number
          description: File size (bytes)
          example: 102400
        corporation_id:
          type: string
          description: The unique identifier for a corporation associated with this file.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: 'Specific Error type. Example: CLIENT_INVALID_REQUEST_BODY.'
              example: CLIENT_INVALID_REQUEST_BODY
            doc_url:
              type: string
              description: >-
                A link to the docs with details about this error. Example:
                https://sales-tax-docs.commenda.io/
              example: https://sales-tax-docs.commenda.io/
            title:
              type: string
              description: >-
                A short title describing the error. Example: Missing query
                parameters.
              example: Failed to validate the request body
            detail:
              type: string
              description: >-
                A json string with a description on how to fix the error.
                Example {"description":"Please pass in a valid corporation_id"}
            status:
              type: number
              description: >-
                The status code. It should be the same as the HTTP protocol
                status code. Example: 200
              example: 400
            instance:
              type: string
              description: >-
                The relative path that was hit by the user. Example:
                /api/v1/corporations/1
            Errors:
              type: array
              items:
                type: object
                properties:
                  details:
                    type: string
                    description: More details on how to solve this particular error.
                  pointer:
                    type: string
                    description: >-
                      Relative reference to missing or invalid piece of passed
                      information.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````