getTransactions()
List data transactions
Returns data allocation and consumption transactions visible to the caller. Sender and recipient filters are restricted to the caller's scope.
Signature
client.analytics.getTransactions(options: AnalyticsGetTransactionsOptions): Promise<AnalyticsGetTransactionsResponse>Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
end | string | Optional | Exclusive end of the reporting window. Defaults to the current time. Accepts ISO 8601 datetime strings with or without a timezone offset (including Z and fractional seconds), YYYY-MM-DD HH:MM:SS, DD-MM-YYYY HH:MM:SS, YYYY-MM-DD, DD-MM-YYYY, or a Unix timestamp in seconds (including fractional seconds, not milliseconds). Datetime strings without an offset and date-only strings use the requested timezone; explicit offsets are converted to that timezone. Date-only values start at midnight. Seconds and fractional seconds are discarded, rounding the reporting boundary down to the minute. Prefer ISO 8601 with an explicit offset for unambiguous timezone handling. |
id | string | Required | Route identifier for this analytics action. Use query parameters to filter transactions. |
limit | number | Optional | Maximum records returned on this page. |
offset | number | Optional | Zero-based number of matching records to skip. |
recipientId | string | Optional | Restrict transactions to this recipient account. |
senderId | string | Optional | Restrict transactions to this sender account. |
start | string | Optional | Inclusive start of the reporting window. Defaults to a recent window. Accepts ISO 8601 datetime strings with or without a timezone offset (including Z and fractional seconds), YYYY-MM-DD HH:MM:SS, DD-MM-YYYY HH:MM:SS, YYYY-MM-DD, DD-MM-YYYY, or a Unix timestamp in seconds (including fractional seconds, not milliseconds). Datetime strings without an offset and date-only strings use the requested timezone; explicit offsets are converted to that timezone. Date-only values start at midnight. Seconds and fractional seconds are discarded, rounding the reporting boundary down to the minute. Prefer ISO 8601 with an explicit offset for unambiguous timezone handling. |
timezone | string | Optional | IANA timezone used for bucket boundaries and datetime strings without an offset. Missing, empty or unknown names use the deployment timezone (UTC by default). |
type | number | Optional | Transaction type identifier. Defaults to data transactions. |
acceptLanguage | string | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
const result = await client.analytics.getTransactions({ id: "550e8400-e29b-41d4-a716-446655440000"});Returns
TransactionsResponseThe operation completed successfully.
typeTransactionsResponse7fields
countnumbernextstringpreviousstringtimezonestringstartstringendstringresultsTransactionRecord[]typeTransactionRecord8fields
sender_uuidstringrecipient_uuidstringtypenumberamountnumberpackage_uuidstringdetailsstringdatestringtimestampstringThrows
ApiErrorNormalized API, transport, and response processing failure.
kind: "validation"The request arguments or business rules are invalid.kind: "authentication"Authentication credentials are missing, expired, or invalid.kind: "permission"The authenticated account cannot perform this operation.kind: "not_found"The requested resource does not exist.kind: "server"ProxyRequest could not complete the operation.kind: "network"The request could not reach ProxyRequest.kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
client.analytics.getTransactionsWithResponse(options): Promise<ApiResponse<AnalyticsGetTransactionsResponse>>Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
client.analytics.get_transactions(id: str, *, end: datetime.datetime | float | int | str | Unset=UNSET, limit: int | Unset=UNSET, offset: int | Unset=UNSET, recipient_id: UUID | Unset=UNSET, sender_id: UUID | Unset=UNSET, start: datetime.datetime | float | int | str | Unset=UNSET, timezone: str | Unset=UNSET, type_: int | Unset=UNSET, accept_language: str | Unset=UNSET) -> TransactionsResponseawait async_client.analytics.get_transactions(id: str, *, end: datetime.datetime | float | int | str | Unset=UNSET, limit: int | Unset=UNSET, offset: int | Unset=UNSET, recipient_id: UUID | Unset=UNSET, sender_id: UUID | Unset=UNSET, start: datetime.datetime | float | int | str | Unset=UNSET, timezone: str | Unset=UNSET, type_: int | Unset=UNSET, accept_language: str | Unset=UNSET) -> TransactionsResponseParameters
| Name | Type | Requirement | Description |
|---|---|---|---|
end | str | int | float | Optional | Exclusive end of the reporting window. Defaults to the current time. Accepts ISO 8601 datetime strings with or without a timezone offset (including Z and fractional seconds), YYYY-MM-DD HH:MM:SS, DD-MM-YYYY HH:MM:SS, YYYY-MM-DD, DD-MM-YYYY, or a Unix timestamp in seconds (including fractional seconds, not milliseconds). Datetime strings without an offset and date-only strings use the requested timezone; explicit offsets are converted to that timezone. Date-only values start at midnight. Seconds and fractional seconds are discarded, rounding the reporting boundary down to the minute. Prefer ISO 8601 with an explicit offset for unambiguous timezone handling. |
id | str | Required | Route identifier for this analytics action. Use query parameters to filter transactions. |
limit | int | Optional | Maximum records returned on this page. |
offset | int | Optional | Zero-based number of matching records to skip. |
recipient_id | str | Optional | Restrict transactions to this recipient account. |
sender_id | str | Optional | Restrict transactions to this sender account. |
start | str | int | float | Optional | Inclusive start of the reporting window. Defaults to a recent window. Accepts ISO 8601 datetime strings with or without a timezone offset (including Z and fractional seconds), YYYY-MM-DD HH:MM:SS, DD-MM-YYYY HH:MM:SS, YYYY-MM-DD, DD-MM-YYYY, or a Unix timestamp in seconds (including fractional seconds, not milliseconds). Datetime strings without an offset and date-only strings use the requested timezone; explicit offsets are converted to that timezone. Date-only values start at midnight. Seconds and fractional seconds are discarded, rounding the reporting boundary down to the minute. Prefer ISO 8601 with an explicit offset for unambiguous timezone handling. |
timezone | str | Optional | IANA timezone used for bucket boundaries and datetime strings without an offset. Missing, empty or unknown names use the deployment timezone (UTC by default). |
type | int | Optional | Transaction type identifier. Defaults to data transactions. |
accept_language | str | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
result = client.analytics.get_transactions( id='550e8400-e29b-41d4-a716-446655440000', )Async example
result = await async_client.analytics.get_transactions( id='550e8400-e29b-41d4-a716-446655440000', )Returns
TransactionsResponseThe operation completed successfully.
classTransactionsResponse7fields
countintnext_None | strpreviousNone | strtimezonestrstartdatetime.datetimeenddatetime.datetimeresultslist[TransactionRecord]classTransactionRecord8fields
sender_uuidNone | strrecipient_uuidNone | strtype_intamountintpackage_uuidNone | strdetailsNone | strdatedatetime.datetime | Nonetimestampdatetime.datetime | NoneThrows
ApiErrorNormalized API, transport, and response processing failure.
ErrorKind.VALIDATIONThe request arguments or business rules are invalid.ErrorKind.AUTHENTICATIONAuthentication credentials are missing, expired, or invalid.ErrorKind.PERMISSIONThe authenticated account cannot perform this operation.ErrorKind.SERVERProxyRequest could not complete the operation.ErrorKind.NOT_FOUNDThe requested resource does not exist.ErrorKind.NETWORKThe request could not reach ProxyRequest.ErrorKind.UNEXPECTEDThe response could not be decoded or did not match the SDK contract.
Advanced variants
client.analytics.get_transactions_with_response(id: str, *, end: datetime.datetime | float | int | str | Unset=UNSET, limit: int | Unset=UNSET, offset: int | Unset=UNSET, recipient_id: UUID | Unset=UNSET, sender_id: UUID | Unset=UNSET, start: datetime.datetime | float | int | str | Unset=UNSET, timezone: str | Unset=UNSET, type_: int | Unset=UNSET, accept_language: str | Unset=UNSET) -> ApiResponse[TransactionsResponse]Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
$client->analytics()->getTransactions($id, $end = null, $limit = null, $offset = null, $recipientId = null, $senderId = null, $start = null, $timezone = null, $type = null, $acceptLanguage = null, string $contentType = self::contentTypes['getTransactions'][0])Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
end | string | Optional | Exclusive end of the reporting window. Defaults to the current time. Accepts ISO 8601 datetime strings with or without a timezone offset (including Z and fractional seconds), YYYY-MM-DD HH:MM:SS, DD-MM-YYYY HH:MM:SS, YYYY-MM-DD, DD-MM-YYYY, or a Unix timestamp in seconds (including fractional seconds, not milliseconds). Datetime strings without an offset and date-only strings use the requested timezone; explicit offsets are converted to that timezone. Date-only values start at midnight. Seconds and fractional seconds are discarded, rounding the reporting boundary down to the minute. Prefer ISO 8601 with an explicit offset for unambiguous timezone handling. |
id | string | Required | Route identifier for this analytics action. Use query parameters to filter transactions. |
limit | int | Optional | Maximum records returned on this page. |
offset | int | Optional | Zero-based number of matching records to skip. |
recipientId | string | Optional | Restrict transactions to this recipient account. |
senderId | string | Optional | Restrict transactions to this sender account. |
start | string | Optional | Inclusive start of the reporting window. Defaults to a recent window. Accepts ISO 8601 datetime strings with or without a timezone offset (including Z and fractional seconds), YYYY-MM-DD HH:MM:SS, DD-MM-YYYY HH:MM:SS, YYYY-MM-DD, DD-MM-YYYY, or a Unix timestamp in seconds (including fractional seconds, not milliseconds). Datetime strings without an offset and date-only strings use the requested timezone; explicit offsets are converted to that timezone. Date-only values start at midnight. Seconds and fractional seconds are discarded, rounding the reporting boundary down to the minute. Prefer ISO 8601 with an explicit offset for unambiguous timezone handling. |
timezone | string | Optional | IANA timezone used for bucket boundaries and datetime strings without an offset. Missing, empty or unknown names use the deployment timezone (UTC by default). |
type | int | Optional | Transaction type identifier. Defaults to data transactions. |
acceptLanguage | string | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
$result = $client->analytics()->getTransactions( id: '550e8400-e29b-41d4-a716-446655440000',);Returns
TransactionsResponseThe operation completed successfully.
classTransactionsResponse7fields
countintnextstringpreviousstringtimezonestringstartDateTimeendDateTimeresults[TransactionRecord[]](TransactionRecord.md)classTransactionRecord8fields
senderUuidstringrecipientUuidstringtypeintamountintpackageUuidstringdetailsstringdateDateTimetimestampDateTimeThrows
ApiExceptionNormalized API, transport, and response processing failure.
ErrorKind::ValidationThe request arguments or business rules are invalid.ErrorKind::AuthenticationAuthentication credentials are missing, expired, or invalid.ErrorKind::PermissionThe authenticated account cannot perform this operation.ErrorKind::ServerProxyRequest could not complete the operation.ErrorKind::NotFoundThe requested resource does not exist.ErrorKind::NetworkThe request could not reach ProxyRequest.ErrorKind::UnexpectedThe response could not be decoded or did not match the SDK contract.
InvalidArgumentExceptionA required argument is missing or violates a local SDK constraint.
local validationThe request was rejected before it was sent.
Advanced variants
$client->analytics()->getTransactionsWithResponse($id, $end = null, $limit = null, $offset = null, $recipientId = null, $senderId = null, $start = null, $timezone = null, $type = null, $acceptLanguage = null, string $contentType = self::contentTypes['getTransactions'][0]): \ProxyRequest\ApiResponseReturns an ApiResponse with decoded data and HTTP metadata.
$client->analytics()->getTransactionsWithHttpInfo($id, $end = null, $limit = null, $offset = null, $recipientId = null, $senderId = null, $start = null, $timezone = null, $type = null, $acceptLanguage = null, string $contentType = self::contentTypes['getTransactions'][0])Returns the OpenAPI Generator response tuple.
$client->analytics()->getTransactionsAsync($id, $end = null, $limit = null, $offset = null, $recipientId = null, $senderId = null, $start = null, $timezone = null, $type = null, $acceptLanguage = null, string $contentType = self::contentTypes['getTransactions'][0])Returns a Guzzle promise for the decoded result.
$client->analytics()->getTransactionsAsyncWithHttpInfo($id, $end = null, $limit = null, $offset = null, $recipientId = null, $senderId = null, $start = null, $timezone = null, $type = null, $acceptLanguage = null, string $contentType = self::contentTypes['getTransactions'][0])Returns a Guzzle promise for the response tuple.
$client->analytics()->getTransactionsRequest($id, $end = null, $limit = null, $offset = null, $recipientId = null, $senderId = null, $start = null, $timezone = null, $type = null, $acceptLanguage = null, string $contentType = self::contentTypes['getTransactions'][0])Builds the PSR-7 request without sending it.