Fix ambiguous push_data flow in Reservation Automations guide#1054
Conversation
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>
DOC-117 Reservation Automations docs: push_data flow is ambiguous and silently fails
ProblemThe Reservation Automations guide shows {
"customer_key": "...",
"spaces": [{ "space_key": "unit-101", "device_ids": ["..."] }],
"reservations": [{ "space_keys": ["unit-101"], ... }]
}In practice, calling
This silent failure is extremely hard to debug — both for developers and AI coding assistants trying to follow the docs. Root cause (confirmed)Spaces must be created separately via The correct working flow is:
We confirmed this works — the automation creates an access grant and access code on the device. Additional finding: silent
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82f0dc29c1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| Reservation Automations use these resources to decide where and how to apply settings. | ||
| {% hint style="warning" %} | ||
| `push_data` does **not** create spaces. If you reference a `space_key` that does not exist, the call returns `ok: true` but no access codes are generated. Always create spaces first using [`/spaces/create`](../api/spaces/create.md). |
There was a problem hiding this comment.
Reconcile the claim that
push_data cannot create spaces
This warning now contradicts the generated API docs in the same repo: both docs/api/customers/push_data.md and docs/api/seam/v1/customers/push_data.md still describe push_data as accepting a top-level spaces array. As written, the guide tells readers to abandon an inline-space flow that our reference still documents, so either this statement is wrong for current integrations or the API reference also needs to be updated in the same change.
Useful? React with 👍 / 👎.
| * Call it again with the same `reservation_key` to update times or other details—Seam automatically reconfigures the device settings. | ||
|
|
||
| {% hint style="info" %} | ||
| The `push_data` [API reference](../api/customers/push_data.md) also documents an `access_grants` parameter. Both `reservations` and `access_grants` work as top-level keys in the `push_data` payload and function equivalently for time-bound access. |
There was a problem hiding this comment.
Clarify cleanup for the new
access_grants flow
If we advertise access_grants as interchangeable with reservations here, the rest of the guide needs the matching cleanup path as well. The delete example later still uses reservation_keys, while docs/api/customers/delete_data.md documents a separate access_grant_keys field. Readers who follow this new note are left with the wrong key shape for deleting or rolling back the access grant they just created.
Useful? React with 👍 / 👎.
| ### 1. Create spaces with devices | ||
|
|
||
| Go to **Console** → **Developer** → **Automations** and turn on an Automations for your workspace. | ||
| 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. |
There was a problem hiding this comment.
Allow entrance-backed spaces in the setup step
This sentence makes device_ids sound mandatory, but our Spaces docs define a space as a grouping of devices and entrances, and docs/api/spaces/create.md accepts acs_entrance_ids as well as device_ids. For ACS-only reservation flows, telling users they need an assigned device is inaccurate and will block valid entrance-backed setups from following this guide.
Useful? React with 👍 / 👎.
itelo
left a comment
There was a problem hiding this comment.
Feedback on the Spaces and Unique user identity emails sections.
| * [Customer](customer-portals/) – identify who the automation belongs to with a `customer_key`. | ||
| * [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. | ||
| * 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) | ||
| * [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 `device_ids` **before** you call `push_data`. Reservations reference these spaces by `space_key`. |
There was a problem hiding this comment.
Suggestion: update this to:
Each space must be created via
/spaces/createwith aspace_keyand assigneddevice_idsoracs_entrance_ids. Thespace_keyis used to link your internal ID to Seam. Ifpush_datais called before/spaces/create, the spaces will be in a draft state until you create them using the space endpoint — no reservations will be created until then. You can change the devices in a space at any time; it will trigger another automation and the reservation will be updated.
| * 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) | ||
| * [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 `device_ids` **before** you call `push_data`. Reservations reference these spaces by `space_key`. | ||
| * 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). | ||
| * 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. |
There was a problem hiding this comment.
Suggestion: update this to:
If an email already exists from a previous call, the reservation is skipped and you will need to check the automation result. If you really want to use the same email for multiple
user_identityrecords, you must enable it in the automation via the console.
- 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>
Summary
/spaces/createwith aspace_keyanddevice_idsbefore callingpush_data(previously the guide impliedpush_datacreates spaces inline, which silently fails)push_datagotchas: missing spaces, no devices on spaces, duplicate user identity emails causing silentuser_identity_email_or_phone_conflict, and automations not enabledreservationsvsaccess_grants— clarifies the mismatch between the guide (which usesreservations) and the API reference (which documentsaccess_grants), noting both workTest plan
/spaces/create,/customers/push_data)Resolves DOC-117
🤖 Generated with Claude Code