curl --request POST \
--url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/phlebotomy/appointment/book' \
--header 'accept: application/json' \
--header 'x-vital-api-key: YOUR_API_KEY' \
--data '
{
"booking_key": "foo123",
"appointment_notes": "Please bring photo ID"
}
'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.book_phlebotomy_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.bookPhlebotomyAppointment({
orderId: "<order_id>",
body: {
bookingKey: "<booking_key>",
},
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.labtests.requests.BookPhlebotomyAppointmentLabTestsRequest;
import com.junction.api.types.AppointmentBookingRequest;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().bookPhlebotomyAppointment(
"<order_id>",
BookPhlebotomyAppointmentLabTestsRequest.builder()
.body(
AppointmentBookingRequest.builder()
.bookingKey("<booking_key>")
.build()
)
.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.BookPhlebotomyAppointment(context.TODO(), &junction.BookPhlebotomyAppointmentLabTestsRequest{
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",
"access_notes": "Gate code #1234, use side entrance"
},
"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": "phlebotomy",
"provider": "getlabs",
"status": "pending",
"provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
"can_reschedule":true,
"appointment_notes": "Please bring photo ID"
}
Mobile Phlebotomy
Create Appointment Book
Create or submit order phlebotomy appointment book via the Junction API. Requires authentication with your team API key.
POST
/
v3
/
order
/
{order_id}
/
phlebotomy
/
appointment
/
book
curl --request POST \
--url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/phlebotomy/appointment/book' \
--header 'accept: application/json' \
--header 'x-vital-api-key: YOUR_API_KEY' \
--data '
{
"booking_key": "foo123",
"appointment_notes": "Please bring photo ID"
}
'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.book_phlebotomy_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.bookPhlebotomyAppointment({
orderId: "<order_id>",
body: {
bookingKey: "<booking_key>",
},
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.labtests.requests.BookPhlebotomyAppointmentLabTestsRequest;
import com.junction.api.types.AppointmentBookingRequest;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().bookPhlebotomyAppointment(
"<order_id>",
BookPhlebotomyAppointmentLabTestsRequest.builder()
.body(
AppointmentBookingRequest.builder()
.bookingKey("<booking_key>")
.build()
)
.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.BookPhlebotomyAppointment(context.TODO(), &junction.BookPhlebotomyAppointmentLabTestsRequest{
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",
"access_notes": "Gate code #1234, use side entrance"
},
"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": "phlebotomy",
"provider": "getlabs",
"status": "pending",
"provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
"can_reschedule":true,
"appointment_notes": "Please bring photo ID"
}
curl --request POST \
--url '{{BASE_URL}}/v3/order/413d7205-f8a9-42ed-aa4a-edb99e481ca0/phlebotomy/appointment/book' \
--header 'accept: application/json' \
--header 'x-vital-api-key: YOUR_API_KEY' \
--data '
{
"booking_key": "foo123",
"appointment_notes": "Please bring photo ID"
}
'
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.book_phlebotomy_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.bookPhlebotomyAppointment({
orderId: "<order_id>",
body: {
bookingKey: "<booking_key>",
},
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.labtests.requests.BookPhlebotomyAppointmentLabTestsRequest;
import com.junction.api.types.AppointmentBookingRequest;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().bookPhlebotomyAppointment(
"<order_id>",
BookPhlebotomyAppointmentLabTestsRequest.builder()
.body(
AppointmentBookingRequest.builder()
.bookingKey("<booking_key>")
.build()
)
.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.BookPhlebotomyAppointment(context.TODO(), &junction.BookPhlebotomyAppointmentLabTestsRequest{
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",
"access_notes": "Gate code #1234, use side entrance"
},
"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": "phlebotomy",
"provider": "getlabs",
"status": "pending",
"provider_id": "e89eb489-7382-4966-bb14-7ab4763eba6c",
"can_reschedule":true,
"appointment_notes": "Please bring photo ID"
}
Body
application/json
If 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.
Response
Successful Response
Was this page helpful?