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 thecertificateId, our team is working to provide this functionality with theproductIdin the near future.
* If you set a digital passport as stolen, the missing status is automatically set astrue.* If you unset a digital passport stolen status, the missing status is not automatically set asfalse.
Fetch Digital Passport Missing Status
URL
Required rights:
adminorstolen
To know if a digital passport is declared as missing, use the /lostAndStolen/isMissing.
POST - https://{{nmpUrl}}/lostAndStolen/isMissingBody
| Field | Type | Required | Description |
|---|---|---|---|
certificateId | String | ✅ | Identification number of the digital passport. |
{
"certificateId":"70260619"
}Return Payload
Status Code | Description |
|---|---|
| The digital passport missing status is returned: |
{
"isMissing": true
}Errors
| Status Code | Success | Error Message |
|---|---|---|
400 | false | Wrong certificateId. |
{
"errors": [
{
"msg": "certificateId must be a string or a number",
"param": "certificateId",
"location": "body"
}
]
}Fetch Digital Passport Stolen Status
URL
Required rights:
adminorstolen
To know if a digital passport is declared as missing, use the /lostAndStolen/isStolen.
POST - https://{{nmpUrl}}/lostAndStolen/isStolenBody
| Field | Type | Required | Description |
|---|---|---|---|
certificateId | String | ✅ | Identification number of the digital passport. |
{
"certificateId":"43868083"
}Return Payload
Status Code | Description |
|---|---|
| The digital passport's stolen status is returned: |
{
"isStolen": false
}Errors
| Status Code | Success | Error Message |
|---|---|---|
400 | false | Wrong certificateId. |
{
"errors": [
{
"msg": "certificateId must be a string or a number",
"param": "certificateId",
"location": "body"
}
]
}Set/Remove Digital Passport Missing Status
URL
Required rights:
adminorstolen
To set/unset a digital passport as missing, use the /lostAndStolen/setMissing.
POST - https://{{nmpUrl}}/lostAndStolen/setMissingBody
Field | Type | Required | Description |
|---|---|---|---|
| String | ✅ | Identification number of the digital passport. |
| Boolean | ✅ |
|
{
"certificateId":"43868083",
"isMissing":true
}Return Payload
| Status Code | Description |
|---|---|
200 | The digital passport ID and status are returned. |
{
"smartAssetId": "43868083",
"missingStatus": true
}Errors
| Status Code | Success | Error Message |
|---|---|---|
500 | false | The target digital passport status is already set as missing. |
500 | false | Your 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
Required rights:
adminorstolen
To set/unset a digital passport as missing, use the /lostAndStolen/setStolen.
POST - https://{{nmpUrl}}/lostAndStolen/setStolenBody
Field | Type | Required | Description |
|---|---|---|---|
| String | ✅ | Identification number of the digital passport. |
| Boolean | ✅ |
|
{
"certificateId":"43868083",
"isStolen":true
}Return Payload
| Status Code | Description |
|---|---|
200 | The digital passport ID and status are returned. |
{
"smartAssetId": "43868083",
"stolenStatus": true
}Errors
| Status Code | Success | Error Message |
|---|---|---|
500 | false | The target digital passport status is already set as stolen. |
500 | false | Your NFT Management Platform is not the issuer of the target digital passport, you are not authorized to modify the status. |
500 | false | A 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"
}Updated 10 days ago
