curl --request PUT \
--url https://api.firstpromoter.com/api/v2/company/campaigns/{id} \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"landing_url": "<string>",
"ref_token_param": "?fpr",
"color": "<string>",
"visitor_cookie_life": 123,
"auto_approve_promoters": true,
"is_private": true,
"track_ad_traffic": "pending",
"links": [
{
"name": "<string>",
"url": "<string>",
"id": 123,
"_destroy": true
}
],
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers"
},
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
"<unknown>"
],
"reward_id": 123
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
"<unknown>"
],
"reward_id": 123
}
]
}
'{
"id": 123,
"name": "<string>",
"color": "<string>",
"stats": {
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"promoters_count": 123,
"revenue_amount": 123
},
"landing_url": "<string>",
"visitor_cookie_life": 123,
"ref_token_param": "<string>",
"auto_approve_leads": true,
"track_ad_traffic": "pending",
"auto_approve_promoters": true,
"is_private": true,
"is_default": true,
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers",
"move_referrals_on_level_change": true
},
"signup_url": "<string>",
"links": [
{
"id": 123,
"name": "<string>",
"url": "<string>"
}
],
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
]
}curl --request PUT \
--url https://api.firstpromoter.com/api/v2/company/campaigns/{id} \
--header 'Account-ID: <account-id>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"landing_url": "<string>",
"ref_token_param": "?fpr",
"color": "<string>",
"visitor_cookie_life": 123,
"auto_approve_promoters": true,
"is_private": true,
"track_ad_traffic": "pending",
"links": [
{
"name": "<string>",
"url": "<string>",
"id": 123,
"_destroy": true
}
],
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers"
},
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
"<unknown>"
],
"reward_id": 123
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
"<unknown>"
],
"reward_id": 123
}
]
}
'{
"id": 123,
"name": "<string>",
"color": "<string>",
"stats": {
"referrals_count": 123,
"sales_count": 123,
"customers_count": 123,
"promoters_count": 123,
"revenue_amount": 123
},
"landing_url": "<string>",
"visitor_cookie_life": 123,
"ref_token_param": "<string>",
"auto_approve_leads": true,
"track_ad_traffic": "pending",
"auto_approve_promoters": true,
"is_private": true,
"is_default": true,
"upgrade_details": {
"campaign_id": 123,
"amount": 123,
"metric": "customers",
"move_referrals_on_level_change": true
},
"signup_url": "<string>",
"links": [
{
"id": 123,
"name": "<string>",
"url": "<string>"
}
],
"rewards_for_promoters": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
],
"rewards_for_referrals": [
{
"apply_on": "monthly",
"product_ids": [
123
],
"reward_id": 123,
"reward": {
"name": "<string>",
"promoter_reward_type": "<string>",
"hide_reward": true,
"tier_level": 123,
"coupon": "<string>"
},
"products": [
{
"id": 123,
"name": "<string>"
}
]
}
]
}Access token passed as a Bearer token in the Authorization header
Account identifier that specifies which account is making the request
"acc_123456"
?fpr, ?via, ?fp_ref, ?deal, ?ref, ?_from, ?_by, ?_go pending, allow, block Campaign updated successfully
Campaign ID
Campaign name
Campaign color
Show child attributes
Number of referrals in this campaign
Number of sales in this campaign
Number of customers in this campaign
Number of promoters in this campaign
Total revenue in this campaign
Landing URL for the campaign
Visitor cookie lifetime in days
Referral token parameter
Whether to auto-approve leads
How to handle ad traffic
pending, allow, block Whether to auto-approve promoters
Whether the campaign is private
Whether this is the default campaign
Show child attributes
ID of the campaign to upgrade to
Amount needed to trigger the upgrade
Metric used for the upgrade
customers, revenue, active_customers Whether to move referrals when level changes
URL for promoters to sign up
Show child attributes
When the reward applies
monthly, yearly, one_time, all, specific IDs of products this reward applies to
ID of the reward
Show child attributes
Name of the reward
Type of promoter reward
Whether to hide the reward
Tier level of the reward
Coupon code for the reward
Show child attributes
When the reward applies
monthly, yearly, one_time, all, specific IDs of products this reward applies to
ID of the reward
Show child attributes
Name of the reward
Type of promoter reward
Whether to hide the reward
Tier level of the reward
Coupon code for the reward