Interested in this feature? Get in touch with your Customer Success Manager.
Cached availability
Junction maintains an availability cache containing the next 21 days of availability for supported locations. Each location is refreshed every five minutes on average. Setallow_stale on the PSC Appointment Availability request to use the cache when:
- Every requested location has a cache entry.
- Each entry is less than 15 minutes old.
Idempotent booking
Provide anX-Idempotency-Key header when calling Book PSC Appointment. Requests with the same key within the 14-day retention window return the response saved for the original request.
Use an idempotency key when retrying after a connection error or timeout. The original request may have reached Junction even when your system did not receive its response.
The saved response does not change when the appointment changes later. If the original response contains a
pending appointment that later becomes confirmed, a retry with the same key still returns the original pending response. Retrieve the appointment or process its webhooks to obtain the current state.Asynchronous confirmation
By default, booking returns an error when the PSC appointment provider does not acknowledge the request within the synchronous request window. With asynchronous confirmation enabled, Junction waits forsync_confirmation_timeout_millisecond and then:
- Returns a
reservedorconfirmedappointment if the provider responds in time. - Creates and returns a
pendingappointment if the provider has not responded.
async_confirmation_timeout_millisecond elapses. The appointment then transitions to confirmed or cancelled, depending on the provider response.
Subscribe to labtest.appointment.updated to receive these transitions. Do not present a pending appointment to the patient as confirmed.
The supported configuration ranges are: