Core resources


Administration


Booking flow

Coupons

Codes guests can enter for additional discounts

The coupon object

Attributes

iduuid

Unique identifier

organization_iduuid

Identifier of the organization this coupon is defined in

created_attimestamp with time zone

Creation timestamp

updated_attimestamp with time zone

Last modification timestamp

deleted_attimestamp with time zone | null

Timestamp at which the coupon was deleted

codetext

Coupon code

definitionjsonb

Definition of the coupon

descriptiontext

Description of the coupon

ftstsvector

Full text search index

quotainteger | null

Maximum number of times this coupon can be used

scope"global" | "product" | "service" | "rent"

Scope of the coupon

stackableboolean
The coupon object
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2024-11-23T09:57:08.090Z",
"updated_at": "2024-11-23T09:57:08.090Z",
"deleted_at": "2024-11-23T09:57:08.090Z",
"code": "",
"definition": {},
"description": "",
"quota": 0,
"scope": "global",
"stackable": true
}

List coupons

Filters

idFilter<>

Unique identifier

organization_idFilter<>

Identifier of the organization this coupon is defined in

created_atFilter<>

Creation timestamp

updated_atFilter<>

Last modification timestamp

deleted_atFilter<>

Timestamp at which the coupon was deleted

codeFilter<>

Coupon code

definitionFilter<>

Definition of the coupon

descriptionFilter<>

Description of the coupon

ftsFilter<>

Full text search index

quotaFilter<>

Maximum number of times this coupon can be used

scopeFilter<>

Scope of the coupon

stackableFilter<>

Responses

200

A list of coupons with the selected columns

206

Partial Content

GET/coupons
curl -X GET "https://api.bookingmood.com/v1/coupons?select=*" \
  -H "Authorization: Bearer YOUR_API_KEY"

Create coupons

Body

Partial<Coupon>
| Array<Partial<Coupon>>

Responses

201

The newly created coupons with the selected columns

POST/coupons
curl -X POST "https://api.bookingmood.com/v1/coupons" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '[]'

Delete coupons

Filters

idFilter<>

Unique identifier

organization_idFilter<>

Identifier of the organization this coupon is defined in

created_atFilter<>

Creation timestamp

updated_atFilter<>

Last modification timestamp

deleted_atFilter<>

Timestamp at which the coupon was deleted

codeFilter<>

Coupon code

definitionFilter<>

Definition of the coupon

descriptionFilter<>

Description of the coupon

ftsFilter<>

Full text search index

quotaFilter<>

Maximum number of times this coupon can be used

scopeFilter<>

Scope of the coupon

stackableFilter<>

Responses

204

The deleted coupons with the selected columns

DELETE/coupons
curl -X DELETE "https://api.bookingmood.com/v1/coupons" \
  -H "Authorization: Bearer YOUR_API_KEY"

Update coupons

Filters

idFilter<>

Unique identifier

organization_idFilter<>

Identifier of the organization this coupon is defined in

created_atFilter<>

Creation timestamp

updated_atFilter<>

Last modification timestamp

deleted_atFilter<>

Timestamp at which the coupon was deleted

codeFilter<>

Coupon code

definitionFilter<>

Definition of the coupon

descriptionFilter<>

Description of the coupon

ftsFilter<>

Full text search index

quotaFilter<>

Maximum number of times this coupon can be used

scopeFilter<>

Scope of the coupon

stackableFilter<>

Body

Partial<Coupon>

Responses

204

The updated coupons with the selected columns

PATCH/coupons
curl -X PATCH "https://api.bookingmood.com/v1/coupons" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{}'