> 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/memberships/packages.md).

# Packages

Recurring passes for event signups, court bookings, guest passes.

## GET /packages/{packageId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageDto":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","EXPIRED","CANCELED"],"readOnly":true},"createdDate":{"format":"date-time","type":"string","readOnly":true},"expirationDate":{"format":"date-time","type":"string"},"items":{"$ref":"#/components/schemas/PackageItemCollectionDto"},"redemptions":{"$ref":"#/components/schemas/PackageItemRedemptionCollectionDto"},"template":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","status","createdDate","expirationDate","items","redemptions","template","order","_links"]},"PackageItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"},"remainingItems":{"type":"number","readOnly":true}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints","remainingItems"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]},"PackageItemRedemptionCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageItemRedemptionDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageItemRedemptionDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"redemptionDate":{"format":"date-time","type":"string","readOnly":true},"item":{"type":"number","enum":[],"readOnly":true},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"orderItem":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"cancelationDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"_links":{"type":"object"}},"required":["id","redemptionDate","item","user","order","orderItem","cancelationDate","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]}}},"paths":{"/packages/{packageId}":{"get":{"operationId":"PackagesController_find","parameters":[{"name":"packageId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `Package`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDto"}}}}},"tags":["Packages"]}}}}
```

## PATCH /packages/{packageId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PatchablePackageDto":{"type":"object","properties":{"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"expirationDate":{"format":"date-time","type":"string"},"items":{"$ref":"#/components/schemas/PackageItemCollectionDto"}},"required":["displayName","displayNamePlural","expirationDate","items"]},"PackageItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"},"remainingItems":{"type":"number","readOnly":true}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints","remainingItems"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]},"PackageDto":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","EXPIRED","CANCELED"],"readOnly":true},"createdDate":{"format":"date-time","type":"string","readOnly":true},"expirationDate":{"format":"date-time","type":"string"},"items":{"$ref":"#/components/schemas/PackageItemCollectionDto"},"redemptions":{"$ref":"#/components/schemas/PackageItemRedemptionCollectionDto"},"template":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","status","createdDate","expirationDate","items","redemptions","template","order","_links"]},"PackageItemRedemptionCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageItemRedemptionDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageItemRedemptionDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"redemptionDate":{"format":"date-time","type":"string","readOnly":true},"item":{"type":"number","enum":[],"readOnly":true},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"orderItem":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"cancelationDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"_links":{"type":"object"}},"required":["id","redemptionDate","item","user","order","orderItem","cancelationDate","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]}}},"paths":{"/packages/{packageId}":{"patch":{"operationId":"PackagesController_updatePackage","parameters":[{"name":"packageId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchablePackageDto"}}}},"responses":{"200":{"description":"Updates a `Package`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDto"}}}}},"tags":["Packages"]}}}}
```

## PATCH /packages/{packageId}/items/{itemId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PatchablePackageItemDto":{"type":"object","properties":{"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"}},"required":["displayName","displayNamePlural","totalItems"]},"PackageItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"},"remainingItems":{"type":"number","readOnly":true}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints","remainingItems"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]}}},"paths":{"/packages/{packageId}/items/{itemId}":{"patch":{"operationId":"PackagesController_updatePackageItem","parameters":[{"name":"packageId","required":true,"in":"path","schema":{"type":"string"}},{"name":"itemId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchablePackageItemDto"}}}},"responses":{"200":{"description":"Updates a `PackageItem`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageItemDto"}}}}},"tags":["Packages"]}}}}
```

## GET /package-templates

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageTemplateCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageTemplateDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageTemplateDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"createdDate":{"format":"date-time","type":"string","readOnly":true},"durationDays":{"type":"number"},"items":{"$ref":"#/components/schemas/PackageTemplateItemCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","createdDate","items","errors","_links"]},"PackageTemplateItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageTemplateItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageTemplateItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]}}},"paths":{"/package-templates":{"get":{"operationId":"PackageTemplatesController_findAll","parameters":[],"responses":{"200":{"description":"Returns a `PackageTemplateCollection`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplateCollectionDto"}}}}},"tags":["Packages"]}}}}
```

## POST /package-templates

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageTemplateDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"createdDate":{"format":"date-time","type":"string","readOnly":true},"durationDays":{"type":"number"},"items":{"$ref":"#/components/schemas/PackageTemplateItemCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","createdDate","items","errors","_links"]},"PackageTemplateItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageTemplateItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageTemplateItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]}}},"paths":{"/package-templates":{"post":{"operationId":"PackageTemplatesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplateDto"}}}},"responses":{"201":{"description":"Creates a `PackageTemplate`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplateDto"}}}},"422":{"description":"Returns an `ErrorDto` in case of validation errors or failures.<br/><br>Possible error codes are:<br>`PT001`: Display Name must be set.<br>`PT002`: Display Name Plural must be set.<br>`PT003`: Duration in days must be set and be a positive number.<br>`PT004`: Package must have at least one item.<br>`PT005`: Package items must have unique IDs."}},"tags":["Packages"]}}}}
```

## GET /package-templates/{packageTemplateId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageTemplateDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"createdDate":{"format":"date-time","type":"string","readOnly":true},"durationDays":{"type":"number"},"items":{"$ref":"#/components/schemas/PackageTemplateItemCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","createdDate","items","errors","_links"]},"PackageTemplateItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageTemplateItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageTemplateItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]}}},"paths":{"/package-templates/{packageTemplateId}":{"get":{"operationId":"PackageTemplatesController_find","parameters":[{"name":"packageTemplateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `PackageTemplate`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplateDto"}}}}},"tags":["Packages"]}}}}
```

## DELETE /package-templates/{packageTemplateId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageTemplateDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"createdDate":{"format":"date-time","type":"string","readOnly":true},"durationDays":{"type":"number"},"items":{"$ref":"#/components/schemas/PackageTemplateItemCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","createdDate","items","errors","_links"]},"PackageTemplateItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageTemplateItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageTemplateItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]}}},"paths":{"/package-templates/{packageTemplateId}":{"delete":{"operationId":"PackageTemplatesController_delete","parameters":[{"name":"packageTemplateId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updates a `PackageTemplate`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplateDto"}}}}},"tags":["Packages"]}}}}
```

## PATCH /package-templates/{packageTemplateId}

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageTemplatePatchableDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"durationDays":{"type":"number"},"items":{"$ref":"#/components/schemas/PackageTemplateItemCollectionDto"}},"required":["id","displayName","displayNamePlural","items"]},"PackageTemplateItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageTemplateItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageTemplateItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]},"PackageTemplateDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"createdDate":{"format":"date-time","type":"string","readOnly":true},"durationDays":{"type":"number"},"items":{"$ref":"#/components/schemas/PackageTemplateItemCollectionDto"},"errors":{"readOnly":true,"nullable":true,"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorDto"}},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","createdDate","items","errors","_links"]},"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"]}}},"paths":{"/package-templates/{packageTemplateId}":{"patch":{"operationId":"PackageTemplatesController_patch","parameters":[{"name":"packageTemplateId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplatePatchableDto"}}}},"responses":{"201":{"description":"Updates a `PackageTemplate`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageTemplateDto"}}}},"422":{"description":"Returns an `ErrorDto` in case of validation errors or failures.<br/><br>Possible error codes are:<br>`PT001`: Display Name must be set.<br>`PT002`: Display Name Plural must be set.<br>`PT003`: Duration in days must be set and be a positive number.<br>`PT004`: Package must have at least one item.<br>`PT005`: Package items must have unique IDs."}},"tags":["Packages"]}}}}
```

## GET /users/{userId}/packages

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageDto":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","EXPIRED","CANCELED"],"readOnly":true},"createdDate":{"format":"date-time","type":"string","readOnly":true},"expirationDate":{"format":"date-time","type":"string"},"items":{"$ref":"#/components/schemas/PackageItemCollectionDto"},"redemptions":{"$ref":"#/components/schemas/PackageItemRedemptionCollectionDto"},"template":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"_links":{"type":"object"}},"required":["id","displayName","displayNamePlural","status","createdDate","expirationDate","items","redemptions","template","order","_links"]},"PackageItemCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageItemDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageItemDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["BOOKING","EVENT_SIGNUP","GUEST_SIGNUP","SERIES_SIGNUP","REPLAY"]},"displayName":{"type":"string"},"displayNamePlural":{"type":"string"},"totalItems":{"type":"number"},"constraints":{"$ref":"#/components/schemas/PackageItemConstraintsDto"},"remainingItems":{"type":"number","readOnly":true}},"required":["id","type","displayName","displayNamePlural","totalItems","constraints","remainingItems"]},"PackageItemConstraintsDto":{"type":"object","properties":{"bookingEventSubtype":{"nullable":true,"type":"array","items":{"type":"OPERATIONS"}},"bookingEventCustomType":{"type":"string","nullable":true},"bookingEventCustomTypesMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAll":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingEventTagsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"allowKids":{"type":"boolean","nullable":true},"bookingSessionPeriodTypeMatchAny":{"description":"Session period types like PEAK, REDUCED, OFF PEAK, etc.","nullable":true,"type":"array","items":{"type":"PEAK"}},"bookingAreaSlugMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}},"bookingPodIdsMatchAny":{"nullable":true,"type":"array","items":{"type":"string"}}},"required":["bookingEventSubtype","bookingEventCustomType","bookingEventCustomTypesMatchAny","bookingEventTagsMatchAll","bookingEventTagsMatchAny","allowKids","bookingSessionPeriodTypeMatchAny","bookingAreaSlugMatchAny","bookingPodIdsMatchAny"]},"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"]},"PackageItemRedemptionCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageItemRedemptionDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageItemRedemptionDto":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"redemptionDate":{"format":"date-time","type":"string","readOnly":true},"item":{"type":"number","enum":[],"readOnly":true},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"orderItem":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"cancelationDate":{"format":"date-time","type":"string","readOnly":true,"nullable":true},"_links":{"type":"object"}},"required":["id","redemptionDate","item","user","order","orderItem","cancelationDate","_links"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]}}},"paths":{"/users/{userId}/packages":{"get":{"operationId":"UsersPackagesController_find","parameters":[{"name":"expand","required":false,"in":"query","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `PackageCollection`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageDto"}}}}},"tags":["Packages"]}}}}
```

## GET /users/{userId}/packages/history

>

```json
{"openapi":"3.0.0","info":{"title":"PodPlay Inc API","version":"2.0"},"tags":[{"name":"Packages","description":"Recurring passes for event signups, court bookings, guest passes."}],"servers":[{"url":"/apis/v2","description":"Current Server"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"PackageHistoryCollectionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PackageHistoryDto"}},"_total":{"type":"number"},"_links":{"$ref":"#/components/schemas/LinksDto"}},"required":["items","_total","_links"]},"PackageHistoryDto":{"type":"object","properties":{"type":{"type":"string","enum":["GRANT","USAGE","RETURN"]},"date":{"format":"date-time","type":"string"},"amount":{"type":"number"},"description":{"type":"string"},"package":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"order":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"orderItem":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ItemRefDto"}]},"packageType":{"type":"string","nullable":true},"expirationDate":{"format":"date-time","type":"string","nullable":true}},"required":["type","date","amount","description","package","order","orderItem","packageType","expirationDate"]},"ItemRefDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the resource"}},"required":["id"]},"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":{"/users/{userId}/packages/history":{"get":{"operationId":"UsersPackagesController_history","parameters":[{"name":"from","required":false,"in":"query","description":"Start date for history (defaults to 6 months ago)","schema":{"format":"date-time","type":"string"}},{"name":"to","required":false,"in":"query","description":"End date for history (defaults to now)","schema":{"format":"date-time","type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Returns a `PackageHistoryCollection`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageHistoryCollectionDto"}}}}},"tags":["Packages"]}}}}
```


---

# 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/memberships/packages.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.
