โ ๏ธ
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.
To link a once-off event to a target digital passports audience, use /onceOfEvent
.
URL
POST - https://{{nmpUrl}}/onceOfEvent
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.
Body Example
{
"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
}
Code Statut Success Description 200
true
The once-off event campaign has been created.
200 Return Payload
{
"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"
}
When updating a once-off event campaign, you can decide to update one or several parameters. To do so, use /onceOfEvent/:id
.
URL
PUT - https://{{url}}/onceOfEvent/:id
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
Body Example
{
"autoAccept": false,
"status": "CREATED"
}
Status Code Success Description 200
true
The event campaign has been updated.
200 Return Payload
{
"_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"
}
Status Code Success Description 500
false
The event campaign ID does not exist.
500 Return Payload
{
"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\""
}
To fetch and get the details of a specific once-off event campaign, use /onceOfEvent/:id
.
URL
GET - https://{{url}}/onceOfEvent/:id
Status Code Success Description 200
true
The target event campaign is returned.
200 Return Payload
{
"_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"
}
Status Code Success Description 500
false
The ID of the event campaign does not exist.
500 Return Payload
{
"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\""
}
To retrieve all the once-off event campaigns, use /onceOfEvent
.
URL
GET - https://{{url}}/onceOfEvent
Status Code Success Description 200
true
The event campaigns are returned.
200 Return Payload
[
{
"_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"
}
]
Status Code Success Description 500
false
The ID is incorrect.
500 Return Payload
{
"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\""
}
To delete a once-off event campaign, use /onceOfEvent/:id
.
URL
DELETE - https://{{url}}/onceOfEvent/:id
Status Code Success Description 200
true
The event campaign has been deleted.
200 Return Payload
{
"_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"
}
Status Code Success Description 500
false
The ID of the event campaign does not exist.
500 Return Payload
{
"_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"
}