Using the sample Excel file
To help get you started with Wild Apricot's API, we have provided a sample Windows Excel file that uses API calls – programmed with Visual Basic – to download contact records and other information from a Wild Apricot account. The Excel file provides parameters that you can set to filter the results. You can use this file as is without any further programming or you can modify it according to your organization's requirements.
To download the sample Excel file, click here.
To retrieve contact records using the supplied Excel file, follow these steps:
- Log into your Wild Apricot account as an administrator, find your API key, and copy it to the clipboard.
- Open the Excel file in Excel. If you encounter errors opening the file, enable macros for this file or in your Excel options.
- On the Settings tab, paste your API key into the API key field.
- Click the Download data button.
The following information will be downloaded:
- Account information will now appear on the Settings tab.
- Contact and membership fields will be downloaded to the Fields tab.
- Membership levels will appear on the Levels tab.
- Contact records will be downloaded to the Contacts tab.
- Pivot charts will appear on the Sample Report tab displaying the number of contacts for each combination of membership level and status.
Filtering the search results
You can filter the search results so that only selected records are downloaded. You can filter the records by the following criteria:
Last update – the date the contact record was last updated
Renewal date – the date the contact's membership was last renewed
Membership status – the status of the contact's membership
Membership enabled – whether the contact is a member
Is archived – whether the contact is archived
To filter the search results so that only selected records are downloaded, follow these steps:
- Click the operator cell beside the filter criteria you want to use and select an operator from the list.
- Select a value from the value cell. Do not type the value yourself. The value will be combined with the operator to form the search criteria. For example, to retrieve only records with an active membership status, you would select the equals operator and the Active value from the Membership status row.
- When you are finished setting filter criteria and ready to download your contact records, click the Download data button.
Your filtered results will now appear on the Contacts and the Sample Report tab.
Choosing the fields to be included
You can also control which fields are included in the search results. To do so, follow these steps:
- After entering your API key, click the Download data button on the Settings tab to download your account data.
- Click the Fields tab.
- From the Fields tab, you can prevent fields from being included in the results by clicking the cell under the Include in search results? heading and selecting No from the list.
- After you have chosen the fields to be included in the search results, return to the Settings tab.
- Click the Download data button again.
Your search results will now be displayed on the Contacts tab using only the selected fields.
Viewing the sample code
To view the sample code triggered by the Download data button, follow these steps:
- Right click over the Download data button.
- Select the Assign Macro option from the dialog that appears.
- From the Assign Macro screen, select the DownloadButton macro and click the Edit button.
Visual Basic for Applications will open, and display the DownloadButton macro.