request_method === 'PUT') { $API_companies->checkPermissions('customer-companies', 'RW'); # when called from the frontend will not be forwarding to a url since when its called from the frontend it doesnt need a redirection $API_companies->return_url = false; $requiredFields = [ 'company_uuid' => ['type' => 'uuid'], 'company_state' => ['type' => 'enum', 'values' => ['active', 'imported', 'orphaned']] ]; $API_companies->validateData($requiredFields); $API_companies->updateCompanyState(); }