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 or eventCreate

To link a once-off event to a target digital passports audience, use /onceOfEvent.

POST - https://{{nmpUrl}}/onceOfEvent

Body

FieldTypeRequiredDefault ValueDescription
campaignNameStringโœ…n/aName of the Arianee event campaign.
contentObjectโœ…n/aContent of the Arianee Event.
For more information on the content, see Event Schema.
audienceIdStringโŒn/aIdentification number of the campaign.
autoAcceptBooleanโŒfalseThe field defines if the digital passport owner must automatically accept the Arianee Event.
statusStringโŒ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 StatutSuccessDescription
200trueThe 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 or eventCreate

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

FieldTypeRequiredDescription
nameStringโŒName of the Arianee event campaign.
contentObjectโŒContent of the Arianee Event
audienceIdStringโŒIdentification number of the campaign.
autoAcceptBooleanโŒThe field defines if the digital passport owner must automatically accept the Arianee Event.
statusStringโŒStatus of the once-off event campaign: CREATED or DRAFT
{
  "autoAccept": false, 
  "status": "CREATED"
}

Return Payload

Status CodeSuccessDescription
200trueThe 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 CodeSuccessDescription
500falseThe 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 or eventCreate

To fetch and get the details of a specific once-off event campaign, use /onceOfEvent/:id.

GET - https://{{url}}/onceOfEvent/:id

Return Payload

Status CodeSuccessDescription
200trueThe 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 CodeSuccessDescription
500falseThe 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 or eventCreate

To retrieve all the once-off event campaigns, use /onceOfEvent.

GET - https://{{url}}/onceOfEvent

Return Payload

Status CodeSuccessDescription
200trueThe 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 CodeSuccessDescription
500falseThe 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 or eventCreate

To delete a once-off event campaign, use /onceOfEvent/:id.

DELETE - https://{{url}}/onceOfEvent/:id

Return Payload

Status CodeSuccessDescription
200trueThe 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 CodeSuccessDescription
500falseThe 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"
}