{"openapi":"3.0.2","info":{"title":"TicketZone API","version":"0.1.0"},"paths":{"/v1/auth/":{"post":{"summary":"Get Auth Token","operationId":"get_auth_token_v1_auth__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginCredentialsSerializer"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/refresh/":{"post":{"summary":"Refresh Auth Token","operationId":"refresh_auth_token_v1_auth_refresh__post","parameters":[{"required":true,"schema":{"title":"Refresh-Token","type":"string"},"name":"refresh-token","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/":{"get":{"summary":"List Events","operationId":"list_events_v1_events__get","parameters":[{"required":false,"schema":{"title":"Page","minimum":1.0,"type":"integer","default":1},"name":"page","in":"query"},{"required":false,"schema":{"title":"Per Page","type":"integer","default":100},"name":"per_page","in":"query"},{"required":true,"schema":{"title":"Access-Token","type":"string"},"name":"access-token","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_EventSerializer_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/{event_id}/":{"get":{"summary":"Read Event","operationId":"read_event_v1_events__event_id___get","parameters":[{"required":true,"schema":{"title":"Event Id","type":"string"},"name":"event_id","in":"path"},{"required":true,"schema":{"title":"Access-Token","type":"string"},"name":"access-token","in":"header"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/":{"post":{"summary":"Create Payment From Intent","operationId":"create_payment_from_intent_v1_payments__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCreateSerializer"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/intent/{intent_id}/":{"get":{"summary":"Read Intent","operationId":"read_intent_v1_payments_intent__intent_id___get","parameters":[{"required":true,"schema":{"title":"Intent Id","type":"string"},"name":"intent_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/payments/intent/":{"post":{"summary":"Create Payment Intent","operationId":"create_payment_intent_v1_payments_intent__post","parameters":[{"required":true,"schema":{"title":"Access-Token","type":"string"},"name":"access-token","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentCreateSerializer"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntentSerializer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CategorySerializer":{"title":"CategorySerializer","required":["id","created_at","name"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"name":{"title":"Name","type":"string"}}},"EventSerializer":{"title":"EventSerializer","required":["id","created_at","name","event_number","poster","event_date","time","event_end_date","end_time","event_location","description","partner_id","category_id","event_state","tickets_sold","redemption_rate","sales","category"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"name":{"title":"Name","type":"string"},"event_number":{"title":"Event Number","type":"string"},"poster":{"title":"Poster","type":"string"},"event_date":{"title":"Event Date","type":"string","format":"date"},"time":{"title":"Time","type":"string","format":"time"},"event_end_date":{"title":"Event End Date","type":"string","format":"date"},"end_time":{"title":"End Time","type":"string","format":"time"},"event_location":{"title":"Event Location","type":"string"},"description":{"title":"Description","type":"string"},"partner_id":{"title":"Partner Id","type":"string","format":"uuid"},"category_id":{"title":"Category Id","type":"string","format":"uuid"},"event_state":{"title":"Event State","type":"string"},"tickets_sold":{"title":"Tickets Sold","type":"integer"},"redemption_rate":{"title":"Redemption Rate","type":"number"},"sales":{"title":"Sales","type":"number"},"assigned_ticketing_agents":{"title":"Assigned Ticketing Agents","type":"array","items":{"$ref":"#/components/schemas/partner_api__events__serializers__PersonSerializer"}},"ticket_types":{"title":"Ticket Types","type":"array","items":{"$ref":"#/components/schemas/partner_api__events__serializers__TicketTypeSerializer"}},"category":{"$ref":"#/components/schemas/CategorySerializer"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"LoginCredentialsSerializer":{"title":"LoginCredentialsSerializer","required":["partner_key","now","signature"],"type":"object","properties":{"partner_key":{"title":"Partner Key","type":"string"},"now":{"title":"Now","type":"string"},"signature":{"title":"Signature","type":"string"}}},"LoginResponseSerializer":{"title":"LoginResponseSerializer","required":["access_token","refresh_token"],"type":"object","properties":{"access_token":{"title":"Access Token","type":"string"},"refresh_token":{"title":"Refresh Token","type":"string"}}},"Page_EventSerializer_":{"title":"Page[EventSerializer]","required":["items","total","current_page","next_page","total_pages"],"type":"object","properties":{"items":{"title":"Items","type":"array","items":{"$ref":"#/components/schemas/EventSerializer"}},"total":{"title":"Total","minimum":0.0,"type":"integer"},"current_page":{"title":"Current Page","type":"integer"},"next_page":{"title":"Next Page","type":"integer"},"total_pages":{"title":"Total Pages","type":"integer"}}},"PaymentCreateSerializer":{"title":"PaymentCreateSerializer","required":["intent_id","made_through"],"type":"object","properties":{"intent_id":{"title":"Intent Id","type":"string","format":"uuid"},"made_through":{"$ref":"#/components/schemas/PaymentProviders"},"person":{"$ref":"#/components/schemas/partner_api__payments__serializers__PersonSerializer"}}},"PaymentIntentCreateSerializer":{"title":"PaymentIntentCreateSerializer","required":["person","ticket_types","callback_url"],"type":"object","properties":{"person":{"$ref":"#/components/schemas/partner_api__payments__serializers__PersonSerializer"},"ticket_types":{"title":"Ticket Types","type":"array","items":{"$ref":"#/components/schemas/partner_api__payments__serializers__TicketTypeSerializer"}},"callback_url":{"title":"Callback Url","maxLength":65536,"minLength":1,"type":"string","format":"uri"}}},"PaymentIntentSerializer":{"title":"PaymentIntentSerializer","required":["id","created_at","amount","person","ticket_types","redirect_to","event_id"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"amount":{"title":"Amount","type":"number"},"person":{"$ref":"#/components/schemas/PersonInDBSerializer"},"ticket_types":{"title":"Ticket Types","type":"array","items":{"$ref":"#/components/schemas/TicketTypeInnerSerializer"}},"redirect_to":{"title":"Redirect To","maxLength":65536,"minLength":1,"type":"string","format":"uri"},"event_poster":{"title":"Event Poster","type":"string"},"event_id":{"title":"Event Id","type":"string"}}},"PaymentProviders":{"title":"PaymentProviders","enum":["MPESA","BANK"],"description":"An enumeration."},"PaymentSerializer":{"title":"PaymentSerializer","required":["id","created_at","amount","person_id","made_through","person"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"amount":{"title":"Amount","type":"number"},"person_id":{"title":"Person Id","type":"string"},"made_through":{"title":"Made Through","type":"string"},"person":{"$ref":"#/components/schemas/PersonInDBSerializer"}}},"PersonInDBSerializer":{"title":"PersonInDBSerializer","required":["id","created_at","name","email","phone_number"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"name":{"title":"Name","type":"string"},"email":{"title":"Email","type":"string"},"phone_number":{"title":"Phone Number","type":"string"}}},"TicketTypeInnerSerializer":{"title":"TicketTypeInnerSerializer","required":["id","created_at","name","price","amount"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"name":{"title":"Name","type":"string"},"price":{"title":"Price","type":"number"},"amount":{"title":"Amount","type":"integer"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}},"partner_api__events__serializers__PersonSerializer":{"title":"PersonSerializer","required":["id","created_at","name","email","phone_number","person_type"],"type":"object","properties":{"id":{"title":"Id","type":"string","format":"uuid"},"created_at":{"title":"Created At","type":"string","format":"date-time"},"updated_at":{"title":"Updated At","type":"string","format":"date"},"name":{"title":"Name","type":"string"},"email":{"title":"Email","type":"string"},"phone_number":{"title":"Phone Number","type":"string"},"person_type":{"title":"Person Type","type":"string"}}},"partner_api__events__serializers__TicketTypeSerializer":{"title":"TicketTypeSerializer","required":["name","price","active","amsg","amount","is_visible","use_limit"],"type":"object","properties":{"name":{"title":"Name","type":"string"},"price":{"title":"Price","type":"number"},"active":{"title":"Active","type":"boolean"},"amsg":{"title":"Amsg","type":"string"},"amount":{"title":"Amount","type":"integer"},"is_visible":{"title":"Is Visible","type":"boolean"},"use_limit":{"title":"Use Limit","type":"integer"}}},"partner_api__payments__serializers__PersonSerializer":{"title":"PersonSerializer","required":["name","email","phone_number"],"type":"object","properties":{"name":{"title":"Name","type":"string"},"email":{"title":"Email","type":"string"},"phone_number":{"title":"Phone Number","type":"string"}}},"partner_api__payments__serializers__TicketTypeSerializer":{"title":"TicketTypeSerializer","required":["id","amount"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"amount":{"title":"Amount","type":"integer"}}}}}}