curl --request PATCH \
--url https://api.mixpeek.com/v1/retrievers/{retriever_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"retriever_name": "product_search_v2",
"description": "Enhanced version with better caching",
"marketplace_listing_id": "<string>",
"requires_subscription": true,
"tags": [
"production",
"v2"
],
"metadata": {
"seed_config_version": 2
},
"display_config": {
"components": {
"result_card": {
"card_click_action": "viewDetails",
"field_order": [
"title",
"description",
"price"
],
"layout": "vertical",
"show_find_similar": true,
"show_thumbnail": true
},
"result_layout": "grid",
"show_hero": true,
"show_results_header": true,
"show_search": true
},
"custom_cta": {
"label": "Search Tips",
"markdown_content": "# Search Tips\n\n- Use quotes for exact phrases\n- Try descriptive terms"
},
"description": "Search through our product catalog",
"exposed_fields": [
"title",
"description",
"price",
"image_url"
],
"external_links": [
{
"name": "GitHub Repository",
"url": "https://github.com/mixpeek/product-search"
},
{
"name": "Blog Post",
"url": "https://blog.mixpeek.com/building-product-search"
}
],
"field_config": {
"price": {
"format": "number",
"format_options": {
"decimals": 2,
"label": "Price",
"prefix": "$"
}
},
"title": {
"format": "text",
"format_options": {
"label": "Product Name",
"truncate_chars": 60
}
}
},
"field_mappings": {
"thumbnail": "image_url",
"title": "title"
},
"inputs": [
{
"field_name": "query",
"field_schema": {
"description": "Search query",
"examples": [
"wireless headphones",
"laptop"
],
"type": "string"
},
"input_type": "text",
"label": "Search Products",
"order": 0,
"placeholder": "What are you looking for?",
"required": true
}
],
"layout": {
"columns": 3,
"gap": "16px",
"mode": "grid"
},
"logo_url": "https://example.com/logo.png",
"markdowns": [
{
"content": "# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters",
"title": "How it Works"
},
{
"content": "## Tips for Better Results\n\n1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")\n2. Try different keywords if you don't find what you're looking for\n3. Use filters to narrow down results\n\n*Happy searching!*",
"title": "Search Guide"
}
],
"template_type": "media-search",
"theme": {
"border_radius": "12px",
"card_style": "elevated",
"font_family": "Inter, sans-serif",
"primary_color": "#007AFF"
},
"title": "Product Search"
},
"collection_identifiers": [
"col_abc123",
"col_def456"
],
"stages": [
{
"stage_name": "<string>",
"config": {},
"batch_size": "<string>",
"description": "<string>",
"on_error": "<string>",
"output_alias": "<string>"
}
]
}
EOFimport requests
url = "https://api.mixpeek.com/v1/retrievers/{retriever_id}"
payload = {
"retriever_name": "product_search_v2",
"description": "Enhanced version with better caching",
"marketplace_listing_id": "<string>",
"requires_subscription": True,
"tags": ["production", "v2"],
"metadata": { "seed_config_version": 2 },
"display_config": {
"components": {
"result_card": {
"card_click_action": "viewDetails",
"field_order": ["title", "description", "price"],
"layout": "vertical",
"show_find_similar": True,
"show_thumbnail": True
},
"result_layout": "grid",
"show_hero": True,
"show_results_header": True,
"show_search": True
},
"custom_cta": {
"label": "Search Tips",
"markdown_content": "# Search Tips
- Use quotes for exact phrases
- Try descriptive terms"
},
"description": "Search through our product catalog",
"exposed_fields": ["title", "description", "price", "image_url"],
"external_links": [
{
"name": "GitHub Repository",
"url": "https://github.com/mixpeek/product-search"
},
{
"name": "Blog Post",
"url": "https://blog.mixpeek.com/building-product-search"
}
],
"field_config": {
"price": {
"format": "number",
"format_options": {
"decimals": 2,
"label": "Price",
"prefix": "$"
}
},
"title": {
"format": "text",
"format_options": {
"label": "Product Name",
"truncate_chars": 60
}
}
},
"field_mappings": {
"thumbnail": "image_url",
"title": "title"
},
"inputs": [
{
"field_name": "query",
"field_schema": {
"description": "Search query",
"examples": ["wireless headphones", "laptop"],
"type": "string"
},
"input_type": "text",
"label": "Search Products",
"order": 0,
"placeholder": "What are you looking for?",
"required": True
}
],
"layout": {
"columns": 3,
"gap": "16px",
"mode": "grid"
},
"logo_url": "https://example.com/logo.png",
"markdowns": [
{
"content": "# AI-Powered Product Search
Our search uses **machine learning** to understand your queries and find the most relevant products.
## Features
- **Semantic Search**: Understands meaning, not just keywords
- **Visual Search**: Upload images to find similar products
- **Smart Filters**: Automatically suggests relevant filters",
"title": "How it Works"
},
{
"content": "## Tips for Better Results
1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")
2. Try different keywords if you don't find what you're looking for
3. Use filters to narrow down results
*Happy searching!*",
"title": "Search Guide"
}
],
"template_type": "media-search",
"theme": {
"border_radius": "12px",
"card_style": "elevated",
"font_family": "Inter, sans-serif",
"primary_color": "#007AFF"
},
"title": "Product Search"
},
"collection_identifiers": ["col_abc123", "col_def456"],
"stages": [
{
"stage_name": "<string>",
"config": {},
"batch_size": "<string>",
"description": "<string>",
"on_error": "<string>",
"output_alias": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
retriever_name: 'product_search_v2',
description: 'Enhanced version with better caching',
marketplace_listing_id: '<string>',
requires_subscription: true,
tags: ['production', 'v2'],
metadata: {seed_config_version: 2},
display_config: {
components: {
result_card: {
card_click_action: 'viewDetails',
field_order: ['title', 'description', 'price'],
layout: 'vertical',
show_find_similar: true,
show_thumbnail: true
},
result_layout: 'grid',
show_hero: true,
show_results_header: true,
show_search: true
},
custom_cta: {
label: 'Search Tips',
markdown_content: '# Search Tips\n\n- Use quotes for exact phrases\n- Try descriptive terms'
},
description: 'Search through our product catalog',
exposed_fields: ['title', 'description', 'price', 'image_url'],
external_links: [
{name: 'GitHub Repository', url: 'https://github.com/mixpeek/product-search'},
{name: 'Blog Post', url: 'https://blog.mixpeek.com/building-product-search'}
],
field_config: {
price: {format: 'number', format_options: {decimals: 2, label: 'Price', prefix: '$'}},
title: {format: 'text', format_options: {label: 'Product Name', truncate_chars: 60}}
},
field_mappings: {thumbnail: 'image_url', title: 'title'},
inputs: [
{
field_name: 'query',
field_schema: {
description: 'Search query',
examples: ['wireless headphones', 'laptop'],
type: 'string'
},
input_type: 'text',
label: 'Search Products',
order: 0,
placeholder: 'What are you looking for?',
required: true
}
],
layout: {columns: 3, gap: '16px', mode: 'grid'},
logo_url: 'https://example.com/logo.png',
markdowns: [
{
content: '# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters',
title: 'How it Works'
},
{
content: '## Tips for Better Results\n\n1. Use descriptive terms (e.g., "wireless noise-canceling headphones")\n2. Try different keywords if you don\'t find what you\'re looking for\n3. Use filters to narrow down results\n\n*Happy searching!*',
title: 'Search Guide'
}
],
template_type: 'media-search',
theme: {
border_radius: '12px',
card_style: 'elevated',
font_family: 'Inter, sans-serif',
primary_color: '#007AFF'
},
title: 'Product Search'
},
collection_identifiers: ['col_abc123', 'col_def456'],
stages: [
{
stage_name: '<string>',
config: {},
batch_size: '<string>',
description: '<string>',
on_error: '<string>',
output_alias: '<string>'
}
]
})
};
fetch('https://api.mixpeek.com/v1/retrievers/{retriever_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/retrievers/{retriever_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'retriever_name' => 'product_search_v2',
'description' => 'Enhanced version with better caching',
'marketplace_listing_id' => '<string>',
'requires_subscription' => true,
'tags' => [
'production',
'v2'
],
'metadata' => [
'seed_config_version' => 2
],
'display_config' => [
'components' => [
'result_card' => [
'card_click_action' => 'viewDetails',
'field_order' => [
'title',
'description',
'price'
],
'layout' => 'vertical',
'show_find_similar' => true,
'show_thumbnail' => true
],
'result_layout' => 'grid',
'show_hero' => true,
'show_results_header' => true,
'show_search' => true
],
'custom_cta' => [
'label' => 'Search Tips',
'markdown_content' => '# Search Tips
- Use quotes for exact phrases
- Try descriptive terms'
],
'description' => 'Search through our product catalog',
'exposed_fields' => [
'title',
'description',
'price',
'image_url'
],
'external_links' => [
[
'name' => 'GitHub Repository',
'url' => 'https://github.com/mixpeek/product-search'
],
[
'name' => 'Blog Post',
'url' => 'https://blog.mixpeek.com/building-product-search'
]
],
'field_config' => [
'price' => [
'format' => 'number',
'format_options' => [
'decimals' => 2,
'label' => 'Price',
'prefix' => '$'
]
],
'title' => [
'format' => 'text',
'format_options' => [
'label' => 'Product Name',
'truncate_chars' => 60
]
]
],
'field_mappings' => [
'thumbnail' => 'image_url',
'title' => 'title'
],
'inputs' => [
[
'field_name' => 'query',
'field_schema' => [
'description' => 'Search query',
'examples' => [
'wireless headphones',
'laptop'
],
'type' => 'string'
],
'input_type' => 'text',
'label' => 'Search Products',
'order' => 0,
'placeholder' => 'What are you looking for?',
'required' => true
]
],
'layout' => [
'columns' => 3,
'gap' => '16px',
'mode' => 'grid'
],
'logo_url' => 'https://example.com/logo.png',
'markdowns' => [
[
'content' => '# AI-Powered Product Search
Our search uses **machine learning** to understand your queries and find the most relevant products.
## Features
- **Semantic Search**: Understands meaning, not just keywords
- **Visual Search**: Upload images to find similar products
- **Smart Filters**: Automatically suggests relevant filters',
'title' => 'How it Works'
],
[
'content' => '## Tips for Better Results
1. Use descriptive terms (e.g., "wireless noise-canceling headphones")
2. Try different keywords if you don\'t find what you\'re looking for
3. Use filters to narrow down results
*Happy searching!*',
'title' => 'Search Guide'
]
],
'template_type' => 'media-search',
'theme' => [
'border_radius' => '12px',
'card_style' => 'elevated',
'font_family' => 'Inter, sans-serif',
'primary_color' => '#007AFF'
],
'title' => 'Product Search'
],
'collection_identifiers' => [
'col_abc123',
'col_def456'
],
'stages' => [
[
'stage_name' => '<string>',
'config' => [
],
'batch_size' => '<string>',
'description' => '<string>',
'on_error' => '<string>',
'output_alias' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/retrievers/{retriever_id}"
payload := strings.NewReader("{\n \"retriever_name\": \"product_search_v2\",\n \"description\": \"Enhanced version with better caching\",\n \"marketplace_listing_id\": \"<string>\",\n \"requires_subscription\": true,\n \"tags\": [\n \"production\",\n \"v2\"\n ],\n \"metadata\": {\n \"seed_config_version\": 2\n },\n \"display_config\": {\n \"components\": {\n \"result_card\": {\n \"card_click_action\": \"viewDetails\",\n \"field_order\": [\n \"title\",\n \"description\",\n \"price\"\n ],\n \"layout\": \"vertical\",\n \"show_find_similar\": true,\n \"show_thumbnail\": true\n },\n \"result_layout\": \"grid\",\n \"show_hero\": true,\n \"show_results_header\": true,\n \"show_search\": true\n },\n \"custom_cta\": {\n \"label\": \"Search Tips\",\n \"markdown_content\": \"# Search Tips\\n\\n- Use quotes for exact phrases\\n- Try descriptive terms\"\n },\n \"description\": \"Search through our product catalog\",\n \"exposed_fields\": [\n \"title\",\n \"description\",\n \"price\",\n \"image_url\"\n ],\n \"external_links\": [\n {\n \"name\": \"GitHub Repository\",\n \"url\": \"https://github.com/mixpeek/product-search\"\n },\n {\n \"name\": \"Blog Post\",\n \"url\": \"https://blog.mixpeek.com/building-product-search\"\n }\n ],\n \"field_config\": {\n \"price\": {\n \"format\": \"number\",\n \"format_options\": {\n \"decimals\": 2,\n \"label\": \"Price\",\n \"prefix\": \"$\"\n }\n },\n \"title\": {\n \"format\": \"text\",\n \"format_options\": {\n \"label\": \"Product Name\",\n \"truncate_chars\": 60\n }\n }\n },\n \"field_mappings\": {\n \"thumbnail\": \"image_url\",\n \"title\": \"title\"\n },\n \"inputs\": [\n {\n \"field_name\": \"query\",\n \"field_schema\": {\n \"description\": \"Search query\",\n \"examples\": [\n \"wireless headphones\",\n \"laptop\"\n ],\n \"type\": \"string\"\n },\n \"input_type\": \"text\",\n \"label\": \"Search Products\",\n \"order\": 0,\n \"placeholder\": \"What are you looking for?\",\n \"required\": true\n }\n ],\n \"layout\": {\n \"columns\": 3,\n \"gap\": \"16px\",\n \"mode\": \"grid\"\n },\n \"logo_url\": \"https://example.com/logo.png\",\n \"markdowns\": [\n {\n \"content\": \"# AI-Powered Product Search\\n\\nOur search uses **machine learning** to understand your queries and find the most relevant products.\\n\\n## Features\\n\\n- **Semantic Search**: Understands meaning, not just keywords\\n- **Visual Search**: Upload images to find similar products\\n- **Smart Filters**: Automatically suggests relevant filters\",\n \"title\": \"How it Works\"\n },\n {\n \"content\": \"## Tips for Better Results\\n\\n1. Use descriptive terms (e.g., \\\"wireless noise-canceling headphones\\\")\\n2. Try different keywords if you don't find what you're looking for\\n3. Use filters to narrow down results\\n\\n*Happy searching!*\",\n \"title\": \"Search Guide\"\n }\n ],\n \"template_type\": \"media-search\",\n \"theme\": {\n \"border_radius\": \"12px\",\n \"card_style\": \"elevated\",\n \"font_family\": \"Inter, sans-serif\",\n \"primary_color\": \"#007AFF\"\n },\n \"title\": \"Product Search\"\n },\n \"collection_identifiers\": [\n \"col_abc123\",\n \"col_def456\"\n ],\n \"stages\": [\n {\n \"stage_name\": \"<string>\",\n \"config\": {},\n \"batch_size\": \"<string>\",\n \"description\": \"<string>\",\n \"on_error\": \"<string>\",\n \"output_alias\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mixpeek.com/v1/retrievers/{retriever_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"retriever_name\": \"product_search_v2\",\n \"description\": \"Enhanced version with better caching\",\n \"marketplace_listing_id\": \"<string>\",\n \"requires_subscription\": true,\n \"tags\": [\n \"production\",\n \"v2\"\n ],\n \"metadata\": {\n \"seed_config_version\": 2\n },\n \"display_config\": {\n \"components\": {\n \"result_card\": {\n \"card_click_action\": \"viewDetails\",\n \"field_order\": [\n \"title\",\n \"description\",\n \"price\"\n ],\n \"layout\": \"vertical\",\n \"show_find_similar\": true,\n \"show_thumbnail\": true\n },\n \"result_layout\": \"grid\",\n \"show_hero\": true,\n \"show_results_header\": true,\n \"show_search\": true\n },\n \"custom_cta\": {\n \"label\": \"Search Tips\",\n \"markdown_content\": \"# Search Tips\\n\\n- Use quotes for exact phrases\\n- Try descriptive terms\"\n },\n \"description\": \"Search through our product catalog\",\n \"exposed_fields\": [\n \"title\",\n \"description\",\n \"price\",\n \"image_url\"\n ],\n \"external_links\": [\n {\n \"name\": \"GitHub Repository\",\n \"url\": \"https://github.com/mixpeek/product-search\"\n },\n {\n \"name\": \"Blog Post\",\n \"url\": \"https://blog.mixpeek.com/building-product-search\"\n }\n ],\n \"field_config\": {\n \"price\": {\n \"format\": \"number\",\n \"format_options\": {\n \"decimals\": 2,\n \"label\": \"Price\",\n \"prefix\": \"$\"\n }\n },\n \"title\": {\n \"format\": \"text\",\n \"format_options\": {\n \"label\": \"Product Name\",\n \"truncate_chars\": 60\n }\n }\n },\n \"field_mappings\": {\n \"thumbnail\": \"image_url\",\n \"title\": \"title\"\n },\n \"inputs\": [\n {\n \"field_name\": \"query\",\n \"field_schema\": {\n \"description\": \"Search query\",\n \"examples\": [\n \"wireless headphones\",\n \"laptop\"\n ],\n \"type\": \"string\"\n },\n \"input_type\": \"text\",\n \"label\": \"Search Products\",\n \"order\": 0,\n \"placeholder\": \"What are you looking for?\",\n \"required\": true\n }\n ],\n \"layout\": {\n \"columns\": 3,\n \"gap\": \"16px\",\n \"mode\": \"grid\"\n },\n \"logo_url\": \"https://example.com/logo.png\",\n \"markdowns\": [\n {\n \"content\": \"# AI-Powered Product Search\\n\\nOur search uses **machine learning** to understand your queries and find the most relevant products.\\n\\n## Features\\n\\n- **Semantic Search**: Understands meaning, not just keywords\\n- **Visual Search**: Upload images to find similar products\\n- **Smart Filters**: Automatically suggests relevant filters\",\n \"title\": \"How it Works\"\n },\n {\n \"content\": \"## Tips for Better Results\\n\\n1. Use descriptive terms (e.g., \\\"wireless noise-canceling headphones\\\")\\n2. Try different keywords if you don't find what you're looking for\\n3. Use filters to narrow down results\\n\\n*Happy searching!*\",\n \"title\": \"Search Guide\"\n }\n ],\n \"template_type\": \"media-search\",\n \"theme\": {\n \"border_radius\": \"12px\",\n \"card_style\": \"elevated\",\n \"font_family\": \"Inter, sans-serif\",\n \"primary_color\": \"#007AFF\"\n },\n \"title\": \"Product Search\"\n },\n \"collection_identifiers\": [\n \"col_abc123\",\n \"col_def456\"\n ],\n \"stages\": [\n {\n \"stage_name\": \"<string>\",\n \"config\": {},\n \"batch_size\": \"<string>\",\n \"description\": \"<string>\",\n \"on_error\": \"<string>\",\n \"output_alias\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/retrievers/{retriever_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"retriever_name\": \"product_search_v2\",\n \"description\": \"Enhanced version with better caching\",\n \"marketplace_listing_id\": \"<string>\",\n \"requires_subscription\": true,\n \"tags\": [\n \"production\",\n \"v2\"\n ],\n \"metadata\": {\n \"seed_config_version\": 2\n },\n \"display_config\": {\n \"components\": {\n \"result_card\": {\n \"card_click_action\": \"viewDetails\",\n \"field_order\": [\n \"title\",\n \"description\",\n \"price\"\n ],\n \"layout\": \"vertical\",\n \"show_find_similar\": true,\n \"show_thumbnail\": true\n },\n \"result_layout\": \"grid\",\n \"show_hero\": true,\n \"show_results_header\": true,\n \"show_search\": true\n },\n \"custom_cta\": {\n \"label\": \"Search Tips\",\n \"markdown_content\": \"# Search Tips\\n\\n- Use quotes for exact phrases\\n- Try descriptive terms\"\n },\n \"description\": \"Search through our product catalog\",\n \"exposed_fields\": [\n \"title\",\n \"description\",\n \"price\",\n \"image_url\"\n ],\n \"external_links\": [\n {\n \"name\": \"GitHub Repository\",\n \"url\": \"https://github.com/mixpeek/product-search\"\n },\n {\n \"name\": \"Blog Post\",\n \"url\": \"https://blog.mixpeek.com/building-product-search\"\n }\n ],\n \"field_config\": {\n \"price\": {\n \"format\": \"number\",\n \"format_options\": {\n \"decimals\": 2,\n \"label\": \"Price\",\n \"prefix\": \"$\"\n }\n },\n \"title\": {\n \"format\": \"text\",\n \"format_options\": {\n \"label\": \"Product Name\",\n \"truncate_chars\": 60\n }\n }\n },\n \"field_mappings\": {\n \"thumbnail\": \"image_url\",\n \"title\": \"title\"\n },\n \"inputs\": [\n {\n \"field_name\": \"query\",\n \"field_schema\": {\n \"description\": \"Search query\",\n \"examples\": [\n \"wireless headphones\",\n \"laptop\"\n ],\n \"type\": \"string\"\n },\n \"input_type\": \"text\",\n \"label\": \"Search Products\",\n \"order\": 0,\n \"placeholder\": \"What are you looking for?\",\n \"required\": true\n }\n ],\n \"layout\": {\n \"columns\": 3,\n \"gap\": \"16px\",\n \"mode\": \"grid\"\n },\n \"logo_url\": \"https://example.com/logo.png\",\n \"markdowns\": [\n {\n \"content\": \"# AI-Powered Product Search\\n\\nOur search uses **machine learning** to understand your queries and find the most relevant products.\\n\\n## Features\\n\\n- **Semantic Search**: Understands meaning, not just keywords\\n- **Visual Search**: Upload images to find similar products\\n- **Smart Filters**: Automatically suggests relevant filters\",\n \"title\": \"How it Works\"\n },\n {\n \"content\": \"## Tips for Better Results\\n\\n1. Use descriptive terms (e.g., \\\"wireless noise-canceling headphones\\\")\\n2. Try different keywords if you don't find what you're looking for\\n3. Use filters to narrow down results\\n\\n*Happy searching!*\",\n \"title\": \"Search Guide\"\n }\n ],\n \"template_type\": \"media-search\",\n \"theme\": {\n \"border_radius\": \"12px\",\n \"card_style\": \"elevated\",\n \"font_family\": \"Inter, sans-serif\",\n \"primary_color\": \"#007AFF\"\n },\n \"title\": \"Product Search\"\n },\n \"collection_identifiers\": [\n \"col_abc123\",\n \"col_def456\"\n ],\n \"stages\": [\n {\n \"stage_name\": \"<string>\",\n \"config\": {},\n \"batch_size\": \"<string>\",\n \"description\": \"<string>\",\n \"on_error\": \"<string>\",\n \"output_alias\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"retriever": {
"retriever_name": "<string>",
"stages": [
{
"stage_name": "<string>",
"config": {},
"batch_size": "<string>",
"description": "<string>",
"on_error": "<string>",
"output_alias": "<string>"
}
],
"fusion": "<string>",
"collection_identifiers": [
"<string>"
],
"retriever_id": "<string>",
"description": "<string>",
"collection_ids": [
"<string>"
],
"input_schema": {},
"budget_limits": {
"max_credits": 1,
"max_time_ms": 1
},
"feature_dependencies": [
{
"extractor": "<string>",
"version": "<string>",
"scheme": "mixpeek",
"output": "<string>"
}
],
"tags": [
"<string>"
],
"metadata": {},
"display_config": {},
"version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"updated_by": "<string>"
}
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}Patch Retriever
Update a retriever’s metadata.
Editable fields:
- name, description, tags, display_config: metadata
- collection_identifiers: re-points + re-validates stage feature URIs
- stages (BACKE-1287): edit stages in place on an UNPUBLISHED retriever (change a filter/operator/rerank without clone+repoint+delete); the full stage list is replaced + re-validated as on create. A PUBLISHED retriever’s stages stay immutable — clone or unpublish to change them.
input_schema and budget_limits remain immutable; use POST //clone.
curl --request PATCH \
--url https://api.mixpeek.com/v1/retrievers/{retriever_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"retriever_name": "product_search_v2",
"description": "Enhanced version with better caching",
"marketplace_listing_id": "<string>",
"requires_subscription": true,
"tags": [
"production",
"v2"
],
"metadata": {
"seed_config_version": 2
},
"display_config": {
"components": {
"result_card": {
"card_click_action": "viewDetails",
"field_order": [
"title",
"description",
"price"
],
"layout": "vertical",
"show_find_similar": true,
"show_thumbnail": true
},
"result_layout": "grid",
"show_hero": true,
"show_results_header": true,
"show_search": true
},
"custom_cta": {
"label": "Search Tips",
"markdown_content": "# Search Tips\n\n- Use quotes for exact phrases\n- Try descriptive terms"
},
"description": "Search through our product catalog",
"exposed_fields": [
"title",
"description",
"price",
"image_url"
],
"external_links": [
{
"name": "GitHub Repository",
"url": "https://github.com/mixpeek/product-search"
},
{
"name": "Blog Post",
"url": "https://blog.mixpeek.com/building-product-search"
}
],
"field_config": {
"price": {
"format": "number",
"format_options": {
"decimals": 2,
"label": "Price",
"prefix": "$"
}
},
"title": {
"format": "text",
"format_options": {
"label": "Product Name",
"truncate_chars": 60
}
}
},
"field_mappings": {
"thumbnail": "image_url",
"title": "title"
},
"inputs": [
{
"field_name": "query",
"field_schema": {
"description": "Search query",
"examples": [
"wireless headphones",
"laptop"
],
"type": "string"
},
"input_type": "text",
"label": "Search Products",
"order": 0,
"placeholder": "What are you looking for?",
"required": true
}
],
"layout": {
"columns": 3,
"gap": "16px",
"mode": "grid"
},
"logo_url": "https://example.com/logo.png",
"markdowns": [
{
"content": "# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters",
"title": "How it Works"
},
{
"content": "## Tips for Better Results\n\n1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")\n2. Try different keywords if you don't find what you're looking for\n3. Use filters to narrow down results\n\n*Happy searching!*",
"title": "Search Guide"
}
],
"template_type": "media-search",
"theme": {
"border_radius": "12px",
"card_style": "elevated",
"font_family": "Inter, sans-serif",
"primary_color": "#007AFF"
},
"title": "Product Search"
},
"collection_identifiers": [
"col_abc123",
"col_def456"
],
"stages": [
{
"stage_name": "<string>",
"config": {},
"batch_size": "<string>",
"description": "<string>",
"on_error": "<string>",
"output_alias": "<string>"
}
]
}
EOFimport requests
url = "https://api.mixpeek.com/v1/retrievers/{retriever_id}"
payload = {
"retriever_name": "product_search_v2",
"description": "Enhanced version with better caching",
"marketplace_listing_id": "<string>",
"requires_subscription": True,
"tags": ["production", "v2"],
"metadata": { "seed_config_version": 2 },
"display_config": {
"components": {
"result_card": {
"card_click_action": "viewDetails",
"field_order": ["title", "description", "price"],
"layout": "vertical",
"show_find_similar": True,
"show_thumbnail": True
},
"result_layout": "grid",
"show_hero": True,
"show_results_header": True,
"show_search": True
},
"custom_cta": {
"label": "Search Tips",
"markdown_content": "# Search Tips
- Use quotes for exact phrases
- Try descriptive terms"
},
"description": "Search through our product catalog",
"exposed_fields": ["title", "description", "price", "image_url"],
"external_links": [
{
"name": "GitHub Repository",
"url": "https://github.com/mixpeek/product-search"
},
{
"name": "Blog Post",
"url": "https://blog.mixpeek.com/building-product-search"
}
],
"field_config": {
"price": {
"format": "number",
"format_options": {
"decimals": 2,
"label": "Price",
"prefix": "$"
}
},
"title": {
"format": "text",
"format_options": {
"label": "Product Name",
"truncate_chars": 60
}
}
},
"field_mappings": {
"thumbnail": "image_url",
"title": "title"
},
"inputs": [
{
"field_name": "query",
"field_schema": {
"description": "Search query",
"examples": ["wireless headphones", "laptop"],
"type": "string"
},
"input_type": "text",
"label": "Search Products",
"order": 0,
"placeholder": "What are you looking for?",
"required": True
}
],
"layout": {
"columns": 3,
"gap": "16px",
"mode": "grid"
},
"logo_url": "https://example.com/logo.png",
"markdowns": [
{
"content": "# AI-Powered Product Search
Our search uses **machine learning** to understand your queries and find the most relevant products.
## Features
- **Semantic Search**: Understands meaning, not just keywords
- **Visual Search**: Upload images to find similar products
- **Smart Filters**: Automatically suggests relevant filters",
"title": "How it Works"
},
{
"content": "## Tips for Better Results
1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")
2. Try different keywords if you don't find what you're looking for
3. Use filters to narrow down results
*Happy searching!*",
"title": "Search Guide"
}
],
"template_type": "media-search",
"theme": {
"border_radius": "12px",
"card_style": "elevated",
"font_family": "Inter, sans-serif",
"primary_color": "#007AFF"
},
"title": "Product Search"
},
"collection_identifiers": ["col_abc123", "col_def456"],
"stages": [
{
"stage_name": "<string>",
"config": {},
"batch_size": "<string>",
"description": "<string>",
"on_error": "<string>",
"output_alias": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
retriever_name: 'product_search_v2',
description: 'Enhanced version with better caching',
marketplace_listing_id: '<string>',
requires_subscription: true,
tags: ['production', 'v2'],
metadata: {seed_config_version: 2},
display_config: {
components: {
result_card: {
card_click_action: 'viewDetails',
field_order: ['title', 'description', 'price'],
layout: 'vertical',
show_find_similar: true,
show_thumbnail: true
},
result_layout: 'grid',
show_hero: true,
show_results_header: true,
show_search: true
},
custom_cta: {
label: 'Search Tips',
markdown_content: '# Search Tips\n\n- Use quotes for exact phrases\n- Try descriptive terms'
},
description: 'Search through our product catalog',
exposed_fields: ['title', 'description', 'price', 'image_url'],
external_links: [
{name: 'GitHub Repository', url: 'https://github.com/mixpeek/product-search'},
{name: 'Blog Post', url: 'https://blog.mixpeek.com/building-product-search'}
],
field_config: {
price: {format: 'number', format_options: {decimals: 2, label: 'Price', prefix: '$'}},
title: {format: 'text', format_options: {label: 'Product Name', truncate_chars: 60}}
},
field_mappings: {thumbnail: 'image_url', title: 'title'},
inputs: [
{
field_name: 'query',
field_schema: {
description: 'Search query',
examples: ['wireless headphones', 'laptop'],
type: 'string'
},
input_type: 'text',
label: 'Search Products',
order: 0,
placeholder: 'What are you looking for?',
required: true
}
],
layout: {columns: 3, gap: '16px', mode: 'grid'},
logo_url: 'https://example.com/logo.png',
markdowns: [
{
content: '# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters',
title: 'How it Works'
},
{
content: '## Tips for Better Results\n\n1. Use descriptive terms (e.g., "wireless noise-canceling headphones")\n2. Try different keywords if you don\'t find what you\'re looking for\n3. Use filters to narrow down results\n\n*Happy searching!*',
title: 'Search Guide'
}
],
template_type: 'media-search',
theme: {
border_radius: '12px',
card_style: 'elevated',
font_family: 'Inter, sans-serif',
primary_color: '#007AFF'
},
title: 'Product Search'
},
collection_identifiers: ['col_abc123', 'col_def456'],
stages: [
{
stage_name: '<string>',
config: {},
batch_size: '<string>',
description: '<string>',
on_error: '<string>',
output_alias: '<string>'
}
]
})
};
fetch('https://api.mixpeek.com/v1/retrievers/{retriever_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/retrievers/{retriever_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'retriever_name' => 'product_search_v2',
'description' => 'Enhanced version with better caching',
'marketplace_listing_id' => '<string>',
'requires_subscription' => true,
'tags' => [
'production',
'v2'
],
'metadata' => [
'seed_config_version' => 2
],
'display_config' => [
'components' => [
'result_card' => [
'card_click_action' => 'viewDetails',
'field_order' => [
'title',
'description',
'price'
],
'layout' => 'vertical',
'show_find_similar' => true,
'show_thumbnail' => true
],
'result_layout' => 'grid',
'show_hero' => true,
'show_results_header' => true,
'show_search' => true
],
'custom_cta' => [
'label' => 'Search Tips',
'markdown_content' => '# Search Tips
- Use quotes for exact phrases
- Try descriptive terms'
],
'description' => 'Search through our product catalog',
'exposed_fields' => [
'title',
'description',
'price',
'image_url'
],
'external_links' => [
[
'name' => 'GitHub Repository',
'url' => 'https://github.com/mixpeek/product-search'
],
[
'name' => 'Blog Post',
'url' => 'https://blog.mixpeek.com/building-product-search'
]
],
'field_config' => [
'price' => [
'format' => 'number',
'format_options' => [
'decimals' => 2,
'label' => 'Price',
'prefix' => '$'
]
],
'title' => [
'format' => 'text',
'format_options' => [
'label' => 'Product Name',
'truncate_chars' => 60
]
]
],
'field_mappings' => [
'thumbnail' => 'image_url',
'title' => 'title'
],
'inputs' => [
[
'field_name' => 'query',
'field_schema' => [
'description' => 'Search query',
'examples' => [
'wireless headphones',
'laptop'
],
'type' => 'string'
],
'input_type' => 'text',
'label' => 'Search Products',
'order' => 0,
'placeholder' => 'What are you looking for?',
'required' => true
]
],
'layout' => [
'columns' => 3,
'gap' => '16px',
'mode' => 'grid'
],
'logo_url' => 'https://example.com/logo.png',
'markdowns' => [
[
'content' => '# AI-Powered Product Search
Our search uses **machine learning** to understand your queries and find the most relevant products.
## Features
- **Semantic Search**: Understands meaning, not just keywords
- **Visual Search**: Upload images to find similar products
- **Smart Filters**: Automatically suggests relevant filters',
'title' => 'How it Works'
],
[
'content' => '## Tips for Better Results
1. Use descriptive terms (e.g., "wireless noise-canceling headphones")
2. Try different keywords if you don\'t find what you\'re looking for
3. Use filters to narrow down results
*Happy searching!*',
'title' => 'Search Guide'
]
],
'template_type' => 'media-search',
'theme' => [
'border_radius' => '12px',
'card_style' => 'elevated',
'font_family' => 'Inter, sans-serif',
'primary_color' => '#007AFF'
],
'title' => 'Product Search'
],
'collection_identifiers' => [
'col_abc123',
'col_def456'
],
'stages' => [
[
'stage_name' => '<string>',
'config' => [
],
'batch_size' => '<string>',
'description' => '<string>',
'on_error' => '<string>',
'output_alias' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/retrievers/{retriever_id}"
payload := strings.NewReader("{\n \"retriever_name\": \"product_search_v2\",\n \"description\": \"Enhanced version with better caching\",\n \"marketplace_listing_id\": \"<string>\",\n \"requires_subscription\": true,\n \"tags\": [\n \"production\",\n \"v2\"\n ],\n \"metadata\": {\n \"seed_config_version\": 2\n },\n \"display_config\": {\n \"components\": {\n \"result_card\": {\n \"card_click_action\": \"viewDetails\",\n \"field_order\": [\n \"title\",\n \"description\",\n \"price\"\n ],\n \"layout\": \"vertical\",\n \"show_find_similar\": true,\n \"show_thumbnail\": true\n },\n \"result_layout\": \"grid\",\n \"show_hero\": true,\n \"show_results_header\": true,\n \"show_search\": true\n },\n \"custom_cta\": {\n \"label\": \"Search Tips\",\n \"markdown_content\": \"# Search Tips\\n\\n- Use quotes for exact phrases\\n- Try descriptive terms\"\n },\n \"description\": \"Search through our product catalog\",\n \"exposed_fields\": [\n \"title\",\n \"description\",\n \"price\",\n \"image_url\"\n ],\n \"external_links\": [\n {\n \"name\": \"GitHub Repository\",\n \"url\": \"https://github.com/mixpeek/product-search\"\n },\n {\n \"name\": \"Blog Post\",\n \"url\": \"https://blog.mixpeek.com/building-product-search\"\n }\n ],\n \"field_config\": {\n \"price\": {\n \"format\": \"number\",\n \"format_options\": {\n \"decimals\": 2,\n \"label\": \"Price\",\n \"prefix\": \"$\"\n }\n },\n \"title\": {\n \"format\": \"text\",\n \"format_options\": {\n \"label\": \"Product Name\",\n \"truncate_chars\": 60\n }\n }\n },\n \"field_mappings\": {\n \"thumbnail\": \"image_url\",\n \"title\": \"title\"\n },\n \"inputs\": [\n {\n \"field_name\": \"query\",\n \"field_schema\": {\n \"description\": \"Search query\",\n \"examples\": [\n \"wireless headphones\",\n \"laptop\"\n ],\n \"type\": \"string\"\n },\n \"input_type\": \"text\",\n \"label\": \"Search Products\",\n \"order\": 0,\n \"placeholder\": \"What are you looking for?\",\n \"required\": true\n }\n ],\n \"layout\": {\n \"columns\": 3,\n \"gap\": \"16px\",\n \"mode\": \"grid\"\n },\n \"logo_url\": \"https://example.com/logo.png\",\n \"markdowns\": [\n {\n \"content\": \"# AI-Powered Product Search\\n\\nOur search uses **machine learning** to understand your queries and find the most relevant products.\\n\\n## Features\\n\\n- **Semantic Search**: Understands meaning, not just keywords\\n- **Visual Search**: Upload images to find similar products\\n- **Smart Filters**: Automatically suggests relevant filters\",\n \"title\": \"How it Works\"\n },\n {\n \"content\": \"## Tips for Better Results\\n\\n1. Use descriptive terms (e.g., \\\"wireless noise-canceling headphones\\\")\\n2. Try different keywords if you don't find what you're looking for\\n3. Use filters to narrow down results\\n\\n*Happy searching!*\",\n \"title\": \"Search Guide\"\n }\n ],\n \"template_type\": \"media-search\",\n \"theme\": {\n \"border_radius\": \"12px\",\n \"card_style\": \"elevated\",\n \"font_family\": \"Inter, sans-serif\",\n \"primary_color\": \"#007AFF\"\n },\n \"title\": \"Product Search\"\n },\n \"collection_identifiers\": [\n \"col_abc123\",\n \"col_def456\"\n ],\n \"stages\": [\n {\n \"stage_name\": \"<string>\",\n \"config\": {},\n \"batch_size\": \"<string>\",\n \"description\": \"<string>\",\n \"on_error\": \"<string>\",\n \"output_alias\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mixpeek.com/v1/retrievers/{retriever_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"retriever_name\": \"product_search_v2\",\n \"description\": \"Enhanced version with better caching\",\n \"marketplace_listing_id\": \"<string>\",\n \"requires_subscription\": true,\n \"tags\": [\n \"production\",\n \"v2\"\n ],\n \"metadata\": {\n \"seed_config_version\": 2\n },\n \"display_config\": {\n \"components\": {\n \"result_card\": {\n \"card_click_action\": \"viewDetails\",\n \"field_order\": [\n \"title\",\n \"description\",\n \"price\"\n ],\n \"layout\": \"vertical\",\n \"show_find_similar\": true,\n \"show_thumbnail\": true\n },\n \"result_layout\": \"grid\",\n \"show_hero\": true,\n \"show_results_header\": true,\n \"show_search\": true\n },\n \"custom_cta\": {\n \"label\": \"Search Tips\",\n \"markdown_content\": \"# Search Tips\\n\\n- Use quotes for exact phrases\\n- Try descriptive terms\"\n },\n \"description\": \"Search through our product catalog\",\n \"exposed_fields\": [\n \"title\",\n \"description\",\n \"price\",\n \"image_url\"\n ],\n \"external_links\": [\n {\n \"name\": \"GitHub Repository\",\n \"url\": \"https://github.com/mixpeek/product-search\"\n },\n {\n \"name\": \"Blog Post\",\n \"url\": \"https://blog.mixpeek.com/building-product-search\"\n }\n ],\n \"field_config\": {\n \"price\": {\n \"format\": \"number\",\n \"format_options\": {\n \"decimals\": 2,\n \"label\": \"Price\",\n \"prefix\": \"$\"\n }\n },\n \"title\": {\n \"format\": \"text\",\n \"format_options\": {\n \"label\": \"Product Name\",\n \"truncate_chars\": 60\n }\n }\n },\n \"field_mappings\": {\n \"thumbnail\": \"image_url\",\n \"title\": \"title\"\n },\n \"inputs\": [\n {\n \"field_name\": \"query\",\n \"field_schema\": {\n \"description\": \"Search query\",\n \"examples\": [\n \"wireless headphones\",\n \"laptop\"\n ],\n \"type\": \"string\"\n },\n \"input_type\": \"text\",\n \"label\": \"Search Products\",\n \"order\": 0,\n \"placeholder\": \"What are you looking for?\",\n \"required\": true\n }\n ],\n \"layout\": {\n \"columns\": 3,\n \"gap\": \"16px\",\n \"mode\": \"grid\"\n },\n \"logo_url\": \"https://example.com/logo.png\",\n \"markdowns\": [\n {\n \"content\": \"# AI-Powered Product Search\\n\\nOur search uses **machine learning** to understand your queries and find the most relevant products.\\n\\n## Features\\n\\n- **Semantic Search**: Understands meaning, not just keywords\\n- **Visual Search**: Upload images to find similar products\\n- **Smart Filters**: Automatically suggests relevant filters\",\n \"title\": \"How it Works\"\n },\n {\n \"content\": \"## Tips for Better Results\\n\\n1. Use descriptive terms (e.g., \\\"wireless noise-canceling headphones\\\")\\n2. Try different keywords if you don't find what you're looking for\\n3. Use filters to narrow down results\\n\\n*Happy searching!*\",\n \"title\": \"Search Guide\"\n }\n ],\n \"template_type\": \"media-search\",\n \"theme\": {\n \"border_radius\": \"12px\",\n \"card_style\": \"elevated\",\n \"font_family\": \"Inter, sans-serif\",\n \"primary_color\": \"#007AFF\"\n },\n \"title\": \"Product Search\"\n },\n \"collection_identifiers\": [\n \"col_abc123\",\n \"col_def456\"\n ],\n \"stages\": [\n {\n \"stage_name\": \"<string>\",\n \"config\": {},\n \"batch_size\": \"<string>\",\n \"description\": \"<string>\",\n \"on_error\": \"<string>\",\n \"output_alias\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/retrievers/{retriever_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"retriever_name\": \"product_search_v2\",\n \"description\": \"Enhanced version with better caching\",\n \"marketplace_listing_id\": \"<string>\",\n \"requires_subscription\": true,\n \"tags\": [\n \"production\",\n \"v2\"\n ],\n \"metadata\": {\n \"seed_config_version\": 2\n },\n \"display_config\": {\n \"components\": {\n \"result_card\": {\n \"card_click_action\": \"viewDetails\",\n \"field_order\": [\n \"title\",\n \"description\",\n \"price\"\n ],\n \"layout\": \"vertical\",\n \"show_find_similar\": true,\n \"show_thumbnail\": true\n },\n \"result_layout\": \"grid\",\n \"show_hero\": true,\n \"show_results_header\": true,\n \"show_search\": true\n },\n \"custom_cta\": {\n \"label\": \"Search Tips\",\n \"markdown_content\": \"# Search Tips\\n\\n- Use quotes for exact phrases\\n- Try descriptive terms\"\n },\n \"description\": \"Search through our product catalog\",\n \"exposed_fields\": [\n \"title\",\n \"description\",\n \"price\",\n \"image_url\"\n ],\n \"external_links\": [\n {\n \"name\": \"GitHub Repository\",\n \"url\": \"https://github.com/mixpeek/product-search\"\n },\n {\n \"name\": \"Blog Post\",\n \"url\": \"https://blog.mixpeek.com/building-product-search\"\n }\n ],\n \"field_config\": {\n \"price\": {\n \"format\": \"number\",\n \"format_options\": {\n \"decimals\": 2,\n \"label\": \"Price\",\n \"prefix\": \"$\"\n }\n },\n \"title\": {\n \"format\": \"text\",\n \"format_options\": {\n \"label\": \"Product Name\",\n \"truncate_chars\": 60\n }\n }\n },\n \"field_mappings\": {\n \"thumbnail\": \"image_url\",\n \"title\": \"title\"\n },\n \"inputs\": [\n {\n \"field_name\": \"query\",\n \"field_schema\": {\n \"description\": \"Search query\",\n \"examples\": [\n \"wireless headphones\",\n \"laptop\"\n ],\n \"type\": \"string\"\n },\n \"input_type\": \"text\",\n \"label\": \"Search Products\",\n \"order\": 0,\n \"placeholder\": \"What are you looking for?\",\n \"required\": true\n }\n ],\n \"layout\": {\n \"columns\": 3,\n \"gap\": \"16px\",\n \"mode\": \"grid\"\n },\n \"logo_url\": \"https://example.com/logo.png\",\n \"markdowns\": [\n {\n \"content\": \"# AI-Powered Product Search\\n\\nOur search uses **machine learning** to understand your queries and find the most relevant products.\\n\\n## Features\\n\\n- **Semantic Search**: Understands meaning, not just keywords\\n- **Visual Search**: Upload images to find similar products\\n- **Smart Filters**: Automatically suggests relevant filters\",\n \"title\": \"How it Works\"\n },\n {\n \"content\": \"## Tips for Better Results\\n\\n1. Use descriptive terms (e.g., \\\"wireless noise-canceling headphones\\\")\\n2. Try different keywords if you don't find what you're looking for\\n3. Use filters to narrow down results\\n\\n*Happy searching!*\",\n \"title\": \"Search Guide\"\n }\n ],\n \"template_type\": \"media-search\",\n \"theme\": {\n \"border_radius\": \"12px\",\n \"card_style\": \"elevated\",\n \"font_family\": \"Inter, sans-serif\",\n \"primary_color\": \"#007AFF\"\n },\n \"title\": \"Product Search\"\n },\n \"collection_identifiers\": [\n \"col_abc123\",\n \"col_def456\"\n ],\n \"stages\": [\n {\n \"stage_name\": \"<string>\",\n \"config\": {},\n \"batch_size\": \"<string>\",\n \"description\": \"<string>\",\n \"on_error\": \"<string>\",\n \"output_alias\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"retriever": {
"retriever_name": "<string>",
"stages": [
{
"stage_name": "<string>",
"config": {},
"batch_size": "<string>",
"description": "<string>",
"on_error": "<string>",
"output_alias": "<string>"
}
],
"fusion": "<string>",
"collection_identifiers": [
"<string>"
],
"retriever_id": "<string>",
"description": "<string>",
"collection_ids": [
"<string>"
],
"input_schema": {},
"budget_limits": {
"max_credits": 1,
"max_time_ms": 1
},
"feature_dependencies": [
{
"extractor": "<string>",
"version": "<string>",
"scheme": "mixpeek",
"output": "<string>"
}
],
"tags": [
"<string>"
],
"metadata": {},
"display_config": {},
"version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"updated_by": "<string>"
}
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"status": 123,
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": {}
},
"success": false
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Retriever ID or name.
Body
Request to update a retriever's metadata.
IMPORTANT: Partial Updates with Controlled Mutability
This endpoint allows updating ONLY metadata fields. Core retriever logic is immutable to ensure consistency for dependent resources (taxonomies, cached results, etc.).
✅ Fields You CAN Update (Metadata Only):
retriever_name: Rename the retrieverdescription: Update documentationtags: Update organization tagsdisplay_config: Update display configuration for publishing
✅ Fields You CAN Also Update (With Re-validation):
collection_identifiers: Target collections (re-validates feature URIs in stages)
✅ Fields You CAN Update on UNPUBLISHED retrievers (With Re-validation):
stages: Retriever stages/configs (BACKE-1287). Edit a filter/operator/rerank in place instead of clone+repoint+delete. Re-validated as on create; a PUBLISHED retriever's stages stay immutable (clone/unpublish to change).
❌ Fields You CANNOT Update (Immutable Core Logic):
input_schema: Input field definitions (breaks dependent taxonomies)budget_limits: Budget constraints (affects execution behavior)
Need to Modify Core Logic? Use POST /retrievers/{retriever_id}/clone instead. Cloning creates a new retriever with a new ID, allowing you to:
- Fix typos in stage names
- Add or remove stages
- Change target collections
- Modify input schema or budget limits
Behavior:
- All fields are OPTIONAL - provide only what you want to update
- Version number automatically increments on each update
- Empty updates (no fields provided) will be rejected with 400 error
- Original retriever remains unchanged (no destructive operations)
Why This Design?
- Taxonomies reference retrievers by ID and expect consistent behavior
- Cached results remain valid after metadata-only changes
- Version tracking enables auditing and rollback
- Published retrievers maintain stable behavior for consumers
Updated retriever name. OPTIONAL - only provide if you want to rename the retriever.
1"product_search_v2"
Updated human-readable description. OPTIONAL - only provide if you want to update the description.
"Enhanced version with better caching"
Updated visibility level. OPTIONAL - only provide if you want to change the visibility.
private, public, marketplace Updated marketplace listing ID. OPTIONAL - only provide if you want to update the marketplace listing.
Updated subscription requirement. OPTIONAL - only provide if you want to change the subscription requirement.
Updated tags for organization and filtering. OPTIONAL - replaces existing tags if provided.
["production", "v2"]
Updated custom key-value metadata. OPTIONAL - replaces existing metadata if provided.
{ "seed_config_version": 2 }
Updated display configuration for public retriever UI rendering. OPTIONAL - only provide if you want to update the display settings. Defines how the search interface should appear when published.
Show child attributes
Show child attributes
{ "components": { "result_card": { "card_click_action": "viewDetails", "field_order": ["title", "description", "price"], "layout": "vertical", "show_find_similar": true, "show_thumbnail": true }, "result_layout": "grid", "show_hero": true, "show_results_header": true, "show_search": true }, "custom_cta": { "label": "Search Tips", "markdown_content": "# Search Tips\n\n- Use quotes for exact phrases\n- Try descriptive terms" }, "description": "Search through our product catalog", "exposed_fields": [ "title", "description", "price", "image_url" ], "external_links": [ { "name": "GitHub Repository", "url": "https://github.com/mixpeek/product-search" }, { "name": "Blog Post", "url": "https://blog.mixpeek.com/building-product-search" } ], "field_config": { "price": { "format": "number", "format_options": { "decimals": 2, "label": "Price", "prefix": "$" } }, "title": { "format": "text", "format_options": { "label": "Product Name", "truncate_chars": 60 } } }, "field_mappings": { "thumbnail": "image_url", "title": "title" }, "inputs": [ { "field_name": "query", "field_schema": { "description": "Search query", "examples": ["wireless headphones", "laptop"], "type": "string" }, "input_type": "text", "label": "Search Products", "order": 0, "placeholder": "What are you looking for?", "required": true } ], "layout": { "columns": 3, "gap": "16px", "mode": "grid" }, "logo_url": "https://example.com/logo.png", "markdowns": [ { "content": "# AI-Powered Product Search\n\nOur search uses **machine learning** to understand your queries and find the most relevant products.\n\n## Features\n\n- **Semantic Search**: Understands meaning, not just keywords\n- **Visual Search**: Upload images to find similar products\n- **Smart Filters**: Automatically suggests relevant filters", "title": "How it Works" }, { "content": "## Tips for Better Results\n\n1. Use descriptive terms (e.g., \"wireless noise-canceling headphones\")\n2. Try different keywords if you don't find what you're looking for\n3. Use filters to narrow down results\n\n*Happy searching!*", "title": "Search Guide" } ], "template_type": "media-search", "theme": { "border_radius": "12px", "card_style": "elevated", "font_family": "Inter, sans-serif", "primary_color": "#007AFF" }, "title": "Product Search" }
Updated target collection IDs or names. OPTIONAL - provide to re-point the retriever at different collections. Feature URIs in stages will be re-validated against the new collections.
["col_abc123", "col_def456"]
BACKE-1287: edit the retriever's stages IN PLACE (change a filter, operator, rerank params, etc.) without a clone+repoint+delete. OPTIONAL. The full stage list is REPLACED and re-validated exactly as on create (feature URIs resolved against the retriever's collections). Only allowed on UNPUBLISHED retrievers — a published retriever's stages stay immutable for consumer stability; clone or unpublish to change it.
Show child attributes
Show child attributes
Response
Successful Response
Response after updating a retriever.
Updated retriever configuration.
Show child attributes
Show child attributes
{ "budget_limits": { "max_credits": 100, "max_time_ms": 60000 }, "collection_ids": ["col_marketing_ads"], "input_schema": { "query_text": { "description": "Full-text query", "type": "string" } }, "retriever_id": "ret_abc123", "retriever_name": "executive_ads_search", "stages": [ { "config": { "parameters": { "field": "metadata.spend", "operator": "gt", "value": 1000 }, "stage_name": "attribute_filter", "version": "v1" }, "name": "filter_high_spend", "stage_type": "filter" } ] }
Was this page helpful?

