{"uid":"cap_3XbSS2sy5ryxSe6V5dZ40","slug":"writerslogic-confirmation-state-classifier-ef2c7983","name":"WritersLogic Confirmation State Classifier","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/confirmation-state?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":20000,"minLength":1,"description":"Confirmation text."},"rules":{"type":"array","items":{"type":"object","required":["state","phrases"],"properties":{"state":{"enum":["submitted","pending","reserved","completed"],"type":"string"},"phrases":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":30}},"additionalProperties":false},"maxItems":20,"description":"Caller phrase lists; with these present the defaults are off unless useDefaults is true."},"precedence":{"type":"array","items":{"enum":["submitted","pending","reserved","completed"],"type":"string"},"maxItems":4,"description":"When several states match, the first one listed wins. Without it a conflict is unknown."},"useDefaults":{"type":"boolean","description":"Include the default English phrases. Default true only when rules is absent."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_06NpT44pddbbBRQt_nM0u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Classifies a confirmation text (page, email, or API message) into one of four states—submitted, pending, reserved, or completed—using caller-supplied or default English phrase lists, with negation detection and conflict resolution.","exampleAgentPrompt":"Parse this hotel booking confirmation email and tell me whether it says submitted, pending, reserved, or completed — use these phrases to detect each state: submitted=['your request has been received'], pending=['awaiting confirmation','under review'], reserved=['your reservation is held'], completed=['booking confirmed','you're all set']. If two states match at once, give precedence to completed, then reserved.","exampleUseCases":[{"title":"Airline booking status detection","prompt":"I just got this response back from an airline API after booking a flight — can you classify it as submitted, pending, reserved, or completed? Use phrases like 'booking received' for submitted, 'processing payment' for pending, 'seat held' for reserved, and 'ticket issued' for completed. If there's a conflict, prefer completed over the others."},{"title":"E-commerce order confirmation parsing","prompt":"Here's the HTML from a checkout success page. Can you tell me if the order state is submitted, pending, or completed? Use these phrases — submitted: ['order placed','we got your order'], pending: ['payment processing','awaiting fulfillment'], completed: ['order confirmed','your purchase is complete'] — and fall back to default English phrases too."},{"title":"Hotel reservation email classification","prompt":"Can you read this hotel confirmation email text and decide if the reservation is in a submitted, pending, reserved, or completed state? I'll give you my own phrase lists: reserved=['your room is on hold','reservation held'], completed=['stay confirmed','your booking is finalized']. If those conflict, give priority to completed first, then reserved."}],"resultDescription":"Returns the detected state (submitted, pending, reserved, completed, or unknown if conflicting without precedence), along with matched phrases and their byte/character offsets in UTF-16, code points, UTF-8, and grapheme units, plus flags indicating whether any match was negated (e.g. inside a 'not yet confirmed' scope) and details of any conflict.","failureModes":["Text is empty or exceeds 20,000 characters — validation error","Phrase lists contain more than 30 phrases per state or more than 20 rule entries — validation error","Two states matched simultaneously with no precedence provided — returns unknown with conflict details","Match found inside negation scope (e.g. 'not yet confirmed') — reported as negated and excluded from state decision","No phrases match at all — returns unknown with no match details","Caller forgets to set useDefaults:true alongside custom rules — default English phrases are not applied"],"whenToPreferThis":"Use this endpoint when an AI agent needs to interpret a provider-specific confirmation message (email, page, API response) and extract a canonical booking/order state without relying on an LLM's probabilistic judgment. It is especially valuable when the provider's exact wording is known and can be supplied as phrase rules, when negation handling (e.g. 'not yet confirmed') is important for correctness, and when byte-level match offsets are needed for downstream processing. Prefer it over general-purpose LLM classification when determinism, auditability, and rule transparency matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T12:36:56.946Z","isFirstParty":false,"canonicalSlug":"writerslogic-confirmation-state-classifier-ef2c7983"}