{"uid":"cap_o8edzIDD4j6IheUwtu_b7","slug":"brainiac-appointment-cancellation-pattern-detector-0b4463af","name":"BRAINIAC Appointment Cancellation Pattern Detector","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/appointment-intelligence/cancellation-pattern-detect?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"csv":{"type":"string","maxLength":200000},"asOf":{"type":"string","maxLength":40},"file":{"type":"object","required":["mediaType","fileBase64"],"properties":{"filename":{"type":"string","maxLength":180,"minLength":1},"mediaType":{"enum":["text/plain","text/csv","application/json"],"type":"string"},"fileBase64":{"type":"string","maxLength":12000000,"minLength":1}},"additionalProperties":false},"json":{"type":"string","maxLength":200000},"text":{"type":"string","maxLength":200000},"slots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"end":{"type":"string","maxLength":40},"start":{"type":"string","maxLength":40},"capacity":{"type":"number","maximum":10000,"minimum":0},"providerId":{"type":"string","maxLength":80}},"additionalProperties":false},"maxItems":200},"minSample":{"type":"integer","maximum":100000,"minimum":1},"providers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"name":{"type":"string","maxLength":160},"capacityMinutes":{"type":"number","maximum":100000,"minimum":0}},"additionalProperties":false},"maxItems":40},"gapMinutes":{"type":"integer","maximum":1440,"minimum":1},"appointments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80},"end":{"type":"string","maxLength":40},"start":{"type":"string","maxLength":40},"status":{"type":"string","maxLength":80},"channel":{"type":"string","maxLength":80},"service":{"type":"string","maxLength":160},"bookedAt":{"type":"string","maxLength":40},"clientId":{"type":"string","maxLength":80},"providerId":{"type":"string","maxLength":80},"reminderAt":{"type":"string","maxLength":40},"cancelledAt":{"type":"string","maxLength":40}},"additionalProperties":false},"maxItems":500}}},"responseSchema":{"type":"json","example":{"items":[{"id":"A-1","start":"2026-11-03T10:00:00.000Z","service":"","weekday":"tue","leadHours":2,"providerId":"P-1","cancelledAt":"2026-11-03T08:00:00.000Z","shortNotice":true,"leadHoursSupplied":true},{"id":"A-2","start":"2026-11-03T14:00:00.000Z","service":"","weekday":"tue","leadHours":48,"providerId":"P-1","cancelledAt":"2026-11-01T14:00:00.000Z","shortNotice":false,"leadHoursSupplied":true},{"id":"A-3","start":"2026-11-04T10:00:00.000Z","service":"","weekday":"wed","leadHours":1,"providerId":"P-1","cancelledAt":"2026-11-04T09:00:00.000Z","shortNotice":true,"leadHoursSupplied":true}],"status":"detected","findings":[{"code":"sample_small","kind":"observation","detail":"Sample size 1 is below the disclosed minimum of 2. Treat the rate as uncertain.","subject":"wed"}],"weekdays":[{"weekday":"tue","uncertainty":"observed","shortNoticeRate":0.5,"sampleSufficient":true,"shortNoticeCount":1,"cancellationCount":2,"shortNoticeRateSupplied":true},{"weekday":"wed","uncertainty":"high","shortNoticeRate":1,"sampleSufficient":false,"shortNoticeCount":1,"cancellationCount":1,"shortNoticeRateSupplied":true}],"checkedAt":"2026-11-04T18:00:00.000Z","minSample":2,"limitations":["Appointments, slots, and providers are copied only from labeled fields supplied by the caller.","Attendance, cancellation, and utilization metrics use only those records. Missing times are not invented.","Pattern notes and recommendations describe observed counts. They are not a guarantee of future attendance.","Protected characteristics and sensitive personal attributes are not accepted or used.","No reminder is sent and no booking is modified. Small samples are disclosed."],"uncertainty":"observed","reminderSent":false,"bookingModified":false,"recommendations":[{"code":"review_cancellation_day","detail":"Observed 2 cancellations on tue. Short-notice share 0.5. This is observed history, not a prediction.","attendancePredicted":false},{"code":"review_short_notice_policy","detail":"Some cancellations occurred under 24 hours before the start time in the supplied timestamps.","attendancePredicted":false}],"sampleSufficient":true,"shortNoticeCount":2,"cancellationCount":3,"attendancePredicted":false,"protectedAttributesUsed":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.04","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.04/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.04","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5ZOXXmG9kb3wdNZB5AsTX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.04","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes appointment records to detect cancellation patterns by weekday, short-notice rates, and provider, returning structured findings and recommendations.","exampleAgentPrompt":"Look at this appointment history CSV and detect cancellation patterns — tell me which weekdays have the highest short-notice cancellation rates, flag any appointments cancelled within 2 hours of the start time as short notice, and give me recommendations. Use a minimum sample of 10 appointments per weekday before drawing conclusions.","exampleUseCases":[{"title":"Clinic reducing last-minute no-shows","prompt":"I have a CSV of the last 6 months of patient appointments including cancellation timestamps — can you analyze it to find which days of the week have the most short-notice cancellations (within 2 hours of start time) and tell me which providers are most affected? Use a minimum sample of 20 per weekday."},{"title":"Salon optimizing cancellation policy","prompt":"Here's our appointment data for the past quarter as JSON — detect any cancellation patterns by weekday and service type, flag short-notice cancellations under 24 hours, and give us recommendations on whether we should tighten our cancellation policy. Minimum sample size should be 5."},{"title":"Scheduling agent auditing booking channel performance","prompt":"Analyze these 300 appointment records and tell me whether phone-booked or online-booked appointments have worse short-notice cancellation rates. Flag anything cancelled within 4 hours as short notice and use at least 15 appointments per group before reporting a rate."}],"resultDescription":"Returns a JSON object containing: per-appointment items with weekday, lead hours, and short-notice flag; aggregated weekday-level cancellation counts and short-notice rates with uncertainty and sample-sufficiency indicators; a list of coded findings (e.g. small sample warnings); actionable recommendations (e.g. review cancellation day, tighten policy); and metadata including checkedAt timestamp, minSample used, and a list of limitations disclosing what the analysis can and cannot infer.","failureModes":["Insufficient appointment data — returns high-uncertainty findings when sample is below minSample","Missing cancelledAt timestamps — lead hours not computable; leadHoursSupplied will be false","Malformed date strings in start/end/cancelledAt fields cause parsing failures","CSV or JSON exceeds 200,000 character limit — request rejected","More than 500 appointments in the array — excess records truncated or rejected","Empty appointments array — no patterns can be detected, returns empty items"],"whenToPreferThis":"Use this endpoint when you have structured appointment data and need to identify cancellation timing patterns, short-notice rates by weekday or provider, and actionable scheduling policy recommendations — without needing a full analytics platform or BI tool. Prefer this over generic data analysis endpoints when the input is appointment/booking records with statuses and timestamps, and you need compliance-safe, clearly-limited statistical analysis with explicit uncertainty disclosure.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T18:39:27.040Z","isFirstParty":false,"canonicalSlug":"brainiac-appointment-cancellation-pattern-detector-0b4463af"}