Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Update Form

Developer Preview

Updates a form.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Bookings permission scope.

PUT

https://www.wixapis.com/bookings/v1/forms

Body Params

NAME
TYPE
DESCRIPTION
form
Required

object

The updated form. Must include the form Id

Response Object

NAME
TYPE
DESCRIPTION
form

object

The updated form

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Update Form

Update a form

Request

curl

Copy Code
1curl -X PUT \
2 'https://www.wixapis.com/bookings/v1/forms' \
3 -H "Content-Type: application/json" \
4 -H 'Authorization: <AUTH>' \
5 --data '{
6 "form": {
7 "id": "a8119733-f872-4b0a-963b-09a95208474e",
8 "header": {
9 "description": "Updated!!! Tell us a bit about yourself",
10 "title": "Add Your Info",
11 "isDescriptionHidden": false
12 },
13 "actionLabels": {
14 "offlinePaymentLabel": "Book It",
15 "onlinePaymentLabel": "Pay Now",
16 "bookingRequestApprovalLabel": "Request To Book"
17 },
18 "name": {
19 "fieldId": "fbe7fc3b-c30e-4ebe-8699-b272a120b178",
20 "valueType": "SHORT_TEXT",
21 "label": "Name",
22 "userConstraints": {
23 "required": true
24 },
25 "additionalLabels": []
26 },
27 "email": {
28 "fieldId": "30c5f37d-e7c8-4c57-879b-bcd75252d668",
29 "valueType": "SHORT_TEXT",
30 "label": "Email",
31 "userConstraints": {
32 "required": true
33 },
34 "additionalLabels": []
35 },
36 "phone": {
37 "fieldId": "0691f056-ac53-48e1-a4d7-5f4a6509d8eb",
38 "valueType": "SHORT_TEXT",
39 "label": "Phone Number",
40 "userConstraints": {
41 "required": false
42 },
43 "additionalLabels": []
44 },
45 "numberOfParticipants": {
46 "fieldId": "9f362e51-461b-4f5c-85b1-d4fb355543b9",
47 "valueType": "SHORT_TEXT",
48 "label": "Number of Participants",
49 "userConstraints": {
50 "required": true
51 },
52 "additionalLabels": []
53 },
54 "address": {
55 "street": {
56 "fieldId": "c1e68eb8-bc6e-419f-b6c7-7e57d7ff968e",
57 "valueType": "SHORT_TEXT",
58 "label": "Street",
59 "userConstraints": {
60 "required": true
61 },
62 "additionalLabels": []
63 },
64 "city": {
65 "fieldId": "42337533-6fd6-4f7c-906f-beb69c63aa99",
66 "valueType": "SHORT_TEXT",
67 "label": "City",
68 "userConstraints": {
69 "required": true
70 },
71 "additionalLabels": []
72 },
73 "floorNumber": {
74 "fieldId": "3c258e9a-3fdd-4cd3-83f9-44b4f47a12de",
75 "valueType": "SHORT_TEXT",
76 "label": "Apt. / Floor No.",
77 "userConstraints": {
78 "required": false
79 },
80 "additionalLabels": []
81 },
82 "state": {
83 "fieldId": "b7957be3-0776-40da-9a47-7fbb0b832538",
84 "valueType": "SHORT_TEXT",
85 "label": "State",
86 "userConstraints": {
87 "required": false
88 },
89 "additionalLabels": []
90 }
91 },
92 "customFields": [
93 {
94 "fieldId": "fd57ad23-22c0-4049-b674-0c95512ca078",
95 "valueType": "LONG_TEXT",
96 "label": "Add Your Message",
97 "userConstraints": {
98 "required": false
99 },
100 "additionalLabels": []
101 }
102 ]
103 }
104 }'

Response

json

1
2{"form": {
3 "id": "a8119733-f872-4b0a-963b-09a95208474e",
4 "header": {
5 "description": "Updated!!! Tell us a bit about yourself",
6 "title": "Add Your Info",
7 "isDescriptionHidden": false
8 },
9 "actionLabels": {
10 "offlinePaymentLabel": "Book It",
11 "onlinePaymentLabel": "Pay Now",
12 "bookingRequestApprovalLabel": "Request To Book"
13 },
14 "name": {
15 "fieldId": "fbe7fc3b-c30e-4ebe-8699-b272a120b178",
16 "valueType": "SHORT_TEXT",
17 "label": "Name",
18 "userConstraints": {"required": true},
19 "additionalLabels": []
20 },
21 "email": {
22 "fieldId": "30c5f37d-e7c8-4c57-879b-bcd75252d668",
23 "valueType": "SHORT_TEXT",
24 "label": "Email",
25 "userConstraints": {"required": true},
26 "additionalLabels": []
27 },
28 "phone": {
29 "fieldId": "0691f056-ac53-48e1-a4d7-5f4a6509d8eb",
30 "valueType": "SHORT_TEXT",
31 "label": "Phone Number",
32 "userConstraints": {"required": false},
33 "additionalLabels": []
34 },
35 "numberOfParticipants": {
36 "fieldId": "9f362e51-461b-4f5c-85b1-d4fb355543b9",
37 "valueType": "SHORT_TEXT",
38 "label": "Number of Participants",
39 "userConstraints": {"required": true},
40 "additionalLabels": []
41 },
42 "address": {
43 "street": {
44 "fieldId": "c1e68eb8-bc6e-419f-b6c7-7e57d7ff968e",
45 "valueType": "SHORT_TEXT",
46 "label": "Street",
47 "userConstraints": {"required": true},
48 "additionalLabels": []
49 },
50 "city": {
51 "fieldId": "42337533-6fd6-4f7c-906f-beb69c63aa99",
52 "valueType": "SHORT_TEXT",
53 "label": "City",
54 "userConstraints": {"required": true},
55 "additionalLabels": []
56 },
57 "floorNumber": {
58 "fieldId": "3c258e9a-3fdd-4cd3-83f9-44b4f47a12de",
59 "valueType": "SHORT_TEXT",
60 "label": "Apt. / Floor No.",
61 "userConstraints": {"required": false},
62 "additionalLabels": []
63 },
64 "state": {
65 "fieldId": "b7957be3-0776-40da-9a47-7fbb0b832538",
66 "valueType": "SHORT_TEXT",
67 "label": "State",
68 "userConstraints": {"required": false},
69 "additionalLabels": []
70 }
71 },
72 "customFields": [ {
73 "fieldId": "fd57ad23-22c0-4049-b674-0c95512ca078",
74 "valueType": "LONG_TEXT",
75 "label": "Add Your Message",
76 "userConstraints": {"required": false},
77 "additionalLabels": []
78 }]
79}}