sandbox

Sandbox: book an offer — simulated, free, production responses and timings

Identical request and responses to POST /flights/book, for an offer from a sandbox search. Nothing is held and nothing is bought: the booking is simulated, walking production's states on production's clock (4–11 minutes), pausing on the same questions and ending the same ways. Every response carries sandbox: true.

The optional sandbox block picks what happens. scenario: success (default), price_change, extra, seller_failed, needs_attention, payment_declined, payment_method_required, temporarily_unavailable. speed: realistic (default) or fast (about a minute, for CI). want_seat: true adds a seat map question. Production ignores the sandbox block, so it is safe to leave in.

post/sandbox/flights/book

Request

  • Base URL: https://letsfg.co/developers/api/v1
  • URL: https://letsfg.co/developers/api/v1/sandbox/flights/book
  • Auth: API key in header X-API-Key

Request body

search_idstring required

search_id from the search response. An offer is bookable only inside its own search.

offer_idstring required

id of one offer from that search

contact_emailstring email

Where the confirmation goes. Defaults to the lead passenger's email.

idempotency_keystring

Retrying with the same key returns the same booking instead of opening a second hold.

want_seatboolean

Pause at the airline's seat map and ask.

Example request

{
  "passengers": [
    {
      "phone_number": "+48501234567"
    }
  ]
}

Response

Simulated hold placed.

okboolean
booking_idstring
statestring
dispatchedboolean
heldobject

What is HELD on the connected method — not taken.

chargednumber

Always 0 here. Capture happens only against a real PNR.

offerobject
poll_urlstring uri
messagestring

Example response

{
  "state": "authorised"
}

Changes

No recorded changes to this operation across all 1 revision of this API.