pms_rejected

The PMS refused the request as sent; its reason is in `message`. Nothing was changed. Correct it and retry with a new `Idempotency-Key`.

HTTP 422The request was understood but refused as sent. Change it before retrying.

When it fires

The PMS refused the booking, change or cancellation as sent — for example an invalid guest email or a field value the PMS does not accept. messagecarries the PMS's own reason, prefixed with its name, and pms.errors the section that failed. Nothing was changed.

Usually 422. When the PMS answered with a server error (it failed rather than refused), the status is 502 with the same code.

Response shape

Every Repull error follows the same envelope. The code is stable and safe to switch on.

{
  "error": {
    "code": "pms_rejected",
    "message": "Hostaway refused to create the reservation: Hostaway: guestEmail is invalid",
    "fix": "Hostaway refused it; its reason is in `message`. Nothing was changed. Correct the request and retry with a NEW `Idempotency-Key`.",
    "docs_url": "https://repull.dev/docs/errors/pms_rejected",
    "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
    "provider": "hostaway",
    "pms": { "applied": [], "errors": [{ "section": "reservation", "code": "rejected", "message": "Hostaway: guestEmail is invalid" }] }
  }
}

How to fix

  1. Read `message` — it is the PMS's own reason.
  2. Correct the request (the field the PMS named).
  3. Retry with a NEW `Idempotency-Key`: the old key is bound to the refused payload.

Examples

curl

curl -X POST https://api.repull.dev/v1/reservations \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 7d1e0c4a-new-key-after-fix" \
  -d '{"listingId": 4118, "checkIn": "2026-10-01", "checkOut": "2026-10-05", "guest": {"firstName": "Ada", "email": "ada@example.com"}, "adults": 2}'

TypeScript

const { error } = await res.json()
if (error?.code === 'pms_rejected') {
  // The PMS's reason — show it, fix the input, retry with a fresh key
  console.warn(error.provider, error.message)
  return { fixAndRetry: true, reason: error.message }
}

If you're an AI agent

The PMS refused the request; its reason is in `message`. Nothing changed. Fix the named field and retry with a NEW Idempotency-Key. Do not retry the identical request.

Hit an error that isn't covered? Email hello@repull.dev with the request id from the response headers.

AI