> ## 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.

# [Instances] Preview what ordering an instance costs

> Price the configuration the customer is about to order: totals, VAT, the account credit that would be applied and the amount left to pay, plus the contracts still to be accepted, add-ons included.



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/order-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: []
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}/compute/instances/order-preview:
    post:
      tags:
        - Compute
      summary: '[Instances] Preview what ordering an instance costs'
      description: >-
        Price the configuration the customer is about to order: totals, VAT, the
        account credit that would be applied and the amount left to pay, plus
        the contracts still to be accepted, add-ons included.
      operationId: preview_instance_order
      parameters:
        - in: path
          name: organization_id
          schema:
            type: string
          description: Unique identifier of the organization that owns the resource.
          required: true
        - in: path
          name: project_id
          schema:
            type: string
          description: Unique identifier of the project containing the resource.
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceOrderPreview'
        required: true
      responses:
        '200':
          description: Order preview computed successfully
        '400':
          description: Invalid request parameters or configuration
        '401':
          description: Authentication credentials missing or invalid
        '403':
          description: Insufficient permissions
        '404':
          description: Organization, project, image or size not found
      security:
        - BearerAuth: []
components:
  schemas:
    InstanceOrderPreview:
      type: object
      properties:
        name:
          type: string
          default: ''
          maxLength: 255
        size_id:
          type: string
          format: uuid
        volume_id:
          type: string
          format: uuid
          nullable: true
        location_id:
          type: string
          format: uuid
        image_id:
          type: string
          format: uuid
        billing_cycle:
          enum:
            - hourly
            - monthly
            - quarterly
            - semi_annually
            - annually
            - biennially
            - triennially
          type: string
          description: |-
            * `hourly` - hourly
            * `monthly` - monthly
            * `quarterly` - quarterly
            * `semi_annually` - semi_annually
            * `annually` - annually
            * `biennially` - biennially
            * `triennially` - triennially
          x-spec-enum-id: d99231035378900e
        ssh_keys:
          type: array
          items:
            type: string
            format: uuid
        install_management_key:
          type: boolean
          default: true
        vpc_id:
          type: string
          format: uuid
          nullable: true
        project_id:
          type: string
          format: uuid
          nullable: true
        tags:
          type: array
          items:
            type: string
        one_click_apps:
          type: array
          items:
            $ref: '#/components/schemas/OneClickAppSelection'
        control_panel:
          type: string
          nullable: true
          description: Slug or id of an active control panel installed after creation
          maxLength: 100
        addon_ids:
          type: array
          items:
            type: string
            maxLength: 100
          description: >-
            Paid add-ons to order with the instance, billed on the same order as
            the instance. Each entry is a size add-on id
            (available_addons[].id), an add-on id or an add-on slug of the
            chosen size. A Windows image still requires the Windows Server
            licence add-on.
          maxItems: 20
        accepted_contract_ids:
          type: array
          items:
            type: string
            format: uuid
          description: Contract version ids the customer ticked before ordering
      required:
        - billing_cycle
        - image_id
        - location_id
        - size_id
    OneClickAppSelection:
      type: object
      properties:
        slug:
          type: string
          maxLength: 100
          pattern: ^[-a-zA-Z0-9_]+$
        parameters:
          type: object
          additionalProperties: {}
      required:
        - slug
  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-...`).

````