Skip to main content
PUT
/
promoter_campaigns
/
{id}
Update promoter campaign
curl --request PUT \
  --url https://api.firstpromoter.com/api/v2/company/promoter_campaigns/{id} \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "ref_token": "<string>",
  "state": "pending",
  "coupon": "<string>",
  "display_coupon": "<string>",
  "direct_url": "<string>",
  "rewards_for_promoters": [
    {
      "apply_on": "monthly",
      "product_ids": [
        123
      ],
      "reward_id": 123
    }
  ],
  "rewards_for_referrals": [
    {
      "apply_on": "monthly",
      "product_ids": [
        123
      ],
      "reward_id": 123
    }
  ],
  "promoter_rewards_customized": true,
  "referral_rewards_customized": true
}'
{
  "id": 123,
  "campaign_id": 123,
  "promoter_id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "promoter": {
    "id": 123,
    "email": "<string>",
    "name": "<string>"
  },
  "campaign": {
    "id": 123,
    "name": "<string>",
    "color": "<string>"
  },
  "state": "pending",
  "stats": {
    "clicks_count": 123,
    "referrals_count": 123,
    "sales_count": 123,
    "customers_count": 123,
    "revenue_amount": 123
  },
  "coupon": "<string>",
  "display_coupon": "<string>",
  "ref_token": "<string>",
  "ref_link": "<string>",
  "is_customized": true,
  "direct_url": "<string>",
  "referral_rewards_customized": true,
  "promoter_rewards_customized": true,
  "rewards_for_promoters": [
    {
      "apply_on": "<string>",
      "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": "<string>",
      "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>"
        }
      ]
    }
  ],
  "promo_codes": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token in the Authorization header. You can find your API Key on Your FirstPromoter Dashboard. Navigate to Settings → Integrations section → Manage API Keys

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Path Parameters

id
integer
required

Promoter campaign ID. This ID is not the promoter’s ID or the campaign’s ID. It’s the linking record that defines the promoter’s participation in that campaign. You can find this id in each object in the promoter_campaigns array when you get the details of the promoter.

Body

application/json
ref_token
string
state
enum<string>
Available options:
pending,
accepted,
rejected,
blocked,
inactive
coupon
string
display_coupon
string
direct_url
string
rewards_for_promoters
object[]
rewards_for_referrals
object[]
promoter_rewards_customized
boolean
referral_rewards_customized
boolean

Response

Updated promoter campaign

id
integer
campaign_id
integer
promoter_id
integer
created_at
string<date-time>
promoter
object
campaign
object
state
enum<string>
Available options:
pending,
accepted,
rejected,
blocked,
inactive
stats
object
coupon
string
display_coupon
string
ref_token
string
is_customized
boolean
direct_url
string
referral_rewards_customized
boolean
promoter_rewards_customized
boolean
rewards_for_promoters
object[]
rewards_for_referrals
object[]
promo_codes
string[]
I