curl --request POST \
--url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/psc/appointment/book' \
--header 'accept: application/json' \
--header 'x-vital-api-key: YOUR_API_KEY' \
--data '
{
"booking_key": "foo123"
}
'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.book_psc_appointment(
"<order_id>",
booking_key="<booking_key>",
)
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.bookPscAppointment({
orderId: "<order_id>",
body: {
bookingKey: "<booking_key>",
},
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.types.AppointmentBookingRequest;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().bookPscAppointment(
"<order_id>",
AppointmentBookingRequest.builder()
.bookingKey("<booking_key>")
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.LabTests.BookPscAppointment(context.TODO(), &junction.BookPscAppointmentLabTestsRequest{
OrderId: "<order_id>",
Body: &junction.AppointmentBookingRequest{
BookingKey: "<booking_key>",
},
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "413d7205-f8a9-42ed-aa4a-edb99e481ca0",
"user_id": "202b2c2f-fb4c-44dc-a4f8-621186fde227",
"address": {
"first_line": "West Lincoln Street",
"second_line": "",
"city": "Phoenix",
"state": "AZ",
"zip_code": "85004",
"unit": "14"
},
"location": {
"lng": -112.0772235,
"lat": 33.4421912
},
"start_at": "2023-05-15T16:00:00+00:00",
"end_at": "2023-05-15T18:00:00+00:00",
"iana_timezone": "America/Phoenix",
"type": "patient_service_center",
"provider": "quest",
"status": "pending",
"provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
"can_reschedule": true,
"external_id": "ABCDEF"
}
Book PSC Appointment
Create or submit order psc appointment book via the Junction API. Requires authentication with your team API key.
curl --request POST \
--url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/psc/appointment/book' \
--header 'accept: application/json' \
--header 'x-vital-api-key: YOUR_API_KEY' \
--data '
{
"booking_key": "foo123"
}
'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.book_psc_appointment(
"<order_id>",
booking_key="<booking_key>",
)
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.bookPscAppointment({
orderId: "<order_id>",
body: {
bookingKey: "<booking_key>",
},
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.types.AppointmentBookingRequest;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().bookPscAppointment(
"<order_id>",
AppointmentBookingRequest.builder()
.bookingKey("<booking_key>")
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.LabTests.BookPscAppointment(context.TODO(), &junction.BookPscAppointmentLabTestsRequest{
OrderId: "<order_id>",
Body: &junction.AppointmentBookingRequest{
BookingKey: "<booking_key>",
},
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "413d7205-f8a9-42ed-aa4a-edb99e481ca0",
"user_id": "202b2c2f-fb4c-44dc-a4f8-621186fde227",
"address": {
"first_line": "West Lincoln Street",
"second_line": "",
"city": "Phoenix",
"state": "AZ",
"zip_code": "85004",
"unit": "14"
},
"location": {
"lng": -112.0772235,
"lat": 33.4421912
},
"start_at": "2023-05-15T16:00:00+00:00",
"end_at": "2023-05-15T18:00:00+00:00",
"iana_timezone": "America/Phoenix",
"type": "patient_service_center",
"provider": "quest",
"status": "pending",
"provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
"can_reschedule": true,
"external_id": "ABCDEF"
}
idempotency_key and Async Confirmation features. These features are currently in closed beta. See PSC Appointment Scheduling for more info.curl --request POST \
--url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/psc/appointment/book' \
--header 'accept: application/json' \
--header 'x-vital-api-key: YOUR_API_KEY' \
--data '
{
"booking_key": "foo123"
}
'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.book_psc_appointment(
"<order_id>",
booking_key="<booking_key>",
)
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.bookPscAppointment({
orderId: "<order_id>",
body: {
bookingKey: "<booking_key>",
},
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.types.AppointmentBookingRequest;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().bookPscAppointment(
"<order_id>",
AppointmentBookingRequest.builder()
.bookingKey("<booking_key>")
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.LabTests.BookPscAppointment(context.TODO(), &junction.BookPscAppointmentLabTestsRequest{
OrderId: "<order_id>",
Body: &junction.AppointmentBookingRequest{
BookingKey: "<booking_key>",
},
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "413d7205-f8a9-42ed-aa4a-edb99e481ca0",
"user_id": "202b2c2f-fb4c-44dc-a4f8-621186fde227",
"address": {
"first_line": "West Lincoln Street",
"second_line": "",
"city": "Phoenix",
"state": "AZ",
"zip_code": "85004",
"unit": "14"
},
"location": {
"lng": -112.0772235,
"lat": 33.4421912
},
"start_at": "2023-05-15T16:00:00+00:00",
"end_at": "2023-05-15T18:00:00+00:00",
"iana_timezone": "America/Phoenix",
"type": "patient_service_center",
"provider": "quest",
"status": "pending",
"provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
"can_reschedule": true,
"external_id": "ABCDEF"
}
Authorizations
Vital Team API Key
Headers
[!] This feature (Idempotency Key) is under closed beta. Idempotency Key support for booking PSC appointment.
If no-cache, applies idempotency only to successful outcomes.
"no-cache"Path Parameters
Your Order ID.
Body
1000If true, the endpoint attempts to confirm the booking within the sync_confirmation_timeout_millisecond window. If confirmation is not received in time, a pending appointment is returned and booking continues asynchronously. If false (default), the endpoint waits for confirmation or returns a 500 error on failure.
Maximum time (in milliseconds) to wait for booking confirmation before returning a pending appointment. Only applies when async_confirmation is true. Defaults to 2500ms. Range: 1000-10000ms.
1000 <= x <= 10000Maximum time (in milliseconds) to attempt asynchronous booking before cancelling the pending appointment. Only applies when async_confirmation is true. Defaults to 15 minutes. Range: 60000-172800000ms.
60000 <= x <= 172800000Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Time is in UTC
Time is in UTC
ℹ️ This enum is non-exhaustive.
phlebotomy, patient_service_center ℹ️ This enum is non-exhaustive.
getlabs, phlebfinders, quest, sonora_quest ℹ️ This enum is non-exhaustive.
confirmed, pending, reserved, in_progress, completed, cancelled ℹ️ This enum is non-exhaustive.
pending, reserved, scheduled, completed, cancelled, in_progress Show child attributes
Show child attributes
^(?:(?:[A-Za-z_\-]+\/[A-Za-z_\-]+(?:\/[A-Za-z_\-]+)?)|(?:Etc\/[A-Za-z0-9+\-]+(?:\/[A-Za-z0-9]+)?|(?:CET|CST6CDT|EET|EST|EST5EDT|MET|MST|MST7MDT|PST8PDT|HST)))$1000Was this page helpful?