Vouchers
Each confirmed booking has a PDF voucher, emitted asynchronously and emailed to the customer.
GET /bookings/{code}/voucher
Streams the active PDF. Content-Type: application/pdf and Content-Disposition: attachment force a download. If the async emission is still queued, returns 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
Re-sends the confirmation email. If the first async emission failed, this generates the PDF synchronously and retries the upstream voucher call.
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" } }
Errors
| HTTP | Cause |
|---|---|
| 401 | Missing / invalid API key. |
| 404 | Booking not found, or voucher still queued. |