Note: Custom Tag APIs are not available for trial users. A subscription is required to access these features. Please contact help@protecto.ai for assistance.
The customer should provide an API endpoint that detects custom PII positions in a given text.
The API must:
-
Accept input text
-
Identify custom PII based on the given
tag_type -
Return the start and end positions of each detected PII
Request Type: PUT
Input Structure:
input_texts: A list of input texts from which the positions of custom Personally Identifiable Information (PII) need to be extracted.
tag_type:custom PII tag
Code Snippet
{"data": {"input_texts":["<text1>","<text2>"]}, "tag_type ": "CUSTOMER_ID"}
Eg
{
"data": {
"input_texts": [
"ID001, Sarah Johnson, has been a loyal customer for years and just made a new order, emphasizing her continued satisfaction with our products.ID033, Michael Davis, recently placed a large order for clothing and accessories, reflecting his keen sense of style and fashion preferences.",
"Hey, meet ID018, Alex Turner – our tech guru! Alex just snagged some cool gadgets, showing off his love for the latest tech trends. And then there's ID038, Lily Parker – our fashionista extraordinaire! Lily couldn't resist our stylish collection, proving she's got an eye for fashion."
]
},
"tag_type": "CUSTOMER_ID"
}
Response:
Details have been extracted for each instance of the custom PII tag in the input texts, including the PII tag’s text, its start and end positions within the input text, and the full input text containing the custom PII tag.
{
"data": {
"input_texts": [
{
"input_text": "ID001, Sarah Johnson, has been a loyal customer for years and just made a new order, emphasizing her continued satisfaction with our products.ID033, Michael Davis, recently placed a large order for clothing and accessories, reflecting his keen sense of style and fashion preferences.",
"pii_identification": [
{
"type": "CUSTOMER_ID",
"text": "ID001",
"start": 0,
"end": 5
},
{
"type": "CUSTOMER_ID",
"text": "ID033",
"start": 142,
"end": 147
}
]
},
{
"input_text": "Hey, meet ID018, Alex Turner – our tech guru! Alex just snagged some cool gadgets, showing off his love for the latest tech trends. And then there's ID038, Lily Parker – our fashionista extraordinaire! Lily couldn't resist our stylish collection, proving she's got an eye for fashion.",
"pii_identification": [
{
"type": "CUSTOMER_ID",
"text": "ID018",
"start": 10,
"end": 15
},
{
"type": "CUSTOMER_ID",
"text": "ID038",
"start": 149,
"end": 154
}
]
}
]
},
"success": true,
"error": ""
}