I'm using the following query parameters to retrieve all active membership records with the Dynamics 365 Web API (PHP).
$params = array(
"$select" => "member_number,statuscode,statecode",
"$filter" => "statecode eq 1"
);
This returns all active membership records (statecode 1). However, because a particular member can have a soon-to-expire membership and a recently-renewed membership (among others), a single entity can return multiple active records, bloating my results. I only need to know once if an entity is active, not six times.
Is there a way to exclude duplicate records so that I only receive one instance of each active membership record? I'm looking for the Dynamics 365 Web API equivalent of using DISTINCT
in an SQL query.