curl --request GET \
--url 'https://client.corrily.com/v1/users/test_user_id' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
const fetch = require("node-fetch");
const url = "https://client.corrily.com/v1/users/test_user_id";
const options = {
method: "GET",
headers: { Accept: "application/json", "Content-Type": "application/json" }
}),
};
fetch(url, options)
.then((res) => res.json())
.then((json) => console.log(json))
.catch((err) => console.error("error:" + err));
import requests
url = "https://client.corrily.com/v1/users/test_user_id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
{
"user": {
"country": "AU"
}
}
Users
Get User country
Get country for the user if the user exists.
GET
/
v1
/
users
/
{user_id}
curl --request GET \
--url 'https://client.corrily.com/v1/users/test_user_id' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
const fetch = require("node-fetch");
const url = "https://client.corrily.com/v1/users/test_user_id";
const options = {
method: "GET",
headers: { Accept: "application/json", "Content-Type": "application/json" }
}),
};
fetch(url, options)
.then((res) => res.json())
.then((json) => console.log(json))
.catch((err) => console.error("error:" + err));
import requests
url = "https://client.corrily.com/v1/users/test_user_id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
{
"user": {
"country": "AU"
}
}
This endpoint returns the country for the user if the user exists. If the user does not exist, it returns an 400 error.
Path Params
A User ID.
Body Params
Response
curl --request GET \
--url 'https://client.corrily.com/v1/users/test_user_id' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
const fetch = require("node-fetch");
const url = "https://client.corrily.com/v1/users/test_user_id";
const options = {
method: "GET",
headers: { Accept: "application/json", "Content-Type": "application/json" }
}),
};
fetch(url, options)
.then((res) => res.json())
.then((json) => console.log(json))
.catch((err) => console.error("error:" + err));
import requests
url = "https://client.corrily.com/v1/users/test_user_id"
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
{
"user": {
"country": "AU"
}
}
{
"success": false,
"error_message": "User does not exist"
}