Create a Schema
| Time | Status | User Agent | |
|---|---|---|---|
| Make a request to see history. |
URL Expired
The URL for this request expired after 30 days.
To create a Schema (smart contract) on a blockchain, supply a name, a short description, the schema specification itself, the wallet to be the owner of the schema, and optionally include meta parameters to link the Schema with external data.
A created Schema, which must comply with the JSON Schema standard, is a template that all future Records created with the Schema must comply with.
Note that once a Schema is created, the "specification" and the "wallet" parameters can no longer be updated. Also note that chain and contract parameters are automatically assigned to a created Schema.
Schema Fields
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The id of the assuror |
| expand | string | No | Comma separated list of parameters to expand [wallet, chain, contract, assuror] |
| name | string | Yes | A name for the schema |
| description | string | Yes | A short description for the wallet |
| meta | json | No | Optional key/value store to link external data |
| specification | json | Yes | The schema object |
| wallet | string | Yes | The walletId of the wallet to be used as the owner of the schema contract |
Example CURL Command
curl --request POST \
--url https://api.paystand.co/v3/assurety/assurors/c26c288cc9d8477eb58fe9c5/schemas \
--header 'Accept: ••••' \
--header 'Authorization: Bearer ••••' \
--header 'Content-Type: ••••' \
--header 'X-CUSTOMER-ID: ••••' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"name": "Generic Schema",
"description": "A generic assurety schema.",
"meta": {},
"specification": {
"properties": {
"@type": {
"type": "string"
},
"hello": {
"type": "string"
}
},
"type": "object"
},
"wallet": "cbac9afb00bb4bcab86a8ad5"
}
'
Click Try It! to start a request and see the response here! Or choose an example: application/json