promo_codes

Add a promo code guests can give as they book (bookings.create's promo_code): percent_off or amount_off a booking's total, for any offering or one, with an optional limit on uses and dates. Up to 100 per org; a code the org has already is refused with 409 code_taken

post/promo_codes

Request

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

Request body

codestring required

3 to 20 letters, digits and dashes, such as SPRING20; stored upper-cased, and guests may type it in any case

percent_offinteger

Percent off the total, 1 to 100 (100 makes the booking free); or amount_off

amount_offinteger

Off the total, in the currency's minor units (cents; whole yen for zero-decimal currencies), never below zero; or percent_off

offering_idstring uuid nullable

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

max_usesinteger nullable

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

starts_atstring nullable

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

ends_atstring nullable

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

activeboolean

false adds it switched off (default true)

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.