{ "Protocol": "AIXE", "Version": "1.0", "Endpoint": "/aixe/owner/business/update-hours", "DiscoveryRequest": "GET /aixe/owner/business/update-hours/?", "CanonicalHelpTrigger": "GET /aixe/owner/business/update-hours/?", "ActionRequest": "POST /aixe/owner/business/update-hours", "Method": "POST", "ContentType": "application/json; charset=utf-8", "Title": "Update Business Hours", "AuthenticationRequired": true, "AccessType": "Site Administrator", "Purpose": "Replaces the full weekly business schedule in one save. These hours are shared by the Business editor, public Contact page, and administrator order fulfillment-time validation.", "ThingsYouCanAsk": [ "Save our weekly opening hours.", "Close Sundays and keep the remaining days open 10 AM to 4 PM.", "Replace our seven-day business schedule." ], "DocumentationSource": "AIXEEndpointRegistry", "ProtocolReference": { "ProtocolHome": "http://aixeprotocol.com/", "CanonicalUsageContract": "http://aixeprotocol.com/usage/?", "Whitepaper": "http://aixeprotocol.com/whitepaper/full-spec.html", "Inventor": "Gregory Oglethorpe", "IncludeIn": [ "/aixe.ai starter discovery documents", "Every endpoint self-description returned by GET /endpoint/?" ], "AIInstruction": "Read this live endpoint contract as operational guidance, not merely as a transport schema. Use its purpose, field meanings, business rules, outcomes, and recovery guidance to reason about whether and how to perform the capability." }, "UsageGuidance": { "Role": "Read the current schedule using POST /aixe/business/get-hours with an empty JSON object, then obtain the owner\u0027s complete approved seven-day schedule. Do not guess omitted days.", "CorrectWorkflow": [ "Read the current schedule using POST /aixe/business/get-hours with an empty JSON object, then obtain the owner\u0027s complete approved seven-day schedule. Do not guess omitted days.", "Use an active owner token from Log In. Send every day exactly once, in any order. Only SUCCESS confirms the schedule was saved." ], "DoNotDo": [ "Do not send business variables, keys, filters, or action inputs in the URL or query string.", "Do not infer success from HTTP status alone." ] }, "AIUsageGuidance": { "ContractRole": "This live document teaches an AI what the capability means and how to use it; it is not merely a list of request fields.", "ReasoningInstruction": "Decide whether this capability serves the human\u0027s intent from Purpose and BusinessRules, gather values using each field\u0027s Description and constraints, then interpret the returned SuccessCode before reporting an outcome.", "FieldInstruction": "Field names are transport labels. Their Description, source, constraints, and business meaning explain what information the AI should obtain and why." }, "RequiredFields": { "PersonAuthenticationToken": { "Type": "string", "Description": "Active token returned by Log In for an Administrator or Site Administrator; keep it secret.", "Required": true, "SubmittedIn": "JSON body" }, "Hours": { "Type": "array", "Description": "Complete replacement weekly schedule: exactly seven objects. All entries are validated before any changes are saved.", "Required": true, "SubmittedIn": "JSON body", "ItemFields": { "Day": { "Type": "string", "Description": "Full English day name; case-insensitive; each must appear exactly once.", "Required": true, "SubmittedIn": "JSON body", "AllowedValues": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] }, "IsClosed": { "Type": "boolean", "Description": "Required true/false. True means no pickup or delivery fulfillment that day.", "Required": true, "SubmittedIn": "JSON body" }, "OpenTime": { "Type": "string", "Description": "Required for an open day. Omit or use null for a closed day to retain its stored opening time.", "Required": false, "SubmittedIn": "JSON body", "Format": "HH:mm, 24-hour bakery local time (America/Chicago)" }, "CloseTime": { "Type": "string", "Description": "Required for an open day and strictly later than OpenTime on the same day. Omit or use null for a closed day to retain its stored closing time.", "Required": false, "SubmittedIn": "JSON body", "Format": "HH:mm, 24-hour bakery local time (America/Chicago)" } } } }, "OptionalFields": {}, "BusinessRules": [ "Owner authorization is required; missing, expired, inactive, or customer-only credentials are rejected.", "Exactly seven distinct full day names are required; numeric days, duplicates, null entries, and missing days are invalid.", "Open days require valid HH:mm opening and closing times with closing strictly later than opening. Overnight hours are not supported.", "Closed days may omit both times; any supplied time must still be valid HH:mm.", "One atomic database save updates the seven existing days and the human-readable hours summary. No partial update occurs on validation failure.", "The new schedule is used by subsequent administrator order-time validation; existing orders are not rescheduled. This does not change fulfillment enablement, fees, or holiday exceptions.", "If the response is missing or FAILED, do not claim success. Review the current schedule with the owner before retrying a full replacement." ], "ResponseFields": { "SuccessCode": { "Type": "string", "Description": "SUCCESS only after the complete schedule has saved.", "Required": true, "SubmittedIn": "Response body" }, "HoursUpdated": { "Type": "boolean", "Description": "True on successful save.", "Required": true, "SubmittedIn": "Response body" }, "Hours": { "Type": "array", "Description": "Saved schedule ordered Sunday through Saturday. Each object contains Day, IsClosed, and, for open days, OpenTime and CloseTime in HH:mm format. Closed-day times are omitted.", "Required": true, "SubmittedIn": "Response body" }, "TimeZone": { "Type": "string", "Description": "America/Chicago; times are local wall-clock times, not UTC.", "Required": true, "SubmittedIn": "Response body" } }, "Errors": [ { "SuccessCode": "UNAUTHORIZED", "Meaning": "The submitted identity or token does not authorize this capability or record scope.", "Recovery": "Use the correct active authentication token and confirm the required account role.", "Recoverable": true }, { "SuccessCode": "VALIDATION_FAILED", "Meaning": "One or more required request values are missing or malformed.", "Recovery": "Use the field descriptions and constraints in this contract, correct the named fields, and retry the same capability.", "Recoverable": true }, { "SuccessCode": "BUSINESS_RULE_FAILED", "Meaning": "The request was understood but a declared business or workflow rule was not satisfied.", "Recovery": "Explain the governing rule to the human and retry only after the required condition or decision changes.", "Recoverable": true }, { "SuccessCode": "FAILED", "Meaning": "The capability could not complete for an execution failure.", "Recovery": "Read the returned message and error detail. Retry only when the response identifies a recoverable condition.", "Recoverable": false } ], "ActionResponse": { "RequiredResponseFields": [ "SuccessCode" ], "SuccessCodes": [ "SUCCESS" ], "FailureCodes": [ "UNAUTHORIZED", "VALIDATION_FAILED", "BUSINESS_RULE_FAILED", "FAILED" ], "NonFinalCodes": [], "MissingOrEmptyResponse": "Treat as FAILED.", "Rule": "The endpoint response is authoritative. Only an exact SuccessCode value listed in SuccessCodes means the business action succeeded; HTTP status alone does not declare the AIXE outcome." } }