{"openapi":"3.1.0","info":{"title":"FOSSBilling Bridge","version":"1.0.0"},"paths":{"/password-login":{"post":{"summary":"Password Login","operationId":"password_login_password_login_post","parameters":[{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordLoginRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/change-password":{"post":{"summary":"Change Password","operationId":"change_password_change_password_post","parameters":[{"name":"x-client-token","in":"header","required":true,"schema":{"type":"string","title":"X-Client-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/change-email":{"post":{"summary":"Change Email","operationId":"change_email_change_email_post","parameters":[{"name":"x-client-token","in":"header","required":true,"schema":{"type":"string","title":"X-Client-Token"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/register":{"post":{"summary":"Register","operationId":"register_register_post","parameters":[{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"User already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/send-code":{"post":{"summary":"Send Code","operationId":"send_code_send_code_post","parameters":[{"name":"x-client-language","in":"header","required":false,"schema":{"type":"string","default":"en","title":"X-Client-Language"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCodeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"501":{"description":"Email send failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/verify-code":{"get":{"summary":"Verify Code","operationId":"verify_code_verify_code_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","format":"email","title":"Email"}},{"name":"code","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Code"}},{"name":"purpose","in":"query","required":true,"schema":{"$ref":"#/components/schemas/SendCodePurpose"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/email-login":{"post":{"summary":"Email Login","operationId":"email_login_email_login_post","parameters":[{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailLoginRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/reset-password":{"post":{"summary":"Reset Password","operationId":"reset_password_reset_password_post","parameters":[{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/user-exists":{"get":{"summary":"User Exists","operationId":"user_exists_user_exists_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","format":"email","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserExistsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/guest/{path}":{"get":{"summary":"Guest Get","description":"FOSSBilling guest API docs: https://docs.boxbilling.org/en/latest/reference/api-guest.html","operationId":"guest_get_guest__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/client/{path}":{"get":{"summary":"Client Get","description":"FOSSBilling client API docs: https://docs.boxbilling.org/en/latest/reference/api-client.html","operationId":"client_get_client__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}},{"name":"x-client-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Client-Token"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Guest create failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/{path}":{"get":{"summary":"Admin Get","operationId":"admin_get_admin__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}},{"name":"x-client-token","in":"header","required":true,"schema":{"type":"string","title":"X-Client-Token"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"501":{"description":"Guest create failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pay-invoice":{"post":{"summary":"Pay Invoice","operationId":"pay_invoice_pay_invoice_post","parameters":[{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayInvoiceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlResponse"}}}},"501":{"description":"Upstream error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payment-page/{hash}":{"get":{"summary":"Payment Page","operationId":"payment_page_payment_page__hash__get","parameters":[{"name":"hash","in":"path","required":true,"schema":{"type":"string","title":"Hash"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ipn.php":{"get":{"summary":"Payment Ipn","operationId":"payment_ipn_ipn_php_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stripe-portal-url":{"get":{"summary":"Stripe Portal Url","operationId":"stripe_portal_url_stripe_portal_url_get","parameters":[{"name":"return_url","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Return Url"}},{"name":"x-client-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Client-Token"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UrlResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Stripe customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-server/can-manage-subscription/{order_id}":{"get":{"summary":"Order Server Can Manage Subscription","operationId":"order_server_can_manage_subscription_order_server_can_manage_subscription__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"return_url","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Return Url"}},{"name":"x-client-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Client-Token"}},{"name":"x-client-ssaid","in":"header","required":true,"schema":{"type":"string","maxLength":200,"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanManageSubscriptionResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-server/info/{order_id}":{"get":{"summary":"Order Server Info","operationId":"order_server_info_order_server_info__order_id__get","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"x-client-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Client-Token"}},{"name":"x-client-ssaid","in":"header","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"X-Client-Ssaid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderServerInfoResponse"}}}},"401":{"description":"Invalid or missing token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Order server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/order-server/novnc-connect-info":{"get":{"summary":"Order Server Novnc Connect Info","operationId":"order_server_novnc_connect_info_order_server_novnc_connect_info_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Token"}},{"name":"x-novnc-agent-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Novnc-Agent-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderServerNovncConnectInfoResponse"}}}},"404":{"description":"Order server not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stripe-notify":{"post":{"summary":"Stripe Notify","operationId":"stripe_notify_stripe_notify_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"CanManageSubscriptionResponse":{"properties":{"can":{"type":"boolean","title":"Can"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["can"],"title":"CanManageSubscriptionResponse"},"ChangeEmailRequest":{"properties":{"new_email":{"type":"string","format":"email","title":"New Email"},"code":{"type":"string","minLength":1,"title":"Code"}},"type":"object","required":["new_email","code"],"title":"ChangeEmailRequest"},"ChangePasswordRequest":{"properties":{"old_password":{"type":"string","minLength":1,"title":"Old Password"},"new_password":{"type":"string","minLength":1,"title":"New Password"}},"type":"object","required":["old_password","new_password"],"title":"ChangePasswordRequest"},"EmailLoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","minLength":1,"title":"Code"}},"type":"object","required":["email","code"],"title":"EmailLoginRequest"},"ErrorResponse":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"ErrorResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LoginResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"token":{"type":"string","title":"Token"}},"type":"object","required":["id","email","name","role","token"],"title":"LoginResponse"},"OkResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"}},"type":"object","required":["ok"],"title":"OkResponse"},"OrderServerInfoResponse":{"properties":{"hostname":{"type":"string","title":"Hostname"},"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"ssh_port":{"type":"integer","title":"Ssh Port"},"vnc_port":{"type":"integer","title":"Vnc Port"},"novnc_username":{"type":"string","title":"Novnc Username"},"novnc_password":{"type":"string","title":"Novnc Password"},"novnc_endpoint":{"type":"string","title":"Novnc Endpoint"},"product_type":{"$ref":"#/components/schemas/ProductType"}},"type":"object","required":["hostname","username","password","ssh_port","vnc_port","novnc_username","novnc_password","novnc_endpoint","product_type"],"title":"OrderServerInfoResponse"},"OrderServerNovncConnectInfoResponse":{"properties":{"host":{"type":"string","title":"Host"},"port":{"type":"integer","title":"Port"},"product_type":{"$ref":"#/components/schemas/ProductType"},"ipmi_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipmi Username"},"ipmi_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ipmi Password"},"os_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Username"},"os_password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os Password"},"ipmi_web_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ipmi Web Port"}},"type":"object","required":["host","port","product_type"],"title":"OrderServerNovncConnectInfoResponse"},"PasswordLoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":1,"title":"Password"},"role":{"$ref":"#/components/schemas/UserRole","default":"client"}},"type":"object","required":["email","password"],"title":"PasswordLoginRequest"},"PayInvoiceRequest":{"properties":{"hash":{"type":"string","minLength":1,"title":"Hash"},"gateway_id":{"type":"integer","title":"Gateway Id"},"subscription":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Subscription"},"return_url":{"type":"string","minLength":1,"title":"Return Url"}},"type":"object","required":["hash","gateway_id","return_url"],"title":"PayInvoiceRequest"},"ProductType":{"type":"string","enum":["mac","generic","supermicro_ipmi"],"title":"ProductType"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"First Name"},"password":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Password"},"code":{"type":"string","minLength":1,"title":"Code"}},"type":"object","required":["email","code"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","minLength":1,"title":"Code"},"new_password":{"type":"string","minLength":1,"title":"New Password"}},"type":"object","required":["email","code","new_password"],"title":"ResetPasswordRequest"},"SendCodePurpose":{"type":"string","enum":["login","register","reset-password","change-email"],"title":"SendCodePurpose"},"SendCodeRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"purpose":{"$ref":"#/components/schemas/SendCodePurpose"}},"type":"object","required":["email","purpose"],"title":"SendCodeRequest"},"UrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"UrlResponse"},"UserExistsResponse":{"properties":{"exists":{"type":"boolean","title":"Exists"}},"type":"object","required":["exists"],"title":"UserExistsResponse"},"UserRole":{"type":"string","enum":["client","admin"],"title":"UserRole"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}