Declare Product as Lost or Stolen

A user has lost or got stolen his product, so statut of the associated digital passport must be updated as such.

πŸ› οΈ

The lost & stolen feature works on the basis of the certificateId, our teams are working to provide this functionality with the productId in the near future.

πŸ’‘

  • If you set a digital passport as stolen, the missing status is automatically set as true.
  • If you unset a digital passport stolen status, the missing status is not automatically set as false.

Let's start πŸš€

Fetch if a digital passport is declared missing

URL

To know if a digital passport is declared as missing, use the /lostAndStolen/isMissing.

POST - https://{{nmpUrl}}/lostAndStolen/isMissing

Body

FieldTypeRequiredDescription
certificateIdStringβœ…Identification number of the digital passport.
{
    "certificateId":"70260619"
}

Return Payload

Status CodeDescription
200The digital passport missing status is returned:
true: The digital passport status is set as missing.
false: The digital passport status is not set as missing.
{
    "isMissing": true
}

Errors

Status CodeSuccessError Message
400falseWrong certificateId.
{
    "errors": [
        {
            "msg": "certificateId must be a string or a number",
            "param": "certificateId",
            "location": "body"
        }
    ]
}

Fetch if a digital passport is declared stolen

URL

To know if a digital passport is declared as missing, use the /lostAndStolen/isStolen.

POST - https://{{nmpUrl}}/lostAndStolen/isStolen

Body

FieldTypeRequiredDescription
certificateIdStringβœ…Identification number of the digital passport.
{
    "certificateId":"43868083"
}

Return Payload

Status CodeDescription
200The digital passport's stolen status is returned:
true: The digital passport status is set as stolen.
false: The digital passport status is not set as stolen.
{
    "isStolen": false
}

Errors

Status CodeSuccessError Message
400falseWrong certificateId.
{
    "errors": [
        {
            "msg": "certificateId must be a string or a number",
            "param": "certificateId",
            "location": "body"
        }
    ]
}

Set or unset a passport missing status

URL

To set/unset a digital passport as missing, use the /lostAndStolen/setMissing.

POST - https://{{nmpUrl}}/lostAndStolen/setMissing

Body

FieldTypeRequiredDescription
certificateIdStringβœ…Identification number of the digital passport.
isMissingBooleanβœ…true: Set the status as missing.
false: Unset the missing status.
{
    "certificateId":"43868083",
    "isMissing":true
}

Return Payload

Status CodeDescription
200The digital passport ID and status are returned.
{
    "smartAssetId": "43868083",
    "missingStatus": true
}

Errors

Status CodeSuccessError Message
500falseThe target digital passport status is already set as missing.
500falseYour NFT Management Platform is not the issuer of the target digital passport, you are not authorized to modify the status.
{
    "error": "Error while executing the protocol v1 action Missing status is already set as true"
}
{
    "error": "You are not the issuer of this smart asset"
}

Set or unset passport stolen status

URL

To set/unset a digital passport as missing, use the /lostAndStolen/setStolen.

POST - https://{{nmpUrl}}/lostAndStolen/setStolen

Body

FieldTypeRequiredDescription
certificateIdStringβœ…Identification number of the digital passport.
isStolenBooleanβœ…true: Set the status as stolen.
false: Unset the stolen status.
{
    "certificateId":"43868083",
    "isStolen":true
}

Return Payload

Status CodeDescription
200The digital passport ID and status are returned.
{
    "smartAssetId": "43868083",
    "stolenStatus": true
}

Errors

Status CodeSuccessError Message
500falseThe target digital passport status is already set as stolen.
500falseYour NFT Management Platform is not the issuer of the target digital passport, you are not authorized to modify the status.
500falseA server error may occur.
{
    "error": "Error while executing the protocol v1 action Stolen status is already set as true"
}
{
    "error": "You are not the issuer of this smart asset"
}