Xavier LAI
10/21/2025, 2:45 PM{
"data": {
"type": "campaign-values-report",
"attributes": {
"timeframe": {
"key": "last_12_months"
},
"statistics": [
"recipients",
"opens",
"opens_unique",
"clicks",
"clicks_unique",
"unsubscribes",
"spam_complaints",
"bounced",
"bounced_or_failed",
"failed",
"message_segment_count_sum",
"conversions",
"conversion_value"
],
"conversion_metric_id": "LSjDzb"
}
}
}
Here I want conversion_metric_id value to be a variablekapa.ai
10/21/2025, 2:45 PMconversion_metric_id). Then, in your JSON request body, you can reference this variable using Jinja templating syntax: json { "data": { "type": "campaign-values-report", "attributes": { "timeframe": { "key": "last_12_months" }, "statistics": [ "recipients", "opens", "opens_unique", "clicks", "clicks_unique", "unsubscribes", "spam_complaints", "bounced", "bounced_or_failed", "failed", "message_segment_count_sum", "conversions", "conversion_value" ], "conversion_metric_id": "{{ config['conversion_metric_id'] }}" } } } According to the [Request Options documentation](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/request-options#request-options-provider), you can configure the request_body_json in your requester to include nested JSON objects with variable interpolation. The config variable allows you to access user-provided configuration values. The documentation also confirms that [nested fields are supported](https://github.com/airbytehq/airbyte/issues/18784) in request_body_json, so your nested structure will work correctly. You can use Jinja expressions at any depth within the JSON body to inject dynamic values from your connector's configuration.Xavier LAI
10/21/2025, 3:04 PMkapa.ai
10/21/2025, 3:04 PMkapa.ai
10/21/2025, 3:04 PM["last_7_days", "last_30_days", "last_12_months"] or reference a user input using {{ config['timeframes'] }} - Current Partition Value Identifier: Choose a name like timeframe_key - Inject Partition Value Into Outgoing HTTP Request: Since you need it in the JSON body, you'll reference it in your request body 3. Update your JSON body to use the partition value: json { "data": { "type": "campaign-values-report", "attributes": { "timeframe": { "key": "{{ stream_partition.timeframe_key }}" }, "statistics": [ "recipients", "opens", "opens_unique", "clicks", "clicks_unique", "unsubscribes", "spam_complaints", "bounced", "bounced_or_failed", "failed", "message_segment_count_sum", "conversions", "conversion_value" ], "conversion_metric_id": "{{ config['conversion_metric_id'] }}" } } } According to the [Partitioning documentation](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/partitioning), the List Partition Router will iterate over each value in your list and make a separate request for each one. If you set the partition values to ["last_7_days", "last_30_days", "last_12_months"], Airbyte will make three separate requests, one for each timeframe value. You can also make this user-configurable by creating a user input of type array and referencing it as {{ config['timeframes'] }} in the Partition Values field, as explained in the [static partitioning examples](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/partitioning#dynamic-and-static-partitioning).Xavier LAI
10/21/2025, 3:07 PMstart and end where I want to be each calendar year from 2022
{
"data": {
"type": "campaign-values-report",
"attributes": {
"timeframe": {
"start": "{{ config['start_window'] }}",
"end": "{{ config['end_window'] }}"
},
"statistics": [
"recipients",
"opens",
"opens_unique",
"clicks",
"clicks_unique",
"unsubscribes",
"spam_complaints",
"bounced",
"bounced_or_failed",
"failed",
"message_segment_count_sum",
"conversions",
"conversion_value"
],
"conversion_metric_id": "{{ config['conversion_metric_id'] }}"
}
}
}kapa.ai
10/21/2025, 3:07 PMkapa.ai
10/21/2025, 3:07 PM["2022", "2023", "2024"] (or make it user-configurable) - Current Partition Value Identifier: year 2. Update your JSON body to construct the start and end dates dynamically: json { "data": { "type": "campaign-values-report", "attributes": { "timeframe": { "start": "{{ stream_partition.year }}-01-01", "end": "{{ stream_partition.year }}-12-31" }, "statistics": [ "recipients", "opens", "opens_unique", "clicks", "clicks_unique", "unsubscribes", "spam_complaints", "bounced", "bounced_or_failed", "failed", "message_segment_count_sum", "conversions", "conversion_value" ], "conversion_metric_id": "{{ config['conversion_metric_id'] }}" } } } This will make separate requests for each year: - 2022: start: "2022-01-01", end: "2022-12-31" - 2023: start: "2023-01-01", end: "2023-12-31" - 2024: start: "2024-01-01", end: "2024-12-31" According to the [Custom parameter injection documentation](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync#custom-parameter-injection), you can use Jinja expressions to freely configure properties of the JSON body. The stream_partition variable allows you to reference the current partition value, as shown in the [Partitioning examples](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/partitioning#partition-router-types). If you need more complex date formatting or want to make the year list dynamic, you could also create a user input of type array where users specify which years to sync, and reference it as {{ config['years'] }} in the Partition Values field.Xavier LAI
10/21/2025, 3:46 PMkapa.ai
10/21/2025, 3:47 PMkapa.ai
10/21/2025, 3:47 PM["2024"] (or whatever the current year is). 2. Use a single static value: If you only want the latest year, you might not need partitioning at all. You could simply use Jinja expressions directly in your JSON body to calculate the current year: json { "data": { "type": "campaign-values-report", "attributes": { "timeframe": { "start": "2024-01-01", "end": "2024-12-31" }, ... } } } 3. Consider incremental sync: If your goal is to only sync new data, you might want to explore [incremental sync](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/incremental-sync) instead of partitioning, which is designed to pull only data that has changed since the previous sync. Unfortunately, the knowledge sources don't contain specific information about filtering or limiting partition execution to only the latest partition in Airbyte Cloud. You may need to consult Airbyte's support or community forums for more specific guidance on this use case.