> For the complete documentation index, see [llms.txt](https://docs.podplay.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podplay.app/api/promotions/coupons.md).

# Coupons

Coupon codes, discounts, and promotional offers.

## GET /coupons

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CouponCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CouponDto"}},"_total":{"type":"number","deprecated":true},"_pagination":{"$ref":"#/components/schemas/PaginationDto"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_pagination","_links"]},"CouponDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","INVALID","SCHEDULED","ACTIVE","EXPIRED"],"readOnly":true},"code":{"type":"string"},"description":{"type":"string"},"discountType":{"type":"string","enum":["AMOUNT_OFF","PERCENT_OFF"]},"value":{"type":"number"},"ticketsLeft":{"type":"number"},"ticketsApplied":{"type":"number","readOnly":true},"ticketsUsed":{"type":"number","readOnly":true,"deprecated":true},"active":{"type":"boolean"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"daysOfWeek":{"type":"array","items":{"type":"number"}},"eligibleType":{"type":"string","enum":["BOOKING","EVENT_OPEN_PLAY","EVENT_TOURNAMENT","EVENT_LEAGUE_NIGHT","EVENT_KIDS_CLASS","EVENT_ADULT_CLASS"],"deprecated":true,"description":"Deprecated: Use eligibleTypes array instead"},"eligibleTypes":{"description":"Array of eligible event types. Use \"EVENT_SUBTYPE\" for category (e.g., EVENT_ADULT_CLASS matches all adult classes). Use \"EVENT_SUBTYPE:customType\" for specific type (e.g., EVENT_ADULT_CLASS:Podfit).","type":"array","items":{"type":"string"}},"eligibleUsers":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"eligibleDomains":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string","enum":["SINGLE_USE","FIRST_ONLY","LIMITED","USER_RESTRICTED","DOMAIN_RESTRICTED","TYPE_RESTRICTED"]}},"allowedAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"createdDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"creator":{"readOnly":true,"nullable":true,"description":"The user who created this promo code","allOf":[{"$ref":"#/components/schemas/UserProfileDto"}]},"_links":{"type":"object"}},"required":["id","status","code","description","discountType","value","ticketsLeft","ticketsApplied","ticketsUsed","active","startDate","endDate","daysOfWeek","eligibleType","eligibleTypes","eligibleUsers","eligibleDomains","tags","allowedAreas","errors","createdDate","creator","_links"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"ValidationErrorDto":{"type":"object","properties":{"code":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true},"details":{"type":"object","readOnly":true,"nullable":true}},"required":["code","message","details"]},"UserProfileDto":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/ItemRefDto"},"type":{"type":"string","enum":["REGULAR","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER","COACH"],"readOnly":true},"membershipArea":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"gender":{"type":"string","readOnly":true},"birthday":{"format":"date-time","type":"string","readOnly":true},"initials":{"type":"string","readOnly":true},"description":{"type":"string"},"picture":{"type":"object","readOnly":true,"nullable":true},"usattRating":{"type":"number","readOnly":true,"nullable":true},"duprProfileUrl":{"type":"string","readOnly":true,"nullable":true},"memberSince":{"format":"date-time","type":"string","readOnly":true},"membershipSubscription":{"type":"object","nullable":true,"readOnly":true,"deprecated":true},"membershipEnrollment":{"type":"object","nullable":true,"readOnly":true},"kids":{"type":"object","nullable":true,"readOnly":true},"_links":{"type":"object"}},"required":["id","user","type","description","memberSince","kids","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]},"PaginationDto":{"type":"object","properties":{"page":{"type":"number"},"ipp":{"type":"number"},"count":{"type":"number"},"total":{"type":"number"}},"required":["page","ipp","count","total"]}}},"paths":{"/coupons":{"get":{"operationId":"CouponsController_find","parameters":[{"name":"code","required":false,"in":"query","schema":{"type":"string"}},{"name":"active","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"createdAtMin","required":false,"in":"query","schema":{"type":"string"}},{"name":"createdAtMax","required":false,"in":"query","schema":{"type":"string"}},{"name":"creatorSearch","required":false,"in":"query","description":"Searches coupons by creator name. Matches users first, then filters coupons by matching creator IDs. Returns empty if no users match.","schema":{"type":"string"}},{"name":"sortOrder","required":false,"in":"query","schema":{"enum":["asc","desc"],"type":"string"}},{"name":"page","required":true,"in":"query","schema":{"type":"number"}},{"name":"ipp","required":true,"in":"query","schema":{"type":"number"}},{"name":"expand","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"eligibleType","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"tag","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"areaId","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"userId","required":false,"in":"query","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `CouponCollection`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponCollectionDto"}}}}},"tags":["Coupons"]}}}}
```

## POST /coupons

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CouponDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","INVALID","SCHEDULED","ACTIVE","EXPIRED"],"readOnly":true},"code":{"type":"string"},"description":{"type":"string"},"discountType":{"type":"string","enum":["AMOUNT_OFF","PERCENT_OFF"]},"value":{"type":"number"},"ticketsLeft":{"type":"number"},"ticketsApplied":{"type":"number","readOnly":true},"ticketsUsed":{"type":"number","readOnly":true,"deprecated":true},"active":{"type":"boolean"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"daysOfWeek":{"type":"array","items":{"type":"number"}},"eligibleType":{"type":"string","enum":["BOOKING","EVENT_OPEN_PLAY","EVENT_TOURNAMENT","EVENT_LEAGUE_NIGHT","EVENT_KIDS_CLASS","EVENT_ADULT_CLASS"],"deprecated":true,"description":"Deprecated: Use eligibleTypes array instead"},"eligibleTypes":{"description":"Array of eligible event types. Use \"EVENT_SUBTYPE\" for category (e.g., EVENT_ADULT_CLASS matches all adult classes). Use \"EVENT_SUBTYPE:customType\" for specific type (e.g., EVENT_ADULT_CLASS:Podfit).","type":"array","items":{"type":"string"}},"eligibleUsers":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"eligibleDomains":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string","enum":["SINGLE_USE","FIRST_ONLY","LIMITED","USER_RESTRICTED","DOMAIN_RESTRICTED","TYPE_RESTRICTED"]}},"allowedAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"createdDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"creator":{"readOnly":true,"nullable":true,"description":"The user who created this promo code","allOf":[{"$ref":"#/components/schemas/UserProfileDto"}]},"_links":{"type":"object"}},"required":["id","status","code","description","discountType","value","ticketsLeft","ticketsApplied","ticketsUsed","active","startDate","endDate","daysOfWeek","eligibleType","eligibleTypes","eligibleUsers","eligibleDomains","tags","allowedAreas","errors","createdDate","creator","_links"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"ValidationErrorDto":{"type":"object","properties":{"code":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true},"details":{"type":"object","readOnly":true,"nullable":true}},"required":["code","message","details"]},"UserProfileDto":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/ItemRefDto"},"type":{"type":"string","enum":["REGULAR","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER","COACH"],"readOnly":true},"membershipArea":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"gender":{"type":"string","readOnly":true},"birthday":{"format":"date-time","type":"string","readOnly":true},"initials":{"type":"string","readOnly":true},"description":{"type":"string"},"picture":{"type":"object","readOnly":true,"nullable":true},"usattRating":{"type":"number","readOnly":true,"nullable":true},"duprProfileUrl":{"type":"string","readOnly":true,"nullable":true},"memberSince":{"format":"date-time","type":"string","readOnly":true},"membershipSubscription":{"type":"object","nullable":true,"readOnly":true,"deprecated":true},"membershipEnrollment":{"type":"object","nullable":true,"readOnly":true},"kids":{"type":"object","nullable":true,"readOnly":true},"_links":{"type":"object"}},"required":["id","user","type","description","memberSince","kids","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]},"ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","readOnly":true},"message":{"type":"object","readOnly":true},"error":{"type":"string","readOnly":true}},"required":["statusCode","message","error"]}}},"paths":{"/coupons":{"post":{"operationId":"CouponsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"responses":{"201":{"description":"Returns a `Coupon`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"409":{"description":"Returns an error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}},"422":{"description":"Returns an `ErrorDto` in case of validation errors or failures.<br/><br>Possible error codes are:<br>`C001`: (couponCode) => `The promo code ${couponCode} is not valid.`<br>`C002`: Please add the limit count<br>`C003`: A promo code can't be used multiple times and be first game only<br>`C004`: The promo code already exists<br>`C005`: The start date must be before the end date<br>`C006`: One or more eligible users are not valid"}},"tags":["Coupons"]}}}}
```

## GET /coupons/{couponId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CouponDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","INVALID","SCHEDULED","ACTIVE","EXPIRED"],"readOnly":true},"code":{"type":"string"},"description":{"type":"string"},"discountType":{"type":"string","enum":["AMOUNT_OFF","PERCENT_OFF"]},"value":{"type":"number"},"ticketsLeft":{"type":"number"},"ticketsApplied":{"type":"number","readOnly":true},"ticketsUsed":{"type":"number","readOnly":true,"deprecated":true},"active":{"type":"boolean"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"daysOfWeek":{"type":"array","items":{"type":"number"}},"eligibleType":{"type":"string","enum":["BOOKING","EVENT_OPEN_PLAY","EVENT_TOURNAMENT","EVENT_LEAGUE_NIGHT","EVENT_KIDS_CLASS","EVENT_ADULT_CLASS"],"deprecated":true,"description":"Deprecated: Use eligibleTypes array instead"},"eligibleTypes":{"description":"Array of eligible event types. Use \"EVENT_SUBTYPE\" for category (e.g., EVENT_ADULT_CLASS matches all adult classes). Use \"EVENT_SUBTYPE:customType\" for specific type (e.g., EVENT_ADULT_CLASS:Podfit).","type":"array","items":{"type":"string"}},"eligibleUsers":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"eligibleDomains":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string","enum":["SINGLE_USE","FIRST_ONLY","LIMITED","USER_RESTRICTED","DOMAIN_RESTRICTED","TYPE_RESTRICTED"]}},"allowedAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"createdDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"creator":{"readOnly":true,"nullable":true,"description":"The user who created this promo code","allOf":[{"$ref":"#/components/schemas/UserProfileDto"}]},"_links":{"type":"object"}},"required":["id","status","code","description","discountType","value","ticketsLeft","ticketsApplied","ticketsUsed","active","startDate","endDate","daysOfWeek","eligibleType","eligibleTypes","eligibleUsers","eligibleDomains","tags","allowedAreas","errors","createdDate","creator","_links"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"ValidationErrorDto":{"type":"object","properties":{"code":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true},"details":{"type":"object","readOnly":true,"nullable":true}},"required":["code","message","details"]},"UserProfileDto":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/ItemRefDto"},"type":{"type":"string","enum":["REGULAR","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER","COACH"],"readOnly":true},"membershipArea":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"gender":{"type":"string","readOnly":true},"birthday":{"format":"date-time","type":"string","readOnly":true},"initials":{"type":"string","readOnly":true},"description":{"type":"string"},"picture":{"type":"object","readOnly":true,"nullable":true},"usattRating":{"type":"number","readOnly":true,"nullable":true},"duprProfileUrl":{"type":"string","readOnly":true,"nullable":true},"memberSince":{"format":"date-time","type":"string","readOnly":true},"membershipSubscription":{"type":"object","nullable":true,"readOnly":true,"deprecated":true},"membershipEnrollment":{"type":"object","nullable":true,"readOnly":true},"kids":{"type":"object","nullable":true,"readOnly":true},"_links":{"type":"object"}},"required":["id","user","type","description","memberSince","kids","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]}}},"paths":{"/coupons/{couponId}":{"get":{"operationId":"CouponsController_findOne","parameters":[{"name":"expand","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"couponId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `Coupon`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}}},"tags":["Coupons"]}}}}
```

## DELETE /coupons/{couponId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CouponDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","INVALID","SCHEDULED","ACTIVE","EXPIRED"],"readOnly":true},"code":{"type":"string"},"description":{"type":"string"},"discountType":{"type":"string","enum":["AMOUNT_OFF","PERCENT_OFF"]},"value":{"type":"number"},"ticketsLeft":{"type":"number"},"ticketsApplied":{"type":"number","readOnly":true},"ticketsUsed":{"type":"number","readOnly":true,"deprecated":true},"active":{"type":"boolean"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"daysOfWeek":{"type":"array","items":{"type":"number"}},"eligibleType":{"type":"string","enum":["BOOKING","EVENT_OPEN_PLAY","EVENT_TOURNAMENT","EVENT_LEAGUE_NIGHT","EVENT_KIDS_CLASS","EVENT_ADULT_CLASS"],"deprecated":true,"description":"Deprecated: Use eligibleTypes array instead"},"eligibleTypes":{"description":"Array of eligible event types. Use \"EVENT_SUBTYPE\" for category (e.g., EVENT_ADULT_CLASS matches all adult classes). Use \"EVENT_SUBTYPE:customType\" for specific type (e.g., EVENT_ADULT_CLASS:Podfit).","type":"array","items":{"type":"string"}},"eligibleUsers":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"eligibleDomains":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string","enum":["SINGLE_USE","FIRST_ONLY","LIMITED","USER_RESTRICTED","DOMAIN_RESTRICTED","TYPE_RESTRICTED"]}},"allowedAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"createdDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"creator":{"readOnly":true,"nullable":true,"description":"The user who created this promo code","allOf":[{"$ref":"#/components/schemas/UserProfileDto"}]},"_links":{"type":"object"}},"required":["id","status","code","description","discountType","value","ticketsLeft","ticketsApplied","ticketsUsed","active","startDate","endDate","daysOfWeek","eligibleType","eligibleTypes","eligibleUsers","eligibleDomains","tags","allowedAreas","errors","createdDate","creator","_links"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"ValidationErrorDto":{"type":"object","properties":{"code":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true},"details":{"type":"object","readOnly":true,"nullable":true}},"required":["code","message","details"]},"UserProfileDto":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/ItemRefDto"},"type":{"type":"string","enum":["REGULAR","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER","COACH"],"readOnly":true},"membershipArea":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"gender":{"type":"string","readOnly":true},"birthday":{"format":"date-time","type":"string","readOnly":true},"initials":{"type":"string","readOnly":true},"description":{"type":"string"},"picture":{"type":"object","readOnly":true,"nullable":true},"usattRating":{"type":"number","readOnly":true,"nullable":true},"duprProfileUrl":{"type":"string","readOnly":true,"nullable":true},"memberSince":{"format":"date-time","type":"string","readOnly":true},"membershipSubscription":{"type":"object","nullable":true,"readOnly":true,"deprecated":true},"membershipEnrollment":{"type":"object","nullable":true,"readOnly":true},"kids":{"type":"object","nullable":true,"readOnly":true},"_links":{"type":"object"}},"required":["id","user","type","description","memberSince","kids","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]}}},"paths":{"/coupons/{couponId}":{"delete":{"operationId":"CouponsController_deleteCoupon","parameters":[{"name":"couponId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletes a `Coupon`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}}},"tags":["Coupons"]}}}}
```

## PATCH /coupons/{couponId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CouponDto":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","INVALID","SCHEDULED","ACTIVE","EXPIRED"],"readOnly":true},"code":{"type":"string"},"description":{"type":"string"},"discountType":{"type":"string","enum":["AMOUNT_OFF","PERCENT_OFF"]},"value":{"type":"number"},"ticketsLeft":{"type":"number"},"ticketsApplied":{"type":"number","readOnly":true},"ticketsUsed":{"type":"number","readOnly":true,"deprecated":true},"active":{"type":"boolean"},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"daysOfWeek":{"type":"array","items":{"type":"number"}},"eligibleType":{"type":"string","enum":["BOOKING","EVENT_OPEN_PLAY","EVENT_TOURNAMENT","EVENT_LEAGUE_NIGHT","EVENT_KIDS_CLASS","EVENT_ADULT_CLASS"],"deprecated":true,"description":"Deprecated: Use eligibleTypes array instead"},"eligibleTypes":{"description":"Array of eligible event types. Use \"EVENT_SUBTYPE\" for category (e.g., EVENT_ADULT_CLASS matches all adult classes). Use \"EVENT_SUBTYPE:customType\" for specific type (e.g., EVENT_ADULT_CLASS:Podfit).","type":"array","items":{"type":"string"}},"eligibleUsers":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"eligibleDomains":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string","enum":["SINGLE_USE","FIRST_ONLY","LIMITED","USER_RESTRICTED","DOMAIN_RESTRICTED","TYPE_RESTRICTED"]}},"allowedAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"createdDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"creator":{"readOnly":true,"nullable":true,"description":"The user who created this promo code","allOf":[{"$ref":"#/components/schemas/UserProfileDto"}]},"_links":{"type":"object"}},"required":["id","status","code","description","discountType","value","ticketsLeft","ticketsApplied","ticketsUsed","active","startDate","endDate","daysOfWeek","eligibleType","eligibleTypes","eligibleUsers","eligibleDomains","tags","allowedAreas","errors","createdDate","creator","_links"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"ValidationErrorDto":{"type":"object","properties":{"code":{"type":"string","readOnly":true},"message":{"type":"string","readOnly":true},"details":{"type":"object","readOnly":true,"nullable":true}},"required":["code","message","details"]},"UserProfileDto":{"type":"object","properties":{"id":{"type":"string"},"user":{"$ref":"#/components/schemas/ItemRefDto"},"type":{"type":"string","enum":["REGULAR","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER","COACH"],"readOnly":true},"membershipArea":{"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"firstName":{"type":"string","readOnly":true},"lastName":{"type":"string","readOnly":true},"gender":{"type":"string","readOnly":true},"birthday":{"format":"date-time","type":"string","readOnly":true},"initials":{"type":"string","readOnly":true},"description":{"type":"string"},"picture":{"type":"object","readOnly":true,"nullable":true},"usattRating":{"type":"number","readOnly":true,"nullable":true},"duprProfileUrl":{"type":"string","readOnly":true,"nullable":true},"memberSince":{"format":"date-time","type":"string","readOnly":true},"membershipSubscription":{"type":"object","nullable":true,"readOnly":true,"deprecated":true},"membershipEnrollment":{"type":"object","nullable":true,"readOnly":true},"kids":{"type":"object","nullable":true,"readOnly":true},"_links":{"type":"object"}},"required":["id","user","type","description","memberSince","kids","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]},"ErrorDto":{"type":"object","properties":{"statusCode":{"type":"number","readOnly":true},"message":{"type":"object","readOnly":true},"error":{"type":"string","readOnly":true}},"required":["statusCode","message","error"]}}},"paths":{"/coupons/{couponId}":{"patch":{"operationId":"CouponsController_patchCoupon","parameters":[{"name":"couponId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"responses":{"200":{"description":"Returns a `Coupon`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponDto"}}}},"404":{"description":"Returns an error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDto"}}}}},"tags":["Coupons"]}}}}
```

## GET /coupons/{couponId}/eligible-users

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UserCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}},"_pagination":{"$ref":"#/components/schemas/PaginationDto"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_pagination","_links"]},"UserDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"email":{"type":"string","format":"email","readOnly":true},"firstName":{"type":"string"},"lastName":{"type":"string"},"description":{"type":"string"},"notes":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"phoneNumberPreview":{"type":"string","readOnly":true},"phoneNumber":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"roles":{"type":"array","readOnly":false,"items":{"type":"string","enum":["ADMIN","PODPLAY_ADMIN","OWNER","CLUB_OWNER","KIOSK","SECURITY","COACH","MANAGER","STAFF","BETA_TESTER"]}},"rolesAreas":{"$ref":"#/components/schemas/ItemRefCollectionDto"},"membershipType":{"type":"string","enum":["NONE","GLOBAL_MEMBER","ANGEL_MEMBER","BASIC_MEMBER","AREA_MEMBER"],"readOnly":true,"deprecated":true},"membershipArea":{"readOnly":true,"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipBookingHorizonDays":{"type":"number","readOnly":true,"deprecated":true},"flags":{"type":"array","items":{"type":"string","enum":["NEW","BLOCKED","VACCINATED","ANONYMOUS","HAS_REPLAYS","HAS_RESERVATIONS","HAS_NOTES","HAS_ADMIN_DASHBOARD_ACCESS","JOINED_CHAT","ACTIVE_DAY_PASS"]}},"paymentMethod":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"paymentElements":{"readOnly":true,"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefCollectionDto"}]},"freeQuickReplays":{"type":"number"},"picture":{"$ref":"#/components/schemas/ItemRefDto"},"gender":{"type":"string"},"birthday":{"format":"date-time","type":"string"},"favoriteReplays":{"type":"object","readOnly":true},"profile":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"coachProfile":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"qrCode":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipEnrollment":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipSubscription":{"nullable":true,"deprecated":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"membershipSubscriptionHistory":{"readOnly":true,"deprecated":true,"allOf":[{"$ref":"#/components/schemas/CollectionRefDto"}]},"ratings":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/CollectionRefDto"}]},"securityPicture":{"$ref":"#/components/schemas/ItemRefDto"},"chat":{"readOnly":true,"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"segmentation":{"readOnly":true,"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"_links":{"type":"object"}},"required":["id","email","description","rolesAreas","membershipType","flags","favoriteReplays","coachProfile","membershipEnrollment","membershipSubscription","membershipSubscriptionHistory","ratings","chat","segmentation","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]},"ItemRefCollectionDto":{"type":"object","properties":{"items":{"description":"The array containing the elements of the collection","type":"array","items":{"type":"string"}},"_total":{"type":"number","description":"The total amount of elements in this collection, counting also the elements from the succesive pages"},"_links":{"description":"A `LinksDto` structure containing URL references to propertes that can be expanded","allOf":[{"$ref":"#/components/schemas/LinksDto"}]}},"required":["items"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]},"CollectionRefDto":{"type":"object","properties":{"_total":{"type":"number","description":"The total amount of elements in this collection"}}},"PaginationDto":{"type":"object","properties":{"page":{"type":"number"},"ipp":{"type":"number"},"count":{"type":"number"},"total":{"type":"number"}},"required":["page","ipp","count","total"]}}},"paths":{"/coupons/{couponId}/eligible-users":{"get":{"operationId":"CouponsController_findEligibleUsers","parameters":[{"name":"couponId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `UserCollection`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCollectionDto"}}}}},"tags":["Coupons"]}}}}
```

## PATCH /coupons/{couponId}/eligible-users

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"BaseCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]}}},"paths":{"/coupons/{couponId}/eligible-users":{"patch":{"operationId":"CouponsController_updateCouponEligibleUsers","parameters":[{"name":"type","required":false,"in":"query","schema":{"enum":["preview","order"],"type":"string"}},{"name":"couponId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Coupon update with file content in memory","content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"$ref":"#/components/schemas/"}}}},"responses":{"200":{"description":"Returns a collection of `BaseCollectionDto<UserDto>`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseCollectionDto"}}}}},"tags":["Coupons"]}}}}
```

## GET /coupons/{couponId}/summary

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Coupons","description":"Coupon codes, discounts, and promotional offers."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"CouponSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"discountType":{"type":"string","enum":["AMOUNT_OFF","PERCENT_OFF"]},"value":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["id","code","discountType","value","_links"]},"LinksDto":{"type":"object","properties":{"self":{"description":"A `LinkDto` to the resource itself","allOf":[{"$ref":"#/components/schemas/LinkDto"}]}},"required":["self"]},"LinkDto":{"type":"object","properties":{"href":{"type":"string","description":"A URL"}},"required":["href"]}}},"paths":{"/coupons/{couponId}/summary":{"get":{"operationId":"CouponsController_findCouponSummary","parameters":[{"name":"couponId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `CouponSummary`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CouponSummaryDto"}}}}},"tags":["Coupons"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.podplay.app/api/promotions/coupons.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
