PUT
/
promoter_campaigns
/
{id}
curl --request PUT \
  --url https://v2.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

Access token passed as a Bearer token in the Authorization header

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Path Parameters

id
integer
required

Promoter campaign ID.

Body

application/json

Response

200
application/json
Updated promoter campaign

The response is of type object.