Request type
choiceCancel + refund
Cancellation with a refund requested.
Decision API for AI applications
Ask questions about your data. Get typed answers—including calculated amounts and dates.
Sign up with your email. No approval needed.
Recorded demo
A customer asks to cancel a subscription. Watch System One use their account and request data to calculate the refund and deadline, then recalculate as the facts change.
Actual System One API results.
Jev formatOptional. Leave empty to run the Decision alone.
{ "name": "Subscription cancellation refunds", "inputs": { "customer_intent": { "type": "cancel_refund|cancel_only|other", "desc": "What is the customer's request type?", "options": { "cancel_refund": "Cancellation with a refund requested.", "cancel_only": "Cancellation without a refund requested.", "other": "Any other request." }, "from": "The customer's stated subscription request." }, "plan_amount": { "type": "number >= 0", "desc": "What is the subscription plan amount in USD?", "from": "The stated subscription plan price." }, "period_days": { "type": "number > 0", "desc": "How many days are in the subscription period?", "from": "The stated subscription period length." }, "unused_days": { "type": "number >= 0", "desc": "How many subscription days are unused?", "from": "The stated number of unused subscription days." }, "accepted_on": { "type": "date", "desc": "On what date was the request accepted?", "from": "The stated request acceptance date." }, "refundable": { "type": "boolean", "desc": "Is the account refundable?", "from": "The stated account refundability." } }, "decisions": { "request_type": { "desc": "Return the subscription cancellation request type.", "table": [ [ "customer_intent", "=> cancel_refund|cancel_only|other", "# why" ], [ "cancel_refund", "cancel_refund", "The customer requests cancellation with a refund." ], [ "cancel_only", "cancel_only", "The customer requests cancellation only." ], [ "-", "other", "The request is neither cancellation option." ] ] }, "refund_eligible": { "desc": "Determine whether the cancellation request is eligible for a refund. True only for cancel_refund when the account is refundable and unused_days is greater than zero; false otherwise.", "table": [ [ "customer_intent", "refundable", "unused_days > 0", "=> boolean", "# why" ], [ "cancel_refund", "true", "true", "true", "A refundable account with unused days qualifies for the requested refund." ], [ "-", "-", "-", "false", "At least one required refund condition is not met." ] ] }, "refund_amount": { "desc": "Return the eligible prorated refund in USD, capped at the plan amount and rounded to two decimal places; return zero when ineligible.", "table": [ [ "refund_eligible", "=> number >= 0", "# why" ], [ "true", "prorated_refund(plan_amount, unused_days, period_days)", "Prorate using unused days capped at the subscription period." ], [ "-", "0", "An ineligible request receives no refund." ] ] }, "deadline_days": { "type": "number", "desc": "Processing deadline offset in calendar days.", "expr": "7" }, "processing_deadline": { "type": "date", "desc": "Return the processing deadline seven calendar days after accepted_on.", "expr": "accepted_on + duration(\"P\" + string(deadline_days) + \"D\")" } }, "functions": { "prorated_refund": { "params": { "amount": "number", "unused": "number", "period": "number" }, "returns": "number", "body": "decimal(amount * (if unused < period then unused else period) / period, 2)" } } }
POST /v1/systemone{ "customer_intent": "cancel_refund", "plan_amount": 60, "period_days": 30, "unused_days": 10, "accepted_on": "2026-10-21", "refundable": true }
Your application · JavaScript
async function getRefund(decision, state, apiKey) {const res = await fetch("https://api.aityx.ai/v1/systemone", {method: "POST",headers: {Authorization: `Bearer ${apiKey}`,"Content-Type": "application/json"},body: JSON.stringify({ decision, state })});if (!res.ok) throw new Error(`aityx ${res.status}`);const { answers } = await res.json();return {amount: answers.refund_amount.number,due: answers.processing_deadline.date};}const refund = await getRefund(decision, state, apiKey);console.log(refund);
You’ve seen the request type, calculated refund and deadline. Get answers your application can use.
Built by Aletyx, a team with nearly two decades of enterprise decision experience.Meet the team →
Why aityx
Return the request type, refund amount and due date together. Your application can use each answer directly.
Cancel + refund
Cancellation with a refund requested.
$20.00
$60.00 × 10 unused days ÷ 30 days
October 21 + 7 calendar days
Recorded results using this example’s refund policy.
See the API exampleUse cases
Combine a message with the facts your application already has. Return what qualifies, the amount, and the date—in one response.
Subscription refunds
“Please cancel my subscription and refund the unused time.”
$60 plan · 10 of 30 days unused · accepted October 21 · refundable
$60 × 10 ÷ 30. The example gives seven calendar days to process the refund.
Service credits
“Can we get a credit for last month’s outage?”
98.5% uptime · $200 monthly fee · unscheduled outage · claimed after 3 days
The example credits 25% below 99% uptime: $200 × 25% = $50.
Expense claims
“Dinner with two clients. Receipt attached.”
$184 for 3 people · expense March 2 · submitted April 12
$184 ÷ 3 is within the $75 limit. Submission misses the example’s 30-day window.
How it works
Send a decision, Jev questions, or both to POST /v1/systemone. aityx executes locally when the facts already match, grades evidence with Jev when you ask, and feeds Jev answers into your rules when both are present.
Decision only
Send your decision with matching structured facts. Get choices, calculated amounts and dates in milliseconds.
Jev only
Send Jev questions with a message or other input. Get named probabilities, choices and scores as the result.
Jev + Decision
Send both in one request. Jev supplies the uncertain facts; your decision returns the consolidated answer.
Get started
Define your decision by hand in the console editor. Or build the same JSON with your preferred tools and submit it to aityx.
Get a request type, a $20 refund and an October 28 deadline.
Run the example →Define the inputs, tables and calculations by hand in the console editor, then check and run them.
Build by hand →Use your preferred tools or code to build a decision model in the aityx format.
See the model format →Using Jev? Combine its judgments with your aityx model to calculate amounts and dates.
See how they work together →Pricing
Decision-only, Jev-only and combined calls all use the same execution rate.
Your model on matching facts. No provider call.
Jev grades the evidence; its answers are the result.
Jev supplies the uncertain facts; your decision answers.
Prices in USD per 1 million tokens. Responses show token usage. Review settled charges in the console.
Integration questions
Yes, with the same decision and identical validated facts. Jev grading can vary, so the receipt separates values supplied in state from values supplied by Jev and records the calculation.
Yes. The response includes input sources and calculations in an inline receipt. Keep it with the facts you submitted. You can also view the model as JSON or a diagram.
Local execution stops if a required matching fact is missing. Add a Jev question when a fact must be graded, and use thresholds in your decision to route uncertain cases for review.
No. Send your decision with matching structured facts for local execution. Add Jev questions only when a fact needs to be graded from text or other unstructured evidence.
Yes. Send Jev questions alone, combine them with structured data and a decision in one call, or run Jev separately and pass its answers as facts. Read the Jev guide →
Define it by hand in the console editor, or build the same JSON with your preferred tools and submit it with your input. aityx validates and executes supplied decisions; it does not create them for you. See the model format →
Questions, yes: run them with Jev alone or with a decision. Documents are not uploaded to create a model; include relevant text as evidence in state and ask Jev questions about it.
Aletyx, a team with nearly two decades of enterprise decision experience.
Tech preview
Return the outcome, amount and deadline together, ready for your code to use. Sign up with your email. No approval needed.