{"openapi": "3.1.0", "info": {"title": "KIZUNA Partner API: tours and Japanese attractions", "version": "1.0.0", "description": "Search tours in Japan, check availability, and hold bookings. Channels billed monthly get the booking confirmed at once, within their credit limit. Bookings the traveller pays online (payment_url) are refused with PREPAID_UNAVAILABLE until online payment is live. Send an Idempotency-Key header when creating a booking and reuse it on retry. The same operations are available as MCP tools at /api/partner/v1/mcp. The attraction catalogue (open, no key, rate limited per IP) lists Japanese attractions by Wikidata QID with names in 17 languages, coordinates, openly licensed images, staff-checked group tour facts and approved partner media; it is also an MCP server at /api/partner/v1/mcp/attractions. Wikidata data is CC0; show each image and media item with its attribution."}, "servers": [{"url": "https://splendor-star.co.jp/api/partner/v1"}], "components": {"securitySchemes": {"bearer": {"type": "http", "scheme": "bearer", "description": "API key issued by KIZUNA."}, "apiKey": {"type": "apiKey", "in": "header", "name": "X-API-Key"}}, "responses": {"Error": {"description": "Error", "content": {"application/json": {"schema": {"type": "object", "properties": {"success": {"const": false}, "error": {"type": "object", "properties": {"code": {"type": "string"}, "message": {"type": "string"}}}}}}}}}, "schemas": {"BookingRequest": {"type": "object", "required": ["product_id", "travel_date", "contact_name", "contact_email"], "properties": {"product_id": {"type": "integer"}, "travel_date": {"type": "string", "format": "date"}, "adults": {"type": "integer", "minimum": 1, "default": 2}, "children": {"type": "integer", "minimum": 0}, "infants": {"type": "integer", "minimum": 0}, "contact_name": {"type": "string"}, "contact_email": {"type": "string", "format": "email"}, "contact_phone": {"type": "string"}, "contact_language": {"type": "string", "enum": ["en", "ja", "zh", "ko"]}, "special_requests": {"type": "string"}, "dietary_requirements": {"type": "string"}}}, "BookingHold": {"type": "object", "properties": {"id": {"type": "integer"}, "name": {"type": "string"}, "state": {"type": "string"}, "total_amount": {"type": "number"}, "currency": {"type": "string"}, "hold_expires_at": {"type": "string"}, "settlement_mode": {"type": "string", "enum": ["prepaid", "postpaid"]}, "payment_url": {"type": ["string", "null"], "format": "uri", "description": "Null for postpaid channels."}}}}}, "security": [{"bearer": []}, {"apiKey": []}], "paths": {"/attractions": {"get": {"operationId": "searchAttractions", "security": [], "summary": "Search Japanese attractions (open, no key)", "parameters": [{"name": "q", "in": "query", "schema": {"type": "string"}, "description": "Name in any language"}, {"name": "prefecture", "in": "query", "schema": {"type": "string"}, "description": "e.g. Kyoto or \u4eac\u90fd\u5e9c"}, {"name": "category", "in": "query", "schema": {"type": "string"}, "description": "e.g. shrine, temple, castle"}, {"name": "heritage_only", "in": "query", "schema": {"type": "boolean"}}, {"name": "language", "in": "query", "schema": {"type": "string", "enum": ["ja", "en", "zh", "zh-Hant", "ko", "vi", "th", "ms", "ar", "de", "es", "fr", "it", "pl", "pt", "ru", "tr"], "default": "en"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}, {"name": "offset", "in": "query", "schema": {"type": "integer"}}], "responses": {"200": {"description": "Attractions: total, results[], attribution"}, "422": {"$ref": "#/components/responses/Error"}, "429": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}}}, "/attractions/nearby": {"get": {"operationId": "nearbyAttractions", "security": [], "parameters": [{"name": "latitude", "in": "query", "schema": {"type": "number"}, "required": true}, {"name": "longitude", "in": "query", "schema": {"type": "number"}, "required": true}, {"name": "radius_km", "in": "query", "schema": {"type": "number"}, "description": "Default 5, at most 50"}, {"name": "category", "in": "query", "schema": {"type": "string"}}, {"name": "language", "in": "query", "schema": {"type": "string", "enum": ["ja", "en", "zh", "zh-Hant", "ko", "vi", "th", "ms", "ar", "de", "es", "fr", "it", "pl", "pt", "ru", "tr"], "default": "en"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}], "responses": {"200": {"description": "Attractions: total, results[], attribution"}, "422": {"$ref": "#/components/responses/Error"}, "429": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}}}, "/attractions/meta": {"get": {"operationId": "attractionCatalogueInfo", "security": [], "responses": {"200": {"description": "Counts per language, images, last update"}}}}, "/attractions/{qid}": {"get": {"operationId": "getAttraction", "security": [], "parameters": [{"name": "qid", "in": "path", "required": true, "schema": {"type": "string", "pattern": "^Q[1-9][0-9]*$"}}, {"name": "language", "in": "query", "schema": {"type": "string", "enum": ["ja", "en", "zh", "zh-Hant", "ko", "vi", "th", "ms", "ar", "de", "es", "fr", "it", "pl", "pt", "ru", "tr"], "default": "en"}}], "responses": {"200": {"description": "Attraction with names, descriptions, images, links, group_tour and media"}, "404": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}}}, "/attractions/match": {"post": {"operationId": "matchAttraction", "description": "Which attraction a shot shows. Needs the media scope.", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"qid": {"type": "string"}, "name": {"type": "string"}, "latitude": {"type": "number"}, "longitude": {"type": "number"}}}}}}, "responses": {"200": {"description": "status matched, ambiguous or none, with candidates"}, "403": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}}}}, "/attractions/media": {"get": {"operationId": "listMyMedia", "description": "Media you sent, with review status.", "parameters": [{"name": "status", "in": "query", "schema": {"type": "string"}}, {"name": "qid", "in": "query", "schema": {"type": "string"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}, {"name": "offset", "in": "query", "schema": {"type": "integer"}}], "responses": {"200": {"description": "Your media"}, "403": {"$ref": "#/components/responses/Error"}}}, "post": {"operationId": "submitMedia", "description": "Send up to 100 media links. Needs the media and write scopes. Items are shown only after KIZUNA staff approve them; an item that matches no single attraction is returned unmatched with candidates.", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["items"], "properties": {"items": {"type": "array", "maxItems": 100, "items": {"type": "object", "required": ["external_ref", "url", "title", "attribution"], "properties": {"external_ref": {"type": "string", "description": "Your own id; resending it updates the item."}, "qid": {"type": "string", "description": "Wikidata QID of the attraction, when known."}, "attraction_name": {"type": "string", "description": "Used with shot coordinates when there is no qid."}, "shot": {"type": "object", "properties": {"latitude": {"type": "number"}, "longitude": {"type": "number"}}}, "media_type": {"type": "string", "enum": ["video", "drone_video", "photo", "panorama"]}, "url": {"type": "string", "format": "uri"}, "embed_url": {"type": "string", "format": "uri"}, "thumbnail_url": {"type": "string", "format": "uri"}, "title": {"type": "string"}, "caption": {"type": "string"}, "language": {"type": "string"}, "captured_on": {"type": "string", "format": "date"}, "duration_seconds": {"type": "integer"}, "licence": {"type": "string", "enum": ["partner", "cc0", "cc_by", "cc_by_sa"]}, "licence_url": {"type": "string", "format": "uri"}, "attribution": {"type": "string", "description": "Credit line shown with it."}, "provider": {"type": "string", "maxLength": 128, "description": "Who to credit as the provider (set when the item is first sent). Defaults to your account name."}}}}}}}}}, "responses": {"200": {"description": "One result per item"}, "403": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}, "503": {"$ref": "#/components/responses/Error"}}}}, "/products": {"get": {"operationId": "searchProducts", "security": [], "parameters": [{"name": "q", "in": "query", "schema": {"type": "string"}}, {"name": "product_type", "in": "query", "schema": {"type": "string"}}, {"name": "min_price", "in": "query", "schema": {"type": "number"}}, {"name": "max_price", "in": "query", "schema": {"type": "number"}}, {"name": "sort", "in": "query", "schema": {"type": "string"}}, {"name": "page", "in": "query", "schema": {"type": "integer"}}, {"name": "limit", "in": "query", "schema": {"type": "integer"}}, {"name": "lang", "in": "query", "schema": {"type": "string"}}], "responses": {"200": {"description": "Products"}, "422": {"$ref": "#/components/responses/Error"}}}}, "/products/{product_id}": {"get": {"operationId": "getProduct", "security": [], "parameters": [{"name": "product_id", "in": "path", "required": true, "schema": {"type": "integer"}}, {"name": "lang", "in": "query", "schema": {"type": "string", "enum": ["en", "ja", "zh", "ko"]}}], "responses": {"200": {"description": "Product, including cancellation_policy and meeting_location"}, "404": {"$ref": "#/components/responses/Error"}}}}, "/products/{product_id}/availability": {"get": {"operationId": "getAvailability", "security": [], "parameters": [{"name": "product_id", "in": "path", "required": true, "schema": {"type": "integer"}}, {"name": "date_from", "in": "query", "schema": {"type": "string", "format": "date"}}, {"name": "days", "in": "query", "schema": {"type": "integer", "maximum": 90}}], "responses": {"200": {"description": "Map of date to seats left and price"}, "404": {"$ref": "#/components/responses/Error"}}}}, "/bookings": {"post": {"operationId": "createBookingHold", "parameters": [{"name": "Idempotency-Key", "in": "header", "schema": {"type": "string", "maxLength": 255}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BookingRequest"}}}}, "responses": {"201": {"description": "Seats held", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BookingHold"}}}}, "200": {"description": "Retry of an earlier request; the original booking"}, "402": {"$ref": "#/components/responses/Error"}, "403": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}}}}, "/bookings/{booking_id}": {"get": {"operationId": "getBooking", "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "responses": {"200": {"description": "Booking"}, "404": {"$ref": "#/components/responses/Error"}}}}, "/bookings/{booking_id}/cancel": {"post": {"operationId": "cancelBooking", "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer"}}], "description": "Monthly-billed (postpaid) channels cannot cancel online (403 CANCEL_BY_STAFF); a paid booking inside the cancellation-fee period is refused with 409 CONTACT_STAFF.", "responses": {"200": {"description": "Cancelled"}, "403": {"$ref": "#/components/responses/Error"}, "404": {"$ref": "#/components/responses/Error"}, "409": {"$ref": "#/components/responses/Error"}, "422": {"$ref": "#/components/responses/Error"}}}}}}