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. PSC Appointment Availability uses the cache by default for providers that support it (Quest, Sonora Quest, and Labcorp). Junction serves cached availability when:- Every requested location has a cache entry.
- Each entry is less than 15 minutes old.
allow_stale to false to always request live availability from the provider.
Cached availability gives a faster response, but a displayed slot may have recently changed. Always handle slot conflicts when the patient books.
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: