PATCH
/
certificates
/
{type}
/
{id}
curl --request PATCH \
  --url https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "public": true,
  "certificatePin": "1234",
  "externalId": "extcertid"
}'
{
  "statusCode": 200,
  "message": "Certificate access properties updated",
  "data": "The access properties of the certificate with certID 'did:<env>:certid:<id>' has been updated."
}

Use Cases

Make a certificate public

In order to make a certificate public, the body property public should be set to true.

Make a certificate private or change the certificate pin

In order to make a certificate private or change the certificate PIN, the body property certificatePin should be passed with the desired PIN.

Change externalId

In order to change the externalId of a certificate, the body property externalId should be passed with the desired externalId.

Delete externalId

In order to delete the externalId of a certificate, the body property externalId should be passed with null.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

type
enum<string>
required

Type of the certificate identifier.

Available options:
certID,
externalId,
fileHash,
hash
id
string
required

Identifier of the certificate.

Example:

"123"

Query Parameters

pin
string

PIN of the certificate (if the certificate is private).

Example:

"1234"

Body

application/json

Data needed to change the access properties of a certificate.

The body is of type object.

Response

200
application/json

Successful certificate access properties update.

The response is of type object.