Skip to main content
PUT
/
promo_codes
/
{id}
Update promo code by id
curl --request PUT \
  --url https://v2.firstpromoter.com/api/v2/affiliate/promo_codes/{id} \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "<string>",
  "description": "<string>",
  "reward_id": 123,
  "promoter_campaign_id": 123,
  "metadata": {},
  "details": {}
}'
{
  "id": 123,
  "code": "<string>",
  "reward": {
    "id": 123,
    "name": "<string>"
  },
  "ext_id": "<string>",
  "description": "<string>",
  "company_id": 123,
  "promoter_campaign_id": 123,
  "metadata": {},
  "details": {},
  "archived_at": "2023-11-07T05:31:56Z"
}

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

Body

application/json
code
string

Code of the promo code

description
string

Description of the promo code

reward_id
integer

ID of the reward

promoter_campaign_id
integer

ID of the promoter campaign

metadata
object

Metadata of the promo code

details
object

Details of the promo code

Response

Promo code updated successfully

id
integer
code
string
reward
object
ext_id
string
description
string
company_id
integer
promoter_campaign_id
integer
metadata
object
details
object
archived_at
string<date-time>
I