AfriTailor API
A simple, JSON-first API for UK size intelligence. Send body measurements or basic body stats and receive an exact UK clothing size (6–28) — ready to embed in your storefront, kiosk or fitting flow.
Overview
All endpoints return application/json. Requests and responses use UTF-8. The base URL for this deployment is:
https://afritailor.com.ng
| Property | Value |
|---|---|
| Base URL | https://afritailor.com.ng |
| Format | JSON |
| Methods | GET, POST |
| Encoding | UTF-8 |
Authentication
The Size Intelligence endpoint is public and requires no key — it performs a stateless calculation and stores nothing. The Lead Capture endpoint is protected by a per-session CSRF token issued by the website, so it can only be called from AfriTailor pages.
No body photos or measurements are persisted by the Size Intelligence endpoint. Inputs are used only to compute the response for that request.
Size Intelligence
Estimate a UK clothing size from body measurements (best accuracy) or from basic body stats such as height and weight.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
gender | string | optional | women · men · kids. Default women. |
unit | string | optional | cm or in for length inputs. Default cm. |
bust | number | one of* | Bust / chest girth. |
waist | number | one of* | Natural waist girth. |
hip | number | one of* | Hip / seat girth. |
height | number | optional | Height. Used with weight when no girth is given. |
weight | number | optional | Weight in kg. |
* Supply at least one of bust, waist, hip — or both height and weight.
Example request
# Girth-based (highest accuracy)
curl "https://afritailor.com.ng/api/measure.php?gender=women&waist=72&hip=98"Example response
{
"ok": true,
"uk_size": 12,
"label": "UK 12",
"gender": "women",
"confidence": "98%",
"method": "measurements",
"time_ms": 1,
"inputs": { "waist_cm": 72, "hip_cm": 98 },
"generated_at": "2026-07-29T12:00:00+00:00"
}Test Playground
Fill in the fields and send a live request to the Size Intelligence endpoint. The exact request URL and raw JSON response are shown on the right.
Live request
Calls /api/measure.php in your browser.
Lead Capture
Stores a newsletter or “Get Started” email against the AfriTailor admin and notifies info@afritailor.com.ng. Requires the site-issued CSRF token, so it is intended for use by AfriTailor's own forms.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email | string | required | Valid email address (max 190 chars). |
source | string | optional | newsletter or get-started. Default newsletter. |
csrf | string | required | Session CSRF token rendered into the page's forms. |
Example response
{
"ok": true,
"message": "You're subscribed — thanks for joining AfriTailor."
}Status Codes
| Code | Meaning |
|---|---|
200 | Success — response body contains the result. |
403 | Invalid or expired CSRF token (Lead Capture). |
405 | Method not allowed — use the documented verb. |
422 | Validation error — a required/valid input is missing. |
Support
Questions about integrating the API? We're happy to help.
| info@afritailor.com.ng | |
| Phone | 07900 413990 |