list()
List account rewards
Returns referral and campaign rewards earned by the authenticated account, ordered from newest to oldest.
Signature
client.rewards.list(options: RewardsListOptions = {}): Promise<RewardsListResponse>Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
level | string | Optional | * `standard` - Standard * `silver` - Silver * `gold` - Gold * `diamond` - Diamond |
limit | number | Optional | Number of results to return per page. |
offset | number | Optional | The initial index from which to return the results. |
ordering | string | Optional | Which field to use when ordering the results. |
userEmail | string | Optional | — |
userId | string | Optional | — |
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.rewards.list();Returns
PaginatedRewardListThe operation completed successfully.
typePaginatedRewardList4fields
countnumbernextstringpreviousstringresultsReward[]typeReward8fields
idstringemailstringcreatedstringbalancenumberdatanumberstatusRewardStatusEnumenumRewardStatusEnum0fields
* `pending` - Pending * `paid` - Paid * `review` - Review * `cancelled` - Cancelled
No fields.
descriptionstringlevelLevelEnumenumLevelEnum0fields
* `standard` - Standard * `silver` - Silver * `gold` - Gold * `diamond` - Diamond
No fields.
Throws
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: "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.rewards.listWithResponse(options): Promise<ApiResponse<RewardsListResponse>>Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
client.rewards.list(*, level: RewardsListLevel | Unset=UNSET, limit: int | Unset=UNSET, offset: int | Unset=UNSET, ordering: str | Unset=UNSET, user_email: str | Unset=UNSET, user_id: UUID | Unset=UNSET, accept_language: str | Unset=UNSET) -> PaginatedRewardListawait async_client.rewards.list(*, level: RewardsListLevel | Unset=UNSET, limit: int | Unset=UNSET, offset: int | Unset=UNSET, ordering: str | Unset=UNSET, user_email: str | Unset=UNSET, user_id: UUID | Unset=UNSET, accept_language: str | Unset=UNSET) -> PaginatedRewardListParameters
| Name | Type | Requirement | Description |
|---|---|---|---|
level | str | Optional | * `standard` - Standard * `silver` - Silver * `gold` - Gold * `diamond` - Diamond |
limit | int | Optional | Number of results to return per page. |
offset | int | Optional | The initial index from which to return the results. |
ordering | str | Optional | Which field to use when ordering the results. |
user_email | str | Optional | — |
user_id | str | Optional | — |
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.rewards.list()Async example
result = await async_client.rewards.list()Returns
PaginatedRewardListThe operation completed successfully.
classPaginatedRewardList4fields
countintresultslist[Reward]classReward8fields
emailstrcreateddatetime.datetimeidstrbalanceintdataintstatusRewardStatusEnumenumRewardStatusEnum0fields
No fields.
descriptionstrlevelLevelEnumenumLevelEnum0fields
No fields.
next_None | strpreviousNone | strThrows
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.NETWORKThe request could not reach ProxyRequest.ErrorKind.UNEXPECTEDThe response could not be decoded or did not match the SDK contract.
Advanced variants
client.rewards.list_with_response(*, level: RewardsListLevel | Unset=UNSET, limit: int | Unset=UNSET, offset: int | Unset=UNSET, ordering: str | Unset=UNSET, user_email: str | Unset=UNSET, user_id: UUID | Unset=UNSET, accept_language: str | Unset=UNSET) -> ApiResponse[PaginatedRewardList]Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
$client->rewards()->list($level = null, $limit = null, $offset = null, $ordering = null, $userEmail = null, $userId = null, $acceptLanguage = null, string $contentType = self::contentTypes['list'][0])Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
level | string | Optional | * `standard` - Standard * `silver` - Silver * `gold` - Gold * `diamond` - Diamond |
limit | int | Optional | Number of results to return per page. |
offset | int | Optional | The initial index from which to return the results. |
ordering | string | Optional | Which field to use when ordering the results. |
userEmail | string | Optional | — |
userId | string | Optional | — |
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->rewards()->list();Returns
PaginatedRewardListThe operation completed successfully.
classPaginatedRewardList4fields
countintnextstringpreviousstringresults[Reward[]](Reward.md)classReward8fields
idstringemailstringcreatedDateTimebalanceintdataintstatusRewardStatusEnumenumRewardStatusEnum0fields
* `pending` - Pending * `paid` - Paid * `review` - Review * `cancelled` - Cancelled
No fields.
descriptionstringlevelLevelEnumenumLevelEnum0fields
* `standard` - Standard * `silver` - Silver * `gold` - Gold * `diamond` - Diamond
No fields.
Throws
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::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->rewards()->listWithResponse($level = null, $limit = null, $offset = null, $ordering = null, $userEmail = null, $userId = null, $acceptLanguage = null, string $contentType = self::contentTypes['list'][0]): \ProxyRequest\ApiResponseReturns an ApiResponse with decoded data and HTTP metadata.
$client->rewards()->listWithHttpInfo($level = null, $limit = null, $offset = null, $ordering = null, $userEmail = null, $userId = null, $acceptLanguage = null, string $contentType = self::contentTypes['list'][0])Returns the OpenAPI Generator response tuple.
$client->rewards()->listAsync($level = null, $limit = null, $offset = null, $ordering = null, $userEmail = null, $userId = null, $acceptLanguage = null, string $contentType = self::contentTypes['list'][0])Returns a Guzzle promise for the decoded result.
$client->rewards()->listAsyncWithHttpInfo($level = null, $limit = null, $offset = null, $ordering = null, $userEmail = null, $userId = null, $acceptLanguage = null, string $contentType = self::contentTypes['list'][0])Returns a Guzzle promise for the response tuple.
$client->rewards()->listRequest($level = null, $limit = null, $offset = null, $ordering = null, $userEmail = null, $userId = null, $acceptLanguage = null, string $contentType = self::contentTypes['list'][0])Builds the PSR-7 request without sending it.