Templates

Templates are the foundation of Forms Live's document creation system. They provide the structure and fields needed to create standardized forms for real estate transactions. On this page, we'll explore the different template endpoints you can use to retrieve and work with templates programmatically.

The template models

The template system in Forms Live consists of three main models: the template itself, template versions, and template fields. Together, these provide all the information needed to understand and work with form templates.

Template properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the template.

  • Name
    name
    Type
    string
    Description

    Name of the template.

  • Name
    code
    Type
    string
    Description

    Template code identifier.

  • Name
    active
    Type
    boolean
    Description

    Indicates if the template is active.

  • Name
    orientation
    Type
    string
    Description

    Orientation of the template (portrait or landscape).

  • Name
    template_group_id
    Type
    integer
    Description

    Identifier for the template group this template belongs to.

  • Name
    created
    Type
    timestamp
    Description

    Timestamp of when the template was created.

  • Name
    updated
    Type
    timestamp
    Description

    Timestamp of when the template was last updated.

Template version properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the template version.

  • Name
    template_id
    Type
    integer
    Description

    Identifier of the template this version belongs to.

  • Name
    cost
    Type
    integer
    Description

    Monetary value of template specified in cents.

  • Name
    created
    Type
    timestamp
    Description

    Timestamp of when the template version was created.

  • Name
    updated
    Type
    timestamp
    Description

    Timestamp of when the template version was last updated.

  • Name
    user_guide_pages
    Type
    integer
    Description

    Number of user guide pages included with the template.

  • Name
    instruction_pages
    Type
    integer
    Description

    Number of instruction pages included with the template.

Template field properties

  • Name
    display_name
    Type
    string
    Description

    Human-readable name of the template field.

  • Name
    name
    Type
    string
    Description

    Machine-readable name for template field.

  • Name
    locked
    Type
    boolean
    Description

    Indicates if the field is locked and cannot be edited.

  • Name
    required
    Type
    boolean
    Description

    Indicates if the field is required to be filled out.


GET/templates/

List all templates

This endpoint allows you to retrieve a list of all available templates organized by template groups. Each template group contains a list of templates with their basic details.

Request

GET
/templates/
curl https://app-api.reiformslive.com.au/templates \
  --request GET \
  --header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ=="

Response

[
  {
    "id": 1,
    "name": "Sales Forms",
    "active": true,
    "index": 1,
    "type": "SA",
    "templates": [
      {
        "cost": 90,
        "active": true,
        "id": 65,
        "name": "Agency Agreement 1",
        "code": "0000001",
        "template_group_id": 1
      }
    ]
  },
  {
    "id": 2,
    "name": "Property Management Forms",
    "active": true,
    "index": 2,
    "type": "FM",
    "templates": [
      {
        "cost": 35,
        "active": true,
        "id": 64,
        "name": "Agency Agreement 2",
        "code": "0000002",
        "template_group_id": 2
      }
    ]
  }
]

GET/templates/:id

Retrieve a template

This endpoint allows you to retrieve detailed information about a specific template, including its version information and available fields. You can use either the template ID or a specific template version ID.

Alternative endpoints

  • Name
    /templates/:template_id
    Type
    endpoint
    Description

    Retrieve a template using its template ID.

  • Name
    /template_versions/:template_version_id
    Type
    endpoint
    Description

    Retrieve a template using a specific template version ID.

Request

GET
/templates/1
curl https://app-api.reiformslive.com.au/templates/1 \
  --request GET \
  --header "Authorization: Basic YTlkOWIwYItNGY4Yi1hYTQxLTI5NzZmMTcyZmEyMQ=="

Response

{
  "template": {
    "id": 1,
    "name": "Condition Report",
    "code": "CR0000",
    "active": true,
    "orientation": "landscape",
    "template_group_id": 2,
    "name_test": null,
    "created": 1348709689,
    "updated": 1348709689
  },
  "template_version": {
    "id": 2,
    "template_id": 2,
    "cost": 10,
    "created": 1348709690,
    "updated": 1348709690,
    "user_guide_pages": 0,
    "instruction_pages": 0
  },
  "fields": [
    {
      "display_name": "Agent Name",
      "name": "Agent_Name",
      "locked": true,
      "required": false
    },
    {
      "display_name": "Agent Mobile",
      "name": "Agent_Phone_Mobile",
      "locked": false,
      "required": false
    },
    {
      "display_name": "Agent Email",
      "name": "Agent_Email",
      "locked": false,
      "required": false
    }
  ]
}

Was this page helpful?