Create Flag
Create a flag for a product.
This function is used to create a flag for a product or an image. A flag is a request for a product or an image to be reviewed. A flag is associated with a ticket. A ticket is created if it does not exist for this product or image. A ticket can be associated with multiple flags.
Barcode of the product, if the flag is about a product or a product image. In case of a search issue, this field is null.
Type of the issue
"product" | "image" | "search"
URL of the product or of the flagged image
Open Food Facts User ID of the flagger
Source of the flag. It can be a user from the mobile app, the web or a flag generated automatically by robotoff.
"mobile" | "web" | "robotoff"
Confidence score of the model that generated the flag, this field should only be provided by Robotoff.
ID of the flagged image
Flavor (project) associated with the ticket
"off" | "obf" | "opff" | "opf" | "off-pro"
Reason for flagging provided by the user. The field is optional.
Comment provided by the user during flagging. This is a free text field.
Creation datetime of the flag
date-time
Response Body
curl -X POST "https://loading/api/v1/flags" \
-H "Content-Type: application/json" \
-d '{
"type": "product",
"url": "string",
"user_id": "string",
"source": "mobile",
"flavor": "off"
}'
null
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}