> ## Documentation Index
> Fetch the complete documentation index at: https://help.onetsolutions.net/llms.txt
> Use this file to discover all available pages before exploring further.

# [Web Hosting] Price a plan change before ordering it

> Return what a plan change would cost without creating an order or an invoice. Includes the prorated product price, the price of the config options carried over to the new plan, the resulting total, the billing cycle it would be billed on, and the longer cycles the customer may switch to. Options with no equivalent are listed apart.



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/hosting/{id}/change-plan-preview
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Billing
    description: >-
      Shopping cart, orders, invoices, payments, payment methods, gateways,
      promo codes, and balance management.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/projects/{project_id}/hosting/{id}/change-plan-preview:
    post:
      tags:
        - Web Hosting
      summary: '[Web Hosting] Price a plan change before ordering it'
      description: >-
        Return what a plan change would cost without creating an order or an
        invoice. Includes the prorated product price, the price of the config
        options carried over to the new plan, the resulting total, the billing
        cycle it would be billed on, and the longer cycles the customer may
        switch to. Options with no equivalent are listed apart.
      operationId: preview_hosting_change_plan
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this Web Hosting.
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: project_id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostingChangePlan'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostingChangePlanPreview'
          description: Plan change quote
        '400':
          description: Invalid plan or the quote could not be produced
        '401':
          description: Authentication credentials missing or invalid
        '403':
          description: Insufficient permissions to access this service
        '404':
          description: Service or target plan not found
      security:
        - BearerAuth: []
components:
  schemas:
    HostingChangePlan:
      type: object
      properties:
        plan_id:
          type: string
          format: uuid
        billing_cycle:
          type: string
          nullable: true
          description: >-
            Cycle to bill the new plan on. Defaults to the current one; only a
            longer cycle is accepted.
      required:
        - plan_id
    HostingChangePlanPreview:
      type: object
      properties:
        product_price:
          type: string
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          nullable: true
        config_options_price:
          type: string
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          nullable: true
        total_price:
          type: string
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          nullable: true
        currency:
          type: string
        billing_cycle:
          type: string
        available_billing_cycles:
          type: array
          items:
            type: string
        recurring_price:
          type: string
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          nullable: true
        recurring_monthly_equivalent:
          type: string
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          nullable: true
        monthly_reference_price:
          type: string
          pattern: ^-?\d{0,10}(?:\.\d{0,2})?$
          nullable: true
        monthly_savings_percent:
          type: string
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          nullable: true
        kept_options:
          type: array
          items:
            $ref: '#/components/schemas/HostingUpgradeConfigOption'
        dropped_options:
          type: array
          items:
            $ref: '#/components/schemas/HostingUpgradeConfigOption'
      required:
        - available_billing_cycles
        - billing_cycle
        - config_options_price
        - currency
        - dropped_options
        - kept_options
        - monthly_reference_price
        - monthly_savings_percent
        - product_price
        - recurring_monthly_equivalent
        - recurring_price
        - total_price
    HostingUpgradeConfigOption:
      type: object
      properties:
        option_name:
          type: string
        value_name:
          type: string
      required:
        - option_name
        - value_name
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````