order

Book Phlebotomy Appointment

post/v3/order/{order_id}/psc/appointment/book

Request

  • Base URL
    https://api.us.junction.com
  • URL
    https://api.us.junction.com/v3/order/{order_id}/psc/appointment/book
  • Auth
    API key in header x-vital-api-key

Path parameters

order_idstring uuid required

Your Order ID.

Headers

x-idempotency-keystring nullable

[!] This feature (Idempotency Key) is under closed beta. Idempotency Key support for booking PSC appointment.

x-idempotency-error'no-cache' nullable

If no-cache, applies idempotency only to successful outcomes.

Request body

booking_keystring required
appointment_notesstring nullable
async_confirmationboolean

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.

sync_confirmation_timeout_millisecondinteger nullable

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.

async_confirmation_timeout_millisecondinteger nullable

Maximum 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.

Response

Successful Response

idstring uuid4 required
user_idstring uuid4 required
order_idstring uuid4 required
order_transaction_idstring uuid4 nullable
start_atstring date-time nullable required

Time is in UTC

end_atstring date-time nullable required

Time is in UTC

iana_timezonestring nullable
type'phlebotomy' | 'patient_service_center' required

ℹ️ This enum is non-exhaustive.

provider'getlabs' | 'phlebfinders' | 'quest' | 'sonora_quest' required

ℹ️ This enum is non-exhaustive.

status'confirmed' | 'pending' | 'reserved' | 'in_progress' | 'completed' | 'cancelled' required

ℹ️ This enum is non-exhaustive.

provider_idstring required
external_idstring nullable
can_rescheduleboolean required
appointment_notesstring nullable
event_status'pending' | 'reserved' | 'scheduled' | 'completed' | 'cancelled' | 'in_progress' required

ℹ️ This enum is non-exhaustive.

event_dataobject nullable

Example response

{
  "address": {
    "access_notes": "Gate code #1234, use side entrance",
    "city": "San Francisco",
    "country": "United States",
    "first_line": "123 Main St.",
    "second_line": "Apt. 208",
    "state": "CA",
    "zip_code": "91189"
  },
  "appointment_notes": "Please bring photo ID",
  "can_reschedule": true,
  "end_at": "2022-01-01T00:00:00",
  "event_data": {
    "description": "Metadata field containing provider specific data, like cancellation reason or origin"
  },
  "event_status": "scheduled",
  "events": [
    {
      "created_at": "2022-01-01T00:00:00Z",
      "status": "scheduled"
    },
    {
      "created_at": "2022-01-02T00:00:00Z",
      "status": "completed"
    }
  ],
  "external_id": "ext-123",
  "iana_timezone": "America/New_York",
  "id": "88103070-78da-4d14-a235-407121e1373a",
  "location": {
    "lat": 37.7749295,
    "lng": -122.4194155
  },
  "order_id": "c76f241f-1cb6-47be-a4ee-8ca765e2503e",
  "order_transaction_id": "e74d4472-62b7-4be1-8a55-6d0ff1841bd6",
  "provider": "getlabs",
  "provider_id": "123",
  "start_at": "2022-01-01T00:00:00",
  "status": "confirmed",
  "type": "phlebotomy",
  "user_id": "3039f3e1-7638-419e-bcd2-86695fc07784"
}

Changes

No recorded changes to this operation across all 201 revisions of this API.