Staylah

Reference

Integration checklist

The seven steps, in order.

  1. GET /ping — key works, and check server_time against your clock.
  2. GET /whoami — confirm your scopes and that mapped_properties is not 0.
  3. GET /mapping/hotels — get your hotel codes. Never use a Staylah id. Needs content.read, which the push preset does not include — ask for it.
  4. GET /mapping/hotels/{code} — get room type and rate plan codes plus occupancy bounds.
  5. Pull: availability/search → availability/rates → bookings/quote → POST /bookings with a partner_reference you can reproduce on retry. Then retry that exact call and confirm you get 200 with is_duplicate: true rather than a second booking — that is the single most important behaviour to verify before going live.
  6. Push: PUT /ari → GET /ari/batches/{id} to confirm what applied; deliver reservations with sell_amount and watch data.intake_state on the response.
  7. Handle 429 with Retry-After, and branch on error.code — never on error.message.
  8. Handle the three business outcomes you cannot avoid: no_availability (the room went between quoting and booking — quotes do not hold inventory), rate_changed (your total disagrees with ours — re-quote, never re-send the same figure), and an expired quote (booked anyway, at the live price; compare quote.quoted_total with quote.booked_total).