{"openapi":"3.1.0","info":{"title":"FineProxy Customer API","version":"0.1.0","description":"\n\n## Authentication\n\nAll endpoints require a `Bearer` token in the `Authorization` header:\n\n```\nAuthorization: Bearer <api_key>\n```\n\nCreate a long-lived API key in the cabinet (Account → API keys, also manageable via the `/api/v1/customers/me/api-keys` endpoints) and pass it as the bearer token. Each key carries an explicit set of scopes; an endpoint is only accessible when the key holds the scope it requires."},"paths":{"/api/v1/customers/me/api-keys":{"get":{"tags":["cabinet:account"],"summary":"List Api Keys","description":"List the customer's API keys.\n\nSession only; an impersonating staff member may look (incident response).","operationId":"list_api_keys_api_v1_customers_me_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys Api V1 Customers Me Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["cabinet:account"],"summary":"Create Api Key","description":"Create a new API key. The raw secret is returned ONCE in this response.\n\nOwner session only — an ``fb_`` key cannot mint another key\n(APIKEY-SELF-ESCALATION-1), and impersonation cannot either (K2).","operationId":"create_api_key_api_v1_customers_me_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/customers/me/api-keys/{key_id}":{"delete":{"tags":["cabinet:account"],"summary":"Revoke Api Key","description":"Revoke an owned API key.\n\nSession only; impersonation may revoke and the audit row names the staff\nmember who did it (K2).","operationId":"revoke_api_key_api_v1_customers_me_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/catalog/facets":{"get":{"tags":["cabinet:billing"],"summary":"Get Facets","description":"Compute faceted navigation values with counts for the current selection.\n\nDimensions: provider (resource_id), country (tag_id), segment (tag_id).\nOR within a dimension, AND between dimensions.\n\n**Country list requires a geo source.** Countries are scoped to one geo\nprovider (MaxMind or RIPE), so ``facets.country.values`` is empty until\n``geo_source_str`` (or ``selection[provider]``) is given. Typical call:\n\n ``?geo_source_str=maxmind&product_kind=proxy_datacenter``\n\nEach country value carries ``id`` (the tag id to pass as\n``segments[].country`` in the composite quote/order), ``code`` (ISO\n3166-1 alpha-2, e.g. ``DE``, ``GB``), ``label`` and ``available``.\n\nQuery parameters use ``selection[dimension]=id`` format:\n ``?selection[provider]=5&selection[country]=45``\n\nF2: When ``geo_source_str`` is provided (\"maxmind\"/\"ripe\"), it is resolved\nto a provider resource_id and used as the provider scope for country facets.\nPass the same value as ``geo_source`` in the composite quote/order.\n\nF4: When ``product_kind=\"proxy_isp\"``, hosting-range IPs are excluded.\n\nR3C2: Responses are cached in Redis (TTL=10 min) keyed by tenant + params.\nGraceful fallback — if Redis is unavailable, the facets are computed fresh.","operationId":"get_facets_api_v1_billing_catalog_facets_get","parameters":[{"name":"selection[provider]","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"title":"Selection[Provider]"}},{"name":"selection[country]","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"title":"Selection[Country]"}},{"name":"selection[segment]","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"title":"Selection[Segment]"}},{"name":"selection[geo_source]","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"title":"Selection[Geo Source]"}},{"name":"geo_source_str","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Geo source string for provider scoping (F2): maxmind or ripe","title":"Geo Source Str"},"description":"Geo source string for provider scoping (F2): maxmind or ripe"},{"name":"product_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Product kind for ISP filtering (F4): proxy_datacenter or proxy_isp","title":"Product Kind"},"description":"Product kind for ISP filtering (F4): proxy_datacenter or proxy_isp"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FacetsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/countries":{"get":{"tags":["cabinet:billing"],"summary":"Get Countries","description":"List countries with their ISO-2 codes, tag ids and live availability.\n\nPublic (no auth required), mirrors ``/billing/catalog/facets``. Returns the\nsame country list the composite endpoints accept — map an ISO code to the\nvitrine ``tag_id`` without parsing ``label``, or pass the code straight to\n``segments[].country`` (ISO code is the recommended form).\n\nCountries without an ISO-2 mapping are omitted; sorted by available IPs,\nmost stock first. Defaults: ``product_kind=proxy_datacenter``,\n``geo_source=maxmind`` (same value you pass to quote/order). Availability\ncomes from the same source as quote/order (live pool for datacenter/ISP\nproducts).","operationId":"get_countries_api_v1_billing_countries_get","parameters":[{"name":"product_kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Product kind for live availability (F4): proxy_datacenter or proxy_isp","title":"Product Kind"},"description":"Product kind for live availability (F4): proxy_datacenter or proxy_isp"},{"name":"geo_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Geo source the country tags are scoped to: maxmind or ripe","title":"Geo Source"},"description":"Geo source the country tags are scoped to: maxmind or ripe"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/composite/pricing-info":{"get":{"tags":["cabinet:billing"],"summary":"Composite Pricing Info","description":"Read-only pricing reference for the calculator UI.\n\nReturns the tenant's RESOLVED volume-discount ladder, period\ndiscounts, and min-IP floors so the client can display discount\nthresholds and give an early, best-effort heads-up on minimum order\nsize — without waiting on a quote/order round-trip. The quote/order\nendpoints remain the sole source of truth for actual pricing and\nvalidation; this is advisory only. No auth required (mirrors\n``/composite/quote`` — anonymous users can also see pricing terms).","operationId":"composite_pricing_info_api_v1_billing_composite_pricing_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositePricingInfoResponse"}}}}}}},"/api/v1/billing/composite/auto-plan":{"post":{"tags":["cabinet:billing"],"summary":"Composite Auto Plan","description":"Auto-distribute a total IP count across available countries (auto-mix).\n\nPublic (no auth required), mirrors ``/composite/quote`` — this is a\nplan-only endpoint with no money involved. The returned segments are\nmeant to be fed straight into ``/composite/quote`` for pricing and\n``/composite/order`` to purchase. ``excluded_countries`` accepts ISO-2\ncodes or tag_ids; use ``GET /billing/countries`` for the country list.","operationId":"composite_auto_plan_api_v1_billing_composite_auto_plan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositeAutoPlanRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositeAutoPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/composite/quote":{"post":{"tags":["cabinet:billing"],"summary":"Composite Quote","description":"Produce a non-binding price quote for a composite (multi-segment) mix.\n\n``segments[].country`` accepts an ISO-2 code or a tag_id; use\n``GET /billing/countries`` for the country list. The response echoes the\nISO code per segment as ``country_code``.\n\nAccepts a list of segments ``[{provider, country, count}]`` and\nreturns per-segment pricing plus totals. The quote is always\nadvisory (``binding=false``). Unavailable segments are listed in\n``errors`` without failing the whole request.\n\nPricing formula (pricing-model.md §4):\n total_ip = Σ count_i\n unit_base = volume_tier(total_ip)\n segment_price = count_i * unit_base * type_mult * geo_mult(country_i)\n\nPARTNER-QUOTE-1: when a valid customer Bearer is present and the\ncustomer has an ACTIVE partner profile with\n``wholesale_discount_percent`` 1..100, the same percent helper used\nby ``/composite/order`` is applied after retail pricing. Response\nthen exposes ``retail_*`` + ``partner_discount_*`` fields; anonymous\n/ non-partner quotes keep those fields null and return retail totals.","operationId":"composite_quote_api_v1_billing_composite_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositeQuoteRequestIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositeQuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/composite/order":{"post":{"tags":["cabinet:billing"],"summary":"Composite Order","description":"Create a single service from a composite (multi-segment) mix.\n\n``segments[].country`` accepts an ISO-2 code or a tag_id; use\n``GET /billing/countries`` for the country list.\n\nValidates availability of every segment via the vitrine, computes the\ncomposite price, charges the wallet, and creates a unified Service\nwith the mix segments stored in ``Service.params``.\n\nIdempotent per ``idempotency_key``: a new key buys a new service\neven when an identical one exists; the same key replays the service it\ncreated without a second charge; the same key with a different order is\n409 ``IDEMPOTENCY_KEY_REUSED``. Keyless orders with the same owner +\nsegments return the existing service without double-charging.","operationId":"composite_order_api_v1_billing_composite_order_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositeOrderRequestIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositeOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/services/{service_id}/add-ips/quote":{"post":{"tags":["cabinet:billing"],"summary":"Get Add Ips Quote","description":"Preview an IP top-up for an active composite service.\n\n``segments[].country`` accepts an ISO-2 code or a tag_id; use\n``GET /billing/countries`` for the country list (resolved against the\nservice's own ``geo_source``). Returns the prorated charge for the\nremainder of the current billing period plus the new (bumped) renewal\nprice. No wallet or provisioning side effects.","operationId":"get_add_ips_quote_api_v1_billing_services__service_id__add_ips_quote_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIpsQuoteRequestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIpsQuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/services/{service_id}/add-ips":{"post":{"tags":["cabinet:billing"],"summary":"Add Ips","description":"Buy additional IPs into an already-active composite service.\n\n``segments[].country`` accepts an ISO-2 code or a tag_id; use\n``GET /billing/countries`` for the country list (resolved against the\nservice's own ``geo_source``).\n\nRe-quotes the requested segments against current availability, charges\nthe wallet for the prorated remainder of the current period, provisions\nthe IPs into the existing service, and bumps the renewal price for\nfuture periods. Idempotent on ``body.idempotency_key``.","operationId":"add_ips_api_v1_billing_services__service_id__add_ips_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIpsRequestIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddIpsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/services/{service_id}/addons/available":{"get":{"tags":["cabinet:addons"],"summary":"List Available Addons","description":"List addons purchasable for the given service (catalog view).\n\nReturns available addon types with prices and the caller's wallet balance.\nAlready-active addons for this service are excluded from the list.","operationId":"list_available_addons_api_v1_billing_services__service_id__addons_available_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonCatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/services/{service_id}/addons":{"post":{"tags":["cabinet:addons"],"summary":"Purchase Addon","description":"Purchase an addon for a service.\n\nMoney path (audit checklist):\n-: price in integer cents, no floats.\n-: ledger entry created (append-only debit).\n-: idempotency_key in request body; UNIQUE constraint on service_addon.\n Repeat calls with the same key return the existing addon without double-charging.\n- Fail-closed: insufficient funds → HTTP 402 (no partial state).\n- Exact price guard: ``expected_price_cents`` must equal the server-resolved\n TOTAL before charge; mismatch / missing → HTTP 409, no mutations.\n- Catalog price is resolved server-side; callers confirm the displayed total\n but cannot inject a lower charge amount.","operationId":"purchase_addon_api_v1_billing_services__service_id__addons_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonPurchaseRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonPurchaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cabinet:addons"],"summary":"List Active Addons","description":"List active addons attached to the given service.\n\nReturns only ACTIVE addons. Cancelled / suspended addons are excluded.\nShows the type, status, price at purchase, params, and activation date.: only the service owner can call this endpoint.","operationId":"list_active_addons_api_v1_billing_services__service_id__addons_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveAddonListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/services/{service_id}/addons/{addon_id}":{"delete":{"tags":["cabinet:addons"],"summary":"Disable Addon","description":"Disable (cancel) an active addon on the given service.\n\nIdempotent: calling on an already-disabled addon returns success.: only the service owner can call this endpoint.\n\nMoney path: may issue a prorated wallet credit (refund) — still scope-gated\n(API-KEY-SCOPE-GAP-2). Fail-closed refund semantics →.","operationId":"disable_addon_api_v1_billing_services__service_id__addons__addon_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}},{"name":"addon_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Addon Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableAddonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/me":{"get":{"tags":["customer-api"],"summary":"Get Profile","description":"Get your account profile.\n\nRequires scope ``customer:read``.","operationId":"get_profile_api_v1_customer_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Profile Api V1 Customer Me Get"}}}}}},"patch":{"tags":["customer-api"],"summary":"Update Profile","description":"Update your account profile (name, phone). Email cannot be changed.\n\nRequires scope ``customer:write``.","operationId":"update_profile_api_v1_customer_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/me/whmcs-invoices":{"get":{"tags":["customer-api"],"summary":"List Whmcs Invoices","description":"Read-only WHMCS invoice history.\n\nRequires scope ``customer:read``.","operationId":"list_whmcs_invoices_api_v1_customer_me_whmcs_invoices_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhmcsInvoiceArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/wallet/balance":{"get":{"tags":["customer-api"],"summary":"Get Balance","description":"Get your prepaid wallet balance.\n\nThe balance is computed from the append-only transaction ledger.\nRequires scope wallet:read.\n\nM2-WALLET-1: this is a pure read -- it never auto-creates a Wallet\nrow. An account with no wallet (e.g. a WHMCS-mirror account, or a\nfinebilling-native account that has never deposited) reports\nbalance_cents=0 / has_wallet=False synthetically; get_or_create_wallet\nis reserved for actual money-mutation call sites, which are already\ngated by has_finebilling_authority.","operationId":"get_balance_api_v1_customer_wallet_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletBalanceResponse"}}}}}}},"/api/v1/customer/wallet/ledger":{"get":{"tags":["customer-api"],"summary":"List Ledger","description":"List wallet transactions (paginated, newest first).\n\nEntries linked to a specific service carry its ``service_id``.\nRequires scope ``wallet:read``.","operationId":"list_ledger_api_v1_customer_wallet_ledger_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/wallet/deposit/nowpayments/coins":{"get":{"tags":["customer-api"],"summary":"List Nowpayments Coins","description":"Coins/networks allowed for a NOWPayments top-up.\n\nSame backend-only catalog as the cabinet: merchant list ∩ static native\nintake policy. Requires ``wallet:read``; no money moves.","operationId":"list_nowpayments_coins_api_v1_customer_wallet_deposit_nowpayments_coins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NowPaymentsCoinsResponse"}}}}}}},"/api/v1/customer/wallet/deposit/nowpayments/quote":{"get":{"tags":["customer-api"],"summary":"Get Nowpayments Quote","description":"Read-only NOWPayments quote for one ticker.\n\nSame tenant/gateway checks as the coins catalog; no Payment is created.\nProvider GETs run after the read txn is committed. Below-minimum is\nadvisory (``minimum_met=false``), provider failure is 503.","operationId":"get_nowpayments_quote_api_v1_customer_wallet_deposit_nowpayments_quote_get","parameters":[{"name":"pay_currency","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":32,"title":"Pay Currency"}},{"name":"amount_cents","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"title":"Amount Cents"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NowPaymentsQuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/wallet/deposit/init":{"post":{"tags":["customer-api"],"summary":"Init Deposit","description":"Initiate a wallet top-up via a payment gateway.\n\nReturns a checkout URL to complete the payment. The wallet is credited\nonly after the payment provider confirms the transaction — poll the\nledger to observe the credit. Supply ``idempotency_key`` to make\nretries safe: a repeated call with the same key returns the original\npayment instead of creating a new one.\n\nWhen the gateway requires KYC and the customer has not passed it,\nresponds with HTTP 403 and ``detail.error = \"kyc_required\"``\n— no ``Payment`` row is created. Webhook credit for already-created\npayments is unaffected.\n\nRequires scope ``wallet:deposit``.","operationId":"init_deposit_api_v1_customer_wallet_deposit_init_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositInitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositInitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/catalog":{"get":{"tags":["customer-api"],"summary":"List Products","description":"List the product catalogue with your retail prices.\n\nRequires scope ``catalog:read``.","operationId":"list_products_api_v1_customer_catalog_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/catalog/{product_id}":{"get":{"tags":["customer-api"],"summary":"Get Product","description":"Get product details with your retail price.\n\nRequires scope ``catalog:read``.","operationId":"get_product_api_v1_customer_catalog__product_id__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services":{"get":{"tags":["customer-api"],"summary":"List Services","description":"List your services (paginated).\n\nRequires scope ``services:read``.","operationId":"list_services_api_v1_customer_services_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer-api"],"summary":"Create Service","description":"Purchase a new service, paying from your wallet balance.\n\nResolves the retail price, charges the wallet, provisions the service\nand returns it. Idempotent: repeated calls with the same product and\nparams return the existing service without charging again.\n\nRequires scope ``services:write``.","operationId":"create_service_api_v1_customer_services_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}":{"get":{"tags":["customer-api"],"summary":"Get Service","description":"Get details of one of your services.\n\nRequires scope ``services:read``.","operationId":"get_service_api_v1_customer_services__service_id__get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/renew":{"post":{"tags":["customer-api"],"summary":"Renew Service","description":"Renew a subscription service, paying from your wallet balance.\n\nThe renewal price is the price the service was purchased at.\nRequires scope ``services:write``.","operationId":"renew_service_api_v1_customer_services__service_id__renew_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRenewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/cancel":{"post":{"tags":["customer-api"],"summary":"Cancel Service","description":"Cancel (terminate) a service. Idempotent.\n\nUnused paid time may be refunded to your wallet on a pro-rata basis.\nRequires scope ``services:write``.","operationId":"cancel_service_api_v1_customer_services__service_id__cancel_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/invoices/{invoice_id}/pdf":{"get":{"tags":["customer-api"],"summary":"Download the PDF for a specific invoice","description":"Stream the Lago-generated PDF for a single invoice.\n\nSame ownership-checked streaming logic as the cabinet download button\n(``client_billing.download_invoice_pdf``) — usable with the same\n``Authorization: Bearer fb_...`` key an agent already holds, so the MCP\n``list_invoices``/``get_invoice`` tools can point straight at this URL.\nRequires scope ``wallet:read``.","operationId":"download_invoice_pdf_api_v1_customer_invoices__invoice_id__pdf_get","parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/ips":{"get":{"tags":["customer-api"],"summary":"Get Proxy Ips","description":"List the proxy IP endpoints of one of your services.\n\nRequires scope ``services:read``.","operationId":"get_proxy_ips_api_v1_customer_services__service_id__proxy_ips_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyIpListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/auth":{"get":{"tags":["customer-api"],"summary":"Get Proxy Auth","description":"Get the proxy connection credentials for one of your services.\n\nThe password is masked by default; pass ``reveal=true`` to receive it\nin plain text. Requires scope ``services:read``.","operationId":"get_proxy_auth_api_v1_customer_services__service_id__proxy_auth_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}},{"name":"reveal","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Reveal"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyAuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer-api"],"summary":"Update Proxy Auth","description":"Update proxy credentials — rotate the password or change the login.\n\nIdempotent: a repeated identical payload produces the same state.\nWhen rotating, the new password is returned exactly once in the\nresponse body. Requires scope ``services:write``.","operationId":"update_proxy_auth_api_v1_customer_services__service_id__proxy_auth_put","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyAuthUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyAuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/config":{"get":{"tags":["customer-api"],"summary":"Get Rotating Config","description":"Get the connection configuration of a rotating proxy service.\n\nRequires scope ``services:read``.","operationId":"get_rotating_config_api_v1_customer_services__service_id__proxy_config_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotatingConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/whitelist":{"get":{"tags":["customer-api"],"summary":"Get Whitelist","description":"List the IP whitelist entries of one of your proxy services.\n\nRequires scope ``services:read``.","operationId":"get_whitelist_api_v1_customer_services__service_id__proxy_whitelist_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer-api"],"summary":"Add Whitelist Entry","description":"Add a single IPv4 address to the service's IP whitelist.\n\nOnly single addresses are accepted (no CIDR subnets).\nRequires scope ``services:write``.","operationId":"add_whitelist_entry_api_v1_customer_services__service_id__proxy_whitelist_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer-api"],"summary":"Remove Whitelist Entry","description":"Remove an IP address from the service's IP whitelist.\n\nRequires scope ``services:write``.","operationId":"remove_whitelist_entry_api_v1_customer_services__service_id__proxy_whitelist_delete","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}},{"name":"ip_or_cidr","in":"query","required":true,"schema":{"type":"string","description":"IP address to remove from the whitelist","title":"Ip Or Cidr"},"description":"IP address to remove from the whitelist"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/whitelist/replace":{"post":{"tags":["customer-api"],"summary":"Replace Whitelist Entry","description":"Atomically swap one whitelisted IP for another.\n\nOne transaction and one admission version — the old IP leaves and the new\none appears together, with no window without an IP (or with both). No free\nslot is needed; the new value must be a single IPv4 address.\nRequires scope ``services:write``.","operationId":"replace_whitelist_entry_api_v1_customer_services__service_id__proxy_whitelist_replace_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistReplaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/usage":{"get":{"tags":["customer-api"],"summary":"Get Service Usage","description":"Get traffic/request usage statistics for a service over a time window.\n\nRequires scope ``usage:read``.","operationId":"get_service_usage_api_v1_customer_services__service_id__usage_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"Start of the window (ISO 8601)","title":"Start"},"description":"Start of the window (ISO 8601)"},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date-time","description":"End of the window (ISO 8601)","title":"End"},"description":"End of the window (ISO 8601)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/refresh-status":{"get":{"tags":["customer-api"],"summary":"Get Refresh Status","description":"Check whether the next IP refresh for this service is free or paid.\n\nRead-only. Requires scope ``services:read``.","operationId":"get_refresh_status_api_v1_customer_services__service_id__proxy_refresh_status_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReallocationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/refresh/quote":{"post":{"tags":["customer-api"],"summary":"Preview an IP refresh: price and free stock","description":"Preview an IP refresh: price, plan and available addresses per country.\n\nRead-only — nothing is charged and nothing is written, so call it as often\nas you like. Recommended flow:\n\n- `GET …/proxy/refresh-status` — is the next refresh free or paid.\n- `POST …/proxy/refresh/quote` (this endpoint) — which addresses would be\n replaced, from which countries, and what it would cost right now.\n- `POST …/proxy/refresh` — perform it with the same arguments and a fresh\n `idempotency_key`.\n\nTwo ways to refresh:\n\n- **Whole allocation by country** — send `geo_counts`, e.g.\n `{\"DE\": 5, \"US\": 3}`; the sum must equal the number of replaced\n addresses. If any country is short of free addresses, `shortfall` is\n `true` and the refresh would be refused before any charge.\n- **Replace only what is available** (`partial: true`) — the server looks\n at the countries your service holds, replaces as many addresses as the\n pool can give per country and keeps the rest. The answer reports\n `replaced_count`, `kept_count`, `planned_geo_counts` and the\n `held`/`available` pair per country. `partial` cannot be combined with\n `geo_counts` or `target_ips` and works for shared-pool services only.\n With no stock at all it still answers `200` with `replaced_count=0`.\n\n`price_cents` is 0 while the free refresh slot is unused; otherwise it is\nthe per-call price from the dealer's catalog (`1000` = $10.00), the same\nwhether the refresh replaces one address or the whole allocation.\n\n**Zero stock is not an error here.** A preview never fails because the pool\nis empty: with `partial` and no free address it answers `200` with\n`replaced_count=0`, `kept_count` equal to the whole allocation,\n`planned_geo_counts={}` and `shortfall=true`; nothing is charged and\nnothing changes. It is the refresh itself that refuses an all-empty plan\nwith `409 no_available_ips`.\n\nErrors: `422` (`partial` combined with `geo_counts` / `target_ips`,\n`partial` on a dedicated service, or an invalid `geo_counts` such as a\nnon-ISO-2 key or a count below 1), `404` (unknown service).\n\nRequires scope `services:read`.","operationId":"quote_refresh_ips_api_v1_customer_services__service_id__proxy_refresh_quote_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRefreshQuoteRequest"},"examples":{"partial":{"summary":"Replace only what the pool has","description":"The server plans the replacement: per country it replaces as many addresses as the pool can give and keeps the rest.","value":{"partial":true}},"by_country":{"summary":"Replace the whole allocation by country","description":"Replace every address of the service and ask for five new ones from Germany (the sum must equal the number of replaced addresses).","value":{"geo_counts":{"DE":5}}}}}}},"responses":{"200":{"description":"The refresh would replace these addresses for this price now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReallocateQuoteResponse"},"examples":{"partial":{"summary":"“Replace what is available” plan","value":{"service_id":"6f2d8a44-9c31-4a3e-8b0f-3d5f0f6a2c11","geo_source":"maxmind","replaced_count":3,"price_cents":1000,"is_free":false,"availability":{"DE":{"requested":2,"available":1,"held":2},"US":{"requested":3,"available":3,"held":3}},"shortfall":true,"partial":true,"kept_count":2,"planned_geo_counts":{"DE":1,"US":2}}},"by_country":{"summary":"Whole allocation, five new addresses from Germany","value":{"service_id":"6f2d8a44-9c31-4a3e-8b0f-3d5f0f6a2c11","geo_source":"maxmind","replaced_count":5,"price_cents":0,"is_free":true,"availability":{"DE":{"requested":5,"available":12}},"shortfall":false}},"zero_stock_partial":{"summary":"“Replace what is available” with no stock left","description":"A preview never fails on an empty pool: it reports replaced_count=0, the whole allocation in kept_count and shortfall=true. Nothing is charged and nothing changes — the refresh itself would refuse with 409.","value":{"service_id":"6f2d8a44-9c31-4a3e-8b0f-3d5f0f6a2c11","geo_source":"maxmind","replaced_count":0,"price_cents":0,"is_free":true,"availability":{"DE":{"requested":4,"available":0,"held":4}},"shortfall":true,"partial":true,"kept_count":4,"planned_geo_counts":{}}}}}}},"422":{"description":"`partial` combined with `geo_counts`/`target_ips`, or `partial` on a dedicated service.","content":{"application/json":{"examples":{"partial_refresh_shared_only":{"value":{"detail":{"code":"partial_refresh_shared_only","message":"partial refresh is only available for shared pool services."}}},"partial_conflicting_args":{"value":{"detail":{"code":"partial_conflicting_args","message":"partial=True cannot be combined with target_ips or geo_counts."}}}}}}}}}},"/api/v1/customer/services/{service_id}/proxy/refresh":{"post":{"tags":["customer-api"],"summary":"Refresh the IP addresses of a service","description":"Replace the allocated IP addresses of a proxy service.\n\nA refresh always returns the same number of addresses the service held —\nit rotates them, it does not grow the allocation (use the add-IP endpoint\nfor that).\n\n**Price.** The first refresh of a service is free. After that a new free\nrefresh becomes available once the free window has passed; refresh again\nbefore it and the call costs the catalog price per call (`1000` = $10.00),\nno matter how many addresses are replaced. Use\n`GET …/proxy/refresh-status` to see whether the next refresh is free, and\n`POST …/proxy/refresh/quote` to see the exact price before you commit. The\ncharge happens before the addresses change — if the wallet cannot cover it\nyou get `402 insufficient_funds` and nothing changes.\n\n**What to replace.**\n\n- Omit `target_ips` to rotate the whole allocation.\n- `target_ips` rotates only the listed addresses, the rest stay in place.\n- `partial: true` replaces as many addresses as the pool can give per\n country and keeps the rest (reported in `kept_count`); it costs the same\n as a plain refresh and cannot be combined with `target_ips`.\n- `partial` works for shared-pool services only.\n\nThis endpoint has **no `geo_counts` field**: unknown fields in the body are\nignored, so sending one here does not target geography — it would charge\nfor a plain full refresh with an arbitrary geography. Preview geography\nwith `POST …/proxy/refresh/quote`; the geographic selection is not offered\nhere.\n\n**Retries.** `idempotency_key` identifies the intent: repeating the call\nwith the same key returns the original result — no second charge, no\nsecond replacement — even if the pool has changed since. A new intent needs\na new key.\n\nErrors: `402 insufficient_funds` (nothing charged), `409 no_available_ips`\n(`partial` only — no free address in any country; nothing charged and the\nfree refresh slot is kept), `409` on an idempotency-key conflict, `422`\n(`partial` with `target_ips`, `partial` on a dedicated service), `404`\n(unknown service).\n\nRequires scope `services:write`.","operationId":"refresh_ips_api_v1_customer_services__service_id__proxy_refresh_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRefreshIpsRequest"},"examples":{"full":{"summary":"Refresh the whole allocation","value":{"idempotency_key":"refresh-2026-11-03-0001"}},"partial":{"summary":"Replace only what the pool has","description":"The server replaces as many addresses as the pool can give per country, keeps the rest and reports them in kept_count.","value":{"idempotency_key":"refresh-2026-11-03-0002","partial":true}},"targeted":{"summary":"Replace specific addresses","value":{"idempotency_key":"refresh-2026-11-03-0003","target_ips":["198.51.100.24","198.51.100.31"]}}}}}},"responses":{"200":{"description":"The refresh ran; `new_ips` lists the addresses actually replaced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReallocationResponse"},"examples":{"partial":{"summary":"Three of five addresses replaced, two kept","value":{"service_id":"6f2d8a44-9c31-4a3e-8b0f-3d5f0f6a2c11","ip_count":3,"charged_cents":1000,"ledger_entry_id":"3c9e6a1d-4b62-4f0e-9a55-7d1b2f8c0e44","new_ips":["198.51.100.24","198.51.100.31","198.51.100.42"],"alive_replaced":0,"kept_count":2,"partial":true}},"full":{"summary":"Whole allocation replaced on the free slot","value":{"service_id":"6f2d8a44-9c31-4a3e-8b0f-3d5f0f6a2c11","ip_count":5,"charged_cents":0,"new_ips":["198.51.100.24","198.51.100.31","198.51.100.42","198.51.100.57","198.51.100.63"],"alive_replaced":0,"kept_count":0,"partial":false}}}}}},"402":{"description":"The wallet cannot cover the paid refresh. Nothing was charged and no address changed.","content":{"application/json":{"examples":{"insufficient_funds":{"value":{"detail":{"error":"insufficient_funds","required_cents":1000,"balance_cents":0}}}}}}},"409":{"description":"`partial` only: the pool has no free address in any country. Nothing was charged, the free refresh slot is untouched and the same idempotency key may be retried once stock appears.","content":{"application/json":{"examples":{"no_available_ips":{"value":{"detail":{"code":"no_available_ips","per_country":{"DE":{"held":4,"available":0}},"message":"No free IPs in the pool for any country of this service — nothing was charged."}}}}}}},"422":{"description":"`partial` combined with `target_ips`, or `partial` on a dedicated service. The refresh body has no `geo_counts` field — unknown body fields are ignored, so geography must be previewed and applied via `…/proxy/refresh/quote`.","content":{"application/json":{"examples":{"partial_conflicting_args":{"value":{"detail":{"code":"partial_conflicting_args","message":"partial=True cannot be combined with target_ips or geo_counts."}}},"partial_refresh_shared_only":{"value":{"detail":{"code":"partial_refresh_shared_only","message":"partial refresh is only available for shared pool services."}}}}}}}}}},"/api/v1/customer/services/{service_id}/proxy/sticky/sessions":{"get":{"tags":["customer-api"],"summary":"Customer List Sticky Sessions","description":"List sticky sessions for a rotating proxy service.\n\nRequires scope ``services:read``.","operationId":"customer_list_sticky_sessions_api_v1_customer_services__service_id__proxy_sticky_sessions_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickySessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/sticky/sessions/{sid}/rotate":{"post":{"tags":["customer-api"],"summary":"Customer Rotate Sticky Session","description":"Rotate one sticky session to a new exit (free; not IP refresh).\n\nRequires scope ``services:write``.","operationId":"customer_rotate_sticky_session_api_v1_customer_services__service_id__proxy_sticky_sessions__sid__rotate_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyRotateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/sticky/sessions/{sid}":{"delete":{"tags":["customer-api"],"summary":"Customer Delete Sticky Session","description":"Delete one sticky session. Requires scope ``services:write``.","operationId":"customer_delete_sticky_session_api_v1_customer_services__service_id__proxy_sticky_sessions__sid__delete","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}},{"name":"sid","in":"path","required":true,"schema":{"type":"string","title":"Sid"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/sticky/purge":{"post":{"tags":["customer-api"],"summary":"Customer Purge Sticky Sessions","description":"Purge all sticky sessions for the service. Requires ``services:write``.","operationId":"customer_purge_sticky_sessions_api_v1_customer_services__service_id__proxy_sticky_purge_post","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyPurgeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/sticky/mode":{"get":{"tags":["customer-api"],"summary":"Customer Get Sticky Mode","description":"Get sticky mode for a rotating service. Requires ``services:read``.","operationId":"customer_get_sticky_mode_api_v1_customer_services__service_id__proxy_sticky_mode_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyModeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer-api"],"summary":"Customer Set Sticky Mode","description":"Set sticky mode. Requires ``services:write``.","operationId":"customer_set_sticky_mode_api_v1_customer_services__service_id__proxy_sticky_mode_put","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyModeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyModeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/services/{service_id}/proxy/sticky/ttl":{"get":{"tags":["customer-api"],"summary":"Customer Get Sticky Ttl","description":"Get per-user sticky TTL override. Requires ``services:read``.","operationId":"customer_get_sticky_ttl_api_v1_customer_services__service_id__proxy_sticky_ttl_get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyTtlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["customer-api"],"summary":"Customer Set Sticky Ttl","description":"Set per-user sticky TTL override. Requires ``services:write``.","operationId":"customer_set_sticky_ttl_api_v1_customer_services__service_id__proxy_sticky_ttl_put","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyTtlUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyTtlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer-api"],"summary":"Customer Reset Sticky Ttl","description":"Reset sticky TTL to global default. Requires ``services:write``.","operationId":"customer_reset_sticky_ttl_api_v1_customer_services__service_id__proxy_sticky_ttl_delete","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StickyTtlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/tickets":{"get":{"tags":["customer-api"],"summary":"List Tickets","description":"List your support tickets, newest first.\n\nRequires scope ``tickets:read``.","operationId":"list_tickets_api_v1_customer_tickets_get","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customer-api"],"summary":"Create Ticket","description":"Create a new support ticket.\n\nRequires scope ``tickets:write``.","operationId":"create_ticket_api_v1_customer_tickets_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/tickets/{ticket_id}":{"get":{"tags":["customer-api"],"summary":"Get Ticket","description":"Get a single ticket with its full message history.\n\nRequires scope ``tickets:read``.","operationId":"get_ticket_api_v1_customer_tickets__ticket_id__get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/tickets/{ticket_id}/reply":{"post":{"tags":["customer-api"],"summary":"Reply Ticket","description":"Reply to an existing ticket. Closed tickets cannot receive replies.\n\nRequires scope ``tickets:write``.","operationId":"reply_ticket_api_v1_customer_tickets__ticket_id__reply_post","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/tickets/{ticket_id}/status":{"patch":{"tags":["customer-api"],"summary":"Update Ticket Status","description":"Close an active ticket (``closed``) or reopen a closed one (``open``).\n\nRequires scope ``tickets:write``. Same rules as the cabinet endpoint.","operationId":"update_ticket_status_api_v1_customer_tickets__ticket_id__status_patch","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketUpdateStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TicketDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/tickets/{ticket_id}/attachments/{attachment_id}/download":{"get":{"tags":["customer-api"],"summary":"Download Ticket Attachment","description":"Download the content of a ticket attachment (owner only).\n\nRequires scope ``tickets:read``. Same rules as the cabinet endpoint.","operationId":"download_ticket_attachment_api_v1_customer_tickets__ticket_id__attachments__attachment_id__download_get","parameters":[{"name":"ticket_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Ticket Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/webhooks/events":{"get":{"tags":["customer-api"],"summary":"Api List Event Types","operationId":"api_list_event_types_api_v1_customer_webhooks_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventTypesResponse"}}}}}}},"/api/v1/customer/webhooks":{"get":{"tags":["customer-api"],"summary":"Api List Webhooks","operationId":"api_list_webhooks_api_v1_customer_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WebhookEndpointResponse"},"type":"array","title":"Response Api List Webhooks Api V1 Customer Webhooks Get"}}}}}},"post":{"tags":["customer-api"],"summary":"Api Create Webhook","operationId":"api_create_webhook_api_v1_customer_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/webhooks/{endpoint_id}":{"get":{"tags":["customer-api"],"summary":"Api Get Webhook","operationId":"api_get_webhook_api_v1_customer_webhooks__endpoint_id__get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["customer-api"],"summary":"Api Update Webhook","operationId":"api_update_webhook_api_v1_customer_webhooks__endpoint_id__patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["customer-api"],"summary":"Api Delete Webhook","operationId":"api_delete_webhook_api_v1_customer_webhooks__endpoint_id__delete","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/webhooks/{endpoint_id}/deliveries":{"get":{"tags":["customer-api"],"summary":"Api List Deliveries","operationId":"api_list_deliveries_api_v1_customer_webhooks__endpoint_id__deliveries_get","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryResponse"},"title":"Response Api List Deliveries Api V1 Customer Webhooks  Endpoint Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/webhooks/{endpoint_id}/test":{"post":{"tags":["customer-api"],"summary":"Api Send Test","operationId":"api_send_test_api_v1_customer_webhooks__endpoint_id__test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer/webhooks/deliveries/{delivery_id}/redeliver":{"post":{"tags":["customer-api"],"summary":"Api Redeliver","operationId":"api_redeliver_api_v1_customer_webhooks_deliveries__delivery_id__redeliver_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ActiveAddonItem":{"properties":{"addon_id":{"type":"string","format":"uuid","title":"Addon Id"},"service_id":{"type":"string","format":"uuid","title":"Service Id"},"addon_type":{"type":"string","title":"Addon Type"},"status":{"type":"string","title":"Status"},"price_cents":{"type":"integer","title":"Price Cents"},"nominal_price_cents":{"type":"integer","title":"Nominal Price Cents","default":0},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"baked_into_service_price":{"type":"boolean","title":"Baked Into Service Price","default":false},"activated_at":{"type":"string","format":"date-time","title":"Activated At"}},"type":"object","required":["addon_id","service_id","addon_type","status","price_cents","activated_at"],"title":"ActiveAddonItem","description":"One active addon currently attached to a service."},"ActiveAddonListResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"addons":{"items":{"$ref":"#/components/schemas/ActiveAddonItem"},"type":"array","title":"Addons"}},"type":"object","required":["service_id","addons"],"title":"ActiveAddonListResponse","description":"Active addons for a given service."},"AddIpsQuoteRequestIn":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/AddIpsSegmentRequestIn"},"type":"array","minItems":1,"title":"Segments","description":"One or more segments to add"}},"additionalProperties":false,"type":"object","required":["segments"],"title":"AddIpsQuoteRequestIn","description":"Wire form of the add-ips quote request: ``segments[].country`` accepts ISO-2."},"AddIpsQuoteResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"segments":{"items":{"$ref":"#/components/schemas/CompositeSegmentQuote"},"type":"array","title":"Segments","description":"Per-segment pricing breakdown for the added IPs"},"errors":{"items":{"$ref":"#/components/schemas/CompositeQuoteError"},"type":"array","title":"Errors","description":"Unavailable/invalid segments (409 at order time)"},"added_ip_count":{"type":"integer","title":"Added Ip Count","description":"Total IPs across the added segments"},"monthly_price_added_cents":{"type":"integer","title":"Monthly Price Added Cents","description":"Undiscounted full-monthly cost of the added segments"},"days_remaining":{"type":"integer","title":"Days Remaining","description":"Days left until Service.expires_at"},"days_per_month":{"type":"integer","title":"Days Per Month","description":"Denominator used for proration","default":30},"prorated_charge_cents":{"type":"integer","title":"Prorated Charge Cents","description":"Amount charged now for the remainder of the current period"},"current_price_cents":{"type":"integer","title":"Current Price Cents","description":"Service's current full-period renewal price"},"new_renewal_price_cents":{"type":"integer","title":"New Renewal Price Cents","description":"Renewal price after this top-up (current + added segments' full-period cost)"}},"type":"object","required":["service_id","added_ip_count","monthly_price_added_cents","days_remaining","prorated_charge_cents","current_price_cents","new_renewal_price_cents"],"title":"AddIpsQuoteResponse","description":"Non-binding preview of an add-ips top-up. No side effects."},"AddIpsRequestIn":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/AddIpsSegmentRequestIn"},"type":"array","minItems":1,"title":"Segments","description":"One or more segments to add"},"idempotency_key":{"type":"string","minLength":1,"title":"Idempotency Key","description":"Client-supplied idempotency key. Must be unique per intent."},"expected_charge_cents":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Expected Charge Cents","description":"Amount the client confirmed for this top-up, in integer cents (§D5). Mandatory for a dedicated service (422 `price_confirmation_required` when absent, 409 `price_changed` on mismatch); optional for composite, where it is checked against the freshly quoted amount when present."}},"additionalProperties":false,"type":"object","required":["segments","idempotency_key"],"title":"AddIpsRequestIn","description":"Wire form of the add-ips request: ``segments[].country`` accepts ISO-2."},"AddIpsResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"added_ip_count":{"type":"integer","title":"Added Ip Count"},"charged_cents":{"type":"integer","title":"Charged Cents","description":"Prorated amount charged to the wallet"},"ledger_entry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ledger Entry Id","description":"Ledger entry for the charge; None when charge was 0"},"new_total_ip":{"type":"integer","title":"New Total Ip","description":"Total IP count on the service after the top-up"},"new_price_cents":{"type":"integer","title":"New Price Cents","description":"Service's new full-period renewal price"},"segments":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Segments","description":"Full merged segment list stored on Service.params"}},"type":"object","required":["service_id","added_ip_count","charged_cents","new_total_ip","new_price_cents"],"title":"AddIpsResponse","description":"Result of a successful add-ips top-up."},"AddIpsSegmentRequestIn":{"properties":{"country":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Country","description":"Country: ISO 3166-1 alpha-2 code (\"DE\", \"GB\"; UK→GB) or vitrine tag_id from /billing/catalog/facets. ISO code is the recommended form."},"count":{"type":"integer","maximum":10000,"minimum":1,"title":"Count","description":"Number of IPs to add (1–10000)"}},"additionalProperties":false,"type":"object","required":["country","count"],"title":"AddIpsSegmentRequestIn","description":"Wire form of a segment: ``country`` also accepts an ISO-2 code."},"AddonBreakdownItem":{"properties":{"addon_type":{"type":"string","enum":["extra_whitelist_ip","udp_unlock","extra_connections"],"title":"Addon Type","description":"Addon catalog type key"},"quantity":{"type":"integer","minimum":0,"title":"Quantity","description":"Units (IPs / flag=1 / connections)"},"unit_price_cents":{"type":"integer","minimum":0,"title":"Unit Price Cents","description":"Per-unit monthly cents"},"monthly_cents":{"type":"integer","minimum":0,"title":"Monthly Cents","description":"quantity × unit (or UDP percent-of-base)"}},"type":"object","required":["addon_type","quantity","unit_price_cents","monthly_cents"],"title":"AddonBreakdownItem","description":"One pre-purchase add-on line in a composite quote (display + FE reconcile).\n\nSum of ``monthly_cents`` across items equals ``addon_monthly_cents``.\n``extra_connections`` appears when ``extra_connections_count > 0``."},"AddonCatalogItem":{"properties":{"addon_type":{"type":"string","title":"Addon Type"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"price_cents":{"type":"integer","title":"Price Cents"},"params_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params Schema"}},"type":"object","required":["addon_type","display_name","description","price_cents"],"title":"AddonCatalogItem","description":"One purchasable addon from the catalog."},"AddonCatalogResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"addons":{"items":{"$ref":"#/components/schemas/AddonCatalogItem"},"type":"array","title":"Addons"},"wallet_balance_cents":{"type":"integer","title":"Wallet Balance Cents"}},"type":"object","required":["service_id","addons","wallet_balance_cents"],"title":"AddonCatalogResponse","description":"Available addons for a given service."},"AddonPurchaseRequest":{"properties":{"addon_type":{"type":"string","title":"Addon Type"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"expected_price_cents":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Expected Price Cents","description":"Exact price guard: TOTAL charge for this addon+quantity in integer cents. Optional in schema for rolling-deploy compatibility with cached FE (missing → 409 PRICE_CONFIRMATION_REQUIRED, no charge); new cabinet/MCP always send the displayed total."}},"type":"object","required":["addon_type","idempotency_key"],"title":"AddonPurchaseRequest","description":"Purchase an addon for a service."},"AddonPurchaseResponse":{"properties":{"addon_id":{"type":"string","format":"uuid","title":"Addon Id"},"service_id":{"type":"string","format":"uuid","title":"Service Id"},"addon_type":{"type":"string","title":"Addon Type"},"status":{"type":"string","title":"Status"},"price_cents":{"type":"integer","title":"Price Cents"},"nominal_price_cents":{"type":"integer","title":"Nominal Price Cents","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["addon_id","service_id","addon_type","status","price_cents","created_at"],"title":"AddonPurchaseResponse","description":"Result of addon purchase."},"ApiKeyCreateRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"scopes":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Scopes","description":"Customer-channel scopes for this key"}},"additionalProperties":false,"type":"object","required":["name","scopes"],"title":"ApiKeyCreateRequest","description":"Create a new self-service API key."},"ApiKeyCreatedResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"last_used_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used Ip"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"api_key":{"type":"string","title":"Api Key","description":"Full secret key — shown ONCE, store it now"}},"type":"object","required":["id","name","key_prefix","scopes","is_active","created_at","api_key"],"title":"ApiKeyCreatedResponse","description":"Returned once on creation — includes the raw key (shown only here)."},"ApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"last_used_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used Ip"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","name","key_prefix","scopes","is_active","created_at"],"title":"ApiKeyResponse","description":"API-key metadata."},"CompositeAutoPlanRequestIn":{"properties":{"total_ip":{"type":"integer","maximum":1000000,"minimum":1,"title":"Total Ip","description":"Desired total IP count to distribute"},"product_kind":{"type":"string","title":"Product Kind","description":"Product kind discriminator (proxy_datacenter, proxy_isp, proxy_personal)","default":"proxy_datacenter"},"geo_source":{"type":"string","enum":["maxmind","ripe"],"title":"Geo Source","description":"Geo source for country lookups","default":"maxmind"},"excluded_countries":{"items":{"anyOf":[{"type":"integer"},{"type":"string"}]},"type":"array","title":"Excluded Countries","description":"Countries to exclude from the auto-mix: ISO 3166-1 alpha-2 codes or vitrine tag_ids"}},"additionalProperties":false,"type":"object","required":["total_ip"],"title":"CompositeAutoPlanRequestIn","description":"Wire form of the auto-plan request: ``excluded_countries`` accepts ISO-2."},"CompositeAutoPlanResponse":{"properties":{"snapshot_version":{"type":"string","format":"uuid","title":"Snapshot Version","description":"Vitrine snapshot version used"},"segments":{"items":{"$ref":"#/components/schemas/CompositeAutoPlanSegment"},"type":"array","title":"Segments","description":"Proposed per-country distribution, summing to total_ip"},"total_ip":{"type":"integer","title":"Total Ip","description":"Total IP count across all segments (echoes the request)"},"countries_used":{"type":"integer","title":"Countries Used","description":"Number of distinct countries in the plan"},"subnet_diversity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subnet Diversity","description":"Distinct /24 subnets backing the allocated pool, when countable. Only computable for proxy_isp (pool_ip.cidr24 is known there); for proxy_datacenter/proxy_personal the vitrine snapshot has no IP-address granularity (ipmgr ids only), so this is null and the UI hides the diversification visual rather than showing a fabricated number."}},"type":"object","required":["snapshot_version","total_ip","countries_used"],"title":"CompositeAutoPlanResponse","description":"Response for POST /billing/composite/auto-plan."},"CompositeAutoPlanSegment":{"properties":{"country":{"type":"integer","title":"Country","description":"Country tag_id (vitrine dimension)"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2 code of this country (e.g. 'DE'); null when the vitrine tag carries no ISO mapping."},"count":{"type":"integer","minimum":1,"title":"Count","description":"Number of IPs allocated to this country"}},"type":"object","required":["country","count"],"title":"CompositeAutoPlanSegment","description":"One country's share of the auto-distributed mix."},"CompositeOrderRequestIn":{"properties":{"product_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Product Id","description":"Product to use as template (kind/billing_model). Segments override the IP allocation. When None, the server resolves by product_kind (F1)."},"segments":{"items":{"$ref":"#/components/schemas/CompositeSegmentRequestIn"},"type":"array","minItems":1,"title":"Segments","description":"One or more segments forming the mix"},"product_kind":{"type":"string","title":"Product Kind","description":"Product kind discriminator (proxy_datacenter, proxy_isp, proxy_personal)","default":"proxy_datacenter"},"geo_multipliers":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Geo Multipliers","description":"Deprecated, must be null or {}: geo multipliers come from the tenant tariff only. A non-empty value is rejected with 422."},"period_months":{"type":"integer","title":"Period Months","description":"Billing period length in months (1/3/6/12). Drives the volume discount and is re-priced server-side. Default 1 = no discount.","default":1},"whitelist_ips":{"items":{"type":"string"},"type":"array","title":"Whitelist Ips","description":"IP/CIDR entries to whitelist at order time. Mandatory for proxy product kinds: a proxy composite order without at least one whitelist IP is rejected with 422 before any wallet charge."},"auto_renew":{"type":"boolean","title":"Auto Renew","description":"Auto-renew the resulting service on expiry. Default True — matches the non-composite ServiceCreateRequest default. Trial and WHMCS-mirrored services never go through this flag (they set is_auto_renew explicitly on the Service model instead).","default":true},"use_balance":{"type":"boolean","title":"Use Balance","description":"Spend from wallet balance first. Default OFF — all money via gateway.","default":false},"geo_source":{"type":"string","enum":["maxmind","ripe"],"title":"Geo Source","description":"Geo source for country lookups: maxmind (geolocation) or ripe (RIR allocation). Default maxmind.","default":"maxmind"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Idempotency Key","description":"Client purchase-intent key. A new key buys a new service even when an identical one exists; the same key replays the order it created (no second charge); the same key with a different order is rejected with 409 IDEMPOTENCY_KEY_REUSED. Without a key, an identical live order is returned instead of a new one."},"promo_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Promo Code","description":"Optional tenant-scoped promo code. Discount is applied before the service price snapshot is written; renewals never re-apply it."},"trial":{"type":"boolean","title":"Trial","description":": order as a paid probe. Sets Service.is_trial, expires_at=now+period_days, charge=daily×days×coefficient.","default":false},"extra_whitelist_count":{"type":"integer","maximum":10000,"minimum":0,"title":"Extra Whitelist Count","description":"Pre-purchase paid whitelist slots beyond free quota. Price is included in monthly_price_cents / charge.","default":0},"udp_unlock":{"type":"boolean","title":"Udp Unlock","description":"Pre-purchase UDP unlock. Price included in monthly_price_cents / charge.","default":false},"extra_connections_count":{"type":"integer","maximum":10000,"minimum":0,"title":"Extra Connections Count","description":"Pre-purchase paid extra concurrent connections. Price included in monthly_price_cents / charge.","default":0}},"additionalProperties":false,"type":"object","required":["segments"],"title":"CompositeOrderRequestIn","description":"Wire form of the order request: ``segments[].country`` accepts ISO-2.\n\nThe idempotency key is derived from the resolved ``int`` segments, so a\nretry with ``\"DE\"`` and a retry with the DE ``tag_id`` are the same order."},"CompositeOrderResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id","description":"Created service ID"},"status":{"type":"string","title":"Status","description":"Service status (active, pending, …)"},"segments":{"items":{"$ref":"#/components/schemas/CompositeSegmentQuote"},"type":"array","title":"Segments","description":"Per-segment breakdown as ordered"},"total_ip":{"type":"integer","title":"Total Ip"},"total_price_cents":{"type":"integer","title":"Total Price Cents","description":"Discounted total charged for the full period in integer cents"},"period_months":{"type":"integer","title":"Period Months","description":"Billing period length in months (1/3/6/12)","default":1},"discount_pct":{"type":"integer","title":"Discount Pct","description":"Applied period discount as a whole percentage (0/10/15/20)","default":0},"monthly_price_cents":{"type":"integer","title":"Monthly Price Cents","description":"Undiscounted monthly total (sum of segment prices) in integer cents","default":0},"balance_applied_cents":{"type":"integer","title":"Balance Applied Cents","description":"Amount covered by wallet balance in integer cents. Zero when use_balance=False.","default":0},"amount_due_cents":{"type":"integer","title":"Amount Due Cents","description":"Amount to pay via gateway in integer cents. Zero = fully covered by balance.","default":0},"invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Url"},"payment_required":{"type":"boolean","title":"Payment Required","default":false},"intent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Intent Id"},"promo_code_applied":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code Applied","description":"Normalised promo code applied at order time, if any (BL-4)."},"promo_discount_cents":{"type":"integer","minimum":0,"title":"Promo Discount Cents","description":"Absolute promo discount fixed into the price snapshot (cents).","default":0},"total_before_promo_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Before Promo Cents","description":"Pre-promo total when a promo was applied; null otherwise."},"trial":{"type":"boolean","title":"Trial","description":"True when the created service is a trial probe (is_trial).","default":false},"trial_period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Period Days","description":"Probe length in days when trial=True; null otherwise."},"addon_monthly_cents":{"type":"integer","minimum":0,"title":"Addon Monthly Cents","description":"Monthly cents from pre-purchase add-ons baked into the snapshot.","default":0}},"type":"object","required":["service_id","status","total_ip","total_price_cents"],"title":"CompositeOrderResponse","description":"Response for POST /billing/composite/order."},"CompositePricingInfoResponse":{"properties":{"volume_tiers":{"items":{"$ref":"#/components/schemas/VolumeTierConfig"},"type":"array","title":"Volume Tiers","description":"Resolved volume-discount ladder, ascending by min_ips"},"period_discounts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Period Discounts","description":"Period-months (string key) -> whole-percentage discount"},"min_ips_per_segment":{"type":"integer","minimum":1,"title":"Min Ips Per Segment","description":"Minimum IP count for a single segment to be accepted"},"min_ips_per_order":{"type":"integer","minimum":1,"title":"Min Ips Per Order","description":"Minimum total IP count (summed across segments) for an order"},"conn_cap_tiers":{"items":{"$ref":"#/components/schemas/ConnCapTierBreakpoint"},"type":"array","title":"Conn Cap Tiers","description":"Concurrent-connection cap ladder — lets the UI compute 'N concurrent connections included' live for any IP count without a round-trip."},"whitelist_free_quota":{"type":"integer","title":"Whitelist Free Quota","description":"Number of whitelist IPs included for free per service (app.services.billing.addon_catalog.EXTRA_WHITELIST_IP_FREE_QUOTA).","default":0},"extra_whitelist_ip_price_cents":{"type":"integer","title":"Extra Whitelist Ip Price Cents","description":"Cost per extra whitelist IP per month, in integer cents, beyond the free quota (app.services.billing.addon_catalog.EXTRA_WHITELIST_IP_PRICE_CENTS_PER_IP_PER_MONTH).","default":0},"free_refresh_days":{"type":"integer","title":"Free Refresh Days","description":"Number of days from service start during which an IP-list refresh is free (tenant-resolved EffectiveCompositePricingConfig.ip_refresh_free_interval_days).","default":0},"trial":{"$ref":"#/components/schemas/TrialSettings","description":"Per-dealer trial-probe knobs. Calculator uses enabled/period_days/tariff_coefficient to show or hide the probe checkbox and preview the short-period charge."}},"type":"object","required":["volume_tiers","period_discounts","min_ips_per_segment","min_ips_per_order"],"title":"CompositePricingInfoResponse","description":"Read-only, tenant-scoped pricing reference for the calculator UI.\n\nExposes the RESOLVED (tenant override merged over platform defaults —\nsee ``app.schemas.composite_config.resolve_effective_composite_config``)\nvolume-discount ladder, period discounts, and min-IP floors so the\ncalculator can display discount thresholds (\"volume discount from\nN IPs\") and give the customer an early, friendly heads-up on the\nminimum order/segment size — without waiting for a 422 from\n``/composite/quote`` or ``/composite/order``.\n\nContains no tenant PII — only the numeric pricing configuration that\nis already indirectly observable via quote responses. The backend\nquote/order validation remains the single source of truth; this\nendpoint is purely advisory for UI purposes."},"CompositeQuoteError":{"properties":{"provider":{"type":"integer","title":"Provider"},"country":{"type":"integer","title":"Country"},"message":{"type":"string","title":"Message"}},"type":"object","required":["provider","country","message"],"title":"CompositeQuoteError","description":"An error for a segment that is unavailable or invalid."},"CompositeQuoteRequestIn":{"properties":{"segments":{"items":{"$ref":"#/components/schemas/CompositeSegmentRequestIn"},"type":"array","minItems":1,"title":"Segments","description":"One or more segments forming the mix"},"product_kind":{"type":"string","title":"Product Kind","description":"Product kind discriminator (proxy_datacenter, proxy_isp, proxy_personal)","default":"proxy_datacenter"},"geo_multipliers":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Geo Multipliers","description":"Deprecated, must be null or {}: geo multipliers come from the tenant tariff only. A non-empty value is rejected with 422."},"period_months":{"type":"integer","title":"Period Months","description":"Billing period length in months (1/3/6/12). Drives the volume discount. Default 1 = no discount.","default":1},"geo_source":{"type":"string","enum":["maxmind","ripe"],"title":"Geo Source","description":"Geo source for country lookups: maxmind (geolocation) or ripe (RIR allocation). Default maxmind.","default":"maxmind"},"promo_code":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Promo Code","description":"Optional tenant-scoped promo code. Applied after volume/period pricing; quote validates global rules only (active/window/max_uses)."},"trial":{"type":"boolean","title":"Trial","description":": price as a paid probe instead of a full period_months charge.","default":false},"extra_whitelist_count":{"type":"integer","maximum":10000,"minimum":0,"title":"Extra Whitelist Count","description":"Pre-purchase paid whitelist slots beyond the free quota. Included in monthly_price_cents before order.","default":0},"udp_unlock":{"type":"boolean","title":"Udp Unlock","description":"Pre-purchase UDP unlock add-on (percent-of-base). Included in monthly_price_cents before order.","default":false},"extra_connections_count":{"type":"integer","maximum":10000,"minimum":0,"title":"Extra Connections Count","description":"Pre-purchase paid extra concurrent connections. Included in monthly_price_cents before order.","default":0}},"additionalProperties":false,"type":"object","required":["segments"],"title":"CompositeQuoteRequestIn","description":"Wire form of the quote request: ``segments[].country`` accepts ISO-2."},"CompositeQuoteResponse":{"properties":{"snapshot_version":{"type":"string","format":"uuid","title":"Snapshot Version","description":"Vitrine snapshot version used"},"built_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Built At","description":"UTC timestamp when the snapshot was built (for freshness display)"},"binding":{"type":"boolean","title":"Binding","description":"Always false — quotation is non-binding","default":false},"segments":{"items":{"$ref":"#/components/schemas/CompositeSegmentQuote"},"type":"array","title":"Segments","description":"Per-segment pricing breakdown"},"errors":{"items":{"$ref":"#/components/schemas/CompositeQuoteError"},"type":"array","title":"Errors","description":"Errors for unavailable/invalid segments"},"total_ip":{"type":"integer","title":"Total Ip","description":"Total IP count across all valid segments","default":0},"total_price_cents":{"type":"integer","title":"Total Price Cents","description":"Discounted total charged for the full period in integer cents. Equals monthly_price_cents x period_months x (1 - discount).","default":0},"unit_base_cents":{"type":"integer","title":"Unit Base Cents","description":"Volume-tier base unit price applied (cents per IP)","default":0},"period_months":{"type":"integer","title":"Period Months","description":"Billing period length in months (1/3/6/12)","default":1},"discount_pct":{"type":"integer","title":"Discount Pct","description":"PERIOD discount only, as a whole percentage. Does NOT include the volume discount; see volume_discount_pct for that.","default":0},"volume_discount_pct":{"type":"integer","title":"Volume Discount Pct","description":"VOLUME discount only: the resolved volume tier's price vs. the base (lowest-count) tier's price, as a whole percentage. Purely for display — the actual charge always derives from the resolved tier's price_millicents_per_ip, independent of this field. Does NOT include the period discount; see discount_pct for that. The two discounts are independent and both apply to total_price_cents.","default":0},"monthly_price_cents":{"type":"integer","title":"Monthly Price Cents","description":"Undiscounted monthly total (sum of segment prices) in integer cents","default":0},"retail_total_price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Total Price Cents","description":"Pre-partner retail total for the full period in integer cents. Set only when an ACTIVE partner percent discount was applied; null for anonymous / non-partner quotes."},"retail_monthly_price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retail Monthly Price Cents","description":"Pre-partner retail monthly total in integer cents. Null when no partner discount applied."},"partner_discount_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Partner Discount Percent","description":"ACTIVE partner wholesale_discount_percent applied to this quote (1..100). Null when no partner discount."},"partner_discount_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Partner Discount Cents","description":"Absolute partner savings on the period total in integer cents (retail_total − total_price_cents, before promo). Null when no partner discount."},"promo_code_applied":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promo Code Applied","description":"Normalised (upper-case) promo code applied to this quote, if any."},"promo_discount_cents":{"type":"integer","minimum":0,"title":"Promo Discount Cents","description":"Absolute promo discount in integer cents applied to total_price_cents.","default":0},"total_before_promo_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Before Promo Cents","description":"Pre-promo total in integer cents when a promo was applied; null when no promo."},"trial":{"type":"boolean","title":"Trial","description":"True when this quote was priced as a trial probe.","default":false},"trial_period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Period Days","description":"Probe length in days when trial=True; null otherwise."},"trial_coefficient":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Trial Coefficient","description":"Tariff coefficient applied when trial=True; null otherwise."},"addon_monthly_cents":{"type":"integer","minimum":0,"title":"Addon Monthly Cents","description":"Monthly cents from pre-purchase add-ons (whitelist + UDP + connections).","default":0},"addon_breakdown":{"items":{"$ref":"#/components/schemas/AddonBreakdownItem"},"type":"array","title":"Addon Breakdown","description":"Per-addon monthly line-items. Sum of monthly_cents equals addon_monthly_cents."},"trial_price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Price Cents","description":"Probe charge in integer cents when trial=True (equals total_price_cents before promo). Null when trial=False."},"extra_whitelist_count":{"type":"integer","minimum":0,"title":"Extra Whitelist Count","description":"Paid whitelist slots included in this quote.","default":0},"extra_connections_count":{"type":"integer","minimum":0,"title":"Extra Connections Count","description":"Pre-purchase extra concurrent connections included in this quote.","default":0},"udp_unlock":{"type":"boolean","title":"Udp Unlock","description":"Whether UDP unlock was included in this quote.","default":false}},"type":"object","required":["snapshot_version"],"title":"CompositeQuoteResponse","description":"Response for POST /billing/composite/quote."},"CompositeSegmentQuote":{"properties":{"provider":{"type":"integer","title":"Provider"},"country":{"type":"integer","title":"Country"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2 code of this segment's country (e.g. 'DE'); null when the vitrine tag carries no ISO mapping."},"count":{"type":"integer","title":"Count"},"unit_base_cents":{"type":"integer","title":"Unit Base Cents","description":"Volume-tier base unit price in integer cents per IP"},"type_multiplier":{"type":"number","title":"Type Multiplier","description":"Type multiplier (1.0 datacenter, 2.5 ISP)"},"geo_multiplier":{"type":"number","title":"Geo Multiplier","description":"Geo multiplier for this country (default 1.0)"},"segment_price_cents":{"type":"integer","title":"Segment Price Cents","description":"count * unit_base * type_mult * geo_mult, ceiled to integer cents"},"available":{"type":"boolean","title":"Available","description":"Whether this segment is available in the vitrine"}},"type":"object","required":["provider","country","count","unit_base_cents","type_multiplier","geo_multiplier","segment_price_cents","available"],"title":"CompositeSegmentQuote","description":"Pricing breakdown for one segment."},"CompositeSegmentRequestIn":{"properties":{"provider":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Provider","description":"Provider resource_id (vitrine dimension). Deprecated (F2): use order-level geo_source instead."},"country":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Country","description":"Country: ISO 3166-1 alpha-2 code (\"DE\", \"GB\"; UK→GB) or vitrine tag_id from /billing/catalog/facets. ISO code is the recommended form."},"count":{"type":"integer","maximum":100000,"minimum":1,"title":"Count","description":"Number of IPs for this segment (1–100000)"}},"additionalProperties":false,"type":"object","required":["country","count"],"title":"CompositeSegmentRequestIn","description":"Wire form of a segment: ``country`` also accepts an ISO-2 code.\n\nResolved to the strict ``int`` tag_id at the API boundary\n(``app.services.country_ref``) before any pricing runs."},"ConnCapTierBreakpoint":{"properties":{"min_ips":{"type":"integer","minimum":0,"title":"Min Ips","description":"Inclusive lower bound of this bucket's IP range"},"max_ips":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Ips","description":"Exclusive upper bound; null = no upper bound (last bucket)"},"flat_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flat Cap","description":"Flat connection cap for this bucket"},"multiplier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Multiplier","description":"Per-IP connection multiplier for this bucket"}},"type":"object","required":["min_ips"],"title":"ConnCapTierBreakpoint","description":"One bucket of the concurrent-connection cap ladder.\n\nMirrors ``app.services.billing.addon_catalog.calculate_conn_tier_cap``\nexactly (see ``addon_catalog.conn_cap_tier_breakpoints`` — the single\nsource of truth for both). Exactly one of ``flat_cap``/``multiplier``\nis set per bucket:\n\n- ``flat_cap`` set → the cap is this fixed number regardless of IP count.\n- ``multiplier`` set → the cap is ``ip_count * multiplier`` for any\n IP count in ``[min_ips, max_ips)``."},"CountriesResponse":{"properties":{"geo_source":{"type":"string","title":"Geo Source","description":"Geo source the country list is scoped to (maxmind/ripe)"},"product_kind":{"type":"string","title":"Product Kind","description":"Product kind the availability counts are computed for"},"countries":{"items":{"$ref":"#/components/schemas/CountryRef"},"type":"array","title":"Countries","description":"Available countries, most stock first"}},"type":"object","required":["geo_source","product_kind"],"title":"CountriesResponse","description":"Response for GET /billing/countries."},"CountryRef":{"properties":{"code":{"type":"string","title":"Code","description":"ISO 3166-1 alpha-2 code (e.g. 'DE', 'GB')"},"name":{"type":"string","title":"Name","description":"Country name (e.g. 'Germany')"},"tag_id":{"type":"integer","title":"Tag Id","description":"Vitrine country tag_id accepted in segments[].country"},"available":{"type":"integer","title":"Available","description":"IPs currently available in this country"}},"type":"object","required":["code","name","tag_id","available"],"title":"CountryRef","description":"One country available in the vitrine: ISO code ↔ tag_id ↔ stock."},"CustomerProfile":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"is_verified":{"type":"boolean","title":"Is Verified"},"kyc_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kyc Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"locale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Locale"},"has_password":{"type":"boolean","title":"Has Password","default":true},"oauth_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oauth Provider"},"account_type":{"type":"string","title":"Account Type","default":"personal"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"address_line1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line1"},"address_line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Line2"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Id"},"whmcs_client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Whmcs Client Id"},"billing_authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Authority"},"bank_transfer_allowed":{"type":"boolean","title":"Bank Transfer Allowed","default":false},"partner_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner Status"}},"type":"object","required":["id","email","name","phone","is_verified","kyc_status","created_at"],"title":"CustomerProfile","description":"Public customer profile for the cabinet."},"CustomerRefreshIpsRequest":{"properties":{"idempotency_key":{"type":"string","title":"Idempotency Key","description":"Unique key for this refresh intent; retries with the same key return the original result and never charge twice."},"target_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Ips","description":"Specific currently-allocated IPs to replace. Omit to refresh the entire allocation."},"partial":{"type":"boolean","title":"Partial","description":"Replace only as many IPs as the pool actually has (per country min(held, available)) and keep the rest. The server builds the plan; cannot be combined with target_ips. Same price as a plain refresh; 409 no_available_ips when nothing can be replaced.","default":false}},"type":"object","required":["idempotency_key"],"title":"CustomerRefreshIpsRequest","description":"Request body for refreshing (rotating) the IPs of a proxy service."},"CustomerRefreshQuoteRequest":{"properties":{"target_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Target Ips","description":"Specific currently-allocated IPs the refresh would replace."},"geo_counts":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Geo Counts","description":"Desired geography of the replaced IPs: {ISO-2: count}. Required unless partial=true."},"geo_source":{"anyOf":[{"type":"string","enum":["maxmind","ripe"]},{"type":"null"}],"title":"Geo Source","description":"Preview under this geo source instead of the service's own."},"partial":{"type":"boolean","title":"Partial","description":"Preview the server-planned 'replace what is available' refresh: replaced_count, kept_count, planned_geo_counts and the per-country held/available stock. Read-only.","default":false}},"type":"object","title":"CustomerRefreshQuoteRequest","description":"Body for the read-only refresh preview (``…/proxy/refresh/quote``)."},"DepositInitRequest":{"properties":{"gateway":{"type":"string","maxLength":64,"minLength":1,"title":"Gateway","description":"Payment gateway: stripe | heleket | freekassa | onepayment"},"amount_cents":{"type":"integer","exclusiveMinimum":0,"title":"Amount Cents","description":"Amount in integer cents"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Idempotency Key","description":"Optional client-supplied idempotency key"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"order_metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Order Metadata","description":"Order metadata for order-via-gateway flow"},"return_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Return Url","description":"Relative path to redirect user to after cancelled/failed payment (e.g. /wallet). Must start with '/' and not contain '://'. Server prepends scheme+host. Prevents open-redirect."},"success_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Success Url","description":"Relative path to redirect user to after successful payment (e.g. /wallet?payment=success). Same restrictions as return_url."},"save_card":{"type":"boolean","title":"Save Card","description":"Save the card for off-session charges and enable auto-top-up (Stripe only; 422 for other gateways).","default":false},"pay_currency":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Pay Currency","description":"Crypto ticker for the invoice (NOWPayments only; the network is encoded in the ticker, e.g. usdttrc20). Required for a new NOWPayments invoice; rejected for every other gateway."}},"additionalProperties":false,"type":"object","required":["gateway","amount_cents"],"title":"DepositInitRequest","description":"Initiate a top-up deposit."},"DepositInitResponse":{"properties":{"payment_url":{"type":"string","title":"Payment Url"},"our_order_id":{"type":"string","title":"Our Order Id"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency","default":"USD"},"provider_tx_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Tx Id"},"checkout_kind":{"type":"string","title":"Checkout Kind","default":"redirect"},"pay_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Address"},"pay_amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Amount"},"pay_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pay Currency"},"payin_extra_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payin Extra Id"},"payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Id"},"allowed_payment_methods":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Payment Methods","description":"When set, the Paddle.js overlay must restrict payment methods to these (e.g. ['card']) — the newcomer PayPal limit has no headroom for this amount. Null = no restriction."},"paypal_remaining_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Paypal Remaining Cents","description":"PayPal headroom left for an immature account, in cents (limit minus already-paid gross PayPal). Null = unrestricted / not a Paddle deposit."}},"type":"object","required":["payment_url","our_order_id","amount_cents"],"title":"DepositInitResponse","description":"Deposit initiation result with payment URL (or overlay transaction id).\n\n``checkout_kind`` tells the SPA how to collect the payment:\n- ``\"redirect\"`` (default) — open ``payment_url`` via a top-level redirect.\n- ``\"paddle_js\"`` — ``payment_url`` is empty; open the Paddle.js overlay\n with ``Paddle.Checkout.open({transactionId: provider_tx_id})``. This is\n the only valid Paddle path (PADDLE-CHECKOUT-URL-NO-PADDLEJS-1)."},"DisableAddonResponse":{"properties":{"addon_id":{"type":"string","format":"uuid","title":"Addon Id"},"service_id":{"type":"string","format":"uuid","title":"Service Id"},"addon_type":{"type":"string","title":"Addon Type"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"refund_cents":{"type":"integer","title":"Refund Cents","description":"Prorated refund credited to the wallet for the unused portion of the current billing period (0 when nothing was refunded).","default":0}},"type":"object","required":["addon_id","service_id","addon_type","status","message"],"title":"DisableAddonResponse","description":"Result of disabling (cancelling) an addon."},"FacetGroup":{"properties":{"dimension":{"type":"string","enum":["provider","country","segment","geo_source"],"title":"Dimension","description":"Dimension key"},"selected":{"items":{"type":"integer"},"type":"array","title":"Selected","description":"Currently selected value IDs for this dimension"},"values":{"items":{"$ref":"#/components/schemas/FacetValue"},"type":"array","title":"Values","description":"Available facet values with counts"}},"type":"object","required":["dimension"],"title":"FacetGroup","description":"All values for one dimension, plus the currently selected values."},"FacetValue":{"properties":{"id":{"type":"integer","title":"Id","description":"Provider resource_id or tag_id"},"label":{"type":"string","title":"Label","description":"Human-readable label (e.g. 'MaxMind', 'Germany (DE)')"},"count":{"type":"integer","title":"Count","description":"Total IPs tagged with this value in the snapshot"},"available":{"type":"integer","title":"Available","description":"Remaining IP count if this value is added to the current selection"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Machine-readable code for this value. For the ``country`` dimension this is the ISO 3166-1 alpha-2 code (e.g. 'DE', 'GB'); null for other dimensions."}},"type":"object","required":["id","label","count","available"],"title":"FacetValue","description":"A single value within a dimension facet."},"FacetsResponse":{"properties":{"snapshot_version":{"type":"string","format":"uuid","title":"Snapshot Version","description":"Current snapshot version ID"},"built_at":{"type":"string","format":"date-time","title":"Built At","description":"UTC timestamp when the snapshot was built"},"available_ip_count":{"type":"integer","title":"Available Ip Count","description":"Number of IPs matching the current selection"},"facets":{"additionalProperties":{"$ref":"#/components/schemas/FacetGroup"},"type":"object","title":"Facets","description":"Facet groups keyed by dimension (provider, country, segment)"}},"type":"object","required":["snapshot_version","built_at","available_ip_count"],"title":"FacetsResponse","description":"Response for GET /catalog/facets."},"FormatHints":{"properties":{"host_port":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Host Port"},"auth_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Url"}},"type":"object","title":"FormatHints","description":"Display hints for proxy IP list rendering."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LedgerEntryListResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/LedgerEntryResponse"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","required":["entries","total"],"title":"LedgerEntryListResponse","description":"Paginated list of ledger entries."},"LedgerEntryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"wallet_id":{"type":"string","format":"uuid","title":"Wallet Id"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"provider_tx_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Tx Id"},"amount_cents":{"type":"integer","title":"Amount Cents","description":"Amount in integer cents"},"balance_after_cents":{"type":"integer","title":"Balance After Cents","description":"Running balance after this entry"},"entry_type":{"type":"string","title":"Entry Type"},"status":{"type":"string","title":"Status"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"usage_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Requests"},"usage_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"auto_topup":{"type":"boolean","title":"Auto Topup","description":"True when this credit came from the auto top-up worker charging a saved card (Payment.raw_data.source='auto_topup'|'auto_topup_renewal'), so the cabinet can label it instead of showing a plain top-up.","default":false}},"type":"object","required":["id","wallet_id","idempotency_key","provider","provider_tx_id","amount_cents","balance_after_cents","entry_type","status","description","service_id","usage_requests","usage_bytes","created_at"],"title":"LedgerEntryResponse","description":"Single append-only ledger entry."},"MeResponse":{"properties":{"customer":{"$ref":"#/components/schemas/CustomerProfile"},"tenant_code":{"type":"string","title":"Tenant Code"},"tenant_name":{"type":"string","title":"Tenant Name"}},"type":"object","required":["customer","tenant_code","tenant_name"],"title":"MeResponse","description":"Full profile of the currently authenticated customer."},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse","description":"Generic message response (logout, password-reset success, etc.)."},"NowPaymentsCoinItem":{"properties":{"code":{"type":"string","title":"Code","description":"Exact pay_currency ticker; the network is part of the code (usdttrc20)."}},"additionalProperties":false,"type":"object","required":["code"],"title":"NowPaymentsCoinItem","description":"One selectable crypto coin/network."},"NowPaymentsCoinsResponse":{"properties":{"coins":{"items":{"$ref":"#/components/schemas/NowPaymentsCoinItem"},"type":"array","title":"Coins"}},"additionalProperties":false,"type":"object","required":["coins"],"title":"NowPaymentsCoinsResponse","description":"Native intake catalog — only tickers enabled by the static policy."},"NowPaymentsQuoteResponse":{"properties":{"pay_currency":{"type":"string","title":"Pay Currency"},"pay_amount":{"type":"string","title":"Pay Amount"},"price_amount":{"type":"string","title":"Price Amount"},"minimum_usd":{"type":"string","title":"Minimum Usd"},"minimum_met":{"type":"boolean","title":"Minimum Met"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"additionalProperties":false,"type":"object","required":["pay_currency","pay_amount","price_amount","minimum_usd","minimum_met"],"title":"NowPaymentsQuoteResponse","description":"Read-only NOWPayments quote for one ticker.\n\nAdvisory only: no Payment is created and the quote never credits money.\n``pay_amount``/``price_amount``/``minimum_usd`` are decimal strings.\n``expires_at`` is reserved and always null (the provider returns no TTL)."},"ProductListResponse":{"properties":{"products":{"items":{"$ref":"#/components/schemas/ProductResponse"},"type":"array","title":"Products"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":50},"price_book_kind":{"type":"string","enum":["retail","wholesale"],"title":"Price Book Kind","default":"retail"}},"type":"object","required":["products","total"],"title":"ProductListResponse","description":"Paginated product list."},"ProductParams":{"properties":{"ip_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ip Count"},"geo":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Geo"},"protocol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protocol"},"rate_limit_rps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Rps"},"sticky":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sticky"},"data_limit_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Data Limit Bytes","description":"Byte quota (VPN or rotating metered_bandwidth packages)"},"traffic_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Traffic Gb","description":"Commercial GB for rotating traffic packages (→ data_limit_bytes)"},"pool_class":{"anyOf":[{"type":"string","enum":["datacenter","isp"]},{"type":"null"}],"title":"Pool Class","description":"Rotating fleet class for proxy_rotating"},"devices":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Devices"},"period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period Days"},"request_package_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Package Size","description":"Prepaid request count for proxy_rotating (e.g. 100000, 1000000)"}},"type":"object","title":"ProductParams","description":"Product configuration parameters — varies by ProductKind.\n\nExamples:\n- proxy_datacenter: ip_count, geo[], protocol, period_days\n- proxy_rotating: request_package_size **or** traffic_gb/data_limit_bytes,\n pool_class (datacenter|isp), rate_limit_rps, sticky, period_days\n- vpn: data_limit_bytes, devices, geo[], period_days"},"ProductResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"kind":{"type":"string","title":"Kind"},"billing_model":{"type":"string","title":"Billing Model"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"params":{"anyOf":[{"$ref":"#/components/schemas/ProductParams"},{"type":"null"}]},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents","description":"Resolved retail price in cents; null if none"},"price_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Unit"},"price_book_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Price Book Id","description":"ID of the PriceBook the price was resolved from"},"lago_plan_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lago Plan Code","description":"Lago plan code for subscription mapping"},"is_active":{"type":"boolean","title":"Is Active"},"features":{"items":{"type":"string"},"type":"array","title":"Features","description":"Product features extracted from WHMCS description"}},"type":"object","required":["id","tenant_id","kind","billing_model","name","description","params","is_active"],"title":"ProductResponse","description":"Product as seen in the catalogue."},"ProfileUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Phone"}},"additionalProperties":false,"type":"object","title":"ProfileUpdateRequest","description":"Update editable profile fields."},"ProxyAuthResponse":{"properties":{"username":{"type":"string","title":"Username"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password"},"protocols":{"items":{"type":"string"},"type":"array","title":"Protocols"},"endpoints":{"items":{"$ref":"#/components/schemas/ProxyEndpoint"},"type":"array","title":"Endpoints"},"whitelist_ips":{"items":{"type":"string"},"type":"array","title":"Whitelist Ips"},"password_set":{"type":"boolean","title":"Password Set","default":false},"udp_enabled":{"type":"boolean","title":"Udp Enabled","default":false},"conn_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Conn Cap"},"whitelist_conn_limits":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Whitelist Conn Limits"},"rotating_gateway":{"anyOf":[{"$ref":"#/components/schemas/RotatingGatewayInfo"},{"type":"null"}]}},"type":"object","required":["username"],"title":"ProxyAuthResponse","description":"Current proxy auth status."},"ProxyAuthUpdateRequest":{"properties":{"rotate_password":{"type":"boolean","title":"Rotate Password","default":false},"udp_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Udp Enabled"},"new_username":{"anyOf":[{"type":"string","maxLength":32,"minLength":3,"pattern":"^[a-zA-Z0-9_.-]+$"},{"type":"null"}],"title":"New Username","description":"Change the proxy login. Must be unique within the tenant."},"whitelist_ips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Whitelist Ips","deprecated":true}},"additionalProperties":false,"type":"object","title":"ProxyAuthUpdateRequest","description":"Update proxy authorisation (rotate password, UDP toggle).: auth_mode removed (always userpass + whitelist together).\nWhitelist is managed via separate /whitelist/add|remove endpoints."},"ProxyEndpoint":{"properties":{"protocol":{"type":"string","title":"Protocol"},"label":{"type":"string","title":"Label"},"scheme":{"type":"string","title":"Scheme"},"port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port"},"port_whitelist":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Port Whitelist"},"http2":{"type":"boolean","title":"Http2","default":false},"udp":{"type":"boolean","title":"Udp","default":false},"noauth_only":{"type":"boolean","title":"Noauth Only","default":false},"hostname_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname Template"}},"type":"object","required":["protocol","label","scheme"],"title":"ProxyEndpoint","description":"A client-facing connection endpoint for one protocol.\n\nEach shared-proxy IP exposes the full set; ``port`` is the\nlogin/password auth listener and ``port_whitelist`` is the\nIP-whitelist (noauth) listener.\n\n``noauth_only=True`` endpoints (SOCKS4:1087, HTTP/2:993) have no\nlogin/password port (``port=None``); they exist solely for whitelisted\nIPs.\n\n``hostname_template`` (HTTPS only) — cabinet substitutes ``{ip_dashed}``\n(dots → hyphens) so TLS SNI matches the fleet wildcard cert; socks5/http\nkeep ``None`` and use the bare IP."},"ProxyIpEntry":{"properties":{"ip":{"type":"string","title":"Ip","description":"IPv4 or IPv6 address"},"port":{"anyOf":[{"type":"integer","maximum":65535,"minimum":1},{"type":"null"}],"title":"Port"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"site":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Site","description":"Physical site (datacenter) code, e.g. `ams-1`. Stable public identifier; absent when unknown."}},"type":"object","required":["ip"],"title":"ProxyIpEntry","description":"A single proxy IP in a service."},"ProxyIpListResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"ips":{"items":{"$ref":"#/components/schemas/ProxyIpEntry"},"type":"array","title":"Ips"},"format_hints":{"anyOf":[{"$ref":"#/components/schemas/FormatHints"},{"type":"null"}]},"geo_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Geo Source"}},"type":"object","required":["service_id","ips"],"title":"ProxyIpListResponse","description":"List of proxy IPs for a service."},"ProxyUsageResponse":{"properties":{"connections":{"type":"integer","title":"Connections","default":0},"bytes_used":{"type":"integer","title":"Bytes Used","default":0},"window":{"$ref":"#/components/schemas/ProxyUsageWindow"}},"type":"object","required":["window"],"title":"ProxyUsageResponse","description":"Usage stats for a proxy service."},"ProxyUsageWindow":{"properties":{"start":{"type":"string","format":"date-time","title":"Start"},"end":{"type":"string","format":"date-time","title":"End"}},"type":"object","required":["start","end"],"title":"ProxyUsageWindow","description":"Time window for usage stats."},"ReallocateCountryAvailability":{"properties":{"requested":{"type":"integer","title":"Requested"},"available":{"type":"integer","title":"Available"},"held":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Held"}},"type":"object","required":["requested","available"],"title":"ReallocateCountryAvailability","description":"Per-country stock check for a geo-targeted refresh preview."},"ReallocateQuoteResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"geo_source":{"type":"string","title":"Geo Source"},"replaced_count":{"type":"integer","title":"Replaced Count"},"price_cents":{"type":"integer","title":"Price Cents"},"is_free":{"type":"boolean","title":"Is Free"},"availability":{"additionalProperties":{"$ref":"#/components/schemas/ReallocateCountryAvailability"},"type":"object","title":"Availability"},"shortfall":{"type":"boolean","title":"Shortfall"},"partial":{"type":"boolean","title":"Partial","default":false},"kept_count":{"type":"integer","title":"Kept Count","default":0},"planned_geo_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Planned Geo Counts"}},"type":"object","required":["service_id","geo_source","replaced_count","price_cents","is_free","availability","shortfall"],"title":"ReallocateQuoteResponse","description":"Non-binding preview of a geo-targeted refresh. No charge, no write."},"ReallocationResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"ip_count":{"type":"integer","title":"Ip Count"},"charged_cents":{"type":"integer","title":"Charged Cents"},"ledger_entry_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ledger Entry Id"},"new_ips":{"items":{"type":"string"},"type":"array","title":"New Ips"},"alive_replaced":{"type":"integer","title":"Alive Replaced","default":0},"kept_count":{"type":"integer","title":"Kept Count","default":0},"partial":{"type":"boolean","title":"Partial","default":false}},"type":"object","required":["service_id","ip_count","charged_cents","ledger_entry_id"],"title":"ReallocationResponse","description":"Result of a successful IP reallocation."},"ReallocationStatusResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"is_free":{"type":"boolean","title":"Is Free"},"free_window_days":{"type":"integer","title":"Free Window Days"},"days_since_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Since Start"},"next_free_refresh_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Free Refresh At"},"price_cents":{"type":"integer","title":"Price Cents"},"is_pool_service":{"type":"boolean","title":"Is Pool Service"},"dedicated":{"type":"boolean","title":"Dedicated","default":false}},"type":"object","required":["service_id","is_free","free_window_days","days_since_start","price_cents","is_pool_service"],"title":"ReallocationStatusResponse","description":"Status of the next IP reallocation for a service."},"RotatingConfigResponse":{"properties":{"endpoint":{"type":"string","title":"Endpoint"},"endpoints":{"items":{"type":"string"},"type":"array","title":"Endpoints"},"https_endpoints":{"items":{"type":"string"},"type":"array","title":"Https Endpoints"},"port":{"type":"integer","title":"Port"},"http_ports":{"items":{"type":"integer"},"type":"array","title":"Http Ports"},"socks_ports":{"items":{"type":"integer"},"type":"array","title":"Socks Ports"},"sticky_http":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sticky Http"},"sticky_socks5":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sticky Socks5"},"sticky_https":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sticky Https"},"session_format":{"type":"string","title":"Session Format","default":"ip:port:username:password"},"mode":{"type":"string","title":"Mode","default":"rotating"},"sample_connection_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sample Connection String"},"sample_connection_strings":{"items":{"type":"string"},"type":"array","title":"Sample Connection Strings"}},"type":"object","required":["endpoint","port"],"title":"RotatingConfigResponse","description":"Configuration for a rotating/backconnect proxy service.\n\n``endpoint`` / ``port`` remain the primary (first entry host + first HTTP\nport) for legacy clients. Plural host lists plus pool-aware port fields\nlet MCP/cabinet reconstruct every HTTP/SOCKS/HTTPS variant without\ntreating CSV as one DNS name."},"RotatingGatewayInfo":{"properties":{"entry_hosts":{"items":{"type":"string"},"type":"array","title":"Entry Hosts"},"https_hosts":{"items":{"type":"string"},"type":"array","title":"Https Hosts"},"sticky_hosts":{"items":{"type":"string"},"type":"array","title":"Sticky Hosts"},"entry_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Host"},"https_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Https Host"},"http_ports":{"items":{"type":"integer"},"type":"array","title":"Http Ports"},"socks_ports":{"items":{"type":"integer"},"type":"array","title":"Socks Ports"},"sticky_http":{"type":"integer","title":"Sticky Http","default":5080},"sticky_socks5":{"type":"integer","title":"Sticky Socks5","default":4080},"sticky_https":{"type":"integer","title":"Sticky Https","default":4443}},"type":"object","title":"RotatingGatewayInfo","description":"Per-tenant rotating entry surface for the cabinet.\n\nPopulated only for rotating services. Hosts and ports are selected by the\nservice ``pool_class`` (DC top-level gateway vs nested ``isp``).\nAuthoritative fields are the plural lists; singular ``entry_host`` /\n``https_host`` are documented primaries (first normalized host) for\nlegacy consumers. Empty lists / null singular when the matching gateway\nblock is missing — frontend must show a placeholder, never invent a host\nor fall back across pool classes."},"ServiceCreateRequest":{"properties":{"product_id":{"type":"string","format":"uuid","title":"Product Id"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params","description":"Order parameters. Only whitelist_ips, billing_period_months (1/3/6/12/24/36) and client_idempotency_key are accepted; any other key → 422 before any wallet debit."},"auto_renew":{"type":"boolean","title":"Auto Renew","default":true},"expected_price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Price Cents","description":"Authoritative price confirmation in integer cents. Required for billing-only products: mismatch or omission → 409 before any wallet debit. Ignored for other product kinds."}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"ServiceCreateRequest","description":"Purchase a new service."},"ServiceCreateResponse":{"properties":{"service":{"$ref":"#/components/schemas/ServiceResponse"},"invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Url"}},"type":"object","required":["service"],"title":"ServiceCreateResponse","description":"Result of service creation."},"ServiceListResponse":{"properties":{"services":{"items":{"$ref":"#/components/schemas/ServiceResponse"},"type":"array","title":"Services"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","required":["services","total"],"title":"ServiceListResponse","description":"Paginated service list."},"ServiceRenewRequest":{"properties":{"period_count":{"type":"integer","maximum":12,"minimum":1,"title":"Period Count","default":1},"period_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Period Months","description":"Preferred renewal term in months (1/3/6/12). When set, overrides period_count and applies the period-discount grid."},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Idempotency Key","description":"Caller-supplied idempotency key. Retries with the same key never double-charge. Also accepted via Idempotency-Key header. When omitted, a deprecated server key from (service, expires_at) is used."}},"additionalProperties":false,"type":"object","title":"ServiceRenewRequest","description":"Renew a service for another billing period.\n\nPrefer ``period_months`` (1/3/6/12) for cabinet renewals — that path\napplies the standard period-discount grid to the snapshot monthly\nprice. Legacy ``period_count`` multiplies the\nservice's current one-period charge without re-selecting a term."},"ServiceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"owner_type":{"type":"string","title":"Owner Type"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"tenant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Tenant Id"},"product_id":{"type":"string","format":"uuid","title":"Product Id"},"product_name":{"type":"string","title":"Product Name","default":""},"product_kind":{"type":"string","title":"Product Kind","default":""},"product_display_name":{"type":"string","title":"Product Display Name","default":""},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"status":{"type":"string","title":"Status"},"provisioner":{"type":"string","title":"Provisioner"},"ext_dealer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Dealer Id"},"ext_service_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Service Id"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"grace_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Grace Until"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"},"usage_requests_cur":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Requests Cur"},"usage_bytes_cur":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Bytes Cur"},"is_trial":{"type":"boolean","title":"Is Trial","default":false},"is_auto_renew":{"type":"boolean","title":"Is Auto Renew"},"is_staff_test":{"type":"boolean","title":"Is Staff Test","default":false},"is_staff_conv_test":{"type":"boolean","title":"Is Staff Conv Test","default":false},"customer_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price Cents"},"price_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Unit"},"active_addon_types":{"items":{"type":"string"},"type":"array","title":"Active Addon Types"},"billing_authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Authority","description":"Owning customer's billing authority ('finebilling' | 'whmcs'), read-only. WHMCS mirrors must not expose money actions in the cabinet (VER-WHM-1). None when not resolved (e.g. some admin paths)."},"renewal_price_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Price Cents","description":"Forecast charge at the next auto-renewal (base price + active add-ons), same resolution as the real renewal charge. None when not applicable (see renewal_coverage)."},"renewal_coverage":{"type":"string","title":"Renewal Coverage","description":"Renewal-coverage forecast, one of: 'covered_by_balance' (wallet balance already covers it), 'covered_by_card' (balance is short but renewal-aware auto top-up will charge the saved card before the due date), 'not_covered' (balance is short and nothing will auto-fix it), 'not_applicable' (not an active auto-renew period service, or the customer owner / price could not be resolved).","default":"not_applicable"},"suspend_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suspend Reason","description":"(additive): why a SUSPENDED service is suspended — 'quota_exhausted' | 'expired' | 'other'. None when not suspended. The cabinet picks the CTA from it."},"next_quota_grant_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Quota Grant At","description":"(additive): next monthly base-quota grant (00:00Z on the 1st) when it falls inside the paid period; None otherwise (e.g. the period must be renewed first)."},"renew_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Renew Allowed","description":"(additive): False for a quota-suspended service outside the last 7 days before expires_at — the cabinet hides Extend. None when the field was not resolved by the call site."},"access_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Access Enabled","description":": computed access flag (admin-only). Same predicate as admission_service_eligible_clause; None when not resolved (non-admin call sites)."}},"type":"object","required":["id","owner_type","owner_id","product_id","status","provisioner","ext_dealer_id","ext_service_id","params","started_at","expires_at","cancelled_at","usage_requests_cur","usage_bytes_cur","is_auto_renew","created_at"],"title":"ServiceResponse","description":"A purchased service / subscription."},"ServiceStatusResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"refund_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refund Cents"},"new_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"New Expires At"},"charged_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Charged Cents"},"funding_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Funding Source"},"refund_base_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Refund Base Cents"}},"type":"object","required":["service_id","status","message"],"title":"ServiceStatusResponse","description":"Simple status update response."},"StickyModeResponse":{"properties":{"mode":{"type":"string","title":"Mode"},"pin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin"}},"type":"object","required":["mode"],"title":"StickyModeResponse","description":"Per-user sticky mode (sticky | rotating | pinned)."},"StickyModeUpdateRequest":{"properties":{"mode":{"type":"string","enum":["sticky","rotating","pinned"],"title":"Mode","description":"sticky | rotating | pinned"},"pin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pin","description":"Exit ip:port when mode=pinned (validated by upstream)"}},"additionalProperties":false,"type":"object","required":["mode"],"title":"StickyModeUpdateRequest","description":"Update per-user sticky mode. ``pin`` required when mode=pinned."},"StickyPurgeResponse":{"properties":{"deleted":{"type":"integer","title":"Deleted"}},"type":"object","required":["deleted"],"title":"StickyPurgeResponse","description":"Result of purging all sticky sessions for the service user."},"StickyRotateResponse":{"properties":{"sid":{"type":"string","title":"Sid"},"exit":{"type":"string","title":"Exit"},"exit_addr":{"type":"string","title":"Exit Addr"},"status":{"type":"string","title":"Status","default":"rotated"}},"type":"object","required":["sid","exit","exit_addr"],"title":"StickyRotateResponse","description":"Result of rotating one sticky session (new exit)."},"StickySession":{"properties":{"sid":{"type":"string","title":"Sid"},"session_id":{"type":"string","title":"Session Id"},"server":{"type":"string","title":"Server"},"exit":{"type":"string","title":"Exit"},"exit_addr":{"type":"string","title":"Exit Addr"},"is_default":{"type":"boolean","title":"Is Default","default":false},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created"},"last_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used"},"ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Seconds"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","required":["sid","session_id","server","exit","exit_addr"],"title":"StickySession","description":"One sticky session for a rotating service (normalized from upstream)."},"StickySessionsResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"username":{"type":"string","title":"Username"},"sessions":{"items":{"$ref":"#/components/schemas/StickySession"},"type":"array","title":"Sessions"}},"type":"object","required":["service_id","username","sessions"],"title":"StickySessionsResponse","description":"Active sticky sessions for a rotating service."},"StickyTtlResponse":{"properties":{"ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Seconds"},"is_custom":{"type":"boolean","title":"Is Custom","default":false},"global_default_ttl":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Global Default Ttl"},"ttl_human":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ttl Human"}},"type":"object","title":"StickyTtlResponse","description":"Per-user sticky TTL override (default-session TTL)."},"StickyTtlUpdateRequest":{"properties":{"seconds":{"type":"integer","minimum":30,"title":"Seconds","description":"TTL override in seconds (minimum 30)"}},"additionalProperties":false,"type":"object","required":["seconds"],"title":"StickyTtlUpdateRequest","description":"Set per-user sticky TTL override (seconds, min 30)."},"TicketAttachmentIn":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":127,"minLength":1,"title":"Content Type"},"data_base64":{"type":"string","maxLength":28000000,"minLength":1,"title":"Data Base64"}},"additionalProperties":false,"type":"object","required":["filename","content_type","data_base64"],"title":"TicketAttachmentIn","description":"Attachment payload carried inline in create/reply JSON.\n\n``data_base64`` holds the raw file bytes base64-encoded. The declared\ncontent type and magic bytes are still validated server-side by\n``TicketAttachmentService`` before storage, exactly like multipart upload."},"TicketAttachmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"message_id":{"type":"string","format":"uuid","title":"Message Id"},"uploader_type":{"type":"string","title":"Uploader Type"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size":{"type":"integer","title":"Size"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","message_id","uploader_type","filename","content_type","size","created_at"],"title":"TicketAttachmentResponse","description":"Metadata for a ticket message attachment (no binary payload)."},"TicketCreateRequest":{"properties":{"subject":{"type":"string","maxLength":500,"minLength":1,"title":"Subject"},"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"attachments":{"items":{"$ref":"#/components/schemas/TicketAttachmentIn"},"type":"array","maxItems":5,"title":"Attachments"}},"additionalProperties":false,"type":"object","required":["subject","message"],"title":"TicketCreateRequest","description":"Create a new support ticket."},"TicketDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"subject":{"type":"string","title":"Subject"},"status":{"$ref":"#/components/schemas/TicketStatus"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"messages":{"items":{"$ref":"#/components/schemas/TicketMessageResponse"},"type":"array","title":"Messages"}},"type":"object","required":["id","tenant_id","customer_id","subject","status","service_id","last_message_at","created_at","updated_at","messages"],"title":"TicketDetailResponse","description":"Ticket with full message history."},"TicketListResponse":{"properties":{"tickets":{"items":{"$ref":"#/components/schemas/TicketResponse"},"type":"array","title":"Tickets"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","required":["tickets","total"],"title":"TicketListResponse","description":"Paginated ticket list."},"TicketMessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"ticket_id":{"type":"string","format":"uuid","title":"Ticket Id"},"author_kind":{"type":"string","title":"Author Kind"},"author_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Author Id"},"message":{"type":"string","title":"Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"attachments":{"items":{"$ref":"#/components/schemas/TicketAttachmentResponse"},"type":"array","title":"Attachments"},"detected_lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detected Lang"},"translated_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translated Body"},"translation_target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translation Target"},"edited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Edited At"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}},"type":"object","required":["id","ticket_id","author_kind","author_id","message","created_at"],"title":"TicketMessageResponse","description":"A single message in a ticket thread."},"TicketReplyRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message"},"attachments":{"items":{"$ref":"#/components/schemas/TicketAttachmentIn"},"type":"array","maxItems":5,"title":"Attachments"}},"additionalProperties":false,"type":"object","required":["message"],"title":"TicketReplyRequest","description":"Reply to an existing ticket."},"TicketResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id"},"customer_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customer Id"},"subject":{"type":"string","title":"Subject"},"status":{"$ref":"#/components/schemas/TicketStatus"},"service_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Service Id"},"last_message_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Message At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","tenant_id","customer_id","subject","status","service_id","last_message_at","created_at","updated_at"],"title":"TicketResponse","description":"A support ticket in list view."},"TicketStatus":{"type":"string","enum":["open","in_progress","waiting","customer_replied","closed"],"title":"TicketStatus","description":"Ticket lifecycle statuses (aligned with Ticket model)."},"TicketUpdateStatusRequest":{"properties":{"status":{"$ref":"#/components/schemas/TicketStatus"}},"additionalProperties":false,"type":"object","required":["status"],"title":"TicketUpdateStatusRequest","description":"Update ticket status (e.g. close, reopen)."},"TrialSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"period_days":{"type":"integer","minimum":1,"title":"Period Days","default":2},"tariff_coefficient":{"type":"number","exclusiveMinimum":0,"title":"Tariff Coefficient","default":2},"registration_window_enabled":{"type":"boolean","title":"Registration Window Enabled","default":false},"registration_window_days":{"type":"integer","minimum":1,"title":"Registration Window Days","default":30},"max_per_month":{"type":"integer","minimum":0,"title":"Max Per Month","default":3}},"type":"object","title":"TrialSettings","description":"Per-tenant trial-probe knobs.\n\nPaid short probe of a customer-assembled composite package. Defaults keep\nthe feature on (``enabled=True``) with a 2-day x 2.0 coefficient probe."},"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"},"VolumeTierConfig":{"properties":{"min_ips":{"type":"integer","minimum":0,"title":"Min Ips","description":"Total-IP threshold at which this tier applies"},"price_millicents_per_ip":{"type":"integer","minimum":0,"title":"Price Millicents Per Ip","description":"Per-IP price in millicents (1/1000 of a cent)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Informational label for the admin UI"}},"type":"object","required":["min_ips","price_millicents_per_ip"],"title":"VolumeTierConfig","description":"One rung of the volume-discount ladder.\n\n``price_millicents_per_ip`` is the per-IP price in thousandths of a\ncent, matching the existing\n``_VOLUME_TIERS`` millicent convention. ``label`` is purely\ninformational (e.g. \"Opt discount: 10% off from 5000 IPs\") — it plays\nno role in the price calculation, which always derives from\n``price_millicents_per_ip``."},"WalletBalanceResponse":{"properties":{"wallet_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Wallet Id"},"owner_type":{"type":"string","title":"Owner Type"},"owner_id":{"type":"string","format":"uuid","title":"Owner Id"},"balance_cents":{"type":"integer","title":"Balance Cents","description":"Available balance in integer cents"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"has_wallet":{"type":"boolean","title":"Has Wallet","description":"False when no Wallet row exists yet (M2-WALLET-1) -- balance_cents is 0.","default":true},"billing_authority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Authority","description":"Owner billing authority ('finebilling' | 'whmcs'). WHMCS mirrors surface observed_balance_*; ledger balance_cents stays 0."},"observed_balance_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Observed Balance Cents","description":"Last WHMCS credit observed by whmcs_sync, in cents."},"observed_balance_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observed Balance Currency"},"observed_balance_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed Balance Synced At"},"observed_balance_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Observed Balance Source","description":"Constant 'whmcs_observed' when an observed balance exists."}},"type":"object","required":["owner_type","owner_id","balance_cents"],"title":"WalletBalanceResponse","description":"Current wallet balance.\n\n``observed_balance_*`` (M1-BALANCE) is a separate, explicit read-only\nmirror of the last WHMCS credit seen by whmcs_sync for accounts with\n``billing_authority!= 'finebilling'`` -- NEVER mixed into\n``balance_cents``, which keeps meaning exactly what it always has. ``None`` for finebilling-native\naccounts (no WHMCS shadow to observe) or a WHMCS account not yet synced.\n\n``wallet_id`` is ``None`` and ``has_wallet`` is ``False`` when no\n``Wallet`` row exists yet for this owner (M2-WALLET-1) -- reads never\nauto-create one; ``balance_cents`` is correctly ``0`` in that case."},"WebhookDeliveryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"event_id":{"type":"string","format":"uuid","title":"Event Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"event_type":{"type":"string","title":"Event Type"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"},"last_response_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Response Code"},"last_response_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Response Body"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","event_id","endpoint_id","event_type","status","attempts"],"title":"WebhookDeliveryResponse"},"WebhookEndpointCreate":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":8,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"}},"type":"object","required":["url","events"],"title":"WebhookEndpointCreate"},"WebhookEndpointCreatedResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"secret_prefix":{"type":"string","title":"Secret Prefix"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","url","secret_prefix","events","is_active","secret"],"title":"WebhookEndpointCreatedResponse","description":"Create response — includes the raw secret exactly once."},"WebhookEndpointResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"url":{"type":"string","title":"Url"},"secret_prefix":{"type":"string","title":"Secret Prefix"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"disabled_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disabled Reason"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","url","secret_prefix","events","is_active"],"title":"WebhookEndpointResponse"},"WebhookEndpointUpdate":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":8},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array","minItems":1},{"type":"null"}],"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"WebhookEndpointUpdate"},"WebhookEventTypesResponse":{"properties":{"events":{"items":{"type":"string"},"type":"array","title":"Events"}},"type":"object","required":["events"],"title":"WebhookEventTypesResponse"},"WhitelistAddRequest":{"properties":{"ip_or_cidr":{"type":"string","title":"Ip Or Cidr","description":"Single IPv4 address (CIDR subnets are not supported)"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"conn_limit":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Conn Limit"}},"additionalProperties":false,"type":"object","required":["ip_or_cidr"],"title":"WhitelistAddRequest","description":"Add a single whitelist IPv4 address.\n\nField name kept as ``ip_or_cidr`` for backward API compatibility, but\nonly bare IPv4 addresses (or an explicit ``/32``) are accepted — see\n``app.services.whitelist_ip.parse_whitelist_ipv4``."},"WhitelistEntry":{"properties":{"ip_or_cidr":{"type":"string","title":"Ip Or Cidr"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"conn_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Conn Limit"},"is_paid":{"type":"boolean","title":"Is Paid","default":false}},"type":"object","required":["ip_or_cidr"],"title":"WhitelistEntry","description":"A single whitelist IP/CIDR entry with optional conn_limit."},"WhitelistReplaceRequest":{"properties":{"old_ip_or_cidr":{"type":"string","title":"Old Ip Or Cidr","description":"Existing whitelisted IPv4 address"},"new_ip_or_cidr":{"type":"string","title":"New Ip Or Cidr","description":"Replacement IPv4 address"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"additionalProperties":false,"type":"object","required":["old_ip_or_cidr","new_ip_or_cidr"],"title":"WhitelistReplaceRequest","description":"Atomically swap one whitelist address for another.\n\nOnly ``new_ip_or_cidr`` is validated as a single IPv4 (``parse_whitelist_ipv4``,\nin the manager so all surfaces share it); ``old_ip_or_cidr`` is a lookup key\nand is compared logically (``A`` == ``A/32``)."},"WhitelistResponse":{"properties":{"service_id":{"type":"string","format":"uuid","title":"Service Id"},"entries":{"items":{"$ref":"#/components/schemas/WhitelistEntry"},"type":"array","title":"Entries"},"conn_cap":{"type":"integer","title":"Conn Cap"},"capacity":{"type":"integer","title":"Capacity","default":0},"free_quota":{"type":"integer","title":"Free Quota","default":0},"used":{"type":"integer","title":"Used","default":0},"paid_slots":{"type":"integer","title":"Paid Slots","default":0}},"type":"object","required":["service_id","entries","conn_cap"],"title":"WhitelistResponse","description":"Whitelist entries with total conn_cap for the service.\n\n``capacity`` / ``free_quota`` / ``used`` / ``paid_slots`` are additive so the cabinet can show a proactive upsell without waiting\nfor HTTP 409. Sourced from the same ``_resolve_whitelist_capacity`` as\nthe write path."},"WhmcsInvoiceArchiveItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"whmcs_invoice_id":{"type":"integer","title":"Whmcs Invoice Id"},"invoice_num":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Num"},"status":{"type":"string","title":"Status"},"invoice_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Invoice Date"},"due_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due Date"},"date_paid":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Paid"},"total_cents":{"type":"integer","title":"Total Cents"},"currency":{"type":"string","title":"Currency","default":"USD"},"payment_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Method"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"}},"type":"object","required":["id","whmcs_invoice_id","status","total_cents","synced_at"],"title":"WhmcsInvoiceArchiveItem","description":"One WHMCS invoice archive row."},"WhmcsInvoiceArchiveResponse":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"whmcs_client_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Whmcs Client Id"},"source":{"type":"string","title":"Source","description":"Constant — never Payment/Ledger.","default":"whmcs_invoice_archive"},"items":{"items":{"$ref":"#/components/schemas/WhmcsInvoiceArchiveItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset","default":0},"limit":{"type":"integer","title":"Limit","default":50}},"type":"object","required":["customer_id","items","total"],"title":"WhmcsInvoiceArchiveResponse","description":"Read-only WHMCS invoice history for support."}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"cabinet:account","description":"API keys — create and revoke keys for programmatic access"},{"name":"cabinet:addons","description":"Service add-ons — extra whitelist IP slots and other options"},{"name":"cabinet:billing","description":"Per-IP proxies — countries (ISO codes), pricing terms, quote, order and adding IPs to an existing service"},{"name":"customer-api","description":"Customer API — programmatic retail access (API key + scopes)"}],"servers":[{"url":"https://fineproxy.org/account_new"}]}