# Barcode & Standard-Code Validator API
> Validate and work with product and publication codes. Check the check digit of any EAN-8, UPC-A, EAN-13, GTIN-14, ISBN-10, ISBN-13 or ISSN code — the type is detected automatically and you get back whether it is valid plus the expected check digit. Compute the missing check digit for a partial code, and validate or convert ISBNs between the 10- and 13-digit forms. Hyphens and spaces are ignored, so you can paste codes straight from a label or catalogue. Pure local computation — no key, no third-party service, instant. Live. 4 endpoints. Built for retail and inventory systems, e-commerce catalogues, publishing, library tooling and data validation. Distinct from barcode image generation, payment-card (Luhn) and IBAN checks.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/barcodecheck-api/..."
```

## Pricing
- **Free** (Free) — 1,500 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 28,000 calls/Mo, 8 req/s
- **Pro** ($26/Mo) — 182,000 calls/Mo, 20 req/s
- **Mega** ($62/Mo) — 930,000 calls/Mo, 50 req/s

## Endpoints

### Validate

#### `GET /v1/checkdigit` — Compute a check digit

**Parameters:**
- `code` (query, required, string) — Code body without the check digit Example: `400638133393`
- `type` (query, optional, string) — ISBN-10|ISSN (else GTIN family)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/barcodecheck-api/v1/checkdigit?code=400638133393"
```

**Response:**
```json
{
    "data": {
        "body": "400638133393",
        "type": "EAN-13",
        "full_code": "4006381333931",
        "check_digit": "1"
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.199Z",
        "request_id": "ac74ae90-8a59-4e4f-ba04-4685742c0a23"
    },
    "status": "ok",
    "message": "Compute a check digit",
    "success": true
}
```

#### `GET /v1/validate` — Validate a code check digit

**Parameters:**
- `code` (query, required, string) — EAN/UPC/GTIN/ISBN/ISSN code Example: `4006381333931`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/barcodecheck-api/v1/validate?code=4006381333931"
```

**Response:**
```json
{
    "data": {
        "also": [],
        "type": "EAN-13",
        "input": "4006381333931",
        "valid": true,
        "check_digit": "1",
        "expected_check_digit": "1"
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.307Z",
        "request_id": "220c4921-bc64-4141-b404-7e19a3274f17"
    },
    "status": "ok",
    "message": "Validate a code's check digit",
    "success": true
}
```

### ISBN

#### `GET /v1/isbn` — Validate + convert ISBN

**Parameters:**
- `code` (query, required, string) — ISBN-10 or ISBN-13 Example: `0306406152`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/barcodecheck-api/v1/isbn?code=0306406152"
```

**Response:**
```json
{
    "data": {
        "input": "0306406152",
        "isbn10": "0306406152",
        "isbn13": "9780306406157",
        "isbn10_valid": true
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.452Z",
        "request_id": "2b8f9040-3f73-41f0-8f31-5a200e9e6bf2"
    },
    "status": "ok",
    "message": "Validate + convert ISBN",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/barcodecheck-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; this gateway requires x-api-key",
        "name": "Barcode & Standard-Code Validator API",
        "note": "Validate the check digit of EAN-8, UPC-A, EAN-13, GTIN-14, ISBN-10, ISBN-13 and ISSN codes (/v1/validate?code=), compute the check digit for a partial code (/v1/checkdigit?code=&type=), and validate + convert ISBN-10 <-> ISBN-13 (/v1/isbn?code=). Hyphens and spaces are ignored. Instant, nothing stored. Distinct from barcode image generation, card-Luhn and IBAN checks.",
        "source": "Local check-digit validation — no key, no upstream",
        "endpoints": 4
    },
    "meta": {
        "timestamp": "2026-06-02T16:51:59.534Z",
        "request_id": "8a0f7e57-b4e8-447e-9f30-6ecb462a042b"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/barcodecheck-api
OpenAPI spec: https://www.oanor.com/api/barcodecheck-api/openapi.json
