Docs / Countries
Child divisions by code
Lists the children of a division identified by country and division code.
GET
/v1/countries/{code}/divisions/{divisionCode}/childrenimport { Client } from "@liveapiio/liveapi";
const client = new Client({ token: process.env.LIVEAPI_TOKEN });
const children = await client.divisionChildrenByCode("TR", "34");Request
Send Authorization: Bearer YOUR_TOKEN. The token stays on your server. Each library reads it from the environment and calls this endpoint for you.
| Field | Type | Description |
|---|---|---|
| code | string | ISO country code. Path parameter. |
| divisionCode | string | Division code inside that country. Path parameter. |
Response
A 200 response uses one call. Returns an array of child divisions.
Errors
A failed request returns { "error": { "code", "message" } } and does not use a call.
| Status | Code | When |
|---|---|---|
| 404 | not_found | Country or division not found. |
| 401 | unauthorized | The bearer token is missing or not recognized. |