Before you start
- A webhook subscription for your tenant, in Dashboard → Webhooks. Webhooks covers registering an endpoint, verifying the signature, retries and idempotency. This page covers only what is specific to customer emails.
- Until this feature launches, it works only in the development environment: subscribe to the new events and read the delivery log on the development dashboard, dashboard.dev.gojinko.com/developers/webhooks. The Dashboard links on this page go to the production dashboard, where both appear at launch.
Events and the emails they carry
- One event can carry several emails: a booking with a flight and a hotel produces one
booking.completedwith two entries. - With Jinko’s emails on, Jinko sends its email first and then the event.
booking.partialis unchanged. Jinko sends no email at that moment, so it carries nocustomer_emails.- The four
servicing.*events can fire more than once for a booking, so theirevent_idends with a suffix that names the occurrence, for exampleevt_402_servicing.completed_si-5531. Treatevent_idas an opaque string. Retries of one occurrence reuse its id. - The Fallback column says whether Jinko still sends its own email when your endpoint did not receive the event: see When Jinko still sends its email.
events on POST /v1/webhooks.
What an event carries
Each event keeps the six envelope fields and anydata it already had (see Webhooks). Its data gains the manage-booking link and one customer_emails entry per email:
The example shows only some fields of each
content. The content shape of each template is a schema named after the template: for example FlightTicketingConfirmationEmailContent or HotelCancellationEmailContent. Until this feature launches, those schemas are only in the development API’s OpenAPI document, https://api.dev.gojinko.com/doc; at launch they join the API reference. A later version can add fields to content and entries to customer_emails, so ignore what you don’t use.
The three new servicing.* events also carry operation_kind (cancel, void, exchange or refund) and, when known for that operation, item, booking_ref and operation. servicing.completed keeps every field described in Webhooks. booking.failed keeps failure_reason and failure_message.
Ask Jinko to stop sending its emails
Jinko can turn its customer emails off for one of your tenants. Email dev@gojinko.com with the tenant id and the environment.- Per tenant and per environment. Your sandbox tenant and your production tenant are switched separately.
- All or nothing. With emails off, Jinko sends none of the emails in the table above for that tenant’s bookings, except as a fallback (next section).
- Which bookings. Bookings made with that tenant’s keys, including keys that name an end user. Bookings made with a legacy person-bound key keep Jinko’s emails.
- When. The change applies within about a minute, including to bookings already in progress.
- The events don’t change. Every event and its
customer_emailsare sent the same way with emails on or off.
When Jinko still sends its email
With emails off, Jinko still sends the email of an event marked yes in the Fallback column when none of the tenant’s subscriptions received that event:- No subscription lists the event: Jinko sends its email at once.
- Every delivery failed its last attempt (8 attempts over about 80 minutes): Jinko sends its email then.
- The outcome is still unknown 3 hours after the event: Jinko sends its email.
booking.processing has no fallback: with emails off, Jinko does not send the payment-authorized email.
Delivery log and replay
Every attempt to deliver an event is recorded.- Dashboard: Dashboard → Webhooks, then Deliveries on the webhook. Each delivery shows its status, attempts, last HTTP status, last error, timestamps and the payload as sent.
- API, with a legacy person-bound key:
GET /v1/webhooks/{id}/deliverieslists deliveries newest first. It takeslimit(1 to 100, default 20),cursor(thenext_cursorof the previous page),statusandevent_type.POST /v1/webhooks/{id}/deliveries/{delivery_id}/replayreplays one.
A replay sends the same event again: same
event_id, same payload, signed with a new X-Jinko-Timestamp. It starts a fresh set of attempts and adds one to the delivery’s replay_count. Replay is accepted for a delivered or exhausted delivery. It is refused with delivery_in_progress while the delivery is pending or failed, and with payload_purged once its payload has been deleted, 30 days after the delivery’s last attempt or replay.
Because a replay keeps the event_id, a receiver that deduplicates on X-Jinko-Event-Id treats it as the event it already processed, if it did.