The id of the edited Department
An array with the IDs of the chosen Customer Types
FM_api( 'Department_setCustomerTypes',[ 'id' => '337119', 'val' => json_encode(['60020','60021']) ] );
{"ok":1}
If no 'id' parameter value is given
If no 'val' parameter value is given
If the 'val' parameter is not in the correct format
If there is no Department matching the given 'id'
Last updated 3 years ago
{"error":"no id supplied"}
{"error":"no val supplied"}
{"error":"val should be a JSON-encoded array of intergers"}
{"error":"department does not exist"}