Additional Examples
Filtering on Member Type and Expiration Date using the API
The i4a system can be configured to use the Individual Database Model or the Organizational Database Model. The simplest way to determine the database model is to check for the presence of Manage Organizations on the Membership dropdown menu in the i4a system. If it is present, the system is configured to use the Organizational Database Model, and if it is absent, it is using the Individual Database Model.
Below are some examples specific to each database model:
Individual Database Model Examples
The examples below uses the view ams_contactinformation_membertype. This view should only be used with the i4a Individual Database Model:
- /i4a/api/json/view.ams_contactinformation_membertype/membertype=Regular/<authkey> - This example's only purpose is to show how you could filter for a specific member type using this view. The search string "Regular" should be replaced by the name of a member type that exists in the database you are querying. Returns a json packet that contains all matching records where the member type is Regular. Current and expired members would be returned in this example.
- /i4a/api/json/view.ams_contactinformation_membertype/membertype is not null/<authkey> - Returns a json packet that contains all matching records that have a member type. Current and expired members would be returned in this example.
- /i4a/api/json/view.ams_contactinformation_membertype/membertype is not null/<authkey> - Returns a json packet that contains all matching records that have a member type. Current and expired members would be returned in this example.
Organizational Database Model Examples
- /i4a/api/json/view.ams_contactinformation_corptype/corptype=Regular/<authkey> - This example's only purpose is to show how you could filter for a specific member type using this view. In this specific view, the member type field is called corptype. The search string "Regular" should be replaced by the name of a member type that exists in the database you are querying. Returns a json packet that contains all matching records where the member type is Regular.