{"openapi":"3.1.0","info":{"title":"Catalogi AI shopping","version":"1.0.0","description":"Client-side product extraction; server prepares a shared basket with available server-configured delivery estimates. Conditional costs remain explicit. Payment stays on website."},"servers":[{"url":"https://catalogi.ru"}],"paths":{"/ai-shopping/":{"get":{"operationId":"discoverShopping","parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["json","openapi","destinations","sitemap"]},"description":"Omit for HTML guide."},{"name":"q","in":"query","schema":{"type":"string","minLength":2,"maxLength":80},"description":"City name prefix, required only for format=destinations. No personal data or wildcard characters."}],"responses":{"200":{"description":"HTML guide, discovery/OpenAPI JSON, city dictionary or XML sitemap"}}},"post":{"operationId":"createSharedBasket","summary":"Prepare basket; never pay","description":"Stateless AI-client request: no Cookie or Authorization header; no cross-origin web submission.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^(?:[a-f0-9]{32}|[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Packet"}}}},"responses":{"201":{"description":"Created basket; preliminary price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Basket"}}}},"200":{"description":"Idempotent replay","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Basket"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Origin not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency conflict or in progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"JSON required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Missing facts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"BooleanFact":{"type":"object","additionalProperties":false,"required":["value","source_url","observed_at","basis"],"properties":{"value":{"type":"boolean"},"source_url":{"type":"string","format":"uri","maxLength":2048,"description":"HTTPS; same host as item URL."},"observed_at":{"type":"integer","minimum":0,"description":"Unix seconds; refresh after 900 seconds."},"basis":{"type":"string","enum":["observed","user_supplied"]}}},"PriceFact":{"type":"object","additionalProperties":false,"required":["value","source_url","observed_at","basis","currency"],"properties":{"value":{"type":"string","pattern":"^(?:0|[1-9][0-9]{0,5})\\.[0-9]{2}$","not":{"const":"0.00"}},"source_url":{"type":"string","format":"uri","maxLength":2048,"description":"HTTPS; same host as item URL."},"observed_at":{"type":"integer","minimum":0,"description":"Unix seconds; refresh after 900 seconds."},"basis":{"type":"string","enum":["observed","user_supplied"]},"currency":{"type":"string","const":"EUR"}}},"Packet":{"type":"object","additionalProperties":false,"required":["version","items"],"properties":{"version":{"type":"integer","const":1},"items":{"type":"array","minItems":1,"maxItems":10,"items":{"$ref":"#/components/schemas/Item"}},"destination":{"anyOf":[{"$ref":"#/components/schemas/Destination"},{"type":"null"}]}}},"Destination":{"type":"object","additionalProperties":false,"required":["country","cdek_city_code","method"],"properties":{"country":{"type":"string","const":"RU"},"cdek_city_code":{"type":"string","pattern":"^[1-9][0-9]{0,9}$"},"method":{"type":"string","enum":["pickup","postamat","courier"]}}},"Item":{"type":"object","additionalProperties":false,"required":["url","name"],"properties":{"url":{"type":"string","format":"uri","maxLength":2048,"description":"HTTPS exact active-store host, preserve variant query."},"name":{"type":"string","minLength":1,"maxLength":240},"size":{"type":"string","maxLength":80,"description":"Required for creation. Use literal string 0 when product has no size choice. Missing or empty requires supplementation."},"color":{"type":"string","maxLength":80},"sku":{"type":"string","maxLength":120},"quantity":{"type":"integer","minimum":1,"maximum":10,"default":1},"image_url":{"type":["string","null"],"format":"uri","maxLength":2048,"description":"Primary HTTPS photo URL, mutually exclusive with image_base64."},"image_base64":{"type":["string","null"],"minLength":4,"maxLength":699052,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","description":"Standard base64 JPEG/PNG/WebP up to 512 KiB decoded; no data URI or personal data."},"price":{"anyOf":[{"$ref":"#/components/schemas/PriceFact"},{"type":"null"}]},"availability":{"anyOf":[{"$ref":"#/components/schemas/BooleanFact"},{"type":"null"}]},"delivery_to_germany":{"anyOf":[{"$ref":"#/components/schemas/BooleanFact"},{"type":"null"}]}}},"Basket":{"type":"object","required":["basket_id","basket_code","share_url","pricing"],"properties":{"basket_id":{"type":"integer","minimum":1},"basket_code":{"type":"string","pattern":"^[a-f0-9]{32}$"},"created_at":{"type":"integer","minimum":0},"expires_at":{"type":"integer","minimum":0,"description":"Quote freshness deadline; not a promise that the basket URL disappears."},"share_url":{"type":"string","format":"uri","description":"Specific shared basket on catalogi.ru. Do not construct yourself."},"pricing":{"$ref":"#/components/schemas/Pricing"}}},"Pricing":{"type":"object","required":["known_total_eur","known_total_rub","price_final","components","missing_fields"],"properties":{"known_total_eur":{"type":"string","description":"Decimal known subtotal, not all-in cost."},"known_total_rub":{"type":"string","description":"Decimal known subtotal at server rate."},"rate_eur_rub":{"type":["string","null"],"description":"Server exchange rate used for the known subtotal."},"price_basis":{"type":"string","description":"Client evidence remains unverified; read the returned basis."},"price_final":{"type":"boolean","const":false},"components":{"type":"object","properties":{"goods_eur":{"type":"string"},"service_fee_eur":{"type":"string"},"shop_delivery_eur":{"type":["string","null"]},"international_delivery_eur":{"type":["string","null"],"description":"Included in service fee for standard shipment; null means not split out, not another unknown charge."},"local_delivery_rub":{"type":["string","null"]},"local_delivery_eur":{"type":["string","null"]},"weight_dimensions_surcharge_rub":{"type":["string","null"]},"customs_rub":{"type":["string","null"]}}},"delivery_basis":{"type":"object","description":"Configured shop policies and route/tariff cache date, stale flag and synthetic checkout 1 kg basis. This is not measured parcel weight."},"component_statuses":{"type":"object","properties":{"international_delivery":{"type":"string","const":"included_in_service_fee_for_standard_shipment"}}},"missing_fields":{"type":"array","items":{"type":"string"}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"missing_fields":{"type":"array","items":{"type":"string"}}}}}}}}}