{"openapi":"3.1.0","info":{"title":"cultcha.app API","version":"1.0.0","description":"REST API for the cultcha.app POS & lifestyle platform. All data is scoped to the organisation the API key belongs to. Authenticate every request with a key created under Settings → API Keys, sent as `Authorization: Bearer <key>`. A key works on every endpoint, including ones not yet listed here."},"servers":[{"url":"https://localhost:8080"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Products","description":"Shop items, classes, courses, memberships, packages (one collection, `type` discriminates)."},{"name":"Customers","description":"Guests / members."},{"name":"Transactions","description":"Completed sales and refunds — the source for sales reporting."},{"name":"Check-ins","description":"Member / attendee check-ins — attendance reporting."},{"name":"Sessions","description":"Scheduled class/course sessions (one document per session)."},{"name":"Memberships","description":"Recurring memberships."},{"name":"Bookings","description":"Group / package bookings."},{"name":"Adjustments","description":"Discounts & surcharges (price modifiers)."},{"name":"Gift Cards","description":"Issued gift cards."},{"name":"Passes","description":"Prepaid / general-entry passes."},{"name":"Reports","description":"Pre-aggregated reports — the easiest path for dashboards/exports."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A personal access token (`cultcha_pat_…`, made on Developers) or an OAuth access token (`cultcha_at_…`). Either acts as the person it belongs to, with their role; read-scoped tokens can only GET."},"oauth2":{"type":"oauth2","description":"Authorization code with PKCE (S256). Clients can register themselves at the registration endpoint (RFC 7591).","flows":{"authorizationCode":{"authorizationUrl":"https://localhost:8080/oauth/authorize","tokenUrl":"https://localhost:8080/api/oauth/token","refreshUrl":"https://localhost:8080/api/oauth/token","scopes":{"read":"Read data the person can see","write":"Also create and change what the person can"}}}}},"responses":{"Unauthorized":{"description":"Missing or invalid token, or the token’s owner can’t reach this route.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}},"schemas":{"Product":{"type":"object","properties":{"_id":{"type":"string","description":"Mongo ObjectId (24-hex)"},"name":{"type":"string"},"type":{"type":"string","enum":["shop","class","course","membership","prepaid","package","general","gift_card"]},"publish":{"type":"boolean"},"archived":{"type":"boolean"},"thumbnail":{"type":"string"},"variations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"number","description":"Dollars (not cents)"},"barcode":{"type":"string"}}}},"tags":{"type":"array","items":{"type":"string","description":"Mongo ObjectId (24-hex)"}}}},"Customer":{"type":"object","properties":{"_id":{"type":"string","description":"Mongo ObjectId (24-hex)"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"memberId":{"type":"integer"},"dob":{"type":"string","format":"date"}}},"Transaction":{"type":"object","properties":{"_id":{"type":"string","description":"Mongo ObjectId (24-hex)"},"total":{"type":"number","description":"Dollars (not cents)"},"subtotal":{"type":"number","description":"Dollars (not cents)"},"tax":{"type":"number","description":"Dollars (not cents)"},"status":{"type":"string","enum":["completed","refunded","partially_refunded","voided"]},"paymentMethod":{"type":"string","enum":["cash","card","invoice","zero","credit"]},"createdAt":{"type":"string","format":"date-time"},"cart":{"type":"array","items":{"type":"object"}}}}}},"paths":{"/api/products":{"get":{"tags":["Products"],"summary":"List products","parameters":[{"name":"type","in":"query","schema":{"type":"string"},"description":"shop | class | course | membership | prepaid | package | general | gift_card"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Match on name / tag / category"},{"name":"published","in":"query","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Products"],"summary":"Create a product","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/products/{id}":{"get":{"tags":["Products"],"summary":"Get a product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"Not found"}}},"put":{"tags":["Products"],"summary":"Update a product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"responses":{"200":{"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"delete":{"tags":["Products"],"summary":"Soft-delete a product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/customers":{"get":{"tags":["Customers"],"summary":"List customers (paginated)","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Paginated","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"total":{"type":"integer"},"totalPages":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Customers"],"summary":"Create a customer","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/transactions":{"get":{"tags":["Transactions"],"summary":"List transactions","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"paymentMethod","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"Transactions","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Transactions"],"summary":"Record a transaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/transactions/{id}":{"get":{"tags":["Transactions"],"summary":"Get a transaction","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Transaction","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"put":{"tags":["Transactions"],"summary":"Update a transaction (e.g. record a refund)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/checkins":{"get":{"tags":["Check-ins"],"summary":"List check-ins","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"method","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/schedules":{"get":{"tags":["Sessions"],"summary":"List class/course sessions","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"product","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Sessions"],"summary":"Create a session","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/schedules/{id}":{"get":{"tags":["Sessions"],"summary":"Get a session (with attendees)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/memberships":{"get":{"tags":["Memberships"],"summary":"List memberships","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/group-bookings":{"get":{"tags":["Bookings"],"summary":"List group/package bookings","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Bookings"],"summary":"Create a group booking","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/group-bookings/{id}":{"get":{"tags":["Bookings"],"summary":"Get a booking","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"put":{"tags":["Bookings"],"summary":"Update a booking","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"delete":{"tags":["Bookings"],"summary":"Cancel a booking","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Cancelled"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/adjustments":{"get":{"tags":["Adjustments"],"summary":"List discounts & surcharges","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"active","in":"query","schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"tags":["Adjustments"],"summary":"Create an adjustment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/adjustments/{id}":{"get":{"tags":["Adjustments"],"summary":"Get an adjustment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"put":{"tags":["Adjustments"],"summary":"Update an adjustment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"delete":{"tags":["Adjustments"],"summary":"Delete an adjustment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Deleted"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/gift-cards":{"get":{"tags":["Gift Cards"],"summary":"List gift cards","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"kind","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/gift-cards/{id}":{"get":{"tags":["Gift Cards"],"summary":"Get a gift card","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"put":{"tags":["Gift Cards"],"summary":"Update a gift card","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Mongo ObjectId (24-hex)"}}],"responses":{"200":{"description":"Updated"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/passes":{"get":{"tags":["Passes"],"summary":"List prepaid / general-entry passes","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","default":1}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/payments":{"get":{"tags":["Reports"],"summary":"Payments report (by method / section)","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/product-sales":{"get":{"tags":["Reports"],"summary":"Product sales report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/class-attendance":{"get":{"tags":["Reports"],"summary":"Class/course attendance report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/transaction-history":{"get":{"tags":["Reports"],"summary":"Transaction history — line-item ledger with accounting codes","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/accounting-by-department":{"get":{"tags":["Reports"],"summary":"Accounting summary — qty, revenue inc GST, GST and revenue ex GST per accounting code or tag","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/accounting-by-payment-method":{"get":{"tags":["Reports"],"summary":"Accounting by payment method — revenue, fees, tax and profit per tender","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/bookings":{"get":{"tags":["Reports"],"summary":"Bookings report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/members":{"get":{"tags":["Reports"],"summary":"Members report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/discounts":{"get":{"tags":["Reports"],"summary":"Discounts report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/segmentation":{"get":{"tags":["Reports"],"summary":"Customer segmentation report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/reports/promo-links":{"get":{"tags":["Reports"],"summary":"Promo-link performance report","parameters":[{"name":"startDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive start (YYYY-MM-DD)"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date"},"description":"Inclusive end (YYYY-MM-DD)"},{"name":"location","in":"query","schema":{"type":"string","description":"Mongo ObjectId (24-hex)"},"description":"Filter by location"},{"name":"tags","in":"query","schema":{"type":"string"},"description":"Comma-separated tag ids"},{"name":"tagCategories","in":"query","schema":{"type":"string"},"description":"Comma-separated tag-category ids"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}