openapi: 3.2.0 info: title: Vencart Products API version: 0.1.0 tags: - name: Products paths: /hubs/{hub_id}/products: get: tags: - Products summary: List products in a hub for user search description: 'Endpoint to retrieve products based on the passed string and hub ID. Args: hub_id (int): Hub identifier. product_name: Product name to filter by. Defaults to Query(..., min_length=1, description="Search text"). subcategory_id: Subcategory ID to filter by. params (Params, optional): Pagination parameters. Defaults to Depends(). session (AsyncSession, optional): Database session. Defaults to Depends(async_get_session). product_controller (ProductController, optional): Product controller instance. Defaults to Depends(get_product_controller). hub_controller (HubController, optional): Hub controller instance. Defaults to Depends(get_hub_controller). user (User, optional): Authenticated user. Defaults to Depends(try_get_user_by_firebase_user). Returns: List[ProductRetrieveSchema]: contains the products retrieved for the given hub_id and product_name, formatted according to the ProductRetrieveSchema Pydantic model' operationId: get_products_for_user_by_hub_id_hubs__hub_id__products_get parameters: - name: hub_id in: path required: true schema: type: integer title: Hub Id - name: subcategory_id in: query required: false schema: anyOf: - type: integer - type: 'null' description: Filter by subcategory title: Subcategory Id description: Filter by subcategory - name: category_id in: query required: false schema: anyOf: - type: integer - type: 'null' description: Filter by category title: Category Id description: Filter by category - name: product_name in: query required: false schema: anyOf: - type: string - type: 'null' description: Search text title: Product Name description: Search text - name: page in: query required: false schema: type: integer minimum: 1 default: 1 title: Page - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 50 title: Size responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/ProductRetrieveSchema' title: Response Get Products For User By Hub Id Hubs Hub Id Products Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /hubs/{hub_id}/products/{product_id}: get: tags: - Products summary: Get Product Detail For User By Hub Id operationId: get_product_detail_for_user_by_hub_id_hubs__hub_id__products__product_id__get parameters: - name: hub_id in: path required: true schema: type: integer title: Hub Id - name: product_id in: path required: true schema: type: integer title: Product Id responses: '200': description: product detail successfully retrieved content: application/json: schema: $ref: '#/components/schemas/ProductRetrieveSchema' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /hubs/{hub_id}/products/{product_id}/also-like: get: tags: - Products summary: Products frequently purchased together with this product at this hub operationId: get_also_like_products_for_user_hubs__hub_id__products__product_id__also_like_get parameters: - name: hub_id in: path required: true schema: type: integer title: Hub Id - name: product_id in: path required: true schema: type: integer title: Product Id responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/ProductRetrieveSchema' title: Response Get Also Like Products For User Hubs Hub Id Products Product Id Also Like Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /hubs/{hub_id}/bestsellers: get: tags: - Products summary: Get Bestsellers For User By Hub Id operationId: get_bestsellers_for_user_by_hub_id_hubs__hub_id__bestsellers_get parameters: - name: hub_id in: path required: true schema: type: integer title: Hub Id - name: category_id in: query required: false schema: anyOf: - type: integer - type: 'null' title: Category Id - name: page in: query required: false schema: type: integer minimum: 1 default: 1 title: Page - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 50 title: Size responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /hubs/{hub_id}/discounted: get: tags: - Products summary: Get Discounted Products For User By Hub Id operationId: get_discounted_products_for_user_by_hub_id_hubs__hub_id__discounted_get parameters: - name: hub_id in: path required: true schema: type: integer title: Hub Id - name: category_id in: query required: false schema: anyOf: - type: integer - type: 'null' title: Category Id - name: page in: query required: false schema: type: integer minimum: 1 default: 1 title: Page - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 50 title: Size responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /hubs/{hub_id}/promotions: get: tags: - Products summary: Get Promotion Products For User By Hub Id operationId: get_promotion_products_for_user_by_hub_id_hubs__hub_id__promotions_get parameters: - name: hub_id in: path required: true schema: type: integer title: Hub Id - name: category_id in: query required: false schema: anyOf: - type: integer - type: 'null' title: Category Id - name: page in: query required: false schema: type: integer minimum: 1 default: 1 title: Page - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 50 title: Size responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ProductRetrieveSchema: properties: name: type: string title: Name image_url: anyOf: - type: string - type: 'null' title: Image Url upc: anyOf: - type: string - type: 'null' title: Upc original_price: type: integer title: Original Price discounted_price: anyOf: - type: integer - type: 'null' title: Discounted Price quantity_in_stock: type: integer title: Quantity In Stock max_per_order: type: integer title: Max Per Order subcategory_id: type: integer title: Subcategory Id category_id: type: integer title: Category Id hub_id: type: integer title: Hub Id is_favorite: type: boolean title: Is Favorite id: type: integer title: Id description: anyOf: - type: string - type: 'null' title: Description subcategory: type: string title: Subcategory category: type: string title: Category quantity_in_basket: type: integer title: Quantity In Basket tax_type: $ref: '#/components/schemas/ProductTaxType' type: anyOf: - type: string - type: 'null' title: Type nutrition: anyOf: - additionalProperties: true type: object - type: 'null' title: Nutrition tax_code: anyOf: - type: string - type: 'null' title: Tax Code similar_products: anyOf: - items: $ref: '#/components/schemas/SimilarProductSchema' type: array - type: 'null' title: Similar Products deal_ids: items: type: integer type: array title: Deal Ids default: [] type: object required: - name - image_url - upc - original_price - quantity_in_stock - max_per_order - subcategory_id - category_id - hub_id - is_favorite - id - subcategory - category - quantity_in_basket - tax_type title: ProductRetrieveSchema SimilarProductSchema: properties: name: type: string title: Name image_url: anyOf: - type: string - type: 'null' title: Image Url upc: anyOf: - type: string - type: 'null' title: Upc original_price: type: integer title: Original Price discounted_price: anyOf: - type: integer - type: 'null' title: Discounted Price quantity_in_stock: type: integer title: Quantity In Stock max_per_order: type: integer title: Max Per Order subcategory_id: type: integer title: Subcategory Id category_id: type: integer title: Category Id hub_id: type: integer title: Hub Id is_favorite: type: boolean title: Is Favorite id: type: integer title: Id subcategory: type: string title: Subcategory category: type: string title: Category type: object required: - name - image_url - upc - original_price - quantity_in_stock - max_per_order - subcategory_id - category_id - hub_id - is_favorite - id - subcategory - category title: SimilarProductSchema ProductTaxType: type: string enum: - sales_tax - bottle_tax - no_tax - unknown_tax title: ProductTaxType HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError