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

The coupon object
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "00000000-0000-0000-0000-000000000000",
"created_at": "2024-04-17T12:59:56.580Z",
"updated_at": "2024-04-17T12:59:56.580Z",
"deleted_at": "2024-04-17T12:59:56.580Z",
"code": "",
"definition": {},
"description": "",
"quota": 0,
"scope": "global"
}

List coupons

Filters

idFilter<uuid>

Unique identifier

organization_idFilter<uuid>

Identifier of the organization this coupon is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

deleted_atFilter<timestamp with time zone>

Timestamp at which the coupon was deleted

codeFilter<text>

Coupon code

definitionFilter<jsonb>

Definition of the coupon

descriptionFilter<text>

Description of the coupon

ftsFilter<tsvector>

Full text search index

quotaFilter<integer>

Maximum number of times this coupon can be used

scopeFilter<"global" | "product" | "service" | "rent">

Scope of the coupon

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<uuid>

Unique identifier

organization_idFilter<uuid>

Identifier of the organization this coupon is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

deleted_atFilter<timestamp with time zone>

Timestamp at which the coupon was deleted

codeFilter<text>

Coupon code

definitionFilter<jsonb>

Definition of the coupon

descriptionFilter<text>

Description of the coupon

ftsFilter<tsvector>

Full text search index

quotaFilter<integer>

Maximum number of times this coupon can be used

scopeFilter<"global" | "product" | "service" | "rent">

Scope of the coupon

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<uuid>

Unique identifier

organization_idFilter<uuid>

Identifier of the organization this coupon is defined in

created_atFilter<timestamp with time zone>

Creation timestamp

updated_atFilter<timestamp with time zone>

Last modification timestamp

deleted_atFilter<timestamp with time zone>

Timestamp at which the coupon was deleted

codeFilter<text>

Coupon code

definitionFilter<jsonb>

Definition of the coupon

descriptionFilter<text>

Description of the coupon

ftsFilter<tsvector>

Full text search index

quotaFilter<integer>

Maximum number of times this coupon can be used

scopeFilter<"global" | "product" | "service" | "rent">

Scope of the coupon

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 '{}'