You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix ambiguous push_data flow in Reservation Automations guide (#1054)
* Fix ambiguous push_data flow in Reservation Automations guide
Clarify that spaces must be created via /spaces/create before calling
push_data — the previous guide implied push_data creates spaces inline,
which leads to silent failures. Also adds troubleshooting section for
common push_data gotchas (missing spaces, duplicate emails, etc.).
Resolves DOC-117
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Address review feedback on reservation automations guide
- Clarify that push_data's spaces array only creates a lightweight
reference without device assignments (not a full space with devices)
- Add acs_entrance_ids alongside device_ids for ACS-backed spaces
- Clarify access_grants vs reservations delete_data key mismatch
- Update troubleshooting table to mention entrances
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/capability-guides/reservation-automations.md
+51-15Lines changed: 51 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,35 +14,52 @@ Built for short-term bookings—whether hotel stays, gym classes, coworking room
14
14
15
15
Reservation Automations follow the lifecycle of a reservation:
16
16
17
-
1. You enable Automations in [Console](https://console.getseam.com/).
17
+
1. You create spaces and assign devices using [`/spaces/create`](../api/spaces/create.md).
18
18
2. You send reservation and guest data with `push_data`.
19
19
3. Seam applies the right access and climate settings at the right times.
20
20
4. Webhooks notify you when settings are issued, updated, or revoked.
21
21
5. If a reservation is canceled, you call `delete_data` to roll back device settings.
22
22
23
23
***
24
24
25
-
### Before you begin <ahref="#before-you-begin"id="before-you-begin"></a>
25
+
### Before you begin <ahref="#before-you-begin"id="before-you-begin"></a>
26
26
27
27
Set up these resources in your Seam workspace:
28
28
29
29
*[Customer](customer-portals/) – identify who the automation belongs to with a `customer_key`.
30
-
*[Spaces](../core-concepts/mapping-your-resources-to-seam-resources.md) – represent the real-world units your customer manages (i.e. _Room 101_ in a hotel, _Studio 3_ in a gym). Reservations should reference these spaces.
31
-
* Devices or entrances – connect locks, thermostats, or other devices to each Space (e.g., assign the lock in Room 101 to the _Room 101_ space)
30
+
*[Spaces](../core-concepts/mapping-your-resources-to-seam-resources.md) – represent the real-world units your customer manages (i.e. _Room 101_ in a hotel, _Studio 3_ in a gym). Each space must be created via [`/spaces/create`](../api/spaces/create.md) with a `space_key` and assigned devices or entrances **before** you call `push_data`. Reservations reference these spaces by `space_key`.
31
+
* Devices or entrances – connect locks, thermostats, or ACS entrances to each space (e.g., assign the lock in Room 101 to the _Room 101_ space). Use `device_ids` for smart locks and thermostats, or `acs_entrance_ids` for access control system entrances.
32
+
* Unique user identity emails – each `user_identity` you push must have a unique `email_address`. If an email already exists from a previous call, the reservation is silently skipped.
32
33
33
-
Reservation Automations use these resources to decide where and how to apply settings.
34
+
{% hint style="warning" %}
35
+
Although `push_data` accepts a `spaces` array, it only creates a lightweight resource reference — it does **not** assign devices or entrances to the space. If you skip [`/spaces/create`](../api/spaces/create.md), the space will have no devices and automations will have nothing to configure. The call still returns `ok: true`, making this a silent failure. Always create spaces with device or entrance assignments first using `/spaces/create`.
36
+
{% endhint %}
34
37
35
38
{% hint style="success" %}
36
39
You can also let customers configure their own accounts, spaces, and devices with [Customer Portals](customer-portals/).
37
40
{% endhint %}
38
41
39
42
***
40
43
41
-
### 1. Enable Reservation Automations in Console.
44
+
### 1. Create spaces with devices
45
+
46
+
Before pushing reservation data, create a space for each bookable unit using the [`/spaces/create`](../api/spaces/create.md) endpoint. Each space must have a `space_key` (your identifier) and at least one assigned device or entrance.
47
+
48
+
```bash
49
+
curl -X POST \
50
+
https://connect.getseam.com/spaces/create \
51
+
-H "Authorization: Bearer $SEAM_API_KEY" \
52
+
-H "Content-Type: application/json" \
53
+
-d '{
54
+
"name": "Room 101",
55
+
"space_key": "unit-101-key",
56
+
"device_ids": ["YOUR_LOCK_DEVICE_ID"]
57
+
}'
58
+
```
42
59
43
-
Go to **Console** → **Developer** → **Automations** and turn on an Automations for your workspace.
60
+
Use `device_ids` for smart locks and thermostats, or `acs_entrance_ids` for access control system entrances. You can include both if the space has multiple access points.
44
61
45
-
<figure><imgsrc="../.gitbook/assets/Screenshot 2025-09-01 at 5.25.53 PM (1).png"alt=""><figcaption></figcaption></figure>
62
+
The `space_key` is what you reference in `push_data` reservations. Without it, `push_data` cannot match reservations to the space.
46
63
47
64
***
48
65
@@ -102,14 +119,12 @@ When enabled, multiple guests can share the same email address or phone number.
102
119
103
120
Use the `push_data` endpoint to send customer, user, and reservation data to Seam. Automations use this information to configure devices at the right times.
104
121
105
-
A **reservation** represents a time-bound assignment of a user to a space. This can be a hotel stay, a gym day pass, or a coworking member’s conference room booking. Each reservation must include a unique `reservation_key`, which can be your system’s identifier for that record. Seam uses this key to know whether it should create a new reservation, update an existing one, or remove it later with `delete_data`.
106
-
107
-
Use the `push_data` endpoint to provide Seam your customer, guest, and reservation data. Seam uses this to issue access credentials and configure devices at the right times.
122
+
A **reservation** represents a time-bound assignment of a user to a space. This can be a hotel stay, a gym day pass, or a coworking member's conference room booking. Each reservation must include a unique `reservation_key`, which can be your system's identifier for that record. Seam uses this key to know whether it should create a new reservation, update an existing one, or remove it later with `delete_data`.
108
123
109
124
```bash
110
125
curl -X POST \
111
-
https://api.seam.co/customers/push_data \
112
-
-H "Authorization: Bearer $YOUR_API_KEY" \
126
+
https://connect.getseam.com/customers/push_data \
127
+
-H "Authorization: Bearer $SEAM_API_KEY" \
113
128
-H "Content-Type: application/json" \
114
129
-d '{
115
130
"customer_key": "sample_customer_key",
@@ -135,6 +150,10 @@ curl -X POST \
135
150
* Call `push_data` with a new `reservation_key` to create a reservation.
136
151
* Call it again with the same `reservation_key` to update times or other details—Seam automatically reconfigures the device settings.
137
152
153
+
{% hint style="info" %}
154
+
The `push_data`[API reference](../api/customers/push_data.md) also documents `access_grants` and `bookings` as alternative top-level keys. This guide uses `reservations`, which is the recommended key for short-term booking workflows. If you use `access_grants` instead, use `access_grant_keys` (not `reservation_keys`) when calling [`delete_data`](../api/customers/delete_data.md).
155
+
{% endhint %}
156
+
138
157
***
139
158
140
159
### 4. Use webhooks to listen for updates
@@ -164,8 +183,8 @@ Calling `delete_data` removes the underlying reservation records, which tells au
#### I called `push_data` and got `ok: true` but no access code was created
204
+
205
+
`push_data` returns a success response even when automations cannot act on the data. Check these common causes:
206
+
207
+
| Symptom | Cause | Fix |
208
+
| ------- | ----- | --- |
209
+
| No access code created | Space does not exist or is missing a `space_key`| Create the space via [`/spaces/create`](../api/spaces/create.md) with a `space_key` and `device_ids` or `acs_entrance_ids` before calling `push_data`|
210
+
| No access code created | No devices or entrances assigned to the space | Add `device_ids` or `acs_entrance_ids` when creating the space, or update the space to include them |
211
+
| Reservation silently skipped | Duplicate `email_address` on a `user_identity`| Each user identity must have a unique email. Check **Console** → **Automation Runs** for `user_identity_email_or_phone_conflict` errors |
212
+
| Automation did not run | Automations not enabled | Go to **Console** → **Developer** → **Automations** and verify automations are enabled for your workspace |
213
+
214
+
{% hint style="info" %}
215
+
Check **Console** → **Automation Runs** for detailed error information. Errors like `user_identity_email_or_phone_conflict` are only visible there — they do not appear in the `push_data` response.
0 commit comments