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

# Show contract document

> Get one of the promoter's contract documents as HTML or PDF.



## OpenAPI

````yaml openapi-v2-affiliate-contract-documents GET /contract_documents/{id}
openapi: 3.0.1
info:
  title: FirstPromoter Contract Documents API
  version: '1.0'
  description: API for managing affiliate contract documents
servers:
  - url: https://api.firstpromoter.com/api/v2/affiliate
security:
  - BearerAuth: []
paths:
  /contract_documents/{id}:
    get:
      tags:
        - Contract Documents
      summary: Get contract documents by id (html/pdf)
      description: |-
        Gets contract document and returns it in the selected format  
         <Tip>**HTTP Request** <br/>` GET  https://api.firstpromoter.com/api/v2/affiliate/contract_documents/{id}`</Tip>
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: id
          in: path
          required: true
          schema:
            type: integer
          description: Contract document ID
        - name: content_type
          in: query
          required: true
          schema:
            type: string
            enum:
              - html
              - pdf
          description: Format of the document content
      responses:
        '200':
          description: Document content
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      content:
                        type: string
            application/pdf:
              schema:
                type: string
                format: binary
        '401':
          description: >-
            Unauthorized — the API key is missing, wrong, regenerated or
            disabled (no JSON response body is returned), or the `Account-ID`
            header is missing.
          content:
            application/json:
              schema:
                type: object
              example: {}
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    AccountId:
      name: Account-ID
      in: header
      required: true
      description: >-
        Account ID of the affiliate program, shown next to your API key under
        Profile → API & AI tools
      schema:
        type: string
        example: acc_123456
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your affiliate API key (Profile → API & AI tools in the affiliate
        dashboard), sent as `Authorization: Bearer {api_key}`

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.