curl --request GET \
--url https://campaignservice-staging.withbenji.com/campaigns \
--header 'Authorization: Bearer <token>'{
"campaigns": [
{
"id": 1,
"name": "<string>",
"campaign_type": 1,
"created_date": "2023-11-07T05:31:56Z",
"description": "<string>",
"campaign_logo": "<string>",
"merchant_id": 2,
"partner_id": 2,
"partnership_id": 2,
"is_active": 0,
"is_deleted": 0,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"activation_date": "2023-11-07T05:31:56Z",
"owner_id": 1,
"is_template": 0,
"template_id": 123,
"total_rewards": 1,
"campaign_flows": [
{
"id": 1,
"campaign_id": 2,
"trigger_type": 1,
"is_active": 0,
"is_deleted": 0,
"created_date": "2023-11-07T05:31:56Z",
"custom_trigger_id": 123,
"actions": [
{
"action_type": 1,
"partner_id": 2,
"base_reward": 1,
"id": 0,
"extra_data": {}
}
],
"conditions": [
{
"partner_id": 2,
"campaign_condition_type": 1,
"condition_operator": 1,
"or_and_operator": 1,
"id": 0,
"condition_attribute": 123,
"condition_value": "<unknown>"
}
],
"multipliers": [
{
"partner_id": 2,
"multiplier_attribute_type": 1,
"multiplier_attribute": 123,
"multiplier_amount": 1,
"id": 0,
"multiplier_value": 123
}
]
}
],
"goals": [
{
"partner_id": 2,
"goal_type": 1,
"goal_value": 1,
"goal_operator": 1,
"id": 0
}
]
}
]
}curl --request GET \
--url https://campaignservice-staging.withbenji.com/campaigns \
--header 'Authorization: Bearer <token>'{
"campaigns": [
{
"id": 1,
"name": "<string>",
"campaign_type": 1,
"created_date": "2023-11-07T05:31:56Z",
"description": "<string>",
"campaign_logo": "<string>",
"merchant_id": 2,
"partner_id": 2,
"partnership_id": 2,
"is_active": 0,
"is_deleted": 0,
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"activation_date": "2023-11-07T05:31:56Z",
"owner_id": 1,
"is_template": 0,
"template_id": 123,
"total_rewards": 1,
"campaign_flows": [
{
"id": 1,
"campaign_id": 2,
"trigger_type": 1,
"is_active": 0,
"is_deleted": 0,
"created_date": "2023-11-07T05:31:56Z",
"custom_trigger_id": 123,
"actions": [
{
"action_type": 1,
"partner_id": 2,
"base_reward": 1,
"id": 0,
"extra_data": {}
}
],
"conditions": [
{
"partner_id": 2,
"campaign_condition_type": 1,
"condition_operator": 1,
"or_and_operator": 1,
"id": 0,
"condition_attribute": 123,
"condition_value": "<unknown>"
}
],
"multipliers": [
{
"partner_id": 2,
"multiplier_attribute_type": 1,
"multiplier_attribute": 123,
"multiplier_amount": 1,
"id": 0,
"multiplier_value": 123
}
]
}
],
"goals": [
{
"partner_id": 2,
"goal_type": 1,
"goal_value": 1,
"goal_operator": 1,
"id": 0
}
]
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OK
The list of campaign objects matching the query criteria. Each object contains complete campaign details including configuration, reward structure, eligibility criteria, and performance metrics. Returns an empty list if no campaigns match the criteria.
Show child attributes
The unique identifier of the campaign. Used to reference this specific campaign in API calls and database operations.
x >= 0The name of the campaign that is displayed to users and administrators. Limited to 255 characters and used for identification in the user interface.
1 - 255The type of campaign that determines how rewards are structured. Values: 1=EARN (users earn rewards), 2=REDEEM (users redeem rewards), 3=CONNECT_ONLY (partnership connection only), 4=TRANSFER (reward transfers between programs).
1, 2, 3, 4 The timestamp when this campaign was created, in ISO 8601 format.
A detailed description of the campaign explaining its purpose, benefits, and how users can participate. May be null if no description is provided.
The URL to the campaign logo image that is displayed to users in marketing materials and the user interface. May be null if no logo is provided.
The unique identifier of the merchant associated with this campaign. References a merchant in the system.
x >= 1The unique identifier of the partner associated with this campaign. References a partner in the system.
x >= 1The unique identifier of the partnership this campaign belongs to. References a partnership relationship.
x >= 1Indicates whether the campaign is currently active and accepting participants. Values: 1=active, 0=inactive.
0 <= x <= 1Indicates whether the campaign has been deleted and is hidden from normal operations. Values: 1=deleted, 0=not deleted.
0 <= x <= 1The date and time when this campaign becomes active and available to users, in ISO 8601 format.
The date and time when this campaign expires and is no longer available. May be null for campaigns with no expiration date.
The date and time when this campaign was activated, in ISO 8601 format.
The unique identifier of the user who created or owns this campaign. Used for attribution and permission management.
x >= 0Indicates whether this campaign is a template. Templates are reusable campaign configurations that can be used to create new campaigns. Values: 1=template, 0=not a template.
0 <= x <= 1The template campaign ID this campaign is based on. May be null if not based on a template.
The total amount of rewards that have been distributed through this campaign so far, in the smallest currency unit (e.g., cents).
x >= 0The list of campaign flows that define different trigger conditions and reward structures for this campaign. Each flow represents a distinct path through the campaign. May be null if no flows are defined.
Show child attributes
The unique identifier of the campaign flow. Used to reference this specific flow in API calls and database operations.
x >= 0The ID of the campaign this flow belongs to. References the parent campaign.
x >= 1The event type that triggers this campaign flow's rewards. Values: 1=SPEND (purchase transaction), 2=REGISTRATION (user signup), 3=REFERRAL (user referral), 4=CUSTOM (custom trigger event).
1, 2, 3, 4, 5 Whether the campaign flow is active (1) or inactive (0). Inactive flows will not trigger rewards.
0, 1 Whether the campaign flow is deleted (1) or not (0). Deleted flows are hidden from normal operations.
0, 1 The timestamp when this campaign flow was created, in ISO 8601 format.
The unique identifier for a custom trigger, used when trigger_type is CUSTOM (4). May be null if not using custom triggers.
The list of actions that can be performed within this campaign flow. May be null if no actions are defined.
Show child attributes
The type of campaign action that will trigger rewards. Determines how users can earn or redeem benefits.
1, 2, 3, 4 The unique identifier of the partner associated with this action. Must reference an existing partner in the system.
x >= 1The base reward amount for this action, in the smallest currency unit (e.g., cents). This is the default reward before any multipliers are applied.
x >= 0The unique identifier of the action. Use 0 for new actions or provide the existing ID for updates.
The list of conditions that must be satisfied for this campaign flow to be eligible. May be null if no conditions are defined.
Show child attributes
The unique identifier of the partner associated with this condition. Must reference an existing partner in the system.
x >= 1The type of condition attribute being evaluated. Values: 1=USER (user attributes), 2=TRANSACTION (transaction attributes), 3=PARTNER (partner attributes), 4=CAMPAIGN (campaign attributes).
1, 2, 3, 4, 5, 6, 7, 8, 9 The comparison operator for evaluating this condition. Values: 1=EQUALS (exact match), 2=LESS_THAN (value must be less), 3=GREATER_THAN (value must be greater), 4=LESS_THAN_OR_EQUAL, 5=GREATER_THAN_OR_EQUAL.
1, 2, 3, 4 The logical operator for combining this condition with other conditions. Values: 1=AND (both conditions must be true), 2=OR (either condition can be true).
1, 2 The unique identifier of the condition. Use 0 for new conditions or provide the existing ID for updates.
The specific attribute to evaluate for this condition. The available values depend on the condition_attribute_type selected.
Optional. The threshold value used to evaluate this condition. For example, minimum purchase amount in cents or time in seconds, or a specific item code or id.
The list of multipliers that can increase reward amounts based on specific criteria. May be null if no multipliers are defined.
Show child attributes
The unique identifier of the partner associated with this multiplier. Must reference an existing partner in the system.
x >= 1The type of attribute that triggers this multiplier. Values: 1=USER (user attributes), 2=TRANSACTION (transaction attributes), 3=PARTNER (partner attributes), 4=CAMPAIGN (campaign attributes).
1, 2, 3, 4, 5, 6, 7, 8, 9 The specific attribute that triggers this multiplier. The available values depend on the multiplier_attribute_type selected.
The multiplier amount to apply to the base reward. For example, 1.5 would increase the reward by 50%, while 2.0 would double the reward.
x >= 0The unique identifier of the multiplier. Use 0 for new multipliers or provide the existing ID for updates.
Optional. The value that the multiplier_attribute must match to trigger this multiplier. May be null for attribute-only multipliers.
The list of goals for this campaign. Goals define targets or limits for campaign performance metrics, such as maximum reward distribution or target number of participants. May be null if no goals are defined.
Show child attributes
The unique identifier of the partner this goal is associated with.
x >= 1The type of goal being set for this campaign. Values: 1=PARTICIPATION (number of participants), 2=REWARD_AMOUNT (total rewards distributed), 3=TRANSACTION_COUNT (number of transactions), 4=REVENUE (total revenue generated).
1, 2, 3, 4 The target value for this goal. The unit depends on the goal_type (e.g., number of users, amount in cents, count of transactions).
x >= 0The comparison operator used to evaluate progress against this goal. Values: 1=EQUALS (exact target), 2=LESS_THAN (maximum limit), 3=GREATER_THAN (minimum threshold).
1, 2, 3, 4 The unique identifier of the goal. Use 0 for new goals or provide the existing ID for updates.
Was this page helpful?