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

Update Resource

Developer Preview

Updates a resource. Can be used also to update the resource's schedules.

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.

PATCH

https://www.wixapis.com/bookings/v1/resources/{resource.id}

Path Params

NAME
TYPE
DESCRIPTION
resource.id
Required

string

Resource's unique ID

Body Params

NAME
TYPE
DESCRIPTION
resource

object

Updated resource.

fieldMask

object

Field mask of fields to update.

Response Object

Returns an empty object.

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Update Resource

Updates a resource with its schedule.

Request

curl

Copy Code
1curl -X PATCH \
2 'https://www.wixapis.com/bookings/v1/resources' \
3 -H "Content-Type: application/json" \
4 -H 'Authorization: <AUTH>' \
5 --data '{
6 "resource": {
7 "id": "7d0ab54b-d782-4f24-a7d8-b563fbb211bb",
8 "name": "Arnold Stern the 2nd",
9 "email": "arnold@mysite.info",
10 "phone": "620-428-1741",
11 "tags": [
12 "staff"
13 ],
14 "images": [],
15 "schedules": [
16 {
17 "id": "a1aa5a30-1482-4c23-86f0-efbb03cbc128",
18 "scheduleOwnerId": "7d0ab54b-d782-4f24-a7d8-b563fbb211bb",
19 "firstSessionStart": "2020-04-19T13:00:00Z",
20 "timeZone": "Asia/Jerusalem",
21 "intervals": [
22 {
23 "id": "9ebd9d11-b3d8-47ad-883b-89054982b6d2",
24 "start": "2020-04-18T21:00:00Z",
25 "interval": {
26 "daysOfWeek": "FRI",
27 "hourOfDay": 10,
28 "minuteOfHour": 0,
29 "duration": 480
30 },
31 "frequency": {
32 "repetition": 1
33 },
34 "affectedSchedules": []
35 },
36 {
37 "id": "5785bc19-5aff-4bbe-bab9-8d2d41f59a4e",
38 "start": "2020-04-18T21:00:00Z",
39 "interval": {
40 "daysOfWeek": "SAT",
41 "hourOfDay": 9,
42 "minuteOfHour": 0,
43 "duration": 540
44 },
45 "frequency": {
46 "repetition": 1
47 },
48 "affectedSchedules": []
49 },
50 {
51 "id": "45b5c705-331d-4318-8e24-a64e21508246",
52 "start": "2020-04-18T21:00:00Z",
53 "interval": {
54 "daysOfWeek": "SUN",
55 "hourOfDay": 9,
56 "minuteOfHour": 0,
57 "duration": 540
58 },
59 "frequency": {
60 "repetition": 1
61 },
62 "affectedSchedules": []
63 }
64 ],
65 "tags": [],
66 "availability": {
67 "start": "2020-04-18T21:00:00Z",
68 "linkedSchedules": []
69 },
70 "totalNumberOfParticipants": 0,
71 "participants": [],
72 "status": "CREATED",
73 "created": "2020-04-30T13:26:19.985Z",
74 "updated": "2020-04-30T13:26:19.985Z",
75 "version": 0,
76 "inheritedFields": []
77 }
78 ]
79 }
80 }
81 '

Response

json

1
2{}