# GENERATE CONTRACT

Generates a contract associated to a request that must be signed by a RAO. The contract is signed in the approve request call.

Endpoint: POST /api/v1/requests/{id}/generate_document
Version: v1

## Path parameters:

  - `id` (string, required)
    The unique identifier of the Request

## Request fields (application/json):

  - `doctype` (string)
    The contract type
    Enum: "contract", "contract_renew"

## Response 200 fields (application/json):

  - `document` (string)
    The document ready for PDF conversion

## Response 400 fields (application/json):

  - `detail` (string)
    JSON syntax error description

## Response 404 fields (application/json):

  - `code` (string)
    The response status code

  - `id` (string)
    The response status id

  - `error` (string)
    The response status message


