{
  "name": "gs1.checkdigit",
  "group": "edi",
  "summary": "Calculate or validate a GS1 mod-10 check digit for SSCC-18, GTIN-14/13/12/8 and UPC.",
  "description": "Computes the GS1 mod-10 check digit, or validates a complete code and says what the digit should have been. Also catches the failure behind most real-world barcode and ASN mismatches: a spreadsheet dropping leading zeros or rendering the identifier in scientific notation, silently changing it. Pass a full code to validate, or the payload without its final digit to compute one.",
  "keywords": [
    "sscc-18",
    "sscc check digit",
    "gtin",
    "upc check digit",
    "ean-13",
    "gs1 mod 10",
    "barcode validation",
    "asn sscc"
  ],
  "endpoint": "https://fluentedi.com/v1/gs1/checkdigit",
  "mcp_name": "gs1_checkdigit",
  "makes_network_request": false,
  "parameters": {
    "type": "object",
    "properties": {
      "code": {
        "description": "The code, with or without its check digit. Spaces and hyphens are ignored.",
        "type": "string",
        "maxLength": 64,
        "examples": [
          "00614141123456789"
        ]
      },
      "length": {
        "description": "Expected total length (8, 12, 13, 14 or 18). Inferred when omitted.",
        "type": "integer",
        "default": 0
      }
    },
    "required": [
      "code"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "Validate a UPC-12",
      "url": "https://fluentedi.com/v1/gs1/checkdigit?code=036000291452",
      "args": {
        "code": "036000291452"
      }
    },
    {
      "description": "Compute the check digit for an SSCC payload",
      "url": "https://fluentedi.com/v1/gs1/checkdigit?code=00614141123456789",
      "args": {
        "code": "00614141123456789"
      }
    },
    {
      "description": "Catch a code mangled by a spreadsheet",
      "url": "https://fluentedi.com/v1/gs1/checkdigit?code=614141123456789&length=18",
      "args": {
        "code": "614141123456789",
        "length": 18
      }
    }
  ],
  "suggestion": null
}