取消重簽接口
取消一筆進行中的重簽請求,將證書恢復到重簽前的狀態。
取消成功後:若證書此前已有簽發記錄,將恢復上一張已簽發證書(ca_status 回到 issued);若是首次申請的重簽,則回退到待提交狀態(ca_status 為 awating_csr)。
接口地址
POST /api/v1/certificate/abort-reissue
Host:
...
完整地址
/api/v1/certificate/abort-reissue
請求
Content-Type: application/json
{
"service_id": "o91bZ" // 證書編號,必填,下單時候返回的 `service_id`
}
響應
- response
- errors
HTTP/1.1 200 OK
Content-Type: application/json
{
"success": true,
"data": {
"service_id": "o91bZ", // 與請求傳入的證書編號一致,回顯的鍵名與請求參數名相同
"status": "issued", // 證書狀態
"ca_status": "issued", // CA 側狀態:有歷史簽發記錄時為 `issued`,首次申請則回退為 `awating_csr`
"message": "Reissue request cancelled successfully"
}
}
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"success": false,
"message": "The certificate is not found, or has been cancelled or refunded"
}
HTTP/1.1 422 Unprocessable Content
Content-Type: application/json
{
"success": false,
"message": "證書已處於簽發狀態,無需放棄重簽"
}
錯誤碼
| HTTP 狀態碼 | message | 含義與處理建議 |
|---|---|---|
| 400 | Order is manually locked, aborting reissue is not supported | 訂單被人工鎖定,不支持取消重簽,聯繫客服處理 |
| 400 | Certificate submission is pending, please try again later | 證書正在提交至 CA,稍後重試 |
| 400 | CA 返回的錯誤信息 | 取消 CA 側重簽失敗,按 message 內容排查;沒有有效信息時請聯繫客服 |
| 404 | The certificate is not found, or has been cancelled or refunded | 證書不存在、已取消或已退款,或不屬於當前 API 密鑰對應的工作空間 |
| 422 | 證書已處於簽發狀態,無需放棄重簽 | 證書不在重簽流程中,無需取消 |
| 422 | 證書已吊銷,無法放棄重簽 | 證書已吊銷,無法取消重簽 |
| 422 | 證書尚未提交,無需放棄重簽 | 證書尚未提交至 CA,無需取消 |
| 422 | 未找到可恢復的歷史簽發記錄 | 數據異常,聯繫客服處理 |
| 422 | 參數校驗信息 | 未提供證書編號,或編號無法解析;響應同時帶 errors 明細 |
422 的響應體帶
errors 明細參數校驗失敗(422)時,除了 message 外還會返回 errors 字段,標明是哪個參數不合法:
{
"success": false,
"message": "The service ID is required",
"errors": {
"service_id": ["The service ID is required"]
}
}
前置條件
調用前請確認以下條件全部滿足,否則會被拒絕:
- 證書當前
ca_status為pending,即重簽請求正在處理中 - 訂單未被人工鎖定
- 證書不在提交隊列中(
submit_pending為否) - 證書屬於當前 API 密鑰對應的工作空間
如需重新發起重簽,請使用證書重簽接口。