Skip to main content
POST
/
api
/
Batch
List Batches
curl --request POST \
  --url https://reporting.ecrypt.com/api/Batch \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "startDate": "2025-01-01",
  "endDate": "2025-02-01",
  "sortColumn": "Id",
  "page": 1,
  "pageSize": 20,
  "sortOrder": "DESC"
}
'
import requests

url = "https://reporting.ecrypt.com/api/Batch"

payload = {
"startDate": "2025-01-01",
"endDate": "2025-02-01",
"sortColumn": "Id",
"page": 1,
"pageSize": 20,
"sortOrder": "DESC"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2025-01-01',
endDate: '2025-02-01',
sortColumn: 'Id',
page: 1,
pageSize: 20,
sortOrder: 'DESC'
})
};

fetch('https://reporting.ecrypt.com/api/Batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://reporting.ecrypt.com/api/Batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2025-01-01',
'endDate' => '2025-02-01',
'sortColumn' => 'Id',
'page' => 1,
'pageSize' => 20,
'sortOrder' => 'DESC'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://reporting.ecrypt.com/api/Batch"

payload := strings.NewReader("{\n \"startDate\": \"2025-01-01\",\n \"endDate\": \"2025-02-01\",\n \"sortColumn\": \"Id\",\n \"page\": 1,\n \"pageSize\": 20,\n \"sortOrder\": \"DESC\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://reporting.ecrypt.com/api/Batch")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2025-01-01\",\n \"endDate\": \"2025-02-01\",\n \"sortColumn\": \"Id\",\n \"page\": 1,\n \"pageSize\": 20,\n \"sortOrder\": \"DESC\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://reporting.ecrypt.com/api/Batch")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2025-01-01\",\n \"endDate\": \"2025-02-01\",\n \"sortColumn\": \"Id\",\n \"page\": 1,\n \"pageSize\": 20,\n \"sortOrder\": \"DESC\"\n}"

response = http.request(request)
puts response.read_body
{
  "batches": {
    "items": [
      {
        "id": 123,
        "closed": "2023-11-07T05:31:56Z",
        "sales": 123,
        "refunds": 123,
        "voids": 123,
        "grossRevenue": 123,
        "refundTotal": 123,
        "netIncome": 123
      }
    ],
    "page": 123,
    "pageSize": 123,
    "totalCount": 123
  }
}
{
"batches": {
"items": [
{
"id": 123,
"closed": "2023-11-07T05:31:56Z",
"sales": 123,
"refunds": 123,
"voids": 123,
"grossRevenue": 123,
"refundTotal": 123,
"netIncome": 123
}
],
"page": 123,
"pageSize": 123,
"totalCount": 123
}
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}
{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}

Authorizations

X-Api-Key
string
header
required

Enter your API key

Body

application/json
startDate
string<date-time>
default:2025-01-01
required

Start date, all date times are in UTC.

Format:

  • yyyy-MM-dd
  • yyyy-MM-ddTHH:mm
  • yyyy-MM-ddTHH:mm:ss
  • yyyy-MM-ddTHH:mm:ss.fff
endDate
string<date-time>
default:2025-02-01
required

End date, all date times are in UTC.

Format:

  • yyyy-MM-dd
  • yyyy-MM-ddTHH:mm
  • yyyy-MM-ddTHH:mm:ss
  • yyyy-MM-ddTHH:mm:ss.fff
sortColumn
string | null
default:Id

Sort column, the column being used for sorting. The default is batch Id.

Valid Options:

  • Id
  • Closed
  • Sales
  • Refunds
  • Voids
  • GrossRevenue
  • RefundTotal
  • NetIncome
  • Status
Maximum string length: 100
Pattern: ^[A-Za-z0-9]*$
page
integer<int32> | null
default:1

Page, the of results being requested.

Required range: 1 <= x <= 2147483647
pageSize
integer<int32> | null
default:20

Page size, the number of items being requested for the page.

Required range: 1 <= x <= 1000
sortOrder
string | null
default:DESC

Sort order, the sort columns desired sort direction. The default is DESC.

Examples:

  • ASC
  • DESC
Maximum string length: 20
Pattern: ^[A-Za-z]*$

Response

object | null

OK

batches
object | null