{"openapi":"3.1.0","info":{"title":"Baglioteca agent API","description":"Read-only, no auth. Questions, filters and search over the Baglioteca bag catalog. Start with the shopping guide: https://baglioteca.com/shopping-guide.json","version":"1.0.0"},"servers":[{"url":"https://baglioteca.com/api/agent"}],"paths":{"/facets":{"get":{"summary":"Questions that still split the matching bags, most useful first","operationId":"facets_facets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFacetsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"}},"parameters":[{"name":"product_type","in":"query","required":false,"description":"What kind of bag do you want? Sets the basic shape. Most other answers only make sense once this is known. Type: enum. Values: backpack, sling, tote, messenger, duffel, briefcase, fanny-pack, any.","schema":{"type":"string"}},{"name":"volume","in":"query","required":false,"description":"How big a bag do you want? Space inside, in liters, as the brand states it. Most daily bags are 15 to 35 L; travel bags run bigger. Type: range, unit L. Values: -15, 15-25, 25-35, 35-45, 45-, any.","schema":{"type":"string"}},{"name":"price","in":"query","required":false,"description":"What's your budget? List price on the brand's own site, in US dollars. Sales are not tracked. Type: range, unit USD. Values: -100, 100-200, 200-300, 300-, any.","schema":{"type":"string"}},{"name":"laptop","in":"query","required":false,"description":"What size laptop do you need to carry? A bag that fits one size also fits the smaller ones. No laptop tag means no sleeve, or the listing doesn't say. Type: enum. Values: laptop-13, laptop-14, laptop-15, laptop-16, any.","schema":{"type":"string"}},{"name":"water_bottle_pocket","in":"query","required":false,"description":"Do you want a pocket for a water bottle? Says a pocket exists, not how big a bottle it holds. \"No\" can mean the listing doesn't mention one. Type: boolean. Values: yes, no, any.","schema":{"type":"string"}},{"name":"style","in":"query","required":false,"description":"Which look do you want? Pick one or more. How the bag looks, not how it works. Every bag has at least one style. Type: multi, match any. Values: urban, professional, outdoor, tactical, heritage, any.","schema":{"type":"string"}},{"name":"color","in":"query","required":false,"description":"Which colors do you like? Pick one or more. Color families, not exact shades. Most bags come in more than one. Type: multi, match any. Values: minimalist_neutrals, sleek_professional, earth_tones, bold_vibrant, tactical, urban_chic, any.","schema":{"type":"string"}},{"name":"access","in":"query","required":false,"description":"How do you want to get into the main compartment? Only about a third of listings say how the bag opens, so this cuts the list hard. Type: multi, match any. Values: clamshell, panel-load, top-load, half-zip, roll-top, side-access, flap-closure, back-access, any.","schema":{"type":"string"}},{"name":"features","in":"query","required":false,"description":"Which of these must the bag have? Each one picked has to be on the bag. Type: multi, match all. Values: quick-access-pocket, dedicated-laptop-compartment, any.","schema":{"type":"string"}},{"name":"hip_belt","in":"query","required":false,"description":"Do you want a hip belt? Moves weight to the hips. Helps on long or heavy carries; most daily bags skip it. Type: boolean. Values: yes, no, any.","schema":{"type":"string"}},{"name":"weight","in":"query","required":false,"description":"How light does the bag need to be? Empty weight in grams, as the brand states it. Type: range, unit g. Values: -800, 800-1200, 1200-1600, 1600-, any.","schema":{"type":"string"}}]}},"/search":{"get":{"summary":"Bags matching the filters: exact matches first, then close ones","operationId":"search_search_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"1 to 20; larger values are capped","default":5,"title":"Limit"},"description":"1 to 20; larger values are capped"},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"next_cursor from the previous page","title":"Cursor"},"description":"next_cursor from the previous page"},{"name":"sort","in":"query","required":false,"schema":{"enum":["price_asc","price_desc"],"type":"string","default":"price_asc","title":"Sort"}},{"name":"product_type","in":"query","required":false,"description":"What kind of bag do you want? Sets the basic shape. Most other answers only make sense once this is known. Type: enum. Values: backpack, sling, tote, messenger, duffel, briefcase, fanny-pack, any.","schema":{"type":"string"}},{"name":"volume","in":"query","required":false,"description":"How big a bag do you want? Space inside, in liters, as the brand states it. Most daily bags are 15 to 35 L; travel bags run bigger. Type: range, unit L. Values: -15, 15-25, 25-35, 35-45, 45-, any.","schema":{"type":"string"}},{"name":"price","in":"query","required":false,"description":"What's your budget? List price on the brand's own site, in US dollars. Sales are not tracked. Type: range, unit USD. Values: -100, 100-200, 200-300, 300-, any.","schema":{"type":"string"}},{"name":"laptop","in":"query","required":false,"description":"What size laptop do you need to carry? A bag that fits one size also fits the smaller ones. No laptop tag means no sleeve, or the listing doesn't say. Type: enum. Values: laptop-13, laptop-14, laptop-15, laptop-16, any.","schema":{"type":"string"}},{"name":"water_bottle_pocket","in":"query","required":false,"description":"Do you want a pocket for a water bottle? Says a pocket exists, not how big a bottle it holds. \"No\" can mean the listing doesn't mention one. Type: boolean. Values: yes, no, any.","schema":{"type":"string"}},{"name":"style","in":"query","required":false,"description":"Which look do you want? Pick one or more. How the bag looks, not how it works. Every bag has at least one style. Type: multi, match any. Values: urban, professional, outdoor, tactical, heritage, any.","schema":{"type":"string"}},{"name":"color","in":"query","required":false,"description":"Which colors do you like? Pick one or more. Color families, not exact shades. Most bags come in more than one. Type: multi, match any. Values: minimalist_neutrals, sleek_professional, earth_tones, bold_vibrant, tactical, urban_chic, any.","schema":{"type":"string"}},{"name":"access","in":"query","required":false,"description":"How do you want to get into the main compartment? Only about a third of listings say how the bag opens, so this cuts the list hard. Type: multi, match any. Values: clamshell, panel-load, top-load, half-zip, roll-top, side-access, flap-closure, back-access, any.","schema":{"type":"string"}},{"name":"features","in":"query","required":false,"description":"Which of these must the bag have? Each one picked has to be on the bag. Type: multi, match all. Values: quick-access-pocket, dedicated-laptop-compartment, any.","schema":{"type":"string"}},{"name":"hip_belt","in":"query","required":false,"description":"Do you want a hip belt? Moves weight to the hips. Helps on long or heavy carries; most daily bags skip it. Type: boolean. Values: yes, no, any.","schema":{"type":"string"}},{"name":"weight","in":"query","required":false,"description":"How light does the bag need to be? Empty weight in grams, as the brand states it. Type: range, unit g. Values: -800, 800-1200, 1200-1600, 1600-, any.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentSearchResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Bad Request"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/product/{pid}":{"get":{"summary":"Full detail for one bag, with its other sizes and colors","operationId":"product_product__pid__get","parameters":[{"name":"pid","in":"path","required":true,"schema":{"type":"string","title":"Pid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentProductDetail"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentErrorResponse"}}},"description":"Not Found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/guide":{"get":{"summary":"The shopping guide as JSON (served at /shopping-guide.json)","operationId":"guide_guide_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AgentErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"message":{"type":"string","title":"Message"},"valid_keys":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Valid Keys"},"valid_values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Valid Values"}},"type":"object","required":["error","message"],"title":"AgentErrorResponse"},"AgentFacet":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"type":{"type":"string","enum":["boolean","enum","range","multi"],"title":"Type"},"question":{"type":"string","title":"Question"},"why_it_matters":{"type":"string","title":"Why It Matters"},"priority_group":{"type":"string","enum":["core","common","niche"],"title":"Priority Group"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"match":{"anyOf":[{"type":"string","enum":["any","all"]},{"type":"null"}],"title":"Match"},"options":{"items":{"$ref":"#/components/schemas/AgentOptionCount"},"type":"array","title":"Options"},"not_stated":{"type":"integer","title":"Not Stated"},"score":{"type":"number","title":"Score"}},"type":"object","required":["key","label","type","question","why_it_matters","priority_group","options","not_stated","score"],"title":"AgentFacet"},"AgentFacetsResponse":{"properties":{"total_matches":{"type":"integer","title":"Total Matches"},"facets":{"items":{"$ref":"#/components/schemas/AgentFacet"},"type":"array","title":"Facets"}},"type":"object","required":["total_matches","facets"],"title":"AgentFacetsResponse"},"AgentOptionCount":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["value","label","count"],"title":"AgentOptionCount"},"AgentProductDetail":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"type":"string","title":"Currency"},"url":{"type":"string","title":"Url"},"brand_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"in_stock":{"type":"null","title":"In Stock"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"images":{"items":{"type":"string"},"type":"array","title":"Images"},"colors":{"items":{"type":"string"},"type":"array","title":"Colors"},"materials":{"items":{"type":"string"},"type":"array","title":"Materials"},"dimensions_cm":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Dimensions Cm"},"sustainability_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sustainability Score"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"},"variants":{"items":{"$ref":"#/components/schemas/AgentVariant"},"type":"array","title":"Variants"}},"type":"object","required":["id","name","brand","price","currency","url","brand_url","image_url","description","images","colors","materials","dimensions_cm","sustainability_score","attributes","variants"],"title":"AgentProductDetail"},"AgentSearchResponse":{"properties":{"total_matches":{"type":"integer","title":"Total Matches"},"total_results":{"type":"integer","title":"Total Results"},"sort":{"type":"string","title":"Sort"},"results":{"items":{"$ref":"#/components/schemas/AgentSearchResult"},"type":"array","title":"Results"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["total_matches","total_results","sort","results","next_cursor"],"title":"AgentSearchResponse"},"AgentSearchResult":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"type":"string","title":"Currency"},"url":{"type":"string","title":"Url"},"brand_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brand Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"in_stock":{"type":"null","title":"In Stock"},"match":{"type":"string","enum":["exact","close"],"title":"Match"},"unmatched":{"items":{"type":"string"},"type":"array","title":"Unmatched"},"attributes":{"additionalProperties":true,"type":"object","title":"Attributes"}},"type":"object","required":["id","name","brand","price","currency","url","brand_url","image_url","match","unmatched","attributes"],"title":"AgentSearchResult"},"AgentVariant":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"colors":{"items":{"type":"string"},"type":"array","title":"Colors"},"volume_l":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume L"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"url":{"type":"string","title":"Url"}},"type":"object","required":["id","name","colors","volume_l","price","url"],"title":"AgentVariant"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}