compute
POST /v1/certificates/orders
Start a certificate order. Spends nothing.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão billing.payment.manage; uma chave sem ela é recusada com 403, e não 404.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X POST https://api.zinndigital.com/v1/certificates/orders \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "product_code": <string>, "common_name": <string>, "currency": <string> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
⭐ **This does NOT buy anything** — `submit` does. The split exists so the refusals a customer can act on arrive while they are still on the screen rather than as a failed background job, and so a half-filled form can never place an order. ⛔ Answers `422` when the product does not cover what was asked for: a wildcard name on a non-wildcard certificate, more domains than the **price** includes, a term the authority does not sell, or an account not in good standing. Each of those is an order the authority would happily charge for and never issue. Requires `billing.payment.manage`.
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
product_code | string | Sim | — |
common_name | string | Sim | The primary domain. A leading `*.` is a wildcard and is refused on a product that does not cover one — the authority would accept it at order time and refuse it at issuance, aft… |
currency | string | Sim | — |
period_years | integer | Não | — |
domains | string[] | Não | Additional names. ⛔ Capped by the product's `included_domains` — what the **price** covers — not by what the authority would technically allow, because it bills names beyond the… |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
id | Uuid | Sim | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
product_code | string | Sim | The stable machine key (`positive_ssl`). ⛔ Match on this, never on `product_name` — the name is the certificate authority's marketing string and can be corrected without the pro… |
product_name | string | Sim | What the customer reads — the authority's own product name (`PositiveSSL`, `S/MIME Personal`, `Unified Communications Certificate (UCC)`). ⛔ Never a translation key: these are t… |
state | string<pending, awaiting_validation, issued, cancelled, failed, expired> | Sim | ⛔⛔ **`awaiting_validation` means PAID AND NOT ISSUED.** The authority charges at order time and then waits for the customer to prove they control the domain. It is deliberately… |
common_name | string | Sim | The primary domain on the certificate. |
domains | string[] | Sim | Additional names (SANs). Empty for a single-domain product. |
period_years | integer | Sim | — |
price_minor | integer | Sim | What the customer is charged, frozen at order. A copy rather than a join, so an operator repricing the catalogue cannot move an existing bill. |
currency | string | Sim | — |
validation_instructions | string | Sim | What the customer must still do, in the authority's own words. ⭐ Carried as text rather than parsed: every authority words it differently, and a half-parsed instruction is worse… |
certificate_pem | string | Sim | The issued certificate. ⭐ Public by nature — it is served to every visitor of the site — which is why it is returned here while its **private key never is**: a customer-generate… |
chain_pem | string | Sim | — |
message | string | Sim | Why it failed or was cancelled, in a sentence the customer reads. |
ordered_at | string | Sim | — |
issued_at | string | Sim | — |
expires_at | string | Sim | — |
days_until_expiry | integer | Sim | Whole days until `expires_at`, negative once it has lapsed. ⛔ `null` and `0` are DIFFERENT answers and a client must not collapse them: `null` means we could not read an expiry… |
renewable | boolean | Sim | Whether to offer a re-order now — issued, inside the 30-day window, and with no renewal already in flight. ⛔ Computed here rather than left to a client to derive from `expires_a… |
free_alternative_exists | boolean | Sim | Whether Let's Encrypt issues this kind of certificate for nothing. Carried onto the renewal prompt for the same reason it is on the buy screen: say so **before** asking somebody… |
renewal_of | Uuid | Sim | The order this one renews, so a client can show the chain. |
last_reminded_at | string | Sim | When the renewal sweep last REACHED this order — which is not the same as when it last emailed about it. ⛔ The sweep stamps this for every row it reaches **including the ones it… |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429