Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Advisor Management Resource

Replace the companies an advisor advises

put

The given set becomes exactly the companies the person advises; companies left out go back to ADMIN. An empty set revokes the advisor.

Authorizations
SessionIdstringRequired

SessionId

Path parameters
personIdstringRequiredExample: 64f8a0e2d5b7c9a1e3f4a5b6
Body

Exact set of companies the advisor must advise

companyIdsstring[]Required

Companies to advise. Companies left out lose the ADVISOR role; an empty set revokes the advisor.

Example: 64f8a0e2d5b7c9a1e3f4a5b6
Responses
200

OK

*/*

Person acting as advisor and the companies they advise

idstringOptional

Person id

Example: 64f8a0e2d5b7c9a1e3f4a5b6
namestringOptional
emailstringOptional
pureAdvisorbooleanOptional

Pure advisors advise every company and cannot be edited from the dashboard

put/api/v1/company/advisor/advisors/{personId}/companies
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"
  ]
}
200

OK

{
  "id": "64f8a0e2d5b7c9a1e3f4a5b6",
  "name": "text",
  "email": "text",
  "pureAdvisor": true,
  "companies": [
    {
      "id": "64f8a0e2d5b7c9a1e3f4a5b6",
      "name": "text"
    }
  ]
}

List advisors

get

Pure advisors and every person with the ADVISOR role on at least one company, sorted by e-mail.

Authorizations
SessionIdstringRequired

SessionId

Responses
200

OK

*/*

Person acting as advisor and the companies they advise

idstringOptional

Person id

Example: 64f8a0e2d5b7c9a1e3f4a5b6
namestringOptional
emailstringOptional
pureAdvisorbooleanOptional

Pure advisors advise every company and cannot be edited from the dashboard

get/api/v1/company/advisor/advisors
GET /api/v1/company/advisor/advisors HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
200

OK

[
  {
    "id": "64f8a0e2d5b7c9a1e3f4a5b6",
    "name": "text",
    "email": "text",
    "pureAdvisor": true,
    "companies": [
      {
        "id": "64f8a0e2d5b7c9a1e3f4a5b6",
        "name": "text"
      }
    ]
  }
]

Promote an admin to advisor of some companies

post

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.

Authorizations
SessionIdstringRequired

SessionId

Body

Existing person to make advisor of the given companies

emailstringRequired

E-mail of a person that already exists in Happyforce

companyIdsstring[]Required

Companies to advise, added to the ones the person already advises

Example: 64f8a0e2d5b7c9a1e3f4a5b6
Responses
200

OK

*/*

Person acting as advisor and the companies they advise

idstringOptional

Person id

Example: 64f8a0e2d5b7c9a1e3f4a5b6
namestringOptional
emailstringOptional
pureAdvisorbooleanOptional

Pure advisors advise every company and cannot be edited from the dashboard

post/api/v1/company/advisor/advisors
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"
  ]
}
200

OK

{
  "id": "64f8a0e2d5b7c9a1e3f4a5b6",
  "name": "text",
  "email": "text",
  "pureAdvisor": true,
  "companies": [
    {
      "id": "64f8a0e2d5b7c9a1e3f4a5b6",
      "name": "text"
    }
  ]
}

Revoke an advisor

delete

Turns every ADVISOR permission of the person back into ADMIN. Their employee profile and other roles are kept.

Authorizations
SessionIdstringRequired

SessionId

Path parameters
personIdstringRequiredExample: 64f8a0e2d5b7c9a1e3f4a5b6
Responses
200

OK

No content

delete/api/v1/company/advisor/advisors/{personId}
DELETE /api/v1/company/advisor/advisors/{personId} HTTP/1.1
Host: api.happyforce.com
SessionId: YOUR_API_KEY
Accept: */*
200

OK

No content

Last updated