Skip to main content
PUT
/
rewards
/
{id}
Update reward
curl --request PUT \
  --url https://v2.firstpromoter.com/api/v2/company/rewards/{id} \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "is_promoter_reward": true,
  "promoter_reward_type": "sale",
  "tier_reward_mode": "tier_commission_mode",
  "tier_level": 123,
  "coupon": "<string>",
  "hide_reward": true,
  "duration": "once",
  "duration_in_months": 123,
  "max_redemptions": 123,
  "should_create_provider_coupon": true,
  "new_customers_only": true,
  "provider_coupon_id": "<string>",
  "schemas": [
    {
      "unit": "cash",
      "amount": 123,
      "flat_amount": true,
      "rules": [
        {
          "type": "customer_sales_count",
          "condition": "less than",
          "filter_by": "price",
          "value": 123,
          "operator": "and"
        }
      ]
    }
  ]
}'
{
  "id": 123,
  "name": "<string>",
  "is_promoter_reward": true,
  "promoter_reward_type": "sale",
  "coupon": "<string>",
  "editable": true,
  "hide_reward": true,
  "provider_coupon_id": "<string>",
  "duration": "once",
  "duration_in_months": 123,
  "max_redemptions": 123,
  "new_customers_only": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "provider": "<string>",
  "tier_reward_mode": "tier_commission_mode",
  "tier_level": 123,
  "schemas": [
    {
      "unit": "cash",
      "amount": 123,
      "flat_amount": true,
      "rules": [
        {
          "type": "customer_sales_count",
          "condition": "less than",
          "filter_by": "<string>",
          "value": 123,
          "operator": "and"
        }
      ]
    }
  ]
}

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

ID of the reward to update

Body

application/json
name
string

Name of the reward

is_promoter_reward
boolean

Whether the reward is for promoters or referrals

promoter_reward_type
enum<string>

Type of promoter reward

Available options:
sale,
tier,
target,
custom
tier_reward_mode
enum<string>

Mode of tier reward. Required only for tier rewards.

Available options:
tier_commission_mode,
tier_override_mode,
tier_net_override_mode
tier_level
integer

Level of tier reward. Required only for tier rewards.

coupon
string

Coupon code associated with the reward

hide_reward
boolean

Whether to hide the reward

duration
enum<string>

Duration type of the reward

Available options:
once,
forever,
repeating
duration_in_months
integer

Duration in months. Required when duration is 'repeating'.

max_redemptions
integer

Maximum number of redemptions allowed

should_create_provider_coupon
boolean

Whether to create a provider coupon

new_customers_only
boolean

Whether the reward is only for new customers

provider_coupon_id
string

ID of the provider coupon

schemas
object[]

Reward schemas

Response

Reward updated successfully

id
integer

Id of the reward

name
string

Name of the reward

is_promoter_reward
boolean

Whether the reward is for promoters or referrals

promoter_reward_type
enum<string>

Type of promoter reward

Available options:
sale,
tier,
target
coupon
string | null

Coupon code associated with the reward

editable
boolean

Whether the reward is editable

hide_reward
boolean | null

Whether the reward is hidden

provider_coupon_id
string | null

ID of the provider coupon

duration
enum<string> | null

Duration type of the reward

Available options:
once,
forever,
repeating
duration_in_months
integer | null

Duration in months

max_redemptions
integer | null

Maximum number of redemptions allowed

new_customers_only
boolean

Whether the reward is only for new customers

created_at
string<date-time>

Date and time when the reward was created

updated_at
string<date-time>

Date and time when the reward was last updated

provider
string

Provider of the reward

tier_reward_mode
enum<string> | null

Mode of tier reward

Available options:
tier_commission_mode,
tier_override_mode,
tier_net_override_mode
tier_level
integer | null

Level of tier reward

schemas
object[]

Reward schemas

I