{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/status":{"get":{"tags":["System"],"summary":"Check status","operationId":"status_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/v1/services/":{"get":{"tags":["Services"],"summary":"List all available services","description":"Returns a catalog of all services available for purchase.","operationId":"get_service_catalog_v1_services__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"$ref":"#/components/schemas/ServiceDetail"},"type":"object","title":"Response Get Service Catalog V1 Services  Get"}}}},"404":{"description":"Not found"}}}},"/v1/services/{imei}":{"get":{"tags":["Services"],"summary":"Get device active services","description":"Returns active services for a specific IMEI. Can return JWT if requested via Accept header.","operationId":"get_device_services_v1_services__imei__get","parameters":[{"name":"imei","in":"path","required":true,"schema":{"type":"string","title":"Imei"}},{"name":"accept","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"application/json","title":"Accept"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ActiveServiceDetail"}},{"$ref":"#/components/schemas/TokenResponse"}],"title":"Response Get Device Services V1 Services  Imei  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoice/create":{"post":{"tags":["Invoices"],"summary":"Create an invoice","operationId":"create_invoice_v1_invoice_create_post","parameters":[{"name":"accept","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"application/json","title":"Accept"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invoice/confirm":{"post":{"tags":["Invoices"],"summary":"Yookassa webhook","operationId":"confirm_invoice_v1_invoice_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/YookassaWebhook"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActiveServiceDetail":{"properties":{"expire_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expire At","examples":["2027-01-15T10:22:10.491482+00:00"]}},"type":"object","required":["expire_at"],"title":"ActiveServiceDetail"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InvoiceCreateRequest":{"properties":{"imei":{"type":"string","maxLength":15,"minLength":15,"title":"Imei","description":"Device IMEI"},"service_code":{"type":"string","title":"Service Code","description":"Service code ('gpt_basic', ...)"},"duration_months":{"type":"integer","enum":[1,3,6],"title":"Duration Months","description":"Subscription period (1, 3 or 6 months for now)"}},"type":"object","required":["imei","service_code","duration_months"],"title":"InvoiceCreateRequest"},"InvoiceCreateResponse":{"properties":{"payment_url":{"type":"string","title":"Payment Url","description":"Link for payment"}},"type":"object","required":["payment_url"],"title":"InvoiceCreateResponse"},"ServiceDetail":{"properties":{"name":{"type":"string","title":"Name"},"prices_by_months":{"additionalProperties":{"type":"integer"},"type":"object","title":"Prices By Months"}},"type":"object","required":["name","prices_by_months"],"title":"ServiceDetail"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse"},"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"},"WebhookObject":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["id","status"],"title":"WebhookObject"},"YookassaWebhook":{"properties":{"event":{"type":"string","title":"Event"},"object":{"$ref":"#/components/schemas/WebhookObject"}},"type":"object","required":["event","object"],"title":"YookassaWebhook"}}}}