Auto-Event Campaign
As a brand, you want to enrich the digital passport history for a specific audience, to do so you'll create an auto-event campaign that will be automatically triggered and sent when respecting specific rules.
- 1 event sent per digital passport: 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.
Workflow
Create Auto-Event Campaign
URL
Required rights:
adminoreventCreate
To link an auto-event to a batch of digital passports, use /auto-event.
POST - https://{{nmpUrl}}/auto-event
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | String | ✅ | Name of the Arianee event campaign. |
trigger | eachTransfer, genesis, walletToWallet | ✅ | - eachTransfer: All transfers.- genesisTransfer: Genesis transfers only.- walletToWallet: Based on each transfer but not the genesis. |
content | Object | ✅ | Content of the Arianee Event. For more information on compliant fields, see Event Schema. |
audienceId | String | ❌ | Identification number of the campaign. |
autoAccept | Boolean | ✅ | The field defines if the digital passport owner must automatically accept the Arianee Event. |
enable | Boolean | ❌ | The field defines if the Arianee Event campaign is active or not. Default value: true |
{
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}],\"eventDate\":\"2025-01-20T14:30:00Z\"}",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true
}
Return Payload
| Field | Type | Description |
|---|---|---|
success | Boolean | Indicate success or not. |
{
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}],\"eventDate\":\"2025-01-20T14:30:00Z\"}",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true,
"_id": "678e2302f41acc9691d99a47",
"createdAt": "2025-01-20T10:18:42.743Z",
"updatedAt": "2025-01-20T10:18:42.743Z",
"__v": 0,
"id": "678e2302f41acc9691d99a47"
}
Errors
| Status Code | Success | Code | Error Message | Additional Information |
|---|---|---|---|---|
500 | false | npm.productManagement.product.UnknownError | An unknown error has occurred. | traceId - Optional |
Update Auto-Event Campaign
URL
Required rights:
adminoreventCreate
When updating an auto-event campaign, you can update one or several parameters. Let's say you wish to update the campaign name, use /auto-event/:id.
PUT - https://{{url}}/auto-event/:id
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | String | ❌ | Name of the Arianee event campaign. |
trigger | eachTransfer, genesisTransfer, walletToWallet | ❌ | - eachTransfer: All transfers.- genesisTransfer: Genesis transfers only.- walletToWallet: Based on each transfer but not the genesis. |
content | Object | ❌ | Content of the Arianee Event. For more information on compliant fields, see Event Schema. |
audienceId | String | ❌ | Identification number of the campaign. |
autoAccept | Boolean | ❌ | The field defines if the digital passport owner must automatically accept the Arianee Event. |
enable | Boolean | ❌ | The field defines if the Arianee Event campaign is active or not. |
{
"name": "Test campaign EDITED"
}
Return Payload
| Status Code | Success | Description |
|---|---|---|
200 | true | The event campaign has been updated. |
{
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}],\"eventDate\":\"2025-01-20T14:30:00Z\"}",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true,
"_id": "6628f697a85fb13c1ec22285",
"createdAt": "2024-04-24T12:09:59.756Z",
"updatedAt": "2024-04-24T12:09:59.756Z",
"__v": 0,
"id": "6628f697a85fb13c1ec22285"
}
Errors
| Status Code | Success | Description |
|---|---|---|
500 | false | The event campaign ID does not exist. |
{
"stringValue": "\"662a46529b26b5094cbc719\"",
"valueType": "string",
"kind": "ObjectId",
"value": "662a46529b26b5094cbc719",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"662a46529b26b5094cbc719\" (type string) at path \"_id\" for model \"ArianeeEventCampaign\""
}
Fetch All Auto-Event Campaign
URL
Required rights:
adminoreventCreate
To fetch all the existing auto-event campaigns on your NFT Management Platform, use /auto-event.
GET - https://{{url}}/auto-event
Return Payload
| Statut Code | Success | Description |
|---|---|---|
200 | true | All the existing auto-event campaigns are returned. |
[
{
"_id": "6669a38e5079276e3e144a0d",
"name": "auto event ",
"trigger": "genesis",
"content": "{\"language\":\"en-US\",\"title\":\"genesis\",\"i18n\":[],\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\"}",
"audienceId": "6669a3885079276e3e144a00",
"autoAccept": true,
"enable": true,
"createdAt": "2024-06-12T13:33:02.777Z",
"updatedAt": "2024-06-12T13:33:02.777Z",
"__v": 0,
"id": "6669a38e5079276e3e144a0d"
},
{
"_id": "6669a3e85079276e3e144a65",
"name": "all transfers",
"trigger": "eachTransfer",
"content": "{\"language\":\"en-US\",\"title\":\"all transfers\",\"i18n\":[],\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\"}",
"audienceId": "6669a3de5079276e3e144a58",
"autoAccept": true,
"enable": true,
"createdAt": "2024-06-12T13:34:32.074Z",
"updatedAt": "2024-06-12T13:34:32.074Z",
"__v": 0,
"id": "6669a3e85079276e3e144a65"
},
{
"_id": "6672d13cce3d454161aea565",
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}]}\n",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true,
"createdAt": "2024-06-19T12:38:20.463Z",
"updatedAt": "2024-06-19T12:38:20.463Z",
"__v": 0,
"id": "6672d13cce3d454161aea565"
},
{
"_id": "6672d219ce3d454161aea803",
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}]}\n",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true,
"createdAt": "2024-06-19T12:42:01.025Z",
"updatedAt": "2024-06-19T12:42:01.025Z",
"__v": 0,
"id": "6672d219ce3d454161aea803"
}
]
Fetch an Auto-Event Campaign
URL
Required rights:
adminoreventCreate
To fetch an auto-event campaign, use /auto-event.
GET - https://{{url}}/auto-event/:id
Return Payload
| Status Code | Success | Description |
|---|---|---|
200 | true | The event campaign has been created. |
{
"_id": "6628f697a85fb13c1ec22285",
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}]}\n",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true,
"createdAt": "2024-04-24T12:09:59.756Z",
"updatedAt": "2024-04-24T12:09:59.756Z",
"__v": 0,
"id": "6628f697a85fb13c1ec22285"
}
Errors
| Status Code | Success | Description |
|---|---|---|
500 | false | The event campaign ID does not exist. |
{
"stringValue": "\"832930\"",
"valueType": "string",
"kind": "ObjectId",
"value": "832930",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"832930\" (type string) at path \"_id\" for model \"ArianeeEventCampaign\""
}
Delete Auto-Event Campaign
URL
Required rights:
adminoreventCreate
To delete an auto-event campaign, use /auto-event/:id.
DELETE - https://{{url}}/auto-event/:id
Return Payload
| Status Code | Success | Description |
|---|---|---|
200 | true | The event campaign has been deleted. |
{
"_id": "6628f697a85fb13c1ec22285",
"name": "Test campaign",
"trigger": "eachTransfer",
"content": "{\"$schema\":\"https://cert.arianee.org/version3/ArianeeEvent-i18n.json\",\"eventType\":\"service\",\"language\":\"fr-FR\",\"title\":\"Event\",\"description\":\"Event description\",\"externalContents\":[{\"type\":\"website\",\"title\":\"website\",\"url\":\"https://google.com\"}]}\n",
"audienceId": "662238e9170dec9e6ba96fa3",
"autoAccept": true,
"enable": true,
"createdAt": "2024-04-24T12:09:59.756Z",
"updatedAt": "2024-04-24T12:09:59.756Z",
"__v": 0,
"id": "6628f697a85fb13c1ec22285"
}
Errors
| Status Code | Success | Description |
|---|---|---|
500 | false | The ID of the event campaign does not exist. |
{
"stringValue": "\"4566666\"",
"valueType": "string",
"kind": "ObjectId",
"value": "4566666",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"4566666\" (type string) at path \"_id\" for model \"ArianeeEventCampaign\""
}
Updated 10 months ago
