{
  "openapi": "3.1.0",
  "info": {
    "title": "Beast Supplements catalog API",
    "version": "2026-12-03",
    "description": "Read-only product catalog of beastsupplements.rs. No key, CORS open. Generated from the live shop data; responses are cached for up to 5 minutes. Prices in RSD incl. VAT, shipping not included. No customer data is exposed. Ingredients and dosage: see the product page and the label on the package."
  },
  "servers": [
    {
      "url": "https://www.beastsupplements.rs"
    }
  ],
  "externalDocs": {
    "description": "Agent overview",
    "url": "https://www.beastsupplements.rs/llms.txt"
  },
  "paths": {
    "/api/katalog": {
      "get": {
        "operationId": "searchProducts",
        "summary": "Search and filter products",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Free text; every word must match. Serbian with or without diacritics.",
            "schema": {
              "type": "string",
              "maxLength": 80
            },
            "example": "kreatin"
          },
          {
            "name": "kategorija",
            "in": "query",
            "required": false,
            "description": "Category name or part of it.",
            "schema": {
              "type": "string",
              "maxLength": 80
            },
            "example": "Kreatini"
          },
          {
            "name": "brend",
            "in": "query",
            "required": false,
            "description": "Brand name or part of it.",
            "schema": {
              "type": "string",
              "maxLength": 80
            },
            "example": "Olimp"
          },
          {
            "name": "naStanju",
            "in": "query",
            "required": false,
            "description": "1, true or da = only products in stock. Any other value returns all products.",
            "schema": {
              "type": "string",
              "enum": [
                "1",
                "true",
                "da"
              ]
            }
          },
          {
            "name": "minCena",
            "in": "query",
            "required": false,
            "description": "Minimum price the shopper pays (RSD, inclusive).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000000
            },
            "example": 1000
          },
          {
            "name": "maxCena",
            "in": "query",
            "required": false,
            "description": "Maximum price the shopper pays (RSD, inclusive).",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000000
            },
            "example": 4000
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "relevance (default) = title match, then in stock, then cheapest; ignores order. cena = price, cenaPoPorciji = price per serving, cenaPoKg = price per kg, naziv = name. Products without the sorted value come last; check meta.sortCoverage before naming the cheapest.",
            "schema": {
              "type": "string",
              "enum": [
                "relevance",
                "cena",
                "cenaPoPorciji",
                "cenaPoKg",
                "naziv"
              ],
              "default": "relevance"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "Sort direction for every sort except relevance.",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "description": "Comma-separated product ids (max 50), combined with the other filters. Unknown ids are skipped. Without limit, all found ids are returned.",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,9}(,\\d{1,9})*$"
            },
            "example": "3902,3910"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Number of results (default 20, or 50 with ids). There is no pagination; narrow the query instead.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching products (possibly empty).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "error"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CatalogItem"
                      }
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Serbian message when success is false."
                    },
                    "meta": {
                      "type": "object",
                      "description": "total = matches before limit; query = parsed parameters. sortCoverage appears for sort=cenaPoPorciji or cenaPoKg.",
                      "properties": {
                        "sortCoverage": {
                          "type": "object",
                          "description": "How many matches have the sorted value. Products without it are listed last, so with low coverage the first result is not the cheapest in the shop.",
                          "properties": {
                            "field": {
                              "type": "string",
                              "enum": [
                                "pricePerServing",
                                "pricePerKg"
                              ]
                            },
                            "withValue": {
                              "type": "integer",
                              "description": "Matches (before limit) that have the value."
                            },
                            "total": {
                              "type": "integer"
                            },
                            "note": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Serbian warning when fewer than half of the matches have the value."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/katalog/{id}": {
      "get": {
        "operationId": "getProduct",
        "summary": "One product with the flavors of its family",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "example": 3939
          }
        ],
        "responses": {
          "200": {
            "description": "The product.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "success",
                    "data",
                    "error"
                  ],
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/CatalogItem"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "flavors": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      ]
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Serbian message when success is false."
                    },
                    "meta": {
                      "type": "object",
                      "description": "total = matches before limit; query = parsed parameters. sortCoverage appears for sort=cenaPoPorciji or cenaPoKg.",
                      "properties": {
                        "sortCoverage": {
                          "type": "object",
                          "description": "How many matches have the sorted value. Products without it are listed last, so with low coverage the first result is not the cheapest in the shop.",
                          "properties": {
                            "field": {
                              "type": "string",
                              "enum": [
                                "pricePerServing",
                                "pricePerKg"
                              ]
                            },
                            "withValue": {
                              "type": "integer",
                              "description": "Matches (before limit) that have the value."
                            },
                            "total": {
                              "type": "integer"
                            },
                            "note": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "Serbian warning when fewer than half of the matches have the value."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogItem": {
        "type": "object",
        "required": [
          "id",
          "name",
          "brand",
          "category",
          "currency",
          "price",
          "inStock",
          "url",
          "markdownUrl",
          "cartUrl"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "example": 3939
          },
          "name": {
            "type": "string",
            "description": "Display title as on the product page."
          },
          "brand": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "flavor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Flavor taken from the product name, null when none."
          },
          "weight": {
            "type": "string",
            "description": "Pack size as entered in the shop, e.g. \"420g\" or \"120 kapsula\"."
          },
          "currency": {
            "type": "string",
            "const": "RSD"
          },
          "price": {
            "type": "number",
            "description": "Price the shopper pays now (sale price when on sale), RSD incl. VAT."
          },
          "regularPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "When on sale: lowest price in the previous 30 days, RSD. Otherwise null."
          },
          "pricePerServing": {
            "type": [
              "number",
              "null"
            ],
            "description": "price / servings, RSD, rounded. Null when servings are unknown."
          },
          "pricePerKg": {
            "type": [
              "number",
              "null"
            ],
            "description": "Price per kilogram of pack weight, RSD. Null when weight is not in grams."
          },
          "servings": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Servings per pack from the label (entered per SKU), else from the product copy; null when unknown."
          },
          "inStock": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Canonical HTML product page."
          },
          "markdownUrl": {
            "type": "string",
            "format": "uri",
            "description": "Markdown version of the product page."
          },
          "cartUrl": {
            "type": "string",
            "format": "uri",
            "description": "Opens the cart with this product added; checkout stays with the shopper."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "400 invalid parameter, 404 unknown product, 503 catalog temporarily unavailable (see Retry-After).",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "success",
                "data",
                "error"
              ],
              "properties": {
                "success": {
                  "type": "boolean"
                },
                "data": {
                  "type": "null"
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Serbian message when success is false."
                },
                "meta": {
                  "type": "object",
                  "description": "total = matches before limit; query = parsed parameters. sortCoverage appears for sort=cenaPoPorciji or cenaPoKg.",
                  "properties": {
                    "sortCoverage": {
                      "type": "object",
                      "description": "How many matches have the sorted value. Products without it are listed last, so with low coverage the first result is not the cheapest in the shop.",
                      "properties": {
                        "field": {
                          "type": "string",
                          "enum": [
                            "pricePerServing",
                            "pricePerKg"
                          ]
                        },
                        "withValue": {
                          "type": "integer",
                          "description": "Matches (before limit) that have the value."
                        },
                        "total": {
                          "type": "integer"
                        },
                        "note": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Serbian warning when fewer than half of the matches have the value."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}