Skip to main content
Jinko emails your travelers at the key moments of a booking: payment, confirmation and e-tickets, cancellation, exchange and failure notices. Each of those moments is also a webhook event, and the event carries what the email shows. Use the events to send emails in your own brand, next to Jinko’s or, once Jinko has turned its emails off for your tenant, in place of them.

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.completed with two entries.
  • With Jinko’s emails on, Jinko sends its email first and then the event.
  • booking.partial is unchanged. Jinko sends no email at that moment, so it carries no customer_emails.
  • The four servicing.* events can fire more than once for a booking, so their event_id ends with a suffix that names the occurrence, for example evt_402_servicing.completed_si-5531. Treat event_id as 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.
The webhook form in the dashboard lists every event. With a legacy person-bound key, pass the event names in events on POST /v1/webhooks.

What an event carries

Each event keeps the six envelope fields and any data 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.
These payloads contain traveler data: names, email addresses, itineraries and ticket numbers. Jinko keeps the payload of each delivery for the delivery log and replay, and deletes it 30 days after the delivery’s last attempt or replay.

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_emails are 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.
Jinko sends a fallback email once. When any subscription received the event, Jinko sends nothing. A replay of the event after the fallback does not withdraw the email Jinko already sent. 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}/deliveries lists deliveries newest first. It takes limit (1 to 100, default 20), cursor (the next_cursor of the previous page), status and event_type. POST /v1/webhooks/{id}/deliveries/{delivery_id}/replay replays 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.