---
title: Barcode Check Digit Validator
slug: validate-barcode-check-digits
url: https://apyverse.com/pankajretestflows/service/validate-barcode-check-digits
provider: External Providers
categories: [Data Validation, E-commerce Quick Tools]
tags: [barcode-validation, check-digit, ean, upc, isbn, retail-codes]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 1
atoms: 10
mcp: true
---

# Barcode Check Digit Validator

Validate EAN, UPC, and ISBN barcodes or generate the missing check digit. Returns validity, format, length, and check-digit details.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyverse.com/pankajretestflows/validate-barcode-check-digits` | What it does Validates a barcode's check digit, or computes the check digit for a barcode body, for… | 10 |

## Endpoint reference

### Validate or generate barcode check digits (EAN/UPC/ISBN).

`POST https://api.eu.apyverse.com/pankajretestflows/validate-barcode-check-digits` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `mode` | body | string | no | validate \| generate \| check_digit Example: `validate`. |
| `barcode` | body | string | yes | The barcode (full, for validate; body without check digit, for generate) Example: `4006381333931`. |

#### Quickstart

Validate a barcode check digit by sending the full barcode you want to check.

```bash
curl -X POST "https://api.eu.apyverse.com/pankajretestflows/validate-barcode-check-digits" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"barcode":"4006381333931"}'
```

#### What you'll get back

```json
{
  "valid": true,
  "format": "EAN-13",
  "length": 13,
  "barcode": "4006381333931",
  "check_digit": 1,
  "expected_check_digit": 1
}
```

#### Generate a check digit (and the finished barcode)

Send the barcode body without its check digit, and set `mode` to `generate`:

```bash
curl -X POST "https://api.eu.apyverse.com/pankajretestflows/validate-barcode-check-digits" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"barcode":"400638133393","mode":"generate"}'
```

```json
{
  "mode": "generate",
  "format": "EAN-13",
  "body": "400638133393",
  "check_digit": 1,
  "barcode": "4006381333931"
}
```

#### Get just the check digit

Same body, with `mode` set to `check_digit` — this skips assembling the full barcode and returns only the computed digit:

```bash
curl -X POST "https://api.eu.apyverse.com/pankajretestflows/validate-barcode-check-digits" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"barcode":"400638133393","mode":"check_digit"}'
```

```json
{
  "mode": "check_digit",
  "format": "EAN-13",
  "body": "400638133393",
  "check_digit": 1
}
```

## About

## What it does
Barcode Check Digit Validator helps you validate barcode strings or generate the missing check digit for common retail formats like EAN, UPC, and ISBN. Send a barcode in the request body, choose a mode, and get a compact result back.

Use `mode: validate` to check a full barcode, or `mode: generate` to compute the check digit from the barcode body without it. The response can include `valid`, `format`, `length`, `barcode`, `check_digit`, and `expected_check_digit`, depending on the input and mode. That makes it easy to confirm data at the point of capture or fill in incomplete product codes before you store them.

Barcode Check Digit Validator is a fit for catalog imports, POS integrations, inventory tools, and validation steps in e-commerce workflows. If you are cleaning supplier feeds or checking scanned codes before persistence, this endpoint gives you a simple deterministic check without extra parsing logic. If you already have a full code, validate it. If you only have the body, use `generate` to get back the check digit plus the finished barcode, or `check_digit` if you just need the digit itself without the assembled code.

## Usage

Base URL: `https://api.eu.apyverse.com` (default region — see
`GET https://apyverse.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyverse.com/pankajretestflows/service/validate-barcode-check-digits
