Form Version

The form version contains the actual contents for the form. Each form response contains 'form_version' field, which tells you exactly the contents of the form when the patient took it, even if the contents are now modified.

The form version model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the form version.

  • Name
    object
    Type
    string
    Description

    Always 'form_version'.

  • Name
    form
    Type
    string
    Description

    Form this form version belongs to.

  • Name
    sections
    Type
    array of strings
    Description

    List of sections in this form version.

  • Name
    created_at
    Type
    number
    Description

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

  • Name
    last_updated_at
    Type
    number
    Description

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

Response

{
    "id": "fver_U8xtAULYUrX7GVsTKePy",
    "object": "form_version",
    "form": "form_NOIYLBGOBNhSwTWCUzfu",
    "sections": ["fsec_1JtjV1QEY84Fv395Hl7h"],
    "created_at": 1653798303000,
    "last_updated_at": 1653798303000
}


GET/v2/form_versions/:id

Retrieve a form version

Retrieves the specified form version.

Response


{
   "id": "fver_U8xtAULYUrX7GVsTKePy",
   "object": "form_version",
   "form": "form_NOIYLBGOBNhSwTWCUzfu",
   "sections": ["fsec_1JtjV1QEY84Fv395Hl7h"],
   "created_at": 1653798303000,
   "last_updated_at": 1653798303000
}



POST/v2/form_versions/:id

Update a form version

Updates the specified form version object by setting the values of the parameters passed. Any other parameters not provided will not be modified. The form version can only be updated if it's in the 'latest_version' field of the associated form. A form 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 IDs in the form version.

    Response

    
    {
      "id": "fver_U8xtAULYUrX7GVsTKePy",
      "object": "form_version",
      "form": "form_NOIYLBGOBNhSwTWCUzfu",
      "sections": ["fsec_1JtjV1QEY84Fv395Hl7h", "fsec_4Fv1JtjV1QEY8395Hl7h"],
      "created_at": 1653798303000,
      "last_updated_at": 1653798303000
    }
    
    

    GET/v2/form_versions

    List all form versions

    Returns a list of all form versions.

    Response

    {
      "object": "list",
      "data": [{
        "id": "fver_U8xtAULYUrX7GVsTKePy",
        "object": "form_version",
        "form": "form_NOIYLBGOBNhSwTWCUzfu",
        "sections": ["fsec_1JtjV1QEY84Fv395Hl7h", "fsec_4Fv1JtjV1QEY8395Hl7h"],
        "created_at": 1653798303000,
        "last_updated_at": 1653798303000
      }]
    }