Insights Data Membership APIs

The following APIs are available:

Membership Statistics API

 

The Membership Statistics API returns membership statistics for the specified retention-eligible membership packages.

 

Path:  `/membershipStats`

Verb:  `GET`

 

The amount of data that can be retrieved in a single call is limited to 30 days for a single site.

 

The following table describes the query parameters for the GET method.

 

Parameter Type Required Description
page int   Index page
Default: 1 - first page
pageSize int   Number of records per page
Default: 100
startDate string Yes The start date must be a valid date formatted `yyyy-mm-dd`
No default value
endDate string Yes The end date must be a valid date formatted
`yyyy-mm-dd`
No default value
siteId string   Multiple site ID entries are allowed. Use commas to separate site IDs, e.g. `siteId=4,5,6`
Defaults to all sites
packageCategoryId string   Multiple package category ID entries are allowed. Use commas to separate package category IDs
packageId string   Multiple package ID entries are allowed. Use commas to separate package IDs
statisticsCategory string   Multiple statistics category entries from the following list are allowed:

• `atEnd` members at end of the specified date range

• `atStart` members at start of the specified date range

• `inBranch` members transferred into a branch during the specified date range

• `outBranch` members transferred out of a branch during the specified date range

• `new` members who joined during the specified date range

• `inPackage` members transferred into a package during the specified date range

• `outPackage` members transferred out of a package during the specified date range

• `retained` members with terms expiring that renewed during the specified date range

• `suspended` members suspended during the specified date range

• `reInstated` members returning from a suspension during the specified date range

• `terminated` members who have cancelled or expired and not renewed during the specified date range

 

Defaults to all statistics categories

 

 

The response body of the GET method is formatted in JSON:

 

Key Type Description
page int Requested page number
pageSize int Number of records per page
pageRowCount string Number of records on the Index page
filteredRowCount string Number of filter results by query parameters
data array List of membership statistic records

 

The following table describes the data returned by the API:

 

key Notes
member_id Member's customer ID
member_first_name Member's first name
member_last_name Member's last name
member_address_1 Member's address 1
member_address_2 Member's address 2
member_home_phone Member's home phone
member_work_phone Member's work phone
member_cell_phone Member's cell phone
member_state_province Member's State/Province
member_zip_postalcode Member's Zip/Postal
member_city Member's residential address city
member_county Member's residential address country
member_customer_type Customer type description (For example: Employee, Individual, Non-profit)
member_date_of_birth Customer's birthdate
Format: MM/DD/YYYY
member_email Customer’s email address
member_age Customer's age as of the current date
Displays either blank or the customer's age
member_since_date The date when the customer purchased a valid membership
If the previous membership package expired, then the date when the customer purchased a new package is the new “Member Since Date”
member_resident_status Customer's residency status.
Displays Resident or Non-resident
member_retired_status Customer's retirement status
Displays Retired or Active
package_cancellation_date The date when the membership status was cancelled and the date when the whole membership package was cancelled.
Note:
This is NOT the date when an individual membership sale or membership renewal transaction was cancelled
package_effective_date The membership package's current effective date.
When a membership package is transferred, the Package Effective Date of the new membership will be the day after the transfer date
package_expiration_date The membership package's expiration date
suspended_from_date The date from which the membership package was suspended
(Format: MM/DD/YYYY)
package_transfer_out_date The date the customer transferred out of the package
package_transfer_in_date The date the customer transferred into the package
branch_transfer_out_date The date the customer transferred out to another site
branch_transfer_in_date The date the customer transferred in from another site
cancellation_reason The cancellation reason for the membership cancellation transaction
suspended_to_date The date to which the membership package is suspended
(Format: MM/DD/YYYY)
membership_id The ID of the membership
package_category The package category name
package_name The package name
package_retention_eligible Indicates whether the membership package is a retention eligible membership or not
Displays "Yes" or "No"
package_site Package Site Name
package_term

1. Never expire

2. Specific date range

3. Expire X days after issue

4. Weekly

5. Biweekly

6. Semimonthly

7. Monthly

8. Bimonthly

9. Quarterly

10. Semiannually

11. Annually

membership_pass_number Customer's membership pass number
membership_pass_id Customer's membership pass ID
membership_status The current status of the membership pass
For example, active, cancelled, suspended, voided, etc
packagecategory_id The membership package category ID
package_id The membership package ID
site_id The site ID
alternate_keys

Includes:

• alternate_key_value

• alternate_key_type

• alternate_key_status

Refer to Membership Statistics API examples

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching membership.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/membershipStats?startDate=2016-01-01&endDate=2016-01-31&siteId=1,2,3&packageCategoryId=4,5,6&packageId=8,9,10&statisticsCategory=atend&page=1&api_key=xxx

Example response:

```json

{

    "page": 1,

    "pageSize": 1,

    "pageRowCount": 1,

    "filteredRowCount": 1000,

    "totalRowCount": 10000,

    "data": [

        {

            "member_id": 0,

            "member_first_name": "XXXX",

            "member_last_name": "XXXX",

            "member_address_1": "XXXX",

            "member_address_2": "XXXX",

            "member_home_phone": "XXXX",

            "member_work_phone": "XXXX",

            "member_cell_phone": "XXXX",

            "member_state_province": "XXXX",

            "member_zip_postalcode": "XXXX",

            "member_city": "XXXX",

            "member_county": "XXXX",

            "member_customer_type": "XXXX",

            "member_date_of_birth": "2000/01/01",

            "member_email": "XXX@XXX.com",

            "member_age": 0,

            "member_since_date": "2000/01/01",

            "member_resident_status": "XXXX",

            "member_retired_status": "XXXX",

            "package_cancellation_date": "2000/01/01",

            "package_effective_date": "2000/01/01",

            "package_expiration_date": "2000/01/01",

            "suspended_from_date": "2000/01/01",

            "package_transfer_out_date": "2000/01/01",

            "package_transfer_in_date": "2000/01/01",

            "branch_transfer_out_date": "2000/01/01",

            "branch_transfer_in_date": "2000/01/01",

            "cancellation_reason": "XXXX",

            "suspended_to_date": "2000/01/01",

            "membership_id": 0,

            "package_category": "XXXX",

            "package_name": "XXXX",

            "package_retention_eligible": "XXXX",

            "package_site": "XXXX",

            "package_term": "XXXX",

            "membership_pass_number": "XXXX",

            "membership_pass_id": 0,

            "membership_status": "XXXX",

            "packagecategory_id": 0,

            "package_id": 0,

            "site_id": 0,

            "alternate_keys": [

                {

                    "alternate_key_value": "XXXX",

                    "alternate_key_type": "XXXX",

                    "alternate_key_status": "XXXX"

                }

            ]

        }

    ]

}

```

 

 


Membership Statistics (non-retention-eligible membership packages) API

 

The Membership Statistics API returns membership statistics for the specified non-retention-eligible membership packages.

 

Path:  `/membershipStatsNR`

Verb:  `GET`

 

The amount of data that can be retrieved in a single call is limited to 30 days for a single site.

 

The following table describes the query parameters for the GET method.

 

Parameter Type Required Description
page int   Index page
Default: 1 - first page
pageSize int   Number of records per page
Default: 100
startDate string Yes The start date must be a valid date formatted `yyyy-mm-dd`
No default value
endDate string Yes The end date must be a valid date formatted
`yyyy-mm-dd`
No default value
siteId string   Multiple site ID entries are allowed. Use commas to separate site IDs, e.g. `siteId=4,5,6`
Defaults to all sites
packageCategoryId string   Multiple package category ID entries are allowed. Use commas to separate package category IDs
packageId string   Multiple package ID entries are allowed. Use commas to separate package IDs
statisticsCategory string   Multiple statistics category entries from the following list are allowed:

• `atEnd` members at end of the specified date range

• `atStart` members at start of the specified date range

• `inBranch` members transferred into a branch during the specified date range

• `outBranch` members transferred out of a branch during the specified date range

• `new` members who joined during the specified date range

• `inPackage` members transferred into a package during the specified date range

• `outPackage` members transferred out of a package during the specified date range

• `renewal` members that renewed during the specified date range

• `suspended` members suspended during the specified date range

• `terminated` members who have cancelled or expired and not renewed during the specified date range

 

Defaults to all statistics categories

 

 

The response body of the GET method is formatted in JSON:

 

Key Type Description
page int Requested page number
pageSize int Number of records per page
pageRowCount string Number of records on the Index page
filteredRowCount string Number of filter results by query parameters
data array List of membership statistic records

 

The following table describes the data returned by the API:

 

key Notes
member_id Member's customer ID
member_first_name Member's first name
member_last_name Member's last name
member_address_1 Member's address 1
member_address_2 Member's address 2
member_home_phone Member's home phone
member_work_phone Member's work phone
member_cell_phone Member's cell phone
member_state_province Member's State/Province
member_zip_postalcode Member's Zip/Postal
member_city Member's residential address city
member_county Member's residential address country
member_customer_type Customer type description (For example: Employee, Individual, Non-profit)
member_date_of_birth Customer's birthdate
Format: MM/DD/YYYY
member_email Customer’s email address
member_age Customer's age as of the current date
Displays either blank or the customer's age
member_since_date The date when the customer purchased a valid membership
If the previous membership package expired, then the date when the customer purchased a new package is the new “Member Since Date”
member_resident_status Customer's residency status.
Displays Resident or Non-resident
member_retired_status Customer's retirement status
Displays Retired or Active
package_cancellation_date The date when the membership status was cancelled and the date when the whole membership package was cancelled.
Note:
This is NOT the date when an individual membership sale or membership renewal transaction was cancelled
package_effective_date The membership package's current effective date.
When a membership package is transferred, the Package Effective Date of the new membership will be the day after the transfer date
package_expiration_date The membership package's expiration date
suspended_from_date The date from which the membership package was suspended
(Format: MM/DD/YYYY)
package_transfer_out_date The date the customer transferred out of the package
package_transfer_in_date The date the customer transferred into the package
branch_transfer_out_date The date the customer transferred out to another site
branch_transfer_in_date The date the customer transferred in from another site
cancellation_reason The cancellation reason for the membership cancellation transaction
suspended_to_date The date to which the membership package is suspended
(Format: MM/DD/YYYY)
membership_id The ID of the membership
package_category The package category name
package_name The package name
package_retention_eligible Indicates whether the membership package is a retention eligible membership or not
Displays "Yes" or "No"
package_site Package Site Name
package_term

1. Never expire

2. Specific date range

3. Expire X days after issue

4. Weekly

5. Biweekly

6. Semimonthly

7. Monthly

8. Bimonthly

9. Quarterly

10. Semiannually

11. Annually

membership_pass_number Customer's membership pass number
membership_pass_id Customer's membership pass ID
membership_status The current status of the membership pass
For example, active, cancelled, suspended, voided, etc
packagecategory_id The membership package category ID
package_id The membership package ID
site_id The site ID
alternate_keys

Includes:

• alternate_key_value

• alternate_key_type

• alternate_key_status

Refer to Membership Statistics API examples

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching membership.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/membershipStatsNR?startDate=2019-1-1&endDate=2019-1-31&api_key=***&packageId=508,238,333&statisticsCategory=atStart&siteId=8,13&packageCategoryId=20,6,7&page=1&pageSize=10

Example response:

```json

{

  "page": 1,

  "pageSize": 10,

  "pageRowCount": 2,

  "filteredRowCount": 2,

  "totalRowCount": 135,

  "data": [

    {

      "member_id": 737,

      "member_first_name": "Tom",

      "member_last_name": "Never",

      "member_address_1": "1",

      "member_address_2": "",

      "member_home_phone": "1111111111",

      "member_work_phone": "",

      "member_cell_phone": "",

      "member_state_province": "DC",

      "member_zip_postalcode": "20506",

      "member_city": "1",

      "member_county": "Unknown",

      "member_customer_type": "General Public",

      "member_email": "",

      "member_gender": "Female",

      "member_since_date": "2015-08-30 00:00:00.0",

      "member_resident_status": "Non-resident",

      "member_retired_status": "Active",

      "package_effective_date": "2015-08-30 00:00:00.0",

      "membership_id": 402,

      "package_category": "Senior",

      "package_name": "Package_Never_Exp",

      "package_retention_eligible": "No",

      "package_site": "Tom Site",

      "package_term": "Specific date",

      "membership_pass_number": "000000000228",

      "membership_pass_id": 227,

      "membership_status": "Active",

      "packagecategory_id": 6,

      "package_id": 238,

      "site_id": 8

    },

    {

      "member_id": 939,

      "member_first_name": "M8",

      "member_last_name": "Zhao",

      "member_address_1": "SFGSDG",

      "member_address_2": "",

      "member_home_phone": "5552154789",

      "member_work_phone": "",

      "member_cell_phone": "",

      "member_state_province": "AB",

      "member_zip_postalcode": "D1D 1D1",

      "member_city": "GSDG",

      "member_county": "Unknown",

      "member_customer_type": "General Public",

      "member_date_of_birth": "1968-12-09 00:00:00.0",

      "member_email": "",

      "member_gender": "Male",

      "member_age": 52,

      "member_since_date": "2015-12-08 00:00:00.0",

      "member_resident_status": "Non-resident",

      "member_retired_status": "Active",

      "package_effective_date": "2015-12-08 00:00:00.0",

      "membership_id": 676,

      "package_category": "Roshow Non Retention Eligible Category",

      "package_name": "Roshow Mem15-Punch Pass-max uses per day",

      "package_retention_eligible": "No",

      "package_site": "Roshow Test Site1",

      "package_term": "Specific date",

      "membership_pass_number": "000000000405",

      "membership_pass_id": 404,

      "membership_status": "Active",

      "packagecategory_id": 20,

      "package_id": 333,

      "site_id": 13

    }

  ]

}

```

 


Package Categories API

The Package Categories API returns package category IDs and names in your organization.

Each package category is a single record.

 

Path:  `/packagecategories`

Verb:  `GET`

 

The following table describes the query parameters for the GET method.

Parameter Type Required Description
startWith string   Package category names that start with the specified string are returned.
packageCategoryId string   Multiple package category ID entries are allowed. Use commas to separate package category IDs

 

 

The response body of the GET method is formatted in JSON:

Key Type Description
data array List of customer records

 

The following table describes the data returned by the API:

Key Description
packageCategoryId Package category ID
categoryName Package category name
retentionEligible

Indicates whether the membership category is a retention eligible or not

Displays "Y" or "N"

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching membership package category.

 

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/packagecategories?api_key=xxx

Example response

```json

[

  {

    "packageCategoryId": 1,

    "categoryName": "This Package"

  },

  {

    "packageCategoryId": 2,

    "categoryName": "That Package"

  }

]

```

 

 


Membership Packages API

The Membership Packages API returns a list of membership packages in your organization.

 

Path:  `/packages`

Verb:  `GET`

 

The following table describes the query parameters for the GET method.

Parameter Type Required Description
startWith string   Package names that start with the specified string are returned.
siteId string   Multiple site ID entries are allowed. Use commas to separate site IDs, e.g. `siteId=4,5,6`
Defaults to all sites
packageCategoryId string   Multiple package category ID entries are allowed. Use commas to separate package category IDs
packageId string   Multiple package ID entries are allowed. Use commas to separate package IDs

 

 

The response body of the GET method is formatted in JSON:

Key Type Description
data array list of membership packages records

 

The following table describes the data returned by the API:

Key Description
packageId The Membership package ID

packageName

The Membership package name

siteId

The Site ID

packageCategoryId

The Package Category ID

categoryName

Name of the package category

status

The status of the package. Open or Closed.

number_of_Uses_Available

The number of uses that are available.

family_Membership_Package

Whether the membership package is a family package.

(“Yes” or “No”)

entry_point

Names of the selected entry points for this membership package.

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching membership package.

 

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/packages?siteID=123&api_key=xxx

Example response

```json

[

    {

        "packageId": 180,

        "packageName": "Membership Package 001",

        "siteId": "6",

        "packageCategoryId": 5,

        "categoryName": "Adult",

        "status": "open",

        "number_of_Uses_Available": 10,

        "family_Membership_Package": "N",

        "entry_Points": [

            {

                "entry_point": "Entry point 01"

            }

        ]

    }

]

```

 

Memberships API

The Memberships API returns memberships that were last updated during the specified date and time range.

 

Path:  `/memberships`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

Parameter Type Required Description
page_number int   Index page
default: 1 (the first page)
total_records_per_page int   Number of records per page
default: 100
maximum: 32768
package_id string   Requested package IDs. Use commas to separate activity IDs.

modified_date_from

datetime yes

Memberships last updated on or after the specified date and time are returned (HH:MM is optional).

modified_date_to

datetime yes

Memberships last updated on or before the specified date and time are returned (HH:MM is optional).

 

Note that this API only retrieves a maximum of 31 days in a single request.

The response body of the GET method is formatted in JSON. The headers section is as follows:

Key Type Description
total_records int The total number of unfiltered records
total_records_per_page int The total unfiltered records per page (by default, 100 records are returned per page)
total_pages int Calculated number of pages based on total_records and total_record_per_page

filtered_records

int The total number of filtered records (This applies to any additional filtering beyond date period. If no additional filters are provided or the API does not support additional filtering then total_records will be returned)
filtered_page int The total number of filtered pages (same as above but for pages)
page_records int The total number of records on the current page

page_number

int The current page number
last_sync_date datetime The date and time when the Insights database was last synchronized. for the calling organization. UTC time.

The following table describes the data returned by the API:

Key Type Description
customer_id int Customer ID
package_id int The package ID of the customer's membership.
customer_first_name String The first name of the customer.
customer_last_name String The last name of the customer.
customer_since_date Date The date when the customer account was created.
primary_member_first_name String The first name of the primary member to which the membership package is assigned.
primary_member_last_name String The last name of the primary member to which the membership package is assigned.
member_since_date Date The original date on which the customer purchased a valid retention eligible membership within the defined retention period. For a single customer, there is only one member since date.
membership_id int The membership ID.
primary_member_customer_id int The primary customer ID to which the membership package is assigned.
membership_status String The status (active, expired, suspended, canceled, etc.) of the membership package.
effective_date Date The effective date of the membership package.
expiration_date Date The expiration date of the membership package.
automatic_renewal boolean Whether automatic renewal is enabled for the membership package.
last_renewed_date Date The most recent renewal date for the membership package.
suspended_from_date Date The date from which the membership package was suspended.
suspended_until_date Date The date to which the membership package is suspended.
scheduled_automatic_cancellation boolean Whether the membership package is scheduled for a future automatic cancellation at renewal.
scheduled_automatic_cancellation_date Date The date when the automatic cancellation at renewal will be executed.
automatic_cancellation_reason String The reason the member stopped the automatic renewal of the membership package.
scheduled_cancellation boolean Whether the membership package is scheduled for a future cancellation.
scheduled_cancellation_date Date The date when the scheduled cancellation will be executed.
scheduled_cancellation_reason String The reason the membership package is scheduled for a future cancellation.
total_number_of_uses int The maximum number of uses/punches available for the membership package, when the membership package has defined usage restrictions.
number_of_uses_used int The number of uses/punches that were used for the membership package, when the membership package has defined usage restrictions.
remaining_number_of_uses_left int The remaining number of uses/punches available for the membership package, when the membership package has defined usage restrictions.
package_name String The name of the membership package.
package_site_id int The ID of the membership package’s associated site.
package_category_id int The ID of the membership package’s associated category.
package_category_name String The name of the membership package’s associated category.
family_package boolean Whether a package is a family package or not.
entry_point String The entry points to which the pass holder of the membership package can access.
package_retention_eligible boolean Whether a package is a retention eligible package or not.
member_pass_number String The pass number on the member’s pass card associated with the membership package.
primary_member_pass_number String The pass number on the primary member’s pass card associated with the membership package.
suspension_reason String The reason the membership package is suspended.
cancellation_date Date The termination date for the whole membership package. Note, the cancellation upon a single renewal period of a membership package is not considered as a membership cancellation. 
Only when the membership status of the membership package is changed to 'cancelled' and the whole membership package is cancelled, then the membership package is consider as cancelled.
cancellation_reason String The reason the membership package was terminated.
modified_date_time Datetime The latest modified date and time of the membership.

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching activity enrollment.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/memberships?modified_date_from=2018-10-01&modified_date_to=2018-10-31api_key=xxx

Example response

{

    "headers": {

        "response_code": "0000",

        "response_message": "Successful",

        "page_info": {

            "total_records": 1,

            "total_records_per_page": 11111,

            "total_page": 1,

            "filtered_records": 1,

            "filtered_page": 1,

            "page_records": 1,

            "page_number": 1,

            "last_sync_date": "2019-05-15 06:30:06.52"

        }

    },

    "body": [

        {

            "customer_id": 7806,

            "package_id": 296,

            "customer_first_name": "xxx",

            "customer_last_name": "xxx",

            "customer_since_date": "2018-10-01",

            "primary_member_first_name": "xxx",

            "primary_member_last_name": "xxx",

            "member_since_date": "2018-10-01",

            "membership_id": 4909,

            "primary_member_customer_id": 7806,

            "membership_status": "Active",

            "effective_date": "2018-10-01",

            "expiration_date": "2018-10-08",

            "automatic_renewal": false,

            "scheduled_automatic_cancellation": false,

            "scheduled_cancellation": false,

            "total_number_of_uses": 0,

            "number_of_uses_used": 0,

            "remaining_number_of_uses_left": 0,

            "package_name": "Retention weekly Pass",

            "package_site_id": 4,

            "package_category_id": 9,

            "family_package": false,

            "package_retention_eligible": true,

            "member_pass_number": "000000001482",

            "primary_member_pass_number": "000000001482",

            "modified_date_time": "2018-10-01 15:03:00.0"

        }

    ]

}

 

 

 

Membership Audit Log API

The Membership Audit Log API returns the audit log history for membership purchases and updates during the specified date and time range.

 

Path:  `/membershipAuditLog`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

Parameter Type Required Description
page_number int   Index page
default: 1 (the first page)
total_records_per_page int   Number of records per page
default: 100
maximum: 32768

datestamp_from

datetime yes

Memberships last updated on or after the specified date and time are returned.

Format: YYYY/MM/DD HH:MM:SS.SSS (HH:MM:SS.SSS is optional)

datestamp_to

datetime yes

Memberships last updated on or before the specified date and time are returned.

Format: YYYY/MM/DD HH:MM:SS.SSS (HH:MM:SS.SSS is optional)

 

Note that this API only retrieves a maximum of 31 days in a single request.

The response body of the GET method is formatted in JSON. The headers section is as follows:

Key Type Description
total_records int The total number of unfiltered records
total_records_per_page int The total unfiltered records per page (by default, 100 records are returned per page)
total_pages int Calculated number of pages based on total_records and total_record_per_page

filtered_records

int The total number of filtered records (This applies to any additional filtering beyond date period. If no additional filters are provided or the API does not support additional filtering then total_records will be returned)
filtered_page int The total number of filtered pages (same as above but for pages)
page_records int The total number of records on the current page

page_number

int The current page number
last_sync_date datetime The date and time when the Insights database was last synchronized. for the calling organization. UTC time.

The following table describes the data returned by the API:

Key Description
membership_history_id This membership history ID is for troubleshooting purposes
beg_datestamp The date and time the membership enters a status as a result of either a transaction or a manual change on the Membership Inquiry page
end_datestamp The date and time the membership exits a status as a result of either a transaction or a manual change on the Membership Inquiry page
history_transaction_type

This indicates the origin or cause of the membership change:

  • 0 None
  • 1 Join
  • 2 Transfer
  • 3 Renew
  • 4 Renew After Grace
  • 5 Refund And Cancel
  • 6 Refund
  • 7 Fee Adjust
  • 8 Modify
  • 9 Pass Refund
  • 20 Status Change
  • 21 Becomes Effective
  • 22 Becomes Suspended
  • 23 Becomes Unsuspended
voided Whether this transaction has been voided
transaction_id The transaction ID of the transaction type for the membership change.
membership_id Membership ID
system_user_first_name First name of the system user
system_user_last_name Last name of the system user
workstation_name The name of the workstation where the membership change was made
package_id The ID of the membership package
package_name Name of the membership package
membership_status Membership status, including Pending, Active, Voided, Refunded, Renewing, Deferred Commit
date_effective The date when the membership became effective
date_expires The expiry date of the membership
date_suspend_from The date when the membership was suspended
date_suspend_to The date when the membership's suspension ended
autorenewal_type

The payment method selected for an auto-renewal membership

  • 0 Not autorenewed
  • 1 By credit card
  • 2 By EFT
  • 3 By manual deduction
  • 4 By payment plan
suspended_reason

The reason this package was suspended

primarymembercustomer_id The ID for the primary member
member_first_name First name of the primary member
member_last_name Last name of the primary member
max_uses For a punch card membership, this is the maximum number of uses for this membership (not the remaining number of uses)
package_category_id The ID of the package category
package_category_name Package Category Name
site_id The ID of the site to which this package belongs
site_name The name of the site to which this package belongs
package_retention_eligible Whether this package is a retention eligible package
member_since_date

The date when the customer purchased a valid membership

If the previous membership package expired, then the date when the customer purchased a new package is the new “Member Since Date”

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching membership change.

Example request

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/membershipAuditLog?datestamp_from=2018-10-01&datestamp_to=2018-11-01&api_key=xxx

Example response

{

    "headers": {

        "response_code": "0000",

        "response_message": "Successful",

        "page_info": {

            "total_records": 9,

            "total_records_per_page": 1,

            "total_page": 9,

            "filtered_records": 9,

            "filtered_page": 9,

            "page_records": 1,

            "page_number": 1,

            "last_sync_date": "2019-06-13 08:15:05.147"

        }

    },

    "body": [

        {

            "membership_history_id": 123,

            "beg_datestamp": "2018-10-01 00:00:54.373",

            "end_datestamp": "2018-10-30 00:00:00.0",

            "history_transaction_type": "Status Change",

            "voided": false,

            "transaction_id": 0,

            "membership_id": 4902,

            "system_user_first_name": "xxx",

            "system_user_last_name": "xxx",

            "package_id": 123,

            "package_name": "xxx - Monthly 3rd party",

            "membership_status": "Active",

            "date_effective": "2018-09-29",

            "date_expires": "2018-10-29",

            "autorenewal_type": "Not autorenewed",

            "primarymembercustomer_id": 7746,

            "member_first_name": "xxx",

            "member_last_name": "xxx",

            "max_uses": 0,

            "package_category_id": 5,

            "package_category_name": "Adult",

            "site_id": 6,

            "site_name": "site123",

            "package_retention_eligible": false

        }

    ]

}

Verify Membership API

The Verify Membership API returns memberships for a given customer, by specifying either the customer’s ID or email address.

 

Path:  `/verifyMembership`

Verb:  `GET`

 

The following table describes the query parameters used for the GET method.

Parameter Type Required Description

customer_id

string no Requested customer ID.
 
Required if customer_email is not specified.

customer_email

string no Requested customer email address.
 
Required if customer_id is not specified.

retention_eligible_only

string no

Allows 0 (include all membership types) or 1 (only include retention eligible memberships).

 

Defaults to 1 if not specified.

include_expired_memberships

string no

Allows 0 (exclude expired memberships) or 1 (include expired memberships).

 

Defaults to 0 if not specified.

include_cancelled_memberships

string no

Allows 0 (exclude cancelled memberships) or 1 (include cancelled memberships).

 

Defaults to 0 if not specified.

The response body of the GET method is formatted in JSON. The following table describes the data returned by the API:

Key Type Description

customer_id

int Customer ID

customer_first_name

string The first name of the customer.
customer_last_name string The last name of the customer.
customer_email

string

The email address of the customer.

customer_pass_number string The pass number on the member’s pass card associated with the membership package.

membership_id

int The membership ID.
membership_status string The status (active, expired, suspended, canceled, etc.) of the membership package.
effective_date date The effective date of the membership package.
expiration_date date The expiration date of the membership package.
suspended_from_date date The date from which the membership package was suspended.
suspended_to_date date The date to which the membership package is suspended.
package_id int The package ID of the customer's membership.
package_name string The name of the membership package.
retention_eligible boolean Whether or not a package is a retention eligible package.
family_membership boolean Whether or not a package is a family package.
punches_purchased int The maximum number of uses/punches available for the membership package, when the membership package has defined usage restrictions.
punches_used int The number of uses/punches that were used for the membership package, when the membership package has defined usage restrictions.
punches_remaining int The remaining number of uses/punches available for the membership package, when the membership package has defined usage restrictions.
punch_pass_expired_on date The date when the final remaining use/punch was used.
primary_member_customer_id int The primary customer ID to which the membership package is assigned.
primary_member_first_name string The first name of the primary member to which the membership package is assigned.
primary_member_last_name string The last name of the primary member to which the membership package is assigned.
primary_member_email string The email address of the primary member to which the membership package is assigned.
primary_member_pass_number string The pass number on the primary member’s pass card associated with the membership package.
cancelled_on_date date The latest date that the cancelled membership was valid on.

Responses

This API will retrieve multiple records per API call depending on the specified request parameters.

One record will contain all information of a matching customer membership.

Example requests

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/verifyMembership?customer_id=12345&retention_eligible_only=0&include_ expired_memberships=0&include_cancelled_memberships=0&api_key=xxxxx&sig=yyyyy

 

 

**GET**

https://api.amp.active.com/ANETGateway/rest/anet-insightsapi/verifyMembership?customer_email= erincombs@nomail.com &retention_eligible_only=0&include_expired_memberships=0&include_cancelled_ memberships=0&api_key=xxxxx&sig=yyyyy

Example response

[{

   "customer_id": 12345,

   "customer_first_name": "Erin",

   "customer_last_name": "Combs",

   "customer_email": "erincombs@nomail.com",

   "customer_pass_number": "K12345",

   "membership_id": 54321,

   "membership_status": "Suspended",

   "effective_date": "2011-12-21",

   "expiration_date": "2040-09-02",

   "suspended_from_date": "2020-07-01",

   "suspended_to_date": "2040-09-02",

   "package_id": 200,

   "package_name": "Legacy Stay Fit Adult Pass",

   "retention_eligible": false,

   "family_membership": false,

   "primary_member_customer_id": 12345,

   "primary_member_first_name": "Erin",

   "primary_member_last_name": "Combs",

   "primary_member_email": " erincombs@nomail.com ",

   "primary_member_pass_number": " K12345"

}, {

   "customer_id": 12345,

   "customer_first_name": "Erin",

   "customer_last_name": "Combs",

   "customer_email": "erincombs@nomail.com",

   "customer_pass_number": "K12345",

   "membership_id": 610116,

   "membership_status": "Expired",

   "effective_date": "2019-04-02",

   "expiration_date": "2020-04-02",

   "package_id": 2202,

   "package_name": "Personal Training Express Card",

   "retention_eligible": false,

   "family_membership": false,

   "punches_purchased": 8,

   "punches_used": 1,

   "punches_remaining": 7,

   "primary_member_customer_id": 12345,

   "primary_member_first_name": "Erin",

   "primary_member_last_name": "Combs",

   "primary_member_email": " erincombs@nomail.com ",

   "primary_member_pass_number": " K12345"

   "cancelled_on_date": "2020-04-02"

}]

 

Related topics

Getting Started Guide

Authentication

Retrieving data from ACTIVE Net Insights

Common parameters

Error handling