Infomaniak Newsletter icon

Infomaniak Newsletter

Interact with Infomaniak Newsletter API

Credits → Account Credits

AI-generated

Summary

Retrieves the account credits for a specified Infomaniak domain.

Inputs

  • authentication (required) — Authentication method – either OAuth2 or API Key.
  • domain (required) — Numeric identifier of the Infomaniak domain whose credits are to be fetched.
  • queryParameters.with — Optional string to load additional related data.
  • queryParameters.filter — Optional JSON filter to narrow the result set.
  • queryParameters.return — If set to 'total', the response returns only the count of items instead of the items themselves.
  • queryParameters.limit — Optional number defining how many items to return (part of offset/pagination).
  • queryParameters.skip — Optional number defining the index of the first item to return (0 = first item).
  • queryParameters.page — Optional page number for paginated results.
  • queryParameters.per_page — Optional number of items per page for paginated results.
  • queryParameters.order_by — Optional field name used for sorting the results.
  • queryParameters.order — Optional sort direction – either 'asc' or 'desc'.
  • queryParameters.order_for — Optional JSON specifying sorting order for specific fields.
  • returnAll — When true (default), the node will automatically paginate to return all matching credits. When false, the 'limit' input controls page size.
  • limit — Maximum number of items per page when returnAll is false (default 50, max 500).
  • returnFullResponse — When true, includes the raw HTTP response alongside the processed data.

Output shape

An array of credit objects when queryParameters.return is not 'total'; a single number representing the total count when queryParameters.return is 'total'. If returnFullResponse is true, an additional '__meta' field containing the raw response is included.

The underlying implementation uses the infomaniakApiRequest helper to call the Infomaniak Newsletter API endpoint for domain credits, applying any supplied query parameters for filtering, sorting, and pagination.

Examples

Example 1: Get total credit count for domain 12345

authentication=OAuth2, domain=12345, queryParameters.return=total

Example 2: Fetch first page of credit details with custom sorting

authentication=API Key, domain=67890, queryParameters.order_by=credits, queryParameters.order=desc, queryParameters.page=1, queryParameters.per_page=20

Links

Discussion