Başvuru verisi
Ülke, il, ilçe.
#GET/reference/countries
Get countriesKapsam: Reference/GetCountriescoreGetCountriesBu işlemin OpenAPI parçası
Yanıtlar
| 200 | Success — data: array<object> |
| 401 | Missing, invalid or revoked key |
| 403 | Key lacks the scope, IP not allowed, or feature disabled |
Örnekler
curl -s 'https://www.gyrohosting.com/api/v1/client/reference/countries' \
-H "Authorization: Bearer $GYRO_TOKEN"
gyro reference country list
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/reference/countries", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/reference/countries", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
#GET/reference/countries/{code}/states
Get statesKapsam: Reference/GetStatescoreGetStatesBu işlemin OpenAPI parçası
Parametreler
| Alan | in | Tür | Açıklama |
|---|
code zorunlu | path | string | |
Yanıtlar
| 200 | Success — data: array<object> |
| 401 | Missing, invalid or revoked key |
| 403 | Key lacks the scope, IP not allowed, or feature disabled |
Örnekler
curl -s 'https://www.gyrohosting.com/api/v1/client/reference/countries/1/states' \
-H "Authorization: Bearer $GYRO_TOKEN"
gyro reference country state list
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/reference/countries/1/states", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/reference/countries/1/states", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
#GET/reference/states/{id}/cities
Get citiesKapsam: Reference/GetCitiescoreGetCitiesBu işlemin OpenAPI parçası
Parametreler
| Alan | in | Tür | Açıklama |
|---|
id zorunlu | path | integer | |
Yanıtlar
| 200 | Success — data: array<object> |
| 401 | Missing, invalid or revoked key |
| 403 | Key lacks the scope, IP not allowed, or feature disabled |
Örnekler
curl -s 'https://www.gyrohosting.com/api/v1/client/reference/states/12345/cities' \
-H "Authorization: Bearer $GYRO_TOKEN"
gyro reference state city list 12345
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/reference/states/12345/cities", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/reference/states/12345/cities", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);