Query Certificate API
Query certificate status via the API.
Endpoint
GET /api/v1/certificate/detail?service_id=o91bZ
Host:
...
Full URL
/api/v1/certificate/detail?service_id=o91bZ
Request Parameters
service_id- Certificate ID
Internationalized Domain Names (IDN)
Domains in the response (such as the keys of dcv and topleveldomain) are always in punycode (e.g. xn--fiqs8s); match against punycode.
SM2 Dual Certificates (Chinese National Cryptography)
SM2 products whose product ID contains gm (such as keymatic_gm_dv_flex / keymatic_gm_ov_flex / keymatic_gm_ev_flex) return SM2 dual certificates after issuance, consisting of four matching pieces:
| Item | How to obtain |
|---|---|
| Signing certificate | cert_pem_sm2 in the response (issued from the SM2 CSR you submitted when creating the order) |
| Signing private key | The private key corresponding to the CSR you submitted when creating the order; kept by you |
| Encryption certificate | cert_pem_sm2_enc in the response (generated on the CA side) |
| Encryption certificate private key | private_key_sm2_enc in the response (already decrypted by the platform, PKCS#8 PEM, paired with the encryption certificate's public key) |
has_sm2_enc_keyindicates whether the encryption certificate's private key has been decrypted and is ready; after the CA issues the certificate, the platform automatically decrypts and stores it. If it is brieflyfalse, simply retry this API later.- The four pieces are used together for SM2 gateway / Nginx dual-certificate deployment; for non-SM2 products the SM2 fields above are
null/false.
Response
- response
- errors
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1234
{
"success": true,
"message": "OK",
"data": {
"service_id": "o91bZ", // Certificate ID. Integrators should store this value in their business database (the status query, domain validation attempt and validation method change APIs all need this parameter to identify which certificate the request refers to)
"caid": "358174513", // CA order number
/**
- Order status `status`:
- `issued`: issued; `cert_pem` and `ca_pem` are returned only when issued
- `pending`: pending
- `expired`: expired
- `revoked`: revoked
- `refunded`: refunded
*/
"status": "pending",
"cert_pem": null, // PEM of the most recently issued certificate
"ca_pem": null, // Certificate chain of the most recently issued certificate
"cert_pem_sm2_enc": null, // SM2 dual certificates: PEM of the encryption certificate generated by the CA; returned only for SM2 products (product ID contains gm, e.g. keymatic_gm_dv_flex) after issuance
"private_key_sm2_enc": null, // SM2 dual certificates: decrypted private key of the encryption certificate (PKCS#8 PEM); returned only for SM2 products after issuance; used together with the encryption certificate
"has_sm2_enc_key": false, // SM2 dual certificates: whether the encryption certificate's private key has been decrypted and is ready; if false after issuance, retry this API later
"not_before": null, // Not before
"not_after": null, // Not after
"service_expires_at": "2025-12-31 23:59:59", // Order service expiration time
"dcv": {
// DCV validation information
"*.example.com": {
"type": "dns", // Validation type: `dns`, `http`, `https` or `email`
"subdomain": "*", // Subdomain
"topleveldomain": "example.com", // Base domain
"status": "valid", // Domain validation status: `pending` (validation in progress; the user must complete the DNS record, file upload or email check), `valid` (validated), `caa-failure` (CAA check failed), `dnssec-failure` (DNSSEC security validation failed)
"dns": {
// DNS validation info. If the validation type is `dns`, a `dns` block appears here; if it is `email`, an `email` block appears; if it is `http` or `https`, an `http` or `https` block appears.
"type": "cname", // DNS record type
"hostname": "_310dcbbf4cce62f762a2aaa148d556bd", // DNS hostname
"fullname": "_310dcbbf4cce62f762a2aaa148d556bd.example.com", // Full domain name to add the DNS record for
"value": "698d51a19d8a121ce581499d7b701668.bcbe3365e6ac95ea2c0343a2395834dd.20221122.comodoca.com" // DNS record value
}
},
"example2.com": {
"type": "http",
"subdomain": "",
"topleveldomain": "example2.com",
"status": "pending",
"http": {
// HTTP validation info. If the validation type is `http`, an `http` block appears here.
"filename": "310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTP file name
"filecontent": "698d51a19d8a121ce581499d7b70166820221122\n20221122\ncomodoca.com", // HTTP file content
"filepath": ".well-known/pki-validation/", // HTTP file path
"filefullpath": ".well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTP file full path
"url": "http://example2.com/.well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt" // HTTP file URL
}
},
"example3.com": {
"type": "https",
"subdomain": "",
"topleveldomain": "example3.com",
"status": "pending",
"http": {
// HTTPS validation info. If the validation type is `https`, an `https` block appears here.
"filename": "310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTPS file name
"filecontent": "698d51a19d8a121ce581499d7b70166820221122\n20221122\ncomodoca.com", // HTTPS file content
"filepath": ".well-known/pki-validation/", // HTTPS file path
"filefullpath": ".well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTPS file full path
"url": "https://example3.com/.well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt" // HTTPS file URL
}
},
"sub.example4.com": {
"type": "email",
"subdomain": "email",
"topleveldomain": "example4.com",
"status": "pending",
"email": {
// Email validation info. If the validation type is `email`, an `email` block appears here.
"address": "admin@example4.com", // Email address
"available": [
// Available email addresses
"admin@example4.com",
"administrator@example4.com",
"webmaster@example4.com",
"postmaster@example4.com",
"hostmaster@example4.com",
"admin@email.example4.com",
"administrator@sub.example4.com",
"webmaster@sub.example4.com",
"postmaster@sub.example4.com",
"hostmaster@sub.example4.com"
]
}
}
}
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 80
{
"success": false,
"message": "Order not found"
}