{
"ok": true,
"data": {
"valid": true,
"compact": "GB82WEST12345698765432",
"country": "GB",
"checkDigits": "82",
"length": 22,
"expectedLength": 22,
"checksumOk": true,
"lengthOk": true,
"issues": []
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39157/validate+an+iban' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"iban":"GB82 WEST 1234 5698 7654 32"}'
{
"ok": true,
"data": {
"valid": true,
"brand": "visa",
"last4": "1111",
"length": 16,
"luhnOk": true,
"issues": [],
"note": "Format and checksum only. This does not authorize a charge, confirm the card exists, or verify the cardholder."
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39158/validate+a+payment-card+number' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"number":"4111 1111 1111 1111"}'
{
"ok": true,
"data": {
"valid": true,
"type": "isbn-13",
"compact": "9780306406157",
"checksumOk": true,
"issues": []
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39159/validate+an+isbn-10+or+isbn-13' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"isbn":"978-0-306-40615-7"}'
{
"ok": true,
"data": {
"valid": true,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"version": 4,
"variant": "rfc4122",
"formatOk": true,
"issues": []
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39160/validate+a+uuid' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"uuid":"550e8400-e29b-41d4-a716-446655440000"}'
{
"ok": true,
"data": {
"valid": true,
"email": "[email protected]",
"local": "dev",
"domain": "example.com",
"formatOk": true,
"issues": [],
"note": "Format only. This does not check DNS, MX records, or whether a mailbox exists."
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39161/validate+email+format' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"email":"[email protected]"}'
{
"ok": true,
"data": {
"valid": true,
"type": "ean-13",
"compact": "4006381333931",
"checksumOk": true,
"expectedCheckDigit": 1,
"issues": []
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39162/validate+an+ean+upc+or+gtin' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"code":"4006381333931"}'
{
"ok": true,
"data": {
"valid": true,
"compact": "021000021",
"checksumOk": true,
"issues": [],
"note": "Checksum only. This does not confirm the institution exists or that an account can be debited."
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39163/validate+a+us+aba+routing+number' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"number":"021000021"}'
{
"ok": true,
"data": {
"valid": true,
"value": "2026-11-15T16:15:00Z",
"kind": "date-time",
"issues": []
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39164/validate+an+iso+8601+date+or+date-time' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"value":"2026-11-15T16:15:00Z"}'
{
"ok": true,
"data": {
"count": 3,
"passed": 3,
"failed": 0,
"results": [
{
"index": 0,
"type": "iban",
"result": {
"valid": true,
"compact": "DE89370400440532013000",
"country": "DE",
"checkDigits": "89",
"length": 22,
"expectedLength": 22,
"checksumOk": true,
"lengthOk": true,
"issues": []
}
},
{
"index": 1,
"type": "email",
"result": {
"valid": true,
"email": "[email protected]",
"local": "dev",
"domain": "example.com",
"formatOk": true,
"issues": [],
"note": "Format only. This does not check DNS, MX records, or whether a mailbox exists."
}
},
{
"index": 2,
"type": "isbn",
"result": {
"valid": true,
"type": "isbn-13",
"compact": "9780306406157",
"checksumOk": true,
"issues": []
}
}
]
}
}
curl --location --request POST 'https://zylalabs.com/api/14947/format+guard+api/39165/validate+up+to+50+values+at+once' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '{"items":[{"type":"iban","value":"DE89370400440532013000"},{"type":"email","value":"[email protected]"},{"type":"isbn","value":"9780306406157"}]}'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 格式保护 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
对IBAN、支付卡、ISBN、UUID、电子邮件、EAN/UPC、美国路由号码和ISO 8601日期进行校验和格式验证 所有检查均在本地计算 通过的校验和不意味着
不 这个API只检查格式和校验和 它不联系银行 卡片网络或支付处理器 也无法授权收费
不 卡号仅用于计算Luhn校验和品牌 然后被丢弃 响应包括最后4位 品牌 长度以及检验和是否通过
不 电子邮件检查仅仅是格式 检查 API 不查询 DNS 或 MX 记录,也不确认邮箱是否可以接收邮件
HTTP 200表示检查成功运行 结果在data.valid 中 false值表示字符串未通过校验和或格式规则 issues列出了原因 HTTP 400保留用于格式不正确的请求
每个调用最多50个项目。每个项目需要一个类型和一个值。类型包括iban 信用卡 isbn uuid 电子邮件 ean 路由号码 和 iso8601。UUID项目也可以包括版本
日历日期格式为YYYY-MM-DD,日期时间可选带有秒、分数秒以及Z或±HH:MM的时区偏移。检查月份长度和闰年。值如15/11/2026会被拒绝
API 返回 HTTP 413 并且不处理正文 保持每个字段在或低于文档长度限制
不 它是一个纯计算工具 它不查找机构 卡片 或邮箱 也不存储您发送的值
每个端点返回一个包含布尔 `ok` 字段表示成功和一个 `data` 字段包含特定验证结果的 JSON 对象 例如 IBAN 端点返回字段如 `valid` `compact` `country` 和 `issues`
关键字段包括 `valid`(布尔值)、`compact`(标准化值)、`length`(实际长度)、`expectedLength`(预期长度)、`checksumOk`(校验和有效性)和 `issues`(遇到的任何验证问题)
每个端点接受一个特定的值进行验证,例如IBAN、信用卡号码、ISBN、UUID、电子邮件、EAN、路由号码或ISO 8601日期。一些端点允许可选参数,如指定UUID版本
响应数据结构中包含一个 `ok` 字段表示整体成功,后面是一个 `data` 对象,包含详细的验证结果。每个结果包括与执行的验证类型相关的字段
API提供对各种标识符的验证:IBAN、银行卡、ISBN、UUID、电子邮件、EAN/UPC、美国路由号码和ISO 8601日期。每个端点专注于格式和校验和验证
用户可以检查`valid`字段来确定输入是否有效 像`issues`这样的额外字段提供了有关任何问题的见解,而`compact`则提供了用于进一步处理的标准化格式
典型的用例包括验证表单中的用户输入 确保金融交易中的数据完整性 和验证库存系统中的产品标识符 这有助于防止错误并提高数据质量
数据准确性通过基于既定标准的本地校验和计算和格式验证得以维持(例如,IBAN的ISO 13616,信用卡的卢恩算法)该API不依赖外部数据源,确保结果的一致性