# Order domain

`POST /v1/domain/order` · scope `domains:write`

Create a standalone domain registration or transfer order. Check that the domain is available first (`POST /v1/domain/lookup`), otherwise the order may be cancelled.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/domain/order` |
| Method | `POST` |
| Scope | `domains: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 |
| --- | --- | --- | --- | --- |
| `name` | body | string | no | Domain name |
| `years` | body | string | no | Number of years |
| `action` | body | string | no | register\|transfer |
| `tld_id` | body | string | no | TLD id |
| `pay_method` | body | integer | no | Payment method ID |
| `epp` | body | string | no | EPP Transfer code, required when transfering some domains |
| `nameservers` | body | array | no | Optional array with 2 - 4 nameservers that you want to use |
| `registrant` | body | integer | no | Optional contact ID to use for registrant contact this domain |
| `admin` | body | integer | no | Optional contact ID to use for admin contact this domain |
| `tech` | body | integer | no | Optional contact ID to use for tech contact this domain |
| `billing` | body | integer | no | Optional contact ID to use for billing contact this domain |
| `data` | body | array | no | Addditional data required for some TLDs |
| `aff_id` | body | integer | no | Affiliate ID |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/domain/order" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example.com",
  "years": "<years>",
  "action": "<action>",
  "tld_id": "<tld_id>",
  "pay_method": "<pay_method>",
  "epp": "<epp>",
  "nameservers": "<nameservers>",
  "registrant": "<registrant>",
  "admin": "<admin>",
  "tech": "<tech>",
  "billing": "<billing>",
  "data": "<data>",
  "aff_id": 55
}'
```

`$TINO_TOKEN` is a token with the scope `domains:write`.

SDK ([SDK & examples](/en/docs/sdk)): Python `client.domains.order(name=...)`, Node.js `await client.domains.order({ name: ... });`, PHP `$client->domains->order(['name' => ...]);`.

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