Fetch Audience

Fetch an Audience

URL

To fetch the information on a specific audience, use /audience/:id.

GET - https://{{nmpUrl}}/audience/:id

Return Payload

Status CodeSuccessDescription
200trueThe details of the audience are returned.
{
    "_id": "6616949cf8c304e92359c111",
    "name": "name",
    "tags": [],
    "description": "this is the description",
    "uniqueOwner": true,
    "tagRule": "tokenIds",
    "isWalletActiveSinceNumberOfDays": 30,
    "custodialWallet": "all",
    "countries": [
        "France",
        "Middle-earth",
        "Taiwan",
        "Belgium"
    ],
    "walletActivity": "inactive",
    "createdAt": "2024-01-15T13:28:22.250Z",
    "updatedAt": "2024-04-10T13:44:04.141Z",
    "tokenIds": {
        "type": "Buffer",
        "data": [
            51,
            52,
            51
        ]
    }
}

Errors

Status CodeSuccessDescription
404falseThe ID may be wrong or the audience does not exist.
{
    "error": "audience not found"
}

Fetch All Audience

URL

To fetch all the existing audience segments, use /audience/list.

GET - https://{{nmpUrl}}/audience/list

Return Payload

Status CodeSuccessDescription
200trueThe audience details are returned, such as the count of digital passports or the count of owners.
[
    {
        "_id": "660c1bb344de4dd929227df5",
        "name": "test"
    },
    {
        "_id": "660e6d0549f0c37e6e8f9922",
        "tags": [
            "testProduct3"
        ],
        "countries": [],
        "productIds": [],
        "campaignName": "Brand1Campaign",
        "status": "CREATED",
        "content": "{\"title\":\"Title\",\"content\":\"Salut CYril\",\"$schema\":\"https://cert.arianee.org/version5/ArianeeProductCertificate-i18n.json\"}",
        "isWalletActiveSinceNumberOfDays": 30,
        "tagRule": "all",
        "createdAt": "2024-01-18T10:42:23.509Z",
        "updatedAt": "2024-01-18T10:42:24.299Z",
        "__v": 0,
        "countNFT": 12,
        "countOwner": 10
    },
    {
        "_id": "660e6d2b49f0c37e6e8f9924",
        "tags": [],
        "countries": [],
        "productIds": [
            "SN12345"
        ],
        "campaignName": "Brand2Campaign",
        "userId": "3bc04af9-4507-42dc-853c-248af9dea824",
        "status": "CREATED",
        "content": "{\"title\":\"Hello Fellow Friends\",\"content\":\"Welcome to your brand new Rolex\",\"$schema\":\"https://cert.arianee.org/version5/ArianeeProductCertificate-i18n.json\"}",
        "isWalletActiveSinceNumberOfDays": 30,
        "tagRule": "productIds",
        "createdAt": "2024-01-24T11:25:03.282Z",
        "updatedAt": "2024-01-24T11:25:04.153Z",
        "__v": 0,
        "countNFT": 34,
        "countOwner": 56
    }
]