Create 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.

⚠️

  • 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.

Workflow

Create Auto-Event Campaign

URL

To link an auto-event to a batch of digital passports, use /arianeeEvent/campaign.

POST - https://{{nmpUrl}}/arianeeEvent/campaign

Body

FieldTypeRequiredDescription
nameBooleanName of the Arianee event campaign.
triggereachTransfer, genesisTransfer, walletToWallet- eachTransfer: All transfers.
- genesisTransfer: Genesis transfers only.
- walletToWallet: Based on each transfer but not the genesis.
contentObjectContent of the Arianee Event
audienceIdStringIdentification number of the campaign.
autoAcceptBooleanThe field defines if the Arianee Event must be automatically accepted by the digital passport owner.
Default value: true
enableBooleanThe 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/version1/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
}

Return Payload

FieldTypeDescription
successBooleanIndicate success or not.
{
    "name": "Test campaign",
    "trigger": "eachTransfer",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/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,
    "_id": "6628f697a85fb13c1ec22285",
    "createdAt": "2024-04-24T12:09:59.756Z",
    "updatedAt": "2024-04-24T12:09:59.756Z",
    "__v": 0,
    "id": "6628f697a85fb13c1ec22285"
}

Errors

Status CodeSuccessCodeError MessageAdditional Information
500falsenpm.productManagement.product.UnknownErrorAn unknown error has occurred.traceId - Optional

Update Auto-Event Campaign

URL

When updating an auto-event campaign, you can decide to update one or several parameters. Let's say you wish to update the campaign name, use /arianeeEvent/campaign/:id.

PUT - https://{{url}}/arianeeEvent/campaign/:id

Body

FieldTypeRequiredDescription
nameBooleanName of the Arianee event campaign.
triggereachTransfer, genesisTransfer, walletToWallet- eachTransfer: All transfers.
- genesisTransfer: Genesis transfers only.
- walletToWallet: Based on each transfer but not the genesis.
contentObjectContent of the Arianee Event
audienceIdStringIdentification number of the campaign.
autoAcceptBooleanThe field defines if the Arianee Event must be automatically accepted by the digital passport owner.
enableBooleanThe field defines if the Arianee Event campaign is active or not.
{
    "name": "Test campaign EDITED"
}

Return Payload

Status CodeSuccessDescription
200trueThe event campaign has been updated.
{
    "name": "Test campaign",
    "trigger": "eachTransfer",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/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,
    "_id": "6628f697a85fb13c1ec22285",
    "createdAt": "2024-04-24T12:09:59.756Z",
    "updatedAt": "2024-04-24T12:09:59.756Z",
    "__v": 0,
    "id": "6628f697a85fb13c1ec22285"
}

Errors

Status CodeSuccessDescription
500falseThe 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 Auto-Event Campaign

URL

To fetch an auto-event campaign, use /arianeeEvent/campaign/:id.

GET - https://{{url}}/arianeeEvent/campaign/:id

Return Payload

Status CodeSuccessDescription
200trueThe event campaign has been created.
{
    "_id": "6628f697a85fb13c1ec22285",
    "name": "Test campaign",
    "trigger": "eachTransfer",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/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 CodeSuccessDescription
500falseThe 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

To delete an auto-event campaign, use /arianeeEvent/campaign/:id.

DELETE - https://{{url}}/arianeeEvent/campaign/:id

Return Payload

Status CodeSuccessDescription
200trueThe event campaign has been deleted.
{
    "_id": "6628f697a85fb13c1ec22285",
    "name": "Test campaign",
    "trigger": "eachTransfer",
    "content": "{\"$schema\":\"https://cert.arianee.org/version1/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 CodeSuccessDescription
500falseThe 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\""
}