Does this appointment fit: opening hours in the venue's zone, closed days, existing bookings with buffers, minimum notice

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/appointment-fit · Id appointment-fit

Checks one proposed appointment (instant + duration) against a venue's local opening hours per weekday, closed dates or a named holiday calendar, up to 500 existing bookings with a buffer on each side, and a minimum notice measured from a caller-supplied asOf; every violated rule is returned as a witness with the conflicting booking or hour block. Local hours are resolved in the venue's IANA zone so DST days are correct. It does not search for free slots (use slot-intersect), know staff or resource capacity, or read the clock.

What you get

The booking that lands at 17:30 local after a DST change, on a bank holiday or 10 minutes after another one is caught before it is confirmed.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/appointment-fit. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/appointment-fit \
  -H 'content-type: application/json' \
  -d '{"start":"2026-11-09T15:00:00Z","durationMinutes":45,"timeZone":"America/New_York","hours":[{"days":[1,2,3,4,5],"open":"09:00","close":"17:00"}],"bookings":[{"start":"2026-11-09T14:00:00Z","end":"2026-11-09T14:50:00Z"}],"bufferMinutes":15}'

Input

FieldTypeRequiredDescription
startstring; length 0..36yes
durationMinutesinteger; 1..1440yes
timeZonestring; length 0..64yesVenue zone in which hours apply.
hoursarray<object>; max 28 itemsyes
calendarstring; one of "us-federal", "us-federal-reserve", "nyse", "us-equities-settlement", "uk-england-and-wales", "uk-scotland", "uk-northern-ireland", "weekends-only", "caller"noOptional named holiday calendar for closed days (unsupported outside its range). Without it only holidays/weekend you list apply; hours decide the weekdays.
holidaysarray<string; length 0..10>; max 400 itemsnoExtra non-business dates YYYY-MM-DD (company closures, a calendar we do not carry).
weekendarray<integer; 0..6>; max 6 itemsnoIgnored for hours; with a named calendar only its holidays are used.
bookingsarray<object>; max 500 itemsno
bufferMinutesinteger; 0..1440noRequired gap on each side of the appointment.
minNoticeMinutesinteger; 0..525600noNeeds asOf.
asOfstring; length 0..36noReference instant for minimum notice.

Example request body

{
  "start": "2026-11-09T15:00:00Z",
  "durationMinutes": 45,
  "timeZone": "America/New_York",
  "hours": [
    {
      "days": [
        1,
        2,
        3,
        4,
        5
      ],
      "open": "09:00",
      "close": "17:00"
    }
  ],
  "bookings": [
    {
      "start": "2026-11-09T14:00:00Z",
      "end": "2026-11-09T14:50:00Z"
    }
  ],
  "bufferMinutes": 15
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
startLocalstringno
endLocalstringno
withinHoursbooleanno
closedDaybooleanno
conflictsarray<object>no
noticeMinutesintegerno
reasonstringno
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the calendar-deadline-kit package.

Machine-readable