Assigning Advisors to Clients
Assign an advisor in your workspace to a client.
The assign advisor endpoint assigns an advisor to a client in your workspace. The client is a member of your workspace who is not an advisor. You can assign an advisor right after you create them, before they sign in.
A client can have at most two advisors.
This endpoint works only in workspaces that have client assignment turned on. Contact Taxfyle to turn on client assignment for your workspace.
Endpoint
| Method | Url |
|---|---|
PUT | /v1.0/members/{client_id}/advisors/{advisor_id} |
Path Parameters
The user ID of the client.
The user ID of the advisor.
Sample Request
bashCopied1curl -X PUT 'https://api.worklayer.com/v1.0/members/a6e5ea2f-7d96-4852-9f46-2383dfd572f7/advisors/3f6c2a8e-91b4-4d7a-b0e5-6c1d9f2a7e43' \2-H 'Authorization: Bearer {token}'
Response
The user ID of the client.
The user IDs of all the advisors assigned to the client.
It is safe to retry this request. If the advisor is already assigned to the client, the request changes nothing and returns the same response.
Sample Response
jsonCopied1{2 "client_id": "a6e5ea2f-7d96-4852-9f46-2383dfd572f7",3 "advisor_ids": [4 "3f6c2a8e-91b4-4d7a-b0e5-6c1d9f2a7e43"5 ]6}
Errors
Forbidden: API Client cannot assign advisors to clients.Unauthorized: API Client does not have valid credentials.BadRequest: The client is not a client in your workspace, the advisor is not an advisor in your workspace, the client already has two advisors, the workspace does not have client assignment turned on, or the request was malformed.
See Error handling for the shape of the error response body.