Developer documentation · v1.0.0
Keep The Cut API
Barber booking, pricing and commission calculation for UK barbershops.
Barber booking, pricing and commission calculation for UK barbershops. The Keep The Cut API is a HTTP/JSON API with predictable resource URLs, Bearer or API-key authentication and published rate limits on every response. All monetary values are in pence; all times are UTC.
Base URL & versioning
All endpoints are relative to https://keepthecut.co.uk. The API version is in the path
(/api/v1/) so breaking changes are introduced under a new prefix.
Authentication
FREE endpoints may be called anonymously. Paid endpoints require either
Authorization: Bearer <token> or X-API-Key: <key>.
Keys are scoped to a plan and carry their own quota; never expose them in client-side code.
API keys & Bearer tokens
Create and revoke keys in your account dashboard. A rotated key takes effect immediately. Sending both headers is supported; the Bearer token takes precedence.
Plans & quotas
| Tier | Rate limit | Monthly quota | Includes |
|---|---|---|---|
| FREE | 20 requests/minute | 100 requests/month | Platform list, standard price calculations |
| PRO | 300 requests/minute | 25,000 requests/month | Reverse and batch calculations |
| SCALE | 1500 requests/minute | 150,000 requests/month | Batch calculations and saved profiles (AGENCY plan) |
Rate-limit headers
Every 200 response includes X-RateLimit-Limit, X-RateLimit-Remaining,
X-RateLimit-Reset, X-Quota-Monthly-Limit and X-Quota-Monthly-Remaining.
On 429, read Retry-After (seconds) before retrying.
Errors & status codes
Errors use RFC 9457 application/problem+json: type, title,
status, detail and optionally instance.
| Status | Meaning |
|---|---|
| 400 | Invalid parameters or body |
| 401 | Missing or invalid credentials |
| 403 | Plan Upgrade Required |
| 429 | Rate limit exceeded — see Retry-After |
Plan Upgrade Required
A 403 response includes an upgrade_url and required_plan so tools can
direct the user to the correct tier.
/api/v1/calculateCalculate a recommended price
Calculates a recommended UK barbering price from duration, skill level and location, with VAT and commission broken out in pence.
Request body
| Field | Type | Default | Description | Constraints |
|---|---|---|---|---|
duration_minutes | integer | — | Appointment length in minutes. | required, minimum: 5, maximum: 240 |
skill_level | string | senior | enum: junior, senior, master | |
location | string | other | enum: london, manchester, other | |
commission_percent | number | 25 | minimum: 0, maximum: 100 |
curl -X POST 'https://keepthecut.co.uk/api/v1/calculate' \
-H 'Content-Type: application/json' \
-d '{"duration_minutes": 30, "skill_level": "senior", "location": "manchester", "commission_percent": 25}'
const res = await fetch('https://keepthecut.co.uk/api/v1/calculate', {
method: 'POST',
body: JSON.stringify({"duration_minutes": 30, "skill_level": "senior", "location": "manchester", "commission_percent": 25}),
});
const data = await res.json();
import { request } from 'undici';
const { statusCode, body } = await request('https://keepthecut.co.uk/api/v1/calculate', {
method: 'POST',
body: JSON.stringify({"duration_minutes": 30, "skill_level": "senior", "location": "manchester", "commission_percent": 25}),
});
console.log(statusCode, await body.json());
import requests
r = requests.post(
'https://keepthecut.co.uk/api/v1/calculate',
json={"duration_minutes": 30, "skill_level": "senior", "location": "manchester", "commission_percent": 25},
)
print(r.status_code, r.json())
<?php
$ch = curl_init('https://keepthecut.co.uk/api/v1/calculate');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"duration_minutes\": 30, \"skill_level\": \"senior\", \"location\": \"manchester\", \"commission_percent\": 25}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo $body;
package main
import (
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://keepthecut.co.uk/api/v1/calculate", nil)
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.StatusCode)
}Sample 200 response
{
"price_pence": 2500,
"vat_pence": 417,
"commission_pence": 625,
"take_home_pence": 1458,
"currency": "GBP"
}Sample 401 response
{
"type": "https://httpstatuses.com/401",
"title": "Unauthorized",
"status": 401,
"detail": "Provide a valid Bearer token or X-API-Key header.",
"instance": "/api/v1/"
}Sample 403 response — Plan Upgrade Required
{
"type": "https://httpstatuses.com/403",
"title": "Plan Upgrade Required",
"status": 403,
"detail": "This operation requires a higher plan tier.",
"instance": "/api/v1/",
"upgrade_url": "https://keepthecut.co.uk/pricing",
"required_plan": "PRO"
}Sample 429 response — problem+json
{
"type": "https://httpstatuses.com/429",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded for the current window.",
"instance": "/api/v1/",
"retry_after_seconds": 30
}Try It Live
FREE endpoint — call it directly, no key needed.
/api/v1/calculate/batchBatch price calculation
Calculates up to 100 price quotes in one request. Included on the AGENCY plan.
Request body
| Field | Type | Default | Description | Constraints |
|---|---|---|---|---|
requests | array<object> | — | Up to 100 calculation inputs. | required, minItems: 1, maxItems: 100 |
curl -X POST 'https://keepthecut.co.uk/api/v1/calculate/batch' \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"requests": [{"duration_minutes": 30, "skill_level": "senior", "location": "london"}]}'
const res = await fetch('https://keepthecut.co.uk/api/v1/calculate/batch', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'X-API-Key': key },
body: JSON.stringify({"requests": [{"duration_minutes": 30, "skill_level": "senior", "location": "london"}]}),
});
const data = await res.json();
import { request } from 'undici';
const { statusCode, body } = await request('https://keepthecut.co.uk/api/v1/calculate/batch', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.API_TOKEN}` },
body: JSON.stringify({"requests": [{"duration_minutes": 30, "skill_level": "senior", "location": "london"}]}),
});
console.log(statusCode, await body.json());
import requests
r = requests.post(
'https://keepthecut.co.uk/api/v1/calculate/batch',
headers={'Authorization': f'Bearer {token}'},
json={"requests": [{"duration_minutes": 30, "skill_level": "senior", "location": "london"}]},
)
print(r.status_code, r.json())
<?php
$ch = curl_init('https://keepthecut.co.uk/api/v1/calculate/batch');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"requests\": [{\"duration_minutes\": 30, \"skill_level\": \"senior\", \"location\": \"london\"}]}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo $body;
package main
import (
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://keepthecut.co.uk/api/v1/calculate/batch", nil)
req.Header.Set("Authorization", "Bearer "+token)
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.StatusCode)
}Sample 200 response
{
"results": [
{
"price_pence": 3000,
"vat_pence": 500,
"commission_pence": 750,
"take_home_pence": 1750,
"currency": "GBP"
}
],
"count": 1
}Sample 401 response
{
"type": "https://httpstatuses.com/401",
"title": "Unauthorized",
"status": 401,
"detail": "Provide a valid Bearer token or X-API-Key header.",
"instance": "/api/v1/"
}Sample 403 response — Plan Upgrade Required
{
"type": "https://httpstatuses.com/403",
"title": "Plan Upgrade Required",
"status": 403,
"detail": "This operation requires a higher plan tier.",
"instance": "/api/v1/",
"upgrade_url": "https://keepthecut.co.uk/pricing",
"required_plan": "PRO"
}Sample 429 response — problem+json
{
"type": "https://httpstatuses.com/429",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded for the current window.",
"instance": "/api/v1/",
"retry_after_seconds": 30
}Try It Live
Paid endpoint — paste a Bearer key below. It is used only in this browser session.
/api/v1/calculate/reverseReverse-calculate a price
Given a target take-home amount in pence, computes the gross price needed after VAT at 20% and the supplied commission.
Request body
| Field | Type | Default | Description | Constraints |
|---|---|---|---|---|
take_home_pence | integer | — | Desired net take-home in pence. | required, minimum: 1 |
commission_percent | number | 25 | minimum: 0, maximum: 100 |
curl -X POST 'https://keepthecut.co.uk/api/v1/calculate/reverse' \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"take_home_pence": 1500, "commission_percent": 25}'
const res = await fetch('https://keepthecut.co.uk/api/v1/calculate/reverse', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'X-API-Key': key },
body: JSON.stringify({"take_home_pence": 1500, "commission_percent": 25}),
});
const data = await res.json();
import { request } from 'undici';
const { statusCode, body } = await request('https://keepthecut.co.uk/api/v1/calculate/reverse', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.API_TOKEN}` },
body: JSON.stringify({"take_home_pence": 1500, "commission_percent": 25}),
});
console.log(statusCode, await body.json());
import requests
r = requests.post(
'https://keepthecut.co.uk/api/v1/calculate/reverse',
headers={'Authorization': f'Bearer {token}'},
json={"take_home_pence": 1500, "commission_percent": 25},
)
print(r.status_code, r.json())
<?php
$ch = curl_init('https://keepthecut.co.uk/api/v1/calculate/reverse');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"take_home_pence\": 1500, \"commission_percent\": 25}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo $body;
package main
import (
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://keepthecut.co.uk/api/v1/calculate/reverse", nil)
req.Header.Set("Authorization", "Bearer "+token)
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.StatusCode)
}Sample 200 response
{
"price_pence": 2571,
"vat_pence": 428,
"commission_pence": 643,
"take_home_pence": 1500,
"currency": "GBP"
}Sample 401 response
{
"type": "https://httpstatuses.com/401",
"title": "Unauthorized",
"status": 401,
"detail": "Provide a valid Bearer token or X-API-Key header.",
"instance": "/api/v1/"
}Sample 403 response — Plan Upgrade Required
{
"type": "https://httpstatuses.com/403",
"title": "Plan Upgrade Required",
"status": 403,
"detail": "This operation requires a higher plan tier.",
"instance": "/api/v1/",
"upgrade_url": "https://keepthecut.co.uk/pricing",
"required_plan": "PRO"
}Sample 429 response — problem+json
{
"type": "https://httpstatuses.com/429",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded for the current window.",
"instance": "/api/v1/",
"retry_after_seconds": 30
}Try It Live
Paid endpoint — paste a Bearer key below. It is used only in this browser session.
/api/v1/platformsList supported platforms
Returns the social and booking platforms supported by Keep The Cut pricing profiles, including their aspect ratios and video support.
Path & query parameters
| Name | In | Type | Description | Constraints |
|---|---|---|---|---|
include_inactive | query | boolean | Include deprecated platforms. | optional, default: False |
curl -X GET 'https://keepthecut.co.uk/api/v1/platforms'
const res = await fetch('https://keepthecut.co.uk/api/v1/platforms', {
method: 'GET',
});
const data = await res.json();
import { request } from 'undici';
const { statusCode, body } = await request('https://keepthecut.co.uk/api/v1/platforms', {
method: 'GET',
});
console.log(statusCode, await body.json());
import requests
r = requests.get(
'https://keepthecut.co.uk/api/v1/platforms',
)
print(r.status_code, r.json())
<?php
$ch = curl_init('https://keepthecut.co.uk/api/v1/platforms');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo $body;
package main
import (
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://keepthecut.co.uk/api/v1/platforms", nil)
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.StatusCode)
}Sample 200 response
[
{
"id": "instagram",
"name": "Instagram",
"supports_video": true,
"aspect_ratios": [
"1:1",
"4:5",
"9:16"
]
}
]Sample 401 response
{
"type": "https://httpstatuses.com/401",
"title": "Unauthorized",
"status": 401,
"detail": "Provide a valid Bearer token or X-API-Key header.",
"instance": "/api/v1/"
}Sample 403 response — Plan Upgrade Required
{
"type": "https://httpstatuses.com/403",
"title": "Plan Upgrade Required",
"status": 403,
"detail": "This operation requires a higher plan tier.",
"instance": "/api/v1/",
"upgrade_url": "https://keepthecut.co.uk/pricing",
"required_plan": "PRO"
}Sample 429 response — problem+json
{
"type": "https://httpstatuses.com/429",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded for the current window.",
"instance": "/api/v1/",
"retry_after_seconds": 30
}Try It Live
FREE endpoint — call it directly, no key needed.
/api/v1/profilesList pricing profiles
Lists saved pricing profiles belonging to the authenticated agency account.
Path & query parameters
| Name | In | Type | Description | Constraints |
|---|---|---|---|---|
page | query | integer | Page number. | optional, minimum: 1, default: 1 |
page_size | query | integer | Results per page. | optional, minimum: 1, maximum: 100, default: 25 |
curl -X GET 'https://keepthecut.co.uk/api/v1/profiles' \
-H 'Authorization: Bearer $API_TOKEN'
const res = await fetch('https://keepthecut.co.uk/api/v1/profiles', {
method: 'GET',
headers: { 'Authorization': `Bearer ${token}`, 'X-API-Key': key },
});
const data = await res.json();
import { request } from 'undici';
const { statusCode, body } = await request('https://keepthecut.co.uk/api/v1/profiles', {
method: 'GET',
headers: { authorization: `Bearer ${process.env.API_TOKEN}` },
});
console.log(statusCode, await body.json());
import requests
r = requests.get(
'https://keepthecut.co.uk/api/v1/profiles',
headers={'Authorization': f'Bearer {token}'},
)
print(r.status_code, r.json())
<?php
$ch = curl_init('https://keepthecut.co.uk/api/v1/profiles');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo $body;
package main
import (
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://keepthecut.co.uk/api/v1/profiles", nil)
req.Header.Set("Authorization", "Bearer "+token)
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.StatusCode)
}Sample 200 response
{
"profiles": [
{
"id": "prof_7Qk2Lm",
"label": "Saturday cut price card",
"platform": "instagram",
"created_at": "2026-11-02T09:15:00Z"
}
],
"page": 1
}Sample 401 response
{
"type": "https://httpstatuses.com/401",
"title": "Unauthorized",
"status": 401,
"detail": "Provide a valid Bearer token or X-API-Key header.",
"instance": "/api/v1/"
}Sample 403 response — Plan Upgrade Required
{
"type": "https://httpstatuses.com/403",
"title": "Plan Upgrade Required",
"status": 403,
"detail": "This operation requires a higher plan tier.",
"instance": "/api/v1/",
"upgrade_url": "https://keepthecut.co.uk/pricing",
"required_plan": "PRO"
}Sample 429 response — problem+json
{
"type": "https://httpstatuses.com/429",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded for the current window.",
"instance": "/api/v1/",
"retry_after_seconds": 30
}Try It Live
Paid endpoint — paste a Bearer key below. It is used only in this browser session.
/api/v1/profilesCreate a pricing profile
Creates a named pricing profile for later reuse across barbering price calculations.
Request body
| Field | Type | Default | Description | Constraints |
|---|---|---|---|---|
label | string | — | required, minLength: 1, maxLength: 80 | |
platform | string | manual | enum: instagram, booking, manual |
curl -X POST 'https://keepthecut.co.uk/api/v1/profiles' \
-H 'Authorization: Bearer $API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"label": "Saturday cut price card", "platform": "instagram"}'
const res = await fetch('https://keepthecut.co.uk/api/v1/profiles', {
method: 'POST',
headers: { 'Authorization': `Bearer ${token}`, 'X-API-Key': key },
body: JSON.stringify({"label": "Saturday cut price card", "platform": "instagram"}),
});
const data = await res.json();
import { request } from 'undici';
const { statusCode, body } = await request('https://keepthecut.co.uk/api/v1/profiles', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.API_TOKEN}` },
body: JSON.stringify({"label": "Saturday cut price card", "platform": "instagram"}),
});
console.log(statusCode, await body.json());
import requests
r = requests.post(
'https://keepthecut.co.uk/api/v1/profiles',
headers={'Authorization': f'Bearer {token}'},
json={"label": "Saturday cut price card", "platform": "instagram"},
)
print(r.status_code, r.json())
<?php
$ch = curl_init('https://keepthecut.co.uk/api/v1/profiles');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token]);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"label\": \"Saturday cut price card\", \"platform\": \"instagram\"}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = curl_exec($ch);
echo $body;
package main
import (
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("POST", "https://keepthecut.co.uk/api/v1/profiles", nil)
req.Header.Set("Authorization", "Bearer "+token)
res, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer res.Body.Close()
fmt.Println(res.StatusCode)
}Sample 200 response
{
"id": "prof_7Qk2Lm",
"label": "Saturday cut price card",
"platform": "instagram",
"created_at": "2026-11-02T09:15:00Z"
}Sample 401 response
{
"type": "https://httpstatuses.com/401",
"title": "Unauthorized",
"status": 401,
"detail": "Provide a valid Bearer token or X-API-Key header.",
"instance": "/api/v1/"
}Sample 403 response — Plan Upgrade Required
{
"type": "https://httpstatuses.com/403",
"title": "Plan Upgrade Required",
"status": 403,
"detail": "This operation requires a higher plan tier.",
"instance": "/api/v1/",
"upgrade_url": "https://keepthecut.co.uk/pricing",
"required_plan": "PRO"
}Sample 429 response — problem+json
{
"type": "https://httpstatuses.com/429",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded for the current window.",
"instance": "/api/v1/",
"retry_after_seconds": 30
}Try It Live
Paid endpoint — paste a Bearer key below. It is used only in this browser session.