Integration API

Build blood-collection bookings into your product.

The Lola Dispatch Integration API is a B2B REST surface for creating bookings across both fulfillment channels — mobile phlebotomy at the patient's address, and in-venue collection at a partner site. Hosted patient checkout, webhook-driven lifecycle events, and lab-handoff metadata ship in the same envelope.

What you can build

Every Lola Health booking — the first integrator on this surface — flows through the same service these endpoints call. The path you hit is the path Lola hits internally.

  • Create bookings programmatically

    POST /api/integration/v1/bookings mints a confirmed Job with your external correlation ids echoed back on every webhook.

  • Hosted patient checkout via short-lived JWT

    POST /api/integration/v1/booking-url returns a single-use, 24-hour token that drops your patient onto book.loladispatch.com to complete the flow themselves.

  • In-venue venue and slot discovery

    GET /api/integration/v1/venues + /venues/{id}/availability surface the venue network and bookable slots for the IN_VENUE channel.

  • Event-driven, signed webhooks

    job.created, job.confirmed, job.rescheduled, job.cancelled, dispatch.assigned, and sample.registered ship Standard Webhooks signatures with your externalOrderId echoed on every payload.

Mint a hosted-booking URL

The shortest path to a working integration: trade an API key for a single-use JWT that hands your patient off to a Lola-hosted booking page. Full setup lives in Getting Started.

curlPOST /api/integration/v1/booking-url
curl -X POST https://app.loladispatch.com/api/integration/v1/booking-url \
  -H "X-API-Key: pj_live_..." \
  -H "X-API-Version: 1" \
  -H "Content-Type: application/json" \
  -d '{
    "scope": { "kind": "all-mobile" },
    "externalUserId": "your-internal-user-id",
    "externalOrderId": "your-order-id"
  }'

Know who fulfilled a booking

Most draws are performed by a Lola phlebotomist or by venue staff; at times we fulfil through a vetted external collection partner. If fulfiller visibility is enabled on your account, every booking carries an optional fulfillment object — on GET /api/integration/v1/bookings, on GET /api/integration/v1/bookings/{id}, and on the job payload of every webhook event.

booking (excerpt)
{
  "id": "job_...",
  "status": "COMPLETED",
  "fulfillment": {
    "type": "PARTNER",
    "partner": { "id": "ptr_...", "name": "Bloods & Beyond" }
  }
}
  • type is INTERNAL or PARTNER. A draw by venue staff is INTERNAL — the venue is already named by fulfillmentChannel and the venue block.
  • partner carries the partner id and name, and is null for INTERNAL.
  • The whole key is absent — not null — when fulfiller visibility is off for your account. Ask your account manager to enable it.
  • Booking status is unaffected: a partner-fulfilled booking moves through the same statuses and emits the same events as an internally-fulfilled one.

TypeScript SDK

We publish generated TypeScript types for the v1 surface, derived directly from the OpenAPI 3.1 spec. Drop them into your project for typed request and response bodies — no runtime dependency, just declarations.

v1.d.ts

Regenerated whenever the spec changes — a CI gate keeps it in sync.

Download types →

Documentation

Four pages cover the surface end-to-end. Start with the quickstart if you are integrating from scratch.

Request API access

API keys are issued by Lola staff after a short intake. Tell us your use case, expected volume, and which channels (mobile, in-venue, or hosted patient) you need enabled — we will reply with next steps.

Email the team