Developers
Contents
On this page

Resources

Business

The business your key belongs to.

A key belongs to exactly one business, so there is one business to read and no id to give. It is the first call worth making: it says the key works, whose it is, and what "today" means for every other endpoint.

Fields#

A business
FieldTypeNotes
idrequiredstring
namerequiredstring
slugrequiredstring
categoryrequiredenumOne of "healthcare", "beauty_personal_care", "automotive", "food_beverage", "other"
timeZonerequiredstring
todayrequiredstring
clockFormatrequiredenumOne of "12h", "24h"
  • category is the kind of business — a clinic is healthcare.
  • today is the business's own date in its timeZone, which is the date to send as from and to on GET /v1/visits.
  • clockFormat is how its staff read a time: 12h or 24h.

Endpoints#

Business endpoints
EndpointScopeDoes
GET /business read The business this key belongs to — its name, category, time zone and today.

Examples#

Read your business#

Request

curl

curl "https://business.linemeup.in/api/v1/business" \
  -H "Authorization: Bearer $LINEMEUP_API_KEY"

Node

const res = await fetch("https://business.linemeup.in/api/v1/business", {
  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/business",
    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/business");
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": "bus-0193f2a1-7c4e-7a10-9b2e-000000000001",
  "name": "Sunrise Clinic",
  "slug": "sunrise-clinic",
  "category": "healthcare",
  "timeZone": "Asia/Kolkata",
  "today": "2026-10-30",
  "clockFormat": "12h"
}

Recipes#

Show a time the way the desk reads it#

Every time in the API is UTC. To print one for a person at the business, convert it to the business's timeZone and use its clockFormat. Here Asia/Kolkata and 12h:

A visit's call time, as the desk would write it

Node

const business = await get("/business"); // once a day is plenty

// "1:30 pm" or "13:30", in the business's zone and the way its staff read it.
const timeAt = (instant) =>
  new Intl.DateTimeFormat("en-IN", {
    timeZone: business.timeZone,
    hour: "numeric",
    minute: "2-digit",
    hour12: business.clockFormat === "12h",
  }).format(new Date(instant));

timeAt(visit.calledAt); // "10:01 am"

Python

from datetime import datetime
from zoneinfo import ZoneInfo

business = get("/business")  # once a day is plenty
zone = ZoneInfo(business["timeZone"])

def time_at(instant):
    local = datetime.fromisoformat(instant.replace("Z", "+00:00")).astimezone(zone)
    if business["clockFormat"] == "12h":
        return local.strftime("%I:%M %p").lstrip("0").lower()
    return local.strftime("%H:%M")

time_at(visit["calledAt"])  # "10:01 am"

PHP

<?php
$business = get('/business'); // once a day is plenty
$zone = new DateTimeZone($business['timeZone']);

function time_at(string $instant, DateTimeZone $zone, string $clock): string
{
    $local = (new DateTimeImmutable($instant))->setTimezone($zone);
    return $clock === '12h' ? strtolower($local->format('g:i a')) : $local->format('H:i');
}

time_at($visit['calledAt'], $zone, $business['clockFormat']); // "10:01 am"

Ask for today, not your server's date#

Read today rather than working it out. Near midnight your server's date and the business's differ, and a report run at 1 am in Kolkata asking UTC for "today" gets yesterday. Ask again after midnight in the business's zone; the value changes then.