> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maalbar.dk/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a screening for a product



## OpenAPI

````yaml post /products/{productPublicId}/screenings
openapi: 3.1.0
info:
  title: MÅLBAR LCA API
  version: 1.0.0
  description: API for Life Cycle Assessment (LCA) screening capabilities
servers:
  - url: https://api.maalbar.dk/v1
    description: MÅLBAR LCA API
security: []
paths:
  /products/{productPublicId}/screenings:
    post:
      tags:
        - Product
      summary: Create a screening for a product
      operationId: post-products-{productPublicId}-screenings
      parameters:
        - in: path
          name: productPublicId
          schema:
            type: string
          required: true
          example: '123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScreeningForProductApiInput'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateScreeningForProductApiOutput'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateScreeningForProductApiInput:
      $ref: '#/components/schemas/CreateScreeningForProductSchema'
    CreateScreeningForProductApiOutput:
      type: object
      properties:
        publicId:
          type: string
          minLength: 16
          maxLength: 16
          example: scr_xxxxxxxxxxxx
        totalWeight:
          type: number
          nullable: true
        productReplacementRateQuality:
          type: number
          nullable: true
        productReplacementRateLogistics:
          type: number
          nullable: true
        functionalUnitValue:
          type: number
          nullable: true
        energyOperationalConsumption:
          type: number
          nullable: true
        energyStandbyConsumption:
          type: number
          nullable: true
        lightSourceOperationalConsumption:
          type: number
          nullable: true
        lightSourceStandbyConsumption:
          type: number
          nullable: true
        notes:
          type: string
          nullable: true
        product:
          type: object
          properties:
            publicId:
              type: string
              minLength: 16
              maxLength: 16
              example: prd_xxxxxxxxxxxx
            name:
              type: string
              nullable: true
            ean:
              type: string
              nullable: true
            sku:
              type: string
              nullable: true
          required:
            - publicId
        category:
          type: object
          properties:
            publicId:
              type: string
              minLength: 16
              maxLength: 16
              example: cat_xxxxxxxxxxxx
            name:
              type: string
          required:
            - publicId
            - name
          nullable: true
        transportLocation:
          type: object
          properties:
            publicId:
              type: string
              minLength: 16
              maxLength: 16
              example: trl_xxxxxxxxxxxx
          required:
            - publicId
          nullable: true
        distribution:
          type: object
          properties:
            publicId:
              type: string
              minLength: 16
              maxLength: 16
              example: csh_xxxxxxxxxxxx
            name:
              type: string
          required:
            - publicId
            - name
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - publicId
        - product
        - createdAt
        - updatedAt
    CreateScreeningForProductSchema:
      type: object
      properties:
        totalWeight:
          type: number
          minimum: 0
          nullable: true
        energyOperationalConsumption:
          type: number
          minimum: 0
          nullable: true
        energyStandbyConsumption:
          type: number
          minimum: 0
          nullable: true
        lightSocketType:
          type: string
        amountOfLightSockets:
          type: number
          minimum: 0
          default: 0
        lightSourceOperationalConsumption:
          type: number
          minimum: 0
          nullable: true
        lightSourceStandbyConsumption:
          type: number
          minimum: 0
          nullable: true
        notes:
          type: string
          maxLength: 255
          nullable: true
        transportLocation:
          type: object
          properties:
            publicId:
              type: string
              minLength: 16
              maxLength: 16
              example: trl_xxxxxxxxxxxx
          required:
            - publicId
          nullable: true
        distribution:
          type: object
          properties:
            publicId:
              type: string
              minLength: 16
              maxLength: 16
              example: csh_xxxxxxxxxxxx
          required:
            - publicId
          nullable: true
      required:
        - lightSocketType
        - amountOfLightSockets
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid request parameters
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Authentication required
    '404':
      description: Not Found
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Resource not found
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: An unexpected error occurred
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````