visits.changeRequests

Customers' requests to move or cancel a visit, from the customer hub, newest first. Defaults to open ones. Owner or office only; answer with visits.answerChange.

WhoAgents can call this
RESTGET /v1/visits/changeRequests
MCP toolvisits_changeRequests
Writesno
AreaScheduling and visits

When to use it

Customers' requests to move or cancel a visit, from the customer hub, newest first. Defaults to open ones.

What to tell the owner

Tell them what you found in plain words. Don't read back raw fields.

Input

FieldTypeRequired
shop_idstring (uuid)yes
statusstring (one of open, accepted, declined, withdrawn, all)no
visit_idstring (uuid)no
limitintegerno

Example

GET https://doingwork.work/v1/visits/changeRequests?shop_id=00000000-0000-4000-8000-000000000000

Output

FieldTypeAlways there
change_requestsarrayyes
change_requests[].change_request_idstring (uuid)yes
change_requests[].visit_idstring (uuid)yes
change_requests[].job_idstring (uuid)yes
change_requests[].customer_idstring (uuid)yes
change_requests[].customer_namestringyes
change_requests[].kindstringyes
change_requests[].preferred_times['string', 'null']yes
change_requests[].note['string', 'null']yes
change_requests[].visit_starts_atstring (date-time)yes
change_requests[].visit_now_starts_atstring (date-time)yes
change_requests[].visit_statusstringyes
change_requests[].statusstringyes
change_requests[].requested_bystring (uuid)yes
change_requests[].created_atstring (date-time)yes
change_requests[].answered_by['string', 'null', ' ', '(', 'u', 'u', 'i', 'd', ')']yes
change_requests[].answered_at['string', 'null', ' ', '(', 'd', 'a', 't', 'e', '-', 't', 'i', 'm', 'e', ')']yes
change_requests[].answer_note['string', 'null']yes
change_requests[].appliedbooleanyes
{
  "change_requests": [
    {
      "change_request_id": "00000000-0000-4000-8000-000000000000",
      "visit_id": "00000000-0000-4000-8000-000000000000",
      "job_id": "00000000-0000-4000-8000-000000000000",
      "customer_id": "00000000-0000-4000-8000-000000000000",
      "customer_name": "...",
      "kind": "...",
      "preferred_times": "...",
      "note": "...",
      "visit_starts_at": "...",
      "visit_now_starts_at": "...",
      "visit_status": "...",
      "status": "...",
      "requested_by": "00000000-0000-4000-8000-000000000000",
      "created_at": "...",
      "answered_by": "00000000-0000-4000-8000-000000000000",
      "answered_at": "...",
      "answer_note": "...",
      "applied": true
    }
  ]
}

Errors

CodeStatusWhat to do
invalid_input, invalid_token, rate_limitedCan happen on any call. See errors.