Form Submissions VS Submissions

Get acquainted with every key in the most recent response payload.

The JSON strings in this page contain data from a single submission that corresponds to a form template with a single field.

Form Submissions

The following JSON string is an example of a response from the old endpoint, List Form Submissions.

Submission details:

  • Form Template ID: 50
  • Submission ID: 61e765511c037b4123456789
{
  success: true,
  status: 200,
  form_template: {},
  form_submissions: [
    {
      _id: {
        $oid: "61e765511c037b4123456789"
      },
      metadata: {},
      fields: [
        {
          id: 0,
          title: "Text",
          type: "text",
          options: [ ],
          title_image: [ ],
          instructions: "",
          metadata: { },
          required: false,
          hidden: false,
          events: [ ],
          value: "",
          acceptance_value: null
        }
      ],
      smetadata: {
        created_by: {
          id: 185,
          display_name: "John Smith"
        },
        company: {
          id: 1
        },
        user_role: {
          id: 4,
          name: "National VP"
        },
        distribute_groups: [
          {
            id: 4
          },
          {
            id: 7
          }
        ],
        user_distribute_groups: [
          {
            id: 4
          },
          {
            id: 7
          }
        ],
        account_distribute_groups: [ ],
        time_zone: "America/Los_Angeles",
        client_time_zone: "America/Los_Angeles",
        user_agent: "Mozilla/5.0 (Linux; Android 12; Pixel 3 Build/SP1A.210812.015; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.87 Mobile Safari/537.36 zenput:app_version=22.1.0;platform_type=Android;platform_version=12",
        platform: "android",
        guid: "185-50-1642123456789",
        environment: "app",
        date_created: {
          $date: 1642554676438
        },
        date_completed: {
          $date: 1642554705002
        },
        date_submitted: {
          $date: 1642554705599
        },
        date_modified: {
          $date: 1642554705599
        },
        date_created_local: {
          $date: 1642525876438
        },
        date_completed_local: {
          $date: 1642525905002
        },
        date_submitted_local: {
          $date: 1642525905599
        },
        time_to_complete: 28564,
        distance_to_account: null,
        lat: 37.7777694,
        lon: -122.426467,
        location_custom_field_order: null,
        task: null,
        project: null,
        accounts: null,
        account_tags: null
      },
      sort_fields: {},
      deleted: 0
    }
  ],
    has_access: true
}

Submissions

Both the following JSON strings are examples of responses from the new endpoint, List Submissions.

Submission details:

  • Old Form Template ID: 50
  • New Submission ID: 61e765511c037b4987654321
  • Old Submission ID: 61e765511c037b4123456789
  • Activity ID: 98
  • Activity Template ID: 4886

The call to get this first response uses the old form template ID.

{
  meta: {
    status_code: 200,
    count: 23,
    next: "https://www.zenput.com/api/v3/submissions/?form_template_id=50&limit=1&start=1",
    previous: null
},
  data: [
    {
      id: "61e765511c037b4987654321",
      legacy_submission_id: "61e765511c037b4123456789",
      search_text: "sample search text",
      activity: {
        id: 98,
        name: "Sample Form"
      },
      activity_template: {
        id: 4886,
        name: "Sample Form"
      },
      answers: [
        {
          field_id: 489,
          field_version_id: 580,
          value: null,
          title: "Text",
          field_type: "text",
          is_answered: false,
          text_value: null
        }
      ],
      smetadata: {
        created_by: {
          id: 185,
          display_name: "John Smith"
        },
        company: {
          id: 1,
          name: "Company A"
        },
        user_role: {
          id: 4,
          name: "National VP"
        },
        time_zone: "America/Los_Angeles",
        client_time_zone: "America/Los_Angeles",
        user_agent: "Mozilla/5.0 (Linux; Android 12; Pixel 3 Build/SP1A.210812.015; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.87 Mobile Safari/537.36 zenput:app_version=22.1.0;platform_type=Android;platform_version=12",
        platform: "android",
        guid: "185-50-1642123456789",
        environment: "app",
        date_created: "2022-01-19T01:11:16",
        date_completed: "2022-01-19T01:11:45",
        date_submitted: "2022-01-19T01:11:45",
        date_modified: "2022-01-19T01:11:45",
        date_created_local: "2022-01-18T17:11:16",
        date_completed_local: "2022-01-18T17:11:45",
        date_submitted_local: "2022-01-18T17:11:45",
        time_to_complete: 28564,
        distance_to_account: null,
        lat: 37.7777694,
        lon: -122.426467,
        location_custom_field_order: null,
        task: null,
        project: null,
        location: null,
        user_teams: [
          {
            id: 4
          },
          {
            id: 7
          }
        ],
        location_teams: [ ],
        teams: [
          {
            id: 4
          },
          {
            id: 7
          }
        ],
        parent_project: null
      }
    }
  ]
}

The call to get this second response uses the activity ID.

{
  meta: {
    status_code: 200,
    count: 23,
    next: "https://www.zenput.com/api/v3/submissions/?activity_id=98&limit=1&start=1",
    previous: null
},
  data: [
    {
      id: "61e765511c037b4123456789",
      legacy_submission_id: "61e765511c037b4123456789",
      search_text: "sample search text",
      activity: {
        id: 98,
        name: "Sample Form"
      },
      activity_template: {
        id: 4886,
        name: "Sample Form"
      },
      answers: [
        {
          field_id: 489,
          field_version_id: 580,
          value: null,
          title: "Text",
          field_type: "text",
          is_answered: false,
          text_value: null
        }
      ],
      smetadata: {
        created_by: {
          id: 185,
          display_name: "John Smith"
        },
        company: {
          id: 1,
          name: "Company A"
        },
        user_role: {
          id: 4,
          name: "National VP"
        },
        time_zone: "America/Los_Angeles",
        client_time_zone: "America/Los_Angeles",
        user_agent: "Mozilla/5.0 (Linux; Android 12; Pixel 3 Build/SP1A.210812.015; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.87 Mobile Safari/537.36 zenput:app_version=22.1.0;platform_type=Android;platform_version=12",
        platform: "android",
        guid: "185-50-1642123456789",
        environment: "app",
        date_created: "2022-01-19T01:11:16",
        date_completed: "2022-01-19T01:11:45",
        date_submitted: "2022-01-19T01:11:45",
        date_modified: "2022-01-19T01:11:45",
        date_created_local: "2022-01-18T17:11:16",
        date_completed_local: "2022-01-18T17:11:45",
        date_submitted_local: "2022-01-18T17:11:45",
        time_to_complete: 28564,
        distance_to_account: null,
        lat: 37.7777694,
        lon: -122.426467,
        location_custom_field_order: null,
        task: null,
        project: null,
        location: null,
        user_teams: [
          {
            id: 4
          },
          {
            id: 7
          }
        ],
        location_teams: [ ],
        teams: [
          {
            id: 4
          },
          {
            id: 7
          }
        ],
        parent_project: null
      }
    }
  ]
}

Both responses contain the same information.