0

I have integrated Nexudus to Slack bot, and I want to get the desks information of a coworker user from Nexudus. I can user nexudus coworkers endpoint to get the full information of coworker, and it includes the Desks field in the response body. But the problem is the Desks value is empty array though the user has own desk.

Ping Zhao
  • 266
  • 5
  • 19

1 Answers1

1

The Desks array in the Coworker entity is only used to associate a new customer with one or more desks, it will not have a value for existing customers.

Desks (FloorPlanDesks) in Nexudus are associated to customers (Coworkers) via contracts (CoworkerContracts).

To figure out what desks a customer is using based on the Id of that customer, you can get the list of contracts (https://developers.nexudus.com/reference/search-coworkercontract) by the Id of the customer. You may also want to filter the list to only include active contracts.

GET https://spaces.nexudus.com/api/billing/coworkercontracts?coworkercontract_coworker=:coworkerid&coworkercontract_active=true

The response will provide the following keys which will give you a summary of names and ids for the associated desks to those contracts.

{
"FloorPlanDeskIds": "1004266268,1004270271,1004270272,1079156153",
"FloorPlanDeskNames": "Office 1,Desk 6,Desk 7,Desk 6",
"FloorPlanDeskAreas": null,
}

You can also get the full details of each of the desks associated to a contract or a list of contracts using https://developers.nexudus.com/reference/search-floorplandesk.

https://spaces.nexudus.com/api/sys/floorplandesks?floorplandesk_id=[1004266268,1004270271,1004270272,1079156153]
Nexudus
  • 26
  • 3
  • 3
    Are you affiliated with Nexudus? Support worker? Owner? Answering from a position of deep knowledge is of course appreciated. Just try to avoid confusion caused by your user name please. – Yunnosch Nov 15 '22 at 15:50
  • 1
    Nexudus team here – Nexudus Nov 15 '22 at 16:07
  • 1
    Welcome. Let me mention (in a neutral way, I think you are doing fine) https://stackoverflow.com/help/promotion just to help you. You might want to proudly state your team status in your profile. – Yunnosch Nov 15 '22 at 16:10
  • 1
    Is there any endpoint to get statistics information of one coworker? For example, total checked in counts in this year, or top product coworker ordered, etc – Ping Zhao Nov 21 '22 at 06:08