Skip to content

Instantly share code, notes, and snippets.

https://api.wildapricot.org/v2.1/accounts/{ACCOUNT_ID}/contacts?$async=false&$filter='Membership level ID' eq {LEVEL_ID}
<a href="https://itunes.apple.com/app/wild-apricot/id1220348450">
<img src="https://developer.apple.com/app-store/marketing/guidelines/images/badge-download-on-the-app-store.svg">
</a>
@DmitriySmirnov
DmitriySmirnov / gist:8b29429d75e9b66eef9c88d4a647a3e8
Last active December 27, 2017 08:19
How to create a bundle using wild apricot API
Assume you have a bundle level with id = 9378
1. Create bundle admin
POST https://api.wildapricot.org/v2.1/accounts/XXX/contacts
{
"email":"my_bundle_admin@invaliddomain.com",
"membershipLevel": { "id": 9378 },
"membershipEnabled":true,
"fieldValues":[
@DmitriySmirnov
DmitriySmirnov / create_contact.php
Created February 6, 2017 08:52
Create contact with PHP
<?php
//Wild Apricot API helper class
class WaApiClient {
const AUTH_URL = 'https://oauth.wildapricot.org/auth/token';
private $tokenScope = 'auto';
private static $_instance;
private $token;
public function initTokenByContactCredentials($userName, $password, $scope = null) {
@DmitriySmirnov
DmitriySmirnov / gist:6902ba719fc17b9467c2f8633831dba3
Last active May 1, 2019 09:53
Wild apricot: using API from javascript sample
<div>
YOU HAVE TO BE LOGGED IN IN ORDER TO USE THIS PAGE. IF YOU WANT TO TRY THIS FUNCTIONALITY ON YOUR OWN SITE, PLEASE USE <A HREF="https://gist.github.com/DmitriySmirnov/6902ba719fc17b9467c2f8633831dba3">THIS CODE SAMPLE</A>
</div>
<h3>How to get current user info?</h3>
<div>
<a id="whoAmI" href="#">Who am I?</a>
</div>
<h3>How to create new contact (make any POST request)?</h3>
@DmitriySmirnov
DmitriySmirnov / gist:0beda14e93bed7b5dc2f
Last active May 1, 2019 10:08
Access public API from JS
<div>
YOU HAVE TO BE LOGGED IN IN ORDER TO USE THIS PAGE. IF YOU WANT TO TRY THIS FUNCTIONALITY ON YOUR OWN SITE, PLEASE USE <A HREF="https://gist.github.com/DmitriySmirnov/6902ba719fc17b9467c2f8633831dba3">THIS CODE SAMPLE</A>
</div>
<h3>How to get current user info?</h3>
<div>
<a id="whoAmI" href="#">Who am I?</a>
</div>
<h3>How to create new contact (make any POST request)?</h3>
@DmitriySmirnov
DmitriySmirnov / gist:0768302795e76712fa25
Created November 24, 2015 11:13
Create payment with PHP
$waApiClient = WaApiClient::getInstance();
$waApiClient->initTokenByApiKey('put_your_apikey_here');
$url = 'https://api.wildapricot.org/v2/Accounts/XXX/Payments';
// I have converted json to array using http://online-code-generator.com/json-decode.php,
// so I'm no 100% sure it is valid.
$data = Array
(
[Value] => 100,
[Invoices] => Array
@DmitriySmirnov
DmitriySmirnov / gist:002e7d502bb15005b5f3
Created November 24, 2015 11:11
Create new payment JSON
{
"Value":100,
"Invoices":[ { "Id": 1111 } ],
"Tender": { "Id": 2222 },
"Contact": { "Id": 3333 },
"Comment": "Some comment for administrator",
"PublicComment": "Some comment visible for contact"
}