Bulk / Batch Requests
Batch requests allow developers to avoid multiple HTTP round-trips when performing multiple API actions or bulk uploading data to ChargeOver.
The basic format of an API batch request is a list of JSON-encoded request objects to process. Each request object must have the following attributes:
Attribute | Description |
---|---|
request_method | This HTTP request method for this request
|
uri | A relative URI for the API resource. For example, to get a
specific customer, the URI would be |
payload | If your request requires a payload, put the JSON-encoded payload here. For example, to create a customer, you'd pass in your JSON-encoded customer object. |
The API response will contain a corresponding list of response objects - one response object for each request you sent. Each response object will have the following attributes:
Attribute | Description |
---|---|
code | A HTTP status code for the request.
|
status | Either |
message | If an error occurred, the error message will appear here. |
response | If your request warrented a response (e.g. a returned object) the JSON-encoded response will be here. |
There is a maximum of 25 requests within a single batch/bulk request.