POST
/
assets
curl --request POST \
  --url https://lab.trustos.telefonicatech.com/track/v2/assets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "assetId": "asset-test-01",
  "data": {
    "id": "A2839RP",
    "version": "1"
  },
  "metadata": {
    "color": "red",
    "position": {
      "x": "23.34",
      "y": "-24.22"
    }
  }
}'
{
  "statusCode": 201,
  "message": "Asset created",
  "data": {
    "assetId": "asset-test-01",
    "data": {
      "id": "A2839RP",
      "version": "1"
    },
    "networkId": 10004,
    "assetHash": "6c253e352981fabaf6ba78a301cd116320010a13abe8abf8428eaedcee7ddabd",
    "transactions": [
      {
        "metadata": {
          "color": "red",
          "position": {
            "x": "23.34",
            "y": "-24.22"
          }
        },
        "timestamp": 1711538908,
        "userOwner": "did:user:{issuer}",
        "hash": "456fc02752e48108af8548b4544c3ab6deb30d091567cff0b5d69a3beda5678d",
        "smartContract": "0xabcdbcbff5fa05e060e7dfe3e608cba010d11abc",
        "transactionHash": "0x456dbcbff5fa05e060e7dfe3e608cba010d112c75ffbc6531a09b2a1351b3452"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

networkId
number
required

Network identifier where the evidence will be registered.

Example:

10004

Body

application/json

Data needed for the creation of an asset.

The body is of type object.

Response

201
application/json

Successful asset creation.

The response is of type object.