Count Digital Passports

Retrieve the count of digital passports on your NFT Management Platform.

URL

To return the number of digital passports matching your filters, use /certificate/v2/search/count.

GET - https://{{nmpUrl}}/certificate/v2/search/count

Query ParameterTypeMandatoryDescription
qStringβœ…JSON encoded key/value request to filter results.
⚠️ When testing in API reference stringify your JSON object.
sString❌JSON encoded key/value request to sort results.
⚠️ When testing in API reference stringify your JSON object.
pString❌Define:

- Fields you want to return: value 1
OR
- Fields you want to exclude: value 0.
⚠️ When testing in API reference stringify your JSON object.

Example: This example searches for the count of digital passports:

  • With a blockNumberCreation greater than 0.
  • An issuer that starts with "0x".
  • It excludes digital passports owned by the specific address 0x000000000000000000000000000000000000dEaD.
{
  "limit": 1000,
  "q": {
    "must": [
      {
        "range": {
          "path": "blockNumberCreation",
          "gt": 0
        }
      },
      {
        "regex": {
          "path": "issuer",
          "query": "^0x.*",
          "allowAnalyzedField": true
        }
      }
    ],
    "mustNot": [
      {
        "queryString": {
          "defaultPath": "owner",
          "query": "owner:0x000000000000000000000000000000000000dEaD"
        }
      }
    ]
  },
  "s": {
    "blockNumberCreation": -1
  },
  "p": {
    "tokenId": 1,
    "blockNumberCreation": 1,
    "issuer": 1,
    "owner": true,
    "displayTitle": 1
  }
}

curl --location '<https://nmpUrl.com/certificate/v2/search?limit=1000&q=%7B%22must%22%3A%5B%7B%22range%22%3A%7B%22path%22%3A%22blockNumberCreation%22%2C%22gt%22%3A0%7D%7D%2C%7B%22regex%22%3A%7B%22path%22%3A%22issuer%22%2C%22query%22%3A%220x.*%22%2C%22allowAnalyzedField%22%3Atrue%7D%7D%5D%2C%22mustNot%22%3A%5B%7B%22queryString%22%3A%7B%22defaultPath%22%3A%22owner%22%2C%22query%22%3A%22owner%3A%200x000000000000000000000000000000000000dEaD%22%7D%7D%5D%7D&s=%7B%22blockNumberCreation%22%3A-1%7D&p=%7B%22tokenId%22%3A1%2C%22blockNumberCreation%22%3A1%2C%22issuer%22%3A1%2C%22owner%22%3Atrue%2C%22displayTitle%22%3A1%7D>' \\
--header 'x-api-key: yourApiKey'


Return Payload

FieldTypeDescription
countNumberCount of digital passports minted on your NFT Management Platform.
{
    "count": 99778
}

Errors

Status CodeSuccessDescription
500falseSomething is wrong with your request.
{}
{
    "ok": 0,
    "code": 8,
    "codeName": "UnknownError",
    "$clusterTime": {
        "clusterTime": {
            "$timestamp": "7382159732183662725"
        },
        "signature": {
            "hash": "aPNjdyusTSgGnJxufx08EAFxheE=",
            "keyId": {
                "low": 2,
                "high": 1709154390,
                "unsigned": false
            }
        }
    },
    "operationTime": {
        "$timestamp": "7382159732183662725"
    }
}