# List Batches

**GET** `/batches`

Base URL: `https://api.uat.triple-a.io/api/fiat-payout/v1`

This endpoint allows API users to retrieve a list of batches they made.

## Authorization

- oauth2 (http, bearer)

## Query parameters

- `page` (integer)
  Specify the page number
- `per_page` (integer)
  Specify the number of items per page
- `batch_id` (string)
  Specify batch id
- `status` (array)
  Specify one or more status, comma separated

## Responses

### 200

OK

- `id` (string<uuid>)
  Batch Identifier
- `external_id` (string)
  Batch Reference provided by API caller
- `status` ("created" | "processing" | "rejected" | "waiting_confirmation" | "confirmed" | "expired" | "partial_submitted" | "submitted" | "partial_completed" | "completed")
  Batch Status
- `reason` (object[])
  - `csvLine` (number)
    CSV line number for the Batch error
  - `message` (object[])
    The error message
    - `message` (string)
    - `errors` (object[])
      - `errorCode` (string)
      - `message` (string)
- `payment` (object)
  Payment
  - `id` (string<uuid>)
    Payment Identifier
  - `status` (string)
    Payment status
  - `reason` (string<uuid>)
    Failed/Declined Reason
  - `url` (string)
    CDN of payment page
  - `crypto_address` (string)
    Cryptocurrency token address
  - `crypto_currency` (string)
    Cryptocurrency value
  - `crypto_network` (string)
    The blockchain to use to pay
  - `expires_at` (string<date-time>)
    The expiration of the address
  - `card_issuer_country` (string)
    The issuer country of card if payment is made via card
  - `reference_number` (string)
    Payment reference number
  - `iban` (string)
    IBAN
- `total_transfers` (number)
  Total number of transfers in the batch
- `total_sending_amount` (object[])
  - `currency` (string<iso-4217>)
    The currency
  - `amount` (number<double>)
    The total amount for the currency
- `total_receiving_amount` (object[])
  - `currency` (string<iso-4217>)
    The currency
  - `amount` (number<double>)
    The total amount for the currency
- `total_fees` (object[])
  - `currency` (string<iso-4217>)
    The currency
  - `amount` (number<double>)
    The total amount for the currency
- `expires_at` (string<date-time>)
  Creation Timestamp
- `created_at` (string<date-time>)
  Creation Timestamp
- `updated_at` (string<date-time>)
  Update Timestamp

Example:

```json
[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "external_id": "string",
    "status": "created",
    "reason": [
      {
        "csvLine": 0,
        "message": [
          {
            "message": "string",
            "errors": [
              null
            ]
          }
        ]
      }
    ],
    "payment": {
      "id": "00000000-0000-0000-0000-000000000000",
      "status": "string",
      "reason": "00000000-0000-0000-0000-000000000000",
      "url": "string",
      "crypto_address": "string",
      "crypto_currency": "string",
      "crypto_network": "string",
      "expires_at": "1970-01-01T00:00:00.000Z",
      "card_issuer_country": "USA",
      "reference_number": "MFB-870989-FPP",
      "iban": "FR7630006000011234567890189"
    },
    "total_transfers": 0,
    "total_sending_amount": [
      {
        "currency": "string",
        "amount": 0.001
      }
    ],
    "total_receiving_amount": [
      {
        "currency": "string",
        "amount": 0.001
      }
    ],
    "total_fees": [
      {
        "currency": "string",
        "amount": 0.001
      }
    ],
    "expires_at": "1970-01-01T00:00:00.000Z",
    "created_at": "1970-01-01T00:00:00.000Z",
    "updated_at": "1970-01-01T00:00:00.000Z"
  }
]
```