devdocs.educhain.xyz
  • Getting Started
  • EDUChain
    • What is EDUChain?
    • Arbitrum Orbit Overview
    • How to Run a Full Node for an Orbit Chain
    • Block Explorer
  • Start Building
    • Quick Start
    • Faucet
    • Asset Bridging
    • Smart Contracts
      • Write a Contract
      • Deploy Using Hardhat
      • Verify Contracts
    • Open Campus ID Connect SDK
    • Open Campus Achievements
      • Introduction
      • Getting Started
      • Integration Guide
      • API Specifications
      • Appendix
  • Services
    • Automation & Off-chain Data
      • Gelato Web3 Functions
    • Bridges
      • Layer Zero
    • Indexers
      • Goldsky
    • Oracles
      • DIA
    • Relay
      • Gelato Relay
    • Wallets
      • Privy
      • Web3Auth
  • Support Resources
    • Community Forum
    • Developer Support
  • FAQ
    • FAQ
Powered by GitBook
On this page
Export as PDF
  1. Start Building
  2. Open Campus Achievements

API Specifications

PreviousIntegration GuideNextAppendix

Last updated 29 days ago

Staging (Sandbox) OCA Issuance Endpoint:

POST <https://api.vc.staging.opencampus.xyz/issuer/vc>

Production OCA Issuance Endpoint

POST <https://api.vc.opencampus.xyz/issuer/vc>

Authorization

Header: {  X-API-KEY: <your api key> }

Body (raw JSON)

{
	"credentialPayload": { ... },
	"holderOcId": "bob.edu"
}
name
type
example

credentialPayload

object

holderOcId

string

bob.edu

More on Credential Payload

Credential Payload is what you would use to represent the credential that you are issuing. We accept the following fields. Some of them are required and some of them are optional. Here we list the specifications for the credential payload based on the OpenBadge standard.

Please refer to for explanation of specific fields. This section is dedicated to technical specification for the properties.

credentialPayload

Property Name
Data Type
Required
Public
Example
Remark

awardedDate

string

Y

Y

2023-09-08T16:00:00.000Z

ISO 8601 Date Format

description

string

Y

Y

my school certification

validFrom

string

Y

Y

2023-09-08T16:00:00.000Z

ISO 8601 Date Format

validUntil

string

N

Y

2023-09-08T16:00:00.000Z

ISO 8601 Date Format

image

string

N

Y

https://image.com/img/11111.jpg

Valid http uri

credentialSubject

object

Y

Y

{ … }

see below details

credentialSubject

Property Name
Data Type
Required
Public
Example
Remark

achievement

object

Y

Y

{ … }

see below details

name

string

Y

N

Bob

stored but not exposed to public

email

string

Y

N

bob@mycompany.xyz

stored but not exposed to public

profileUrl

string

N

Y

https://mycompany.xyz/profiles/public/11223344

this should be users public profile

image

string

N

Y

https://image.com/img/11111.jpg

Valid http uri

ext:OC_CUSTOM:custom

object

N

Y

{ … }

unspecified blob of custom data

achievement

Property Name
Data Type
Required
Public
Example
Remark

identifier

string

Y

Y

a8505caa-8e3a-4c07-aae2-94944c6b52fc

stored on-chain maxLength 50 characters

achievementType

string

Y

Y

Certificate

see appendix for valid achievement types

name

string

Y

Y

Blockchain Certification

description

string

Y

Y

An introductory blockchain bootcamp class

attachments

array

N

Y

[ { pdf: “….” , png: “….“ }, { … } ]

no standard for internal objects

{
    "validFrom": "2023-12-10T16:00:00.000Z",
    "awardedDate": "2023-12-10T16:00:00.000Z",
    "description": "An achievement for achieving outstanding results in mathematics course",
    "credentialSubject": {
        "name": "John Doe",
        "type": "Person",
        "email": "[johndoe@something.edu](mailto:johndoe@something.edu)",
        "image": "[https://img.freepik.com/premium-vector/gold-medal-with-gold-ribbon-that-says-gold_1134661-43944.jpg](https://img.freepik.com/premium-vector/gold-medal-with-gold-ribbon-that-says-gold_1134661-43944.jpg)",
        "profileUrl": "[https://mycourse.xyz/profile/johndoe](https://mycourse.xyz/profile/johndoe)",
        "achievement": {
            "name": "Gold Medal Achievements",
            "identifier": "tt:1111222333",
            "description": "Reached 200 points in the intermediate mathematics",
            "achievementType": "Achievement"
    }
}
Schema Definition Section