Each submitted form on a site is saved as a form entry.

​Use the Form Entries API to return these entries.

Fields

The following table shows all fields that exist for this API and those that are returned when you retrieve a list. All fields are returned when you retrieve a single item.

Name Description Type List
elements Each element object represents a field in the form and has 3 properties:
  • type
  • form_element_name
  • values: The values property is an array of objects representing field subtypes, each with a key and value property. The key is the the subtype name (empty string if none), and value is the value of the subtype.
array of objects X
date_submitted Date the form entry was submitted Unix timestamp in GMT. X
ip_address ​The IP address of the machine submitting the form. string X
form_entry_id The unique ID for a form entry. string X

GET
Retrieve a List of Form Entries

GET /v1/user/sites/{SITE_ID}/forms/{FORM_ID}/entries

Returns all entries for the given form.


scope: read:site

Query Parameters

Returned values are paginated. You can further filter results using these parameters:

Parameter Description Type
page Which page of results to return. Start is 1. integer
limit Number of results per page to return. Default is 25.
Max is 200.
integer
query Use to retrieve only entries that have a full-text match with the query string. string
filterby Field name to set a filter on. string
filterfor ​Value to search the filterby field for. string
sortby Field name to sort by string
sortdir Sort direction. Valid values are:
  • asc
  • desc
string

Example CURL request returning all entries:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/forms/56789/entries \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example filtered request:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/forms/56789/entries?sortdir=asc \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example response:

[
    {
        "date_submitted":"1453382915",
        "ip_address":"74.115.50.52",
        "form_entry_id":"123456",
        "elements":[
            {
                "type":"Name",
                "form_element_name":"Name",
                "values":[
                    {
                        "key":"first",
                        "value":"John"
                    },
                    {
                        "key":"last",
                        "value":"Doe"
                    }
                ]
            },
            {
                "type":"email",
                "form_element_name":"Email",
                "values": [
                    {
                        "key":"",
                        "value":"john.doe@email.com"
                    }
                ]
            },
            {
                "type":"Options Buttons",
                "form_element_name":"Receive Emails?",
                "values": [
                    {
                        "key":"",
                        "value": "yes"
                    }
                ]
            }
        ]
    },
    {
        "date_submitted":"1453382925",
        "ip_address":"74.115.90.232",
        "form_entry_id":"18724587",
        "elements":[
            {
                "type":"Name",
                "form_element_name":"Name",
                "values":[
                    {
                        "key":"first",
                        "value":"Jane"
                    },
                    {
                        "key":"last",
                        "value":"Smith"
                    }
                ]
            },
            {
                "type":"email",
                "form_element_name":"Email",
                "values": [
                    {
                        "key":"",
                        "value":"jane.smith@email.com"
                    }
                ]
            },
            {
                "type":"Options Buttons",
                "form_element_name":"Receive Emails?",
                "values": [
                    {
                        "key":"",
                        "value":"no"
                    }
                ]
            }
        ]
    }
]

GET
Retrieve Details for a Form Entry

GET /v1/user/sites/{SITE_ID}/forms/{FORM_ID}/entries/{ENTRY_ID}

Returns all fields for the given form entry.


scope: read:site

Example CURL request:

curl --request GET \
--url https://api.weebly.com/v1/user/sites/987654321/forms/56789/entries/654321 \
--header 'accept: application/vnd.weebly.v1+json' \
--header 'content-type: application/json' \
--header 'x-weebly-access-token: [YOUR_TOKEN]"

Example response:

See Fields table. All fields for the entry are returned.

{
    "date_submitted":"1453382925",
    "ip_address":"74.115.90.232",
    "form_entry_id":"654321",
    "elements":[
        {
            "type":"Name",
            "form_element_name":"Name",
            "values":[
                {
                    "key":"first",
                    "value":"Jane"
                },
                {
                    "key":"last",
                    "value":"Smith"
                }
            ]
        },
        {
            "type":"email",
            "form_element_name":"Email",
            "values": [
                {
                    "key":"",
                    "value":"jane.smith@email.com"
                }
            ]
        },
        {
            "type":"Options Buttons",
            "form_element_name":"Receive Emails?",
            "values": [
                {
                    "key":"",
                    "value":"no"
                }
            ]
        }
    ]
}

Help make these docs better!









Tags: