Skip to main content

Creates a form instance.

POST 

/form-instances

Creates a form instance.

Request

Body

Body is the request payload to create a form instance

    createdBy objectrequired
    id string

    ID is a unique identifier

    type string

    Possible values: [WORKFLOW_EXECUTION, SOURCE]

    Type is a form instance created by type enum value WORKFLOW_EXECUTION FormInstanceCreatedByTypeWorkflowExecution SOURCE FormInstanceCreatedByTypeSource

    expire stringrequired

    Expire is required

    formDefinitionId stringrequired

    FormDefinitionID is the id of the form definition that created this form

    formInput object

    FormInput is an object of form input labels to value

    recipients object[]required

    Recipients is required

  • Array [
  • id string

    ID is a unique identifier

    type string

    Possible values: [IDENTITY]

    Type is a FormInstanceRecipientType value IDENTITY FormInstanceRecipientIdentity

  • ]
  • standAloneForm boolean

    Default value: false

    StandAloneForm is a boolean flag to indicate if this form should be available for users to complete via the standalone form UI or should this only be available to be completed by as an embedded form

    state string

    Possible values: [ASSIGNED, IN_PROGRESS, SUBMITTED, COMPLETED, CANCELLED]

    State is required, if not present initial state is FormInstanceStateAssigned ASSIGNED FormInstanceStateAssigned IN_PROGRESS FormInstanceStateInProgress SUBMITTED FormInstanceStateSubmitted COMPLETED FormInstanceStateCompleted CANCELLED FormInstanceStateCancelled

    ttl int64

    TTL an epoch timestamp in seconds, it most be in seconds or dynamodb will ignore it SEE: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/time-to-live-ttl-before-you-start.html

Responses

Returns a new form instance

Schema
    created date-time

    Created is the date the form instance was assigned

    createdBy object
    id string

    ID is a unique identifier

    type string

    Possible values: [WORKFLOW_EXECUTION, SOURCE]

    Type is a form instance created by type enum value WORKFLOW_EXECUTION FormInstanceCreatedByTypeWorkflowExecution SOURCE FormInstanceCreatedByTypeSource

    expire string

    Expire is the maximum amount of time that a form can be in progress. After this time is reached then the form will be moved to a CANCELED state automatically. The user will no longer be able to complete the submission. When a form instance is expires an audit log will be generated for that record

    formConditions object[]

    FormConditions is the conditional logic that modify the form dynamically modify the form as the recipient is interacting out the form

  • Array [
  • ruleOperator string

    Possible values: [AND, OR]

    ConditionRuleLogicalOperatorType value. AND ConditionRuleLogicalOperatorTypeAnd OR ConditionRuleLogicalOperatorTypeOr

    rules object[]

    List of rules.

  • Array [
  • sourceType string

    Possible values: [INPUT, ELEMENT]

    Defines the type of object being selected. It will be either a reference to a form input (by input name) or a form element (by technical key). INPUT ConditionRuleSourceTypeInput ELEMENT ConditionRuleSourceTypeElement

    source string

    Source - if the sourceType is ConditionRuleSourceTypeInput, the source type is the name of the form input to accept. However, if the sourceType is ConditionRuleSourceTypeElement, the source is the name of a technical key of an element to retrieve its value.

    operator string

    Possible values: [EQ, NE, CO, NOT_CO, IN, NOT_IN, EM, NOT_EM, SW, NOT_SW, EW, NOT_EW]

    ConditionRuleComparisonOperatorType value. EQ ConditionRuleComparisonOperatorTypeEquals This comparison operator compares the source and target for equality. NE ConditionRuleComparisonOperatorTypeNotEquals This comparison operator compares the source and target for inequality. CO ConditionRuleComparisonOperatorTypeContains This comparison operator searches the source to see whether it contains the value. NOT_CO ConditionRuleComparisonOperatorTypeNotContains IN ConditionRuleComparisonOperatorTypeIncludes This comparison operator searches the source if it equals any of the values. NOT_IN ConditionRuleComparisonOperatorTypeNotIncludes EM ConditionRuleComparisonOperatorTypeEmpty NOT_EM ConditionRuleComparisonOperatorTypeNotEmpty SW ConditionRuleComparisonOperatorTypeStartsWith Checks whether a string starts with another substring of the same string. This operator is case-sensitive. NOT_SW ConditionRuleComparisonOperatorTypeNotStartsWith EW ConditionRuleComparisonOperatorTypeEndsWith Checks whether a string ends with another substring of the same string. This operator is case-sensitive. NOT_EW ConditionRuleComparisonOperatorTypeNotEndsWith

    valueType string

    Possible values: [STRING, STRING_LIST, INPUT, ELEMENT, LIST, BOOLEAN]

    ConditionRuleValueType type. STRING ConditionRuleValueTypeString This value is a static string. STRING_LIST ConditionRuleValueTypeStringList This value is an array of string values. INPUT ConditionRuleValueTypeInput This value is a reference to a form input. ELEMENT ConditionRuleValueTypeElement This value is a reference to a form element (by technical key). LIST ConditionRuleValueTypeList BOOLEAN ConditionRuleValueTypeBoolean

    value

    Based on the ValueType.

  • ]
  • effects object[]

    List of effects.

  • Array [
  • effectType string

    Possible values: [HIDE, SHOW, DISABLE, ENABLE, REQUIRE, OPTIONAL, SUBMIT_MESSAGE, SUBMIT_NOTIFICATION, SET_DEFAULT_VALUE]

    Type of effect to perform when the conditions are evaluated for this logic block. HIDE ConditionEffectTypeHide Disables validations. SHOW ConditionEffectTypeShow Enables validations. DISABLE ConditionEffectTypeDisable Disables validations. ENABLE ConditionEffectTypeEnable Enables validations. REQUIRE ConditionEffectTypeRequire OPTIONAL ConditionEffectTypeOptional SUBMIT_MESSAGE ConditionEffectTypeSubmitMessage SUBMIT_NOTIFICATION ConditionEffectTypeSubmitNotification SET_DEFAULT_VALUE ConditionEffectTypeSetDefaultValue This value is ignored on purpose.

    config object

    Arbitrary map containing a configuration based on the EffectType.

    defaultValueLabel string

    Effect type's label.

    element string

    Element's identifier.

  • ]
  • ]
  • formData object

    FormData is the data provided by the form on submit. The data is in a key -> value map

    formDefinitionId string

    FormDefinitionID is the id of the form definition that created this form

    formElements object[]

    FormElements is the configuration of the form, this would be a repeat of the fields from the form-config

  • Array [
  • id string

    Form element identifier.

    elementType string

    Possible values: [TEXT, TOGGLE, TEXTAREA, HIDDEN, PHONE, EMAIL, SELECT, DATE, SECTION, COLUMNS]

    FormElementType value. TEXT FormElementTypeText TOGGLE FormElementTypeToggle TEXTAREA FormElementTypeTextArea HIDDEN FormElementTypeHidden PHONE FormElementTypePhone EMAIL FormElementTypeEmail SELECT FormElementTypeSelect DATE FormElementTypeDate SECTION FormElementTypeSection COLUMNS FormElementTypeColumns

    config object

    Config object.

    key string

    Technical key.

    validations object

    Set of FormElementValidation items.

  • ]
  • formErrors object[]

    FormErrors is an array of form validation errors from the last time the form instance was transitioned to the SUBMITTED state. If the form instance had validation errors then it would be moved to the IN PROGRESS state where the client can retrieve these errors

  • Array [
  • key string

    Key is the technical key

    messages object[]

    Messages is a list of web.ErrorMessage items

  • Array [
  • locale string

    Locale is the current Locale

    localeOrigin string

    LocaleOrigin holds possible values of how the locale was selected

    text string

    Text is the actual text of the error message

  • ]
  • value

    Value is the value associated with a Key

  • ]
  • formInput object

    FormInput is an object of form input labels to value

    id string

    FormInstanceID is a unique guid identifying this form instance

    modified date-time

    Modified is the last date the form instance was modified

    recipients object[]

    Recipients references to the recipient of a form. The recipients are those who are responsible for filling out a form and completing it

  • Array [
  • id string

    ID is a unique identifier

    type string

    Possible values: [IDENTITY]

    Type is a FormInstanceRecipientType value IDENTITY FormInstanceRecipientIdentity

  • ]
  • standAloneForm boolean

    Default value: false

    StandAloneForm is a boolean flag to indicate if this form should be available for users to complete via the standalone form UI or should this only be available to be completed by as an embedded form

    standAloneFormUrl string

    StandAloneFormURL is the URL where this form may be completed by the designated recipients using the standalone form UI

    state string

    Possible values: [ASSIGNED, IN_PROGRESS, SUBMITTED, COMPLETED, CANCELLED]

    State the state of the form instance ASSIGNED FormInstanceStateAssigned IN_PROGRESS FormInstanceStateInProgress SUBMITTED FormInstanceStateSubmitted COMPLETED FormInstanceStateCompleted CANCELLED FormInstanceStateCancelled

Loading...