Skip to content

Entries

Get answers categorized by FieldId

Endpoint: POST https://api.verustrust-forms.com/v1/entries/form/{formId}/answers

RequestBody

  • application/json
typescript
{
  limit?: integer
  fields?: string[]
  startDate?: string
  endDate?: string
  value?: string
  aggregation?: enum[None, Count, CountDistinct, Sum, Average, Min, Max]
}

Responses

  • 200 OK

application/json

typescript
{
}

Get all entries

Endpoint: GET https://api.verustrust-forms.com/v1/entries

Parameters(Query)

typescript
pageSize?: integer
typescript
pageNumber?: integer
typescript
search: {
}
typescript
sort_by?: string[]
typescript
userId?: string
typescript
formId?: string

Responses

  • 200 OK

application/json

typescript
{
  data: {
    id?: string
    tenantId?: string
    date?: string
    form: {
      id: string
      name: string
      tenantId: string
      archived: boolean
      permissionsJson?: string
      fields: {
        id: string
        name: string
        type: string
        lookupFormId?: string
        lookupFieldId?: string
        required?: boolean
        isPublic?: boolean
        currentLocation?: boolean
        multipleFiles?: boolean
        default?: string
        options?: string[]
        form:#/components/schemas/FormModel
      }[]
      groupsJson?: string
      entries:#/components/schemas/EntryModel[]
    }
    user: {
      id?: string
      token?: string
      firstName?: string
      lastName?: string
      email?: string
      remarks?: string
      role: {
        id: string
        name: string
        permissions: {
          id?: string
          action: {
            id: string
            name: string
            group: string
            type: string
          }
          permit?: boolean
          role:#/components/schemas/RoleModel
          group: {
            id: string
            name: string
            tenantId: string
            users:#/components/schemas/UserModel[]
            permissions:#/components/schemas/PermissionModel[]
          }
          user:#/components/schemas/UserModel
        }[]
        users:#/components/schemas/UserModel[]
      }
      registrationStatus?: string
      tenantId?: string
      accountId?: string
      accountEmail?: string
      groups:#/components/schemas/GroupModel[]
      permissions:#/components/schemas/PermissionModel[]
      created: string
      updated: string
    }
    answers: {
      id?: string
      fieldId?: string
      value?: string
      index?: integer
      entry:#/components/schemas/EntryModel
    }[]
  }[]
  pagination: {
    itemCount: integer
    totalPages: integer
    currentPage: integer
    nextPage?: integer
    previousPage?: integer
  }
}

Create an entry

Endpoint: POST https://api.verustrust-forms.com/v1/entries

  • Description
    Answer items should include the following fields:

string FieldId

string value (optional for files)

IFormFile file (optional)

Files in answers are automatically uploaded to Azure Blob Storage and the resulting file URL is auto filled in the value field.

RequestBody

  • multipart/form-data
typescript
{
  Answers: {
    fieldId?: string
    value?: string
    index?: integer
    files?: string[]
  }[]
  FormId?: string
  UserId?: string
}

Responses

  • 201 Created

application/json

typescript
{
  id?: string
  tenantId?: string
  date?: string
  form: {
    id: string
    name: string
    tenantId: string
    archived: boolean
    permissionsJson?: string
    fields: {
      id: string
      name: string
      type: string
      lookupFormId?: string
      lookupFieldId?: string
      required?: boolean
      isPublic?: boolean
      currentLocation?: boolean
      multipleFiles?: boolean
      default?: string
      options?: string[]
      form:#/components/schemas/FormModel
    }[]
    groupsJson?: string
    entries: {
      id?: string
      tenantId?: string
      date?: string
      form:#/components/schemas/FormModel
      user: {
        id?: string
        token?: string
        firstName?: string
        lastName?: string
        email?: string
        remarks?: string
        role: {
          id: string
          name: string
          permissions: {
            id?: string
            action: {
              id: string
              name: string
              group: string
              type: string
            }
            permit?: boolean
            role:#/components/schemas/RoleModel
            group: {
              id: string
              name: string
              tenantId: string
              users:#/components/schemas/UserModel[]
              permissions:#/components/schemas/PermissionModel[]
            }
            user:#/components/schemas/UserModel
          }[]
          users:#/components/schemas/UserModel[]
        }
        registrationStatus?: string
        tenantId?: string
        accountId?: string
        accountEmail?: string
        groups:#/components/schemas/GroupModel[]
        permissions:#/components/schemas/PermissionModel[]
        created: string
        updated: string
      }
      answers: {
        id?: string
        fieldId?: string
        value?: string
        index?: integer
        entry:#/components/schemas/EntryModel
      }[]
    }[]
  }
  user:#/components/schemas/UserModel
  answers:#/components/schemas/AnswerModel[]
}

Get an entry by id

Endpoint: GET https://api.verustrust-forms.com/v1/entries/entry/{id}

Responses

  • 200 OK

application/json

typescript
{
  id?: string
  userId?: string
  date?: string
  form: {
    id: string
    name: string
    archived: boolean
  }
  answers: {
    fieldId?: string
    value?: string
    index?: integer
  }[]
}