Batches πŸ‘‘
Batch operations are used to make multiple one type operations with one request.
Batch operations are used to make multiple one-type operations with one request.
This endpoint is only available for our GURU customers 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
pending
Batch is received but not started
inProgress
Batch is in progress
finished
All batch operations are finished
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

1
https://api.gameball.co/api/v3.0/integrations/batch
Copied!

Request

Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
SecretKey
string
Yes
Client Secret key\transaction key

Body

Attribute
Type
Required
Description
method
string
Yes
The HTTP method to use for the operation. Possible values: "GET", "POST", "PUT", or "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
string
Yes
An object with JSON body to use with the request. Each operation has its own body
For more information on body object format check Batch Operations Data ​
1
{
2
"method":"POST",
3
"operation":"cashback",
4
"params":{
5
"name":"mike"
6
},
7
"body":{}
8
}
Copied!

Response

Parameter
Type
Description
batchId
string
Batch id to be used to get the status of the created batch

Usage Example

cURL
1
curl -X POST -H 'apiKey: 807b041b7d35425988e354e1f6bce186' \
2
-H 'secretKey: klmb041b7d354259l3u4ft35e1q2r3703'
3
-d '{
4
"method":"POST",
5
"operation":"cashback",
6
"params":{
7
"name":"mike"
8
},
9
"body":{}
10
}'
11
-v -i 'https://api.gameball.co/api/v3.0/integrations/batch'
Copied!

GET- Get Batch Operation

1
https://api.gameball.co/api/v3.0/integrations/batch/:batchId
Copied!

Request

Header

Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
SecretKey
string
Yes
Client Secret key\transaction key

Path Parameters

Parameter
Type
Required
Description
batchId
string
Yes
Batch operation ID

Response

Body

Attribute
Type
Description
method
string
The HTTP method to use for the operation. Possible values: "GET", "POST", "PUT", or "PATCH".
operation
string
Name of the operation to be performed. Possible values are
cashback
redeem
balance
errorCount
integer
Items with errors in batch count
totalCount
integer
Items in batch count
finishedCount
integer
Processed items in batch count
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
inProgress
pending
finished
stopped
response
object
Result of operation (JSON object)
1
{
2
"method":"POST",
3
"operation":"cashback",
4
"errorCount":0,
5
"totalCount":100,
6
"finishedCount":60,
7
"startedAt":"2012-12-30 16:50:11",
8
"createdAt":"2012-12-30 16:50:11",
9
"status":"processing",
10
"response":{}
11
}
Copied!

Usage Example

cURL
1
curl -X GET -H 'apiKey: 807b041b7d35425988e354e1f6bce186' \
2
-H 'secretKey: klmb041b7d354259l3u4ft35e1q2r3703'
3
-v -i 'https://api.gameball.co/api/v3.0/integrations/batch/213'
Copied!

DELETE- Stop Batch Operation

1
https://api.gameball.co/api/v3.0/integrations/batch/:batchId
Copied!

Request

Header

Attribute
Type
Required
Description
APIKey
string
Yes
Client API key
SecretKey
string
Yes
Client Secret key\transaction key

Path Parameters

Parameter
Type
Required
Description
batchId
string
Yes
Batch operation ID

Usage Example

cURL
1
curl -X DELETE -H 'apiKey: 807b041b7d35425988e354e1f6bce186' \
2
-H 'secretKey: klmb041b7d354259l3u4ft35e1q2r3703'
3
-v -i 'https://api.gameball.co/api/v3.0/integrations/batch/213'
Copied!
Last modified 1mo ago