Batches 👑
Batch operations are used to make multiple one type operations with one request.
This endpoint is only available for our GURU clients only 👑
Currently, the following operations can be executed in batches :
Bulk Cashback
Bulk Redeem
Bulk Balance Inquiry
Each batch is limited to a max of 1000 entries per batch.
Using the batch API is simple as it provides unified interfaces to execute any of the above supported operations. It can be used to run async batches and track them in your system.
To start a batch operation, you need to start a batch request via the Start Batch API. You can then keep checking the status of a batch operation started via its Batch ID. The status of the batch can be one of the following
Status | Description |
Queued | Batch is received but not started |
Running | Batch is in progress |
Completed | All batch operations are completed |
Stopped | Batch stopped |
Once the batch status is finished, you will be able to check the batch operation outcome including total processed, total failed, and return body object if any.
Available Endpoints
Type | Description | Endpoint |
POST | /integrations/batch | |
GET | /integrations/batch/:batchId | |
DELETE | /integrations/batch/:batchId |
POST- Start Batch Operation
This API call is used to efficiently perform multiple operations within a single HTTP request, Instead of sending individual requests for each operation.
Request
Header
Attribute | Type | Required | Description |
| string | Yes | Client API key |
| string | Yes | Client Secret key/transaction key |
Body
Attribute | Type | Required | Description |
| string | Yes | The HTTP method to use for the operation. Possible values:
|
| string | Yes | Name of the operation to be performed. Possible values are
|
| integer | No | Optional request query parameters. |
| array | Yes | An array of objects to use with the request. Each operation has its own body For more information on body object format check Batch Operations Data |
Response
Parameter | Type | Description |
| string | Batch id to be used to get the status of the created batch |
Usage Example
GET- Get Batch Operation
This API call is used to fetch the results and status of a batch operation.
Request
Header
Attribute | Type | Required | Description |
| string | Yes | Client API key |
| string | Yes | Client Secret key\transaction key |
Path Parameters
Parameter | Type | Required | Description |
| string | Yes | Batch operation ID |
Response
Body
Attribute | Type | Description |
| string | Name of the operation to be performed. Possible values are :
|
| integer | The count of items with errors in batch. |
| integer | The count of items in batch |
| integer | The count of processed items in batch |
| datetime | Batch operations start time in UTC. format. Example: 2017-05-30T15:14:22Z |
| datetime | Batch operations creation time in UTC. format. Example: 2017-05-30T15:14:22Z |
| string | Batch operation status:
|
| object | Result of operation (JSON object) |
Usage Example
DELETE- Stop Batch Operation
This API call is to halt the execution of a running batch operation.
Request
Header
Attribute | Type | Required | Description |
| string | Yes | Client API key |
| string | Yes | Client Secret key\transaction key |
Path Parameters
Parameter | Type | Required | Description |
| string | Yes | Batch operation ID |