• Create many products handler

    Parameters

    • productService: ProductDataService

      injected service use to handle the catalog related operations

    • productVariantService: ProductVariantDataService
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

    Returns Promise<adapter.AdapterHandlerResponse>

    201 Status Created

    • data: created products

    Description

    This handler is used to create many products by applying the following steps in sequence:

    1. Get the orgId from params

    2. Create many products (productService.createManyProducts)

    3. Get the created products (productService.getProductsListAndAggregate)

    4. Return the created products

    Throws

    Error

    • orgId is missing from path

    Throws

    500 NBError Internal Server Error

    • Error happen when create products from database

Generated using TypeDoc