diff --git a/lib/NGCP/Panel/Controller/API/Subscribers.pm b/lib/NGCP/Panel/Controller/API/Subscribers.pm index ce117d727d..f10784cdb5 100644 --- a/lib/NGCP/Panel/Controller/API/Subscribers.pm +++ b/lib/NGCP/Panel/Controller/API/Subscribers.pm @@ -83,6 +83,19 @@ class_has 'query_params' => ( }, }, }, + { + param => 'customer_external_id', + description => 'Filter for subscribers of a specific customer external_id.', + query => { + first => sub { + my $q = shift; + return { 'contract.external_id' => { like => $q } }; + }, + second => sub { + return { join => 'contract' }; + }, + }, + }, { param => 'is_pbx_group', description => 'Filter for subscribers who are (not) pbx_groups.',