Skip to main content
Skip table of contents

API example - Get form structure example

(info) Example on how to get the get form structure (metadata of questions, answers, scales and data source).

Use end-point: https://app.form.com/gw/swagger-ui/index.html#/forms-controller-v3/getQuestions

Example:

Request:

curl --location 'https://app.form.com/gw/v3/forms/41659267/questions?limit=100&offset=0&include=items.answers%2Citems.scale%2Citems.dataSource' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer d047a2d8-e3e8-45ca-91b3-a7087578c409' \
--data ''

Response:

{
    "items": [
        {
            "id": 96342785,
            "type": "SINGLE_LINE",
            "name": "Your personal data:",
            "position": 1,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314750704,
                        "name": "Name",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750705,
                        "name": "Date of birthday",
                        "position": 2,
                        "type": "REGULAR",
                        "inputFormat": {
                            "@type": "dateFormat",
                            "id": 172248,
                            "type": "DATE",
                            "title": "Date MM/dd/yyyy",
                            "format": "MM/dd/yyyy"
                        }
                    },
                    {
                        "id": 314750706,
                        "name": "Came to our region (year)",
                        "position": 3,
                        "type": "REGULAR",
                        "inputFormat": {
                            "@type": "numericFormat",
                            "id": 2,
                            "type": "NUMBER",
                            "title": "Number > 0",
                            "decimalPlaces": 0
                        }
                    }
                ],
                "total": 3
            }
        },
        {
            "id": 96344945,
            "type": "PICK_ONE_OR_OTHER",
            "name": "Are you registered on our website?",
            "position": 2,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314751796,
                        "name": "Yes",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314751797,
                        "name": "No",
                        "position": 2,
                        "type": "REGULAR"
                    }
                ],
                "total": 2
            }
        },
        {
            "id": 96342791,
            "type": "CHECK_ALL",
            "name": "Select the popular categories of items",
            "position": 3,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314750724,
                        "name": "Smartphones, TV and electronics",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750725,
                        "name": "Goods for gamers",
                        "position": 2,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750726,
                        "name": "Household appliances",
                        "position": 3,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750727,
                        "name": "Home goods",
                        "position": 4,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750728,
                        "name": "Tools and auto goods",
                        "position": 5,
                        "type": "REGULAR"
                    }
                ],
                "total": 5
            }
        },
        {
            "id": 96343988,
            "type": "DROPDOWN",
            "name": "How much money do you usually spend at the store?",
            "position": 4,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314752893,
                        "name": "less then 100 $",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314752894,
                        "name": "100 - 200 $",
                        "position": 2,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314752895,
                        "name": "200 - 500 $",
                        "position": 3,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314752896,
                        "name": "500 - 1000 $",
                        "position": 4,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314752897,
                        "name": "more then  1000 $",
                        "position": 5,
                        "type": "REGULAR"
                    }
                ],
                "total": 5
            }
        },
        {
            "id": 96342794,
            "type": "LIST_BOX",
            "name": "When you prefer visit the store? (choose week's days)",
            "position": 5,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314750736,
                        "name": "Sunday",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750737,
                        "name": "Monday",
                        "position": 2,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750738,
                        "name": "Tuesday",
                        "position": 3,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750739,
                        "name": "Wednesday",
                        "position": 4,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750740,
                        "name": "Thursdays",
                        "position": 5,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750741,
                        "name": "Friday",
                        "position": 6,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750742,
                        "name": "Saturday",
                        "position": 7,
                        "type": "REGULAR"
                    }
                ],
                "total": 7
            }
        },
        {
            "id": 96343991,
            "type": "MULTI_LINE",
            "name": "Write some tips:",
            "position": 6,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314752898,
                        "name": "<cols value='50'/><rows value='5'/>",
                        "position": 0,
                        "type": "EXTRA"
                    }
                ],
                "total": 1
            }
        },
        {
            "id": 96344953,
            "type": "RATE_DIFFERENT",
            "name": "Rate diversity of products by categories in our store",
            "position": 7,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314751826,
                        "name": "Smartphones, TV and electronics",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314751827,
                        "name": "Goods for gamers",
                        "position": 2,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314751828,
                        "name": "Household appliances",
                        "position": 3,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314751829,
                        "name": "Home goods",
                        "position": 4,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314751830,
                        "name": "Tools and auto goods",
                        "position": 5,
                        "type": "REGULAR"
                    }
                ],
                "total": 5
            },
            "scale": {
                "id": 525392,
                "columns": [
                    {
                        "id": 0,
                        "name": "Not enough",
                        "type": "RADIO",
                        "position": 1
                    },
                    {
                        "id": 0,
                        "name": "Enough",
                        "type": "RADIO",
                        "position": 2
                    },
                    {
                        "id": 0,
                        "name": "Too much",
                        "type": "RADIO",
                        "position": 3
                    }
                ]
            }
        },
        {
            "id": 96345911,
            "type": "MATRIX_3D",
            "name": "Rate each location in the store",
            "position": 8,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314750261,
                        "name": "Smartphones, TV and electronics",
                        "position": 1,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750262,
                        "name": "Goods for gamers",
                        "position": 2,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750263,
                        "name": "Household appliances",
                        "position": 3,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750264,
                        "name": "Home goods",
                        "position": 4,
                        "type": "REGULAR"
                    },
                    {
                        "id": 314750265,
                        "name": "Tools and auto goods",
                        "position": 5,
                        "type": "REGULAR"
                    }
                ],
                "total": 5
            },
            "scale": {
                "id": 525385,
                "columns": [
                    {
                        "id": 0,
                        "name": "I have already bought at least one item in this category this year.",
                        "type": "CHECKBOX",
                        "position": 1
                    },
                    {
                        "id": 0,
                        "name": "I had no problems with the service.",
                        "type": "CHECKBOX",
                        "position": 2
                    },
                    {
                        "id": 0,
                        "name": "What item did you buy at a deep discount?",
                        "type": "TEXT",
                        "position": 3
                    },
                    {
                        "id": 0,
                        "name": "Is location of items comfortable by category in our our store?",
                        "type": "DROPDOWN",
                        "position": 4
                    }
                ]
            }
        },
        {
            "id": 96344957,
            "type": "OBJECT_LOOKUP",
            "name": "My favorite location in the store to buying items",
            "position": 9,
            "pageId": 1222279,
            "answers": {
                "items": [
                    {
                        "id": 314751835,
                        "name": "ID<field value='128426339'/>",
                        "position": 0,
                        "type": "EXTRA"
                    },
                    {
                        "id": 314751836,
                        "name": "Name<field value='128426475'/>",
                        "position": 0,
                        "type": "EXTRA"
                    },
                    {
                        "id": 314751837,
                        "name": "Object ID",
                        "position": 0,
                        "type": "EXTRA"
                    },
                    {
                        "id": 314751838,
                        "name": "Object View",
                        "position": 0,
                        "type": "EXTRA"
                    }
                ],
                "total": 4
            },
            "dataSource": {
                "id": 81589332,
                "name": "Locations in the store",
                "type": "DATA_MODEL",
                "fields": {
                    "href": "/v3/data-sources/81589332/fields",
                    "rel": "fields"
                }
            }
        }
    ],
    "total": 9
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.