restriction_out_of_range

A length of stay Booking.com would not keep as sent: maximum 1–90 nights, minimum 1–91, 0 for no limit.

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

When it fires

You sent a length of stay Booking.com does not keep as sent. Booking.com holds a maximum stay (maxStay, maxStayArrival) of 1–90 nights and a minimum stay (minStay, minStayArrival) of 1–91 nights. 0 means no limit. Negative and fractional values are refused too.

Booking.com acknowledges a larger number and then stores something else. A maximum of 365 is stored as no maximum (0), and a minimum of 120 is stored as 91. So the value is refused up front, rather than reported as written.

Response shape

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

{
  "error": {
    "code": "restriction_out_of_range",
    "message": "`updates[0].restrictions.maxStayArrival` must be a whole number from 0 to 90. Booking.com holds a maximum length of stay of 1–90 nights, and 0 means no maximum. A value above 90 is not kept: Booking.com acknowledges it and stores no maximum (0) instead, so it is refused here rather than reported as written.",
    "fix": "Send `maxStayArrival` between 1 and 90, or 0 for no maximum stay.",
    "docs_url": "https://repull.dev/docs/errors/restriction_out_of_range",
    "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
    "field": "updates[0].restrictions.maxStayArrival",
    "value_received": 365
  }
}

How to fix

  1. Read `field`. It names the restriction and the update it belongs to.
  2. For "no maximum stay", send `0`. Otherwise send a value inside the range: 1–90 for a maximum, 1–91 for a minimum.
  3. Send the request again.

Common gotchas

  • Nothing was sent. The whole request is refused before anything reaches Booking.com, so other updates in it were not written either.
  • A one-night minimum reads back as 0. Booking.com stores minStay: 1 as no minimum. That is still reported as applied.
  • See Minimum Stay & Restrictions for how stay-through and arrival-based limits differ.

Examples

curl

curl -X PUT https://api.repull.dev/v1/channels/booking/availability \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "availability",
    "property_id": "1234567",
    "updates": [{
      "roomId": "123456701",
      "rateId": "98765",
      "dateRange": { "start": "2026-11-09", "end": "2027-11-08" },
      "restrictions": { "minStayArrival": 2, "maxStayArrival": 0 }
    }]
  }'
# maxStayArrival 0 = no maximum. 365 would return 422 restriction_out_of_range.

TypeScript

const res = await fetch('https://api.repull.dev/v1/channels/booking/availability', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.REPULL_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    type: 'availability',
    property_id: '1234567',
    updates: [{
      roomId: '123456701',
      rateId: '98765',
      dateRange: { start: '2026-11-09', end: '2027-11-08' },
      restrictions: { minStayArrival: 2, maxStayArrival: 0 }, // 0 = no maximum
    }],
  }),
})

If you're an AI agent

A length of stay outside what Booking.com keeps: maximum 1–90 nights, minimum 1–91, 0 for no limit. Read error.field, send 0 for 'no limit' or a value in range, and resend. Nothing was written.

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

AI