The asynchronous status method enables us to monitor the status of both masking and unmasking processes.The user has to give the tracking id of the mask or unmask Async as the input in the Request
This approach enables you to track the status of the asynchronous request you’ve submitted. The possible statuses include “SUCCESS”,”PENDING”,”IN-PROGRESS”,”FAILED” and “PURGED”
Endpoint and Authentication: #
To use Protecto.ai’s token-based masking, you need to send a PUT request to the following endpoint:
METHOD: PUT
Route:api/vault/async-status
For authentication, include the following token in the request headers:
Headers: {“Authorization”: “Bearer <AUTH_TOKEN>”}
Request Payload: #
Here’s an example of a request payload:
Request Payload:
{"status": [{"tracking_id": "747027ff-5ce7-4780-8cca-000f908edae721052025073644"}]}
Result structure for status “Success” #
{
"data": [
{
"tracking_id": "747027ff-5ce7-4780-8cca-000f908edae721052025073644",
"call_type": "mask",
"input_payload": {
"mask": [
{
"token_name": "Person token",
"value": "jackson"
},
{
"token_name": "Date Token",
"value": "2025-04-01"
},
{
"token_name": "State Token",
"value": "WY"
},
{
"token_name": "City Token",
"value": "Bangalore"
},
{
"token_name": "Address Token",
"value": "24 mark street"
}
]
},
"result": [
{
"token_name": "Person token",
"token_value": "Chidi",
"value": "jackson"
},
{
"token_name": "Date Token",
"token_value": "0002-07-31",
"value": "2025-04-01"
},
{
"token_name": "State Token",
"token_value": "IL",
"value": "WY"
},
{
"token_name": "City Token",
"token_value": "Hayes",
"value": "Bangalore"
},
{
"token_name": "Address Token",
"token_value": "6-chome",
"value": "24 mark street"
}
],
"error_msg": null,
"submitted_time": "2025-05-21 07:36:44",
"process_start_time": "2025-05-21 07:36:47",
"completed_time": "2025-05-21 07:36:48",
"status": "SUCCESS"
}
],
"success": true,
"error": {
"message": ""
}
}
Result structure for status“IN-PROGRESS”: #
If the status is IN_PROGRESS, try again after a few minutes to see if the data has been processed.
{
"data": [
{
"tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
"call_type": "unmask",
"input_payload": {
"unmask": [
{
"token_value": "n3dVs6D0Ni"
},
{
"token_value": "<PER>n3dVs6D0Ni</PER>"
},
{
"token_value": "<PER>n3dVs6D0Ni</PER> lives in the <ADDRESS>8SNwyGwcY2.YcLTWWIXHF.iLgmVciGq1</ADDRESS>"
}
]
},
"result":"None",
"error_msg":"None",
"submitted_time": "2024-04-29 08:37:21",
"completed_time":"None",
"status":"IN-PROGRESS"
},
{
"tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
"call_type": "mask",
"input_payload": {
"mask": [
{
"value": "He lives in the U.S.A"
},
{
"value": "George Washington visited China."
}
]
},
"result":"None",
"error_msg":"None",
"submitted_time": "2024-04-29 08:21:53",
"completed_time":"None",
"status":"IN-PROGRESS"
}
],
"success": true,
"error": {
"message": ""
}
}
Result structure for status “PENDING”: #
{
"data": [
{
"tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
"call_type": "unmask",
"input_payload": {
"unmask": [
{
"token_value": "n3dVs6D0Ni"
},
{
"token_value": "<PER>n3dVs6D0Ni</PER>"
},
{
"token_value": "<PER>n3dVs6D0Ni</PER> lives in the <ADDRESS>8SNwyGwcY2.YcLTWWIXHF.iLgmVciGq1</ADDRESS>"
}
]
},
"result":"None",
"error_msg":"None",
"submitted_time": "2024-04-29 08:37:21",
"completed_time":"None",
"status":"PENDING"
},
{
"tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
"call_type": "mask",
"input_payload": {
"mask": [
{
"value": "He lives in the U.S.A"
},
{
"value": "George Washington visited China."
}
]
},
"result":"None",
"error_msg":"None",
"submitted_time": "2024-04-29 08:21:53",
"completed_time":"None",
"status":"PENDING"
}
],
"success": true,
"error": {
"message": ""
}
}
Result structure for status “FAILED”: #
{ "data": [
{
"tracking_id": "43318680-9515-432c-a152-1b9b9ebc1ba629042024114022",
"call_type": "unmask",
"input_payload": {
"unmask": []
},
"result": null,
"error_msg": "Processing Async request failed for tracker_id:43318680-9515-432c-a152-1b9b9ebc1ba629042024114022 with error: Payload is empty",
"submitted_time": "2024-04-29 11:40:22",
"completed_time": "2024-04-29 11:40:23",
"status": "FAILED"
},
{
"tracking_id": "aff361c8-50da-4680-9b07-9d1c1b1b004229042024113917",
"call_type": "mask",
"input_payload": {
"mask": [
{
"": "He lives in the U.S.A"
},
{
"value": "George Washington visited China."
}
]
},
"result": null,
"error_msg": "Processing Async request failed for tracker_id:aff361c8-50da-4680-9b07-9d1c1b1b004229042024113917 with error: Missing value",
"submitted_time": "2024-04-29 11:39:17",
"completed_time": "2024-04-29 11:39:23",
"status": "FAILED"
}
],
"success": true,
"error": {
"message": ""
}
}
Result structure for status “PURGED”: #
{
"data": [
{
"tracking_id": "b6b7ef0e-86f6-4490-b0f8-4962a43656f929042024083721",
"call_type": "unmask",
"input_payload":"None",
"result":"None",
"error_msg":"None",
"submitted_time": "2024-04-29 08:37:21",
"completed_time": "2024-04-29 08:37:23",
"status": "PURGED"
},
{
"tracking_id": "d1b6fa4f-c92e-480a-9f1f-f62f2743f53229042024082153",
"call_type": "mask",
"input_payload":"None",
"result":"None",
"error_msg":"None",
"submitted_time": "2024-04-29 08:21:53",
"completed_time": "2024-04-29 08:22:05",
"status": "PURGED"
}
],
"success": true,
"error": {
"message": ""
}
}
For more comprehensive information about our product, kindly reach out to us through our website at https://www.protecto.ai/.