Error in API: /scheduling/jobs/find_any_available_space


#1

According to the API docs, the parameters you need to get available space for jobs are:

  • start_date
  • end_date
  • length_in_minutes
  • job_type_id

This was working for me when I last tried it a month ago. But now I get a 422 Unprocessable Entity error with the following response:

{
  "error": {
    "message": {
      "entityType": "The entity type field is required.",
      "entityId": "The entity id field is required."
    },
    "status_code": 422
  }
}

I don’t understand what it’s asking for exactly.

Was there a change in 1.7 that modified this endpoint? And are the API docs going to be updated?


#2

Reporting back.

The entityType is ‘account’ and the entityId is the id of a user, presumably the customer you are scheduling the job for.

What role does the user id play in the lookup routine for tech availability?

If I’m trying to display avaiable job times on a customer-facing signup form, I now have to split up my form in order to create the user first—only then can I query available job space and show that on a form. Or could I just use a dummy user to lookup available space right off the bat?


#3

It’s to check geofencing. I’ll update the docs.


#4

I am also seeing the same issue and cannot see an update to the docs as yet? Any updates?


#5

They are updated inside Sonar, check the docs under the system menu.