Resources
Lines
The queues people wait in.
A line is one queue: General, X-ray, Vaccinations. People join a line, desks call from one or more lines, and every visit is on exactly one. A key limited to some lines sees only those and cannot make new ones.
Fields#
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
namerequired | string | |
coderequired | string | |
typerequired | enum | One of "walk_in", "appointment", "scheduled_walk_in" |
pausedrequired | boolean | |
waitingrequired | integer | |
avgServiceMinutesrequired | integer | |
maxCapacityrequired | integer | |
descriptionrequired | string | null | |
locationrequired | string | null | |
callGraceMinutesrequired | integer | |
appointmentGraceBeforeMinutesrequired | integer | |
maxLateArrivalMinutesrequired | integer | |
autoNoShowEnabledrequired | boolean |
code starts every token on the line — GEN in the token a customer sees.
waiting counts people in the line now, not yet called. paused
means nobody new may join until it is resumed; people already waiting stay and are still called.
type | The staff app says | Means |
|---|---|---|
walk_in | Walk-in | People join now and wait their turn. |
appointment | Bookings only | Only people with a booked slot; nobody walks in. |
scheduled_walk_in | Walk-in + booking | Both: bookings at their slot, walk-ins in between. |
| Field | Means |
|---|---|
avgServiceMinutes | The usual time one person takes, 1 to 720 minutes (12 hours). Waits are estimated from it. |
maxCapacity | The most people who may be waiting at once, 1 to 9,999. Past it, nobody new can join. |
callGraceMinutes | How long a called person has to reach the desk, 0 to 120 minutes. |
autoNoShowEnabled | Whether a called person who does not come within that grace is marked a no-show by itself. |
appointmentGraceBeforeMinutes | How early before their slot a booked person may check in, 0 to 240 minutes. |
maxLateArrivalMinutes | How late after their slot a booked person may still check in, 0 to 240 minutes. |
Endpoints#
| Endpoint | Scope | Does |
|---|---|---|
GET /lines | read | Every line this key may see, with how many are waiting on each. |
PUT /lines | lines:manage | Make a line, every setting said; refused to a key limited to some lines. |
GET /lines/{lineId} | read | One line and its settings; 404 for a line this key may not see. |
PUT /lines/{lineId} | lines:manage | Replace a line's settings, every one said. |
POST /lines/{lineId}/pause | lines:manage | Pause a line: nobody new joins it until it is resumed. |
POST /lines/{lineId}/resume | lines:manage | Resume a paused line. |
-
PUT /v1/linesmakes a line, andPUT /v1/lines/{lineId}replaces one: both take every setting. Leave outcodeand a new line gets one made from its name, and an existing line keeps its own. - Replacing changes only what the API knows about. Who on the team looks after the line, and the process a visit follows on it, stay as the owner set them.
- Pausing a paused line, or resuming a running one, changes nothing and answers the line as it is — and sends no second webhook.
- Lines are removed in the staff app, not through the API.
Examples#
List your lines#
curl
curl "https://business.linemeup.in/api/v1/lines" \
-H "Authorization: Bearer $LINEMEUP_API_KEY" Node
const res = await fetch("https://business.linemeup.in/api/v1/lines", {
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/lines",
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/lines");
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); {
"data": [
{
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
"name": "General",
"code": "GEN",
"type": "walk_in",
"paused": false,
"waiting": 4,
"avgServiceMinutes": 10,
"maxCapacity": 60,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": true
},
{
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000002",
"name": "X-ray",
"code": "XR",
"type": "scheduled_walk_in",
"paused": false,
"waiting": 1,
"avgServiceMinutes": 15,
"maxCapacity": 30,
"description": null,
"location": "First floor, room 4",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 10,
"autoNoShowEnabled": true
}
]
} Read one line#
curl
curl "https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001" \
-H "Authorization: Bearer $LINEMEUP_API_KEY" Node
const res = await fetch("https://business.linemeup.in/api/v1/lines/line-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/lines/line-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/lines/line-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); {
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
"name": "General",
"code": "GEN",
"type": "walk_in",
"paused": false,
"waiting": 4,
"avgServiceMinutes": 10,
"maxCapacity": 60,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": true
} Make a line#
curl
curl -X PUT "https://business.linemeup.in/api/v1/lines" \
-H "Authorization: Bearer $LINEMEUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Vaccinations","code":"VAC","type":"walk_in","avgServiceMinutes":5,"maxCapacity":80,"description":"Walk in for a scheduled vaccine","location":"Ground floor, room 2","callGraceMinutes":5,"appointmentGraceBeforeMinutes":0,"maxLateArrivalMinutes":0,"autoNoShowEnabled":true}' Node
const res = await fetch("https://business.linemeup.in/api/v1/lines", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Vaccinations",
"code": "VAC",
"type": "walk_in",
"avgServiceMinutes": 5,
"maxCapacity": 80,
"description": "Walk in for a scheduled vaccine",
"location": "Ground floor, room 2",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 0,
"maxLateArrivalMinutes": 0,
"autoNoShowEnabled": 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.put(
"https://business.linemeup.in/api/v1/lines",
headers={
"Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
},
json={
"name": "Vaccinations",
"code": "VAC",
"type": "walk_in",
"avgServiceMinutes": 5,
"maxCapacity": 80,
"description": "Walk in for a scheduled vaccine",
"location": "Ground floor, room 2",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 0,
"maxLateArrivalMinutes": 0,
"autoNoShowEnabled": True,
},
timeout=10,
)
res.raise_for_status()
answer = res.json() PHP
<?php
$ch = curl_init("https://business.linemeup.in/api/v1/lines");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"name" => 'Vaccinations',
"code" => 'VAC',
"type" => 'walk_in',
"avgServiceMinutes" => 5,
"maxCapacity" => 80,
"description" => 'Walk in for a scheduled vaccine',
"location" => 'Ground floor, room 2',
"callGraceMinutes" => 5,
"appointmentGraceBeforeMinutes" => 0,
"maxLateArrivalMinutes" => 0,
"autoNoShowEnabled" => true,
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true); {
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000003",
"name": "Vaccinations",
"code": "VAC",
"type": "walk_in",
"avgServiceMinutes": 5,
"maxCapacity": 80,
"description": "Walk in for a scheduled vaccine",
"location": "Ground floor, room 2",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 0,
"maxLateArrivalMinutes": 0,
"autoNoShowEnabled": true,
"paused": false,
"waiting": 0
} Replace a line's settings#
curl
curl -X PUT "https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001" \
-H "Authorization: Bearer $LINEMEUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"General","code":"GEN","type":"walk_in","avgServiceMinutes":12,"maxCapacity":50,"description":"Walk-ins for a first visit","location":"Ground floor","callGraceMinutes":5,"appointmentGraceBeforeMinutes":10,"maxLateArrivalMinutes":15,"autoNoShowEnabled":true}' Node
const res = await fetch("https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.LINEMEUP_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "General",
"code": "GEN",
"type": "walk_in",
"avgServiceMinutes": 12,
"maxCapacity": 50,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": 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.put(
"https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001",
headers={
"Authorization": f"Bearer {os.environ['LINEMEUP_API_KEY']}",
},
json={
"name": "General",
"code": "GEN",
"type": "walk_in",
"avgServiceMinutes": 12,
"maxCapacity": 50,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": True,
},
timeout=10,
)
res.raise_for_status()
answer = res.json() PHP
<?php
$ch = curl_init("https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("LINEMEUP_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode([
"name" => 'General',
"code" => 'GEN',
"type" => 'walk_in',
"avgServiceMinutes" => 12,
"maxCapacity" => 50,
"description" => 'Walk-ins for a first visit',
"location" => 'Ground floor',
"callGraceMinutes" => 5,
"appointmentGraceBeforeMinutes" => 10,
"maxLateArrivalMinutes" => 15,
"autoNoShowEnabled" => true,
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 10,
]);
$answer = json_decode(curl_exec($ch), true); {
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
"name": "General",
"code": "GEN",
"type": "walk_in",
"paused": false,
"waiting": 4,
"avgServiceMinutes": 12,
"maxCapacity": 50,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": true
} Pause a line#
curl
curl -X POST "https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/pause" \
-H "Authorization: Bearer $LINEMEUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' Node
const res = await fetch("https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/pause", {
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/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/pause",
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/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/pause");
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); {
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
"name": "General",
"code": "GEN",
"type": "walk_in",
"paused": true,
"waiting": 4,
"avgServiceMinutes": 10,
"maxCapacity": 60,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": true
} Resume a line#
curl
curl -X POST "https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/resume" \
-H "Authorization: Bearer $LINEMEUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' Node
const res = await fetch("https://business.linemeup.in/api/v1/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/resume", {
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/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/resume",
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/lines/line-0193f2a1-7c4e-7a10-9b2e-000000000001/resume");
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); {
"id": "line-0193f2a1-7c4e-7a10-9b2e-000000000001",
"name": "General",
"code": "GEN",
"type": "walk_in",
"paused": false,
"waiting": 4,
"avgServiceMinutes": 10,
"maxCapacity": 60,
"description": "Walk-ins for a first visit",
"location": "Ground floor",
"callGraceMinutes": 5,
"appointmentGraceBeforeMinutes": 10,
"maxLateArrivalMinutes": 15,
"autoNoShowEnabled": true
} Recipes#
Change one setting#
Replace takes every setting, so read the line first, change what you mean to, and send the rest back as it was.
Node
// Change one setting: read the line, change it, send every setting back.
const line = await get(`/lines/${lineId}`);
const { id, paused, waiting, ...settings } = line; // what PUT does not take
await put(`/lines/${lineId}`, { ...settings, maxCapacity: 40 }); Python
# Change one setting: read the line, change it, send every setting back.
line = get(f"/lines/{line_id}")
settings = {k: v for k, v in line.items() if k not in ("id", "paused", "waiting")}
put(f"/lines/{line_id}", {**settings, "maxCapacity": 40}) PHP
<?php
// Change one setting: read the line, change it, send every setting back.
$line = get("/lines/{$lineId}");
unset($line['id'], $line['paused'], $line['waiting']);
put("/lines/{$lineId}", array_merge($line, ['maxCapacity' => 40])); Stop new arrivals at closing time#
Pause the line half an hour before closing, from a scheduled job. People already waiting are
still called; nobody new can join until it runs again. Resume it when you open. Subscribe to line.paused and line.resumed if another system needs to know when a person at a desk does the same
by hand.
Show how busy each line is#
GET /v1/lines answers waiting for every line in one request. Multiply by
avgServiceMinutes and divide by the desks calling from it for a rough wait — rough, because
people are served at different speeds and desks go on breaks.