# List agency wallet transactions

POST https://services.leadconnectorhq.com/saas/companies/{companyId}/wallet-transactions

Fetch paginated wallet transactions for an agency (company). Supports skip/limit pagination, date-range and charge-type filters, timezone normalization, and additional non-indexed filters in the request body.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Agency token: OAuth access token or Private Integration Token.** Scopes: `saas/company.read`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `companyId` | string | Yes | Company ID to list transactions for |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/saas/companies/{companyId}/wallet-transactions": {
      "post": {
        "summary": "List agency wallet transactions",
        "operationId": "listAgencyWalletTransactions",
        "description": "Fetch paginated wallet transactions for an agency (company). Supports skip/limit pagination, date-range and charge-type filters, timezone normalization, and additional non-indexed filters in the request body.",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          },
          {
            "name": "companyId",
            "required": true,
            "in": "path",
            "description": "Company ID to list transactions for",
            "schema": {
              "example": "5DP4iH6HLkQsiKESj6rh",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListWalletTransactionsV2RequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Wallet transactions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListWalletTransactionsV2ResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceNotFoundDTO"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Agency-Access": [
              "saas/company.read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "ListWalletTransactionsV2RequestDto": {
        "type": "object",
        "properties": {
          "skip": {
            "type": "number",
            "description": "Number of records to skip for pagination. Defaults to 0 when omitted.",
            "example": 0,
            "minimum": 0
          },
          "limit": {
            "type": "number",
            "description": "Maximum number of records to return. Capped at 1000 per request.",
            "example": 100,
            "minimum": 0,
            "maximum": 1000
          },
          "filters": {
            "description": "Transaction filters",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "locationId": {
                    "type": "string",
                    "description": "Filter by location ID",
                    "example": "AUKAtFVo0lWezBsBQ3FE"
                  },
                  "settlementTime": {
                    "type": "object",
                    "description": "Settlement time range filter",
                    "example": {
                      "from": "2024-01-01T00:00:00.000Z",
                      "to": "2024-03-31T23:59:59.999Z"
                    }
                  },
                  "chargeType": {
                    "description": "Charge type filter",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ],
                    "example": "Email"
                  }
                },
                "title": "WalletTransactionsV2FilterDto"
              }
            ]
          },
          "timezone": {
            "type": "string",
            "description": "Timezone for date normalization",
            "example": "UTC"
          },
          "users": {
            "description": "User identifiers to scope transaction results",
            "type": "array",
            "items": {
              "type": "array"
            }
          },
          "additionalFilter": {
            "type": "object",
            "description": "Additional non-indexed filters",
            "example": {
              "messageId": "msg_123"
            }
          }
        },
        "title": "ListWalletTransactionsV2RequestDto"
      },
      "ListWalletTransactionsV2ResponseDto": {
        "type": "object",
        "properties": {
          "transactions": {
            "description": "Flat list of normalized wallet transaction records returned from blade-platform",
            "items": {
              "type": "array"
            },
            "type": "array"
          }
        },
        "required": [
          "transactions"
        ],
        "title": "ListWalletTransactionsV2ResponseDto"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "ResourceNotFoundDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 404,
            "description": "Status code"
          },
          "message": {
            "type": "string",
            "example": [
              "Contact not found",
              "User not found",
              "Group not found",
              "Channel not found"
            ],
            "description": "Error message"
          }
        },
        "title": "ResourceNotFoundDTO"
      },
      "InternalServerErrorDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 500,
            "description": "Status code"
          },
          "message": {
            "type": "string",
            "example": "Internal Server Error",
            "description": "Error message"
          }
        },
        "title": "InternalServerErrorDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X POST 'https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "skip": 0,
  "limit": 100,
  "filters": {
    "locationId": "AUKAtFVo0lWezBsBQ3FE",
    "settlementTime": {
      "from": "2024-01-01T00:00:00.000Z",
      "to": "2024-03-31T23:59:59.999Z"
    },
    "chargeType": "Email"
  },
  "timezone": "UTC",
  "users": [
    []
  ],
  "additionalFilter": {
    "messageId": "msg_123"
  }
}'
```

**Node.js**

```javascript
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "skip": 0,
      "limit": 100,
      "filters": {
        "locationId": "AUKAtFVo0lWezBsBQ3FE",
        "settlementTime": {
          "from": "2024-01-01T00:00:00.000Z",
          "to": "2024-03-31T23:59:59.999Z"
        },
        "chargeType": "Email"
      },
      "timezone": "UTC",
      "users": [
        []
      ],
      "additionalFilter": {
        "messageId": "msg_123"
      }
  })
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/saas/companies/{companyId}/wallet-transactions"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

payload = {
    "skip": 0,
    "limit": 100,
    "filters": {
        "locationId": "AUKAtFVo0lWezBsBQ3FE",
        "settlementTime": {
            "from": "2024-01-01T00:00:00.000Z",
            "to": "2024-03-31T23:59:59.999Z"
        },
        "chargeType": "Email"
    },
    "timezone": "UTC",
    "users": [
        []
    ],
    "additionalFilter": {
        "messageId": "msg_123"
    }
}

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

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
    'Content-Type: application/json',
  ],
  CURLOPT_POSTFIELDS => '{
  "skip": 0,
  "limit": 100,
  "filters": {
    "locationId": "AUKAtFVo0lWezBsBQ3FE",
    "settlementTime": {
      "from": "2024-01-01T00:00:00.000Z",
      "to": "2024-03-31T23:59:59.999Z"
    },
    "chargeType": "Email"
  },
  "timezone": "UTC",
  "users": [
    []
  ],
  "additionalFilter": {
    "messageId": "msg_123"
  }
}',
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .post("https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .header("Content-Type", "application/json")
  .body("{\"skip\":0,\"limit\":100,\"filters\":{\"locationId\":\"AUKAtFVo0lWezBsBQ3FE\",\"settlementTime\":{\"from\":\"2024-01-01T00:00:00.000Z\",\"to\":\"2024-03-31T23:59:59.999Z\"},\"chargeType\":\"Email\"},\"timezone\":\"UTC\",\"users\":[[]],\"additionalFilter\":{\"messageId\":\"msg_123\"}}")
  .asString();
```

**Go**

```go
package main

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

func main() {
  url := "https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions"
  payload := strings.NewReader(`{
  "skip": 0,
  "limit": 100,
  "filters": {
    "locationId": "AUKAtFVo0lWezBsBQ3FE",
    "settlementTime": {
      "from": "2024-01-01T00:00:00.000Z",
      "to": "2024-03-31T23:59:59.999Z"
    },
    "chargeType": "Email"
  },
  "timezone": "UTC",
  "users": [
    []
  ],
  "additionalFilter": {
    "messageId": "msg_123"
  }
}`)
  req, _ := http.NewRequest("POST", url, payload)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"
request["Content-Type"] = "application/json"
request.body = '{
  "skip": 0,
  "limit": 100,
  "filters": {
    "locationId": "AUKAtFVo0lWezBsBQ3FE",
    "settlementTime": {
      "from": "2024-01-01T00:00:00.000Z",
      "to": "2024-03-31T23:59:59.999Z"
    },
    "chargeType": "Email"
  },
  "timezone": "UTC",
  "users": [
    []
  ],
  "additionalFilter": {
    "messageId": "msg_123"
  }
}'

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$body = '{
  "skip": 0,
  "limit": 100,
  "filters": {
    "locationId": "AUKAtFVo0lWezBsBQ3FE",
    "settlementTime": {
      "from": "2024-01-01T00:00:00.000Z",
      "to": "2024-03-31T23:59:59.999Z"
    },
    "chargeType": "Email"
  },
  "timezone": "UTC",
  "users": [
    []
  ],
  "additionalFilter": {
    "messageId": "msg_123"
  }
}'

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/saas/companies/<companyId>/wallet-transactions' -Method 'POST' -Headers $headers -Body $body -ContentType 'application/json'
$response | ConvertTo-Json
```
