state_select is required on POST /api/v1/auth/register and its value comes from here.App\Http\Controllers\Api\V1\Public\CountryController::divisions()api.v1.public.countries.divisionsthrottle:public. See docs/api/README.md §14.GET/api/v1/public/countries/{code}/divisions| Parameter | Type | Description |
|---|---|---|
{code} | string(2) | ISO 3166-1 alpha-2 country code. Constrained by the route to two letters ([A-Za-z]{2}) |
200 OKdata is an array, unlike GET /api/v1/public/countries which returns a keyed object. Captured live; truncated to the first 3 of 110 entries for Italy.{
"success": true,
"status": "success",
"message": "OK",
"data": [
{ "label": "Agrigento", "value": "AG@Agrigento" },
{ "label": "Alessandria", "value": "AL@Alessandria" },
{ "label": "Ancona", "value": "AN@Ancona" }
]
}| Field | Type | Nullable | Always present | Description |
|---|---|---|---|---|
data[].label | string | No | Yes | Subdivision name, for display |
data[].value | string | No | Yes | Composite: {code}@{name}, e.g. AG@Agrigento |
value is the string to send back in state_select at registration. AuthController::register() splits it on @ into state_code and state. Do not build it yourself and do not send the code alone.422 Unprocessable Entity — code not recognisederrors key. Captured live:{
"success": false,
"status": "error",
"message": "Invalid country code"
}429 Too Many Requestspublic limiter (300 requests per minute, keyed by IP). No errors key.{
"success": false,
"status": "error",
"message": "Too many requests"
}Accept-Language.GET /api/v1/public/countries/{code}, an unrecognised code gives 422 here and 404 there. The two endpoints treat the same error differently - this is unchanged from the removed utility pair.POST /api/v1/utility/country/divisions (removed; see docs/api/_archive/utility/POST_country_divisions.md).curl --location 'https://test.diveraid.com/api/v1/public/countries//divisions'{
"status": "success",
"message": "string",
"data": [
{
"label": "string",
"value": "string"
}
]
}