{
  "openapi": "3.1.0",
  "info": {
    "title": "Bustora – order renovation and repair work in Lithuania, contact the admin",
    "version": "1.0.0",
    "description": "Lets a person, or an AI assistant acting for them, post a renovation or repair job (e.g. bathroom renovation in Kaunas) to Bustora Darbai without creating an account. Contractors (meistrai) then send up to 4 quotes. Posting is free for the client. The job is published only after the person opens the link emailed to them and confirms, so always use the person's own email address and tell them to check their inbox. Texts may be in Lithuanian or English.",
    "contact": {
      "url": "https://bustora.lt/remontas"
    }
  },
  "servers": [
    {
      "url": "https://bustora.lt"
    }
  ],
  "paths": {
    "/api/v1/darbai/kategorijos": {
      "get": {
        "operationId": "listCategories",
        "summary": "List job categories and subcategories",
        "responses": {
          "200": {
            "description": "Categories",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/kontaktai": {
      "post": {
        "operationId": "contactAdmin",
        "summary": "Send a question, suggestion or data correction to the Bustora admin",
        "description": "Not for ordering work (use createJobRequest). Read by a person; replies go to reply_email if given.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "message": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 1800
                  },
                  "topic": {
                    "type": "string",
                    "enum": [
                      "question",
                      "suggestion",
                      "data_error",
                      "other"
                    ]
                  },
                  "reply_email": {
                    "type": "string",
                    "format": "email",
                    "description": "Where the admin can answer. Optional."
                  },
                  "agent_name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Which assistant is writing, e.g. 'Claude'."
                  },
                  "on_behalf_of": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Who the agent acts for, if anyone. Optional."
                  },
                  "page_url": {
                    "type": "string",
                    "description": "The bustora.lt page the message is about. Optional."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Delivered to the admin"
          },
          "400": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limited (5 per hour per IP)"
          }
        }
      }
    },
    "/api/v1/darbai/uzklausos": {
      "post": {
        "operationId": "createJobRequest",
        "summary": "Request quotes for a job (published after email confirmation)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "phone",
                  "description",
                  "city"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "The person's own email. A confirmation link is sent here."
                  },
                  "description": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 4000,
                    "description": "What needs doing: rooms, sizes in m², materials, condition, deadline."
                  },
                  "title": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 120,
                    "description": "Short title. Derived from the description if omitted."
                  },
                  "category": {
                    "type": "string",
                    "description": "Category slug from listCategories, e.g. 'santechnika'. Optional."
                  },
                  "subcategory": {
                    "type": "string",
                    "description": "Subcategory slug, e.g. 'bathroom-installation'. Implies its category."
                  },
                  "city": {
                    "type": "string",
                    "description": "City or village in Lithuania, e.g. 'Kaunas'."
                  },
                  "budget_max_eur": {
                    "type": "number",
                    "minimum": 1,
                    "description": "Upper budget in EUR. Optional."
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Name shown to contractors. Optional."
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 30,
                    "description": "The person's phone, e.g. +370 600 00000 or 8 600 00000. Required: contractors call to clarify details."
                  }
                }
              },
              "example": {
                "email": "vardas@example.com",
                "phone": "+370 600 00000",
                "title": "Vonios kambario remontas, 5 m²",
                "description": "Reikia pilnai suremontuoti 5 m² vonios kambarį bute: išardyti seną plytelių dangą, nauja hidroizoliacija, plytelės, dušo kabina vietoj vonios, nauja santechnika. Pradžia – gruodžio mėn.",
                "subcategory": "bathroom-installation",
                "city": "Kaunas",
                "budget_max_eur": 5000
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted; waiting for the person to confirm by email"
          },
          "400": {
            "description": "Validation failed; `fields` names each problem"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    }
  }
}