{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Keep The Cut API",
    "version": "1.0.0",
    "description": "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. ",
    "termsOfService": "https://keepthecut.co.uk/api-terms",
    "contact": {
      "name": "Keep The Cut API Support",
      "url": "https://keepthecut.co.uk/docs/"
    }
  },
  "servers": [
    {
      "url": "https://keepthecut.co.uk",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Keepthecut",
      "description": "Keep The Cut API endpoints."
    }
  ],
  "paths": {
    "/api/v1/platforms": {
      "get": {
        "operationId": "listPlatforms",
        "summary": "List supported platforms",
        "description": "Returns the social and booking platforms supported by Keep The Cut pricing profiles, including their aspect ratios and video support.",
        "tags": [
          "Keepthecut"
        ],
        "x-tier": "FREE",
        "responses": {
          "200": {
            "description": "Successful response. Rate-limit and monthly-quota headers are returned on every 200.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 59
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              },
              "X-Quota-Monthly-Limit": {
                "description": "Total requests included in the plan for this calendar month.",
                "schema": {
                  "type": "integer",
                  "example": 10000
                }
              },
              "X-Quota-Monthly-Remaining": {
                "description": "Monthly quota remaining after this request.",
                "schema": {
                  "type": "integer",
                  "example": 9940
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "example": "instagram"
                      },
                      "name": {
                        "type": "string",
                        "example": "Instagram"
                      },
                      "supports_video": {
                        "type": "boolean",
                        "example": true
                      },
                      "aspect_ratios": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "1:1",
                          "4:5",
                          "9:16"
                        ]
                      }
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": [
                      {
                        "id": "instagram",
                        "name": "Instagram",
                        "supports_video": true,
                        "aspect_ratios": [
                          "1:1",
                          "4:5",
                          "9:16"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or invalid credentials.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://httpstatuses.com/401",
                      "title": "Unauthorized",
                      "status": 401,
                      "detail": "Provide a valid Bearer token or X-API-Key header.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Plan Upgrade Required — the endpoint or requested option is not on the current plan.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUpgradeRequired"
                },
                "examples": {
                  "upgrade_required": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — RFC 9457 problem+json with a Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying (RFC 9110 §10.2.3).",
                "schema": {
                  "type": "integer",
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Zero while throttled.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "throttled": {
                    "value": {
                      "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
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "include_inactive",
            "in": "query",
            "description": "Include deprecated platforms.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": false
          }
        ],
        "security": []
      }
    },
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculatePrice",
        "summary": "Calculate a recommended price",
        "description": "Calculates a recommended UK barbering price from duration, skill level and location, with VAT and commission broken out in pence.",
        "tags": [
          "Keepthecut"
        ],
        "x-tier": "FREE",
        "responses": {
          "200": {
            "description": "Successful response. Rate-limit and monthly-quota headers are returned on every 200.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 59
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              },
              "X-Quota-Monthly-Limit": {
                "description": "Total requests included in the plan for this calendar month.",
                "schema": {
                  "type": "integer",
                  "example": 10000
                }
              },
              "X-Quota-Monthly-Remaining": {
                "description": "Monthly quota remaining after this request.",
                "schema": {
                  "type": "integer",
                  "example": 9940
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_pence": {
                      "type": "integer",
                      "example": 2500,
                      "description": "Recommended price in pence."
                    },
                    "vat_pence": {
                      "type": "integer",
                      "example": 417,
                      "description": "VAT at 20% included in price."
                    },
                    "commission_pence": {
                      "type": "integer",
                      "example": 625,
                      "description": "Platform or card commission."
                    },
                    "take_home_pence": {
                      "type": "integer",
                      "example": 1458,
                      "description": "Net take-home after VAT and commission."
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "GBP"
                      ],
                      "example": "GBP"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": {
                      "price_pence": 2500,
                      "vat_pence": 417,
                      "commission_pence": 625,
                      "take_home_pence": 1458,
                      "currency": "GBP"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or invalid credentials.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://httpstatuses.com/401",
                      "title": "Unauthorized",
                      "status": 401,
                      "detail": "Provide a valid Bearer token or X-API-Key header.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Plan Upgrade Required — the endpoint or requested option is not on the current plan.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUpgradeRequired"
                },
                "examples": {
                  "upgrade_required": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — RFC 9457 problem+json with a Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying (RFC 9110 §10.2.3).",
                "schema": {
                  "type": "integer",
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Zero while throttled.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "throttled": {
                    "value": {
                      "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
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid": {
                    "value": {
                      "type": "https://httpstatuses.com/400",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "duration_minutes must be between 5 and 240.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "duration_minutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 240,
                    "example": 30,
                    "description": "Appointment length in minutes."
                  },
                  "skill_level": {
                    "type": "string",
                    "enum": [
                      "junior",
                      "senior",
                      "master"
                    ],
                    "default": "senior",
                    "example": "senior"
                  },
                  "location": {
                    "type": "string",
                    "enum": [
                      "london",
                      "manchester",
                      "other"
                    ],
                    "default": "other",
                    "example": "manchester"
                  },
                  "commission_percent": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "default": 25,
                    "example": 25
                  }
                },
                "required": [
                  "duration_minutes"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "duration_minutes": 30,
                    "skill_level": "senior",
                    "location": "manchester",
                    "commission_percent": 25
                  }
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/calculate/reverse": {
      "post": {
        "operationId": "calculateReverse",
        "summary": "Reverse-calculate a price",
        "description": "Given a target take-home amount in pence, computes the gross price needed after VAT at 20% and the supplied commission.",
        "tags": [
          "Keepthecut"
        ],
        "x-tier": "PRO",
        "responses": {
          "200": {
            "description": "Successful response. Rate-limit and monthly-quota headers are returned on every 200.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 59
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              },
              "X-Quota-Monthly-Limit": {
                "description": "Total requests included in the plan for this calendar month.",
                "schema": {
                  "type": "integer",
                  "example": 10000
                }
              },
              "X-Quota-Monthly-Remaining": {
                "description": "Monthly quota remaining after this request.",
                "schema": {
                  "type": "integer",
                  "example": 9940
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price_pence": {
                      "type": "integer",
                      "example": 2500,
                      "description": "Recommended price in pence."
                    },
                    "vat_pence": {
                      "type": "integer",
                      "example": 417,
                      "description": "VAT at 20% included in price."
                    },
                    "commission_pence": {
                      "type": "integer",
                      "example": 625,
                      "description": "Platform or card commission."
                    },
                    "take_home_pence": {
                      "type": "integer",
                      "example": 1458,
                      "description": "Net take-home after VAT and commission."
                    },
                    "currency": {
                      "type": "string",
                      "enum": [
                        "GBP"
                      ],
                      "example": "GBP"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": {
                      "price_pence": 2571,
                      "vat_pence": 428,
                      "commission_pence": 643,
                      "take_home_pence": 1500,
                      "currency": "GBP"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or invalid credentials.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://httpstatuses.com/401",
                      "title": "Unauthorized",
                      "status": 401,
                      "detail": "Provide a valid Bearer token or X-API-Key header.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Plan Upgrade Required — the endpoint or requested option is not on the current plan.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUpgradeRequired"
                },
                "examples": {
                  "upgrade_required": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — RFC 9457 problem+json with a Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying (RFC 9110 §10.2.3).",
                "schema": {
                  "type": "integer",
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Zero while throttled.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "throttled": {
                    "value": {
                      "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
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid": {
                    "value": {
                      "type": "https://httpstatuses.com/400",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "take_home_pence must be a positive integer.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "take_home_pence": {
                    "type": "integer",
                    "minimum": 1,
                    "example": 1500,
                    "description": "Desired net take-home in pence."
                  },
                  "commission_percent": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100,
                    "default": 25,
                    "example": 25
                  }
                },
                "required": [
                  "take_home_pence"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "take_home_pence": 1500,
                    "commission_percent": 25
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/calculate/batch": {
      "post": {
        "operationId": "calculateBatch",
        "summary": "Batch price calculation",
        "description": "Calculates up to 100 price quotes in one request. Included on the AGENCY plan.",
        "tags": [
          "Keepthecut"
        ],
        "x-tier": "PRO",
        "responses": {
          "200": {
            "description": "Successful response. Rate-limit and monthly-quota headers are returned on every 200.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 59
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              },
              "X-Quota-Monthly-Limit": {
                "description": "Total requests included in the plan for this calendar month.",
                "schema": {
                  "type": "integer",
                  "example": 10000
                }
              },
              "X-Quota-Monthly-Remaining": {
                "description": "Monthly quota remaining after this request.",
                "schema": {
                  "type": "integer",
                  "example": 9940
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "price_pence": {
                            "type": "integer",
                            "example": 2500,
                            "description": "Recommended price in pence."
                          },
                          "vat_pence": {
                            "type": "integer",
                            "example": 417,
                            "description": "VAT at 20% included in price."
                          },
                          "commission_pence": {
                            "type": "integer",
                            "example": 625,
                            "description": "Platform or card commission."
                          },
                          "take_home_pence": {
                            "type": "integer",
                            "example": 1458,
                            "description": "Net take-home after VAT and commission."
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "GBP"
                            ],
                            "example": "GBP"
                          }
                        }
                      }
                    },
                    "count": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": {
                      "results": [
                        {
                          "price_pence": 3000,
                          "vat_pence": 500,
                          "commission_pence": 750,
                          "take_home_pence": 1750,
                          "currency": "GBP"
                        }
                      ],
                      "count": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or invalid credentials.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://httpstatuses.com/401",
                      "title": "Unauthorized",
                      "status": 401,
                      "detail": "Provide a valid Bearer token or X-API-Key header.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Plan Upgrade Required — the endpoint or requested option is not on the current plan.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUpgradeRequired"
                },
                "examples": {
                  "upgrade_required": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — RFC 9457 problem+json with a Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying (RFC 9110 §10.2.3).",
                "schema": {
                  "type": "integer",
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Zero while throttled.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "throttled": {
                    "value": {
                      "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
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid": {
                    "value": {
                      "type": "https://httpstatuses.com/400",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "requests must contain between 1 and 100 items.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "requests": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "duration_minutes": {
                          "type": "integer",
                          "minimum": 5,
                          "maximum": 240,
                          "example": 30
                        },
                        "skill_level": {
                          "type": "string",
                          "enum": [
                            "junior",
                            "senior",
                            "master"
                          ],
                          "default": "senior"
                        },
                        "location": {
                          "type": "string",
                          "enum": [
                            "london",
                            "manchester",
                            "other"
                          ],
                          "default": "other"
                        }
                      }
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "description": "Up to 100 calculation inputs."
                  }
                },
                "required": [
                  "requests"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "requests": [
                      {
                        "duration_minutes": 30,
                        "skill_level": "senior",
                        "location": "london"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    },
    "/api/v1/profiles": {
      "get": {
        "operationId": "listProfiles",
        "summary": "List pricing profiles",
        "description": "Lists saved pricing profiles belonging to the authenticated agency account.",
        "tags": [
          "Keepthecut"
        ],
        "x-tier": "SCALE",
        "responses": {
          "200": {
            "description": "Successful response. Rate-limit and monthly-quota headers are returned on every 200.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 59
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              },
              "X-Quota-Monthly-Limit": {
                "description": "Total requests included in the plan for this calendar month.",
                "schema": {
                  "type": "integer",
                  "example": 10000
                }
              },
              "X-Quota-Monthly-Remaining": {
                "description": "Monthly quota remaining after this request.",
                "schema": {
                  "type": "integer",
                  "example": 9940
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "profiles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "example": "prof_7Qk2Lm"
                          },
                          "label": {
                            "type": "string",
                            "example": "Saturday cut price card"
                          },
                          "platform": {
                            "type": "string",
                            "example": "instagram"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-11-02T09:15:00Z"
                          }
                        }
                      }
                    },
                    "page": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": {
                      "profiles": [
                        {
                          "id": "prof_7Qk2Lm",
                          "label": "Saturday cut price card",
                          "platform": "instagram",
                          "created_at": "2026-11-02T09:15:00Z"
                        }
                      ],
                      "page": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or invalid credentials.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://httpstatuses.com/401",
                      "title": "Unauthorized",
                      "status": 401,
                      "detail": "Provide a valid Bearer token or X-API-Key header.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Plan Upgrade Required — the endpoint or requested option is not on the current plan.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUpgradeRequired"
                },
                "examples": {
                  "upgrade_required": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — RFC 9457 problem+json with a Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying (RFC 9110 §10.2.3).",
                "schema": {
                  "type": "integer",
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Zero while throttled.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "throttled": {
                    "value": {
                      "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
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Results per page.",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "example": 25
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      },
      "post": {
        "operationId": "createProfile",
        "summary": "Create a pricing profile",
        "description": "Creates a named pricing profile for later reuse across barbering price calculations.",
        "tags": [
          "Keepthecut"
        ],
        "x-tier": "SCALE",
        "responses": {
          "200": {
            "description": "Successful response. Rate-limit and monthly-quota headers are returned on every 200.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 59
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              },
              "X-Quota-Monthly-Limit": {
                "description": "Total requests included in the plan for this calendar month.",
                "schema": {
                  "type": "integer",
                  "example": 10000
                }
              },
              "X-Quota-Monthly-Remaining": {
                "description": "Monthly quota remaining after this request.",
                "schema": {
                  "type": "integer",
                  "example": 9940
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prof_7Qk2Lm"
                    },
                    "label": {
                      "type": "string",
                      "example": "Saturday cut price card"
                    },
                    "platform": {
                      "type": "string",
                      "example": "instagram"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2026-11-02T09:15:00Z"
                    }
                  }
                },
                "examples": {
                  "default": {
                    "value": {
                      "id": "prof_7Qk2Lm",
                      "label": "Saturday cut price card",
                      "platform": "instagram",
                      "created_at": "2026-11-02T09:15:00Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or invalid credentials.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "unauthorized": {
                    "value": {
                      "type": "https://httpstatuses.com/401",
                      "title": "Unauthorized",
                      "status": 401,
                      "detail": "Provide a valid Bearer token or X-API-Key header.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Plan Upgrade Required — the endpoint or requested option is not on the current plan.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanUpgradeRequired"
                },
                "examples": {
                  "upgrade_required": {
                    "value": {
                      "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"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests — RFC 9457 problem+json with a Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying (RFC 9110 §10.2.3).",
                "schema": {
                  "type": "integer",
                  "example": 30
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer",
                  "example": 60
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Zero while throttled.",
                "schema": {
                  "type": "integer",
                  "example": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the current window resets.",
                "schema": {
                  "type": "integer",
                  "example": 1764931200
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "throttled": {
                    "value": {
                      "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
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters or body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "examples": {
                  "invalid": {
                    "value": {
                      "type": "https://httpstatuses.com/400",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "label must be between 1 and 80 characters.",
                      "instance": "/api/v1/"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "example": "Saturday cut price card"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "instagram",
                      "booking",
                      "manual"
                    ],
                    "default": "manual",
                    "example": "instagram"
                  }
                },
                "required": [
                  "label"
                ]
              },
              "examples": {
                "default": {
                  "value": {
                    "label": "Saturday cut price card",
                    "platform": "instagram"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          },
          {
            "apiKeyHeader": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API token",
        "description": "Send `Authorization: Bearer <token>`."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Send `X-API-Key: <key>` as an alternative to Bearer auth."
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "example": "https://httpstatuses.com/429"
          },
          "title": {
            "type": "string",
            "example": "Too Many Requests"
          },
          "status": {
            "type": "integer",
            "example": 429
          },
          "detail": {
            "type": "string",
            "example": "Rate limit exceeded for the current window."
          },
          "instance": {
            "type": "string",
            "example": "/api/v1/"
          },
          "retry_after_seconds": {
            "type": "integer",
            "example": 30
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ]
      },
      "PlanUpgradeRequired": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "example": "https://httpstatuses.com/403"
          },
          "title": {
            "type": "string",
            "example": "Plan Upgrade Required"
          },
          "status": {
            "type": "integer",
            "example": 403
          },
          "detail": {
            "type": "string",
            "example": "This operation requires a higher plan tier."
          },
          "upgrade_url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.co.uk/pricing"
          },
          "required_plan": {
            "type": "string",
            "enum": [
              "PRO",
              "AGENCY",
              "FRANCHISE",
              "GROUP",
              "SCALE"
            ],
            "example": "PRO"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "upgrade_url"
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "apiKeyHeader": []
    }
  ]
}
