reservation_created_in_pms_only
The booking exists in the PMS but is not recorded in Repull yet. Do NOT retry: it arrives with the next sync, and the same key replays this answer.
When it fires
The PMS created the booking, but Repull could not record it yet (for example the PMS's record could not be read back). The booking is real: it holds the dates in the PMS. existing names it.
It arrives in Repull with the next sync of the connection, and reservation.created fires then.
Unlike every other 5xx, this answer is stored against your Idempotency-Key: a retry with the same key replays it instead of booking again. retryable is false.
Response shape
Every Repull error follows the same envelope. The code is stable and safe to switch on.
{
"error": {
"code": "reservation_created_in_pms_only",
"message": "Created in Lodgify (LG-88231) but its record could not be read here. It will arrive with the next sync.",
"fix": "Do NOT retry. The booking exists in Lodgify (see `existing`) but could not be recorded in Repull yet; it arrives with the next sync and `reservation.created` fires then. Retrying with the same `Idempotency-Key` replays this answer.",
"docs_url": "https://repull.dev/docs/errors/reservation_created_in_pms_only",
"request_id": "req_01J5X7Y8Z9ABCDEF12345678",
"provider": "lodgify",
"existing": { "externalId": "88231", "confirmationCode": "LG-88231" },
"pms": { "applied": ["reservation"], "errors": [] },
"retryable": false
}
}How to fix
- Do NOT retry, and above all do not retry with a new `Idempotency-Key` — that books the stay a second time on any PMS without its own duplicate check.
- Record `existing.confirmationCode` as the booking in your system.
- Wait for `reservation.created` (or poll `GET /v1/reservations`) to get the Repull reservation id.
Common gotchas
Generic retry middleware that retries every 502 must special-case this code. Branch on retryable or on the code, not on the status. Compare pms_error, the 502 that should be retried.
Examples
curl
# Subscribe once so you hear when it lands
curl -X POST https://api.repull.dev/v1/webhooks \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-app.com/hooks/repull", "events": ["reservation.created"]}'TypeScript
const body = await res.json()
if (res.status === 502 && body.error?.code === 'reservation_created_in_pms_only') {
// Booked in the PMS. Never retry; wait for reservation.created.
await saveBooking({ status: 'booked_in_pms', confirmationCode: body.error.existing?.confirmationCode })
return
}
if (body.error?.retryable === false) return // never loop on a final answerIf you're an AI agent
The booking WAS created in the PMS; Repull will pick it up on the next sync. Do NOT retry and never use a new Idempotency-Key. Report `existing.confirmationCode` to the user and wait for reservation.created.
Related
- Error reference — the full table of error codes
- Using Repull from AI agents — patterns for handling errors in agent loops
- Creating reservations
- Idempotency
Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.