unsupported_field

A field this listing or endpoint cannot take. Refused by name, never silently dropped — `fields` (or `field`) names it.

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

When it fires

A field the listing or the endpoint cannot take. It is refused by name, never silently dropped. Two places return it:

Creating a reservation

  • totalPrice, notes, unitId and sendConfirmationEmail on a listing that is not managed in a PMS (it is priced from its own rates).
  • checkInTime, checkOutTime, currency and guestId on a listing that ismanaged in a PMS (the PMS's own settings apply).

fields lists every field refused.

Changing a reservation

PATCH /v1/reservations/{id} refuses guest / guestDetails, pricing / totalPrice / currency, status, platform and notes, each with the reason. field names it and valid_values lists what the endpoint does change.

Response shape

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

{
  "error": {
    "code": "unsupported_field",
    "message": "`checkInTime` cannot be set on a booking made in Hostaway: arrival and departure times come from the property's settings in the PMS.",
    "fix": "`GET /v1/listings/{id}` → `capabilities.reservations` shows what the listing supports. `totalPrice`, `notes`, `unitId` and `sendConfirmationEmail` are honoured only on listings managed in a PMS; `checkInTime`, `checkOutTime`, `currency` and `guestId` only on listings that are not.",
    "docs_url": "https://repull.dev/docs/errors/unsupported_field",
    "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
    "provider": "hostaway",
    "fields": ["checkInTime"]
  }
}

How to fix

  1. Remove the fields named in `fields` (create) or `field` (change) and send again.
  2. On create, read `GET /v1/listings/{id}` → `capabilities.reservations.managedBy` first: `pms` takes the PMS-only fields, `repull` takes the direct-only ones.
  3. On PATCH, change only `checkIn`, `checkOut`, `checkInTime`, `checkOutTime`, `guestCount` and `listingId`. Cancel with `POST /v1/reservations/{id}/cancel`.

Examples

curl

curl -X PATCH https://api.repull.dev/v1/reservations/215708 \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "cancelled"}'
# → 422 unsupported_field, "field": "status",
#   "fix": "This endpoint changes: checkIn, checkOut, checkInTime, checkOutTime, guestCount, listingId."

TypeScript

const { error } = await res.json()
if (error?.code === 'unsupported_field') {
  const refused: string[] = error.fields ?? (error.field ? [error.field] : [])
  for (const f of refused) delete (payload as Record<string, unknown>)[f]
  // re-send without them (with a new Idempotency-Key, since the payload changed)
}

If you're an AI agent

A field was sent that this listing or endpoint does not accept. Remove the field named in `fields`/`field` and retry. Check capabilities.reservations.managedBy on GET /v1/listings/{id} to know which fields apply.

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

AI