API Guide

Getting Started

The Local Business Pro REST API lets you programmatically access your business data, including events, account details, and more. All responses are returned as JSON.

Welcome to the API

The Local Business Pro REST API lets you programmatically access your business data, including events, account details, and more. All responses are returned as JSON.

Base URL

All API requests are made to your platform host at the /api/v1 path:
https://backend.localbusiness.pro/api/v1

Get Your API Keys

Each business is issued a public key and a private key (secret key). You can find these in your account settings under API & Integrations.
  • The public key identifies your business in each request.
  • The private key is used to generate HMAC signatures. Keep it secret — never expose it in client-side code.

Make Your First Request

The easiest way to verify your setup is with the GET /status health-check endpoint. It requires no authentication:
curl ${backendUrl}/api/v1/status
You should receive:
{\n  "status": "ok",\n  "api_version": "v1"\n}
Once that works, try an authenticated request to GET /me to confirm your keys are valid. See the Authorization guide for details on signing requests.

cURL

# 1. Health check (no auth required)
curl https://backend.localbusiness.pro/api/v1/status

# 2. Authenticated request to verify your keys
PUBLIC_KEY="your-public-key"
PRIVATE_KEY="your-private-key"
TIMESTAMP=$(date +%s)
PATH_URI="/api/v1/me"

SIGNATURE=$(printf '%s\n%s\n%s\n' "$TIMESTAMP" "GET" "$PATH_URI" \
  | openssl dgst -sha256 -hmac "$PRIVATE_KEY" | awk '{print $2}')

curl -H "X-Public-Key: $PUBLIC_KEY" \
     -H "X-Timestamp: $TIMESTAMP" \
     -H "X-Signature: $SIGNATURE" \
     "https://backend.localbusiness.pro$PATH_URI"

Node.js

// 1. Health check (no auth required)
const status = await fetch("https://backend.localbusiness.pro/api/v1/status");
console.log(await status.json());

// 2. Authenticated request
const crypto = require("crypto");

const publicKey = "your-public-key";
const privateKey = "your-private-key";
const timestamp = Math.floor(Date.now() / 1000).toString();
const method = "GET";
const path = "/api/v1/me";
const body = "";

const signingString = `${timestamp}\n${method}\n${path}\n${body}`;
const signature = crypto
  .createHmac("sha256", privateKey)
  .update(signingString)
  .digest("hex");

const response = await fetch("https://backend.localbusiness.pro/api/v1/me", {
  headers: {
    "X-Public-Key": publicKey,
    "X-Timestamp": timestamp,
    "X-Signature": signature,
  },
});
console.log(await response.json());

Python

import hmac, hashlib, time, requests

# 1. Health check (no auth required)
print(requests.get("https://backend.localbusiness.pro/api/v1/status").json())

# 2. Authenticated request
public_key = "your-public-key"
private_key = "your-private-key"
timestamp = str(int(time.time()))
method = "GET"
path = "/api/v1/me"
body = ""

signing_string = f"{timestamp}\n{method}\n{path}\n{body}"
signature = hmac.new(
    private_key.encode(), signing_string.encode(), hashlib.sha256
).hexdigest()

response = requests.get(
    "https://backend.localbusiness.pro/api/v1/me",
    headers={
        "X-Public-Key": public_key,
        "X-Timestamp": timestamp,
        "X-Signature": signature,
    },
)
print(response.json())

PHP

<?php
// 1. Health check (no auth required)
$status = file_get_contents('https://backend.localbusiness.pro/api/v1/status');
print_r(json_decode($status, true));

// 2. Authenticated request
$publicKey = 'your-public-key';
$privateKey = 'your-private-key';
$timestamp = time();
$method = 'GET';
$path = '/api/v1/me';
$body = '';

$signingString = $timestamp . "\n" . $method . "\n" . $path . "\n" . $body;
$signature = hash_hmac('sha256', $signingString, $privateKey);

$ch = curl_init('https://backend.localbusiness.pro/api/v1/me');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "X-Public-Key: $publicKey",
    "X-Timestamp: $timestamp",
    "X-Signature: $signature",
]);

$response = curl_exec($ch);
curl_close($ch);
print_r(json_decode($response, true));