Skip to content

Users API

Ainua Portal Users API provides RESTful access for users integration. It is designed for integrating users from a back-office solution to Ainua Portal.

For added security Users API is write-only as are all Ainua Portal API’s.

Combining user identities

It is very common that back-office solutions integrating to Ainua Portal do not share the same user identity. This is not a problem for Ainua Portal though as it provides a mechanism to bind different user identities to same Ainua Portal end-user identity via users email address.

Combined identity

client_id is taken from the bearer_token obtained within authentication request using a specific connector in Ainua Portal. This is used for storing the user external identity in Ainua Portal. Good rule of thumb is to use different connector for each back-office integration.

Updating users

Request

PATCH `https://{ainua_url}/integrations/v1/users`

Header

Content-type: application/json
Authorization: Bearer {bearer_token}

Body

{
"{user1_id}":
{
"email":"{user1_email}"
},
"{user2_id}":
{
"email":"{user2_email}"
},
:
}

Request will return 200 OK on success.

To remove a user provide null as user data.

{
"{userX_id}": null,
:
}

Example

Request

PATCH `https://example.ainuaportal.com/integrations/v1/users`

Header

Content-type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1Ni... ...PCBGj6DEN02WOIdzXEQ

Body

{
"user_1000":
{
"email":"user@example.com"
}
}

Response

HTTP/1.0 200 OK