# Order one service

`POST /v1/order/@product_id` · scope `orders:write`

Create an order for one plan by `product_id`, `cycle`, `domain` (legacy form; prefer POST /v1/order). Requires both `orders:write` and `billing:write`: missing either returns 403 `insufficient_scope`.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/order/@product_id` |
| Method | `POST` |
| Scope | `orders:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `product_id` | path | integer | yes | Product ID (service plan, certificate) |
| `domain` | body | string | no | Domain name, ie. example.com, may be optional |
| `cycle` | body | string | no | Billing period symbol |
| `pay_method` | body | integer | no | Payment method ID |
| `custom` | body | array | no | Additional options data available for sop products |
| `promocode` | body | string | no | Promotion code |
| `aff_id` | body | integer | no | Affiliate ID |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/order/26" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "domain": "<domain>",
  "cycle": "<cycle>",
  "pay_method": "<pay_method>",
  "custom": "<custom>",
  "promocode": "<promocode>",
  "aff_id": 55
}'
```

`$TINO_TOKEN` is a token with the scope `orders:write`. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): Python `client.cart.order_product(product_id, domain=...)`, Node.js `await client.cart.orderProduct(productId, { domain: ... });`, PHP `$client->cart->orderProduct($productId, ['domain' => ...]);`.

## Example response

No live sample: the route changes real data or the test account has no data for it. The answer is a JSON object; errors follow the common shape in [Calling the Tino API](/en/docs/api#errors).
