{ "swagger": "2.0", "info": { "title": "main.proto", "version": "version not set" }, "tags": [ { "name": "CRM" } ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/breadcrumbs/{id}": { "get": { "operationId": "CRM_GetBreadcrumbs", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/crmBreadcrumbsRsp" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "format": "int64" } ], "tags": [ "CRM" ] } }, "/card": { "post": { "operationId": "CRM_GetCard", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/crmCardRsp" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "items", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmOrderItem" } } } ], "tags": [ "CRM" ] } }, "/catalog": { "get": { "operationId": "CRM_GetCatalog", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/crmCatalogRsp" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "tags": [ "CRM" ] } }, "/orders": { "post": { "operationId": "CRM_Order", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/crmOrderRsp" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "order", "in": "body", "required": true, "schema": { "$ref": "#/definitions/crabscrmOrder" } }, { "name": "name", "in": "query", "required": false, "type": "string" }, { "name": "phone", "in": "query", "required": false, "type": "string" } ], "tags": [ "CRM" ] } }, "/positions/{id}": { "get": { "operationId": "CRM_GetPositions", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/crmPositionsRsp" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "format": "int64" } ], "tags": [ "CRM" ] } }, "/products/{id}": { "get": { "operationId": "CRM_GetProduct", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/crmProductRsp" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/rpcStatus" } } }, "parameters": [ { "name": "id", "in": "path", "required": true, "type": "string", "format": "int64" } ], "tags": [ "CRM" ] } } }, "definitions": { "crabscrmOrder": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmOrderItem" } } } }, "crmBreadcrumbsRsp": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmCategory" } } } }, "crmCardItem": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "article": { "type": "string" }, "name": { "type": "string" }, "uri": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "unit": { "type": "string" }, "inventory": { "type": "number", "format": "double" }, "count": { "type": "string", "format": "int64" }, "amount": { "type": "string", "format": "int64" } } }, "crmCardRsp": { "type": "object", "properties": { "items": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmCardItem" } } } }, "crmCatalogRsp": { "type": "object", "properties": { "categories": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmCategory" } } } }, "crmCategory": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "name": { "type": "string" }, "uri": { "type": "string" }, "children": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmCategory" } } } }, "crmCharacteristic": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "crmGroupedProduct": { "type": "object", "properties": { "name": { "type": "string" }, "uri": { "type": "string" }, "image": { "type": "string" } } }, "crmOrderItem": { "type": "object", "properties": { "productId": { "type": "string", "format": "int64" }, "count": { "type": "string", "format": "int64" } } }, "crmOrderRsp": { "type": "object" }, "crmPositionsRsp": { "type": "object", "properties": { "products": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmProduct" } } } }, "crmProduct": { "type": "object", "properties": { "id": { "type": "string", "format": "int64" }, "article": { "type": "string" }, "name": { "type": "string" }, "uri": { "type": "string" }, "images": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "groupedProducts": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmGroupedProduct" } }, "unit": { "type": "string" }, "inventory": { "type": "number", "format": "double" }, "variants": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmVariant" } }, "characteristics": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmCharacteristic" } }, "category": { "type": "string", "format": "int64" } } }, "crmProductRsp": { "type": "object", "properties": { "product": { "$ref": "#/definitions/crmProduct" } } }, "crmProperty": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "crmVariant": { "type": "object", "properties": { "price": { "type": "string", "format": "int64" }, "properties": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/crmProperty" } } } }, "protobufAny": { "type": "object", "properties": { "@type": { "type": "string" } }, "additionalProperties": {} }, "rpcStatus": { "type": "object", "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" }, "details": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/protobufAny" } } } } } }