{"openapi":"3.0.1","info":{"title":"AI Features","version":"1-apps","description":"Unified API surface for AI features across Analyst, Enrich, and Linguist.\n <b><h1>Deprecated endpoints:</h1></b><table border=\"1px;\"><tr><th style=\"text-align: center; vertical-align: middle;\"><b><h3>Uri</b></h3></th><th><b>Method</b></th><th><b><h3>Since</h3></b></th><th><b><h3>End of life</h3></b></th></tr></table>"},"servers":[{"url":"api.test.bluestonepim.com/ai-text"}],"paths":{"/ai-analyst/config":{"get":{"tags":["AI Analyst Config"],"summary":"Get AI Analyst configuration","operationId":"getConfigAnalyst","responses":{"200":{"description":"Successful configuration retrieval","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiAnalystConfig"},"examples":{"default":{"summary":"Example AI Analyst configuration","value":{"orgId":"f458d846-0dde-4813-b309-3aa0afe7cf80","models":[{"name":"OpenAI - GPT 4o","model":"gpt-4o-2024-11-20","provider":"openai","functionCalling":false,"functionCallingParallel":false,"imageAsInput":false,"jsonMode":false,"maxInputTokens":128000,"maxOutputTokens":4096,"defaultParameters":{"temperature":0.5},"modelInfo":{"pros":["High-intelligence model for complex, multi-step tasks"],"cons":["May hallucinate occasionally"]}}],"trainProductLimit":20,"trainAttributeLimit":20,"modelParameterOverrides":{},"globalParameterOverrides":{"temperature":0.5}}}}}}},"404":{"description":"Config not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-analyst/job":{"post":{"tags":["AI Analyst Jobs"],"summary":"Create a new AI Analyst job","operationId":"createAnalystJob","parameters":[{"name":"context","in":"header","required":true,"description":"The context (locale/channel) used to resolve products and generate analysis. Required by the backend — job creation will fail without it.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value. Accepts 'true' or 'false'. Defaults to true.\n","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"description":"Request payload for creating an analyst job.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"The model identifier to use for analysis (e.g. 'claude-3-5-sonnet-20241022').","example":"claude-3-5-sonnet-20241022"},"provider":{"type":"string","description":"The AI provider (e.g. 'bedrock', 'openai').","example":"bedrock"},"trainProducts":{"type":"object","description":"Products used as training/example input. Exactly one of 'productIds', 'filter', or 'query' must be provided.\n","properties":{"productIds":{"type":"array","description":"Explicit list of product IDs to use as training samples.","items":{"type":"string"},"example":["prod-001","prod-002"]},"filter":{"type":"object","description":"A search filter object to dynamically resolve training products."},"query":{"type":"object","description":"A query builder object to dynamically resolve training products."}}},"analysedProducts":{"type":"object","description":"Products to be analysed. Exactly one of 'productIds', 'filter', or 'query' must be provided.\n","properties":{"productIds":{"type":"array","description":"Explicit list of product IDs to analyse.","items":{"type":"string"},"example":["prod-100","prod-200"]},"filter":{"type":"object","description":"A search filter object to dynamically resolve products to analyse."},"query":{"type":"object","description":"A query builder object to dynamically resolve products to analyse."}}},"trainAttributes":{"type":"array","description":"List of attribute keys the model should learn from the training products.","items":{"type":"string"},"example":["name","description","shortDescription"]},"columnSetupName":{"type":"string","description":"Name of the column setup to use. Defaults to 'Custom'.","default":"Custom","example":"Custom"}},"required":["model","provider","trainProducts","trainAttributes","analysedProducts"]}}}},"responses":{"201":{"description":"Job created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"oauth2":[]}]}},"/ai-analyst/job/list":{"post":{"tags":["AI Analyst Jobs"],"summary":"List AI Analyst jobs with pagination and optional sorting","operationId":"listJobsAnalyst","requestBody":{"description":"Request payload with pagination options and optional sorting parameters.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer","minimum":0,"default":0,"example":0,"description":"Zero-based page index. Must be >= 0."},"pageSize":{"type":"integer","minimum":1,"default":10,"example":10,"description":"Number of jobs per page. Must be > 0."},"sortField":{"type":"string","default":"createdAt","example":"createdAt","description":"Field name used to sort the jobs. Defaults to 'createdAt'. If the field does not exist in the job object, the backend falls back to 'createdAt'. Valid fields include: jobId, status, createdAt, startedAt, endedAt, productCount, processedCount, columnSetupName.\n"},"sortOrder":{"type":"string","default":"asc","enum":["asc","desc"],"description":"Sort direction. 'asc' for ascending, 'desc' for descending. Defaults to 'asc'."}},"required":["page","pageSize"]}}}},"responses":{"200":{"description":"Successful retrieval of jobs","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","description":"Paginated list of AI Analyst job objects.","items":{"type":"object","properties":{"jobId":{"type":"string"},"orgId":{"type":"string"},"context":{"type":"string"},"userId":{"type":"string"},"userName":{"type":"string"},"status":{"type":"string","description":"Job status (e.g. PENDING, IN_PROGRESS, COMPLETED, FAILED)."},"model":{"type":"object","description":"AI model details used for the job."},"temperature":{"type":"string","description":"Deprecated legacy temperature value."},"aiParameters":{"type":"object","description":"Dynamic AI parameters applied to the job."},"createdAt":{"type":"string","format":"date-time"},"startedAt":{"type":"string","format":"date-time"},"endedAt":{"type":"string","format":"date-time"},"contextFallback":{"type":"boolean"},"productCount":{"type":"integer","description":"Total number of products to be analysed."},"processedCount":{"type":"integer","description":"Number of products processed so far."},"trainProducts":{"type":"array","items":{"type":"string"}},"trainAttributes":{"type":"array","items":{"type":"string"}},"columnSetupName":{"type":"string"},"execName":{"type":"string"},"error":{"type":"string","description":"Error message if the job failed."}}}},"page":{"type":"integer","example":0},"pageSize":{"type":"integer","example":10},"total":{"type":"integer","example":100,"description":"Total count of jobs before pagination."}}}}}},"400":{"description":"Bad Request — invalid page, pageSize, sortField, or sortOrder value."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-analyst/job/{jobId}/report":{"post":{"tags":["AI Analyst Report"],"summary":"Retrieve report (product list) for a given analyst job","operationId":"getJobReportAnalyst","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Request payload with filters and pagination options.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"page":{"type":"integer","minimum":0,"default":0,"example":0,"description":"Zero-based page index. Must be >= 0."},"pageSize":{"type":"integer","minimum":1,"default":10,"example":10,"description":"Number of products per page. Must be > 0."},"productName":{"type":"string","description":"Filter products by name (case-insensitive substring match). Must be at least 3 characters — shorter values are silently ignored by the backend.\n","example":"phone case"},"productNumber":{"type":"string","description":"Filter products by product number (case-insensitive substring match). Must be at least 3 characters — shorter values are silently ignored by the backend.\n","example":"63450"},"scoreMin":{"type":"number","minimum":0,"maximum":10,"description":"Minimum confidence score filter. Must be between 0 and 10. Cannot be greater than scoreMax.\n","example":3},"scoreMax":{"type":"number","minimum":0,"maximum":10,"description":"Maximum confidence score filter. Must be between 0 and 10. Cannot be less than scoreMin.\n","example":9}}}}}},"responses":{"200":{"description":"Successful retrieval of the report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportResponse"}}}},"400":{"description":"Bad Request — invalid page, pageSize, scoreMin, scoreMax values, or scoreMin is greater than scoreMax.\n"},"404":{"description":"Not Found — job does not exist, or no products found for the given job and applied filters.\n"},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-analyst/job/{jobId}/report-product/{productId}":{"get":{"tags":["AI Analyst Report"],"summary":"Retrieve report for a specific product within a job","operationId":"getJobReportProductAnalyst","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}},{"name":"productId","in":"path","required":true,"schema":{"type":"string"}},{"name":"scoreMin","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":10},"description":"Minimum confidence score filter. Must be between 0 and 10. Cannot be greater than scoreMax — backend returns 400 if violated.\n"},{"name":"scoreMax","in":"query","required":false,"schema":{"type":"number","minimum":0,"maximum":10},"description":"Maximum confidence score filter. Must be between 0 and 10. Cannot be less than scoreMin — backend returns 400 if violated.\n"}],"responses":{"200":{"description":"Successful retrieval of the product report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportProductDetail"},"example":{"productId":"674fd972473b924dc93ecc6a","productName":"iDeal Clear Case MS IP15 Petite Floral","productNumber":"63450","productStatus":"active","totalSuggestions":5,"appliedFixed":3,"totalFailed":0,"totalCompleted":3,"report":[{"note":"The attribute 'Height' makes sense for this type of product and is used in the training data, but no value is available in the input product.","suggested_values_confidence_reasoning":"The attribute 'Height' is used for similar products in the training data but is missing in the input product. However, no specific value is provided in the input product.","suggested_values_confidence_score":4,"attribute_dataType":"integer","attribute_number":"637d92374cedfd00018a8039","attribute_name":"Height","suggested_values_sources":["Training data, Attribute: 'Height'"],"suggested_value":"","status":"review","suggested_ui":"","id":"missing_attribute_definitions#637d92374cedfd00018a8039","report_type":"missing_attribute_definitions"},{"note":"The attribute 'Depth' makes sense for this type of product and is used in the training data, but no value is available in the input product.","suggested_values_confidence_reasoning":"The attribute 'Depth' is used for similar products in the training data but is missing in the input product. However, no specific value is provided in the input product.","suggested_values_confidence_score":4,"attribute_dataType":"integer","attribute_number":"637d923759080100013e6494","attribute_name":"Depth","suggested_values_sources":["Training data, Attribute: 'Depth'"],"suggested_value":"","status":"applied","suggested_ui":"","id":"missing_attribute_definitions#637d923759080100013e6494","report_type":"missing_attribute_definitions"},{"category_name":"iDeal","categories_path":["iDeal","Deksel","Mobiltilbehør","Main Structure"],"issue":"The category 'iDeal' is out of place for a product like a phone case. This category is not used for similar products in the training data.","sources":["Input product, Attribute: 'Name'","Training data, Categories"],"confidence_score":8,"name_original":"iDeal","confidence_reasoning":"The category 'iDeal' is not assigned to any similar products in the training data, and it does not align with the product type, which is a phone case.","category_number":"Supplier_5d1b0872cff47e000c1e7f48","status":"applied","suggested_ui_remove":"iDeal","id":"categories_out_of_place#Supplier_5d1b0872cff47e000c1e7f48","report_type":"categories_out_of_place"}]}}}},"400":{"description":"Bad Request — invalid scoreMin or scoreMax value, or scoreMin is greater than scoreMax.\n"},"404":{"description":"Not Found — no report rows found for the given job and product."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-analyst/job/{jobId}/applyFix":{"post":{"tags":["AI Analyst Report Fix"],"summary":"Create an apply fix job for an analyst job","operationId":"applyFixAnalyst","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Request payload for applying fixes.","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"applyMode":{"type":"string","enum":["all","partial"],"description":"Mode of applying fixes. Must be exactly 'all' or 'partial'. Any other value will be rejected with 400. - 'all': applies fixes to all products matching the optional filters. - 'partial': applies fixes only to the products listed in the 'data' field,\n  which becomes required when this mode is selected.\n"},"scoreMin":{"type":"number","minimum":0,"maximum":10,"description":"Minimum confidence score filter (0–10). Only used when applyMode is 'all'. Cannot be greater than scoreMax — backend returns 400 if violated.\n","example":3},"scoreMax":{"type":"number","minimum":0,"maximum":10,"description":"Maximum confidence score filter (0–10). Only used when applyMode is 'all'. Cannot be less than scoreMin — backend returns 400 if violated.\n","example":9},"productName":{"type":"string","description":"Filter by product name (case-insensitive substring match). Only used when applyMode is 'all'. Must be at least 3 characters — shorter values are silently ignored by the backend.\n","example":"phone case"},"productNumber":{"type":"string","description":"Filter by product number (case-insensitive substring match). Only used when applyMode is 'all'. Must be at least 3 characters — shorter values are silently ignored by the backend.\n","example":"63450"},"data":{"type":"array","description":"Required when applyMode is 'partial'. Ignored when applyMode is 'all'. Each item targets a specific product and defines how to apply fixes to it.\n","items":{"type":"object","properties":{"productId":{"type":"string","description":"ID of the product to apply fixes to."},"productApply":{"type":"string","enum":["all","partial"],"description":"Apply mode for this product. 'all' applies all suggestions; 'partial' applies only those listed in applySelection.\n"},"applySelection":{"type":"array","description":"Required when productApply is 'partial'. List of report item IDs to apply, in the format '{report_type}#{attribute_or_category_number}'.\n","items":{"type":"string"},"example":["attribute_definitions_out_of_place#COMPATIBILITY","missing_categories#Supplier_5d1b0872cff47e000c1e7f48"]}},"required":["productId","productApply"]}}},"required":["applyMode"]},"examples":{"applyAll":{"summary":"Apply fixes to all products","value":{"applyMode":"all"}},"applyAllWithFilters":{"summary":"Apply fixes to all products with filters","value":{"applyMode":"all","scoreMin":3,"scoreMax":9,"productName":"phone case"}},"applyPartial":{"summary":"Apply fixes to specific products","value":{"applyMode":"partial","data":[{"productId":"875d94e15908010001f1316a","productApply":"all"},{"productId":"875d94e15908010001f1316b","productApply":"partial","applySelection":["attribute_definitions_out_of_place#COMPATIBILITY","missing_categories#Supplier_5d1b0872cff47e000c1e7f48"]}]}}}}}},"responses":{"201":{"description":"Apply fix job created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string"}}}}}},"400":{"description":"Bad Request — applyMode is missing or not 'all'/'partial'; scoreMin or scoreMax is out of range (0–10) or scoreMin > scoreMax; data is missing when applyMode is 'partial'.\n"},"404":{"description":"Analyst job not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-analyst/job/{jobId}/applyFix/{jobIdApplyFix}/report":{"get":{"tags":["AI Analyst Report Fix"],"summary":"Get the report for an apply fix job","operationId":"getApplyFixReport","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobIdApplyFix","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful retrieval of the apply fix report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyFixReport"}}}},"400":{"description":"Bad Request."},"404":{"description":"Apply fix job not found for the given jobId and jobIdApplyFix."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-enrich/config":{"get":{"tags":["AI Enrich Config"],"summary":"Get AI Enrich configuration for the organization","operationId":"ai_enrich_get_config","responses":{"200":{"description":"Configuration object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigEnrichResponse"},"examples":{"default":{"summary":"Example config response","value":{"orgId":"f458d846-0dde-4813-b309-3aa0afe7cf80","itemId":"config_ai_enrich","itemType":"config","models":[{"name":"OpenAI - GPT 4o","model":"gpt-4o-2024-11-20","provider":"openai","functionCalling":false,"functionCallingParallel":false,"imageAsInput":false,"jsonMode":false,"maxInputTokens":128000,"maxOutputTokens":4096,"defaultParameters":{"temperature":0.7},"modelInfo":{"pros":["High-intelligence model for complex tasks"],"cons":["May hallucinate occasionally"]}}],"outputLimit":50,"inputLimit":50,"productIdsLimit":10000,"attributeValueLimit":5000,"bqbLimit":10000,"coreSearchLimit":10000,"modelParameterOverrides":{},"globalParameterOverrides":{"temperature":0.7}}}}}}},"404":{"description":"Config not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-enrich/preview":{"post":{"tags":["AI Enrich Preview"],"summary":"Create an AI Enrich preview for a single product","operationId":"ai_enrich_create_preview","parameters":[{"name":"context","in":"header","required":false,"description":"Locale/channel context used to fetch the product from PIM. Recommended — product fetch behaviour depends on this value.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value. Must be the string 'true' or 'false'. Defaults to true.\n","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"description":"Preview request payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichPreviewRequest"},"example":{"productId":"69a9602ccec1a5a482b125fe","model":"gpt-4o-2024-11-20","provider":"openai","instructions":[{"name":"description","input":"Generate a product description. Include up to 3 sentences. Add up to 5 key features as bullet points. Output in plain text."},{"id":"6808c2b1bc520905940088f5","input":"Extend a product description with a creative approach and add some emojis"}],"inputAttributes":[{"name":"name"},{"name":"number"},{"name":"description"}],"outputAttributes":[{"name":"description"},{"id":"6808c2b1bc520905940088f5"}],"usingImage":"true","assetLabelId":"9adfa788-c367-4675-b746-9eb29482abc6"}}}},"responses":{"200":{"description":"Preview job created and processing started. Poll GET /ai-enrich/preview/{jobId} for the result.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichPreviewResponse"}}}},"400":{"description":"Bad Request — model or provider missing/invalid; instructions and outputAttributes arrays have different lengths; instructions, inputAttributes, or outputAttributes exceed the configured limits; usingImage is true but the model does not support image input; product not found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-enrich/preview/{jobId}":{"get":{"tags":["AI Enrich Preview"],"summary":"Get AI Enrich preview result/status","operationId":"ai_enrich_get_preview","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Preview result or current status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichPreviewResponse"}}}},"400":{"description":"Bad Request."},"404":{"description":"Preview job not found for the given jobId."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-enrich":{"post":{"tags":["AI Enrich Jobs"],"summary":"Submit an AI Enrich job (batch or filtered)","operationId":"ai_enrich_create_job","parameters":[{"name":"context","in":"header","required":true,"description":"The context (locale/channel) used to resolve products and generate enriched content. Required by the backend — job creation will fail without it.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value. Accepts 'true' or 'false'. Defaults to true.\n","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"description":"Create job request payload","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichCreateJobRequest"},"examples":{"productIdsExample":{"summary":"Submit a job for explicit product IDs","value":{"model":"gpt-4o-2024-11-20","provider":"openai","inputAttributes":[{"name":"name"},{"name":"number"},{"name":"description"}],"outputAttributes":[{"name":"description"},{"id":"6808c2b1bc520905940088f5"}],"instructions":[{"name":"description","input":"Generate a product description. Include up to 3 sentences. Add up to 5 key features as bullet points. Output in plain text."},{"id":"6808c2b1bc520905940088f5","input":"Extend a product description with a creative approach and add some emojis"}],"productIds":["69a9602ccec1a5a482b125fe"]}},"filterExample":{"summary":"Submit a job using a Core Search filter","value":{"model":"gpt-4o-2024-11-20","provider":"openai","inputAttributes":[{"name":"name"},{"name":"description"}],"outputAttributes":[{"name":"description"}],"instructions":[{"name":"description","input":"Improve descriptions for Home & Garden products"}],"filter":{"category":"Home & Garden","hasImage":true}}},"queryExample":{"summary":"Submit a job using a Query Builder query","value":{"model":"gpt-4o-2024-11-20","provider":"openai","inputAttributes":[{"name":"name"},{"name":"description"}],"outputAttributes":[{"name":"description"}],"instructions":[{"name":"description","input":"Enrich product descriptions with more detail"}],"query":{"matchRule":"all","children":[{"termType":"name","filterType":"contains","value":"fame","context":"en"}],"contextFallback":true}}}}}}},"responses":{"202":{"description":"Job accepted and queued for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichCreateJobResponse"},"example":{"jobId":"a3f1c2d4e5b6789012345678"}}}},"400":{"description":"Bad request. Possible reasons: missing required fields, product count exceeds limit, input/output attribute count mismatch with instructions, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/translate/preview":{"post":{"tags":["AI Linguist Translate"],"summary":"Create a translate preview for a single product","operationId":"linguist_translate_create_preview","description":"Generates a preview of AI translation output for a single product. The preview is processed asynchronously — poll `GET /ai-linguist/translate/preview/{jobId}` for the result.\n","parameters":[{"name":"context","in":"header","required":true,"description":"Source locale/channel context to read product attribute values from.","schema":{"type":"string","example":"en_US"}},{"name":"output-context","in":"header","required":true,"description":"Target locale/channel context to translate into. Must be different from the source `context` — the server enforces this.\n","schema":{"type":"string","example":"fr_FR"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value.","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewRequest"},"example":{"productId":"69a9602ccec1a5a482b125fe","model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Translate the attribute values to French"}}}},"responses":{"200":{"description":"Preview job created and initial state returned. Poll GET /{jobId} for the AI result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewResponse"},"example":{"jobId":"a3f1c2d4e5b6789012345678","status":"PENDING","startedAt":"2026-03-11T08:00:00Z","previewPrompt":"Translate the attribute values to French\n\n[name]:\nSome product name\n\n"}}}},"400":{"description":"Bad request. Possible reasons: context equals output-context, columns exceed limit, product not found, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/translate/preview/{jobId}":{"get":{"tags":["AI Linguist Translate"],"summary":"Get a translate preview result by job ID","operationId":"linguist_translate_get_preview","description":"Retrieves the current state and AI-generated result of a translate preview job. Poll this endpoint until `status` is `COMPLETED` or `FAILED`.\n","parameters":[{"name":"jobId","in":"path","required":true,"description":"The preview job ID returned by `POST /ai-linguist/translate/preview`.","schema":{"type":"string","example":"a3f1c2d4e5b6789012345678"}}],"responses":{"200":{"description":"Preview job state and AI result (if completed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewResponse"},"examples":{"pending":{"summary":"Job still processing","value":{"jobId":"a3f1c2d4e5b6789012345678","status":"PENDING","startedAt":"2026-03-11T08:00:00Z"}},"completed":{"summary":"Job completed with AI result","value":{"jobId":"a3f1c2d4e5b6789012345678","status":"COMPLETED","startedAt":"2026-03-11T08:00:00Z","endedAt":"2026-03-11T08:00:05Z","result":"[name]\nNom du produit traduit\n\n[description]\nDescription traduite du produit"}}}}}},"400":{"description":"Bad request — missing or invalid jobId."},"404":{"description":"Preview job not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/improve-text/preview":{"post":{"tags":["AI Linguist Improve Text"],"summary":"Create an improve-text preview for a single product","operationId":"linguist_improve_create_preview","description":"Generates a preview of AI improve-text output for a single product. The preview is processed asynchronously — poll `GET /ai-linguist/improve-text/preview/{jobId}` for the result.\n","parameters":[{"name":"context","in":"header","required":true,"description":"Source locale/channel context to read product attribute values from.","schema":{"type":"string","example":"en_US"}},{"name":"output-context","in":"header","required":false,"description":"Target locale/channel context to write improved values into. Optional for improve-text — when omitted the source context is used as the output context.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value.","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewRequest"},"example":{"productId":"69a9602ccec1a5a482b125fe","model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Improve the product title and description for clarity and SEO"}}}},"responses":{"200":{"description":"Preview job created and initial state returned. Poll GET /{jobId} for the AI result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewResponse"},"example":{"jobId":"b4e2d3c5f6a7890123456789","status":"PENDING","startedAt":"2026-03-11T08:00:00Z","previewPrompt":"Improve the product title and description for clarity and SEO\n\n[name]:\nSome product name\n\n"}}}},"400":{"description":"Bad request. Possible reasons: columns exceed limit, product not found, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/improve-text/preview/{jobId}":{"get":{"tags":["AI Linguist Improve Text"],"summary":"Get an improve-text preview result by job ID","operationId":"linguist_improve_get_preview","description":"Retrieves the current state and AI-generated result of an improve-text preview job. Poll this endpoint until `status` is `COMPLETED` or `FAILED`.\n","parameters":[{"name":"jobId","in":"path","required":true,"description":"The preview job ID returned by `POST /ai-linguist/improve-text/preview`.","schema":{"type":"string","example":"b4e2d3c5f6a7890123456789"}}],"responses":{"200":{"description":"Preview job state and AI result (if completed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewResponse"},"examples":{"pending":{"summary":"Job still processing","value":{"jobId":"b4e2d3c5f6a7890123456789","status":"PENDING","startedAt":"2026-03-11T08:00:00Z"}},"completed":{"summary":"Job completed with AI result","value":{"jobId":"b4e2d3c5f6a7890123456789","status":"COMPLETED","startedAt":"2026-03-11T08:00:00Z","endedAt":"2026-03-11T08:00:05Z","result":"[name]\nImproved product name with better clarity\n\n[description]\nImproved product description optimised for SEO"}}}}}},"400":{"description":"Bad request — missing or invalid jobId."},"404":{"description":"Preview job not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/improve-text":{"post":{"tags":["AI Linguist Improve Text"],"summary":"Submit an improve-text job","operationId":"linguist_improve_create_job","parameters":[{"name":"context","in":"header","required":true,"description":"Source locale/channel context to read product attribute values from.","schema":{"type":"string","example":"en_US"}},{"name":"output-context","in":"header","required":false,"description":"Target locale/channel context to write improved values into. Optional — when omitted the source context is used as the output context.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value.","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistCreateJobRequest"},"examples":{"productIdsExample":{"summary":"Submit a job for a set of product IDs","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Improve titles and descriptions for clarity and SEO","productIds":["69a9602ccec1a5a482b125fe"]}},"filterExample":{"summary":"Submit a job using a Core Search filter","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"description"}],"instructionText":"Improve descriptions for Home & Garden products","filter":{"category":"Home & Garden","hasImage":true}}},"queryExample":{"summary":"Submit a job using a Query Builder query","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"}],"instructionText":"Improve all product content for clarity","query":{"matchRule":"all","children":[{"termType":"name","filterType":"contains","value":"fame","context":"en"}],"contextFallback":true}}}}}}},"responses":{"202":{"description":"Job accepted and queued for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistCreateJobResponse"},"example":{"jobId":"b4e2d3c5f6a7890123456789"}}}},"400":{"description":"Bad request. Possible reasons: columns exceed limit, product count exceeds limit, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/spell-checker/preview":{"post":{"tags":["AI Linguist Spell Checker"],"summary":"Create a spell-check preview for a single product","operationId":"linguist_spell_create_preview","description":"Generates a preview of AI spell-check output for a single product. The preview is processed asynchronously — poll `GET /ai-linguist/spell-checker/preview/{jobId}` for the result.\n","parameters":[{"name":"context","in":"header","required":true,"description":"Source locale/channel context to read product attribute values from.","schema":{"type":"string","example":"en_US"}},{"name":"output-context","in":"header","required":false,"description":"Target locale/channel context to write corrected values into. Optional — when omitted the source context is used as the output context.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value.","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewRequest"},"example":{"productId":"69a9602ccec1a5a482b125fe","model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Correct spelling and grammar errors in the attribute values"}}}},"responses":{"200":{"description":"Preview job created and initial state returned. Poll GET /{jobId} for the AI result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewResponse"},"example":{"jobId":"c5f3e4d6a7b8901234567890","status":"PENDING","startedAt":"2026-03-11T08:00:00Z","previewPrompt":"Correct spelling and grammar errors in the attribute values\n\n[name]:\nSome prodct name with typo\n\n"}}}},"400":{"description":"Bad request. Possible reasons: columns exceed limit, product not found, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/spell-checker/preview/{jobId}":{"get":{"tags":["AI Linguist Spell Checker"],"summary":"Get a spell-check preview result by job ID","operationId":"linguist_spell_get_preview","description":"Retrieves the current state and AI-generated result of a spell-check preview job. Poll this endpoint until `status` is `COMPLETED` or `FAILED`.\n","parameters":[{"name":"jobId","in":"path","required":true,"description":"The preview job ID returned by `POST /ai-linguist/spell-checker/preview`.","schema":{"type":"string","example":"c5f3e4d6a7b8901234567890"}}],"responses":{"200":{"description":"Preview job state and AI result (if completed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistPreviewResponse"},"examples":{"pending":{"summary":"Job still processing","value":{"jobId":"c5f3e4d6a7b8901234567890","status":"PENDING","startedAt":"2026-03-11T08:00:00Z"}},"completed":{"summary":"Job completed with AI result","value":{"jobId":"c5f3e4d6a7b8901234567890","status":"COMPLETED","startedAt":"2026-03-11T08:00:00Z","endedAt":"2026-03-11T08:00:05Z","result":"[name]\nCorrected product name without typos\n\n[description]\nCorrected product description with proper spelling and grammar"}}}}}},"400":{"description":"Bad request — missing or invalid jobId."},"404":{"description":"Preview job not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/spell-checker":{"post":{"tags":["AI Linguist Spell Checker"],"summary":"Submit a spell-check job","operationId":"linguist_spell_create_job","parameters":[{"name":"context","in":"header","required":true,"description":"Source locale/channel context to read product attribute values from.","schema":{"type":"string","example":"en_US"}},{"name":"output-context","in":"header","required":false,"description":"Target locale/channel context to write corrected values into. Optional — when omitted the source context is used as the output context.\n","schema":{"type":"string","example":"en_US"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value.","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistCreateJobRequest"},"examples":{"productIdsExample":{"summary":"Submit a job for a set of product IDs","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Correct spelling and grammar errors in the attribute values","productIds":["69a9602ccec1a5a482b125fe"]}},"filterExample":{"summary":"Submit a job using a Core Search filter","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"description"}],"instructionText":"Correct spelling errors in Home & Garden descriptions","filter":{"category":"Home & Garden","hasImage":true}}},"queryExample":{"summary":"Submit a job using a Query Builder query","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"}],"instructionText":"Correct all spelling and grammar errors","query":{"matchRule":"all","children":[{"termType":"name","filterType":"contains","value":"fame","context":"en"}],"contextFallback":true}}}}}}},"responses":{"202":{"description":"Job accepted and queued for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistCreateJobResponse"},"example":{"jobId":"c5f3e4d6a7b8901234567890"}}}},"400":{"description":"Bad request. Possible reasons: columns exceed limit, product count exceeds limit, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/config":{"get":{"tags":["AI Linguist Config"],"summary":"Get AI Linguist configuration for the organization","operationId":"ai_linguist_get_config","responses":{"200":{"description":"Successful configuration retrieval.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfigLinguistResponse"},"examples":{"default":{"summary":"Example AI Linguist configuration","value":{"orgId":"f458d846-0dde-4813-b309-3aa0afe7cf80","itemId":"config_ai_linguist","itemType":"config","temperature":"0.7","models":[{"name":"OpenAI - GPT 4o","model":"gpt-4o-2024-11-20","provider":"openai","functionCalling":false,"functionCallingParallel":false,"imageAsInput":false,"jsonMode":false,"maxInputTokens":128000,"maxOutputTokens":4096,"defaultParameters":{"temperature":0.7},"modelInfo":{"pros":["High-intelligence model for complex tasks"],"cons":["May hallucinate occasionally"]}}],"columnLimit":50,"productIdsLimit":10000,"attributeValueLimit":5000,"bqbLimit":10000,"coreSearchLimit":10000,"modelParameterOverrides":{"bedrock#claude-3-5-sonnet-20241022":{"temperature":0.3}},"globalParameterOverrides":{"temperature":0.7}}}}}}},"404":{"description":"Config not found."},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-linguist/translate":{"post":{"tags":["AI Linguist Translate"],"summary":"Submit a translate job","operationId":"linguist_translate_create_job","parameters":[{"name":"context","in":"header","required":true,"description":"Source locale/channel context to read product attribute values from.","schema":{"type":"string","example":"en_US"}},{"name":"output-context","in":"header","required":true,"description":"Target locale/channel context to write translated values into. Must be different from the source `context`.\n","schema":{"type":"string","example":"fr_FR"}},{"name":"context-fallback","in":"header","required":false,"description":"Whether to fall back to the default context when the specified context has no value.","schema":{"type":"string","enum":["true","false"],"default":"true"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistCreateJobRequest"},"examples":{"productIdsExample":{"summary":"Submit a job for a set of product IDs","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Translate to French","productIds":["69a9602ccec1a5a482b125fe"]}},"filterExample":{"summary":"Submit a job using a Core Search filter","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"description"}],"instructionText":"Translate descriptions to French","filter":{"category":"Home & Garden","hasImage":true}}},"queryExample":{"summary":"Submit a job using a Query Builder query","value":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"}],"instructionText":"Translate all product content to French","query":{"matchRule":"all","children":[{"termType":"name","filterType":"contains","value":"fame","context":"en"}],"contextFallback":true}}}}}}},"responses":{"202":{"description":"Job accepted and queued for processing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinguistCreateJobResponse"},"example":{"jobId":"a3f1c2d4e5b6789012345678"}}}},"400":{"description":"Bad request. Possible reasons: context equals output-context, columns exceed limit, product count exceeds limit, model/provider not available.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error."}},"security":[{"oauth2":[]}]}},"/ai-enrich/jobs/cancel":{"post":{"tags":["AI Enrich Jobs"],"summary":"Cancel a batch of pending AI Enrich jobs by id","operationId":"cancelEnrichJobs","security":[{"oauth2":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobsRequest"}}}},"responses":{"200":{"description":"Batch processed. Eligible PENDING jobs were cancelled; the rest are reported in 'skipped'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobsResponse"}}}},"400":{"description":"Bad Request — empty or oversized jobIds, malformed body, or unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing plugin permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai-enrich/jobs/cancel-all-pending":{"post":{"tags":["AI Enrich Jobs"],"summary":"Cancel ALL pending AI Enrich jobs in the caller's organization","operationId":"cancelAllPendingEnrichJobs","security":[{"oauth2":[]}],"responses":{"200":{"description":"Purge processed within Lambda budget. If morePending=true, re-invoke until false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllPendingResponse"}}}},"400":{"description":"Bad Request — body contained unknown keys or invalid subType.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing plugin permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":false,"description":"Empty body — '{}'.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}}}},"/ai-linguist/jobs/cancel":{"post":{"tags":["AI Linguist Jobs"],"summary":"Cancel a batch of pending AI Linguist jobs by id (any sub-type)","operationId":"cancelLinguistJobs","security":[{"oauth2":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobsRequest"}}}},"responses":{"200":{"description":"Batch processed. Eligible PENDING jobs were cancelled; the rest are reported in 'skipped'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobsResponse"}}}},"400":{"description":"Bad Request — empty or oversized jobIds, malformed body, or unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing plugin permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai-linguist/jobs/cancel-all-pending":{"post":{"tags":["AI Linguist Jobs"],"summary":"Cancel ALL pending AI Linguist jobs (optionally filtered by subType)","operationId":"cancelAllPendingLinguistJobs","security":[{"oauth2":[]}],"responses":{"200":{"description":"Purge processed within Lambda budget. If morePending=true, re-invoke until false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllPendingResponse"}}}},"400":{"description":"Bad Request — body contained unknown keys or invalid subType.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing plugin permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":false,"description":"Optional filter body. Send '{}' to drain all sub-types.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllPendingRequestLinguist"}}}}}},"/ai-analyst/jobs/cancel":{"post":{"tags":["AI Analyst Jobs"],"summary":"Cancel a batch of pending AI Analyst jobs by id","operationId":"cancelAnalystJobs","security":[{"oauth2":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobsRequest"}}}},"responses":{"200":{"description":"Batch processed. Eligible PENDING jobs were cancelled; the rest are reported in 'skipped'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelJobsResponse"}}}},"400":{"description":"Bad Request — empty or oversized jobIds, malformed body, or unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing plugin permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/ai-analyst/jobs/cancel-all-pending":{"post":{"tags":["AI Analyst Jobs"],"summary":"Cancel ALL pending AI Analyst jobs in the caller's organization","operationId":"cancelAllPendingAnalystJobs","security":[{"oauth2":[]}],"responses":{"200":{"description":"Purge processed within Lambda budget. If morePending=true, re-invoke until false.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAllPendingResponse"}}}},"400":{"description":"Bad Request — body contained unknown keys or invalid subType.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Missing plugin permission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":false,"description":"Empty body — '{}'.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false}}}}}}},"components":{"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://idp.test.bluestonepim.com/op/token","scopes":{"openid profile systemRoles permissions organization email name nickname":"All needed scopes."}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"Error description message."}},"required":["message"]},"Model":{"type":"object","description":"Canonical model descriptor used across AI APIs","properties":{"name":{"type":"string","description":"Human-friendly model display name.","example":"OpenAI - GPT 4o"},"model":{"type":"string","description":"Model identifier passed to the provider API.","example":"gpt-4o-2024-11-20"},"provider":{"type":"string","description":"LLM provider (e.g. openai, bedrock).","example":"openai"},"functionCalling":{"type":"boolean","description":"Whether the model supports function/tool calling.","example":false},"functionCallingParallel":{"type":"boolean","description":"Whether the model supports parallel function calls.","example":false},"imageAsInput":{"type":"boolean","description":"Whether the model accepts images as input.","example":false},"jsonMode":{"type":"boolean","description":"Whether the model supports structured JSON output mode.","example":false},"maxInputTokens":{"type":"integer","description":"Maximum number of input tokens the model accepts.","example":128000},"maxOutputTokens":{"type":"integer","description":"Maximum number of output tokens the model can generate.","example":4096},"defaultParameters":{"type":"object","description":"Default AI parameters for this model (e.g. temperature). These are the baseline values before any org-level overrides are applied.\n","example":{"temperature":0.5}},"modelInfo":{"type":"object","properties":{"pros":{"type":"array","items":{"type":"string"}},"cons":{"type":"array","items":{"type":"string"}}}}},"required":["name","model","provider"]},"ReportResponse":{"type":"object","properties":{"totalProducts":{"type":"integer","example":7},"totalSuggestions":{"type":"integer","example":18},"totalProductsApplied":{"type":"integer","example":0},"totalProductsArchived":{"type":"integer","example":0},"totalApplied":{"type":"integer","example":11},"totalFailed":{"type":"integer","example":0},"createdAt":{"type":"string","format":"date-time","description":"Timestamp when the parent AI Analyst job was created.","example":"2025-03-24T07:40:53Z"},"data":{"type":"array","description":"Paginated list of products in the report.","items":{"$ref":"#/components/schemas/ReportProduct"}},"page":{"type":"integer","description":"Current page index (zero-based), echoed from the request.","example":0},"pageSize":{"type":"integer","description":"Number of items per page, echoed from the request.","example":10},"total":{"type":"integer","description":"Total number of products matching the applied filters (before pagination).","example":7}},"required":["totalProducts","totalSuggestions","totalProductsApplied","totalProductsArchived","totalApplied","totalFailed","data","createdAt"]},"ReportProduct":{"type":"object","properties":{"productId":{"type":"string","example":"67d159d3ed926843e263ce8b"},"productName":{"type":"string","example":"Holdit Card Holder Taupe \\ud83d\\udcb3\\ud83d\\udc5c"},"productNumber":{"type":"string","example":"61866"},"productStatus":{"type":"string","example":"skipped"},"totalSuggestions":{"type":"integer","example":0},"appliedFixed":{"type":"integer","example":0},"totalFailed":{"type":"integer","example":0},"totalCompleted":{"type":"integer","example":0}},"required":["productId","productName","productNumber","productStatus","totalSuggestions","appliedFixed","totalFailed","totalCompleted"]},"ReportProductDetail":{"type":"object","properties":{"productId":{"type":"string"},"productName":{"type":"string"},"productNumber":{"type":"string"},"productStatus":{"type":"string"},"totalSuggestions":{"type":"integer"},"appliedFixed":{"type":"integer"},"totalFailed":{"type":"integer"},"totalCompleted":{"type":"integer","description":"appliedFixed minus totalFailed."},"report":{"type":"array","description":"List of report items. Each item is either an attribute-type or a category-type row, enriched with computed UI fields injected by the backend.\n","items":{"type":"object","description":"A single report row. Common fields are always present; attribute-specific or category-specific fields depend on the report_type.\n","properties":{"id":{"type":"string","description":"Composite identifier in the format '{report_type}#{attribute_number|category_number}'.","example":"missing_attribute_definitions#637d92374cedfd00018a8039"},"report_type":{"type":"string","description":"Type of the report row (e.g. missing_attribute_definitions, attribute_definitions_out_of_place, missing_categories, categories_out_of_place).\n","example":"missing_attribute_definitions"},"status":{"type":"string","description":"Processing status of this report row. Always injected by the backend.","enum":["review","applied","failed"],"example":"review"},"error_detail":{"type":"string","description":"Present only when the row has an error. Contains the error detail message injected by the backend."},"suggested_ui":{"type":"string","description":"Human-readable suggested value(s) for non-dictionary/non-multi_select attributes. Injected by the backend from suggested_value or suggested_values.\n"},"suggested_ui_add":{"type":"string","description":"Comma-separated values to add, for dictionary or multi_select attribute types. Injected by the backend from suggested_options_proposed_new.\n"},"suggested_ui_remove":{"type":"string","description":"Comma-separated values to remove, for dictionary or multi_select attribute types. Injected by the backend from value_out_of_place or values_out_of_place.\n"},"unit_info":{"type":"object","description":"Present only for attribute-type rows that carry unit information. Injected by the backend.","properties":{"current_unit":{"type":"string"},"suggested_unit":{"type":"string"},"has_unit_change":{"type":"boolean"}}},"unit_display":{"type":"string","description":"Human-readable unit change description. Injected by the backend for attribute rows with unit data.","example":"Change unit from 'cm' to 'mm'"},"note":{"type":"string","description":"Explanation note for attribute-type rows."},"suggested_values_confidence_reasoning":{"type":"string","description":"Reasoning behind the confidence score for attribute-type rows."},"suggested_values_confidence_score":{"type":"number","minimum":0,"maximum":10,"description":"Confidence score (0–10) for attribute-type suggestions."},"attribute_dataType":{"type":"string","description":"Data type of the attribute (e.g. text, integer, dictionary, multi_select)."},"attribute_number":{"type":"string","description":"Unique identifier of the attribute."},"attribute_name":{"type":"string","description":"Human-readable name of the attribute."},"suggested_values_sources":{"type":"array","items":{"type":"string"},"description":"Sources used to derive the suggested value for attribute-type rows."},"suggested_value":{"type":"string","description":"Single suggested value for the attribute."},"suggested_values":{"type":"array","items":{"type":"string"},"description":"Multiple suggested values for multi-value attribute types."},"category_name":{"type":"string","description":"Name of the category for category-type rows."},"categories_path":{"type":"array","items":{"type":"string"},"description":"Full path of the category hierarchy."},"issue":{"type":"string","description":"Description of the category issue."},"sources":{"type":"array","items":{"type":"string"},"description":"Sources used to derive the category suggestion."},"confidence_score":{"type":"number","minimum":0,"maximum":10,"description":"Confidence score (0–10) for category-type rows."},"confidence_reasoning":{"type":"string","description":"Reasoning behind the confidence score for category-type rows."},"name_original":{"type":"string","description":"Original category name."},"category_number":{"type":"string","description":"Unique identifier of the category."}},"required":["id","report_type","status"]}}},"required":["productId","productName","productNumber","productStatus","totalSuggestions","appliedFixed","totalFailed","totalCompleted","report"]},"ApplyFixReport":{"type":"object","description":"Response from the apply fix report endpoint. When the job targeted exactly one product, the 'productName' field is also included. 'startedAt' and 'endedAt' may be null if the job has not started or completed yet.\n","properties":{"totalProduct":{"type":"integer","example":1},"totalProductArchived":{"type":"integer","example":0},"totalProductFailed":{"type":"integer","example":0},"totalApplied":{"type":"integer","example":1},"totalFailed":{"type":"integer","example":0},"status":{"type":"string","enum":["PENDING","IN_PROGRESS","COMPLETED","FAILED"],"example":"COMPLETED","description":"Current status of the apply fix job."},"startedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the job started processing. Null if not yet started.","example":"2025-04-04T09:54:00Z"},"endedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the job completed. Null if not yet finished.","example":"2025-04-04T09:54:04Z"},"productName":{"type":"string","description":"Present only when the apply fix job targeted exactly one product. Omitted for multi-product jobs.\n","example":"PanzerGlass Hoops SAM A56"}},"required":["totalProduct","totalProductArchived","totalProductFailed","totalApplied","totalFailed","status"]},"AiAnalystConfig":{"type":"object","properties":{"orgId":{"type":"string","example":"f458d846-0dde-4813-b309-3aa0afe7cf80"},"models":{"type":"array","description":"List of AI models available for this organisation, enriched with full model metadata from the global model registry.","items":{"$ref":"#/components/schemas/Model"}},"trainProductLimit":{"type":"integer","description":"Maximum number of training products allowed per job.","example":20},"trainAttributeLimit":{"type":"integer","description":"Maximum number of training attributes allowed per job.","example":20},"modelParameterOverrides":{"type":"object","description":"Per-model parameter overrides keyed by '{provider}#{model}'. Takes precedence over globalParameterOverrides when a match is found.\n","example":{"bedrock#claude-3-5-sonnet-20241022":{"temperature":0.3}}},"globalParameterOverrides":{"type":"object","description":"Organisation-wide AI parameter overrides applied to all models unless a model-specific override exists.\n","example":{"temperature":0.5}}},"required":["orgId","models","trainProductLimit","trainAttributeLimit","modelParameterOverrides","globalParameterOverrides"]},"EnrichAttributeInput":{"type":"object","description":"References a single attribute for input or output. Use `name` for PIM metadata fields (e.g. name, description, number). Use `id` for custom attributes (MongoDB ObjectId hex string). Exactly one of `name` or `id` must be provided.\n","oneOf":[{"required":["name"],"properties":{"name":{"type":"string","description":"Metadata field key (e.g. 'name', 'description', 'number').","example":"description"}}},{"required":["id"],"properties":{"id":{"type":"string","description":"Custom attribute ID (MongoDB ObjectId hex string).","example":"6808c2b1bc520905940088f5"}}}]},"EnrichAttributeRef":{"type":"object","description":"Pairs an attribute reference with an AI instruction. Use `name` for metadata fields or `id` for custom attributes — exactly one must be provided. The `input` field contains the instruction text the AI will follow for that attribute.\n","oneOf":[{"required":["name","input"],"properties":{"name":{"type":"string","description":"Metadata field key this instruction applies to.","example":"description"},"input":{"type":"string","description":"Instruction text for the AI to follow when generating this attribute's value.","example":"Generate a product description. Include up to 3 sentences. Add up to 5 key features as bullet points. Output in plain text."}}},{"required":["id","input"],"properties":{"id":{"type":"string","description":"Custom attribute ID this instruction applies to.","example":"6808c2b1bc520905940088f5"},"input":{"type":"string","description":"Instruction text for the AI to follow when generating this attribute's value.","example":"Extend a product description with a creative approach and add some emojis"}}}]},"EnrichPreviewRequest":{"type":"object","required":["productId","model","provider","inputAttributes","outputAttributes","instructions"],"properties":{"productId":{"type":"string","description":"ID of the product to preview enrichment for.","example":"69a9602ccec1a5a482b125fe"},"model":{"type":"string","description":"Model identifier (e.g. 'gpt-4o-2024-11-20'). Must match a model available in the org config.","example":"gpt-4o-2024-11-20"},"provider":{"type":"string","description":"AI provider (e.g. 'openai', 'bedrock'). Must match a provider available in the org config.","example":"openai"},"instructions":{"type":"array","description":"One instruction object per output attribute. Must have the same length as outputAttributes. Each item targets either a metadata field (use `name`) or a custom attribute (use `id`).\n","items":{"$ref":"#/components/schemas/EnrichAttributeRef"}},"inputAttributes":{"type":"array","description":"Attributes to provide as AI input context. Each item is either a metadata field (`name`) or a custom attribute (`id`). Total count must not exceed the configured inputLimit.\n","items":{"$ref":"#/components/schemas/EnrichAttributeInput"}},"outputAttributes":{"type":"array","description":"Attributes the AI will generate values for. Must have the same length as instructions. Each item is either a metadata field (`name`) or a custom attribute (`id`). Total count must not exceed the configured outputLimit.\n","items":{"$ref":"#/components/schemas/EnrichAttributeInput"}},"usingImage":{"type":"string","description":"Whether to include the product image as AI input. Accepts 'true' or 'false'. Requires the selected model to have imageAsInput: true — backend returns 400 if not supported.\n","enum":["true","false"],"default":"false"},"assetLabelId":{"type":"string","description":"Asset label ID used to select the specific product image when usingImage is true. Falls back to the first available asset if not provided.\n","example":"9adfa788-c367-4675-b746-9eb29482abc6"},"aiParameters":{"type":"object","description":"Optional AI parameter overrides (e.g. temperature). Merged with org-level config overrides.","example":{"temperature":0.5}}},"example":{"productId":"69a9602ccec1a5a482b125fe","model":"gpt-4o-2024-11-20","provider":"openai","instructions":[{"name":"description","input":"Generate a product description. Include up to 3 sentences. Add up to 5 key features as bullet points. Output in plain text."},{"id":"6808c2b1bc520905940088f5","input":"Extend a product description with a creative approach and add some emojis"}],"inputAttributes":[{"name":"name"},{"name":"number"},{"name":"description"}],"outputAttributes":[{"name":"description"},{"id":"6808c2b1bc520905940088f5"}],"usingImage":"true","assetLabelId":"9adfa788-c367-4675-b746-9eb29482abc6"}},"EnrichPreviewResponse":{"type":"object","description":"Response from both POST /ai-enrich/preview (job created) and GET /ai-enrich/preview/{jobId} (polling). Poll until status is COMPLETED or FAILED.\n","properties":{"jobId":{"type":"string","description":"Unique identifier of the preview job."},"status":{"type":"string","enum":["PENDING","IN_PROGRESS","COMPLETED","FAILED"],"description":"Current processing status of the preview job.","example":"COMPLETED"},"startedAt":{"type":"string","format":"date-time","description":"Timestamp when the preview job was created/started."},"endedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the job completed. Null if still processing."},"previewPrompt":{"type":"string","nullable":true,"description":"Human-readable prompt preview shown in the UI. Null while processing."},"missingImage":{"type":"boolean","nullable":true,"description":"True if usingImage was requested but no product image was found. Null if image was not requested.\n"},"result":{"type":"string","nullable":true,"description":"AI-generated enrichment result. Null until job is COMPLETED."},"error":{"type":"string","nullable":true,"description":"Error message if the job failed. Null on success."}},"required":["jobId","status","startedAt"]},"EnrichCreateJobRequest":{"type":"object","required":["model","provider","inputAttributes","outputAttributes","instructions"],"properties":{"model":{"type":"string","description":"The model identifier to use for enrichment (e.g. 'gpt-4o-2024-11-20').","example":"gpt-4o-2024-11-20"},"provider":{"type":"string","description":"The AI provider (e.g. 'openai', 'bedrock').","example":"openai"},"usingImage":{"type":"string","description":"Whether to use product images as AI input. Accepts 'true' or 'false'. Only valid when the selected model supports imageAsInput.\n","enum":["true","false"],"default":"false"},"assetLabelId":{"type":"string","description":"Optional asset label ID used to select a specific image when usingImage is true."},"inputAttributes":{"type":"array","description":"Attributes to provide as AI input context. Each item is either a metadata field (`name`) or a custom attribute (`id`). Must not exceed inputLimit from config.\n","items":{"$ref":"#/components/schemas/EnrichAttributeInput"}},"outputAttributes":{"type":"array","description":"Attributes the AI will generate values for. Must have the same length as instructions. Each item is either a metadata field (`name`) or a custom attribute (`id`). Must not exceed outputLimit from config.\n","items":{"$ref":"#/components/schemas/EnrichAttributeInput"}},"instructions":{"type":"array","description":"Per-attribute instructions for the AI. Must have the same length as outputAttributes. Each item targets either a metadata field (`name`) or a custom attribute (`id`), and carries the instruction text in the `input` field.\n","items":{"$ref":"#/components/schemas/EnrichAttributeRef"}},"filter":{"type":"object","description":"Core Search filter to select products. Mutually exclusive with productIds and query."},"query":{"type":"object","description":"Query Builder query to select products. Mutually exclusive with productIds and filter."},"productIds":{"type":"array","description":"Explicit list of product IDs to process. Mutually exclusive with filter and query.","items":{"type":"string"}},"aiParameters":{"type":"object","description":"Optional AI parameter overrides (e.g. temperature). Merged with org-level config overrides."}},"example":{"model":"gpt-4o-2024-11-20","provider":"openai","inputAttributes":[{"name":"name"},{"name":"number"},{"name":"description"}],"outputAttributes":[{"name":"description"},{"id":"6808c2b1bc520905940088f5"}],"instructions":[{"name":"description","input":"Generate a product description. Include up to 3 sentences. Add up to 5 key features as bullet points. Output in plain text."},{"id":"6808c2b1bc520905940088f5","input":"Extend a product description with a creative approach and add some emojis"}],"productIds":["69a9602ccec1a5a482b125fe"]}},"EnrichCreateJobResponse":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]},"ConfigEnrichResponse":{"type":"object","properties":{"orgId":{"type":"string","description":"Organisation identifier.","example":"f458d846-0dde-4813-b309-3aa0afe7cf80"},"itemId":{"type":"string","description":"Fixed config record identifier. Always 'config_ai_enrich'.","example":"config_ai_enrich"},"itemType":{"type":"string","description":"Record type. Always 'config'.","example":"config"},"models":{"type":"array","description":"List of AI models available for this organisation, enriched with full model metadata from the global model registry.","items":{"$ref":"#/components/schemas/Model"}},"outputLimit":{"type":"integer","description":"Maximum number of attributes the AI can output per product.","example":50},"inputLimit":{"type":"integer","description":"Maximum number of attributes the AI can take as input per product.","example":50},"productIdsLimit":{"type":"integer","description":"Maximum number of products that can be submitted via explicit productIds list.","example":10000},"attributeValueLimit":{"type":"integer","description":"Maximum length of an attribute value string sent to the AI.","example":5000},"bqbLimit":{"type":"integer","description":"Maximum number of products resolved via a Query Builder query.","example":10000},"coreSearchLimit":{"type":"integer","description":"Maximum number of products resolved via a Core Search filter.","example":10000},"modelParameterOverrides":{"type":"object","description":"Per-model parameter overrides keyed by '{provider}#{model}'. Takes precedence over globalParameterOverrides when a match is found.\n","example":{"bedrock#claude-3-5-sonnet-20241022":{"temperature":0.3}}},"globalParameterOverrides":{"type":"object","description":"Organisation-wide AI parameter overrides applied to all models unless a model-specific override exists.\n","example":{"temperature":0.7}}},"required":["orgId","itemId","itemType","models","inputLimit","outputLimit","productIdsLimit","attributeValueLimit","bqbLimit","coreSearchLimit","modelParameterOverrides","globalParameterOverrides"],"example":{"orgId":"f458d846-0dde-4813-b309-3aa0afe7cf80","itemId":"config_ai_enrich","itemType":"config","models":[{"name":"OpenAI - GPT 4o","model":"gpt-4o-2024-11-20","provider":"openai","functionCalling":false,"functionCallingParallel":false,"imageAsInput":false,"jsonMode":false,"maxInputTokens":128000,"maxOutputTokens":4096,"defaultParameters":{"temperature":0.7},"modelInfo":{"pros":["High-intelligence model for complex tasks"],"cons":["May hallucinate occasionally"]}}],"outputLimit":50,"inputLimit":50,"productIdsLimit":10000,"attributeValueLimit":5000,"bqbLimit":10000,"coreSearchLimit":10000,"modelParameterOverrides":{},"globalParameterOverrides":{"temperature":0.7}}},"LinguistColumnRef":{"type":"object","description":"References a single column (attribute) for Linguist operations. Use `columnType: name` for PIM metadata fields (name, description, number, etc.) — set `id` to the field key. Use `columnType: attribute` for custom attributes — set `id` to the MongoDB ObjectId hex string.\n","required":["id","columnType"],"properties":{"id":{"type":"string","description":"For metadata fields: the field key (e.g. 'name', 'description', 'number'). For custom attributes: the MongoDB ObjectId hex string.\n","example":"description"},"columnType":{"type":"string","description":"Type of the column. Use 'name' for metadata fields, 'attribute' for custom attributes.\n","enum":["name","attribute"],"example":"name"}}},"LinguistPreviewRequest":{"type":"object","description":"Request to create a single-product Linguist preview (translate, improve-text, or spell-checker). The `columns` array defines which attributes the AI will process.\n","required":["productId","model","provider","columns"],"properties":{"productId":{"type":"string","description":"ID of the product to preview.","example":"69a9602ccec1a5a482b125fe"},"model":{"type":"string","description":"Model identifier (e.g. 'gpt-4o-2024-11-20'). Must match a model available in the org config.","example":"gpt-4o-2024-11-20"},"provider":{"type":"string","description":"AI provider (e.g. 'openai', 'bedrock'). Must match a provider available in the org config.","example":"openai"},"columns":{"type":"array","description":"List of columns (attributes) the AI will process. Each item uses `columnType: name` for metadata fields or `columnType: attribute` for custom attributes. Total count must not exceed the configured columnLimit.\n","items":{"$ref":"#/components/schemas/LinguistColumnRef"}},"instructionText":{"type":"string","description":"Global instruction for the AI — applies to all columns in this request. Describes the desired transformation (translate to French, improve clarity, fix spelling, etc.).\n","example":"Translate the attribute values to French"},"aiParameters":{"type":"object","description":"Optional AI parameter overrides (e.g. temperature). Merged with org-level config overrides.","example":{"temperature":0.5}}},"example":{"productId":"69a9602ccec1a5a482b125fe","model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"},{"columnType":"attribute","id":"6808c2aeb4ee394f6754e500"}],"instructionText":"Translate the attribute values to French"}},"LinguistPreviewResponse":{"type":"object","description":"Response from both POST preview (job created) and GET preview/{jobId} (polling). Poll GET until `status` is COMPLETED or FAILED.\n","required":["jobId","status","startedAt"],"properties":{"jobId":{"type":"string","description":"Unique identifier of the preview job.","example":"a3f1c2d4e5b6789012345678"},"status":{"type":"string","description":"Current processing status of the preview job.","enum":["PENDING","IN_PROGRESS","COMPLETED","FAILED"],"example":"COMPLETED"},"startedAt":{"type":"string","format":"date-time","description":"Timestamp when the preview job was created.","example":"2026-03-11T08:00:00Z"},"endedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when the job completed. Null if still processing.","example":"2026-03-11T08:00:05Z"},"previewPrompt":{"type":"string","nullable":true,"description":"Human-readable prompt preview shown in the UI before AI result is available."},"result":{"type":"string","nullable":true,"description":"AI-generated result text. Null until job is COMPLETED."},"error":{"type":"string","nullable":true,"description":"Error message if the job failed. Null on success."}}},"LinguistCreateJobRequest":{"type":"object","description":"Request to submit a Linguist batch job (translate, improve-text, or spell-checker). Provide exactly one of `productIds`, `filter`, or `query` to select the products to process.\n","required":["model","provider","columns"],"properties":{"model":{"type":"string","description":"Model identifier (e.g. 'gpt-4o-2024-11-20'). Must match a model available in the org config.","example":"gpt-4o-2024-11-20"},"provider":{"type":"string","description":"AI provider (e.g. 'openai', 'bedrock'). Must match a provider available in the org config.","example":"openai"},"columns":{"type":"array","description":"List of columns (attributes) the AI will process. Each item uses `columnType: name` for metadata fields or `columnType: attribute` for custom attributes. Total count must not exceed the configured columnLimit.\n","items":{"$ref":"#/components/schemas/LinguistColumnRef"}},"instructionText":{"type":"string","description":"Global instruction for the AI — applies to all columns in this job. Describes the desired transformation (translate to French, improve clarity, fix spelling, etc.).\n","example":"Translate all product content to French"},"columnSetupName":{"type":"string","description":"Optional label for the column setup used in this job. Stored for reference only.","example":"001 Default Setup"},"productIds":{"type":"array","description":"Explicit list of product IDs to process. Mutually exclusive with filter and query.","items":{"type":"string"}},"filter":{"type":"object","description":"Core Search filter to select products. Mutually exclusive with productIds and query."},"query":{"type":"object","description":"Query Builder query to select products. Mutually exclusive with productIds and filter."},"aiParameters":{"type":"object","description":"Optional AI parameter overrides (e.g. temperature). Merged with org-level config overrides."}},"example":{"model":"gpt-4o-2024-11-20","provider":"openai","columns":[{"columnType":"name","id":"name"},{"columnType":"name","id":"description"},{"columnType":"attribute","id":"6808c2aebc520905940088c0"}],"instructionText":"Translate all product content to French","productIds":["69a9602ccec1a5a482b125fe"]}},"LinguistCreateJobResponse":{"type":"object","description":"Response returned when a Linguist job is successfully accepted.","required":["jobId"],"properties":{"jobId":{"type":"string","description":"Unique identifier of the created job.","example":"a3f1c2d4e5b6789012345678"}}},"ConfigLinguistResponse":{"type":"object","properties":{"orgId":{"type":"string","description":"Organisation identifier.","example":"f458d846-0dde-4813-b309-3aa0afe7cf80"},"itemId":{"type":"string","description":"Fixed config record identifier. Always 'config_ai_linguist'.","example":"config_ai_linguist"},"itemType":{"type":"string","description":"Record type. Always 'config'.","example":"config"},"temperature":{"type":"string","deprecated":true,"description":"Legacy temperature value. Deprecated — use `globalParameterOverrides.temperature` instead. Retained for backward compatibility only.\n","example":"0.7"},"models":{"type":"array","description":"List of AI models available for this organisation, enriched with full model metadata from the global model registry.","items":{"$ref":"#/components/schemas/Model"}},"columnLimit":{"type":"integer","description":"Maximum number of columns (attributes) the AI can process per product.","example":50},"productIdsLimit":{"type":"integer","description":"Maximum number of products that can be submitted via explicit productIds list.","example":10000},"attributeValueLimit":{"type":"integer","description":"Maximum length of an attribute value string sent to the AI.","example":5000},"bqbLimit":{"type":"integer","description":"Maximum number of products resolved via a Query Builder query.","example":10000},"coreSearchLimit":{"type":"integer","description":"Maximum number of products resolved via a Core Search filter.","example":10000},"modelParameterOverrides":{"type":"object","description":"Per-model parameter overrides keyed by '{provider}#{model}'. Takes precedence over globalParameterOverrides when a match is found.\n","example":{"bedrock#claude-3-5-sonnet-20241022":{"temperature":0.3}}},"globalParameterOverrides":{"type":"object","description":"Organisation-wide AI parameter overrides applied to all models unless a model-specific override exists.\n","example":{"temperature":0.7}}},"required":["orgId","itemId","itemType","models","columnLimit","productIdsLimit","attributeValueLimit","bqbLimit","coreSearchLimit","modelParameterOverrides","globalParameterOverrides"],"example":{"orgId":"f458d846-0dde-4813-b309-3aa0afe7cf80","itemId":"config_ai_linguist","itemType":"config","temperature":"0.7","models":[{"name":"OpenAI - GPT 4o","model":"gpt-4o-2024-11-20","provider":"openai","functionCalling":false,"functionCallingParallel":false,"imageAsInput":false,"jsonMode":false,"maxInputTokens":128000,"maxOutputTokens":4096,"defaultParameters":{"temperature":0.7},"modelInfo":{"pros":["High-intelligence model for complex tasks"],"cons":["May hallucinate occasionally"]}}],"columnLimit":50,"productIdsLimit":10000,"attributeValueLimit":5000,"bqbLimit":10000,"coreSearchLimit":10000,"modelParameterOverrides":{},"globalParameterOverrides":{"temperature":0.7}}},"CancelJobsRequest":{"type":"object","required":["jobIds"],"properties":{"jobIds":{"type":"array","description":"List of job UUIDs to cancel. Only jobs with status 'pending' are flipped to 'cancelled'; others are returned in 'skipped'. Max 100 ids per request.","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100,"example":["b1f3...e8","a72c...02"]}}},"CancelJobsResponse":{"type":"object","description":"Result of a /cancel batch. The caller's org_id is taken from the JWT — never from the body.","properties":{"cancelled":{"type":"array","description":"Job ids that were transitioned from pending to cancelled.","items":{"type":"string"}},"skipped":{"type":"array","description":"Job ids that were not cancelled, with a reason code per entry.","items":{"type":"object","properties":{"jobId":{"type":"string"},"reason":{"type":"string","enum":["NOT_FOUND","NOT_PENDING","RACE","INVALID_ID","SUB_TYPE_MISMATCH"],"description":"NOT_FOUND covers both 'no such job' and 'belongs to another org' (intentionally indistinguishable for cross-tenant safety)."},"currentStatus":{"type":"string","description":"Present when reason=NOT_PENDING — the job's actual status."}}}},"totalCancelled":{"type":"integer","example":2}}},"CancelAllPendingRequestLinguist":{"type":"object","description":"Optional subType filter restricts the purge to one linguist sub-type. Omit to drain all sub-types.","properties":{"subType":{"type":"string","enum":["translate","improve-text","spell-checker"]}}},"CancelAllPendingResponse":{"type":"object","description":"Result of a /cancel-all-pending invocation. If morePending=true, the Lambda budget (25s) was hit before the org was drained — re-invoke until morePending=false.","properties":{"totalCancelled":{"type":"integer","example":342},"morePending":{"type":"boolean","example":false}}}}},"tags":[{"name":"AI Analyst Config","description":"Get AI Analyst model configuration for the organisation"},{"name":"AI Analyst Jobs","description":"Create and list AI Analyst jobs"},{"name":"AI Analyst Report","description":"Retrieve analysis reports per job and per product"},{"name":"AI Analyst Report Fix","description":"Submit and track apply-fix jobs from an analyst report"},{"name":"AI Enrich Config","description":"Get AI Enrich configuration for the organisation"},{"name":"AI Enrich Preview","description":"Create and retrieve single-product enrich previews"},{"name":"AI Enrich Jobs","description":"Submit AI Enrich batch jobs (productIds, filter, or query)"},{"name":"AI Linguist Config","description":"Get AI Linguist configuration for the organisation"},{"name":"AI Linguist Jobs","description":"Cancel AI Linguist jobs across all sub-types (translate, improve-text, spell-checker)"},{"name":"AI Linguist Translate","description":"Create previews and submit batch translation jobs"},{"name":"AI Linguist Improve Text","description":"Create previews and submit batch improve-text jobs"},{"name":"AI Linguist Spell Checker","description":"Create previews and submit batch spell-check jobs"}]}