REST API
WebForms REST API allows deep integration with your 3rd party software. Please configure your REST API role permissions first before using it.
Get form information
Get all available form information such as name, code, description texts, configuration options, fields and fieldsets.
Endpoint: /rest/V1/webforms/form/#FORM ID#
#FORM ID# is the actual form id number you can see on Manage Forms page.
Submit the form
Submit the form using the REST API. You can submit any custom data you would like to collect. Please use Hidden fields to store extra information with the submission.
Endpoint: /rest/V1/webforms/form/#FORM ID#/submit
Accepted parameters
Parameter | Description |
---|---|
field[FIELD ID] | The value for the field. For example: field[15]=John & field[16]=Doe. |
submitted_from | Use this parameter to set the page information where the form was submitted. It should be in JSON format: {"url":"URL of the page","title":"Title of the page"} |
referrer_page | This parameter stores URL of the referrer page that the customer came from. For example: https://some-partner-site.com |
customer_id | The ID of the customer. |
result_id | Set the result ID if you want to update existing record. |
File upload
Please enable the Dropzone option for the file upload field.
The file upload should be performed before the form submission takes place.
Endpoint: /rest/V1/webforms/upload/#FIELD ID#
Accepted parameters
Parameter | Description |
---|---|
filename | The name of the file. |
mime_type | Mime type of the uploaded file. |
content | The base64 encoded content of the file. |
The returned array has the following structure: [success(boolean), error messages(array), hash(string)]. You can upload multiple files by posting to the upload endpoint.
All obtained hashes should be joined with the ";" separator and sent in the field[FIELD ID] with the main submission. Example: hash1;hash2;hash3.
Get form results
Get all form submissions.
Endpoint: /rest/V1/webforms/form/#FORM ID#/results
Accepted parameters
Parameter | Description |
---|---|
filter | Filter results by parameters. |
filter can have queries like {"field_FIELD_ID" = "some value"}. Use % for wildcard search. Example of the filter query:
{"field_15":"Some Text%","created_at":{"from":"2020-01-01","to":"2020-01-31"},"customer_id":"15"}
You can use the result structure for possible filter parameters.
Get result by ID
Get individual result information.
Endpoint: /rest/V1/webforms/result/#RESULT ID#