Post v1vcissuerstore - Terminal 3 Documentation

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

cURL

curl --request POST \
  --url https://staging.terminal3.io/v1/vc/issuer/store \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <x-api-token>' \
  --data '
{
  "vc": {
    "@context": [\
      "<string>"\
    ],
    "type": [\
      "<string>"\
    ],
    "issuer": "<string>",
    "credentialSubject": {
      "id": "<string>"
    },
    "id": "<string>",
    "proof": {
      "type": "<string>",
      "proofPurpose": "<string>",
      "verificationMethod": "<string>",
      "created": "<string>",
      "proofValue": "<string>",
      "mandatoryPointers": [\
        "<string>"\
      ],
      "cryptosuite": "<string>",
      "@context": [\
        "<string>"\
      ]
    },
    "validFrom": "<string>",
    "validUntil": "<string>"
  }
}
'```

```python
import requests

url = "https://staging.terminal3.io/v1/vc/issuer/store"

payload = { "vc": {
        "@context": ["<string>"],
        "type": ["<string>"],
        "issuer": "<string>",
        "credentialSubject": { "id": "<string>" },
        "id": "<string>",
        "proof": {
            "type": "<string>",
            "proofPurpose": "<string>",
            "verificationMethod": "<string>",
            "created": "<string>",
            "proofValue": "<string>",
            "mandatoryPointers": ["<string>"],
            "cryptosuite": "<string>",
            "@context": ["<string>"]
        },
        "validFrom": "<string>",
        "validUntil": "<string>"
    } }
headers = {
    "x-api-token": "<x-api-token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'x-api-token': '<x-api-token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    vc: {
      '@context': ['<string>'],
      type: ['<string>'],
      issuer: '<string>',
      credentialSubject: {id: '<string>'},
      id: '<string>',
      proof: {
        type: '<string>',
        proofPurpose: '<string>',
        verificationMethod: '<string>',
        created: '<string>',
        proofValue: '<string>',
        mandatoryPointers: ['<string>'],
        cryptosuite: '<string>',
        '@context': ['<string>']
      },
      validFrom: '<string>',
      validUntil: '<string>'
    }
  })
};

fetch('https://staging.terminal3.io/v1/vc/issuer/store', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [\
  CURLOPT_URL => "https://staging.terminal3.io/v1/vc/issuer/store",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'vc' => [
        '@context' => [
                '<string>'
        ],
        'type' => [
                '<string>'
        ],
        'issuer' => '<string>',
        'credentialSubject' => [
                'id' => '<string>'
        ],
        'id' => '<string>',
        'proof' => [
                'type' => '<string>',
                'proofPurpose' => '<string>',
                'verificationMethod' => '<string>',
                'created' => '<string>',
                'proofValue' => '<string>',
                'mandatoryPointers' => [
                                '<string>'
                ],
                'cryptosuite' => '<string>',
                '@context' => [
                                '<string>'
                ]
        ],
        'validFrom' => '<string>',
        'validUntil' => '<string>'
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "x-api-token: <x-api-token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>

Response Codes

JSON Response Example

{
  "data": {
    "cid": "<string>",
    "vc": {
      "@context": [
        "<string>"
      ],
      "id": "<string>",
      "issuer": "<string>",
      "credentialSubject": {
        "id": "<string>"
      },
      "type": [
        "<string>"
      ],
      "validFrom": "<string>",
      "validUntil": "<string>",
      "proof": {
        "type": "<string>",
        "proofPurpose": "<string>",
        "verificationMethod": "<string>",
        "created": "<string>",
        "mandatoryPointers": [
          "<string>"
        ],
        "cryptosuite": "<string>",
        "@context": [
          "<string>"
        ],
        "proofValue": "<string>"
      },
      "credentialStatus": "<unknown>"
    }
  }
}
{
  "errors": [
    {
      "code": "<string>",
      "message": "<string>"
    }
  ]
}