Batches
Retrieve Batches
This allows you to retrieve details of a specific batch or list multiple batches.
Retrieve Batch
Retrieve a single batch using its id
.
List Batches
Example
When you want to retrieve multiple batches, your data property on the result will always be an array even if you don't have any batches. The batches are returned in chronological order by creation date.
Pagination
If the has_more
property on the pagination object is set to true, you know there are more batches in the database that have not been returned to you. The pagination object also has a page
property indicating your current offset and a limit property. The total_count property in pagination returns the total number of batches in the database.
By default, the page
is set to 1
and the limit
is 25
.
If we want to query for batches 26 - 50, we would request page 2 with a query parameter.
Filter
You can filter batches by resource
, mode
, via
, and status
properties.
- resource - Filter by the type of resource in the batch. Available resources are:
contact
,group
,shipment
, andtracker
. - mode - Filter by the mode of the batch. Available modes are:
sync
,mixed
. - via - Filter by the method of batch creation. Available options are:
api
,file
. - status - Filter by the status of the batch. Available statuses are:
requested
,queued
,processing
,completed
,failed
,timed_out
,expired
.