POST
validate
ean_generate
1 creditGenerate a complete EAN/UPC barcode by computing and appending the check digit
Endpoint
POST /api/v1/tools/validate/ean_generate
Body Parameters
code
string
required
Example
input
Request
{
"code": "400638133393"
}
output
Response
{
"format": "EAN-13",
"full_code": "4006381333931",
"check_digit": 1
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"format": "EAN-13",
"full_code": "4006381333931",
"check_digit": 1
},
"meta": {
"tool": "ean_generate",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.