Upload Certificate

Upload Certificate

1. Request Definition

  • API URL
https://base-api.swiftfederation.com/v1.0/cert
  • Request Protocol
POST
  • Request Header

Request Header

  • Request Body
Field Data Type Required Description
customerId Integer M the certificate under customer id
certificate String M certificate
privateKey String M private key
chain String O chain
  • Request Example
POST /v1.2/customer HTTP/1.1
Host: base-api.swiftfederation.com

Authorization:HMAC-SHA256 V265i4K31j991E19:bc051d2e520a462e36455dc75b2bc68e9a135bbf4d2fefbf6d2fc1f28c5aa5dc
Content-Type:application/json; charset=utf-8
X-SFD-Date:20180926T131000Z
X-SFD-Nonce:69527

{"customerId":164,"certificate": "BEGIN CERTIFICATE . END CERTIFICATE","privateKey": "BEGIN RSA PRIVATE KEY . END RSA PRIVATE KEY"}

2. Response Definition

This section is intended to describe response header and body data definition.

2.1. Success Response

  • Success Response Body
Field Data Type Description
id long certificate id
customerId Integer the certificate under customer id.
commonName String common name.
subjectAlternativeNames String subject alternative names
serialNumber String serial number.
issuer String issuer.
organization String organization
organizationalUnit String organizational unit
country String country
stateOrProvince String state or province.
locality String locality
validFrom String valid from.
validTo String valid to.
created String created
expireIn int expireIn
  • Success Response Body Example
HTTP/1.1 200

{
    "cert": {
        "id": 2356,
        "customerId": 123,
        "commonName": "test11.com",
        "subjectAlternativeNames": "DNS:test11.com",
        "serialNumber": "231272262238822062748024707871705586383",
        "issuer": "MySSL.com",
        "organization": "",
        "organizationalUnit": "",
        "country": "CN",
        "stateOrProvince": "",
        "locality": "",
        "validFrom": "2024-06-25T08:59:38Z",
        "validTo": "2025-06-25T08:59:38Z",
        "created": "2024-06-25T13:33:18.256Z",
        "expireIn": 358
    }
}

2.2. Error Response

  • Error Response Code

Error Code

  • Error Response Example
HTTP/1.1 403
{
"code":"Permission.Forbidden",
"message":"Can't access according to this access key id.",
"requestId": "16db8f36813--A-F8-1"
}
           Updated 2024-09-21 03:46:30

results matching ""

    No results matching ""