_setCustomerTypes

Parameters

id

The id of the edited Department

val

An array with the IDs of the chosen Customer Types

Example

FM_api(
    'Department_setCustomerTypes',[
        'id' => '337119',
        'val' => json_encode(['60020','60021'])
    ]
);

Results

On Success

{"ok":1}

On Failure

If no 'id' parameter value is given

{"error":"no id supplied"}

If no 'val' parameter value is given

{"error":"no val supplied"}

If the 'val' parameter is not in the correct format

{"error":"val should be a JSON-encoded array of intergers"}

If there is no Department matching the given 'id'

{"error":"department does not exist"}

Last updated