_setPriority

Set the priority of an Appointment Type

Parameters

id

The id of the Appointment Type

priority

The chosen priority of the Appointment Type:

0 = Null, 1 = None, 2 = Low, 3 = Normal, 4 = High, 5 = Top

Example

FM_api(
    'AppointmentType_setPriority',[
        'id' => '122039',
        'priority' => '5'
    ]
);

On Success

{"ok":1}

On Failure

If there's no Appointment Type with the chosen ID

{"error":"job type does not exist"}

If there's no chosen ID or the chosen ID is less than 1

{"error":"missing or invalid parameter: id"}

If the "priority" parameter is less than 0

{"error":"invalid parameter: priority"}

If there is no "priority" parameter value set

{"error":"missing or invalid parameter: priority"}

If the "priority" parameter is higher the amount of priority options available, or the account does not have "appointment-priorities" set.

{"error":"appointment-priorities not found"}

Last updated