{"openapi":"3.0.3","info":{"title":"TAGR - GDPR Journey Testing Platform API","description":"REST API for submitting, monitoring, and managing GDPR compliance testing journeys. Execute automated browser journeys to capture cookies, tracking pixels, and data layer information for GDPR compliance evaluation.","version":"1.0.0","contact":{"name":"API Support"},"license":{"name":"MIT"}},"servers":[{"url":"/api/v1","description":"API v1"}],"tags":[{"name":"Journeys","description":"Journey submission and management"},{"name":"Configuration","description":"Tracking pixel configuration"},{"name":"Journey Optimizer","description":"AI-powered journey enrichment — transforms a bare domain into an agent-ready GDPR audit journey"},{"name":"Health","description":"Service health monitoring"}],"paths":{"/journeys":{"post":{"tags":["Journeys"],"summary":"Submit a new journey","description":"Submit a new GDPR testing journey. The journey is queued for execution and a job ID is returned for tracking progress.","operationId":"submitJourney","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyRequest"},"examples":{"basic":{"summary":"Simple journey","value":{"journey":"Go to https://books.toscrape.com/ find a book about spies and try to add it to the cart. Then visit the cart page."}},"withOptions":{"summary":"Journey with options","value":{"journey":"Go to https://example.com, reject all cookies, browse products","webhookUrl":"https://myapp.com/webhook","options":{"gdprEvaluation":true,"dataLayerValidation":true,"screenshots":true,"timeoutMs":120000}}},"sonyUk":{"summary":"Sony UK example with options","value":{"journey":"Go to sony UK's home page (www.sony.co.uk) and reject cookies. Then find a product page link on the home page and click on it. While on the PDP try to play a video and go through the media of a gallery and then add the product to the cart. Then try to visit the cart page.","options":{"skipPreflight":true,"gdprEvaluation":false,"dataLayerValidation":false,"screenshots":true,"strictValidation":false}}},"skipValidation":{"summary":"Journey skipping pre-flight validation","value":{"journey":"Go to Sony UK home page, reject cookies, find a product","options":{"skipPreflight":true}}}}}}},"responses":{"202":{"description":"Journey accepted and queued for execution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyAccepted"}}}},"400":{"description":"Invalid request or pre-flight validation failed","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ValidationError"},{"$ref":"#/components/schemas/PreflightValidationError"}]}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Journeys"],"summary":"List journey history","description":"Retrieve a paginated list of all submitted journeys.","operationId":"listJourneys","security":[{"apiKey":[]}],"parameters":[{"name":"limit","in":"query","description":"Maximum number of journeys to return","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"offset","in":"query","description":"Number of journeys to skip","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"List of journeys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JourneyStatus"}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}}},"/journeys/{id}":{"get":{"tags":["Journeys"],"summary":"Get journey status and results","description":"Retrieve the full status and results of a journey including captured data, violations, and AI insights.","operationId":"getJourney","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Journey/Job ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Journey details and results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyResult"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Journey not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Journeys"],"summary":"Cancel a running journey","description":"Cancel a pending or running journey. Completed journeys cannot be cancelled.","operationId":"cancelJourney","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Journey/Job ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Journey cancelled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"CANCELLED"}}}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Journey not found or already completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/status":{"get":{"tags":["Journeys"],"summary":"Get journey status only","description":"Retrieve only the status and progress of a journey (lightweight endpoint).","operationId":"getJourneyStatus","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Journey/Job ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Journey status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyStatus"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Journey not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/report":{"get":{"tags":["Journeys"],"summary":"Get HTML compliance report","description":"Generate a styled HTML compliance report for a completed journey. Includes an executive summary, deduplicated action points, and full violation details.","operationId":"getJourneyReport","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Journey/Job ID","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"HTML compliance report","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"description":"Journey not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Journey is not completed yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journeys/{id}/evaluate":{"post":{"tags":["Journeys"],"summary":"Re-evaluate a completed journey","description":"Re-run GDPR and/or data layer checks on an already-completed journey without re-executing browser automation. Useful for re-evaluating with updated cookie patterns, running checks that were disabled originally, or overriding the consent action.","operationId":"reEvaluateJourney","security":[{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Journey/Job ID","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReEvaluateRequest"}}}},"responses":{"200":{"description":"Re-evaluation results","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReEvaluateResult"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Journey not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Journey not completed or has no page data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/journey/enrich":{"post":{"tags":["Journey Optimizer"],"summary":"Enrich a domain into an agent-ready GDPR journey","description":"Given a target domain (and optionally a rough journey or structured config), uses LLM-powered research to discover the domain's structure, then produces a fully enriched, agent-ready journey string that Stagehand can execute without human editing.","operationId":"enrichJourney","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyEnrichRequest"},"examples":{"bareDomain":{"summary":"Bare domain only","value":{"domain":"sony.com.mx"}},"withRoughJourney":{"summary":"Domain with rough journey","value":{"domain":"sony.com.br","journey":"check sony brazil for cookie issues, look at some cameras"}},"withConfig":{"summary":"Domain with structured config","value":{"domain":"sony.com.co","config":{"locale":"es-CO","categories":["televisores","parlantes-inalambricos"],"include_subdomains":["store.sony.com.co"],"skip_checkout":false,"skip_media":false}}}}}}},"responses":{"200":{"description":"Enriched journey with domain profile and metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyEnrichResult"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Enrichment failed (domain unreachable, LLM generation failed)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneyEnrichError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/config/tracking":{"get":{"tags":["Configuration"],"summary":"Get tracking pixel configuration","description":"Retrieve the current tracking pixel patterns and categories configuration.","operationId":"getTrackingConfig","security":[{"apiKey":[]}],"responses":{"200":{"description":"Tracking configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingConfig"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["Configuration"],"summary":"Update tracking pixel configuration","description":"Update the tracking pixel patterns and categories. Requires admin privileges.","operationId":"updateTrackingConfig","security":[{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingConfigUpdate"}}}},"responses":{"200":{"description":"Updated tracking configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingConfig"}}}},"400":{"description":"Invalid configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Insufficient permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Health check endpoint","description":"Check if the service is healthy and operational.","operationId":"healthCheck","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}},"503":{"description":"Service is unhealthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthStatus"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key for authentication"}},"schemas":{"JourneyRequest":{"type":"object","required":["journey"],"properties":{"journey":{"type":"string","description":"Natural language description of the journey to execute","minLength":1,"maxLength":10000,"example":"Go to https://books.toscrape.com/ find a book about spies and try to add it to the cart. Then visit the cart page."},"webhookUrl":{"type":"string","format":"uri","description":"URL to receive webhook notifications on completion","example":"https://myapp.com/webhook"},"options":{"$ref":"#/components/schemas/JourneyOptions"}}},"JourneyOptions":{"type":"object","properties":{"targetUrl":{"type":"string","format":"uri","description":"Override target URL for the journey"},"gdprEvaluation":{"type":"boolean","default":true,"description":"Enable GDPR compliance evaluation"},"dataLayerValidation":{"type":"boolean","default":false,"description":"Enable data layer validation"},"screenshots":{"type":"boolean","default":false,"description":"Capture screenshots during journey"},"timeoutMs":{"type":"integer","minimum":10000,"maximum":600000,"default":120000,"description":"Journey timeout in milliseconds"},"skipPreflight":{"type":"boolean","default":false,"description":"Skip pre-flight validation (URL reachability checks, step sequence validation). Useful when URLs are behind authentication or have strict bot protection."},"strictValidation":{"type":"boolean","default":false,"description":"Treat validation warnings as errors. When enabled, journeys with warnings will be rejected during pre-flight validation."}}},"JourneyAccepted":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid","description":"Unique identifier for the queued journey"},"status":{"type":"string","enum":["PENDING"],"description":"Initial job status"}}},"JourneyStatus":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/JobStatus"},"progress":{"$ref":"#/components/schemas/JobProgress"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"JourneyResult":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"status":{"$ref":"#/components/schemas/JobStatus"},"error":{"type":"string","description":"Error message if journey failed"},"progress":{"$ref":"#/components/schemas/JobProgress"},"metadata":{"$ref":"#/components/schemas/JourneyMetadata"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/PageState"}},"violations":{"type":"array","items":{"$ref":"#/components/schemas/Violation"}},"aiInsights":{"$ref":"#/components/schemas/AIInsights"},"dataLayerValidation":{"$ref":"#/components/schemas/DataLayerValidationResult"},"summary":{"$ref":"#/components/schemas/JourneySummary"},"executionMetrics":{"$ref":"#/components/schemas/ExecutionMetrics"}}},"JobStatus":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","TIMEOUT","CANCELLED"],"description":"Current status of the job"},"JobProgress":{"type":"object","properties":{"currentStep":{"type":"integer","description":"Current step number being executed"},"totalSteps":{"type":"integer","description":"Total number of steps in the journey"},"currentAction":{"type":"string","description":"Description of current action"}}},"JourneyMetadata":{"type":"object","properties":{"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"targetUrl":{"type":"string","format":"uri"},"consentAction":{"type":"string"},"totalPages":{"type":"integer"},"totalSteps":{"type":"integer"},"completedSteps":{"type":"integer"},"failedSteps":{"type":"integer"},"skippedSteps":{"type":"integer"}}},"PageState":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"cookies":{"type":"array","items":{"$ref":"#/components/schemas/CapturedCookie"}},"trackingPixels":{"type":"array","items":{"$ref":"#/components/schemas/TrackingPixel"}},"dataLayer":{"type":"object"},"screenshot":{"type":"string","format":"byte","description":"Base64-encoded screenshot"},"timestamp":{"type":"string","format":"date-time"}}},"CapturedCookie":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"domain":{"type":"string"},"path":{"type":"string"},"expires":{"type":"number"},"httpOnly":{"type":"boolean"},"secure":{"type":"boolean"},"sameSite":{"type":"string","enum":["Strict","Lax","None"]},"size":{"type":"integer"}}},"TrackingPixel":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"domain":{"type":"string"},"type":{"type":"string"},"method":{"type":"string"},"vendor":{"type":"string"},"gdprCategory":{"type":"string"},"timestamp":{"type":"number"}}},"Violation":{"type":"object","properties":{"type":{"type":"string","enum":["non-compliant-cookie","non-compliant-tracking","consent-bypass"]},"severity":{"type":"string","enum":["CRITICAL","HIGH","MEDIUM","LOW"]},"page":{"type":"string"},"domain":{"type":"string"},"details":{"type":"string"},"category":{"type":"string"},"gdprReferences":{"type":"array","items":{"$ref":"#/components/schemas/GDPRReference"}},"evidence":{"type":"object"}}},"GDPRReference":{"type":"object","properties":{"article":{"type":"string"},"title":{"type":"string"},"relevance":{"type":"string"}}},"AIInsights":{"type":"object","properties":{"overallAssessment":{"type":"string"},"criticalIssues":{"type":"array","items":{"type":"string"}},"recommendations":{"type":"array","items":{"type":"string"}},"gdprImplications":{"type":"string"},"riskLevel":{"type":"string","enum":["LOW","MEDIUM","HIGH","CRITICAL"]}}},"DataLayerValidationResult":{"type":"object","properties":{"enabled":{"type":"boolean"},"passed":{"type":"boolean"},"summary":{"type":"object","properties":{"totalPages":{"type":"integer"},"passedPages":{"type":"integer"},"failedPages":{"type":"integer"},"totalRules":{"type":"integer"},"passedRules":{"type":"integer"},"failedRules":{"type":"integer"},"errorCount":{"type":"integer"},"warningCount":{"type":"integer"}}},"results":{"type":"array","items":{"$ref":"#/components/schemas/PageValidationResult"}},"eventResults":{"type":"array","items":{"$ref":"#/components/schemas/EventValidationResult"}},"rulesLoaded":{"type":"array","items":{"type":"string"}},"validationMode":{"type":"string","enum":["schema","llm","hybrid"]}}},"PageValidationResult":{"type":"object","properties":{"page":{"type":"string"},"url":{"type":"string","format":"uri"},"passed":{"type":"boolean"},"errorCount":{"type":"integer"},"warningCount":{"type":"integer"},"infoCount":{"type":"integer"},"fieldResults":{"type":"array","items":{"$ref":"#/components/schemas/FieldValidationResult"}},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}}},"EventValidationResult":{"type":"object","properties":{"eventName":{"type":"string"},"passed":{"type":"boolean"},"fieldResults":{"type":"array","items":{"$ref":"#/components/schemas/FieldValidationResult"}}}},"FieldValidationResult":{"type":"object","properties":{"ruleId":{"type":"string","description":"Rule identifier"},"field":{"type":"string","description":"Data layer field path"},"passed":{"type":"boolean"},"severity":{"type":"string","enum":["error","warning","info"]},"message":{"type":"string"},"expected":{"description":"Expected value"},"actual":{"description":"Actual value found"},"description":{"type":"string","description":"Rule description"},"dataLayerSource":{"type":"string","enum":["standard","gtm","adobe","tealium","custom"],"description":"Which data layer source the rule targets. Derived from the rule set's dataLayerType or inferred from the rule set name."}}},"JourneySummary":{"type":"object","properties":{"totalCookies":{"type":"integer"},"totalTrackingPixels":{"type":"integer"},"uniqueTrackingDomains":{"type":"array","items":{"type":"string"}},"totalViolations":{"type":"integer"},"violationsByType":{"type":"object","additionalProperties":{"type":"integer"}},"nonCompliantDomains":{"type":"array","items":{"type":"string"}}}},"ExecutionMetrics":{"type":"object","properties":{"totalDurationMs":{"type":"integer"},"stepResults":{"type":"array"},"events":{"type":"array"}}},"TrackingConfig":{"type":"object","properties":{"version":{"type":"string"},"lastUpdated":{"type":"string","format":"date-time"},"description":{"type":"string"},"categories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TrackingCategory"}},"patterns":{"type":"array","items":{"$ref":"#/components/schemas/TrackingPattern"}}}},"TrackingConfigUpdate":{"type":"object","properties":{"version":{"type":"string"},"description":{"type":"string"},"categories":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/TrackingCategory"}},"patterns":{"type":"array","items":{"$ref":"#/components/schemas/TrackingPattern"}}}},"TrackingCategory":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"gdprCategory":{"type":"string","enum":["essential","functional","analytics","advertising"]}}},"TrackingPattern":{"type":"object","properties":{"id":{"type":"string"},"vendor":{"type":"string"},"category":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"urlPatterns":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"enabled":{"type":"boolean"}}},"HealthStatus":{"type":"object","properties":{"status":{"type":"string","enum":["healthy","unhealthy"]},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string"},"uptime":{"type":"number","description":"Uptime in seconds"},"checks":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"correlationId":{"type":"string","format":"uuid","description":"Correlation ID for tracking the request"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"}},"correlationId":{"type":"string","format":"uuid"}}},"PreflightValidationError":{"type":"object","description":"Returned when pre-flight journey validation fails","properties":{"error":{"type":"string","example":"Pre-flight validation failed"},"validation":{"type":"object","properties":{"valid":{"type":"boolean","example":false},"errorCount":{"type":"integer","example":1},"warningCount":{"type":"integer","example":0},"issues":{"type":"array","items":{"$ref":"#/components/schemas/ValidationIssue"}},"complexity":{"$ref":"#/components/schemas/ComplexityAssessment"},"urlsValidated":{"type":"array","items":{"$ref":"#/components/schemas/UrlValidationResult"}}}}}},"ValidationIssue":{"type":"object","properties":{"severity":{"type":"string","enum":["error","warning","info"],"description":"Severity level - errors block execution, warnings are advisory"},"code":{"type":"string","description":"Error/warning code for programmatic handling","example":"URL_UNREACHABLE"},"message":{"type":"string","description":"Human-readable message","example":"URL is not reachable: https://example.com"},"stepIndex":{"type":"integer","description":"Step index where issue was found (-1 for journey-level issues)"},"suggestion":{"type":"string","description":"Suggested fix or improvement"},"details":{"type":"object","description":"Additional context","additionalProperties":true}}},"ComplexityAssessment":{"type":"object","properties":{"level":{"type":"string","enum":["simple","moderate","complex","very_complex"]},"stepCount":{"type":"integer"},"conditionalCount":{"type":"integer"},"navigationCount":{"type":"integer"},"estimatedDurationSec":{"type":"integer"},"mayExceedTimeout":{"type":"boolean"}}},"UrlValidationResult":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"valid":{"type":"boolean"},"statusCode":{"type":"integer"},"finalUrl":{"type":"string","format":"uri"},"error":{"type":"string"},"stepIndex":{"type":"integer"}}},"ReEvaluateRequest":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"string","enum":["gdpr","dataLayer"]},"description":"Which evaluations to run. Defaults to all available evaluators.","example":["gdpr","dataLayer"]},"consentAction":{"type":"string","description":"Override consent action from the original journey. Falls back to the original journey's stored consent action, then \"none\".","example":"reject"}}},"ReEvaluateResult":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"evaluatedAt":{"type":"string","format":"date-time"},"consentAction":{"type":"string"},"gdpr":{"type":"object","description":"GDPR evaluation results (present when gdpr check is requested and evaluator is available)","properties":{"violations":{"type":"array","items":{"$ref":"#/components/schemas/Violation"}},"aiInsights":{"$ref":"#/components/schemas/AIInsights"},"summary":{"type":"object"}}},"dataLayerValidation":{"$ref":"#/components/schemas/DataLayerValidationResult"},"pageCount":{"type":"integer","description":"Number of pages evaluated"}}},"JourneyEnrichRequest":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Target domain to research and generate a journey for","example":"sony.com.mx"},"journey":{"type":"string","description":"Optional rough/partial journey text to use as intent guidance","maxLength":5000,"example":"check sony brazil for cookie issues, look at some cameras"},"config":{"$ref":"#/components/schemas/JourneyEnrichConfig"}}},"JourneyEnrichConfig":{"type":"object","description":"Optional structured config overrides for journey enrichment","properties":{"locale":{"type":"string","description":"Locale code (e.g. es-MX, pt-BR)","example":"es-MX"},"categories":{"type":"array","items":{"type":"string"},"description":"Product categories to include in the journey","example":["televisores","auriculares"]},"include_subdomains":{"type":"array","items":{"type":"string"},"description":"Subdomains to explicitly include","example":["store.sony.com.mx"]},"exclude_subdomains":{"type":"array","items":{"type":"string"},"description":"Subdomains to exclude from the journey"},"skip_checkout":{"type":"boolean","default":false,"description":"Skip e-commerce checkout steps"},"skip_media":{"type":"boolean","default":false,"description":"Skip embedded media interaction steps"}}},"JourneyEnrichResult":{"type":"object","properties":{"enriched_journey":{"type":"string","description":"The fully enriched, agent-ready journey text"},"domain_profile":{"$ref":"#/components/schemas/DomainProfile"},"metadata":{"$ref":"#/components/schemas/JourneyEnrichMetadata"}}},"DomainProfile":{"type":"object","description":"Structured findings from the LLM domain research step","properties":{"primary_domain":{"type":"string","example":"www.sony.com.mx"},"subdomains":{"type":"array","items":{"type":"string"},"example":["store.sony.com.mx"]},"locale":{"type":"string","example":"es-MX"},"language":{"type":"string","example":"Spanish"},"cookie_consent_type":{"type":"string","nullable":true,"description":"Detected CMP vendor (OneTrust, Cookiebot, etc.) or null","example":"OneTrust"},"ecommerce_platform":{"type":"string","nullable":true,"description":"Detected e-commerce platform or null","example":"VTEX"},"categories_discovered":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"Televisiones"},"url_path":{"type":"string","example":"/bravia"}}}},"has_embedded_video":{"type":"boolean"}}},"JourneyEnrichMetadata":{"type":"object","properties":{"pages_estimated":{"type":"integer","description":"Approximate number of pages the journey will visit","example":9},"templates_covered":{"type":"array","items":{"type":"string"},"description":"Page template types covered by the journey","example":["home","category_listing","pdp","store_home","cart","checkout"]},"enrichment_source":{"type":"string","enum":["domain_only","journey_provided","config_provided","journey_and_config"],"description":"What input was used for enrichment"},"suggested_max_steps":{"type":"integer","description":"Recommended maxSteps value for the Stagehand agent","example":40}}},"JourneyEnrichError":{"type":"object","properties":{"error":{"type":"string","description":"Error code","example":"DOMAIN_UNREACHABLE"},"error_detail":{"type":"string","description":"Detailed error explanation","example":"Could not fetch www.sony.com.mx or any known subdomains. DNS resolution failed."}}},"RateLimitError":{"type":"object","properties":{"error":{"type":"string","example":"Too many requests"},"retryAfter":{"type":"integer","description":"Seconds until rate limit resets"}}}}}}