Link an Event to Digital Passport
As a brand, you want to enrich the digital passport history of your owner. To do so, you will create and send an event to the digital passport.
Our team is working on linking events using
productGroupId
, stay tuned!
Overview
Use cases
- 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.
Find below below the type of event list:
Type of Events | Definition |
---|---|
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. |
Workflow
![](https://files.readme.io/abdff12-Arianee_Event.png)
Let's start 🚀
- 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.
Create & Link an Event to a Digital Passport
URL
Step 1. To create and store the event on the RPC server, use the api/createAndStoreEvent
.
POST - https://{{nmpUrl}}/api/createAndStoreArianeeEvent
Step 2. Write your event to send to the digital passport by filling in the Json Schema.
The API is authenticated with the user rights required →
eventCreate
Body
Field | Mandatory | Type | Description |
---|---|---|---|
certificateId | ✅ | String | Recipient digital passport identification number. |
content | ✅ | Object | Collection of the event content. |
{
"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"
}
]
}
}
]
Return Payload
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
}
Auto-accept an Event
URL
Depending on your use case, you may want the event to be accepted automatically. Once the event is created, use the api/acceptArianeeEvent
.
POST - https://{{nmpUrl}}/api/api/acceptArianeeEvent
Body
Field | Mandatory | Type | Description |
---|---|---|---|
arianeeEventId | ✅ | String | Identification number of the event you wish to accept. |
[
983002786
]
Return Payload
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
}
Updated 3 months ago