KTCKeep The Cut

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

TierRate limitMonthly quotaIncludes
FREE20 requests/minute100 requests/monthPlatform list, standard price calculations
PRO300 requests/minute25,000 requests/monthReverse and batch calculations
SCALE1500 requests/minute150,000 requests/monthBatch 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.

StatusMeaning
400Invalid parameters or body
401Missing or invalid credentials
403Plan Upgrade Required
429Rate 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.

POST/api/v1/calculate
FREE

Calculate 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

FieldTypeDefaultDescriptionConstraints
duration_minutesinteger—Appointment length in minutes.required, minimum: 5, maximum: 240
skill_levelstringseniorenum: junior, senior, master
locationstringotherenum: london, manchester, other
commission_percentnumber25minimum: 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}'

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.

POST/api/v1/calculate/batch
PRO

Batch price calculation

Calculates up to 100 price quotes in one request. Included on the AGENCY plan.

Request body

FieldTypeDefaultDescriptionConstraints
requestsarray<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"}]}'

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.

POST/api/v1/calculate/reverse
PRO

Reverse-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

FieldTypeDefaultDescriptionConstraints
take_home_penceinteger—Desired net take-home in pence.required, minimum: 1
commission_percentnumber25minimum: 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}'

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.

GET/api/v1/platforms
FREE

List 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

NameInTypeDescriptionConstraints
include_inactivequerybooleanInclude deprecated platforms.optional, default: False
curl -X GET 'https://keepthecut.co.uk/api/v1/platforms'

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.

GET/api/v1/profiles
SCALE

List pricing profiles

Lists saved pricing profiles belonging to the authenticated agency account.

Path & query parameters

NameInTypeDescriptionConstraints
pagequeryintegerPage number.optional, minimum: 1, default: 1
page_sizequeryintegerResults per page.optional, minimum: 1, maximum: 100, default: 25
curl -X GET 'https://keepthecut.co.uk/api/v1/profiles' \
-H 'Authorization: Bearer $API_TOKEN'

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.

POST/api/v1/profiles
SCALE

Create a pricing profile

Creates a named pricing profile for later reuse across barbering price calculations.

Request body

FieldTypeDefaultDescriptionConstraints
labelstring—required, minLength: 1, maxLength: 80
platformstringmanualenum: 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"}'

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.

Advertisement