# Example 1
# Retrieve a set of all batches for a merchant
set oAuthToken=%1
set merchantKey="MTAxOklkUDVaV0tXNDI4UDRid2FOa0UwOV9ISzRjcw"
set page=0
set pageSize=25
set url="https://api.pushpay.com/v1/merchant/%merchantKey%/batches?page=%page%&pageSize=%pageSize%"
curl -i -H "Accept: application/hal+json" -H "Authorization: Bearer %oAuthToken%" %url%

# Example 2
# Retrieve a set of all batches which match the specified filters and belong to the specified merchant
set oAuthToken=%1
set merchantKey="MTAxOklkUDVaV0tXNDI4UDRid2FOa0UwOV9ISzRjcw"
set orderBy="transactions ASC"
set name="batchName"
set type="BatchEntry"
set page=0
set pageSize=25
set url="https://api.pushpay.com/v1/merchant/%merchantKey%/batches?orderBy=%orderBy%&name=%name%&type=%type%&page=%page%&pageSize=%pageSize%"
curl -i -H "Accept: application/hal+json" -H "Authorization: Bearer %oAuthToken%" %url%

# Example 1
# Retrieve a set of all batches for an organization
set oAuthToken=%1
set organizationKey="MTIzOi1Yb1ByLWxtakFoMVdEaUlrWFpIdnhfODd0NA"
set page=0
set pageSize=25
set url="https://api.pushpay.com/v1/organization/%organizationKey%/batches?page=%page%&pageSize=%pageSize%"
curl -i -H "Accept: application/hal+json" -H "Authorization: Bearer %oAuthToken%" %url%

# Example 2
# Retrieve a set of all batches which match the specified filters and belong to the specified organization
set oAuthToken=%1
set organizationKey="MTIzOi1Yb1ByLWxtakFoMVdEaUlrWFpIdnhfODd0NA"
set orderBy="amount ASC"
set name="batchName"
set type="BatchEntry"
set page=0
set pageSize=25
set url="https://api.pushpay.com/v1/organization/%organizationKey%/batches?orderBy=%orderBy%&name=%name%&type=%type%&page=%page%&pageSize=%pageSize%"
curl -i -H "Accept: application/hal+json" -H "Authorization: Bearer %oAuthToken%" %url%