Create an offer: one shared code (kind single) or a batch of single-use codes (kind bulk)

post/api/v1/coupons

Request

  • Base URL: http://127.0.0.1:4310
  • URL: http://127.0.0.1:4310/api/v1/coupons
  • Auth: one of:
    • HTTP bearer
    • API key in cookie sfb_session

Request body

namestring required
kind'single' | 'bulk'
codestring
prefixstring
countinteger
discount_type'percent' | 'fixed' required
percentinteger
amount_minorinteger
scope'all' | 'services' | 'categories' | 'products'

Gift cards are excluded unless include_gift_cards is true

service_idsstring[]
categoriesstring[]
product_idsstring[]
include_gift_cardsboolean
min_spend_minorinteger
starts_atstring date-time
ends_atstring date-time
total_capinteger
per_client_capinteger
first_visit_onlyboolean
stackableboolean

Response

OK

object required

Changes

No recorded changes to this operation across all 4 revisions of this API.