This endpoint allows you to capture user feedback on search results, including overall ratings, text feedback, and product-specific feedback. When feedback is submitted, the endpoint retrieves the cached search data (if still available) and stores the original search query, expanded queries, and intent modifier actions alongside the feedback for analysis.
Persistent browser identifier that remains constant across sessions. Used to recognize returning visitors for long-term personalization. Automatically generated and managed by the Storefront Pixel.
Temporary session identifier. Layers-generated sessions expire after 30 minutes without activity. The Storefront Pixel refreshes the rolling window at page load and on every route change, including pages without tracked events. When a legacy Shopify or fallback cookie is available, Layers prefers it and does not control its lifetime. Without consent, the pixel uses a sessionStorage or in-memory fallback and does not write an analytics cookie.
Shopify B2B company location GID (e.g. gid://shopify/CompanyLocation/123456789) for the authenticated buyer. Layers resolves the catalog assigned to the company location and uses it to scope results: only products in the catalog are returned, prices come from the catalog’s price list, and excluded collections return 404. Omit for retail (DTC) traffic.When you pass companyLocationId, you must also pass the buyer’s customerId. Layers verifies with Shopify that the customer belongs to the company that owns the location before resolving the catalog; unauthorized or unauthenticated requests return a 403. See B2B catalogs.
Use this endpoint in conjunction with the Prepare Search and Search endpoints to create a complete search experience with feedback collection
Analyze collected feedback to improve search relevance and user experience
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Layers","colors":{"primary":"#607FFD","light":"#AFC0FF","dark":"#3A57E8"},"logo":{"light":"https://mintcdn.com/protoninc/PNs-gxGUVcdBDEEC/logo.svg?fit=max\u0026auto=format\u0026n=PNs-gxGUVcdBDEEC\u0026q=85\u0026s=989e3194cb32f07e7018b8b7186b9007","dark":"https://mintcdn.com/protoninc/PNs-gxGUVcdBDEEC/logo.svg?fit=max\u0026auto=format\u0026n=PNs-gxGUVcdBDEEC\u0026q=85\u0026s=989e3194cb32f07e7018b8b7186b9007","href":"https://www.uselayers.com/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs-to-site"},"favicon":"https://mintcdn.com/protoninc/qubyNEZK4oJTl9By/favicon.svg?fit=max\u0026auto=format\u0026n=qubyNEZK4oJTl9By\u0026q=85\u0026s=3611d60346e12f15e4684bc60cb69ece","api":{"mdx":{"server":"https://app.uselayers.com/api/storefront/v1"}},"navbar":{"links":[{"href":"https://www.uselayers.com/changelog?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs-to-site","label":"Changelog"},{"href":"mailto:support@uselayers.com","label":"Support"},{"href":"https://app.uselayers.com/dashboard?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs-to-dashboard","label":"Dashboard"}],"primary":{"type":"button","label":"Request Demo","href":"https://www.uselayers.com/demo?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs-to-site"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/uselayers"},"links":[{"header":"Legal","items":[{"label":"Privacy Statement","href":"https://docs.uselayers.com/legal/privacy-statement"},{"label":"Terms of Use","href":"https://docs.uselayers.com/legal/terms-of-use"}]}]},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"protoninc","hasAudioNarration":false,"actualSubdomain":"protoninc","customDomains":["docs.uselayers.com"],"gitSource":{"type":"github","owner":"protonagency","repo":"layers-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aec9466ca078695d82aa007","collectionId":"eccc4149-6768-4a44-9ebd-e8539317fbe7","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aec9466ca078695d82aa007"},"feedback":{"thumbs":true,"edits":false,"issues":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"}},"buildId":"6aedfe438505f54819241077","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Documentation","count":103},{"language":"default","tag":"Help Center","count":90},{"language":"default","tag":"Merchandising","count":57},{"language":"default","tag":"Developers","count":42},{"language":"default","tag":"API Reference","count":25},{"language":"default","tag":"SDK","count":20},{"language":"default","tag":"Sort Orders","count":18},{"language":"default","tag":"Configuration","count":15},{"language":"default","tag":"Liquid","count":14},{"language":"default","tag":"Search \u0026 Discovery","count":14}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false,"deflection":{"enabled":true,"email":"support@uselayers.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/search-feedback","slug":"/api-reference/search-feedback","pageMetadata":{"api":"POST /search/feedback","title":"Text Search: Submit Feedback","sidebarTitle":"Submit Feedback","description":"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.","href":"/api-reference/search-feedback"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint allows you to capture user feedback on search results, including overall ratings, text feedback, and product-specific feedback. When feedback is submitted, the endpoint retrieves the cached search data (if still available) and stores the original search query, expanded queries, and intent modifier actions alongside the feedback for analysis.`}),`\n`,_jsx(Heading,{level:`2`,id:`authorization`,children:`Authorization`}),`\n`,_jsx(ParamField,{header:`X-Storefront-Access-Token`,type:`string`,required:true,id:`param-x-storefront-access-token`,children:_jsxs(_components.p,{children:[`Token-based authentication header in the form of `,_jsx(_components.code,{children:`\u003cYOUR_LAYERS_TOKEN>`}),`. Same requirements as the Search API.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,default:`application/json`,required:true,id:`param-content-type`}),`\n`,_jsx(ParamField,{header:`Accept`,type:`string`,default:`application/json`,required:true,id:`param-accept`}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`search_id`,type:`string`,required:true,id:`param-search-id`,children:_jsxs(_components.p,{children:[`ULID identifier of the search to provide feedback on. This should be the `,_jsx(_components.code,{children:`search_id`}),` returned from the `,_jsx(_components.a,{href:`/api-reference/search-prepare`,children:`Prepare Search`}),` endpoint.`]})}),`\n`,_jsxs(ParamField,{body:`rating`,type:`string`,id:`param-rating`,children:[_jsx(_components.p,{children:`Overall rating for the search results. Must be one of:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"positive\"`}),` - Thumbs up, results were helpful`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"negative\"`}),` - Thumbs down, results were not helpful`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`text_feedback`,type:`string`,id:`param-text-feedback`,children:_jsx(_components.p,{children:`Free-form text feedback from the shopper. Maximum 2000 characters.`})}),`\n`,_jsxs(ParamField,{body:`product_feedback`,type:`array`,id:`param-product-feedback`,children:[_jsx(_components.p,{children:`Array of product-specific feedback objects. Each object contains:`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ParamField,{body:`product_id`,type:`integer`,required:true,id:`param-product-id`,children:_jsx(_components.p,{children:`The product ID to provide feedback on.`})}),_jsx(ParamField,{body:`rating`,type:`string`,id:`param-rating-1`,children:_jsxs(_components.p,{children:[`Rating for this specific product. Must be `,_jsx(_components.code,{children:`\"positive\"`}),` or `,_jsx(_components.code,{children:`\"negative\"`}),`.`]})}),_jsx(ParamField,{body:`feedback`,type:`string`,id:`param-feedback`,children:_jsx(_components.p,{children:`Optional text feedback for this product. Maximum 500 characters.`})})]})]}),`\n`,_jsxs(ParamField,{body:`identity`,type:`object`,id:`param-identity`,children:[_jsx(_components.p,{children:`User identity information for tracking and personalization. Automatically managed by the Storefront Pixel; required for headless integrations.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ParamField,{body:`deviceId`,type:`string`,id:`param-device-id`,children:_jsx(_components.p,{children:`Persistent browser identifier that remains constant across sessions. Used to recognize returning visitors for long-term personalization. Automatically generated and managed by the Storefront Pixel.`})}),_jsx(ParamField,{body:`sessionId`,type:`string`,id:`param-session-id`,children:_jsx(_components.p,{children:`Temporary session identifier. Layers-generated sessions expire after 30 minutes without activity. The Storefront Pixel refreshes the rolling window at page load and on every route change, including pages without tracked events. When a legacy Shopify or fallback cookie is available, Layers prefers it and does not control its lifetime. Without consent, the pixel uses a sessionStorage or in-memory fallback and does not write an analytics cookie.`})}),_jsx(ParamField,{body:`customerId`,type:`string`,id:`param-customer-id`,children:_jsx(_components.p,{children:`Shopify customer ID for authenticated users. Only present when the customer is signed in to their account.`})}),_jsxs(ParamField,{body:`companyLocationId`,type:`string`,id:`param-company-location-id`,children:[_jsxs(_components.p,{children:[`Shopify B2B company location GID (e.g. `,_jsx(_components.code,{children:`gid://shopify/CompanyLocation/123456789`}),`) for the authenticated buyer. Layers resolves the catalog assigned to the company location and uses it to scope results: only products in the catalog are returned, prices come from the catalog’s price list, and excluded collections return 404. Omit for retail (DTC) traffic.`]}),_jsxs(_components.p,{children:[`When you pass `,_jsx(_components.code,{children:`companyLocationId`}),`, you must also pass the buyer’s `,_jsx(_components.code,{children:`customerId`}),`. Layers verifies with Shopify that the customer belongs to the company that owns the location before resolving the catalog; unauthorized or unauthenticated requests return a `,_jsx(_components.code,{children:`403`}),`. See `,_jsx(_components.a,{href:`/shopify-integration/b2b-catalogs`,children:`B2B catalogs`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`validation-rules`,children:`Validation rules`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`search_id`}),` is required and must be a valid ULID`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`rating`}),` must be either `,_jsx(_components.code,{children:`\"positive\"`}),` or `,_jsx(_components.code,{children:`\"negative\"`}),` if provided`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`text_feedback`}),` has a maximum length of 2000 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`product_feedback`}),` is an array where each item must include:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`product_id`}),` (required when `,_jsx(_components.code,{children:`product_feedback`}),` is provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`rating`}),` must be `,_jsx(_components.code,{children:`\"positive\"`}),` or `,_jsx(_components.code,{children:`\"negative\"`}),` if provided`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`feedback`}),` has a maximum length of 500 characters`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`At least one of `,_jsx(_components.code,{children:`rating`}),`, `,_jsx(_components.code,{children:`text_feedback`}),`, or `,_jsx(_components.code,{children:`product_feedback`}),` should be provided, though all fields are technically optional`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`behavior`,children:`Behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Returns HTTP 201 (Created) when feedback is successfully recorded`}),`\n`,_jsxs(_components.li,{children:[`Attempts to retrieve cached search data using the provided `,_jsx(_components.code,{children:`search_id`})]}),`\n`,_jsxs(_components.li,{children:[`If cached data is available (within 15 minutes of the original search), captures:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Original search query`}),`\n`,_jsx(_components.li,{children:`Expanded queries used for search`}),`\n`,_jsx(_components.li,{children:`Intent modifier actions applied`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`If cached data is not available (expired or invalid `,_jsx(_components.code,{children:`search_id`}),`), feedback is still recorded but without the search context`]}),`\n`,_jsxs(_components.li,{children:[`Stores identity information (`,_jsx(_components.code,{children:`sessionId`}),` and `,_jsx(_components.code,{children:`customerId`}),`) if provided`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`201-created`,children:`201 Created`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`ULID identifier for the created feedback record.`})}),`\n`,_jsx(ResponseField,{name:`search_id`,type:`string`,id:`param-search-id-1`,children:_jsx(_components.p,{children:`The search ID that was provided in the request.`})}),`\n`,_jsx(ResponseField,{name:`recorded`,type:`boolean`,id:`param-recorded`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`true`}),` when feedback is successfully recorded.`]})}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`error-conditions`,children:`Error conditions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`401 Unauthorized: Missing or invalid `,_jsx(_components.code,{children:`X-Storefront-Access-Token`})]}),`\n`,_jsx(_components.li,{children:`402 Payment Required: The store is suspended. Every storefront API request returns this status until the suspension is lifted`}),`\n`,_jsx(_components.li,{children:`422 Unprocessable Entity: Invalid body or validation errors`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-usage`,children:`Example usage`}),`\n`,_jsx(Heading,{level:`3`,id:`basic-rating-feedback`,children:`Basic rating feedback`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.uselayers.com/api/storefront/v1/search/feedback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Storefront-Access-Token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-token-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '01HZY7J9ZV6K2T3M6P4FJ3F2QG'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'positive'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// { id: \"01HZY7K2M8N9P4Q5R6S7T8U9V0\", search_id: \"01HZY7J9ZV6K2T3M6P4FJ3F2QG\", recorded: true }`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`feedback-with-text-and-identity`,children:`Feedback with text and identity`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.uselayers.com/api/storefront/v1/search/feedback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Storefront-Access-Token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-token-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '01HZY7J9ZV6K2T3M6P4FJ3F2QG'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'negative'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text_feedback:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'The results were not relevant to my search.'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` identity:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessionId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'session-123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'customer-456'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`product-specific-feedback`,children:`Product-specific feedback`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.uselayers.com/api/storefront/v1/search/feedback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Storefront-Access-Token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-token-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '01HZY7J9ZV6K2T3M6P4FJ3F2QG'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` product_feedback:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` product_id:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 123`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'positive'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` product_id:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 456`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'negative'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` feedback:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Not what I was looking for'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use this endpoint in conjunction with the `,_jsx(_components.a,{href:`/api-reference/search-prepare`,children:`Prepare Search`}),` and `,_jsx(_components.a,{href:`/api-reference/search`,children:`Search`}),` endpoints to create a complete search experience with feedback collection`]}),`\n`,_jsx(_components.li,{children:`Analyze collected feedback to improve search relevance and user experience`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"api":"POST /search/feedback","title":"Text Search: Submit Feedback","sidebarTitle":"Submit Feedback","description":"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.","href":"/api-reference/search-feedback"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint allows you to capture user feedback on search results, including overall ratings, text feedback, and product-specific feedback. When feedback is submitted, the endpoint retrieves the cached search data (if still available) and stores the original search query, expanded queries, and intent modifier actions alongside the feedback for analysis.`}),`\n`,_jsx(Heading,{level:`2`,id:`authorization`,children:`Authorization`}),`\n`,_jsx(ParamField,{header:`X-Storefront-Access-Token`,type:`string`,required:true,id:`param-x-storefront-access-token`,children:_jsxs(_components.p,{children:[`Token-based authentication header in the form of `,_jsx(_components.code,{children:`\u003cYOUR_LAYERS_TOKEN>`}),`. Same requirements as the Search API.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Content-Type`,type:`string`,default:`application/json`,required:true,id:`param-content-type`}),`\n`,_jsx(ParamField,{header:`Accept`,type:`string`,default:`application/json`,required:true,id:`param-accept`}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(ParamField,{body:`search_id`,type:`string`,required:true,id:`param-search-id`,children:_jsxs(_components.p,{children:[`ULID identifier of the search to provide feedback on. This should be the `,_jsx(_components.code,{children:`search_id`}),` returned from the `,_jsx(_components.a,{href:`/api-reference/search-prepare`,children:`Prepare Search`}),` endpoint.`]})}),`\n`,_jsxs(ParamField,{body:`rating`,type:`string`,id:`param-rating`,children:[_jsx(_components.p,{children:`Overall rating for the search results. Must be one of:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"positive\"`}),` - Thumbs up, results were helpful`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`\"negative\"`}),` - Thumbs down, results were not helpful`]}),`\n`]})]}),`\n`,_jsx(ParamField,{body:`text_feedback`,type:`string`,id:`param-text-feedback`,children:_jsx(_components.p,{children:`Free-form text feedback from the shopper. Maximum 2000 characters.`})}),`\n`,_jsxs(ParamField,{body:`product_feedback`,type:`array`,id:`param-product-feedback`,children:[_jsx(_components.p,{children:`Array of product-specific feedback objects. Each object contains:`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ParamField,{body:`product_id`,type:`integer`,required:true,id:`param-product-id`,children:_jsx(_components.p,{children:`The product ID to provide feedback on.`})}),_jsx(ParamField,{body:`rating`,type:`string`,id:`param-rating-1`,children:_jsxs(_components.p,{children:[`Rating for this specific product. Must be `,_jsx(_components.code,{children:`\"positive\"`}),` or `,_jsx(_components.code,{children:`\"negative\"`}),`.`]})}),_jsx(ParamField,{body:`feedback`,type:`string`,id:`param-feedback`,children:_jsx(_components.p,{children:`Optional text feedback for this product. Maximum 500 characters.`})})]})]}),`\n`,_jsxs(ParamField,{body:`identity`,type:`object`,id:`param-identity`,children:[_jsx(_components.p,{children:`User identity information for tracking and personalization. Automatically managed by the Storefront Pixel; required for headless integrations.`}),_jsxs(Expandable,{title:`Properties`,children:[_jsx(ParamField,{body:`deviceId`,type:`string`,id:`param-device-id`,children:_jsx(_components.p,{children:`Persistent browser identifier that remains constant across sessions. Used to recognize returning visitors for long-term personalization. Automatically generated and managed by the Storefront Pixel.`})}),_jsx(ParamField,{body:`sessionId`,type:`string`,id:`param-session-id`,children:_jsx(_components.p,{children:`Temporary session identifier. Layers-generated sessions expire after 30 minutes without activity. The Storefront Pixel refreshes the rolling window at page load and on every route change, including pages without tracked events. When a legacy Shopify or fallback cookie is available, Layers prefers it and does not control its lifetime. Without consent, the pixel uses a sessionStorage or in-memory fallback and does not write an analytics cookie.`})}),_jsx(ParamField,{body:`customerId`,type:`string`,id:`param-customer-id`,children:_jsx(_components.p,{children:`Shopify customer ID for authenticated users. Only present when the customer is signed in to their account.`})}),_jsxs(ParamField,{body:`companyLocationId`,type:`string`,id:`param-company-location-id`,children:[_jsxs(_components.p,{children:[`Shopify B2B company location GID (e.g. `,_jsx(_components.code,{children:`gid://shopify/CompanyLocation/123456789`}),`) for the authenticated buyer. Layers resolves the catalog assigned to the company location and uses it to scope results: only products in the catalog are returned, prices come from the catalog’s price list, and excluded collections return 404. Omit for retail (DTC) traffic.`]}),_jsxs(_components.p,{children:[`When you pass `,_jsx(_components.code,{children:`companyLocationId`}),`, you must also pass the buyer’s `,_jsx(_components.code,{children:`customerId`}),`. Layers verifies with Shopify that the customer belongs to the company that owns the location before resolving the catalog; unauthorized or unauthenticated requests return a `,_jsx(_components.code,{children:`403`}),`. See `,_jsx(_components.a,{href:`/shopify-integration/b2b-catalogs`,children:`B2B catalogs`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`validation-rules`,children:`Validation rules`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`search_id`}),` is required and must be a valid ULID`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`rating`}),` must be either `,_jsx(_components.code,{children:`\"positive\"`}),` or `,_jsx(_components.code,{children:`\"negative\"`}),` if provided`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`text_feedback`}),` has a maximum length of 2000 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`product_feedback`}),` is an array where each item must include:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`product_id`}),` (required when `,_jsx(_components.code,{children:`product_feedback`}),` is provided)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`rating`}),` must be `,_jsx(_components.code,{children:`\"positive\"`}),` or `,_jsx(_components.code,{children:`\"negative\"`}),` if provided`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`feedback`}),` has a maximum length of 500 characters`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`At least one of `,_jsx(_components.code,{children:`rating`}),`, `,_jsx(_components.code,{children:`text_feedback`}),`, or `,_jsx(_components.code,{children:`product_feedback`}),` should be provided, though all fields are technically optional`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`behavior`,children:`Behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Returns HTTP 201 (Created) when feedback is successfully recorded`}),`\n`,_jsxs(_components.li,{children:[`Attempts to retrieve cached search data using the provided `,_jsx(_components.code,{children:`search_id`})]}),`\n`,_jsxs(_components.li,{children:[`If cached data is available (within 15 minutes of the original search), captures:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Original search query`}),`\n`,_jsx(_components.li,{children:`Expanded queries used for search`}),`\n`,_jsx(_components.li,{children:`Intent modifier actions applied`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`If cached data is not available (expired or invalid `,_jsx(_components.code,{children:`search_id`}),`), feedback is still recorded but without the search context`]}),`\n`,_jsxs(_components.li,{children:[`Stores identity information (`,_jsx(_components.code,{children:`sessionId`}),` and `,_jsx(_components.code,{children:`customerId`}),`) if provided`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(Heading,{level:`3`,id:`201-created`,children:`201 Created`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsx(_components.p,{children:`ULID identifier for the created feedback record.`})}),`\n`,_jsx(ResponseField,{name:`search_id`,type:`string`,id:`param-search-id-1`,children:_jsx(_components.p,{children:`The search ID that was provided in the request.`})}),`\n`,_jsx(ResponseField,{name:`recorded`,type:`boolean`,id:`param-recorded`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`true`}),` when feedback is successfully recorded.`]})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01HZY7K2M8N9P4Q5R6S7T8U9V0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"search_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01HZY7J9ZV6K2T3M6P4FJ3F2QG\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"recorded\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`error-conditions`,children:`Error conditions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`401 Unauthorized: Missing or invalid `,_jsx(_components.code,{children:`X-Storefront-Access-Token`})]}),`\n`,_jsx(_components.li,{children:`402 Payment Required: The store is suspended. Every storefront API request returns this status until the suspension is lifted`}),`\n`,_jsx(_components.li,{children:`422 Unprocessable Entity: Invalid body or validation errors`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`example-usage`,children:`Example usage`}),`\n`,_jsx(Heading,{level:`3`,id:`basic-rating-feedback`,children:`Basic rating feedback`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.uselayers.com/api/storefront/v1/search/feedback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Storefront-Access-Token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-token-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '01HZY7J9ZV6K2T3M6P4FJ3F2QG'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'positive'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// { id: \"01HZY7K2M8N9P4Q5R6S7T8U9V0\", search_id: \"01HZY7J9ZV6K2T3M6P4FJ3F2QG\", recorded: true }`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`feedback-with-text-and-identity`,children:`Feedback with text and identity`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.uselayers.com/api/storefront/v1/search/feedback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Storefront-Access-Token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-token-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '01HZY7J9ZV6K2T3M6P4FJ3F2QG'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'negative'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text_feedback:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'The results were not relevant to my search.'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` identity:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessionId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'session-123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'customer-456'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`product-specific-feedback`,children:`Product-specific feedback`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://app.uselayers.com/api/storefront/v1/search/feedback'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-Storefront-Access-Token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'your-token-here'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` search_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '01HZY7J9ZV6K2T3M6P4FJ3F2QG'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` product_feedback:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` product_id:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 123`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'positive'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` product_id:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 456`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rating:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'negative'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` feedback:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Not what I was looking for'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Use this endpoint in conjunction with the `,_jsx(_components.a,{href:`/api-reference/search-prepare`,children:`Prepare Search`}),` and `,_jsx(_components.a,{href:`/api-reference/search`,children:`Search`}),` endpoints to create a complete search experience with feedback collection`]}),`\n`,_jsx(_components.li,{children:`Analyze collected feedback to improve search relevance and user experience`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"api":"POST /search/feedback","title":"Text Search: Submit Feedback","sidebarTitle":"Submit Feedback","description":"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.","href":"/api-reference/search-feedback"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authorization","slug":"authorization","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Validation rules","slug":"validation-rules","depth":2,"children":[]},{"title":"Behavior","slug":"behavior","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"201 Created","slug":"201-created","depth":3,"children":[]},{"title":"Error conditions","slug":"error-conditions","depth":3,"children":[]}]},{"title":"Example usage","slug":"example-usage","depth":2,"children":[{"title":"Basic rating feedback","slug":"basic-rating-feedback","depth":3,"children":[]},{"title":"Feedback with text and identity","slug":"feedback-with-text-and-identity","depth":3,"children":[]},{"title":"Product-specific feedback","slug":"product-specific-feedback","depth":3,"children":[]}]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"5\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"01HZY7K2M8N9P4Q5R6S7T8U9V0\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"search_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"01HZY7J9ZV6K2T3M6P4FJ3F2QG\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"recorded\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Text Search: Submit Feedback","path":"/search/feedback","servers":[{"url":"https://app.uselayers.com/api/storefront/v1"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"X-Storefront-Access-Token":{"schema":[{"type":"string","description":"Token-based authentication header in the form of `\u003cYOUR_LAYERS_TOKEN>` . Same requirements as the Search API.","required":true}]},"Content-Type":{"schema":[{"type":"string","required":true}]},"Accept":{"schema":[{"type":"string","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"search_id":[{"type":"string","description":"ULID identifier of the search to provide feedback on. This should be the `search_id` returned from the Prepare Search endpoint.","required":true}],"rating":[{"type":"string","description":"Overall rating for the search results. Must be one of: `\"positive\"` - Thumbs up, results were helpful `\"negative\"` - Thumbs down, results were not helpful"}],"text_feedback":[{"type":"string","description":"Free-form text feedback from the shopper. Maximum 2000 characters."}],"product_feedback":[{"type":"array","items":[{"type":"object","properties":{"product_id":[{"type":"integer","description":"The product ID to provide feedback on.","required":true}],"rating":[{"type":"string","description":"Rating for this specific product. Must be `\"positive\"` or `\"negative\"` ."}],"feedback":[{"type":"string","description":"Optional text feedback for this product. Maximum 500 characters."}]}}],"description":"Array of product-specific feedback objects. Each object contains:"}],"identity":[{"type":"object","properties":{"deviceId":[{"type":"string","description":"Persistent browser identifier that remains constant across sessions. Used to recognize returning visitors for long-term personalization. Automatically generated and managed by the Storefront Pixel."}],"sessionId":[{"type":"string","description":"Temporary session identifier. Layers-generated sessions expire after 30 minutes without activity. The Storefront Pixel refreshes the rolling window at page load and on every route change, including pages without tracked events. When a legacy Shopify or fallback cookie is available, Layers prefers it and does not control its lifetime. Without consent, the pixel uses a sessionStorage or in-memory fallback and does not write an analytics cookie."}],"customerId":[{"type":"string","description":"Shopify customer ID for authenticated users. Only present when the customer is signed in to their account."}],"companyLocationId":[{"type":"string","description":"Shopify B2B company location GID (e.g. `gid://shopify/CompanyLocation/123456789` ) for the authenticated buyer. Layers resolves the catalog assigned to the company location and uses it to scope results: only products in the catalog are returned, prices come from the catalog’s price list, and excluded collections return 404. Omit for retail (DTC) traffic. When you pass `companyLocationId` , you must also pass the buyer’s `customerId` . Layers verifies with Shopify that the customer belongs to the company that owns the location before resolving the catalog; unauthorized or unauthenticated requests return a `403` . See B2B catalogs ."}]},"description":"User identity information for tracking and personalization. Automatically managed by the Storefront Pixel; required for headless integrations."}]}}],"examples":{"example":{"value":{"search_id":"\u003cstring>","rating":"\u003cstring>","text_feedback":"\u003cstring>","product_feedback":[{"product_id":123,"rating":"\u003cstring>","feedback":"\u003cstring>"}],"identity":{"deviceId":"\u003cstring>","sessionId":"\u003cstring>","customerId":"\u003cstring>","companyLocationId":"\u003cstring>"}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"ULID identifier for the created feedback record."}],"search_id":[{"type":"string","description":"The search ID that was provided in the request."}],"recorded":[{"type":"boolean","description":"Always `true` when feedback is successfully recorded."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","search_id":"\u003cstring>","recorded":true}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/protoninc/d2da920448b9ce07/track.js"],"subdomain":"protoninc","siteName":"Layers","title":"Text Search: Submit Feedback - Layers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-17T15:08:04.452Z","originalFileLocation":"api-reference/search-feedback.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Layers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Text Search: Submit Feedback - Layers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Layers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.uselayers.com/api-reference/search-feedback\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://protoninc.mintlify.site/_mintlify/api/og/v2?division=Text+Search\u0026amp;title=Text+Search%3A+Submit+Feedback\u0026amp;description=Search+Feedback+API+endpoint+to+submit+qualitative+shopper+feedback+%28thumbs+up%2Fdown%2C+free-form+text%2C+and+per-product+ratings%29+for+a+specific+search.\u0026amp;theme=a10a6113a77cea89cec87611\u0026amp;signature=510ead8858e5f0b0ed9153648a4d91b49ef0d1511e1e7223626d808f458cbc8b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Text Search: Submit Feedback - Layers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://protoninc.mintlify.site/_mintlify/api/og/v2?division=Text+Search\u0026amp;title=Text+Search%3A+Submit+Feedback\u0026amp;description=Search+Feedback+API+endpoint+to+submit+qualitative+shopper+feedback+%28thumbs+up%2Fdown%2C+free-form+text%2C+and+per-product+ratings%29+for+a+specific+search.\u0026amp;theme=a10a6113a77cea89cec87611\u0026amp;signature=510ead8858e5f0b0ed9153648a4d91b49ef0d1511e1e7223626d808f458cbc8b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/protoninc/-Zid9_7urMZu-aPC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Layers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#607FFD\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.uselayers.com/api-reference/search-feedback\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/search-feedback.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.uselayers.com/#organization\",\"name\":\"Layers\",\"url\":\"https://docs.uselayers.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/protoninc/PNs-gxGUVcdBDEEC/logo.svg?fit=max\u0026auto=format\u0026n=PNs-gxGUVcdBDEEC\u0026q=85\u0026s=989e3194cb32f07e7018b8b7186b9007\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.uselayers.com#website\",\"name\":\"Layers\",\"url\":\"https://docs.uselayers.com\",\"publisher\":{\"@id\":\"https://docs.uselayers.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.uselayers.com/api-reference/search-feedback#webpage\",\"url\":\"https://docs.uselayers.com/api-reference/search-feedback\",\"name\":\"Text Search: Submit Feedback\",\"description\":\"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.\",\"dateModified\":\"2026-10-17T15:08:04.452Z\",\"isPartOf\":{\"@id\":\"https://docs.uselayers.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.uselayers.com/api-reference/search-feedback#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.uselayers.com/api-reference/search-feedback#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Product Search\",\"item\":\"https://docs.uselayers.com/api-reference/search-prepare\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Text Search\",\"item\":\"https://docs.uselayers.com/api-reference/search-prepare\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Text Search: Submit Feedback\",\"item\":\"https://docs.uselayers.com/api-reference/search-feedback\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.uselayers.com/api-reference/search-feedback#apireference\",\"headline\":\"Text Search: Submit Feedback\",\"name\":\"Text Search: Submit Feedback\",\"description\":\"Search Feedback API endpoint to submit qualitative shopper feedback (thumbs up/down, free-form text, and per-product ratings) for a specific search.\",\"url\":\"https://docs.uselayers.com/api-reference/search-feedback\",\"mainEntityOfPage\":{\"@id\":\"https://docs.uselayers.com/api-reference/search-feedback#webpage\"},\"dateModified\":\"2026-10-17T15:08:04.452Z\",\"publisher\":{\"@id\":\"https://docs.uselayers.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.uselayers.com#website\"}}]}\u003c/script>","siteName":"Layers","nav":{"global":null,"anchors":[{"anchor":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"anchor":"Help Center","icon":"map","pages":[{"title":"Help Center","href":"/help/onboarding/install"}]},{"anchor":"Developers","icon":"code","pages":[{"title":"Developers","href":"/developers/overview"}]},{"anchor":"API Reference","icon":"rectangle-terminal","tabs":[{"tab":"Storefront API","groups":[{"group":"Browse","pages":[{"api":"POST /browse/{collection_handle}","title":"Browse API: Browse Collection Page","sidebarTitle":"Collection Page","href":"/api-reference/browse"}]},{"group":"Product Search","pages":[{"group":"Text Search","pages":[{"api":"POST /search/{searchQuery}/prepare","title":"Text Search: Prepare Search","sidebarTitle":"Prepare Search","href":"/api-reference/search-prepare"},{"api":"POST /search/{searchQuery}/execute","title":"Text Search: Execute Search","sidebarTitle":"Execute Search","description":"Text Search API endpoint to run semantic product searches with typo tolerance, query understanding, faceting, and personalization across your catalog.","href":"/api-reference/search"},{"api":"POST /search/feedback","title":"Text Search: Submit Feedback","sidebarTitle":"Submit Feedback","href":"/api-reference/search-feedback"}]},{"group":"Image Search","pages":[{"api":"POST /images/upload","title":"Image Search: Upload Image","sidebarTitle":"Upload Image","description":"Image Upload API endpoint that accepts a binary image and returns an image ID you can pass into the Image Search endpoint for visual product lookup.","href":"/api-reference/upload-image"},{"api":"POST /search/image","title":"Image Search: Execute Search","sidebarTitle":"Execute Search","href":"/api-reference/search-image"}]},{"group":"Autocomplete","pages":[{"api":"GET /search/complete?query={query}","title":"Autocomplete: Get Suggestions","sidebarTitle":"Get Suggestions","href":"/api-reference/predict"}]},{"api":"POST /search/product/{searchProductId}","title":"Search API: Similar Products","sidebarTitle":"Similar Products","href":"/api-reference/similar-products"}]},{"group":"Content Search","pages":[{"api":"POST /search/content/{searchQuery}/execute","title":"Content Search: Execute Search","sidebarTitle":"Execute Search","href":"/api-reference/search-content"}]},{"group":"Blocks","pages":[{"api":"POST /blocks/{blockId}/products","title":"Blocks API: Get Block Products","sidebarTitle":"Block Products","href":"/api-reference/blocks"}]},{"group":"Facets","pages":[{"api":"POST /{collection_handle}/facets","title":"Facets API: Get Collection Facets","sidebarTitle":"Collection Facets","href":"/api-reference/facets"}]},{"group":"Utilities","pages":[{"api":"GET /sort-orders","title":"Sort Orders API: Get Available Sort Orders","sidebarTitle":"Sort Orders","href":"/api-reference/sort-orders"}]}]},{"tab":"Tracking API","pages":[{"title":"Tracking API","href":"/tracking-api/overview"}]}]},{"anchor":"Integrations","icon":"plug","href":"https://www.uselayers.com/integrations?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs-to-site"}]},"basePath":"","title":"Text Search: Submit Feedback - Layers","buildId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","deploymentId":"dpl_8LJbrAiZvr1K98WQNZXCyY5AvT34","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-i2a3QZ8E.js","utils-ChLwp8m0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DRktVTDc.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CA2pEs4T.js","snippetPresets-ClQ6XrKD.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ct_Lv36y.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Cn2PYw9e.js","shallow-rkyymjXQ.js","getApiPlaygroundDisplay-BB9vkXtE.js","CodeSnippet-Bm5RU7m1.js","CodeSnippets-BgU9Deuz.js","Page-BUDYNlhG.js","getPastedJson-BD-6NNum.js","icon-8Z6tud2e.js","MethodPill-Tuzr4g3V.js","DuplicateIcon-0ceWFYhN.js","createIcon-FBXow_ST.js","DynamicMarkdown-CD8713Yy.js","SectionHeading-7zgzQbH-.js","axios-vUo_bRtp.js"]}