Batches 👑
Batch operations are used to make multiple one type operations with one request.
Last updated
Batch operations are used to make multiple one type operations with one request.
Last updated
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.
Type
Description
Endpoint
POST
/integrations/batch
GET
/integrations/batch/:batchId
DELETE
/integrations/batch/:batchId
This API call is used to efficiently perform multiple operations within a single HTTP request, Instead of sending individual requests for each operation.
Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
SecretKey
string
Yes
Client Secret key/transaction key
Attribute
Type
Required
Description
method
string
Yes
The HTTP method to use for the operation. Possible values:
"GET"
"POST"
"PUT"
"PATCH"
operation
string
Yes
Name of the operation to be performed. Possible values are
cashback
redeem
balance
params
integer
No
Optional request query parameters.
body
array
Yes
An array of objects to use with the request. Each operation has its own body
Parameter
Type
Description
batchId
string
Batch id to be used to get the status of the created batch
This API call is used to fetch the results and status of a batch operation.
Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
SecretKey
string
Yes
Client Secret key\transaction key
Parameter
Type
Required
Description
batchId
string
Yes
Batch operation ID
Attribute
Type
Description
operation
string
Name of the operation to be performed. Possible values are :
cashback
redeem
balance
errorCount
integer
The count of items with errors in batch.
totalCount
integer
The count of items in batch
finishedCount
integer
The count of processed items in batch
startedAt
datetime
Batch operations start time in UTC. format. Example: 2017-05-30T15:14:22Z
createdAt
datetime
Batch operations creation time in UTC. format. Example: 2017-05-30T15:14:22Z
status
string
Batch operation status:
Queued
Running
Completed
Stopped
response
object
Result of operation (JSON object)
This API call is to halt the execution of a running batch operation.
Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
SecretKey
string
Yes
Client Secret key\transaction key
Parameter
Type
Required
Description
batchId
string
Yes
Batch operation ID
For more information on body object format check