Submit answers
Saves answers onto a standard questionnaire.
Answers merge into what is already stored. A uuid you leave out keeps the answer it already has, so you can send just the field you changed without re-sending the rest of the questionnaire.
Merging is per field, not per element. The array under a uuid you send replaces that field's answers whole, so sending {"text": "…"} for a double_text_field still drops that entry's text2. Send a field's entries complete. Removing a repeat works the same way — send the shorter array — and [] clears a field.
Pass replace: true to go back to the old behaviour and have values stand for the entire questionnaire, deleting any answer you leave out.
values is keyed by the field's uuid from data.fieldGroups. Each key holds an array, one entry per repeat of that field, and each entry is an object keyed by element — not by the uuid and not by the question's name. Which element a question stores its answer under is decided entirely by its type:
| Field type | Answer stored under |
|---|---|
| header | nothing; it only displays something |
| subheader | nothing; it only displays something |
| separator | nothing; it only displays something |
| plain_text | nothing; it only displays something |
| rich_text | nothing; it only displays something |
| static_image | nothing; it only displays something |
| text_field | text |
| double_text_field | text, text2 |
| triple_text_field | text, text2, text3 |
| quadruple_text_field | text, text2, text3, text4 |
| text_box | text |
| dropdown | dropdown |
| radio_group | radio |
| checkbox | checkbox |
| checkbox_group | checkbox |
| date_field | text |
| time_field | text |
| color_picker_field | text |
| file_uploader_field | file |
| image_uploader_field | file |
| e_sign_field | signer, timestamp, ip |
| song | songName, songArtistName, songAlbumName, songId, songProvider, spotifyUrl, appleMusicUrl, youtubeUrl, soundCloudUrl, songAlbumUrl, songPreviewUrl, songDurationSeconds, songSuggestionListId, publicNotes, selectionNotes |
| song_list | songName, songArtistName, songAlbumName, songId, songProvider, spotifyUrl, appleMusicUrl, youtubeUrl, soundCloudUrl, songAlbumUrl, songPreviewUrl, songDurationSeconds, songSuggestionListId, publicNotes, selectionNotes |
| spotify_playlist | spotify |
| apple_music_playlist | appleMusic |
| youtube_music_playlist | youtubeMusic |
| music_playlist | musicPlaylist |
A question with timelineEnabled also carries a time, under an element decided by timelineSettings.timelineMode:
| timelineMode | Also stores |
|---|---|
| length | timelineLength |
| start_time | timelineStartsAt |
| start_and_end_time | timelineStartsAt, timelineEndsAt |
Answers are checked against the field they belong to, and the call is rejected with a 422 if they do not fit:
- the value for a field must be an array, and each entry an object
- each element name must be one the field actually stores, so a dropdown field will not accept an answer under radio
- each value must match the element's type, so a checkbox group takes an array of the selected labels and a single checkbox takes a boolean
Use null to clear an answer; it is accepted for any element. Answers already stored under an element the field no longer declares can be sent back unchanged, so fetching a questionnaire and returning it is always safe, but you cannot introduce a new one.
External questionnaires reject this call with a 422 too: their answers live on the site that hosts them, not in Check Cherry.
Required permission: assigned_event_read or unassigned_event_read, with a key belonging to a staff user and allow_staff_edit set on the questionnaire. Customers can submit answers on their own bookings where allow_customer_edit is set and the questionnaire is not yet complete.
Request
- Base URL: https://api.checkcherry.com
- URL: https://api.checkcherry.com/api/v1/questionnaires/{id}
- Auth: none declared. Required headers: Api-Key
Path parameters
The unique ID of the questionnaire
Headers
Your Integration Key
Request body
Example request
{
"values": {
"f47ac10b": [
{
"text": "Navy and gold"
}
],
"9c8b7a65": [
{
"dropdown": "Beef"
}
],
"3e2d1c0b": [
{
"checkbox": [
"Napkins",
"Chargers"
]
}
],
"7a6b5c4d": [
{
"songName": "Uptown Funk",
"songArtistName": "Bruno Mars",
"selectionNotes": "First dance"
},
{
"songName": "September",
"songArtistName": "Earth, Wind & Fire",
"selectionNotes": null
}
]
}
}Response
answers saved
Changes
No recorded changes to this operation across all 2 revisions of this API.