Skip to content
ToolsOnDuty - free online tools
ToolsOnDuty / docs
Browse documentation

Reference / Validation

Validation API

4 endpoints for validation workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/validate/isbn1 credit / call

ISBN validator

Normalize and validate ISBN-10 and ISBN-13 checksums.

ParameterTypeRequiredDescription
isbnstringYesISBN-10 or ISBN-13.

Request

curl -X POST https://toolsonduty.com/api/v1/validate/isbn \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"isbn":"978-0-306-40615-7"}'

Response

{
  "ok": true,
  "data": {
    "valid": true,
    "type": "ISBN-13",
    "normalized": "9780306406157"
  }
}
POST/v1/validate/json-schema1 credit / call

JSON Schema validator

Validate JSON against supported JSON Schema 2020-12 keywords with path-specific errors.

ParameterTypeRequiredDescription
jsonstringYesJSON data.
schemastringYesJSON Schema object.

Request

curl -X POST https://toolsonduty.com/api/v1/validate/json-schema \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"json":"{\"age\":36}","schema":"{\"type\":\"object\",\"required\":[\"age\"],\"properties\":{\"age\":{\"type\":\"integer\",\"minimum\":0}}}"}'

Response

{
  "ok": true,
  "data": {
    "valid": true,
    "errors": []
  }
}
POST/v1/validate/card1 credit / call

Payment-card validator

Check card-number length, likely brand and Luhn checksum without storing the value.

ParameterTypeRequiredDescription
numberstringYesPayment-card number; spaces and hyphens are allowed.

Request

curl -X POST https://toolsonduty.com/api/v1/validate/card \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"number":"4111 1111 1111 1111"}'

Response

{
  "ok": true,
  "data": {
    "valid": true,
    "brand": "Visa",
    "lastFour": "1111"
  }
}
POST/v1/validate/fqdn1 credit / call

FQDN validator

Validate hostname length, label syntax and top-level label rules.

ParameterTypeRequiredDescription
hostnamestringYesFully qualified domain name.

Request

curl -X POST https://toolsonduty.com/api/v1/validate/fqdn \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"api.example.com"}'

Response

{
  "ok": true,
  "data": {
    "valid": true,
    "hostname": "api.example.com",
    "labels": [
      "api",
      "example",
      "com"
    ],
    "errors": []
  }
}