Vehicles & Blocks

Sync your fleet's availability with RYNT: map your cars, enable/disable them, and set date blocks. All of these require the vehicle:write scope.

Mapping

Before you can address a car by your own reference, map it once. List your vehicles (GET /vehicles) to get each rynt_vehicle_id, then:

curl -X POST .../vehicles/mapping \
  -H "Authorization: Bearer pk_test_…" -H "Content-Type: application/json" \
  -d '{"rynt_vehicle_id":"<uuid>","external_ref":"CAR-1"}'

external_ref is your own id for the car (e.g. CAR-1, a plate, or your internal key). Every later call uses it.

Enable / disable

curl -X PATCH .../vehicles/CAR-1/status \
  -H "Authorization: Bearer pk_test_…" -H "Content-Type: application/json" \
  -d '{"enabled": false}'

enabled: false unlists the car and makes it unbookable; true re-lists it.

Blocks

A block makes a car unavailable for a date range. Blocks are idempotent on external_block_id — sending the same one twice returns the existing block, never a duplicate.

# create
curl -X POST .../vehicles/CAR-1/blocks \
  -H "Authorization: Bearer pk_test_…" -H "Content-Type: application/json" \
  -d '{"start":"2027-06-01T00:00:00+04:00","end":"2027-06-05T00:00:00+04:00","external_block_id":"B-1","reason":"own booking"}'

# remove
curl -X DELETE .../vehicles/CAR-1/blocks/B-1 \
  -H "Authorization: Bearer pk_test_…"

Double-booking

If a block overlaps a live RYNT booking, it is not created. You receive a 409 double_booking with the conflicting booking, and an availability.conflict webhook:

{
  "error": {
    "code": "double_booking",
    "conflict_id": "cf_…",
    "conflicts_with": {
      "booking_number": "BK-…",
      "status": "confirmed",
      "start_date": "…", "end_date": "…"
    },
    "request_id": "req_…"
  }
}
📘

Auto-resolve

When the conflicting RYNT booking is later cancelled or completed, the conflict clears and you receive a conflict.resolved webhook — you can then re-push your block.


Did this page help you?