Developers
Contents
On this page

Resources

Visits

One person's place in a line, from joining to done.

A visit is one person on one line: they join (or are booked), wait, are called to a desk, are served and leave. Every visit has a token, the number on their screen and the board. Services on more than one line make one visit on each, sharing a journeyId.

Fields#

A visit
FieldTypeNotes
idrequiredstring
journeyIdrequiredstring
tokenrequiredstring
lineIdrequiredstring
statusrequiredenumOne of "booked", "queued", "called", "in_progress", "completed", "cancelled", "no_show"
bookingTyperequiredenumOne of "walk_in", "appointment", "scheduled_walk_in"
priorityrequiredboolean
noterequiredstring | null
customerrequiredobject
customer.namerequiredstring | null
customer.phonerequiredstring | null
servicesrequiredarray of object
services[].idrequiredstring
services[].namerequiredstring
deskIdrequiredstring | null
positionrequiredinteger | null
slotAtrequiredstring (date-time) | null
createdAtrequiredstring (date-time)
calledAtrequiredstring (date-time) | null
startedAtrequiredstring (date-time) | null
endedAtrequiredstring (date-time) | null
updatedAtrequiredstring (date-time)
  • customer is who the visit is for, as the desk or the customer wrote it. Either field may be null: a desk can add somebody with no name or number at all. This is personal data; keep it as carefully as the business does.
  • position is the person's place among those waiting, 1 being next, while the visit is queued. It is null in every other status.
  • priority is true for an urgent visit, which is called before anyone who is not.
  • bookingType is how they came: walk_in, a booked appointment, or a scheduled_walk_in. slotAt is a booking's time, and null for a walk-in.
  • calledAt, startedAt and endedAt fill in as the visit moves along. updatedAt moves on every change — the field to sync by.
A visit's status
statusMeans
booked Has a slot later; not checked in yet.
queued Waiting in the line. position says where.
called Called to a desk — deskId — and on their way.
in_progress Being served at that desk.
completed Served. The end of a good visit.
cancelled Taken out of the line, by the customer, the desk, or the day closing.
no_show Called, or booked, and never came.

Endpoints#

Visit endpoints
EndpointScopeDoes
GET /visits read Visits, newest first, by cursor — filtered by status, line, day or change.
POST /visits visits:write Add a walk-in on a line or for services; honours Idempotency-Key.
GET /visits/{visitId} read One visit, with its customer, services, desk and times.
PATCH /visits/{visitId} visits:write Change a visit's urgency or its note.
POST /visits/{visitId}/transitions desks:operate Move a visit along one edge: call, serve, complete, no-show, cancel, put back.
POST /visits/{visitId}/urgent visits:write Mark a waiting visit urgent — above everyone, and the desk alerted.

Adding a visit#

  • POST /v1/visits adds a walk-in, now. Give either a lineId or the serviceIds they came for — exactly one of the two. Bookings for a later slot are made by customers on the business's own page, or by the desk.
  • customer.phone takes any number with its country code, or an Indian number without one, and is answered in E.164 (+91…).
  • consent says the customer agreed to be sent updates about their visit. Send it only when they did.
  • reference is your own number for them — a file number, a vehicle — kept with the visit for the business's staff. The API does not answer it back, so keep your own record of which visit id is which of yours.
  • The answer is a list: one visit for a line, one per line for services on several lines, in order of line id.
  • It adds the visit even if the same phone is already waiting — there is nobody at an API to ask "are you sure?". Send an Idempotency-Key so a retry does not add a second.
  • When the business cannot take the visit just then, the answer is the refusal the front desk would see, with a message saying why.

Changing a visit#

PATCH /v1/visits/{visitId} changes note (up to 140 characters, or null to clear it) and priority. POST /v1/visits/{visitId}/urgent makes a waiting visit urgent and also alerts the desk, as the staff app's Urgent does — use it when a person should notice.

Moving a visit along#

POST /v1/visits/{visitId}/transitions takes one step, named by to. Only these steps exist; any other is a 409 INVALID_TRANSITION, and so is a step from a status the visit has already left — usually because somebody at a desk got there first.

Every step a visit can take
FromtoNeedsMeans
booked queued visits:write Check in: they have arrived for their booking
booked cancelled visits:write Cancel the booking
booked no_show desks:operate They never came for their slot
queued called desks:operate Call them to the desk in deskId
queued cancelled visits:write Take them out of the line
called in_progress desks:operate They arrived: start serving
called no_show desks:operate They did not come
called cancelled visits:write Take them out of the line
called queued visits:write Put them back to wait — not ready yet
in_progress completed desks:operate Done
in_progress cancelled visits:write Stopped part-way
cancelled queued visits:write Put back in the line
no_show queued visits:write They turned up after all: put back in the line
  • to: "called" needs a deskId: the desk calling. The desk must be on shift, holding nobody, and call from the visit's line — it is the staff app's "Call to…". To call whoever is next instead, use Call next.
  • Any other step may name a deskId; if it does, it must be the desk the visit is at, or the answer is a 409. That catches completing the right token at the wrong desk.
  • Nothing returns to booked, and nothing leaves completed.
  • Line Me Up also moves visits by itself — a called person who never comes becomes a no-show, a booking nobody checks in for is missed, and the day's close cancels whoever is still waiting. Each of those sends the same visit.status_changed webhook.

Examples#

List today's visits on one line#

Request

curl

curl "https://business.linemeup.in/api/v1/visits?lineId=line-0193f2a1-7c4e-7a10-9b2e-000000000001&from=2026-10-30&to=2026-10-30&limit=2" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY"

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits?lineId=line-0193f2a1-7c4e-7a10-9b2e-000000000001&from=2026-10-30&to=2026-10-30&limit=2", {
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.get(
    "https://business.linemeup.in/api/v1/visits?lineId=line-0193f2a1-7c4e-7a10-9b2e-000000000001&from=2026-10-30&to=2026-10-30&limit=2",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits?lineId=line-0193f2a1-7c4e-7a10-9b2e-000000000001&from=2026-10-30&to=2026-10-30&limit=2");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "data": [
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "token": "GEN-20261030-014",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "status": "queued",
      "bookingType": "walk_in",
      "priority": false,
      "note": "First visit",
      "customer": {
        "name": "Asha Rao",
        "phone": "+919000000001"
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
          "name": "General consultation"
        }
      ],
      "deskId": null,
      "position": 3,
      "slotAt": null,
      "createdAt": "2026-10-30T04:12:00.000Z",
      "calledAt": null,
      "startedAt": null,
      "endedAt": null,
      "updatedAt": "2026-10-30T04:12:00.000Z"
    },
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000004",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000004",
      "token": "GEN-20261030-009",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "status": "completed",
      "bookingType": "walk_in",
      "priority": false,
      "note": null,
      "customer": {
        "name": null,
        "phone": null
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
          "name": "General consultation"
        }
      ],
      "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "position": null,
      "slotAt": null,
      "createdAt": "2026-10-30T03:40:00.000Z",
      "calledAt": "2026-10-30T03:58:00.000Z",
      "startedAt": "2026-10-30T03:59:00.000Z",
      "endedAt": "2026-10-30T04:10:00.000Z",
      "updatedAt": "2026-10-30T04:10:00.000Z"
    }
  ],
  "nextCursor": "MjAyNi0xMC0yNVQwNDoxMDowMC4wMDAwMDBafGpvYi0wMDA0"
}

Read the next page#

Request

curl

curl "https://business.linemeup.in/api/v1/visits?cursor=MjAyNi0xMC0yNVQwNDoxMDowMC4wMDAwMDBafGpvYi0wMDA0&limit=2" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY"

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits?cursor=MjAyNi0xMC0yNVQwNDoxMDowMC4wMDAwMDBafGpvYi0wMDA0&limit=2", {
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.get(
    "https://business.linemeup.in/api/v1/visits?cursor=MjAyNi0xMC0yNVQwNDoxMDowMC4wMDAwMDBafGpvYi0wMDA0&limit=2",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits?cursor=MjAyNi0xMC0yNVQwNDoxMDowMC4wMDAwMDBafGpvYi0wMDA0&limit=2");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "data": [],
  "nextCursor": null
}

Everything that changed since your last sync#

Request

curl

curl "https://business.linemeup.in/api/v1/visits?updatedSince=2026-10-30T04%3A00%3A00.000Z&limit=100" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY"

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits?updatedSince=2026-10-30T04%3A00%3A00.000Z&limit=100", {
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.get(
    "https://business.linemeup.in/api/v1/visits?updatedSince=2026-10-30T04%3A00%3A00.000Z&limit=100",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits?updatedSince=2026-10-30T04%3A00%3A00.000Z&limit=100");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "data": [
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "token": "GEN-20261030-014",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "status": "completed",
      "bookingType": "walk_in",
      "priority": false,
      "note": "First visit",
      "customer": {
        "name": "Asha Rao",
        "phone": "+919000000001"
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
          "name": "General consultation"
        }
      ],
      "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "position": null,
      "slotAt": null,
      "createdAt": "2026-10-30T04:12:00.000Z",
      "calledAt": "2026-10-30T04:31:00.000Z",
      "startedAt": "2026-10-30T04:32:00.000Z",
      "endedAt": "2026-10-30T04:47:00.000Z",
      "updatedAt": "2026-10-30T04:47:00.000Z"
    },
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000004",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000004",
      "token": "GEN-20261030-009",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "status": "completed",
      "bookingType": "walk_in",
      "priority": false,
      "note": null,
      "customer": {
        "name": null,
        "phone": null
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
          "name": "General consultation"
        }
      ],
      "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "position": null,
      "slotAt": null,
      "createdAt": "2026-10-30T03:40:00.000Z",
      "calledAt": "2026-10-30T03:58:00.000Z",
      "startedAt": "2026-10-30T03:59:00.000Z",
      "endedAt": "2026-10-30T04:10:00.000Z",
      "updatedAt": "2026-10-30T04:10:00.000Z"
    }
  ],
  "nextCursor": null
}

Read one visit#

Request

curl

curl "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY"

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001", {
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.get(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
    ],
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "queued",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": null,
  "position": 3,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": null,
  "startedAt": null,
  "endedAt": null,
  "updatedAt": "2026-10-30T04:12:00.000Z"
}

Add a walk-in on a line#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Idempotency-Key: crm-visit-1042" \
  -H "Content-Type: application/json" \
  -d '{"lineId":"line-0193f2a1-7c4e-7a10-9b2e-000000000001","customer":{"name":"Asha Rao","phone":"+919000000001"},"note":"First visit","reference":"CRM-1042","consent":true}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Idempotency-Key": "crm-visit-1042",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
    "customer": {
      "name": "Asha Rao",
      "phone": "+919000000001"
    },
    "note": "First visit",
    "reference": "CRM-1042",
    "consent": true
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
        "Idempotency-Key": "crm-visit-1042",
    },
    json={
        "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
        "customer": {
            "name": "Asha Rao",
            "phone": "+919000000001",
        },
        "note": "First visit",
        "reference": "CRM-1042",
        "consent": True,
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Idempotency-Key: crm-visit-1042",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "lineId" => 'line-0193f2a1-7c4e-7a10-9b2e-000000000001',
        "customer" => [
            "name" => 'Asha Rao',
            "phone" => '+919000000001',
        ],
        "note" => 'First visit',
        "reference" => 'CRM-1042',
        "consent" => true,
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "data": [
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "token": "GEN-20261030-014",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "status": "queued",
      "bookingType": "walk_in",
      "priority": false,
      "note": "First visit",
      "customer": {
        "name": "Asha Rao",
        "phone": "+919000000001"
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
          "name": "General consultation"
        }
      ],
      "deskId": null,
      "position": 3,
      "slotAt": null,
      "createdAt": "2026-10-30T04:12:00.000Z",
      "calledAt": null,
      "startedAt": null,
      "endedAt": null,
      "updatedAt": "2026-10-30T04:12:00.000Z"
    }
  ]
}

Add a walk-in for services on two lines#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Idempotency-Key: crm-visit-1043" \
  -H "Content-Type: application/json" \
  -d '{"serviceIds":["svc-0193f2a1-7c4e-7a10-9b2e-000000000002","svc-0193f2a1-7c4e-7a10-9b2e-000000000003"],"customer":{"name":"Asha Rao","phone":"+919000000001"},"note":"First visit"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Idempotency-Key": "crm-visit-1043",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "serviceIds": [
      "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "svc-0193f2a1-7c4e-7a10-9b2e-000000000003"
    ],
    "customer": {
      "name": "Asha Rao",
      "phone": "+919000000001"
    },
    "note": "First visit"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
        "Idempotency-Key": "crm-visit-1043",
    },
    json={
        "serviceIds": [
            "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
            "svc-0193f2a1-7c4e-7a10-9b2e-000000000003",
        ],
        "customer": {
            "name": "Asha Rao",
            "phone": "+919000000001",
        },
        "note": "First visit",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Idempotency-Key: crm-visit-1043",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "serviceIds" => [
            'svc-0193f2a1-7c4e-7a10-9b2e-000000000002',
            'svc-0193f2a1-7c4e-7a10-9b2e-000000000003',
        ],
        "customer" => [
            "name" => 'Asha Rao',
            "phone" => '+919000000001',
        ],
        "note" => 'First visit',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "data": [
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "token": "GEN-20261030-014",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "status": "queued",
      "bookingType": "walk_in",
      "priority": false,
      "note": "First visit",
      "customer": {
        "name": "Asha Rao",
        "phone": "+919000000001"
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
          "name": "General consultation"
        }
      ],
      "deskId": null,
      "position": 3,
      "slotAt": null,
      "createdAt": "2026-10-30T04:12:00.000Z",
      "calledAt": null,
      "startedAt": null,
      "endedAt": null,
      "updatedAt": "2026-10-30T04:12:00.000Z"
    },
    {
      "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
      "token": "XR-20261030-006",
      "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "status": "queued",
      "bookingType": "walk_in",
      "priority": false,
      "note": "First visit",
      "customer": {
        "name": "Asha Rao",
        "phone": "+919000000001"
      },
      "services": [
        {
          "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000003",
          "name": "Chest X-ray"
        }
      ],
      "deskId": null,
      "position": 2,
      "slotAt": null,
      "createdAt": "2026-10-30T04:12:00.000Z",
      "calledAt": null,
      "startedAt": null,
      "endedAt": null,
      "updatedAt": "2026-10-30T04:12:00.000Z"
    }
  ]
}

Change a visit's note#

Request

curl

curl -X PATCH "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"note":"Needs a wheelchair at the door"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "note": "Needs a wheelchair at the door"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.patch(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "note": "Needs a wheelchair at the door",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "PATCH",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "note" => 'Needs a wheelchair at the door',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "queued",
  "bookingType": "walk_in",
  "priority": false,
  "note": "Needs a wheelchair at the door",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": null,
  "position": 3,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": null,
  "startedAt": null,
  "endedAt": null,
  "updatedAt": "2026-10-30T04:16:00.000Z"
}

Mark a visit urgent#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/urgent" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/urgent", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/urgent",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={},
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/urgent");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode(new stdClass()),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "queued",
  "bookingType": "walk_in",
  "priority": true,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": null,
  "position": 1,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": null,
  "startedAt": null,
  "endedAt": null,
  "updatedAt": "2026-10-30T04:15:00.000Z"
}

Call a visit to a desk#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"called","deskId":"sta-0193f2a1-7c4e-7a10-9b2e-000000000001"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "called",
    "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "to": "called",
        "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => 'called',
        "deskId" => 'sta-0193f2a1-7c4e-7a10-9b2e-000000000001',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "called",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "position": null,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": "2026-10-30T04:31:00.000Z",
  "startedAt": null,
  "endedAt": null,
  "updatedAt": "2026-10-30T04:31:00.000Z"
}

Start serving#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"in_progress"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "in_progress"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "to": "in_progress",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => 'in_progress',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "in_progress",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "position": null,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": "2026-10-30T04:31:00.000Z",
  "startedAt": "2026-10-30T04:32:00.000Z",
  "endedAt": null,
  "updatedAt": "2026-10-30T04:32:00.000Z"
}

Complete#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"completed"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "completed"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "to": "completed",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => 'completed',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "completed",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "position": null,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": "2026-10-30T04:31:00.000Z",
  "startedAt": "2026-10-30T04:32:00.000Z",
  "endedAt": "2026-10-30T04:47:00.000Z",
  "updatedAt": "2026-10-30T04:47:00.000Z"
}

Mark a no-show#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"no_show"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "no_show"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "to": "no_show",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => 'no_show',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "no_show",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": "sta-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "position": null,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": "2026-10-30T04:31:00.000Z",
  "startedAt": null,
  "endedAt": "2026-10-30T04:37:00.000Z",
  "updatedAt": "2026-10-30T04:37:00.000Z"
}

Put back in the line#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"queued"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "queued"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "to": "queued",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => 'queued',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "queued",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": null,
  "position": 5,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": null,
  "startedAt": null,
  "endedAt": null,
  "updatedAt": "2026-10-30T04:40:00.000Z"
}

Cancel#

Request

curl

curl -X POST "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":"cancelled"}'

Node

const res = await fetch("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "to": "cancelled"
  }),
});
if (!res.ok) throw new Error(`Line Me Up answered ${res.status}`);
const answer = await res.json();

Python

import os
import requests

res = requests.post(
    "https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions",
    headers={
        "Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
    },
    json={
        "to": "cancelled",
    },
    timeout=10,
)
res.raise_for_status()
answer = res.json()

PHP

<?php
$ch = curl_init("https://business.linemeup.in/api/v1/visits/job-0193f2a1-7c4e-7a10-9b2e-000000000001/transitions");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "to" => 'cancelled',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true);
Response (200)
{
  "id": "job-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "journeyId": "jny-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "token": "GEN-20261030-014",
  "lineId": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "status": "cancelled",
  "bookingType": "walk_in",
  "priority": false,
  "note": "First visit",
  "customer": {
    "name": "Asha Rao",
    "phone": "+919000000001"
  },
  "services": [
    {
      "id": "svc-0193f2a1-7c4e-7a10-9b2e-000000000002",
      "name": "General consultation"
    }
  ],
  "deskId": null,
  "position": null,
  "slotAt": null,
  "createdAt": "2026-10-30T04:12:00.000Z",
  "calledAt": null,
  "startedAt": null,
  "endedAt": "2026-10-30T04:20:00.000Z",
  "updatedAt": "2026-10-30T04:20:00.000Z"
}

Recipes#

Keep another system in step#

Subscribe to visit.created, visit.status_changed and visit.updated, and keep each visit you receive only if its updatedAt is newer than the copy you have — events can arrive out of order. Once a night, read GET /v1/visits with updatedSince to pick up anything that was missed. The CRM guide does exactly this.

Group a person's whole visit#

Someone who came for a consultation and an X-ray has two visits, on two lines, with one journeyId. Group by it to see their day as one:

Visits grouped by journey

Node

// Everyone's whole visit today, grouped: one journey, one row per line.
const { today } = await get("/business");
const journeys = new Map();
let cursor = null;
do {
  const query = new URLSearchParams({ from: today, to: today, limit: "100" });
  if (cursor) query.set("cursor", cursor);
  const page = await get(`/visits?${query}`);
  for (const visit of page.data) {
    const steps = journeys.get(visit.journeyId) ?? [];
    journeys.set(visit.journeyId, [...steps, visit]);
  }
  cursor = page.nextCursor;
} while (cursor);

Python

from collections import defaultdict

today = get("/business")["today"]
journeys = defaultdict(list)
cursor = None
while True:
    params = {"from": today, "to": today, "limit": 100}
    if cursor:
        params["cursor"] = cursor
    page = get("/visits", params)
    for visit in page["data"]:
        journeys[visit["journeyId"]].append(visit)
    cursor = page["nextCursor"]
    if not cursor:
        break

PHP

<?php
$today = get('/business')['today'];
$journeys = [];
$cursor = null;
do {
    $query = ['from' => $today, 'to' => $today, 'limit' => 100];
    if ($cursor !== null) {
        $query['cursor'] = $cursor;
    }
    $page = get('/visits?' . http_build_query($query));
    foreach ($page['data'] as $visit) {
        $journeys[$visit['journeyId']][] = $visit;
    }
    $cursor = $page['nextCursor'];
} while ($cursor !== null);

Find who is with a desk#

GET /v1/visits?status=called,in_progress with today's from and to lists everyone at a desk now; each has its deskId.