Skip to content

addAppointment

Deprecated

This endpoint will stop working on 1 August 2027. Migrate to POST /classic/appointments in the new API; the migration guide has the recommended order of work and the important model differences.

POST /classic/appointments is a compatibility wrapper around the legacy endpoint. It preserves full legacy semantics (pooled resourceId="" bookings, zoneCriteria, allowSecondary) and the same body/response shape, but is served under the new authentication (JWT). POST /v1/appointments exists but requires resourceId and does not support pooled booking. Migrate to the classic wrapper now; the v1 endpoint will be the long-term home once it gains pooled support.

Open POST /classic/appointments in the new API →

View legacy reference

/rest/rs/addAppointment/

POST
Adds fixed or pooled appointment with given activities to a job. Uses override priorities to allow to book conflicting appointments.
- allow no activities to be specified - in this case will use all currently unappointed activities
- allow blank resourceId - if not provided a pooled appointment will be created
- add optional clientRef field which, when set, will set the client_ref on the appointment record
- Zone Criteria will determine what resource postcode coverage it will use. The options would be primary coverage only, primary and secondary or override the check and allow any postcode to be used. 
- AllowSecondary refers to resource services. By default, it will default to 1 so the appointment will look for resources who have the service as primary or secondary. 

acceptable request representations:

  • application/json
{
    "jobRef" : "1234",
    "activities" : [{"id":"3"}, {"id":"42"}], //list of unassigned activity ids
    "startDate" : "12/02/2012",
    "startTime" : "9:23",
    "duration" : "60", //in minutes
    "resourceId" : "253",  //optional - if not provided a pooled appointment will be created
    "clientRef" : "abc123", //optional
    "notes": "Additional app required due to ...",
"overridePriorities":"1", // 1 = true, 0 = False (If not included then this defaults to 1)
"zoneCriteria" : "ANY", //Options are Primary, Both, Any (If not included then default to Primary)
"allowSecondary" : "1", //1 = true, 0 = false (If not included then this defaults to 1 so it will include seconday)
"sendNotification":"1" // 1 = True, 0 = False (If not included then this defaults to 0) 
}


success response representation:

  • application/json
{
    "appointmentId" : "1234",
    "result" : "success",
    "result_msg" : ""
}


error response representation:

  • application/json
{
    "appointmentId" : "1234",
    "result" : "fail",
    "result_msg" : "<Oneserve error code>",
    "result_error_msg" : "<Oneserve error details>"

}


Notes 

See the Resource Scheduler API matrix for the full list of endpoints in this category.