{"openapi":"3.1.0","info":{"title":"GET /api/v1/revenue-schedules/waterfall","version":"1.0.0","description":"Deferred-revenue waterfall"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/revenue-schedules/waterfall":{"get":{"tags":["revenue-schedules"],"summary":"Deferred-revenue waterfall","description":"Remaining deferred revenue scheduled to release, by month.","operationId":"revenue_waterfall_api_v1_revenue_schedules_waterfall_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RevenueSourceEnum"},{"type":"null"}],"description":"Filter by source","title":"Source"},"description":"Filter by source"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_WaterfallResponse_"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RevenueSourceEnum":{"type":"string","enum":["asc606","shopify_subscription","preorder","stripe_subscription","recharge","manual"],"title":"RevenueSourceEnum","description":"Originating system for a deferred-revenue schedule row."},"SuccessEnvelope_WaterfallResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/WaterfallResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[WaterfallResponse]"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WaterfallBucket":{"properties":{"period":{"type":"string","title":"Period","description":"YYYY-MM"},"amount_cents":{"type":"integer","title":"Amount Cents"}},"type":"object","required":["period","amount_cents"],"title":"WaterfallBucket","description":"One month of remaining deferred revenue scheduled to release."},"WaterfallResponse":{"properties":{"buckets":{"items":{"$ref":"#/components/schemas/WaterfallBucket"},"type":"array","title":"Buckets"},"total_deferred_cents":{"type":"integer","title":"Total Deferred Cents"}},"type":"object","required":["buckets","total_deferred_cents"],"title":"WaterfallResponse","description":"Deferred-revenue release waterfall (unrecognized balance by month)."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}