openapi: 3.1.0 info: title: ServerBike Reseller Public API version: "1.1.1" summary: Wholesale VPS purchase, delivery, operation and lifecycle for ServerBike resellers. description: | The ServerBike Reseller Public API (`/api/v1`) is used by resellers to buy wholesale VPS services, deliver them to their own customers and operate them. A reseller may use the packaged WHMCS modules or any backend of its own (PHP, Python, Node.js, Go, a billing panel, an automation system); WHMCS on the reseller side is optional. **Contract version 1.1.1** (Bridge 0.1.8 maintenance): 28 routes, 17 GET and 11 POST. Routes added in 1.1.0 are marked `x-since: 1.1.0`. Existing response shapes are unchanged; new information is published on new read routes only, because existing clients decode responses strictly. **Authentication.** Every request is signed with `BRIDGE-HMAC-SHA256-V1` (see `AUTHENTICATION.md`): four headers, one value each, computed over the exact method, raw path, raw query and body bytes sent. Requests are accepted only from the reseller's registered public egress addresses (IPv4 and/or IPv6). Calls are server-to-server; never place the reseller secret in a browser. **Envelopes.** Success is HTTP 200 with `{"data": {...}}`. Errors are `{"error": {"code", "message", "details"}}` with an `X-Request-Id` header. Errors that refer to a business operation carry `details.operation_uuid`. Responses are `Cache-Control: no-store`, `Content-Type: application/json`, identity-encoded. **Retries.** A transport failure, a timeout, a non-JSON body or an edge/proxy error after a POST is NOT proof that the request was not delivered. Look up the original `operation_uuid`; never resend a mutation with a new one until the original is proven terminal. See `RETRY_AND_ERRORS.md`. contact: name: ServerBike reseller support servers: - url: https://bridge.serverbike.com description: Production security: - credentialId: [] timestamp: [] nonce: [] signature: [] tags: - name: Authentication - name: Catalog and account - name: Business operations - name: Financial reconciliation - name: Services - name: Delivery - name: Runtime operations - name: Console - name: Plan change paths: /api/v1/auth/verify: get: tags: [Authentication] operationId: verifyAuth summary: Prove the credential, signature and source address. x-rate-family: auth_probe responses: "200": description: Credential accepted. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [credential_id, reseller_ref, created_at, expires_at] properties: credential_id: {type: string} reseller_ref: {$ref: "#/components/schemas/ResellerRef"} created_at: {$ref: "#/components/schemas/Timestamp"} expires_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} "401": {$ref: "#/components/responses/AuthenticationFailed"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/catalog: get: tags: [Catalog and account] operationId: getCatalog summary: Products, terms, wholesale prices, images and capabilities offered to this reseller. description: | Prices are ServerBike's effective wholesale price for this reseller (fixed override, else percentage discount, else the native price) in the reseller's currency. `available` and `capabilities` describe the catalogue; every purchase is admitted again (allowance, mapping, launch scope, credit, limits). `list_price`, when present, is ServerBike's own public price before reseller rules (information for retail pricing; never charged). x-rate-family: read parameters: - {name: limit, in: query, required: false, schema: {type: integer, minimum: 1, maximum: 10, default: 10}} - {name: cursor, in: query, required: false, schema: {type: string}, description: Opaque cursor from `next_cursor`.} responses: "200": description: One page of the catalogue. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [reseller_ref, products, next_cursor] properties: reseller_ref: {$ref: "#/components/schemas/ResellerRef"} next_cursor: {type: [string, "null"]} products: type: array maxItems: 10 items: {$ref: "#/components/schemas/CatalogProduct"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/account/commercial: get: tags: [Catalog and account] operationId: getCommercialAccount summary: Commercial eligibility and credit balance. x-rate-family: read responses: "200": description: Account state from ServerBike. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [reseller_ref, commercially_eligible, credit_balance] properties: reseller_ref: {$ref: "#/components/schemas/ResellerRef"} commercially_eligible: {type: boolean} credit_balance: {$ref: "#/components/schemas/Money"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/purchases: post: tags: [Business operations] operationId: purchase summary: Buy one wholesale VPS (debits credit once; fulfillment follows). description: | Persist `operation_uuid` and the exact body BEFORE sending. A commit proves the debit and the commercial service, not a running server: follow `service_uuid` through `runtime-state` and `access`. On any transport ambiguity, poll `GET /operations/{operation_uuid}`; never send a second purchase with a new UUID until the first is proven `rejected`. x-rate-family: mutation requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid, external_product_ref, term_ref, requested_image_ref] properties: operation_uuid: {$ref: "#/components/schemas/OperationUuidV4"} external_product_ref: {$ref: "#/components/schemas/Ref"} term_ref: {$ref: "#/components/schemas/TermRef"} requested_image_ref: {$ref: "#/components/schemas/Ref"} responses: "200": description: Committed. `service_uuid` and `fulfillment_status` are present when fulfillment was scheduled in the same call. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [operation_uuid, outcome, business_transaction_ref, commercial_service_ref] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} outcome: {const: committed} business_transaction_ref: {$ref: "#/components/schemas/Ref"} commercial_service_ref: {$ref: "#/components/schemas/Ref"} service_uuid: {$ref: "#/components/schemas/Uuid"} fulfillment_status: {type: string} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "409": {$ref: "#/components/responses/BusinessConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/MutationUnavailable"} /api/v1/renewals: post: tags: [Business operations] operationId: renew summary: Renew one service for its current term (debits credit once). description: | Refused (`409 BUSINESS_CONFLICT`) when ServerBike renews the service automatically (see `GET /services/{service_uuid}/commercial` → `renewal.authority`), while a financial hold applies, or while another commercial operation of the service is unresolved. The new paid-through date is reported by `GET /operations/{operation_uuid}/settlement`. x-rate-family: mutation requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid, commercial_service_ref, service_uuid, term_ref] properties: operation_uuid: {$ref: "#/components/schemas/OperationUuidV4"} commercial_service_ref: {$ref: "#/components/schemas/Ref"} service_uuid: {$ref: "#/components/schemas/Uuid"} term_ref: {$ref: "#/components/schemas/TermRef"} responses: "200": description: Committed. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [operation_uuid, outcome, business_transaction_ref] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} outcome: {const: committed} business_transaction_ref: {$ref: "#/components/schemas/Ref"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/BusinessConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/MutationUnavailable"} /api/v1/commercial-suspensions: post: tags: [Business operations] operationId: suspend summary: Commercially suspend a service (the platform applies the operational hold). x-rate-family: mutation requestBody: {$ref: "#/components/requestBodies/Lifecycle"} responses: "200": {$ref: "#/components/responses/LifecycleCommitted"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/BusinessConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/MutationUnavailable"} /api/v1/commercial-unsuspensions: post: tags: [Business operations] operationId: unsuspend summary: Release a commercial suspension. x-rate-family: mutation requestBody: {$ref: "#/components/requestBodies/Lifecycle"} responses: "200": {$ref: "#/components/responses/LifecycleCommitted"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/BusinessConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/MutationUnavailable"} /api/v1/commercial-terminations: post: tags: [Business operations] operationId: terminate summary: Terminate a service commercially (provider cleanup follows; watch `runtime-state`). x-rate-family: mutation requestBody: {$ref: "#/components/requestBodies/Lifecycle"} responses: "200": {$ref: "#/components/responses/LifecycleCommitted"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/BusinessConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/MutationUnavailable"} /api/v1/commercial-changes: post: tags: [Plan change] operationId: changePlan summary: Upgrade to another plan, applied by the customer's own Stop (or Power Off) then Start. description: | Deferred plan change: ServerBike holds the non-prorated same-term wholesale difference in escrow, the platform stages the target with the provider, the customer's own power cycle applies it, the platform verifies the running resources and ServerBike captures (or releases) the held amount exactly once. The platform never powers the VPS off or on for this. Track the phase with `GET /services/{service_uuid}/plan-changes/{operation_uuid}` and money with `GET /operations/{operation_uuid}/settlement`. Eligible targets: `GET /services/{service_uuid}/commercial`. Plan change is unavailable while ServerBike has it switched off or no target is qualified. x-rate-family: mutation requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid, commercial_service_ref, service_uuid, target_external_product_ref, target_term_ref, target_requested_image_ref] properties: operation_uuid: {$ref: "#/components/schemas/OperationUuidV4"} commercial_service_ref: {$ref: "#/components/schemas/Ref"} service_uuid: {$ref: "#/components/schemas/Uuid"} target_external_product_ref: {$ref: "#/components/schemas/Ref"} target_term_ref: {$ref: "#/components/schemas/TermRef"} target_requested_image_ref: {$ref: "#/components/schemas/Ref"} responses: "200": description: "Deferred (`status: pending`) or, for an immediate change, the lifecycle commit." content: application/json: schema: type: object required: [data] properties: data: oneOf: - type: object additionalProperties: false required: [operation_uuid, status, operation_type] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: pending} operation_type: {const: commercial_change} - {$ref: "#/components/schemas/LifecycleCommit"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/BusinessConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/MutationUnavailable"} /api/v1/operations/{operation_uuid}: get: tags: [Business operations] operationId: lookupOperation summary: Durable outcome of a purchase, renewal or lifecycle operation of this reseller. description: | `not_found` (HTTP 200) means no operation of this reseller has this UUID **yet**; after a lost response keep polling with backoff and never treat it alone as permission to mint a new UUID. `pending` is not terminal. Runtime operations (power, reinstall, password) have their own lookup routes. x-rate-family: polling parameters: [{$ref: "#/components/parameters/OperationUuid"}] responses: "200": description: Lookup result. content: application/json: schema: type: object required: [data] properties: data: {$ref: "#/components/schemas/OperationLookup"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/operations/{operation_uuid}/settlement: get: tags: [Financial reconciliation] operationId: getSettlement x-since: 1.1.0 summary: Authoritative financial settlement of one operation (recorded amounts, currency, paid-through). description: | Figures are ServerBike's recorded business transactions (never a current catalogue price). `transactions` lists the debit(s) of the operation and any refund recorded against them. `paid_through` is set only for a committed renewal (ServerBike's recorded new paid-through date); for the current paid-through date of a service use `GET /services/{service_uuid}/commercial`. `plan_change` carries the escrow of a plan change. Read-only. x-rate-family: read parameters: [{$ref: "#/components/parameters/OperationUuid"}] responses: "200": description: Settlement. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/Settlement"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/services: get: tags: [Services] operationId: listServices summary: Services of this reseller (Bridge projection). x-rate-family: read parameters: - {name: limit, in: query, required: false, schema: {type: integer, minimum: 1, maximum: 100, default: 50}} - {name: cursor, in: query, required: false, schema: {type: string}} responses: "200": description: One page. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [reseller_ref, services, next_cursor] properties: reseller_ref: {$ref: "#/components/schemas/ResellerRef"} next_cursor: {type: [string, "null"]} services: {type: array, items: {$ref: "#/components/schemas/ServiceSummary"}} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}: get: tags: [Services] operationId: getService summary: One service of this reseller. x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Service. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/ServiceSummary"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/commercial: get: tags: [Financial reconciliation, Plan change] operationId: getServiceCommercial x-since: 1.1.0 summary: Current commercial state, paid-through date, renewal authority, capabilities and upgrade targets. description: | `paid_through` is ServerBike's current next-due date. `renewal.authority` says who renews: `reseller_api` (you call `POST /renewals`) or `serverbike_automatic` (ServerBike renews; API renewals are refused). `plan_change.targets` are candidates priced exactly as admission would price them, each with the platform's current qualification; this is a preflight only — it reserves nothing and promises nothing; admission decides again. x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Commercial summary. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/ServiceCommercial"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/services/{service_uuid}/operational-status: get: tags: [Services] operationId: getOperationalStatus summary: Live power status (fresh provider read; observational). x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Status. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, fulfillment_status, operational_status] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} fulfillment_status: {type: string} operational_status: {enum: [running, stopped, unknown, pending, terminated]} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} "500": {$ref: "#/components/responses/InternalError"} /api/v1/services/{service_uuid}/runtime-state: get: tags: [Services] operationId: getRuntimeState summary: Provisioning/termination progress, power state and metrics (CPU, memory, disk, traffic). x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Runtime state. Provider outages are reported as `unavailable` with a reason, not as errors. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/RuntimeState"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/activity: get: tags: [Services] operationId: getActivity summary: Latest 30 customer-visible events of the service (not a financial ledger). x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Activity, newest first. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, items] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} items: type: array maxItems: 30 items: type: object additionalProperties: false required: [at, kind, result] properties: at: {$ref: "#/components/schemas/Timestamp"} kind: {type: string, description: "start, stop, restart, power_off, reinstall, password_change, suspended, unsuspended, terminated, plan_changed, renewed, initial_password_shown, status_"} result: {enum: [completed, failed, needs_review, in_progress, observed]} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/access: get: tags: [Delivery] operationId: getAccess summary: Legacy delivery projection (addresses, login, credential state). description: | Frozen 1.0 shape (strict existing clients). `login_username` is lower case and `ssh_port` is the single login port: for a Windows image it reports `administrator` and `3389` (Remote Desktop). New integrations should use `GET /services/{service_uuid}/guest-access`, which names the protocol and the operating-system family. x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Delivery projection. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/LegacyAccess"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/guest-access: get: tags: [Delivery] operationId: getGuestAccess x-since: 1.1.0 summary: Image-aware login (SSH or Remote Desktop), addresses, and the initial credential's state and recovery. description: | `login` is null until delivery or when the effective image is unresolved or lacks verified login metadata. A reinstall target becomes the effective image only after verified completion. An unresolved password replacement suppresses reveal and returns null recovery. After a verified replacement, an unused initial credential becomes unavailable. `password_change` directs the client to `POST /api/v1/services/{service_uuid}/password` when the product grants `vps.changepassword`, or to reinstall when permitted. A consumed reveal can never be repeated, including after a lost response. x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}] responses: "200": description: Guest access. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/GuestAccess"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/access/initial-credential: post: tags: [Delivery] operationId: revealInitialCredential summary: One-time reveal of the initial password (atomic; never repeatable). description: | Exactly one caller ever receives `revealed`. A lost response consumes the reveal: the next answer is `already_revealed`. Recover with an authorized password change. Store nothing; never log the body. Body limit 64 bytes. x-rate-family: mutation parameters: [{$ref: "#/components/parameters/ServiceUuid"}] requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [confirm] properties: confirm: {const: true} responses: "200": description: Reveal result. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, result, login_username, password] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} result: {enum: [revealed, already_revealed, unavailable]} login_username: {type: [string, "null"]} password: {type: [string, "null"], description: "Only when result is revealed."} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/console-sessions: post: tags: [Console] operationId: openConsole summary: Issue a one-use console ticket for a browser at an approved Origin. description: | The browser connects to `wss://` within 60 s, once, from exactly `origin`. Each reconnect needs a new ticket. Requires product capability `vps.console` and an approved Origin (the reseller's registered hostname, or an origin ServerBike added). Body limit 512 bytes. x-rate-family: mutation parameters: [{$ref: "#/components/parameters/ServiceUuid"}] requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [origin] properties: origin: {type: string, pattern: "^https://[a-z0-9.-]{1,253}(:[0-9]{1,5})?$"} responses: "200": description: Ticket. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, console_path, expires_at] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} console_path: {type: string, pattern: "^/console/v1/[A-Za-z0-9_-]{60,1400}$"} expires_at: {$ref: "#/components/schemas/Timestamp"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/ServiceSuspended"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/services/{service_uuid}/power/{action}: post: tags: [Runtime operations] operationId: power summary: Start, stop (graceful), restart (stop then start) or power off (hard). description: | Requires product capability `vps.`. One runtime action at a time per service. The platform's worker continues and settles the action; poll `GET .../power/operations/{operation_uuid}` (observational). Reusing the same `operation_uuid` returns the same operation. Body limit 1024 bytes. x-rate-family: mutation parameters: - {$ref: "#/components/parameters/ServiceUuid"} - {name: action, in: path, required: true, schema: {enum: [start, stop, restart, poweroff]}} requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} responses: "200": {$ref: "#/components/responses/PowerOperation"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/ServiceConflict"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/services/{service_uuid}/power/operations/{operation_uuid}: get: tags: [Runtime operations] operationId: getPowerOperation summary: Observe a power operation (never sends anything). x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}, {$ref: "#/components/parameters/OperationUuid"}] responses: "200": {$ref: "#/components/responses/PowerOperation"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/reinstall: post: tags: [Runtime operations] operationId: reinstall summary: Reinstall an offered image with a new password (destructive). description: Requires `vps.reinstall`; refused while a plan change is staged. Body limit 2048 bytes. The password is never stored or echoed. x-rate-family: mutation parameters: [{$ref: "#/components/parameters/ServiceUuid"}] requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid, image_ref, new_password] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} image_ref: {$ref: "#/components/schemas/Ref"} new_password: {$ref: "#/components/schemas/GuestPassword"} responses: "200": {$ref: "#/components/responses/ReinstallOperation"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/ServiceConflict"} "422": {$ref: "#/components/responses/BusinessRejection"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/services/{service_uuid}/reinstall/operations/{operation_uuid}: get: tags: [Runtime operations] operationId: getReinstallOperation summary: Observe a reinstall (settles only on provider task proof). x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}, {$ref: "#/components/parameters/OperationUuid"}] responses: "200": {$ref: "#/components/responses/ReinstallOperation"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/password: post: tags: [Runtime operations] operationId: changePassword summary: Change the guest administrator password (root on Linux, Administrator on Windows). description: | Requires `vps.changepassword`; at most 5 per service per UTC day. When the provider can only apply the password at the next full power cycle, the platform performs one graceful stop-and-start itself (status `applying`), or reports `power_cycle_required` when it cannot. Body limit 2048 bytes. x-rate-family: mutation parameters: [{$ref: "#/components/parameters/ServiceUuid"}] requestBody: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid, new_password] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} new_password: {$ref: "#/components/schemas/GuestPassword"} responses: "200": {$ref: "#/components/responses/PasswordOperation"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "409": {$ref: "#/components/responses/ServiceConflict"} "429": {$ref: "#/components/responses/RateLimited"} "503": {$ref: "#/components/responses/UpstreamUnavailable"} /api/v1/services/{service_uuid}/password/operations/{operation_uuid}: get: tags: [Runtime operations] operationId: getPasswordOperation summary: Observe a password change (never sends anything). x-rate-family: read parameters: [{$ref: "#/components/parameters/ServiceUuid"}, {$ref: "#/components/parameters/OperationUuid"}] responses: "200": {$ref: "#/components/responses/PasswordOperation"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} /api/v1/services/{service_uuid}/plan-changes/{operation_uuid}: get: tags: [Plan change] operationId: getPlanChange x-since: 1.1.0 summary: Phase of a plan change, customer activation readiness and settlement state. description: | Derived from the platform's recorded evidence only (no provider call). Ask the customer to Stop (or Power Off) and then Start only while `activation_ready` is true; `customer_power_cycle_permitted` is false while another power action of the service is still open. `operator_review_required` means ServerBike operators decide; nothing is automatic. Amounts: `GET /operations/{operation_uuid}/settlement`. x-rate-family: polling parameters: [{$ref: "#/components/parameters/ServiceUuid"}, {$ref: "#/components/parameters/OperationUuid"}] responses: "200": description: Plan change phase. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/PlanChange"} "400": {$ref: "#/components/responses/InvalidRequest"} "401": {$ref: "#/components/responses/AuthenticationFailed"} "404": {$ref: "#/components/responses/NotFound"} "429": {$ref: "#/components/responses/RateLimited"} components: securitySchemes: credentialId: {type: apiKey, in: header, name: X-Reseller-Credential-Id, description: "Issued credential identifier."} timestamp: {type: apiKey, in: header, name: X-Request-Timestamp, description: "Unix seconds, canonical decimal; accepted within ±300 s."} nonce: {type: apiKey, in: header, name: X-Request-Nonce, description: "16 random bytes, 22-character unpadded base64url; single use."} signature: {type: apiKey, in: header, name: X-Request-Signature, description: "v1= + lowercase hex HMAC-SHA256 of the canonical message (BRIDGE-HMAC-SHA256-V1)."} parameters: ServiceUuid: {name: service_uuid, in: path, required: true, schema: {$ref: "#/components/schemas/Uuid"}} OperationUuid: {name: operation_uuid, in: path, required: true, schema: {$ref: "#/components/schemas/Uuid"}} requestBodies: Lifecycle: required: true content: application/json: schema: type: object additionalProperties: false required: [operation_uuid, commercial_service_ref, service_uuid] properties: operation_uuid: {$ref: "#/components/schemas/OperationUuidV4"} commercial_service_ref: {$ref: "#/components/schemas/Ref"} service_uuid: {oneOf: [{$ref: "#/components/schemas/Uuid"}, {type: "null"}], description: "Required member; null lets the platform resolve the reseller's unique binding of the commercial reference."} responses: InvalidRequest: {description: "Malformed request (path identifier, query, body, media type, size). Decided before ownership.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} AuthenticationFailed: {description: "Signature, timestamp, nonce (replay), credential or source address refused. Never retry with the same signing material.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} NotFound: {description: "Unknown, foreign or unsupported (collapsed: never reveals existence).", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} RateLimited: description: Rate limited. Wait `Retry-After` seconds, then retry with fresh signing material. headers: {Retry-After: {schema: {type: integer, minimum: 1}}} content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}} UpstreamUnavailable: {description: "A ServerBike dependency (commercial authority or provisioning platform) cannot answer now. A read may be retried later.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} InternalError: {description: "Unexpected server error. After a POST, treat as ambiguous and look the operation up.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} ServiceSuspended: {description: "SERVICE_SUSPENDED: the service is commercially held.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} ServiceConflict: {description: "SERVICE_SUSPENDED, BUSINESS_CONFLICT (another action open, wrong state, staged change) or IDEMPOTENCY_CONFLICT (UUID reused for a different intent).", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} BusinessConflict: {description: "BUSINESS_CONFLICT or IDEMPOTENCY_CONFLICT; details.operation_uuid names the operation.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} BusinessRejection: {description: "Definite business refusal (nothing charged): PRODUCT_UNAVAILABLE, RESELLER_INELIGIBLE, INSUFFICIENT_CREDIT or NOT_FOUND.", content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}}} MutationUnavailable: description: | `UPSTREAM_UNAVAILABLE` (proven not sent: the same intent may be retried with the same operation_uuid and fresh signing material) or `OUTCOME_UNKNOWN` (may have been committed: poll `GET /operations/{operation_uuid}` after `Retry-After`; never resend under a new UUID). headers: {Retry-After: {schema: {type: integer, minimum: 5}}} content: {application/json: {schema: {$ref: "#/components/schemas/Error"}}} LifecycleCommitted: description: Committed at ServerBike. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: {$ref: "#/components/schemas/LifecycleCommit"} PowerOperation: description: Power operation state. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, operation_uuid, action, status] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} operation_uuid: {$ref: "#/components/schemas/Uuid"} action: {enum: [start, stop, restart, poweroff]} status: {$ref: "#/components/schemas/RuntimeStatus"} ReinstallOperation: description: Reinstall state. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, operation_uuid, action, image_ref, status] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} operation_uuid: {$ref: "#/components/schemas/Uuid"} action: {const: reinstall} image_ref: {$ref: "#/components/schemas/Ref"} status: {$ref: "#/components/schemas/RuntimeStatus"} PasswordOperation: description: Password change state. content: application/json: schema: type: object additionalProperties: false required: [data] properties: data: type: object additionalProperties: false required: [service_uuid, operation_uuid, action, status] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} operation_uuid: {$ref: "#/components/schemas/Uuid"} action: {const: change_password} status: {enum: [pending, changing, applying, complete, power_cycle_required, failed_provider_rejected, failed_definitely_not_sent, reconciliation_required]} schemas: Uuid: {type: string, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", description: "Canonical lowercase UUID."} OperationUuidV4: {type: string, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", description: "Caller-generated random lowercase UUID v4; the durable identity of a business operation."} Ref: {type: string, pattern: "^[A-Za-z0-9._:-]{1,128}$"} ResellerRef: {type: string} TermRef: {type: string, pattern: "^[A-Za-z0-9._:-]{1,128}$", description: "Opaque term reference exactly as the catalogue returns it, e.g. term:monthly."} BillingPeriod: {enum: [monthly, quarterly, semiannually, annually, biennially, triennially]} Timestamp: {type: string, pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$", description: "RFC 3339 UTC, seconds precision."} Money: type: object additionalProperties: false required: [amount, currency] properties: amount: {type: string, pattern: "^\\d{1,14}\\.\\d{2}$", description: "Fixed-point decimal string; never a float."} currency: {type: string, pattern: "^[A-Z]{3}$"} SignedMoney: type: object additionalProperties: false required: [amount, currency] properties: amount: {type: string, pattern: "^-?\\d{1,14}\\.\\d{2}$", description: "Signed: negative = net debit of the reseller's credit."} currency: {type: string, pattern: "^[A-Z]{3}$"} GuestPassword: {type: string, minLength: 16, maxLength: 128, description: "16-128 UTF-8 bytes, no ASCII control bytes. Never logged, stored or echoed."} Error: type: object additionalProperties: false required: [error] properties: error: type: object additionalProperties: false required: [code, message, details] properties: code: {type: string, pattern: "^[A-Z][A-Z0-9_]{0,63}$", description: "INVALID_REQUEST, AUTHENTICATION_FAILED, NOT_FOUND, METHOD_NOT_ALLOWED, RATE_LIMITED, SERVICE_SUSPENDED, BUSINESS_CONFLICT, IDEMPOTENCY_CONFLICT, PRODUCT_UNAVAILABLE, RESELLER_INELIGIBLE, INSUFFICIENT_CREDIT, OUTCOME_UNKNOWN, UPSTREAM_UNAVAILABLE, INTERNAL_ERROR"} message: {type: string} details: type: object additionalProperties: false properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} CatalogProduct: type: object additionalProperties: false required: [external_product_ref, display_name, available, terms, images, capabilities] properties: external_product_ref: {$ref: "#/components/schemas/Ref"} display_name: {type: string} available: {type: boolean} terms: type: array items: type: object additionalProperties: false required: [term_ref, billing_period, wholesale_price] properties: term_ref: {$ref: "#/components/schemas/TermRef"} billing_period: {$ref: "#/components/schemas/BillingPeriod"} wholesale_price: {$ref: "#/components/schemas/Money"} list_price: {$ref: "#/components/schemas/Money"} images: type: array items: type: object additionalProperties: false required: [image_ref, display_name, available] properties: image_ref: {$ref: "#/components/schemas/Ref"} display_name: {type: string} available: {type: boolean} capabilities: type: array items: {enum: [vps.start, vps.stop, vps.restart, vps.poweroff, vps.reinstall, vps.changepassword, vps.console]} OperationLookup: oneOf: - type: object additionalProperties: false required: [operation_uuid, status] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: not_found} - type: object additionalProperties: false required: [operation_uuid, status, operation_type] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: pending} operation_type: {$ref: "#/components/schemas/OperationType"} - type: object additionalProperties: false required: [operation_uuid, status, operation_type, rejection_code] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: rejected} operation_type: {$ref: "#/components/schemas/OperationType"} rejection_code: {enum: [BUSINESS_CONFLICT, PRODUCT_UNAVAILABLE, RESELLER_INELIGIBLE, INSUFFICIENT_CREDIT, NOT_FOUND]} - type: object additionalProperties: false required: [operation_uuid, status, operation_type, business_transaction_ref, commercial_service_ref, service_uuid] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: committed} operation_type: {const: purchase} business_transaction_ref: {$ref: "#/components/schemas/Ref"} commercial_service_ref: {$ref: "#/components/schemas/Ref"} service_uuid: {oneOf: [{$ref: "#/components/schemas/Uuid"}, {type: "null"}]} - type: object additionalProperties: false required: [operation_uuid, status, operation_type, business_transaction_ref] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: committed} operation_type: {const: renewal} business_transaction_ref: {$ref: "#/components/schemas/Ref"} - type: object additionalProperties: false required: [operation_uuid, status, operation_type, commercial_service_ref, commercial_status, service_uuid, business_transaction_ref] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} status: {const: committed} operation_type: {enum: [commercial_suspend, commercial_unsuspend, commercial_terminate, commercial_change]} commercial_service_ref: {$ref: "#/components/schemas/Ref"} commercial_status: {enum: [active, suspended, terminated]} service_uuid: {oneOf: [{$ref: "#/components/schemas/Uuid"}, {type: "null"}]} business_transaction_ref: {type: "null"} OperationType: {enum: [purchase, renewal, commercial_suspend, commercial_unsuspend, commercial_terminate, commercial_change]} LifecycleCommit: type: object additionalProperties: false required: [operation_uuid, outcome, commercial_service_ref, commercial_status, service_uuid, business_transaction_ref] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} outcome: {const: committed} commercial_service_ref: {$ref: "#/components/schemas/Ref"} commercial_status: {enum: [active, suspended, terminated]} service_uuid: {oneOf: [{$ref: "#/components/schemas/Uuid"}, {type: "null"}]} business_transaction_ref: {type: "null"} ServiceSummary: type: object additionalProperties: false required: [service_uuid, commercial_status, commercial_status_source, operational_status, created_at, terminated_at, commercial_service_ref] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} commercial_status: {type: string} commercial_status_source: {const: bridge_projection} operational_status: {type: string} created_at: {$ref: "#/components/schemas/Timestamp"} terminated_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} commercial_service_ref: {type: [string, "null"]} RuntimeStatus: enum: [pending, new, in_flight, command_acknowledged, unknown, unknown_sent_outcome, complete, failed_definitely_not_sent, failed_provider_rejected, reconciliation_required] description: Only `complete` is success. `failed_*` are terminal and nothing changed. `reconciliation_required` may still settle from evidence; escalate when it persists. RuntimeState: type: object additionalProperties: false required: [service_uuid, fulfillment_status, operational_status, status_reason, observed_at, cached, metrics_status, metrics] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} fulfillment_status: {type: string} operational_status: {enum: [running, stopped, suspended, unavailable, queued, authorization_pending, authorization_refused, provisioning, installing, provisioning_failed, failed_definitely_not_sent, reconciliation_required, terminating, terminated]} status_reason: {type: [string, "null"], description: "service_not_active, executor_unavailable, authorization_unavailable, rate_limited, provider_unavailable, status_unresolved"} observed_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} cached: {type: boolean} metrics_status: {enum: [available, unavailable, unsupported]} metrics: oneOf: - type: "null" - type: object additionalProperties: false required: [power_state, cpu, memory, disk, traffic, network_throughput, observed_at] properties: power_state: {enum: [running, stopped, suspended]} cpu: {type: object, properties: {used_percent: {type: [number, "null"]}}} memory: {type: object, properties: {used_mb: {type: [number, "null"]}, total_mb: {type: [number, "null"]}}} disk: {type: object, properties: {used_gb: {type: [number, "null"]}, total_gb: {type: [number, "null"]}}} traffic: {type: object, properties: {used_gb: {type: [number, "null"]}, limit_gb: {type: [number, "null"]}, remaining_gb: {type: [number, "null"]}, unlimited: {type: [boolean, "null"]}, period: {const: provider_bandwidth_period}}} network_throughput: {type: object, properties: {status: {const: unsupported}}} observed_at: {$ref: "#/components/schemas/Timestamp"} LegacyAccess: type: object additionalProperties: false required: [service_uuid, delivery_status, primary_ipv4, additional_ipv4, ipv6, ssh_port, login_username, initial_credential] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} delivery_status: {enum: [pending, ready, network_unavailable, legacy]} primary_ipv4: {type: [string, "null"]} additional_ipv4: {type: array, items: {type: string}} ipv6: {type: array, items: {type: string}} ssh_port: {type: [integer, "null"]} login_username: {type: [string, "null"], pattern: "^[a-z_][a-z0-9_-]{0,31}$"} initial_credential: {enum: [available, revealed, unavailable]} GuestAccess: type: object additionalProperties: false required: [service_uuid, delivery_status, os_family, login, addresses, initial_credential] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} delivery_status: {enum: [pending, ready, network_unavailable, legacy]} os_family: {enum: [linux, windows, unknown]} login: oneOf: - type: "null" - type: object additionalProperties: false required: [protocol, username, port] properties: protocol: {enum: [ssh, rdp]} username: {type: string, examples: [root, Administrator]} port: {type: integer, minimum: 1, maximum: 65535} addresses: type: object additionalProperties: false required: [primary_ipv4, additional_ipv4, ipv6] properties: primary_ipv4: {type: [string, "null"]} additional_ipv4: {type: array, items: {type: string}} ipv6: {type: array, items: {type: string}} initial_credential: type: object additionalProperties: false required: [state, revealed_at, recovery] properties: state: {enum: [available, revealed, unavailable, not_ready]} revealed_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} recovery: {enum: [reveal, password_change, null]} Settlement: type: object additionalProperties: false required: [operation_uuid, operation_type, status, settlement_status, commercial_service_ref, service_uuid, business_transaction_ref, currency, net_amount, transactions, external_product_ref, term_ref, image_ref, paid_through, committed_at, plan_change] properties: operation_uuid: {$ref: "#/components/schemas/Uuid"} operation_type: {$ref: "#/components/schemas/OperationType"} status: {enum: [committed, pending, rejected]} settlement_status: enum: [settled, pending, not_charged, not_applicable, held, captured, released, under_review] description: "settled: purchase/renewal debit recorded. held/captured/released/under_review: plan change escrow. not_charged: rejected. not_applicable: suspension, unsuspension, termination." commercial_service_ref: {type: [string, "null"]} service_uuid: {oneOf: [{$ref: "#/components/schemas/Uuid"}, {type: "null"}]} business_transaction_ref: {type: [string, "null"]} currency: {type: [string, "null"]} net_amount: {oneOf: [{$ref: "#/components/schemas/SignedMoney"}, {type: "null"}]} transactions: type: array items: type: object additionalProperties: false required: [business_transaction_ref, kind, transaction_type, amount, recorded_at] properties: business_transaction_ref: {$ref: "#/components/schemas/Ref"} kind: {enum: [debit, credit]} transaction_type: {enum: [purchase, renewal, commercial_change, compensation]} amount: {$ref: "#/components/schemas/Money"} recorded_at: {$ref: "#/components/schemas/Timestamp"} external_product_ref: {type: [string, "null"], description: "Product in effect for this operation."} term_ref: {type: [string, "null"]} image_ref: {type: [string, "null"]} paid_through: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}], description: "Committed renewal only: ServerBike's recorded new paid-through date."} committed_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} plan_change: oneOf: - type: "null" - type: object additionalProperties: false required: [source_external_product_ref, target_external_product_ref, term_ref, source_image_ref, target_image_ref, held_amount, captured_amount, released_amount, reservation_state, capture_transaction_ref, reserved_at, settled_at] properties: source_external_product_ref: {type: [string, "null"]} target_external_product_ref: {type: [string, "null"]} term_ref: {type: string} source_image_ref: {type: string} target_image_ref: {type: string} held_amount: {$ref: "#/components/schemas/Money"} captured_amount: {oneOf: [{$ref: "#/components/schemas/Money"}, {type: "null"}]} released_amount: {oneOf: [{$ref: "#/components/schemas/Money"}, {type: "null"}]} reservation_state: {enum: [reserved, captured, released, under_review]} capture_transaction_ref: {type: [string, "null"]} reserved_at: {$ref: "#/components/schemas/Timestamp"} settled_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} ServiceCommercial: type: object additionalProperties: false required: [service_uuid, commercial_service_ref, commercial_status, external_product_ref, term_ref, image_ref, paid_through, capabilities, renewal, plan_change] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} commercial_service_ref: {$ref: "#/components/schemas/Ref"} commercial_status: {enum: [active, suspended, terminated]} external_product_ref: {$ref: "#/components/schemas/Ref"} term_ref: {$ref: "#/components/schemas/TermRef"} image_ref: {$ref: "#/components/schemas/Ref"} paid_through: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} capabilities: {type: array, items: {type: string}} renewal: type: object additionalProperties: false required: [authority, billing_state, financial_hold, reseller_hold, admin_hold, overdue_since] properties: authority: {enum: [reseller_api, serverbike_automatic]} billing_state: {type: [string, "null"]} financial_hold: {type: boolean} reseller_hold: {type: boolean} admin_hold: {type: boolean} overdue_since: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]} plan_change: type: object additionalProperties: false required: [available, blocking_reason, open_operation_uuid, targets] properties: available: {type: boolean} blocking_reason: {type: [string, "null"], description: "PLAN_CHANGE_DISABLED, SERVICE_NOT_ACTIVE, OPEN_CHANGE, CUSTOMER_POWER_CYCLE_NOT_PERMITTED, SERVICE_NOT_REALIZED, NO_QUALIFIED_TARGET"} open_operation_uuid: {oneOf: [{$ref: "#/components/schemas/Uuid"}, {type: "null"}]} targets: type: array items: type: object additionalProperties: false required: [external_product_ref, display_name, term_ref, image_ref, wholesale_price, wholesale_difference, qualified, unavailable_reason] properties: external_product_ref: {$ref: "#/components/schemas/Ref"} display_name: {type: string} term_ref: {$ref: "#/components/schemas/TermRef"} image_ref: {$ref: "#/components/schemas/Ref"} wholesale_price: {$ref: "#/components/schemas/Money"} wholesale_difference: {$ref: "#/components/schemas/Money"} qualified: {type: boolean} unavailable_reason: {type: [string, "null"], description: "PAIR_NOT_CERTIFIED, PLAN_STAGE_NOT_CERTIFIED, SERVICE_BINDING_UNQUALIFIED, INVENTORY_NOT_CURRENT, PROVIDER_UNQUALIFIED"} PlanChange: type: object additionalProperties: false required: [service_uuid, operation_uuid, operation_type, phase, terminal, outcome, activation_ready, next_customer_action, customer_power_cycle_permitted, operator_review_required, settlement_status, updated_at] properties: service_uuid: {$ref: "#/components/schemas/Uuid"} operation_uuid: {$ref: "#/components/schemas/Uuid"} operation_type: {const: commercial_change} phase: {enum: [awaiting_admission, waiting_for_stage, staging, verifying_stage, activation_ready, applying, verifying_application, settlement_pending, operator_review, completed, released, rejected, in_progress]} terminal: {type: boolean} outcome: {enum: [applied, released, rejected, null]} activation_ready: {type: boolean} next_customer_action: {enum: [stop_then_start, null]} customer_power_cycle_permitted: {type: boolean} operator_review_required: {type: boolean} settlement_status: {enum: [pending_admission, reserved, capture_pending, captured, release_pending, released, under_review, not_reserved]} updated_at: {oneOf: [{$ref: "#/components/schemas/Timestamp"}, {type: "null"}]}