Invokes multiple operations on data related to multiple agencies in a single HTTP request. The Batch Request API accepts an array of up to 25 HTTP requests, each with its required headers, body, method, and URL. The individual operations are invoked via HTTPS. The response is an array containing the results from all requested operations in the same order used in the request array.
Scope | batch_request |
App Type | All |
Authorization Type | No authorization required |
URI | /v4/batch |
HTTP Method | POST |
Automation Version(s) | All |
Field or Parameter | Type | Required | Values | Description | Automation Version |
---|---|---|---|---|---|
body | string | No | � | A JSON string containing the request parameters for the operation to be invoked. | All |
headers | headers{} | No | � | Contains HTTP headers for the operation to be invoked. | All |
headers.<headerKey> | string | No | � | HTTP header key/value pairs. For example: "headers" : { "header-key1":"header-value1", "header-key2":"header-value2" }. Provide the HTTP headers required by the operation's authorization type. If the required HTTP headers related to authorization are not provided, the operation will fail. | All |
method | string | Yes | GET | PUT | POST | DELETE | The HTTP method of the operation to be invoked. | All |
relativeUrl | string | Yes | � | The relative URL of the operation to be invoked, for example '/v4/records'. Do not invoke the Batch Request API; i.e. do not specify '/v4/batch' as the relativeUrl. | All |
[ { "headers": { "x-accela-agency": "DemoAgency" }, "method": "GET", "relativeUrl": "/v4/records?offset=0&limit=2" }, { "headers": { "x-accela-agency": "BPTDEV" }, "method": "GET", "relativeUrl": "/v4/records/BPTDEV-15EST-00000-00014" }, { "headers": { "x-accela-agency": "BPTDEV" }, "method": "POST", "relativeUrl": "/v4/records", "body": { "type": { "id": "Building-Residential-Alteration-NA" }, "description": "Residence alteration", "parcels": [ { "parcelNumber": "005020018" } ] } } ]
Field | Type | Description | Automation Version |
---|---|---|---|
result | result{} | Contains the response data from all requested operations. | All |
result.result[] | result.result{} | The HTTP response from the invoked operation. The order of the results in the response array corresponds to the same order used in the request array. | All |
result.status | integer | The HTTP status from the invoked operation. | All |
status | integer | The record status. | All |
{ "result": [ { "code": "unauthorized", "message": "Your session has expired.", "status": 401, "traceId": "150424233314336-300cc585" }, { "result": [ { "createdBy": "PUBLICUSER0", "customId": "15CAP-00000023", "description": "", "id": "BPTDEV-15EST-00000-00014", "initiatedProduct": "ACA", "jobValue": 0.0, "module": "Building", "openedDate": "2015-02-25 00:00:00", "recordClass": "INCOMPLETE", "serviceProviderCode": "BPTDEV", "statusDate": "2015-02-25 21:56:48", "totalJobCost": 0.0, "trackingId": 233083706, "type": { "alias": "Building/api/test/test", "category": "test", "group": "Building", "id": "Building-api-test-test", "module": "Building", "subType": "test", "text": "Building/api/test/test", "type": "api", "value": "Building/api/test/test" }, "undistributedCost": 0.0, "value": "15EST-00000-00014" } ], "status": 200 }, { "code": "data_validation_error", "message": "wrong type which does not exist.", "status": 400, "traceId": "150424233314352-c68cabea" } ], "status": 200 }