{"openapi":"3.1.0","info":{"title":"Catalogi MCP","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","gigachat"]},"description":"Omit for HTML guide; gigachat returns functions[] with expanded Packet and setup/validation status."},{"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, XML sitemap, or GigaChat functions[] with expanded Packet and setup/validation status"}}},"post":{"operationId":"createSharedBasket","summary":"Prepare basket or Alice form handoff; never pay","description":"Without query: Packet, Idempotency-Key required, max 1 MiB, no Cookie or Authorization; no cross-origin web submission. With format=alice only: AliceRequest protocol 1.0, max 16384 bytes, no idempotency key required, deterministic form handoff without Bitrix, quote or basket creation. Schema/query pairing is enforced by runtime.","parameters":[{"name":"format","in":"query","schema":{"type":"string","enum":["alice"]},"description":"Omit for Packet creation. Set alice only for AliceRequest; no other query parameters accepted."},{"name":"Idempotency-Key","in":"header","required":false,"description":"Required for ordinary Packet POST, not for format=alice.","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":{"oneOf":[{"$ref":"#/components/schemas/Packet"},{"$ref":"#/components/schemas/AliceRequest"}]}}}},"responses":{"201":{"description":"Created basket; preliminary price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Basket"}}}},"200":{"description":"Idempotent replay","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Basket"},{"$ref":"#/components/schemas/AliceReply"}]}}}},"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"}}},"CategoryFact":{"type":"object","additionalProperties":false,"required":["value","source_url","observed_at","basis"],"properties":{"value":{"type":"string","enum":["clothing","footwear","other"],"description":"One garment, one pair, or other including sets. Evidence from taxonomy/description or user_supplied; never name-only inference."},"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"]}}},"AliceRequest":{"type":"object","required":["version","request"],"description":"POST with format=alice only; encoded request body max 16384 bytes.","properties":{"version":{"type":"string","const":"1.0"},"request":{"type":"object","properties":{"original_utterance":{"type":"string","description":"At most 8192 UTF-8 bytes, no control characters; omitted defaults to empty."}}},"meta":{"type":"object"}}},"AliceReply":{"type":"object","required":["version","response"],"properties":{"version":{"type":"string","const":"1.0"},"response":{"type":"object","required":["text","buttons","end_session"],"properties":{"text":{"type":"string"},"buttons":{"type":"array","items":{"type":"object","required":["title","url","hide"],"properties":{"title":{"type":"string"},"url":{"type":"string","format":"uri","description":"Catalogi form handoff, not a created basket."},"hide":{"type":"boolean"}}}},"end_session":{"type":"boolean"}}}}},"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."},"category":{"anyOf":[{"$ref":"#/components/schemas/CategoryFact"},{"type":"null"}]},"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."},"items":{"type":"array","description":"Additive buyer context; may be absent from older immutable snapshots.","items":{"$ref":"#/components/schemas/BasketItem"}},"next_action":{"$ref":"#/components/schemas/NextAction"},"pricing":{"$ref":"#/components/schemas/Pricing"}}},"BasketItem":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"size":{"type":"string"},"color":{"type":"string"},"sku":{"type":"string"},"price_evidence":{"type":"object","properties":{"source_url":{"type":["string","null"],"format":"uri"},"observed_at":{"type":["integer","null"],"minimum":0},"basis":{"type":"string"}}}}},"NextAction":{"type":"object","description":"Optional additive handoff; check expires_at before showing label. If stale, use «Обновить расчёт в корзине». Never payment confirmation.","properties":{"type":{"type":"string","const":"review_checkout"},"url":{"type":"string","format":"uri","description":"Same specific share_url returned by the server."},"label":{"type":"string","enum":["Перейти к оформлению","Продолжить расчёт в корзине"]},"requires_price_review":{"type":"boolean","const":true}}},"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","description":"Always false for the current client-only source. Caller observed is not trusted merchant verification or a checkout price lock."},"no_deferred_charges_eligible":{"type":"boolean","description":"Preliminary eligibility for single clothing above 10 EUR or footwear above 50 EUR with a current payment and no missing fields. Coverage applies only after Service confirms price/category at checkout under offer 4.8.2; not a confirmed financial commitment or merchant-price verification."},"amount_due_now_eur":{"type":["string","null"]},"amount_due_now_rub":{"type":["string","null"],"description":"Calculated payment now on supplied data; not an independent verification of client facts."},"payment_status":{"type":"string","enum":["calculated","needs_delivery","needs_confirmation"]},"dts_payment_timing":{"type":["string","null"],"enum":["after_weighing_before_dispatch",null]},"buyer_notice":{"type":"string"},"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"}}}}}}}}}