{"openapi":"3.1.0","info":{"title":"Jumbo.cl Product API","description":"Jumbo es una cadena de supermercados de Cencosud presente en todo Chile. En jumbo.cl puedes explorar el catálogo, ver precios y disponibilidad en tiempo real, aprovechar ofertas y recetas, y comprar online con despacho a domicilio o retiro en tienda.","version":"1.0.0","contact":{"url":"https://www.jumbo.cl"},"x-logo":{"url":"https://www.jumbo.cl/favicon/favicon-512.png","altText":"Jumbo 50 años"}},"servers":[{"url":"https://www.jumbo.cl","description":"Jumbo.cl storefront"}],"tags":[{"name":"Catalog","description":"Product catalog browsing and search."},{"name":"Search","description":"Search suggestions and trending queries."},{"name":"Cart","description":"Cart URL builder — generates links that add products to cart on visit."}],"paths":{"/api/catalog":{"post":{"operationId":"searchProducts","summary":"Search the product catalog","description":"Returns a paginated list of products. Use `fullText` for keyword search or `collections` to browse a category. Both can be combined.","tags":["Catalog"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fullText":{"type":"string","description":"Keyword search query (e.g. 'arroz basmati', 'leche descremada').","example":"arroz"},"collections":{"type":"array","items":{"type":"string"},"description":"Category slugs to filter results (e.g. ['despensa', 'lacteos'])."},"brands":{"type":"array","items":{"type":"string"},"description":"Brand names to filter results."},"from":{"type":"integer","description":"Pagination start index (0-based).","default":0,"minimum":0},"to":{"type":"integer","description":"Pagination end index (exclusive).","default":40,"minimum":1,"maximum":100},"orderBy":{"type":"string","description":"Sort order.","enum":["OrderByTopSaleDESC","OrderByPriceASC","OrderByPriceDESC","OrderByNameASC","OrderByBestDiscountDESC"]}}}}}},"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}}}}}},"/api/search-suggestions":{"get":{"operationId":"getSearchSuggestions","summary":"Autocomplete search suggestions","description":"Returns product, brand and category suggestions for a partial query. Minimum 3 characters.","tags":["Search"],"parameters":[{"name":"term","in":"query","required":true,"description":"Partial search term (min. 3 characters).","schema":{"type":"string","example":"arro"}}],"responses":{"200":{"description":"Suggestions grouped by type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchSuggestions"}}}}}}},"/api/popular-search":{"get":{"operationId":"getPopularSearchTerms","summary":"Get trending search terms","description":"Returns a list of the most popular search queries on the site.","tags":["Search"],"responses":{"200":{"description":"Array of popular search strings.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"example":["leche","pan","arroz","aceite"]}}}}}}},"/api/cart/url":{"get":{"operationId":"buildCartUrl","summary":"Build a pre-filled cart URL","description":"Returns a URL that, when visited by the user, automatically adds the specified products to their cart and opens the cart drawer. Use this after finding products with searchProducts: get the SKU from the product, call this endpoint to build the cart URL, then present the URL to the user as a clickable link so they can complete the purchase.","tags":["Cart"],"parameters":[{"name":"sku","in":"query","required":true,"description":"One or more SKU IDs, comma-separated (e.g. '5872' or '5872,1234').","schema":{"type":"string","example":"5872,1234"}},{"name":"qty","in":"query","required":false,"description":"Quantities for each SKU, comma-separated. Defaults to 1 for each SKU.","schema":{"type":"string","example":"2,1"}}],"responses":{"200":{"description":"Cart URL and item summary.","content":{"application/json":{"schema":{"type":"object","required":["url","items","items_count"],"properties":{"url":{"type":"string","description":"Full URL to visit to add items to cart. Present this to the user as a clickable link.","example":"https://www.jumbo.cl/?sku=5872,1234&qty=2,1"},"items":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"qty":{"type":"integer"}}}},"items_count":{"type":"integer","description":"Number of distinct products in the cart URL."}}}}}},"400":{"description":"Missing required 'sku' parameter."}}}}},"components":{"schemas":{"Product":{"type":"object","description":"A product from the catalog.","required":["productId","productName","price","available"],"properties":{"productId":{"type":"string","description":"Unique product identifier."},"productName":{"type":"string","description":"Full product name."},"brand":{"type":"string","description":"Brand name."},"sku":{"type":"string","description":"SKU / item reference."},"price":{"type":"number","description":"Current selling price (in currency of the site)."},"listPrice":{"type":"number","description":"Original list price before discounts."},"imageUrl":{"type":"string","description":"Main product image URL."},"link":{"type":"string","description":"Canonical PDP URL."},"available":{"type":"boolean","description":"Whether the product is in stock."},"quantity":{"type":"integer","description":"Available stock units. May be absent if stock count is not exposed.","nullable":true}}},"SearchResult":{"type":"object","required":["products","totalProducts","from","to"],"properties":{"products":{"type":"array","description":"List of matching products.","items":{"$ref":"#/components/schemas/Product"}},"totalProducts":{"type":"integer","description":"Total number of matching products."},"from":{"type":"integer","description":"Index of the first result returned."},"to":{"type":"integer","description":"Index of the last result returned."}}},"SearchSuggestions":{"type":"object","required":["products","brands","categories"],"properties":{"products":{"type":"array","items":{"type":"string"},"description":"Suggested product names matching the query."},"brands":{"type":"array","items":{"type":"string"},"description":"Suggested brand names matching the query."},"categories":{"type":"array","items":{"type":"string"},"description":"Suggested category names matching the query."}}}}}}