API reference
Users and catalogs
The reference values needed to write the rest of the contract: user and country ids.
Countries
api.niucore.com/api/v1/catalog /countriesScope: profile:read
Active countries, for the profile's country_id selector.
Note
Not paginated: about two hundred rows that barely change. meta carries only request_id.
Returns
idintegerThe country_id value.
codestringISO code.
namestringCountry name.
currencystringThe country's currency.
curl -sS -X GET 'https://api.niucore.com/api/v1/catalog/countries' \
-H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN"{
"status": "success",
"message": "Operación exitosa",
"message_code": "api_v1_ok",
"data": [
{
"id": 11,
"code": "AR",
"name": "Argentina",
"currency": "ARS"
},
{
"id": 32,
"code": "CL",
"name": "Chile",
"currency": "CLP"
}
],
"meta": {
"request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77"
}
}Company users
api.niucore.com/api/v1/usersScope: users:read
The company's users, to build shared_user_ids when sharing a skill.
Read-only, and deliberately sparse
It returns just enough to populate a picker. It does not return role, phone, document or licensing data: that is people administration, done in the application and not with a machine credential. Users cannot be created, edited or deleted through the API either.
Scope matches the application's: with users.read.all you see the whole company; with only users.read.area, just those sharing an area with the credential's owning user.
Query
pageintegerdefaults to 1Page number, starting at 1.
sizeintegerdefaults to 50Items per page. Maximum 200.
searchstringFilters by name or email, case-insensitively.
Returns
idintegerThe value for shared_user_ids.
namestringName.
emailstringEmail.
is_activebooleanWhether they can sign in.
area_idsinteger[]Areas they belong to.
curl -sS -X GET 'https://api.niucore.com/api/v1/users?page=1&size=50' \
-H "Authorization: Bearer $NIUCORE_ACCESS_TOKEN"{
"status": "success",
"message": "Operación exitosa",
"message_code": "api_v1_ok",
"data": [
{
"id": 2099,
"name": "Ada Lovelace",
"email": "ada@acme.com",
"is_active": true,
"area_ids": [
7,
9
]
},
{
"id": 2104,
"name": "Grace Hopper",
"email": "grace@acme.com",
"is_active": true,
"area_ids": [
7
]
}
],
"meta": {
"request_id": "9f1c0a3e-7b2d-4f18-9a55-2c6e0d1b4a77",
"page": 1,
"size": 50,
"total": 2
}
}