Batch API requests

Overview

Multiple API requests can be combined in one batch request. The maximum number of subrequests allowed per batch request is 5.

WildApricot's API is intended for use by developers with technical expertise. If you need assistance, we provide support through our Developers forum. If you are not an experienced programmer, consider using Make to build no-code automated workflows with WildApricot.

Batch endpoint

The client application should make a BATCH or POST request to https://api.wildapricot.org/batch and pass a collection of requests in the request body using the parameters specified below. The limit for subrequests per batch is 5.

Parameters

The following parameters are used for each individual request within the batch request:

ID
Individual request identifier. Must be unique within the batch request.

Order
Number controlling the order in which the requests are processed, from lowest to the highest.

PathAndQuery
The path and query of the API relative to https://api.wildapricot.org.

Method
The request method. Options are GET, POST, PUT, DELETE.

Payload
Data for POST or PUT requests.

ContentType
The data type for Payload.

Each API call must include an authentication token that authenticates your account and prevents others from accessing your data. For more information, see API access options.

Example

BATCH https://api.wildapricot.org/batch
[
  {
    "Id": "get all available accounts",
    "Order": 0,
    "PathAndQuery": "/v2/accounts",
    "Method": "GET"
  },
  {
    "Id": "create new contact",
    "Order": 1,
    "PathAndQuery": "/v2/accounts/123/contacts",
    "Method": "POST",
    "Payload": "{\"FirstName\":\"John\"}",
    "ContentType": "application/json"
  },
  {
    "Id": "try to delete account",
    "Order": 0,
    "PathAndQuery": "/v2/accounts",
    "Method": "DELETE",
    "Payload": null,
    "ContentType": null
  },
  {
    "Id": "try to open external url",
    "Order": 0,
    "PathAndQuery": "http://ya.ru",
    "Method": "DELETE",
    "Payload": null,
    "ContentType": null
  }
]

Response fields

The batch request returns the following information for each individual request.

ResultId
The request identifier.

HttpStatusCode
The status code of the response. For a complete list, see API status codes.

HttpReasonPhrase
A short description of the status code.

ResponseData
The response content in JSON or XML format.

Each subrequest is processed independently, so if one request fails, others can still be processed successfully.

Sample response

[
  {
    "RequestId": "try to open external url",
    "HttpStatusCode": 400,
    "HttpReasonPhrase": "Request path does not look like valid API request",
    "ResponseData": null
  },
  {
    "RequestId": "try to delete account",
    "HttpStatusCode": 405,
    "HttpReasonPhrase": "Method Not Allowed",
    "ResponseData": "{\"Message\":\"The requested resource does not support http method 'DELETE'.\"}"
  },
  {
    "RequestId": "get all available accounts",
    "HttpStatusCode": 200,
    "HttpReasonPhrase": "OK",
    "ResponseData": "[{\"PrimaryDomainName\":\"wa.local\",\"Resources\":[{\"Name\":\"Contacts\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Contacts/\",\"AllowedOperations\":[\"GET\",\"POST\",\"PUT\"]},{\"Name\":\"Membership levels\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/MembershipLevels/\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Contact fields\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/ContactFields/\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Member groups\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/MemberGroups/\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Saved searches\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/SavedSearches/\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Bundles\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Bundles/\",\"Description\":\"Requires levelId query string parameter.\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Invoices\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Invoices/\",\"Description\":\"Requires contactId or eventId query string parameter.\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Payments\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Payments/\",\"Description\":\"Requires contactId query string parameter.\",\"AllowedOperations\":[\"GET\",\"POST\",\"DELETE\"]},{\"Name\":\"Refunds\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Refunds/\",\"Description\":\"Requires contactId query string parameter.\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Payment allocations\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/PaymentAllocations/\",\"Description\":\"Requires paymentId or invoiceId query string parameter.\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Tenders\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Tenders/\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Events\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/Events/\",\"AllowedOperations\":[\"GET\"]},{\"Name\":\"Event registrations\",\"Url\":\"https://api.wildapricot.org/v2/accounts/1/EventRegistrations/\",\"Description\":\"Requires contactId or eventId query string parameter.\",\"AllowedOperations\":[\"GET\",\"POST\",\"PUT\",\"DELETE\"]}],\"Localization\":{\"DateFormat\":\"dd\\\".\\\"MM\\\".\\\"yyyy\",\"TimeFormat\":\"HH:mm\"},\"Currency\":{\"Name\":\"US Dollar\",\"Code\":\"USD\",\"Symbol\":\"$\"},\"Id\":1,\"Url\":\"https://api.wildapricot.org/v2/Accounts/1\",\"Name\":\"Version 4.4 WIP\",\"ContactLimitInfo\":{\"CurrentContactsCount\":1420,\"BillingPlanContactsLimit\":2000}}]"
  },
  {
    "RequestId": "create new contact",
    "HttpStatusCode": 200,
    "HttpReasonPhrase": "OK",
    "ResponseData": "{\"Id\":123456, \"FirstName\":\"John\"}"
  }
]

Search: WildApricot.com 

About results ( seconds) Sort by: 
Sorry, an error occured when performing search.
Powered by Zendesk