get http://{{formsmanagementsystemurl}}/v1/external/forms/61f2a5d0b629594fcfe63fda
Returns a detailed form view by form ID.
Authentication
The request must supply valid API key headers:
- X-APP-ID
- X-API-KEY
As of July 2023, the following header is expected by new clients:
- X-CLIENT-ID
Response
Field | Type | Nullable | Description |
---|---|---|---|
id | string | N | Form ID. |
title | string | N | Form title. |
description | string | Y | Form description (if present). |
publishFrom | string | N | ISO 8601 datetime of when the form was published. |
publishTo | string | Y | ISO 8601 datetime of when the form is publish till. If null, the form never expires. |
version | integer | N | Current form revision. (starting from one) |
createdDetails.date | string | N | ISO 8601 datetime of when the form was created. |
lastEdited.date | string | N | ISO 8601 datetime of when the form was last updated. |
sections | []Field (see Field) | N |
Field
Field | Type | Nullable | Description |
---|---|---|---|
id | string | N | Field ID. Typically a uuidv4, but there is not strict requirement on what type of identifier is used. |
type | string | N | See 'Types' below. |
title | string | N | The title of the field, typically in the form of a question. |
description | string | Y | The description of the field, should elaborate on the label/question. |
subtype | string | Y | See 'Types' below. |
deleted | boolean | N | If true, the field has been soft-deleted. Soft-deleted fields no longer capture data, but existing responses with soft-deleted fields are preserved. |
metadata | Metadata (see Metadata) | Y | Metadata relating to data capture. |
Metadata
Field | Type | Nullable | Description |
---|---|---|---|
value | Varies on field type (see Types) | Y | |
validation | Validation (see Validation) | Y | Common validation rules. |
conditions | Node (see Node) | Y |
Validation
Field | Type | Nullable | Description |
---|---|---|---|
required | boolean | Y | If true, this question requires a response. required is ignored if the question considered optional after evaluating the question's conditions. |
min | Varies on field type (see Types) | Y | |
max | Varies on field type (see Types) | Y | |
regexPattern | string | Y | RE2 regular expression. See https://github.com/google/re2/wiki/Syntax |
type | string | Y | Common text validation rules that response are asserted against. Only applies to text , shorttext & longtext question types. |
Type validation rules
Value | Description | Examples |
---|---|---|
email | Expects a syntactically valid email address. | [email protected] |
number | Expects a valid number. Decimals, positive and negative numbers are valid. The radix character must be a period. Thousand separated numbers are not supported. Leading zeros are not supported. This validation rule cannot be used in conjuction with min/max validation rules. Use a number field instead. | 1234 +1234 -1234 1.234 |
phone | Expects a phone number in E.164 international format. See https://developers.omnisend.com/guides/e164-phone-number-formatting | +442031379873 +4420 3137 9873 +44(0)2031379873 |
Types
Type(s) | Subtype(s) | Response Data Type | Metadata Value Data Type | Description | Validation Rule(s) | Validation Data Type | Validation Notes |
---|---|---|---|---|---|---|---|
text , shorttext , longtext | string | Used for free text data capture. The only difference between the types being how they are rendered to fans. As of February 2022, only text is used. | min, max | integer | Require the provided string to be equal, less than or greater than the minimum and maximum values respectively in length. | ||
number | float64 | min, max | integer | Require the provided number to be equal, less than or greater than the minimum and maximum values respectively. | |||
content | Does not accept data capture. | ||||||
moment | datetime | string | ISO 8601 formatted datetime, date, or time depending on which subtype is used. | min, max | string ISO 8601 date and time format | Require a date and time string to be equal to or between the minimum and maximum values. | |
date | string ISO 8601 date format | Require a date string to be equal to or between the minimum and maximum values. | |||||
time | string ISO 8601 time format | Require a time string to be equal to or between the minimum and maximum values. | |||||
choice | checkbox , select | any The response's data type must be equal to the metadata value's data type. | []any An array containing selectable choices. The array's elements must be the same type. | min, max | integer | Require a minimum or maximum number of selected choices. | |
radio | any The response's data type must be equal to the metadata value's data type. | []any An array containing selectable choices. The array's elements must be the same type. | |||||
account_detail | email | string | Expects a syntactically valid email address. | ||||
first_name , last_name | string | min, max | integer | Require the provided string to be equal, less than or greater than the minimum and maximum values respectively in length. |
Node
Field | Type | Nullable | Description |
---|---|---|---|
type | string | N | Indicates the action this node should perform. Possible values: AND - All child nodes should return true. OR - At least one of the child nodes should return true. EVAL - Evaluate this node directly. |
key | string | Y (if type is not equal to EVAL ) | The ID of the question this node should be evaluated against. |
value | any | Y (if type is not equal to EVAL ) | The expected value of the response. |
operator | string | Y (if type is not equal to EVAL ) | The comparator opertation to perform between key and value, this can be: EQUAL NOT_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL_TO LESS_THAN LESS_THAN_OR_EQUAL_TO IN NOT_IN |
nodes | []Node | Y (if type is equal to EVAL ) | If type is AND or OR , the children to be evaluated. |