NOTICE: This API is a work in progress and may change until finalized.
Production: API_URL=https://tokenizer-api.chainparency.com
To obtain your API token, navigate to Tokeniezer, select an organization, open Admin tab and generate api key.
Add the following header to all of your requests:
Authorization: Bearer $API_TOKEN
curl "$API_URL/v1/orgs/$ORG_ID/assets" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_TOKEN" \
--data-binary '{"name":"Octocat", "description":"" }' \
Example Response
{
"asset": {
"updatedAt": "2020-07-15T10:40:08.105771227-05:00",
"createdAt": "2020-07-15T10:40:08.105771093-05:00",
"id": "LkiEUtJNndhbbz8qfFQW",
"orgID": "eboThjQLWfAd79dvQ05O",
"name": "Name of asset",
"description": "",
"externalID": "",
"createdBy": "tnbOrxNaHwGqh9gwDv0y",
"category": "company",
"image": "https://somewhere.com/abc.png",
"tokenURI": "https://somewhere.com/token",
"contractAddress": "0xABC",
"tokenID": 123,
"mintTx": "0xABC",
"owner": "0xABC",
"documents": [],
"customFields": [],
"contractAddressTokens": "0xABC",
}
}
List assets for an organization.
curl "$API_URL/v1/orgs/$ORG_ID/assets" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_TOKEN" \
Example Response
{
"assets": [
{
"updatedAt": "2020-07-15T10:40:08.105771227-05:00",
"createdAt": "2020-07-15T10:40:08.105771093-05:00",
"id": "LkiEUtJNndhbbz8qfFQW",
"orgID": "eboThjQLWfAd79dvQ05O",
"name": "Name of asset",
"description": "",
"externalID": "",
"createdBy": "tnbOrxNaHwGqh9gwDv0y",
"category": "company",
"image": "https://somewhere.com/abc.png",
"tokenURI": "https://somewhere.com/token",
"contractAddress": "0xABC",
"tokenID": 123,
"mintTx": "0xABC",
"owner": "0xABC",
"documents": [],
"customFields": [],
"contractAddressTokens": "0xABC",
}
],
"role": "admin"
}
List assets that was created by organization.
curl "$API_URL/v1/orgs/$ORG_ID/assets" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_TOKEN" \
Example Response
{
"assets": [
{
"updatedAt": "2020-07-15T10:40:08.105771227-05:00",
"createdAt": "2020-07-15T10:40:08.105771093-05:00",
"id": "LkiEUtJNndhbbz8qfFQW",
"orgID": "eboThjQLWfAd79dvQ05O",
"name": "Name of asset",
"description": "",
"externalID": "",
"createdBy": "tnbOrxNaHwGqh9gwDv0y",
"category": "company",
"image": "https://somewhere.com/abc.png",
"tokenURI": "https://somewhere.com/token",
"contractAddress": "0xABC",
"tokenID": 123,
"mintTx": "0xABC",
"owner": "0xABC",
"documents": [],
"customFields": [],
"contractAddressTokens": "0xABC",
}
],
"role": "admin"
}
curl "$API_URL/v1/assets/$ASSET_ID" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $API_TOKEN" \
Example Response
{
"asset": {
"updatedAt": "2020-07-15T10:40:08.105771227-05:00",
"createdAt": "2020-07-15T10:40:08.105771093-05:00",
"id": "LkiEUtJNndhbbz8qfFQW",
"orgID": "eboThjQLWfAd79dvQ05O",
"name": "Name of asset",
"description": "",
"externalID": "",
"createdBy": "tnbOrxNaHwGqh9gwDv0y",
"category": "company",
"image": "https://somewhere.com/abc.png",
"tokenURI": "https://somewhere.com/token",
"contractAddress": "0xABC",
"tokenID": 123,
"mintTx": "0xABC",
"owner": "0xABC",
"documents": [],
"customFields": [],
"contractAddressTokens": "0xABC",
},
"role": "admin"
}
To be documented
- Transfer Asset: POST "$API_URL/v1/assets/$ASSET_ID/transfer"
- Asset history: GET "$API_URL/v1/assets/$ASSET_ID/history
- Mint tokens for an asset: POST "$API_URL/v1/assets/$ASSET_ID/tokens"
- Transfer tokens: POST "$API_URL/v1/assets/$ASSET_ID/tokens/transfer"
- Get token holders: GET "$API_URL/v1/assets/$ASSET_ID/tokens"
- Create organization: POST "$API_URL/v1/orgs"
- Get organization information: POST "$API_URL/v1/orgs/$ORG_ID"
- Add member to an organization: POST "$API_URL/v1/orgs/$ORG_ID/members"
- Remove member from an organization: DELETE POST "$API_URL/v1/orgs/$ORG_ID/members/$MEMBER_ID"
- Get organization assets: GET "$API_URL/v1/orgs/$ORG_ID/assets"
- Get organization tokens/shares: GET "$API_URL/v1/orgs/$ORG_ID/tokens"
- Get organization history: GET "$API_URL/v1/orgs/$ORG_ID/history"