{
	"openapi": "3.0.3",
	"info": {
		"title": "Sychev Lab MCP API",
		"description": "API for Sychev Lab 3D Models Marketplace",
		"version": "1.0.0",
		"contact": {
			"name": "Sychev Lab Support",
			"email": "support@lab.sychev.xyz"
		}
	},
	"servers": [
		{
			"url": "https://lab.sychev.xyz",
			"description": "Production server"
		}
	],
	"paths": {
		"/api/lab/products/index.json": {
			"get": {
				"summary": "Get products index",
				"description": "Search and browse all available 3D models and products",
				"parameters": [
					{
						"name": "category",
						"in": "query",
						"schema": {
							"type": "string",
							"enum": ["airsoft", "automotive", "electronics"]
						},
						"description": "Filter by product category"
					},
					{
						"name": "price_min",
						"in": "query",
						"schema": { "type": "number" },
						"description": "Minimum price filter in EUR"
					},
					{
						"name": "price_max",
						"in": "query",
						"schema": { "type": "number" },
						"description": "Maximum price filter in EUR"
					},
					{
						"name": "language",
						"in": "query",
						"schema": {
							"type": "string",
							"enum": ["es", "en"],
							"default": "es"
						},
						"description": "Language for results"
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "array",
											"items": {
												"type": "object",
												"properties": {
													"id": { "type": "string" },
													"title": { "type": "string" },
													"description": { "type": "string" },
													"price": { "type": "number" },
													"currency": { "type": "string" },
													"category": { "type": "array" },
													"tags": { "type": "array" },
													"images": { "type": "array" },
													"type": { "type": "string" }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/api/lab/products/{id}.{language}.json": {
			"get": {
				"summary": "Get product details",
				"description": "Get detailed information about a specific product",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": { "type": "string" },
						"description": "Product UUID"
					},
					{
						"name": "language",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string",
							"enum": ["es", "en"]
						},
						"description": "Language for product details"
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"product": {
													"type": "object",
													"properties": {
														"id": { "type": "string" },
														"title": { "type": "string" },
														"description": { "type": "string" },
														"price": { "type": "number" },
														"currency": { "type": "string" },
														"category": { "type": "array" },
														"tags": { "type": "array" },
														"images": { "type": "array" },
														"compatibility": { "type": "object" },
														"featured": { "type": "boolean" }
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/api/lab/categories.json": {
			"get": {
				"summary": "Get categories",
				"description": "Get all product categories",
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"data": {
											"type": "object",
											"properties": {
												"categories": {
													"type": "array",
													"items": { "type": "object" }
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		},
		"/api/lab/articles/{id}.{language}.json": {
			"get": {
				"summary": "Get article",
				"description": "Get a specific article by ID and language",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": { "type": "string" },
						"description": "Article UUID"
					},
					{
						"name": "language",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string",
							"enum": ["es", "en"]
						},
						"description": "Language for article"
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": { "type": "string" },
										"title": { "type": "string" },
										"content": { "type": "string" },
										"author": { "type": "string" },
										"published_at": { "type": "string" },
										"tags": { "type": "array" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/api/lab/tutorials/{id}.{language}.json": {
			"get": {
				"summary": "Get tutorial",
				"description": "Get a specific tutorial by ID and language",
				"parameters": [
					{
						"name": "id",
						"in": "path",
						"required": true,
						"schema": { "type": "string" },
						"description": "Tutorial UUID"
					},
					{
						"name": "language",
						"in": "path",
						"required": true,
						"schema": {
							"type": "string",
							"enum": ["es", "en"]
						},
						"description": "Language for tutorial"
					}
				],
				"responses": {
					"200": {
						"description": "Successful response",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"id": { "type": "string" },
										"title": { "type": "string" },
										"content": { "type": "string" },
										"author": { "type": "string" },
										"published_at": { "type": "string" },
										"tags": { "type": "array" },
										"difficulty": { "type": "string" },
										"duration": { "type": "string" }
									}
								}
							}
						}
					}
				}
			}
		},
		"/api/stripe/checkout-secure": {
			"post": {
				"summary": "Create checkout session",
				"description": "Create a secure Stripe checkout session for purchasing products",
				"requestBody": {
					"required": true,
					"content": {
						"application/json": {
							"schema": {
								"type": "object",
								"properties": {
									"productId": {
										"type": "string",
										"format": "uuid"
									},
									"quantity": {
										"type": "number",
										"minimum": 1,
										"maximum": 10
									},
									"guestEmail": {
										"type": "string",
										"format": "email"
									},
									"guestName": {
										"type": "string"
									},
									"locale": {
										"type": "string",
										"enum": ["es", "en"]
									}
								},
								"required": ["productId"]
							}
						}
					}
				},
				"responses": {
					"200": {
						"description": "Successful checkout creation",
						"content": {
							"application/json": {
								"schema": {
									"type": "object",
									"properties": {
										"sessionId": { "type": "string" },
										"url": { "type": "string" },
										"product": {
											"type": "object",
											"properties": {
												"id": { "type": "string" },
												"name": { "type": "string" },
												"price": { "type": "number" },
												"currency": { "type": "string" },
												"type": { "type": "string" }
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}
