Advisor Management Resource
The given set becomes exactly the companies the person advises; companies left out go back to ADMIN. An empty set revokes the advisor.
SessionId
64f8a0e2d5b7c9a1e3f4a5b6Exact set of companies the advisor must advise
Companies to advise. Companies left out lose the ADVISOR role; an empty set revokes the advisor.
64f8a0e2d5b7c9a1e3f4a5b6OK
Person acting as advisor and the companies they advise
Person id
64f8a0e2d5b7c9a1e3f4a5b6Pure advisors advise every company and cannot be edited from the dashboard
PUT /api/v1/company/advisor/advisors/{personId}/companies HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"companyIds": [
"64f8a0e2d5b7c9a1e3f4a5b6"
]
}OK
{
"id": "64f8a0e2d5b7c9a1e3f4a5b6",
"name": "text",
"email": "text",
"pureAdvisor": true,
"companies": [
{
"id": "64f8a0e2d5b7c9a1e3f4a5b6",
"name": "text"
}
]
}Pure advisors and every person with the ADVISOR role on at least one company, sorted by e-mail.
SessionId
OK
Person acting as advisor and the companies they advise
Person id
64f8a0e2d5b7c9a1e3f4a5b6Pure advisors advise every company and cannot be edited from the dashboard
GET /api/v1/company/advisor/advisors HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
OK
[
{
"id": "64f8a0e2d5b7c9a1e3f4a5b6",
"name": "text",
"email": "text",
"pureAdvisor": true,
"companies": [
{
"id": "64f8a0e2d5b7c9a1e3f4a5b6",
"name": "text"
}
]
}
]Turns the person's ADMIN role on the given companies into ADVISOR, keeping the ones already advised. Fails with USER_DOSNT_EXISTS when no person has that e-mail, ADVISOR_REQUIRES_ADMIN when the person is not admin of one of the companies, INVALID_PERMISSIONS_INFO for a missing or unknown company, and PURE_ADVISOR_NOT_MANAGEABLE for a pure advisor.
SessionId
Existing person to make advisor of the given companies
E-mail of a person that already exists in Happyforce
Companies to advise, added to the ones the person already advises
64f8a0e2d5b7c9a1e3f4a5b6OK
Person acting as advisor and the companies they advise
Person id
64f8a0e2d5b7c9a1e3f4a5b6Pure advisors advise every company and cannot be edited from the dashboard
POST /api/v1/company/advisor/advisors HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 58
{
"email": "text",
"companyIds": [
"64f8a0e2d5b7c9a1e3f4a5b6"
]
}OK
{
"id": "64f8a0e2d5b7c9a1e3f4a5b6",
"name": "text",
"email": "text",
"pureAdvisor": true,
"companies": [
{
"id": "64f8a0e2d5b7c9a1e3f4a5b6",
"name": "text"
}
]
}Turns every ADVISOR permission of the person back into ADMIN. Their employee profile and other roles are kept.
SessionId
64f8a0e2d5b7c9a1e3f4a5b6OK
No content
DELETE /api/v1/company/advisor/advisors/{personId} HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
OK
No content
Last updated