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

# Download a Salesforce ContentVersion into Sample

> Resolve connection by slug, fetch the binary for a Salesforce ContentVersion, and persist it as a Sample fileMetadata (FMD). Returns the FMD id which can be used with other Sample document APIs.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/samplehc/openapi.documented.yml post /api/v2/integrations/salesforce/{slug}/load-file
openapi: 3.0.3
info:
  title: Sample Healthcare API
  description: API for Sample Healthcare
  version: 1.0.0
servers: []
security: []
paths:
  /api/v2/integrations/salesforce/{slug}/load-file:
    post:
      tags:
        - Integration - Salesforce
      summary: Download a Salesforce ContentVersion into Sample
      description: >-
        Resolve connection by slug, fetch the binary for a Salesforce
        ContentVersion, and persist it as a Sample fileMetadata (FMD). Returns
        the FMD id which can be used with other Sample document APIs.
      parameters:
        - schema:
            type: string
          in: path
          name: slug
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contentVersionId:
                  type: string
                  minLength: 1
                  description: >-
                    Salesforce ContentVersion Id (15- or 18-char, typically
                    prefixed `068`) whose binary should be downloaded.
              required:
                - contentVersionId
              additionalProperties: false
        required: true
      responses:
        '200':
          description: >-
            The Sample fileMetadata record created from the downloaded
            Salesforce ContentVersion.
          content:
            application/json:
              schema:
                type: object
                properties:
                  fileMetadataId:
                    type: string
                    description: Sample fileMetadata id (FMD) for the downloaded file.
                  fileName:
                    type: string
                    description: Salesforce ContentVersion.Title + extension.
                  mimeType:
                    type: string
                    description: MIME type assigned to the stored file.
                required:
                  - fileMetadataId
                  - fileName
                  - mimeType
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - 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
                  - type: object
                    properties:
                      error:
                        type: string
                        description: Salesforce bad request.
                    required:
                      - error
                    additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Salesforce authentication error.
                required:
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Salesforce access denied.
                required:
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Salesforce connection or ContentVersion not found.
                required:
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Internal server error.
                required:
                  - error
                additionalProperties: false

````