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 team is 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.

Fetch Digital Passport Missing Status

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 Digital Passport Stolen Status

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/Remove Digital 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/Remove Digital Passport Missing 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"
}