Skip to content
Navigation

Updates a discount's fields.

PATCH
https://api.sherpo.io/merchant/v1/stores/{store}/discounts/{discount}

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

  • discount
    string
    required
    minLength: 1

Request body JSON optional

  • name
    optional

    One of the following:

    • string
    • null
  • priority
    optional
    integer
    maximum: 1000000 · minimum: -1000000
  • applies
    optional
    automatically
    or
    by_code
    or
    never
  • floor_amount
    optional

    The lowest each unit's price goes.

    One of the following:

    • integer
    • null
  • cap_amount
    optional

    At most this off each unit bought.

    One of the following:

    • integer
    • null
  • floor_percent
    optional

    One of the following:

    • integer
    • null
  • supply_total
    optional

    One of the following:

    • integer
    • null
  • supply_per_customer
    optional

    One of the following:

    • integer
    • null
  • starts_at
    optional

    One of the following:

    • string
    • null
  • ends_at
    optional

    One of the following:

    • string
    • null

Returns

200

Updates a discount's fields.

JSON
  • name
    required

    One of the following:

    • string
    • null
  • status
    string
    required
  • id
    string
    required
  • priority
    number
    required
  • created_at
    required

    One of the following:

    • string
    • null
  • currency
    required

    One of the following:

    • string
    • null
  • code
    required

    One of the following:

    • string
    • null
  • applies
    string
    required
  • amount_off
    number
    required
  • percent_off
    number
    required
  • floor_amount
    required

    One of the following:

    • number
    • null
  • cap_amount
    required

    One of the following:

    • number
    • null
  • floor_percent
    required

    One of the following:

    • number
    • null
  • supply_total
    required

    One of the following:

    • number
    • null
  • supply_consumed
    number
    required
  • supply_per_customer
    required

    One of the following:

    • number
    • null
  • starts_at
    required

    One of the following:

    • string
    • null
  • ends_at
    required

    One of the following:

    • string
    • null
  • archived_at
    required

    One of the following:

    • string
    • null
  • customers
    array of
    string
    required
  • usage
    object
    required
    • customers
      number
      required
    • uses
      number
      required
  • scopes
    array of
    object
    required
    • id
      string
      required
    • kind
      string
      required
    • product_id
      required

      One of the following:

      • string
      • null
    • tier_id
      required

      One of the following:

      • string
      • null
    • price_id
      required

      One of the following:

      • string
      • null
  • affiliates_ended
    object
    required
    • total
      number
      required
  • affiliate_earnings
    required

    One of the following:

    • array<object>
    • null
  • exponent
    required

    One of the following:

    • number
    • null
  • affiliates
    array of
    object
    required
    • earnings
      required

      One of the following:

      • array<object>
      • null
    • user_id
      string
      required
    • amount_earned
      number
      required
    • percent_earned
      number
      required
    • token_id
      required

      One of the following:

      • string
      • null
    • changed_token_id
      required

      One of the following:

      • string
      • null
    • prior_amount_earned
      required

      One of the following:

      • number
      • null
    • prior_percent_earned
      required

      One of the following:

      • number
      • null
    • ended_at
      required

      One of the following:

      • string
      • null
    • updated_at
      required

      One of the following:

      • string
      • null
    • user
      required

      One of the following:

      • object
      • null
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • detail
    string
    required
  • code
    optional
    string
  • context
    optional
    object
  • reached_core
    optional
    boolean
  • core_answer
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close