Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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":[
{
"fieldName":"Member role",
"value": "Bundle administrator"
}
]
}
2. As a result of POST operation you will get a json of new contact.
So find a record in FieldValues with "FieldName": "Bundle ID" and take "Value" from that record. Assume it equals 16125
3. Create a bundle member
POST https://api.wildapricot.org/v2.1/accounts/XXX/contacts
{
"email":"my_bundle_member@invaliddomain.com",
"membershipLevel": { "id": 9378 },
"membershipEnabled":true,
"fieldValues":[
{
"fieldName":"Bundle ID",
"value": 16125
},
{
"fieldName":"Member role",
"value": "Bundle member"
}
]
}
4. Check we have a bundle and it contains members we expect
GET https://api.wildapricot.org/v2.1/accounts/XXX/bundles/16125
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.