commerce $0.0005 / call
Variant Compare
Compare requested product attributes with an offered variant and list missing or mismatched fields.
commerce.variant-comparecommerce.gtin-validate · v1.0.0
Validate GTIN-8, UPC/GTIN-12, EAN/GTIN-13 and GTIN-14 check digits; no product lookup.
{
"code": "036000291452"
}{
"valid": true,
"format": "GTIN-12",
"expectedCheckDigit": "2",
"scope": "Checks identifier length and check digit only; does not confirm product ownership or existence."
}Generated from the actual handler using this example input; this is a preview, not a paid API call. Paid responses wrap the result with a receipt and recovery expiry.
Add credits in the workspace and keep your API key in private environment storage. Use the same request ID and exact body to recover a lost response within ten minutes.
// Node.js 22+. Read the key from your private environment.
const requestId = Date.now() + '_' + crypto.randomUUID();
const response = await fetch('https://agent-utilities.agent-utilities.workers.dev/v1/tools/commerce.gtin-validate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + process.env.AGENT_UTILITIES_API_KEY,
'Idempotency-Key': requestId
},
body: JSON.stringify({
"code": "036000291452"
})
});
const data = await response.json();
if (!response.ok) throw new Error(data.error?.message ?? 'Request failed');
console.log(data);
// On response loss, retry this SAME requestId, tool and body.
// Do not rerun the line that generates requestId for a retry.{
"type": "object",
"properties": {
"code": {
"type": "string",
"maxLength": 32
}
},
"required": [
"code"
],
"additionalProperties": false
}{
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"format": {
"type": "string"
},
"expectedCheckDigit": {
"type": [
"string",
"null"
]
},
"scope": {
"type": "string"
}
},
"required": [
"valid",
"format",
"expectedCheckDigit",
"scope"
],
"additionalProperties": false
}Prices are experimental. The service currently allows 1,000 new calls per day across all accounts. Failed operations return reserved credits. Successful results are encrypted for ten-minute retry recovery. Review data handling and service limits.
commerce $0.0005 / call
Compare requested product attributes with an offered variant and list missing or mismatched fields.
commerce.variant-comparecommerce $0.0008 / call
Choose the lowest-cost whole-pack combination for a required count with exact prices and explicit pack limits; up to 20 interchangeable offers.
commerce.pack-plancommerce $0.0003 / call
Normalize up to 50 displayed prices with explicit locale, currency and decimal scale; exact amounts, strict grouping and per-price errors.
commerce.money-parse