These docs are for v1.7. Click to read the latest docs for v2.1.

Link an Event to Digital Passport

Link an event to a digital passport to enrich its history.

Before your begin

As a brand, you want to enrich the digital passport history of your Kitten hoodie owner. To do so, you will create and send an event to the digital passport.

Use case examples:

  • Your brand wants to link an event to a user product passport such as a repair service.
  • The customer wishes to attach a warranty to the purchase. Your brand can attach this warranty as an event to the product passport.
  • The customer resells the product, the transfer is timestamped as an event.

⚠️

  • Each event sent per digital passport spends 1 credit.
  • You can send an event to any digital passport. You don't need to be the issuer as long as your ID is defined for its display in the customers' wallet.

Let's start 🚀

Step 1. Write your event to send to the digital passport by filling in the Json Schema. In that case:

    [
  {
    "certificateId": 11573902,
    "content": {
    "$schema":"https://cert.arianee.org/version1/ArianeeEvent-i18n.json",
    "eventType":"experience",
    "language":"en-US",
    "title":"New article available about the Kitten hoodie!",
    "description":"Find out what's behind these connected hoodies. Read Arianee's new article! ",
    "externalContents":
    [{
        "type":"website",
        "title":"Arianee's article",
      "url":"https://www.arianee.org/blog/arianee-kitten-tech-meets-fashion"
    }],
    "medias":
    [{
        "mediaType":"picture",
      "type":"product",
      "url":"https://documentation.arianee.com/pub/1670937293700-Orange3+(3).jpeg"
    }]
    }
  }
]

Types of events:

  • auction - Event issued when a financial transaction and a digital passport transfer are operated.
  • service - In most cases, the event is issued by customer service.
  • initialSale - Event issued for the initial sale of the associated product.
  • warranty - Event issued when a warranty is attached to the product.
  • resell - Event issued when a resell event occurs.
  • repair - Event issued when a repair service occurs.
  • experience - Event issued when an experience happens around the associated product.

Step 2. To create and store the event on the RPC server, use the api/createAndStoreEvent.

📌

The API is authenticated with the user rights required → eventCreate

InputMandatoryTypeDescription
certificateIdStringRecipient digital passport identification number.
contentObjectCollection of the event content.
curl --request POST \
     --url https://documentation.arianee.com/api/createAndStoreArianeeEvent \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data @- 
[
     {
          "certificateId": 11573902,
          "content": {
               "$schema": "https://cert.arianee.org/version1/ArianeeEvent-i18n.json",
               "eventType": "experience",
               "language": "en-US",
               "title": "New article available about the Kitten hoodie!",
               "description": "Find out what's behind these connected hoodies. Read Arianee's new article!",
               "externalContents": [
                    {
                         "type": "website",
                         "title": "Arianee's article",
                         "url": "https://www.arianee.org/blog/arianee-kitten-tech-meets-fashion"
                    }
               ],
               "medias": [
                    {
                         "mediaType": "picture",
                         "type": "product",
                         "url": "https://documentation.arianee.com/pub/1670937293700-Orange3+(3).jpeg"
                    }
               ]
          }
     }
]

Result: Congrats! You just enriched your owner's digital passport history!

{
    "message": "Not yet in blockchain => transaction saved in transaction manager",
    "type": "transactionManager",
    "nonce": 135761,
    "chainId": 77,
    "from": "0x57F5111A7e997a7Ba63CC8976C92decbd86C1B08",
    "data": "0xe8cd79460000000000000000000000000000000000000000000000000000000020c5bac90000000000000000000000000000000000000000000000000000000000b09a8e98bc1aaa5b461bc66554b52104a62fd01ffab2e9fc4440880ebdf806f7036a8f00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a79b29ad7e0196c95b87f4663ded82fbf2e3add80000000000000000000000000000000000000000000000000000000000000000",
    "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
    "gasLimit": 500000,
    "gasPrice": "48000000000",
    "value": "0x00",
    "readableTransaction": {
        "contractName": "store",
        "from": "0x57F5111A7e997a7Ba63CC8976C92decbd86C1B08",
        "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
        "constant": false,
        "inputs": [
            {
                "name": "_eventId",
                "type": "uint256"
            },
            {
                "name": "_tokenId",
                "type": "uint256"
            },
            {
                "name": "_imprint",
                "type": "bytes32"
            },
            {
                "name": "_uri",
                "type": "string"
            },
            {
                "name": "_providerBrand",
                "type": "address"
            }
        ],
        "name": "createEvent",
        "outputs": [],
        "payable": false,
        "stateMutability": "nonpayable",
        "type": "function",
        "signature": "0xe8cd7946",
        "arguments": [
            {
                "value": 549829321,
                "name": "_eventId"
            },
            {
                "value": 11573902,
                "name": "_tokenId"
            },
            {
                "value": "0x98bc1aaa5b461bc66554b52104a62fd01ffab2e9fc4440880ebdf806f7036a8f",
                "name": "_imprint"
            },
            {
                "value": "",
                "name": "_uri"
            },
            {
                "value": "0xA79B29AD7e0196C95B87f4663ded82Fbf2E3ADD8",
                "name": "_providerBrand"
            }
        ]
    },
    "contentImprint": "0x98bc1aaa5b461bc66554b52104a62fd01ffab2e9fc4440880ebdf806f7036a8f",
    "arianeeEventId": 549829321
}

Step 3. Optional - Depending on your use case, you may want the event to be accepted automatically. Once the event is created, use the api/acceptArianeeEvent.

InputMandatoryTypeDescription
arianeeEventIdStringIdentification number of the event you wish to accept.

Result: message - Not yet in Blockchain. Transaction saved in transaction manager.

{
  "message": "Not yet in blockchain => transaction saved in transaction manager",
  "type": "transactionManager",
  "nonce": 135761,
  "chainId": 77,
  "from": "0x57F5111A7e997a7Ba63CC8976C92decbd86C1B08",
  "data": "0xe8cd79460000000000000000000000000000000000000000000000000000000020c5bac90000000000000000000000000000000000000000000000000000000000b09a8e98bc1aaa5b461bc66554b52104a62fd01ffab2e9fc4440880ebdf806f7036a8f00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a79b29ad7e0196c95b87f4663ded82fbf2e3add80000000000000000000000000000000000000000000000000000000000000000",
  "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
  "gasLimit": 500000,
  "gasPrice": "48000000000",
  "value": "0x00",
  "readableTransaction": {
    "contractName": "store",
    "from": "0x57F5111A7e997a7Ba63CC8976C92decbd86C1B08",
    "to": "0x5360DbFF3546b920431A20268D2B5DFf8bF9b4dD",
    "constant": false,
    "inputs": [
      {
        "name": "_eventId",
        "type": "uint256"
      },
      {
        "name": "_tokenId",
        "type": "uint256"
      },
      {
        "name": "_imprint",
        "type": "bytes32"
      },
      {
        "name": "_uri",
        "type": "string"
      },
      {
        "name": "_providerBrand",
        "type": "address"
      }
    ],
    "name": "createEvent",
    "outputs": [],
    "payable": false,
    "stateMutability": "nonpayable",
    "type": "function",
    "signature": "0xe8cd7946",
    "arguments": [
      {
        "value": 549829321,
        "name": "_eventId"
      },
      {
        "value": 11573902,
        "name": "_tokenId"
      },
      {
        "value": "0x98bc1aaa5b461bc66554b52104a62fd01ffab2e9fc4440880ebdf806f7036a8f",
        "name": "_imprint"
      },
      {
        "value": "",
        "name": "_uri"
      },
      {
        "value": "0xA79B29AD7e0196C95B87f4663ded82Fbf2E3ADD8",
        "name": "_providerBrand"
      }
    ]
  },
  "contentImprint": "0x98bc1aaa5b461bc66554b52104a62fd01ffab2e9fc4440880ebdf806f7036a8f",
  "arianeeEventId": 549829321
}