Profiles API
Ainua Portal Profiles API provides RESTful access for Accounts and Users profile integration. It is designed for integrating profile data from a back-office solution to Ainua Portal. The API does not force any specific profile information but typically it contains information about companys business field and users interests etc.
For added security Profiles API is write-only as are all Ainua Portal API’s.
Updating Account profile data
Request
PATCH `https://{ainua_url}/api/integrations/v1/profile/accounts`
Header
Content-type: application/jsonAuthorization: Bearer {bearer_token}
Body
{ "{account1_external_id}": { "{profile_1_key}": "{profile_1_value}", "{profile_2_key}": "{profile_2_value}", "{profile_3_key}": "{profile_3_value}", : }, :}
Request will return 200 OK
on success.
Example
Request
PATCH `https://example.ainuaportal.com/api/integrations/v1/profile/accounts`
Header
Content-type: application/jsonAuthorization: Bearer eyJhbGciOiJSUzI1Ni... ...PCBGj6DEN02WOIdzXEQ
Body
{ "account_001": { "domain": "Construction", "size": "Medium" }}
Response
HTTP/1.0 200 OK
Updating user profile data
Request
PATCH `https://{ainua_url}/api/integrations/v1/profile/users`
Header
Content-type: application/jsonAuthorization: Bearer {bearer_token}
Body
{ "{user1_external_id}": { "{profile_1_key}": "{profile_1_value}", "{profile_2_key}": "{profile_2_value}", "{profile_3_key}": "{profile_3_value}", : }, :}
Request will return 200 OK
on success.
Example
Request
PATCH `https://example.ainuaportal.com/api/integrations/v1/profile/users`
Header
Content-type: application/jsonAuthorization: Bearer eyJhbGciOiJSUzI1Ni... ...PCBGj6DEN02WOIdzXEQ
Body
{ "user_1000": { "interest": "Sports;Athletics;Skiing", "emailconsent": "Yes" }}
Response
HTTP/1.0 200 OK