This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://api.wildapricot.org/v2.1/accounts/{ACCOUNT_ID}/contacts?$async=false&$filter='Membership level ID' eq {LEVEL_ID} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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":[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Value":100, | |
| "Invoices":[ { "Id": 1111 } ], | |
| "Tender": { "Id": 2222 }, | |
| "Contact": { "Id": 3333 }, | |
| "Comment": "Some comment for administrator", | |
| "PublicComment": "Some comment visible for contact" | |
| } |