{ "Protocol": "AIXE", "Version": "1.0", "Endpoint": "/aixe/owner/service-areas/create-service-area", "DiscoveryRequest": "GET /aixe/owner/service-areas/create-service-area/?", "CanonicalHelpTrigger": "GET /aixe/owner/service-areas/create-service-area/?", "ActionRequest": "POST /aixe/owner/service-areas/create-service-area", "Method": "POST", "ContentType": "application/json; charset=utf-8", "Title": "Create Service Area", "AuthenticationRequired": true, "AccessType": "Site Administrator", "Purpose": "Creates one city service area and links it to the Business with LinkerRole Service Area.", "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": "Gather the location-specific content, confirm it with the owner, and obtain approval immediately before creation.", "CorrectWorkflow": [ "Gather the location-specific content, confirm it with the owner, and obtain approval immediately before creation." ], "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": "The active Site Administrator token returned by Log In.", "Required": true, "SubmittedIn": "JSON body" }, "Name": { "Type": "string", "Description": "The city name displayed to customers.", "Required": true, "SubmittedIn": "JSON body", "MaxLength": 100 }, "State": { "Type": "string", "Description": "The state name or abbreviation displayed with the city.", "Required": true, "SubmittedIn": "JSON body", "MaxLength": 50 }, "Headline": { "Type": "string", "Description": "The welcoming location-specific section headline.", "Required": true, "SubmittedIn": "JSON body", "MaxLength": 250 }, "Description": { "Type": "string", "Description": "The location-specific service-area copy.", "Required": true, "SubmittedIn": "JSON body", "MaxLength": 4000 } }, "OptionalFields": { "ImagePath": { "Type": "string", "Description": "The site-relative image URL for this location.", "Required": false, "SubmittedIn": "JSON body", "MaxLength": 500 }, "ImageAlternativeText": { "Type": "string", "Description": "A meaningful description of the location image.", "Required": false, "SubmittedIn": "JSON body", "MaxLength": 500 }, "SortOrder": { "Type": "integer", "Description": "The location\u0027s display order.", "Required": false, "SubmittedIn": "JSON body" }, "IsActive": { "Type": "boolean", "Description": "Whether this service area is publicly visible; defaults to true.", "Required": false, "SubmittedIn": "JSON body" } }, "BusinessRules": [ "The caller must have the Site Administrator or Administrator role.", "City and state determine a unique generated slug.", "An active service area requires ImagePath and ImageAlternativeText.", "Creation adds a Business-to-City Linker row with LinkerRole Service Area." ], "ResponseFields": { "SuccessCode": { "Type": "string", "Description": "The authoritative action outcome.", "Required": true, "SubmittedIn": "Response body" }, "ServiceAreaCreated": { "Type": "boolean", "Description": "True when the City and Service Area Linker row were saved.", "Required": true, "SubmittedIn": "Response body" }, "ServiceArea": { "Type": "object", "Description": "The complete created service-area record.", "Required": true, "SubmittedIn": "Response body" } }, "Errors": [ { "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": "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": "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": [ "VALIDATION_FAILED", "UNAUTHORIZED", "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." } }