---
title: "Place an order (pending + proforma)"
method: POST
path: "/v1/orders"
tags: ["Orders"]
---

# Place an order (pending + proforma)

`POST /v1/orders`

## Request

- Base URL: `https://developers.servera.lt`
- URL: `https://developers.servera.lt/v1/orders`
- Auth: HTTP bearer

Place an order for one or more catalog items.

Creates a **PENDING** order and an **UNPAID proforma** invoice - it does NOT charge
or provision anything on its own. Pay it with `POST /invoices/{invoice_id}/pay`
(from account credit) or via the returned `pay_url`. Uses the exact same cart +
checkout engine as the web panel.

An **`Idempotency-Key`** header is REQUIRED - a retry with the same key returns the
original result instead of creating a duplicate order.

Returns: `order_number`, `status` (`pending`), the amount breakdown
(`net` = be PVM, `vat`, `vat_rate` %, `gross` = su PVM; `total` = `gross`), and an
`invoice` object with `id`, `invoice_number` (the proforma number), `document_type`
(`proforma`), the same net/vat/gross, `pay_url` and `pay_via_api`.

## Headers

- `Idempotency-Key` string, nullable

## Request body

- OrderCreateBody
  - `items` OrderItemModel[], required: One or more products to order.
    - `type` 'product': Item type. 'product' = a new VPS/VDS/hosting or other catalog product.
    - `product_id` integer, required: Product id (from GET /products).
    - `billing_cycle` string, required: Billing cycle the product offers: monthly, quarterly, semiannually, annually, biennially or triennially.
    - `quantity` integer: How many (default 1).
    - `config_options` object, nullable: Configurable options, shape {"<option_id>": {"value_id": <id>}} - e.g. the OS template.
    - `hostname` string, nullable: Hostname/primary domain for cPanel or VPS products (e.g. 'app.example.com').
    - `datacenter` string, nullable: Datacenter code, e.g. 'lt' or 'de'.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/servera/apis/servera-developers-api-2.md) · [All operations](https://skmtc.dev/servera/apis/servera-developers-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/servera/apis/servera-developers-api-2/revisions/2e744791e77f?raw)
