Document Template Version

The document template version contains the actual contents for the document template. Each document contains 'document_template_version' field, which tells you exactly the contents of the document template when it was used, even if the contents are now modified.

The document template version model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the document template version.

  • Name
    object
    Type
    string
    Description

    Always 'document_template_version'.

  • Name
    document_template
    Type
    string
    Description

    Document template this document template version belongs to.

  • Name
    sections
    Type
    array of strings
    Description

    List of sections in this document template version.

  • Name
    created_at
    Type
    number
    Description

    Timestamp (in ISO 8601 format) of when the document template version was created.

  • Name
    last_updated_at
    Type
    number
    Description

    Timestamp (in ISO 8601 format) of when the document template version was last updated.

Response

{
    "id": "dtmv_U8xtAULYUrX7GVsTKePy",
    "object": "document_template_version",
    "document_template": "dtmp_NOIYLBGOBNhSwTWCUzfu",
    "sections": ["dtsc_1JtjV1QEY84Fv395Hl7h"],
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}


GET/v2/document_template_versions/:id

Retrieve a document template version

Retrieves the specified document template version.

Response

{
   "id": "dtmv_U8xtAULYUrX7GVsTKePy",
   "object": "document_template_version",
   "document_template": "dtmp_NOIYLBGOBNhSwTWCUzfu",
   "sections": ["dtsc_1JtjV1QEY84Fv395Hl7h"],
   "created_at": 1653798303000,
   "last_updated_at": 1653798303000
}



POST/v2/document_template_versions/:id

Update a document template version

Updates the specified document template version object by setting the values of the parameters passed. Any other parameters not provided will not be modified. The document template version can only be updated if it's in the 'latest_version' field of the associated form. A document template version cannot be updated once it's been moved to the 'published_version' field of the associated form.

Required attributes

    Optional attributes

    • Name
      sections
      Type
      array of strings
      Description

      All the section in the document template version.

    Response

    {
        "id": "dtmv_U8xtAULYUrX7GVsTKePy",
        "object": "document_template_version",
        "document_template": "dtmp_NOIYLBGOBNhSwTWCUzfu",
        "sections": ["dtsc_1JtjV1QEY84Fv395Hl7h"],
        "created_at": 1653798303000,
        "last_updated_at": 1653798303000
    }
    
    

    GET/v2/document_template_versions

    List all document template versions

    Returns a list of all document template versions.

    Optional query parameters

    • Name
      document_template
      Type
      string
      Description

      Document template to filter by.

    Response

    {
      "object": "list",
      "data": [{
        "id": "dtmv_U8xtAULYUrX7GVsTKePy",
        "object": "document_template_version",
        "document_template": "dtmp_NOIYLBGOBNhSwTWCUzfu",
        "sections": ["dtsc_1JtjV1QEY84Fv395Hl7h"],
        "created_at": 1653798303000,
        "last_updated_at": 1653798303000
      }]
    }