POST
/
certificates?type=asset
curl --request POST \
  --url 'https://lab.trustos.telefonicatech.com/cert/v2/certificates?type=asset' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Certificate",
  "description": "Certificate description",
  "assetId": "asset-01",
  "from": 1234567,
  "to": 1234567,
  "content": {},
  "public": true,
  "expires": 1234567890,
  "certificatePin": "1234",
  "externalId": "extcertid"
}'
{
  "statusCode": 201,
  "message": "Certificate created",
  "data": {
    "certID": "did:local:certid:123124",
    "data": {
      "name": "Certificate",
      "description": "Certificate description",
      "type": "content",
      "content": {},
      "issuer": "did:user:{issuer}",
      "issuedOn": 1696840286580,
      "hash": "a2ac9343a3d94e41bbc5c152fb8382c5233a47cee23cf765c7e6d67d9e61a142",
      "expires": 1696840286580
    },
    "metadata": [
      {
        "type": "Evidence",
        "networkId": 10004,
        "smartContract": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
        "transactionHash": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
        "trustPointHash": "a2ac9343a3d94e41bbc5c152fb8382c5233a47cee23cf765c7e6d67d9e61a142",
        "timestamp": 1696840286580
      }
    ],
    "access": {
      "public": true,
      "certificatePin": "1234",
      "externalId": "extcertid"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

qualified
boolean

Flag that indicates whether the certificate should be qualified sign.

networkId
string
required

Network identifier where the trustpoint will be registered.

Example:

10004

Body

application/json

Data needed for the creation of a certificate from an asset.

The body is of type object.

Response

201
application/json

Successful certificate creation.

The response is of type object.