Once-Off Event Campaign
As a brand, you want to enrich the digital passport history for a specific audience, to do so you'll create a once-off event campaign.
- 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 Once-Off Event Campaign
URL
Required rights:
admin
oreventCreate
To link a once-off event to a target digital passports audience, use /onceOfEvent
.
POST - https://{{nmpUrl}}/onceOfEvent
Body
Field | Type | Required | Default Value | Description |
---|---|---|---|---|
campaignName | String | โ | n/a | Name of the Arianee event campaign. |
content | Object | โ | n/a | Content of the Arianee Event. For more information on the content, see Event Schema. |
audienceId | String | โ | n/a | Identification number of the campaign. |
autoAccept | Boolean | โ | false | The field defines if the digital passport owner must automatically accept the Arianee Event. |
status | String | โ | n/a | - DRAFT : The campaign is created as a draft, the audience won't receive it after creation.- CREATED : The campaign will be launched after sending the request. |
{
"content": {
"language": "en-US",
"title": "english title",
"description": "English description",
"i18n": [
{
"language": "fr-FR",
"title": "fr title",
"description": "fr descripiton"
}
],
"$schema": "https://cert.arianee.org/version1/ArianeeEvent-i18n.json"
},
"campaignName": "Campaign name",
"audienceId": "6655efc70bd84e3ba4135e9d",
"status": "DRAFT",
"autoAccept": true
}
Return Payload
Code Statut | Success | Description |
---|---|---|
200 | true | The once-off event campaign has been created. |
{
"campaignName": "Campaign name",
"status": "DRAFT",
"content": "{\"language\":\"en-US\",\"title\":\"english title\",\"description\":\"english description\",\"i18n\":[{\"language\":\"fr-FR\",\"title\":\"fr title\",\"description\":\"fr descripiton\"}],\"$schema\":\"https://cert.arianee.org/version1/ArianeeEvent-i18n.json\"}",
"autoAccept": true,
"audienceId": "6655efc70bd84e3ba4135e9d",
"_id": "6668116b8e25b15cc1b6e42c",
"createdAt": "2024-06-11T08:57:15.568Z",
"updatedAt": "2024-06-11T08:57:15.568Z",
"__v": 0,
"id": "6668116b8e25b15cc1b6e42c"
}
Update Once-Off Event Campaign
URL
Required rights:
admin
oreventCreate
When updating a once-off event campaign, you can decide to update one or several parameters. To do so, use /onceOfEvent/:id
.
PUT - https://{{url}}/onceOfEvent/:id
Body
Field | Type | Required | Description |
---|---|---|---|
name | String | โ | Name of the Arianee event campaign. |
content | Object | โ | Content of the Arianee Event |
audienceId | String | โ | Identification number of the campaign. |
autoAccept | Boolean | โ | The field defines if the digital passport owner must automatically accept the Arianee Event. |
status | String | โ | Status of the once-off event campaign: CREATED or DRAFT |
{
"autoAccept": false,
"status": "CREATED"
}
Return Payload
Status Code | Success | Description |
---|---|---|
200 | true | The event campaign has been updated. |
{
"_id": "6668116b8e25b15cc1b6e42c",
"campaignName": "Campaign name",
"status": "CREATED",
"content": "{\"language\":\"en-US\",\"title\":\"english title\",\"description\":\"english description\",\"i18n\":[{\"language\":\"fr-FR\",\"title\":\"fr title\",\"description\":\"fr descripiton\"}],\"$schema\":\"https://cert.arianee.org/version1/ArianeeEvent-i18n.json\"}",
"autoAccept": false,
"audienceId": "6655efc70bd84e3ba4135e9d",
"createdAt": "2024-06-11T08:57:15.568Z",
"updatedAt": "2024-06-11T08:58:49.912Z",
"__v": 0,
"id": "6668116b8e25b15cc1b6e42c"
}
Errors
Status Code | Success | Description |
---|---|---|
500 | false | The event campaign ID does not exist. |
{
"stringValue": "\"e234uji2\"",
"valueType": "string",
"kind": "ObjectId",
"value": "e234uji2",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"e234uji2\" (type string) at path \"_id\" for model \"OnceOfEventCampaign\""
}
Fetch a Once-Off Event Campaign
URL
Required rights:
admin
oreventCreate
To fetch and get the details of a specific once-off event campaign, use /onceOfEvent/:id
.
GET - https://{{url}}/onceOfEvent/:id
Return Payload
Status Code | Success | Description |
---|---|---|
200 | true | The target event campaign is returned. |
{
"_id": "6668116b8e25b15cc1b6e42c",
"campaignName": "campaign name",
"status": "DRAFT",
"content": "{\"language\":\"en-US\",\"title\":\"english title\",\"description\":\"english description\",\"i18n\":[{\"language\":\"fr-FR\",\"title\":\"fr title\",\"description\":\"fr descripiton\"}],\"$schema\":\"https://cert.arianee.org/version1/ArianeeEvent-i18n.json\"}",
"autoAccept": true,
"audienceId": "6655efc70bd84e3ba4135e9d",
"createdAt": "2024-06-11T08:57:15.568Z",
"updatedAt": "2024-06-11T08:57:15.568Z",
"__v": 0,
"id": "6668116b8e25b15cc1b6e42c"
}
Errors
Status Code | Success | Description |
---|---|---|
500 | false | The ID of the event campaign does not exist. |
{
"stringValue": "\"eijefiehf44\"",
"valueType": "string",
"kind": "ObjectId",
"value": "eijefiehf44",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"eijefiehf44\" (type string) at path \"_id\" for model \"OnceOfEventCampaign\""
}
Fetch All Once-Off Event Campaigns
URL
Required rights:
admin
oreventCreate
To retrieve all the once-off event campaigns, use /onceOfEvent
.
GET - https://{{url}}/onceOfEvent
Return Payload
Status Code | Success | Description |
---|---|---|
200 | true | The event campaigns are returned. |
[
{
"_id": "66680fae8e25b15cc1b6e41d",
"createdAt": "2024-06-11T08:49:50.165Z",
"updatedAt": "2024-06-11T08:49:50.165Z",
"__v": 0,
"id": "66680fae8e25b15cc1b6e41d"
},
{
"_id": "666810808e25b15cc1b6e422",
"campaignName": "campaign name",
"status": "DRAFT",
"content": "{\"language\":\"en-US\",\"title\":\"english title\",\"description\":\"english description\",\"i18n\":[{\"language\":\"fr-FR\",\"title\":\"fr title\",\"description\":\"fr descripiton\"}],\"$schema\":\"https://cert.arianee.org/version1/ArianeeEvent-i18n.json\"}",
"autoAccept": true,
"audienceId": "6655efc70bd84e3ba4135e9d",
"createdAt": "2024-06-11T08:53:20.717Z",
"updatedAt": "2024-06-11T08:53:20.717Z",
"__v": 0,
"id": "666810808e25b15cc1b6e422"
},
{
"_id": "666811248e25b15cc1b6e427",
"createdAt": "2024-06-11T08:56:04.603Z",
"updatedAt": "2024-06-11T08:56:04.603Z",
"__v": 0,
"id": "666811248e25b15cc1b6e427"
}
]
Errors
Status Code | Success | Description |
---|---|---|
500 | false | The ID is incorrect. |
{
"stringValue": "\"eijefiehf44\"",
"valueType": "string",
"kind": "ObjectId",
"value": "eijefiehf44",
"path": "_id",
"reason": {},
"name": "CastError",
"message": "Cast to ObjectId failed for value \"eijefiehf44\" (type string) at path \"_id\" for model \"OnceOfEventCampaign\""
}
Delete Once-Off Event Campaign
URL
Required rights:
admin
oreventCreate
To delete a once-off event campaign, use /onceOfEvent/:id
.
DELETE - https://{{url}}/onceOfEvent/:id
Return Payload
Status Code | Success | Description |
---|---|---|
200 | true | The event campaign has been deleted. |
{
"_id": "6668116b8e25b15cc1b6e42c",
"campaignName": "campaign name",
"status": "CREATED",
"content": "{\"language\":\"en-US\",\"title\":\"english title\",\"description\":\"english description\",\"i18n\":[{\"language\":\"fr-FR\",\"title\":\"fr title\",\"description\":\"fr descripiton\"}],\"$schema\":\"https://cert.arianee.org/version1/ArianeeEvent-i18n.json\"}",
"autoAccept": false,
"audienceId": "6655efc70bd84e3ba4135e9d",
"createdAt": "2024-06-11T08:57:15.568Z",
"updatedAt": "2024-06-11T08:58:49.912Z",
"__v": 0,
"id": "6668116b8e25b15cc1b6e42c"
}
Errors
Status Code | Success | Description |
---|---|---|
500 | false | The ID of the event campaign does not exist. |
{
"_id": "6668116b8e25b15cc1b6e42c",
"campaignName": "campaign name",
"status": "CREATED",
"content": "{\"language\":\"en-US\",\"title\":\"english title\",\"description\":\"english description\",\"i18n\":[{\"language\":\"fr-FR\",\"title\":\"fr title\",\"description\":\"fr descripiton\"}],\"$schema\":\"https://cert.arianee.org/version1/ArianeeEvent-i18n.json\"}",
"autoAccept": false,
"audienceId": "6655efc70bd84e3ba4135e9d",
"createdAt": "2024-06-11T08:57:15.568Z",
"updatedAt": "2024-06-11T08:58:49.912Z",
"__v": 0,
"id": "6668116b8e25b15cc1b6e42c"
}
Updated 11 days ago