# Order SSL certificate

`POST /v1/certificate/order` · scope `services:write`

Create a standalone SSL certificate order.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/certificate/order` |
| Method | `POST` |
| Scope | `services: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` | body | integer | no | Certificate product ID |
| `csr` | body | string | no | Domain name |
| `years` | body | integer | no | Number of years |
| `pay_method` | body | integer | no | Payment method ID |
| `approver_email` | body | string | no | Email addres used in domain validation |
| `admin` | body | integer | no | Admin contact ID |
| `tech` | body | integer | no | Tech contact ID |
| `billing` | body | integer | no | Billing contact ID |
| `organization` | body | array | no | Organization details |
| `software` | body | integer | no | Server/Software ID |
| `data` | body | array | no | Addditional data required for some products |
| `aff_id` | body | integer | no | Affiliate ID |

## Example request

```bash
curl -X POST "https://api.tino.vn/v1/certificate/order" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "product_id": "<product_id>",
  "csr": "example.com",
  "years": "<years>",
  "pay_method": "<pay_method>",
  "approver_email": "<approver_email>",
  "admin": "<admin>",
  "tech": "<tech>",
  "billing": "<billing>",
  "organization": "<organization>",
  "software": "<software>",
  "data": "<data>",
  "aff_id": 55
}'
```

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

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

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