promo_codes

Switch a promo code on or off, or change its limit, end or offering; null opens each again. Bookings made with it keep what it took off

patch/promo_codes/{id}

Request

  • Base URL: https://daybag.io/api/v1
  • URL: https://daybag.io/api/v1/promo_codes/{id}
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Request body

activeboolean

false switches it off: guests can't use it

max_usesinteger nullable

How many bookings may use it; null (or left out) for no limit

ends_atstring nullable

ISO 8601 instant, e.g. 2026-10-03T15:00:00Z

offering_idstring uuid nullable

Only this offering's bookings; null (or left out) for any offering

Response

Success

idstring required
org_idstring required
codestring required

As guests give it, upper-cased: 3 to 20 letters, digits and dashes

percent_offinteger nullable required

Percent off a booking's total, 1 to 100; null when it takes an amount off

amount_offinteger nullable required

Off a booking's total, in the currency's minor units (cents; whole yen for zero-decimal currencies), never below zero; null when it takes a percent off

offering_idstring nullable required

The one offering it's for; null for any offering

max_usesinteger nullable required

How many bookings may use it; null for no limit

usesinteger required

Bookings made with it

starts_atstring nullable required

ISO 8601 timestamp (UTC)

ends_atstring nullable required

ISO 8601 timestamp (UTC)

activeboolean required

false: switched off, it can't be used

created_atstring required

ISO 8601 timestamp (UTC)

Changes

No recorded changes to this operation across all 1 revision of this API.