Buy a certificate
POST /api/v1/ssls/initialize
Section titled “POST /api/v1/ssls/initialize”This is the purchase. It reserves the certificate and debits your balance. Nothing is sent to the CA yet.
Request
{ "packageCode": "POSITIVESSL", "domainName": "apiname.com"}| Field | Required | Notes |
|---|---|---|
packageCode |
required | From GET /api/v1/products/ssls — the productCode field. |
domainName |
required | The certificate’s main name. |
Response — 200
{ "success": true, "message": "SSL certificate purchase initialized successfully. Waiting for installation.", "certificateId": "5e8c2a71-4b93-4f06-ae25-1d7f9c3b8042", "status": "WaitingForInstall", "dcvDetails": null, "csr": null, "privateKey": null}Errors
| Code | Meaning and fix |
|---|---|
Ssl:10003 |
packageCode unknown. |
Ssl:10067 |
The package is no longer on sale. Pick another. |
Ssl:10052 |
A certificate with a different package is already awaiting configuration for this domain. |
Ssl:10013 |
An active certificate already exists for this domain. Reissue or renew instead. |
Ssl:10044 / Ssl:10046 |
No price configured for this package. Open a ticket. |
Ssl:10045 |
Insufficient balance. data gives the shortfall. |
Ssl:10047 |
Your balance is suspended. |
Ssl:10001 |
Invalid domain name. |