# `validate_gtin_check_digit` — Validate or Compute GS1 GTIN / SSCC Check Digit

> Part of [Barcode, QR & Logistics Label Sheet Edge API](https://barcode-pass.apikeg.com/llms.txt) (`com.apikeg/barcode-pass`)

Validates or computes official GS1 Modulo-10 check digits for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GSIN-17, and SSCC-18 identifiers (single value or batch up to 100).

**Why call instead of DIY:** Prevents costly retailer/Amazon GTIN check-digit rejections and off-by-one right-to-left 3x/1x weighting bugs.

- **REST Endpoint:** `POST https://barcode-pass.apikeg.com/v1/validate-gtin-check-digit`
- **MCP Server:** `https://barcode-pass.apikeg.com/mcp` (tool: `validate_gtin_check_digit`)
- **Pricing:** $0.0005 USD per GTIN/SSCC validation request (up to 100 codes) (x402 instant micropayment)
- **Free Dry-Run:** `POST https://barcode-pass.apikeg.com/v1/validate-gtin-check-digit?dry_run=true`

## Input JSON Schema
```json
{
  "type": "object",
  "properties": {
    "value": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Single GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GSIN-17, or SSCC-18 string to validate or complete."
    },
    "values": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64
      },
      "minItems": 1,
      "maxItems": 100,
      "description": "Optional batch of 1 to 100 GTIN/SSCC strings to validate in a single call."
    }
  },
  "additionalProperties": false
}
```

## Examples
### Validate EAN-13 check digit
```bash
curl -X POST "https://barcode-pass.apikeg.com/v1/validate-gtin-check-digit" \
  -H "Content-Type: application/json" \
  -d '{"value":"4006381333931"}'
```
Expected output: valid=true, gtinType='GTIN-13', expectedCheckDigit='1'.
