{"openapi":"3.0.3","info":{"title":"BloomHub External API","version":"1.0.0","description":"Проверенный внешний контракт чтения, только активный ENTERPRISE. Управление ключами — в настройках BloomHub. Внутренние CRM маршруты сюда не входят."},"servers":[{"url":"https://bloomhub.ru/api/v1"}],"security":[{"ApiKey":[]}],"paths":{"/me":{"get":{"summary":"Проверка ключа, разрешения и валюта","description":"Разрешение: Любой действующий ключ. Только чтение.","parameters":[],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/locations":{"get":{"summary":"Доступные точки магазина","description":"Разрешение: Любой действующий ключ. Только чтение.","parameters":[],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationList"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/products":{"get":{"summary":"Активные товары и розничные цены","description":"Разрешение: catalog:read. Только чтение.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"updatedAfter","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"locationId","in":"query","required":false,"description":"Для /stock обязателен, если ключ не закреплён за точкой. У recipes ограничение точки не означает наличие: рецепты общие.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPage"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/recipes":{"get":{"summary":"Активные рецепты: карточки букетов и композиции","description":"Разрешение: catalog:read. Только чтение.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"updatedAfter","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"locationId","in":"query","required":false,"description":"Для /stock обязателен, если ключ не закреплён за точкой. У recipes ограничение точки не означает наличие: рецепты общие.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipePage"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stock":{"get":{"summary":"Физический остаток, резерв и свободное количество на точке","description":"Разрешение: stock:read. Только чтение.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"updatedAfter","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"locationId","in":"query","required":false,"description":"Для /stock обязателен, если ключ не закреплён за точкой. У recipes ограничение точки не означает наличие: рецепты общие.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockPage"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders":{"get":{"summary":"Сводка заказов и состав","description":"Разрешение: orders:read. Только чтение.","parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"updatedAfter","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"locationId","in":"query","required":false,"description":"Для /stock обязателен, если ключ не закреплён за точкой. У recipes ограничение точки не означает наличие: рецепты общие.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPage"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/orders/{id}":{"get":{"summary":"Один заказ и состав по ID","description":"Разрешение: orders:read. Только чтение.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"locationId","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Успешно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDetail"}}}},"400":{"description":"Некорректные параметры","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Неверный ключ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Нет тарифа, разрешения или точки","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Не найдено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Лимит, см. Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Недоступно","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","description":"Постоянный ключ bh_live.…, показывается один раз при создании. Не JWT сессии CRM."}},"schemas":{"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"hasMore":{"type":"boolean"}},"required":["page","limit","hasMore"]},"Product":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sku":{"type":"string","nullable":true},"barcode":{"type":"string","nullable":true},"sellPrice":{"type":"number"},"unit":{"type":"string"},"image":{"type":"string","nullable":true},"categoryId":{"type":"string","nullable":true,"format":"uuid"},"trackStock":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","sku","barcode","sellPrice","unit","image","categoryId","trackStock","updatedAt"]},"Recipe":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"sellPrice":{"type":"number"},"image":{"type":"string","nullable":true},"photos":{"type":"array","items":{"type":"string"}},"video":{"type":"string","nullable":true},"sectionId":{"type":"string","nullable":true,"format":"uuid"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","description","sku","sellPrice","image","photos","video","sectionId","updatedAt"]},"Stock":{"type":"object","properties":{"inventoryItemId":{"type":"string","format":"uuid"},"productId":{"type":"string","nullable":true,"format":"uuid"},"variantId":{"type":"string","nullable":true,"format":"uuid"},"name":{"type":"string"},"unit":{"type":"string"},"locationId":{"type":"string","format":"uuid"},"physicalStock":{"type":"number"},"reservedStock":{"type":"number"},"freeStock":{"type":"number"},"trackStock":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"}},"required":["inventoryItemId","productId","variantId","name","unit","locationId","physicalStock","reservedStock","freeStock","trackStock","updatedAt"]},"Location":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"city":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"timezone":{"type":"string"}},"required":["id","name","city","address","timezone"]},"OrderItem":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"productId":{"type":"string","nullable":true,"format":"uuid"},"recipeId":{"type":"string","nullable":true,"format":"uuid"},"variantId":{"type":"string","nullable":true,"format":"uuid"},"name":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"total":{"type":"number"}},"required":["id","productId","recipeId","variantId","name","quantity","unitPrice","total"]},"Me":{"type":"object","properties":{"apiVersion":{"type":"integer","enum":[1]},"tenantId":{"type":"string","format":"uuid"},"scopes":{"type":"array","items":{"type":"string"}},"locationId":{"type":"string","nullable":true,"format":"uuid"},"currency":{"type":"string"}},"required":["apiVersion","tenantId","scopes","locationId","currency"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"message":{"type":"string"}}},"Order":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orderNumber":{"type":"string","nullable":true},"status":{"type":"string"},"totalAmount":{"type":"number"},"paidAmount":{"type":"number"},"isPosSale":{"type":"boolean"},"locationId":{"type":"string","nullable":true,"format":"uuid"},"deliveryDate":{"type":"string","nullable":true,"format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}}},"required":["id","orderNumber","status","totalAmount","paidAmount","isPosSale","locationId","deliveryDate","createdAt","updatedAt","items"]},"ProductPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"RecipePage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Recipe"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"StockPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Stock"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"OrderPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["items","pagination"]},"LocationList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Location"}}},"required":["items"]},"OrderDetail":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/Order"}},"required":["order"]}}}}