GreenFlow docs

Vouchers

Cada reserva confirmada tiene un voucher PDF, emitido de forma asincrónica y mandado al cliente por email.

GET /bookings/{code}/voucher

Stream del PDF activo. Content-Type: application/pdf y Content-Disposition: attachment fuerzan la descarga. Si la emisión asincrónica sigue encolada, devuelve 404.

bash
curl -s "https://greenflow.live/api/v1/bookings/BR-1234567/voucher" \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP" \
  -o voucher.pdf

POST /bookings/{code}/voucher/resend

Reenvía el mail de confirmación. Si la primera emisión asincrónica falló, genera el PDF de forma sincrónica y reintenta el voucher contra el proveedor.

bash
curl -X POST "https://greenflow.live/api/v1/bookings/BR-1234567/voucher/resend" \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP"
json
{ "data": { "voucher_number": "GFC042389XY", "emailed_at": "2026-05-15T10:12:03+00:00" } }

Errores

HTTPCausa
401Missing / invalid API key.
404Booking not found, or voucher still queued.