commerce $0.0003 / call
GTIN Validate
Validate GTIN-8, UPC/GTIN-12, EAN/GTIN-13 and GTIN-14 check digits; no product lookup.
commerce.gtin-validatecommerce.money-parse · v1.0.0
Normalize up to 50 displayed prices with explicit locale, currency and decimal scale; exact amounts, strict grouping and per-price errors.
{
"locale": "de-DE",
"currency": "EUR",
"minorUnitDigits": 2,
"amounts": [
{
"id": "offer-1",
"text": "1.234,56 €"
},
{
"id": "offer-2",
"text": "EUR 999,95"
},
{
"id": "range",
"text": "10–20 €"
}
]
}{
"locale": "de-DE",
"currency": "EUR",
"minorUnitDigits": 2,
"amounts": [
{
"id": "offer-1",
"valid": true,
"amount": "1234.56",
"minorUnits": "123456",
"currencyToken": "€",
"issue": null
},
{
"id": "offer-2",
"valid": true,
"amount": "999.95",
"minorUnits": "99995",
"currencyToken": "EUR",
"issue": null
},
{
"id": "range",
"valid": false,
"amount": null,
"minorUnits": null,
"currencyToken": "€",
"issue": "invalid_number"
}
],
"allValid": false,
"acceptedCurrencyTokens": [
"EUR",
"€"
],
"scope": "Nonnegative prices with ASCII digits and explicit locale, currency and decimal scale. One optional currency affix; no currency inference, conversion, rounding, signs, ranges or prose. A shared symbol such as $ is interpreted using the declared currency, not independently verified."
}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.money-parse', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + process.env.AGENT_UTILITIES_API_KEY,
'Idempotency-Key': requestId
},
body: JSON.stringify({
"locale": "de-DE",
"currency": "EUR",
"minorUnitDigits": 2,
"amounts": [
{
"id": "offer-1",
"text": "1.234,56 €"
},
{
"id": "offer-2",
"text": "EUR 999,95"
},
{
"id": "range",
"text": "10–20 €"
}
]
})
});
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": {
"locale": {
"type": "string",
"enum": [
"en-US",
"en-GB",
"de-DE",
"fr-FR",
"en-IN"
]
},
"currency": {
"type": "string",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD",
"JPY",
"INR"
]
},
"minorUnitDigits": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"amounts": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"required": [
"id",
"text"
],
"additionalProperties": false
}
}
},
"required": [
"locale",
"currency",
"minorUnitDigits",
"amounts"
],
"additionalProperties": false
}{
"type": "object",
"properties": {
"locale": {
"type": "string"
},
"currency": {
"type": "string"
},
"minorUnitDigits": {
"type": "number"
},
"amounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"valid": {
"type": "boolean"
},
"amount": {
"type": [
"string",
"null"
]
},
"minorUnits": {
"type": [
"string",
"null"
]
},
"currencyToken": {
"type": [
"string",
"null"
]
},
"issue": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"valid",
"amount",
"minorUnits",
"currencyToken",
"issue"
],
"additionalProperties": false
}
},
"allValid": {
"type": "boolean"
},
"acceptedCurrencyTokens": {
"type": "array",
"items": {
"type": "string"
}
},
"scope": {
"type": "string"
}
},
"required": [
"locale",
"currency",
"minorUnitDigits",
"amounts",
"allValid",
"acceptedCurrencyTokens",
"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.0003 / call
Validate GTIN-8, UPC/GTIN-12, EAN/GTIN-13 and GTIN-14 check digits; no product lookup.
commerce.gtin-validatecommerce $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-plan