Fields

List dimensions and metrics for a connection

Returns the set of field_ids you can pass to /v1/query, plus default_dimension and default_metric suggestions. By default returns the standard catalog plus the calculated metrics defined in the account for the integration, listed as regular metrics whose field_id can be requested in /v1/query.fields. To include account-specific custom fields (e.g. Facebook Ads custom conversions, GA4 custom metrics and dimensions, or the campaign name dimensions of a cross_platform accounts group), set include_custom_fields=true and provide connection_key + account_id. include_custom_fields is only allowed when the integration's catalog declares supports_custom_fields_per_account=true. For all other integrations, sending include_custom_fields (or connection_key/account_id) returns an error.

post/fields

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/fields
  • Auth: HTTP bearer

Request body

integration_idstring required
connection_keystring

REQUIRED when include_custom_fields is true. Also REQUIRED, with include_custom_fields false or absent, for hubspot with data_view contacts or deals, whose field list is always account specific. MUST NOT be present in any other case, nor for integrations whose supports_custom_fields_per_account is false. For cross_platform, account_id MUST equal connection_key (both are the key of the accounts group).

account_idstring

REQUIRED when include_custom_fields is true. Also REQUIRED, with include_custom_fields false or absent, for hubspot with data_view contacts or deals, whose field list is always account specific. MUST NOT be present in any other case, nor for integrations whose supports_custom_fields_per_account is false. For cross_platform, account_id MUST equal connection_key (both are the key of the accounts group).

data_viewstring

Required when the integration exposes data_views. For example, REQUIRED for google_ads (one of its 22 data_views: customer, campaign, ad_group, keyword_view, etc.). NOT applicable to facebook_ads, ga4, google_search_console, twitter_analytics or cross_platform. Consult /v1/integrations/detail for the full list of valid values per integration.

include_custom_fieldsboolean

Whether to include account-specific custom fields (custom conversions for facebook_ads, custom dimensions/metrics for ga4, the campaign name dimensions of the accounts group for cross_platform). Default false. Only allowed when the integration's catalog declares supports_custom_fields_per_account=true. When true, both connection_key and account_id are REQUIRED. When false or absent, connection_key and account_id MUST NOT be present in the request. The deprecated key include_custom_conversions is rejected with an error -- use include_custom_fields instead.

Response

The answer of the call, or a business error envelope. This endpoint reports its own errors with HTTP 200 and status=error: read envelope.status before reading data.

OR

Changes

No recorded changes to this operation across all 1 revision of this API.