On this page6 sections
POST/api/products/check-variant-uniquenessProducts
Check Variant Uniqueness
Pre-validates variant names, SKU codes, and barcodes against existing tenant records before saving. Checks `product.update` if `productId` is provided or `product.create` otherwise.
Authentication: Requires Authorization: Bearer <ACCESS_TOKEN> (Supabase JWT, OAuth2 M2M token, or integration token).
Request
Provide the following fields in the request payload.
productIdstring (uuid) | nulloptional
product Id parameter.
variantsarray<object>required
variants parameter.
variants[].idstring (uuid) | nulloptional
id parameter.
variants[].namestringrequired
name parameter.
variants[].codestringrequired
code parameter.
variants[].barcodestring | nulloptional
barcode parameter.
Responses
Select a status code to inspect schema.
OK — Uniqueness check completed.application/json
successenum('true')
Success (true).
messagestring
Message.
dataobject | null
Response payload or null.
POST/api/products/check-variant-uniqueness
curl -X POST "https://api.invoger.com/api/products/check-variant-uniqueness" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "variants": [ { "name": "Large", "code": "COF-01-L", "barcode": "8991234567890" } ] }'Interactive playground
Response
application/json
{
"success": true,
"message": "Variant uniqueness checked",
"data": {
"valid": true,
"conflicts": []
}
}