{
  "openapi": "3.1.0",
  "info": {
    "title": "3D Print Land Public AI Tools",
    "version": "1.0.0",
    "description": "Official catalog and non-binding weight-based estimates in GEL. Contact: +995 598 67 98 89. No order or payment is created. Fetch capabilities for current material IDs and prices.",
    "contact": {
      "name": "3D Print Land",
      "url": "https://3dprintland.ge/contact",
      "email": "3dprintland73@gmail.com"
    }
  },
  "servers": [
    {
      "url": "https://3dprintland.ge"
    }
  ],
  "security": [],
  "paths": {
    "/api/v1/capabilities": {
      "get": {
        "operationId": "getCapabilities",
        "summary": "Get current services, material rates, tolerances and official contact",
        "description": "Reads the same current catalog as the website. Prices are base rates per 100 grams in GEL, not stock guarantees. Confirm project-specific tolerances.",
        "responses": {
          "200": {
            "description": "Current public catalog; no customer or internal configuration data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            }
          },
          "503": {
            "description": "Catalog unavailable; contact the workshop.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/estimate": {
      "post": {
        "operationId": "estimatePrintPrice",
        "summary": "Estimate printing price from material and weight",
        "description": "Fetch capabilities first. Formula: max(current minimum, weightGrams * pricePer100g / 100), rounded to 0.01 GEL. Minimum is at least 20 GEL (FDM) and 50 GEL for SLA resin materials. Excludes color premiums, supports, print time, finishing, delivery and volume discounts. Final price requires confirmation. No side effects.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "description": "JSON body limited to 4096 bytes. Only material and weightGrams are accepted.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateInput"
              },
              "example": {
                "material": "pla",
                "weightGrams": 50
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Non-binding estimate and official contact.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON, unsupported fields, invalid weight or unknown material.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "JSON body exceeds 4096 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Pricing unavailable; no cached or invented quote is returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Contact": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "phone",
          "phoneE164",
          "whatsapp",
          "email",
          "website"
        ],
        "properties": {
          "phone": {
            "type": "string"
          },
          "phoneE164": {
            "type": "string"
          },
          "whatsapp": {
            "type": "string",
            "format": "uri"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "website": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "EstimateInput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "material",
          "weightGrams"
        ],
        "properties": {
          "material": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Exact case-sensitive ID from getCapabilities, e.g. pla or standard-resin."
          },
          "weightGrams": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100000,
            "description": "Total material weight in grams; not volume or infill percentage."
          }
        }
      },
      "Material": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "technology",
          "name",
          "pricePer100g"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "technology": {
            "type": "string",
            "enum": [
              "fdm",
              "sla"
            ]
          },
          "name": {
            "type": "string"
          },
          "pricePer100g": {
            "type": "number",
            "minimum": 0
          }
        }
      },
      "Capabilities": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "currency",
          "contact",
          "services",
          "materials",
          "tolerances",
          "estimate",
          "documentation"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "currency": {
            "type": "string",
            "const": "GEL"
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "minimumPrice",
                "url"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "minimumPrice": {
                  "type": "number",
                  "minimum": 0
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "materials": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Material"
            }
          },
          "tolerances": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "printing",
              "scanning",
              "modeling"
            ],
            "properties": {
              "printing": {
                "type": "string"
              },
              "scanning": {
                "type": "string"
              },
              "modeling": {
                "type": "string"
              }
            }
          },
          "estimate": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "url",
              "method",
              "formula",
              "minimumOrderPrice",
              "maximumWeightGrams",
              "disclaimer"
            ],
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "method": {
                "type": "string",
                "const": "POST"
              },
              "formula": {
                "type": "string"
              },
              "minimumOrderPrice": {
                "type": "number",
                "minimum": 20
              },
              "maximumWeightGrams": {
                "type": "number",
                "const": 100000
              },
              "disclaimer": {
                "type": "string"
              }
            }
          },
          "documentation": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "openapi",
              "summary",
              "dossier"
            ],
            "properties": {
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "summary": {
                "type": "string",
                "format": "uri"
              },
              "dossier": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "Estimate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "material",
          "weightGrams",
          "pricePer100g",
          "estimatedPrice",
          "currency",
          "minimumOrderPrice",
          "minimumApplied",
          "isBinding",
          "disclaimer",
          "contact"
        ],
        "properties": {
          "material": {
            "type": "string"
          },
          "weightGrams": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 100000
          },
          "pricePer100g": {
            "type": "number",
            "minimum": 0
          },
          "estimatedPrice": {
            "type": "number",
            "minimum": 20
          },
          "currency": {
            "type": "string",
            "const": "GEL"
          },
          "minimumOrderPrice": {
            "type": "number",
            "minimum": 20
          },
          "minimumApplied": {
            "type": "boolean"
          },
          "isBinding": {
            "type": "boolean",
            "const": false
          },
          "disclaimer": {
            "type": "string"
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          }
        }
      }
    }
  }
}
