You are connecting our rescue's app to the ADOPTR API for rescues.

Read these first, and trust them over anything you remember:
- Guide: https://adoptr.uk/developers.md
- OpenAPI 3.1: https://adoptr.uk/api/v1/openapi.json

Rules
- Work only on the sandbox: https://sandbox.adoptr.uk/api/v1. Never call https://adoptr.uk/api/v1.
- Read the key from the environment variable ADOPTR_API_KEY (it starts adk_test_). Never hard-code, print, log or commit it.
- Call the API from our server only. It doesn't answer browsers.
- Send a new Idempotency-Key (a UUID) with every POST and DELETE. When you retry the same action, send the same key and the same body, byte for byte.
- Branch on error.code, never on error.message. On 429 and idempotency_running, wait Retry-After seconds, then retry.
- After sending an adopter's address, phone or email, don't store or log them anywhere else.

Build
1. GET /departures: show each departure's dates, deadlines and seats_free.
2. POST /holds to hold seats; DELETE /holds/{id} to give them back.
3. POST /holds/{id}/animals for each animal. Show the user to_do when papers are missing or blocked.
4. GET /animals (follow next_after) and GET /animals/{id} to show papers and status.

Pass the go-live checklist on the sandbox. Each line ticks itself when the sandbox sees the call. Hold on the empty departure (the others are full, closed, or too late for an animal without its rabies vaccine):
1. GET /departures answers 200.
2. GET /departures/{leaves_on} answers 200.
3. GET /animals?limit=1, then again with after set to next_after.
4. GET /animals/{id} answers 200.
5. POST /holds on the empty departure answers 201, sent with an Idempotency-Key.
6. The same POST /holds, sent again with the same key and body, gets the same answer.
7. POST /holds on the full departure (seats_free 0) answers 409 not_enough_seats.
8. POST /holds on the closed departure answers 409 departure_closed.
9. DELETE /holds/{id} answers 200. Then hold 3 seats again, for the next three.
10. POST /holds/{id}/animals with only name, species and a new chip answers 201.
11. POST /holds/{id}/animals with rabies_on before microchipped_on answers 422 papers_blocked.
12. POST /holds/{id}/animals with the chip of one of our sandbox animals answers 409 chip_taken.
Our app must show our people what each answer means, not only make the call.

When all 12 are ticked, stop and tell me. A person at our rescue asks for the live key at https://adoptr.uk/rescue/api. Don't switch to live yourself.
