openapi: 3.0.1
info:
  title: PRODUCT-DATA-SERVICE
  description: This API specification serves as reference within product-data-service project for how to design and specify HTTPs-based APIs.
  contact:
    name: SiGREEN API Support
    email: sigreensupport.industry@siemens.com
  version: v1
servers:
  - url: https://app.sigreen.siemens.com/api
    description: SiGREEN Production Server
  - url: https://app-uat.sigreen-playground.siemens.cloud/api
    description: SiGREEN User Acceptance Test (UAT) Server
security:
  - bearerAuth: []
tags:
  - name: Products Identifier Type
    description: "**API PACKAGE BASIC** Products Identifier Type APIs"
  - name: Factory Emissions
    description: "**API PACKAGE SHOPFLOOR** Factory emissions APIs"
  - name: Products
    description: "**API PACKAGE BASIC** Products APIs"
  - name: Factories
    description: "**API PACKAGE BASIC** Factory APIs"
  - name: Get Own Products' PCF
    description: "**API PACKAGE BASIC** Get Own Products' PCF"
  - name: Bill of Material
    description: "**API PACKAGE BASIC** Bill of Material"
  - name: Offsetting
    description: "Offsetting"
paths:
  /products/{id}:
    get:
      tags:
        - Products
      summary: Get individual product details by id in SiGREEN.
      description: Get details of a specific product present in a company which is part of  SiGREEN.
      operationId: getProductBySystemId
      parameters:
        - name: id
          in: path
          description: UUID to identify the product of the company in SiGREEN
          required: true
          schema:
            type: string
          example: C99BE31E-3698-422D-91E3-8270102CC7D5
      responses:
        '200':
          description: The request was successful and received single product data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-VLD-0001
                    detail: Name is allowed only 50 characters
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    put:
      tags:
        - Products
      summary: Update a product in SiGREEN.
      description: Replaces existing content with new data and updates the product details. Update will be full, not in part.
      operationId: updateProduct
      parameters:
        - name: id
          in: path
          description: UUID to identify the product of the company in SiGREEN
          required: true
          schema:
            type: string
          example: C99BE31E-3698-422D-91E3-8270102CC7D5
      requestBody:
        description: Product details for update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductRequest'
        required: true
      responses:
        '204':
          description: No content
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-VLD-0001
                    detail: Name is allowed only 50 characters
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    delete:
      tags:
        - Products
      summary: Delete a product in SiGREEN.
      description: Delete an existing product in SiGREEN company.
      operationId: deleteProduct
      parameters:
        - name: id
          in: path
          description: UUID to identify the product of the company in SiGREEN
          required: true
          schema:
            type: string
          example: C99BE31E-3698-422D-91E3-8270102CC7D5
      responses:
        '204':
          description: No content
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-VLD-0001
                    detail: Invalid product id (UUID).
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
  /products/{id}/factoryEmissions:
    post:
      tags:
        - Factory Emissions
      summary: Upload factory emissions for a product in SiGREEN.
      description: Upload factory emissions for a product in SiGREEN. Please note that this API endpoint is marked as deprecated and will be removed soon.
      operationId: uploadFactoryEmissionData
      parameters:
        - name: id
          in: path
          description: UUID to identify the product of the company in SiGREEN
          required: true
          schema:
            type: string
          example: C99BE31E-3698-422D-91E3-8270102CC7D5
      requestBody:
        description: New factory emission details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductFactoryEmissionRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactoryResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/{id}/factoryEmissions
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid product id
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/{id}/factoryEmissions
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/{id}/factoryEmissions
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/{id}/factoryEmissions
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error

  /products/identifierTypes:
    get:
      tags:
        - Products Identifier Type
      summary: Get product identifier types for a company in SiGREEN.
      description: API to get product identifier types in a company in SiGREEN.
      operationId: getProductIdentifierTypes
      parameters:
        - name: page
          in: query
          description: Page Number, usually starts with 0
          required: false
          schema:
            type: integer
            default: 0
        - name: size
          in: query
          description: Size of the page default value is 10
          required: false
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: List of product identifier types.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductIdentifierTypesResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    post:
      tags:
        - Products Identifier Type
      summary: Create a product identifier type for a company in SiGREEN.
      description: API to create product identifier type of a company in SiGREEN.
      operationId: createProductIdentifierType
      requestBody:
        description: First created identifier type will be treated as main identifier type. Request for creating a new product identifier type of a company in SiGREEN.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentifierTypeRequest'
        required: true
      responses:
        '201':
          description: Created. Response will return the UUID of the created product identifier type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentifierTypeResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/identifierTypes
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
  /products:
    get:
      tags:
        - Products
      summary: Get all products of a company in SiGREEN.
      description: Get all products under a specific company which is part of SiGREEN.
      operationId: getAllProductsByCompany
      parameters:
        - name: from
          in: query
          description: The start date of the date range when the product was created in SiGREEN.
          required: false
          schema:
            type: string
          example: '2022-11-20T08:30:00.000Z'
        - name: to
          in: query
          description: The end date of the date range when the product was created in SiGREEN.
          required: false
          schema:
            type: string
          example: '2022-11-20T08:30:00.000Z'
        - name: searchText
          in: query
          description: |
            Partial text search on following attributes  name , identifiers.
            Minimum 3 characters required to search
            Partial text match would be either name or identifers or both
          required: false
          schema:
            maxLength: 50
            minLength: 3
            type: string
          example: Simatics PL7
        - name: name
          in: query
          description: Filter products by name
          required: false
          schema:
            maxLength: 100
            minLength: 0
            type: string
          example: Simatics PL7
        - name: family
          in: query
          description: Filter products by product family
          required: false
          schema:
            maxLength: 100
            minLength: 0
            type: string
          example: Controls E1456
        - name: idType
          in: query
          description: Product identifier type in SiGREEN. idType filter is applicable only when user is searching with idValue filter. Idea here is to find products with idType and value combination.
          required: false
          schema:
            maxLength: 100
            minLength: 0
            type: string
          example: ProductId1
        - name: idValue
          in: query
          description: Filter products based on either main or additional identifier value in SiGREEN.
          required: false
          schema:
            maxLength: 100
            minLength: 0
            type: string
          example: TEST-1
        - name: factoryId
          in: query
          description: UUID to identify the factory of the company in SiGREEN
          required: false
          schema:
            type: string
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
        - name: sort
          in: query
          description: Sorting fields supported (name, createdOn, updatedOn). Example - Assending order '+name' , Descending order '-name'. Default order is createdOn ascending order.
          required: false
          schema:
            type: string
          example: +createdOn
        - name: page
          in: query
          description: Page that you would like to fetch
          required: false
          schema:
            minimum: 0
            type: integer
            format: int32
            default: 0
          example: 1
        - name: size
          in: query
          description: Number of records in a page
          required: false
          schema:
            minimum: 1
            type: integer
            format: int32
            default: 10
          example: 25
      responses:
        '200':
          description: The request was successful and received list of product data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductPaginatedResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid product id
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    post:
      tags:
        - Products
      summary: Upload a product to SiGREEN.
      description: Create a new product in a company which is part of  SiGREEN.
      operationId: createProduct
      requestBody:
        description: Product details for create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductRequest'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductResponse'
              example:
                id: C98BE31E-3698-412D-91E3-8270102CC7D5
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid product id
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
  /factories:
    get:
      tags:
        - Factories
      summary: Get factories for a company in SiGREEN.
      description: API to get list of factories in a company in SiGREEN.
      operationId: getCompanyFactories
      parameters:
        - name: page
          in: query
          description: Page Number, usually starts with 0
          required: false
          schema:
            type: integer
            default: 0
        - name: size
          in: query
          description: Size of the page default value is 10
          required: false
          schema:
            type: integer
            default: 10
      responses:
        '200':
          description: List of factories belongs to a specific company.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedFactoryResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    post:
      tags:
        - Factories
      summary: Create a factory for a company in SiGREEN.
      description: API to create a factory in a company in SiGREEN.
      operationId: createCompanyFactory
      requestBody:
        description: Create a factory for a company in SiGREEN.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FactoryRequest'
        required: true
      responses:
        '201':
          description: Created. Response will return the UUID of the factory.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FactoryResponse'
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/factories
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
  /products/identifierTypes/{id}:
    delete:
      tags:
        - Products Identifier Type
      summary: Delete an unused product identifier type for a company in SiGREEN.
      description: Delete only one record, it is only a soft delete.
      operationId: deleteProductIdentifierType
      parameters:
        - name: id
          in: path
          description: UUID to identify the product identifier type of the company in SiGREEN.
          required: true
          schema:
            type: string
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
      responses:
        '204':
          description: No Content
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        '404':
          description: Not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Not found
                status: 404
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0007
                    detail: The identifier type is invalid. Please verify and provide a valid identifier type.
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    patch:
      tags:
        - Products Identifier Type
      summary: Update a product identifier type for a company in SiGREEN.
      description: API to update product identifier type for a company in SiGREEN.
      operationId: updateProductIdentifierTypeBySystemId
      parameters:
        - name: id
          in: path
          description: UUID to identify the identifier type present in a company in SiGREEN
          required: true
          schema:
            type: string
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
      requestBody:
        description: Update a product identifier type in SiGREEN.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentifierTypeUpdateRequest'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        '404':
          description: Not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Not found
                status: 404
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0007
                    detail: The identifier type is invalid. Please verify and provide a valid identifier type.
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/products/identifierTypes/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
  /factories/{id}:
    delete:
      tags:
        - Factories
      summary: Delete an unused factory for a company in SiGREEN.
      description: Delete only one record, it is only a soft delete.
      operationId: deleteCompanyFactory
      parameters:
        - name: id
          in: path
          description: UUID to identify the factory of the company in SiGREEN.
          required: true
          schema:
            type: string
          example: UR78D-HFJ89-JF7HD-Y98TH
      responses:
        '204':
          description: No Content
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        '404':
          description: Not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Not found
                status: 404
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG_BUS_0002
                    detail: The factory is invalid. Please verify and provide a valid factory.
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
    patch:
      tags:
        - Factories
      summary: Update a factory for a company in SiGREEN.
      description: API to update factory for a company in SiGREEN.
      operationId: updateCompanyFactory
      parameters:
        - name: id
          in: path
          description: UUID to identify the factory of the company in SiGREEN.
          required: true
          schema:
            type: string
          example: UR78D-HFJ89-JF7HD-Y98TH
      requestBody:
        description: Update a specific factory of a company in SiGREEN.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FactoryRequest'
        required: true
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid error message
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Unauthorized
                status: 401
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0003
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Forbidden
                status: 403
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0005
                    detail: Invalidate Authorization
        '404':
          description: Not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Not found
                status: 404
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG_BUS_0002
                    detail: The factory is invalid. Please verify and provide a valid factory.
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Internal Server Error
                status: 500
                instance: /api/factories/{id}
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                errors:
                  - code: SIG-TEC-0002
                    detail: Internal service error
  /products/pcfData:
    get:
      tags:
        - Get Own Products' PCF
      summary: GET the PCF data for your Products in SiGREEN.
      description: GET the PCF data for your Products in SiGREEN.
      operationId: getProductPCFData
      parameters:
        - name: productId
          in: query
          description: UUID to identify the product of the Product in SiGREEN
          required: false
          schema:
            type: string
        - name: pcfId
          in: query
          description: UUID for identifying the pcf data of the company in SiGREEN
          required: false
          schema:
            type: string
        - name: active
          in: query
          description: Include PCF's which are active
          required: false
          schema:
            type: boolean
            example: false
        - name: valid
          in: query
          description: Include PCF's which are valid. When the PCF is revoked PCF data then PCF is not valid.
          required: false
          schema:
            type: boolean
            example: false
        - name: expired
          in: query
          description: Include PCF's which are expired
          required: false
          schema:
            type: boolean
            example: false
        - name: specVersion
          in: query
          description: Spec version or data model standard
          required: false
          schema:
            type: string
            example:
              - TFS V2
            enum:
              - TFS V2
              - TFS V1
              - PACT V1.0.1
              - PACT V2.0.0
              - Catena-X V1
              - Catena-X V2
              - Catena-X V2.2
              - EPD Style
              - ISO 14067
              - WBCSD Pathfinder v2
        - name: from
          in: query
          description: PCF createdOn from DateTime.DateTime (ISO 8601; UTC Timezone)
          required: false
          schema:
            type: string
            example: '2022-11-20T08:30:00.000Z'
        - name: to
          in: query
          description: PCF createdOn to DateTime.DateTime (ISO 8601; UTC Timezone)
          required: false
          schema:
            type: string
            example: '2022-11-20T08:30:00.000Z'
        - name: page
          in: query
          description: Page number
          required: false
          schema:
            type: string
            default: '0'
        - name: size
          in: query
          description: Page size
          required: false
          schema:
            maximum: 10
            type: string
            default: '10'
            enum:
              - '10'
        - name: sort
          in: query
          description: Sorting fields supported (createdOn). Example - Ascending order '+createdOn', Descending order '-createdOn'. Default order is createdOn ascending order.
          required: false
          schema:
            type: string
            example: +createdOn
      responses:
        '200':
          description: Get PCF data of Product in SiGREEN
          content:
            application/json:
              schema:
                type: object
              example:
                items:
                  - productId: C98BE31E-3698-412D-91E3-8270102CC7D5
                    name: Simatics PL7
                    pcfId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                    expired: true
                    active: true
                    valid: true
                    createdOn: '2022-11-20T08:30:00.000Z'
                    pcfState: Certified,Self published
                    pcfData:
                      company:
                        companyName: Company name
                        companyIds:
                          - companyID1
                        companyProducer: '14'
                        companyContactEmail: Controls E1456
                        companyContactPhone: ''
                      product:
                        productNameCompany: TestCompany
                        productIds:
                          - '401765'
                          - 4303F98A-785F
                        productCodeCas: 58-08-2
                        productDescription: Ethanol, 95% solution
                        bomVersion: No BOM selected
                      pcf:
                        scopePcf:
                          specVersion:
                            - TFS V2
                            - Catena-X V2
                          limitedOrFullDec: Mandatory inputs only
                          partialFullPcf: Cradle-to-gate
                          productionStage: included
                          materialAcquisitionAndPreProcessingSubStage: included
                          rawMaterialAcquistionSub2Stage: included
                          preprocessingSub2Stage: included
                          transportToManufacturingSiteSub2Stage: included
                          manufacturingSubStage: included
                          assemblySub2Stage: included
                          packagingEmissionsIncluded: included
                          eolTreatmentOfGeneratedWasteMfgSub2Stage: included
                          distributionStage: included
                          transportAToDistributerSubStage: included
                          reconditioningAtDistributorSubStage: included
                          transportBToPlaceOfUseSubStage: included
                          installationAndAssemblyStage: included
                          installationSubStage: included
                          eolTreatmentOfGeneratedWasteInstallationSubStage: included
                          useStage: included
                          useSubStage: included
                          maintenanceSubStage: included
                          repairSubStage: included
                          replacementSubStage: included
                          eolTreatmentOfGeneratedWasteUseSubStage: included
                          refurbishmentSubStage: included
                          operationalEnergyUseSubStage: included
                          operationalWaterUseSubStage: included
                          eolStage: included
                          demolitionSubStage: included
                          transportSubStage: included
                          wasteProcessingSubStage: included
                          disposalSubStage: included
                          reuseRecoveryRecyclingPotentialStage: included
                        declaredUnit: kg
                        unitaryProductAmount: '1.5'
                        productMassPerDeclaredUnit: '1.5'
                        id: id
                        precedingPCFIds:
                          - id1
                          - id2
                        version: '1.2'
                        pfStatus: Active
                        pfStatusComment: PCF status comment
                        exemptedEmissionsPercent: '1'
                        exemptedEmissionsDescription: exemptedEmissionsDescription
                        boundaryProcessesDescription: boundaryProcessesDescription
                        typeRecycledContent: post-industrial
                        ccuCo2Origin: ccuCo2Origin
                        geographyCountrySubdivision: BY
                        geographyCountry: DE
                        geographyRegionOrSubregion: Europe
                        locationProductHandover: Own factory gate
                        referencePeriodStart: '2022-11-20T08:30:00.000Z'
                        referencePeriodEnd: '2022-11-20T08:30:00.000Z'
                        created: '2022-11-20T08:30:00.000Z'
                        updated: '2022-11-20T08:30:00.000Z'
                        validityPeriodStart: '2022-11-20T08:30:00.000Z'
                        validityPeriodEnd: '2022-11-21T08:30:00.000Z'
                        crossSectoralStandardsUsed:
                          - ISO 14067
                          - Pathfinder v1
                        productOrSectorSpecificRules:
                          - Catena-X Rulebook v1
                        operator: PEF
                        otherOperatorName: otherOperatorName
                        biogenicAccountingMethodology: PEF
                        characterizationFactorsTimeHorizon: GWP100
                        characterizationFactors: AR1
                        characterizationFactorsClimateCarbonFeedback: 'yes'
                        characterizationFactorsClimateCarbonFeedbackLciaMethod: Greenhouse Gas Protocol
                        characterizationFactorsGhgExclusions: characterizationFactorsGhgExclusions
                        allocationRulesDescription: allocationRulesDescription
                        recycledMaterialAllocationApproach: Recycled content method
                        allocationWasteIncineration: cut-off
                        allocationRecycledCarbon: upstream system expansion
                        allocationCcuCarbon: allocationCcuCarbon
                        primaryDataShare: primaryDataShare
                        sourceOfPrimaryData: sourceOfPrimaryData
                        secondaryEmissionFactorSources:
                          - secondaryEmissionFactorSources
                        secondaryEmissionFactorSourcesVersion: secondaryEmissionFactorSourcesVersion
                        dqi:
                          coveragePercent: '100'
                          technologicalDQR: '1.2'
                          temporalDQR: '1.3'
                          geographicalDQR: '1.8'
                          completenessDQR: '2.5'
                          reliabilityDQR: '2.5'
                          uncertaintyAssessmentDescription: free text
                          massBalancesChecked: 'yes'
                        assurance:
                          verificationType: third party verified PCF
                          providerName: Certifier name
                          certificationNumber: Certifier number
                          completedAt: '2022-11-20T08:30:00.000Z'
                          standardName: Standards
                          coverage: product line
                          level: limited
                          boundary: Gate-to-gate
                          assuranceStatement: free text
                          comments: free text
                        comment: comment
                        pcfLegalStatement: pcfLegalStatement
                        totalInBio: 'yes'
                        totalExBio: 'yes'
                        fossilEmissions: 'yes'
                        biogenicEmissionsNonCo2Only: 'yes'
                        biogenicEmissionsCo2Only: 'yes'
                        dluc: 'yes'
                        lu: 'yes'
                        aircraft: 'yes'
                        iLucGhgEmissions: 'yes'
                        landManagementGhgEmissions: 'yes'
                        otherBiogenicGhgEmissions: 'yes'
                        productionStage:
                          pcfIncludingBiogenic: '79.86801562912497'
                          pcfExcludingBiogenic: '56.66801562912556'
                        distributionStage:
                          pcfIncludingBiogenic: '79.86801562912497'
                          pcfExcludingBiogenic: '56.66801562912556'
                        installationAndAssemblyStage:
                          pcfIncludingBiogenic: '79.86801562912497'
                          pcfExcludingBiogenic: '79.86801562912497'
                          installationSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          eolTreatmentOfGeneratedWasteInstallationSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                        useStage:
                          pcfIncludingBiogenic: '79.86801562912497'
                          pcfExcludingBiogenic: '79.86801562912497'
                          useSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          maintenanceSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          repairSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          replacementSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          eolTreatmentOfGeneratedWasteUseSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          refurbishmentSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          operationalEnergyUseSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          operationalWaterUseSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                        eolStage:
                          pcfIncludingBiogenic: '79.86801562912497'
                          pcfExcludingBiogenic: '79.86801562912497'
                          demolitionSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          transportSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          wasteProcessingSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                          disposalSubStage:
                            pcfIncludingBiogenic: '79.86801562912497'
                            pcfExcludingBiogenic: '79.86801562912497'
                        reuseRecoveryRecyclingPotentialStage:
                          pcfIncludingBiogenic: '79.86801562912497'
                          pcfExcludingBiogenic: '79.86801562912497'
                        biogenic: '1.1'
                        productCarbonContent:
                          carbonContentTotal: '79.86801562912'
                          fossilCarbonContent: '79.86801562912'
                          carbonContentBiogenic: '79.86801562912'
                          carbonContentRecycled: '79.86801562912'
                          carbonContentCcuBased: '79.86801562912'
                        dLucAndLu: 'yes'
                hasNext: true
                hasPrev: false
                page: 0
                pageNumber: 1
                size: 10
                totalPages: 120
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/pcfData
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid Component id
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: UNAUTHORIZED
                status: 401
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/pcfData
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: FORBIDDEN
                status: 403
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/pcfData
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: INTERNAL_SERVER_ERROR
                status: 500
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/pcfData
                errors:
                  - code: SIG-BUS-0001
                    detail: Internal service error
  /products/{productId}/bom:
    post:
      tags:
        - Bill of Material
      operationId : createProductBOM
      description: "Create a Bill of Material for a product in SiGREEN."
      summary: Create a Bill of Material for a product in SiGREEN
      parameters:
        - in: path
          name: productId
          schema:
            type: string
            maxLength: 50
          required: true
          description: Alphanumeric Id (Product Identifier) for identifying the product of the company in SiGREEN
      requestBody:
        description: ""
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/BillOfMaterial"
      responses:
        "201":
          description: Created
        "400":
          description: Bad request.
        "401":
          description: Authorization information is missing or invalid.
        "404":
          description: Not found
        "409":
          description: Conflict
        5XX:
          description: Unexpected error.
    get:
      tags:
        - Bill of Material
      operationId : getBOM
      description: "Get a list of Bill of Material entries for a product in SiGREEN."
      summary: Get a list Bill of Material entries for a product in SiGREEN
      parameters:
        - in: path
          name: productId
          schema:
            type: string
          required: true
          description: Alphanumeric Id (Product Identifier) for identifying the product of the company in SiGREEN
        - name: from
          in: query
          schema:
            type: string
            format: date-time
          description: >
            The start date of the date range when the Bill of Material was created in SiGREEN.
        - name: to
          in: query
          schema:
            type: string
            format: date-time
          description: >
            The end date of the date range when the Bill of Material was created in SiGREEN.
        - in: query
          name: version
          schema:
            type: string
            maxLength: 50
          description: >
            Filter by BoM version
        - in: query
          name: revision
          schema:
            type: string
            maxLength: 200
          description: >
            Filter by revision of the product
        - in: query
          name: page
          schema:
            type: integer
            default: 0
          description: >
            Page number, usually starts with 0
        - in: query
          name: size
          schema:
            type: integer
            maximum: 50
            default: 10
          description: >
            Size of the page default value is 10
      responses:
        "200":
          description: Bill of Materials
          content:
            application/json:
              schema:
                allOf:
                  - properties:
                      boms:
                        type: array
                        items:
                          $ref: "#/components/schemas/BillOfMaterial"
                  - $ref: "#/components/schemas/PaginatedResult"
        "401":
          description: Authorization information is missing or invalid.
        "404":
          description: Not found.
        5XX:
          description: Unexpected error
  /products/bomVersions:
    get:
      tags:
        - Bill of Material
      summary: Get a list of Bom versions
      description: Get list of Bom versions
      operationId: getProductsBomVersions
      parameters:
        - name: version
          in: query
          description: Filter by BOM version
          required: false
          schema:
            maxLength: 50
            minLength: 0
            type: string
          example: 3.1.1
        - name: productId
          in: query
          description: Filter by product id (UUID to identify the product of the company in SiGREEN).
          required: false
          schema:
            type: string
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
        - name: componentId
          in: query
          description: Filter BOM's which are using component id (UUID to identify the procurement component of the company in SiGREEN)
          required: false
          schema:
            type: string
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
        - name: page
          in: query
          description: Page number, usually starts with 0
          required: false
          schema:
            minimum: 0
            type: integer
            format: int32
            default: 0
          example: 0
        - name: size
          in: query
          description: Size of the page default value is 10
          required: false
          schema:
            minimum: 1
            type: integer
            format: int32
            default: 10
      responses:
        '200':
          description: Bill of Materials metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillOfMaterialVersionPaginatedResponse'
              example:
                items:
                  - version: 3.1.1
                    locked: false
                    comment: Bill of Material Version 1
                    revision: '1.9'
                    productId: C98BE31E-3698-412D-91E3-8270102CC7D5
                    productName: Simatics PL7
                hasNext: true
                hasPrev: false
                page: 0
                pageNumber: 1
                size: 10
                totalPages: 120
        '400':
          description: Bad request.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: Bad request
                status: 400
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/bomVersions
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalid request
        '401':
          description: Unauthorized.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: UNAUTHORIZED
                status: 401
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/bomVersions
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalidate Authentication
        '403':
          description: Forbidden.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: FORBIDDEN
                status: 403
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/bomVersions
                errors:
                  - code: SIG-BUS-0001
                    detail: Invalidate Authorization
        5XX:
          description: Unexpected error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
              example:
                type: https://developer.siemens.com/sigreen/validation-error.html
                title: INTERNAL_SERVER_ERROR
                status: 500
                traceId: d7e420c2-5a49-4a34-8ead-9c52a8f91577
                instance: /products/bomVersions
                errors:
                  - code: SIG-BUS-0001
                    detail: Internal service error
  /products/{productId}/offsetting:
    post:
      tags:
        - Offsetting
      parameters:
        - in: path
          name: productId
          schema:
            type: string
          required: true
          description: Alphanumeric Id (Product Identifier) for identifying the product of the company in SiGREEN
      operationId : createProductOffsetting
      description: "Offset the emissions of a product in SiGREEN."
      summary: >-
        Offset your emissions.
      requestBody:
        description: "Offset Request"
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: "#/components/schemas/OffsetRequest"
              maxItems: 10
      responses:
        "201":
          description: Created
        "400":
          description: Bad request.
        "401":
          description: Authorization information is missing or invalid.
        5XX:
          description: Unexpected error.
components:
  schemas:
    ProductIdentifier:
      required:
        - idType
        - value
      type: object
      properties:
        value:
          type: string
          description: Value of the identifier
          example: TEST-1
        idType:
          maxLength: 100
          minLength: 0
          type: string
          description: Type of the identifier
          example: ProductId1
        default:
          type: boolean
          description: Indicates if this is the main identifier or not, Product can have multiple additional identifiers.
          example: true
      description: Product identifier request data.
    ProductRequest:
      required:
        - identifiers
        - name
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 0
          type: string
          description: Name of the product
          example: Simatics PL7
        family:
          type: string
          description: Family of the product
          example: Controls E1456
        identifiers:
          maxItems: 2147483647
          minItems: 1
          type: array
          description: List of product identifiers
          items:
            $ref: '#/components/schemas/ProductIdentifier'
        description:
          maxLength: 500
          minLength: 0
          type: string
          description: Description of the product
          example: Your product description
        weight:
          maxLength: 15
          minLength: 0
          type: string
          description: Weight of the product
          example: '1.533'
        quantity:
          maxLength: 15
          minLength: 0
          type: string
          description: Quantity of the product
          example: '5'
        unitType:
          type: string
          description: Unit type of the product
          example: kg
          enum:
            - piece
            - kg
            - m2
            - m3
            - kWh
            - tkm
            - MJ
            - L
        factoryIds:
          uniqueItems: true
          type: array
          description: Factory IDs associated with the product
          example:
            - C98BE31E-3698-412D-91E3-8270102CC7D5
          items:
            type: string
            description: Factory IDs associated with the product
            example: '["C98BE31E-3698-412D-91E3-8270102CC7D5"]'
      description: Product request data.
    Errors:
      type: object
      properties:
        code:
          type: string
          description: An application-specific error code, expressed as a string value, mostly is this used for validation errors. The format and type of code representation MUST be harmonized across all services within SiGREEN. The code focuses on programs and doesnâ€™t have to be human-readable.
          example: SIG_VLD-092
        detail:
          type: string
          description: Developer friendly, human-readable, detailed description specific to the occurrence of the problem.
          example: 'Invalid Date Format. Please send valid date format (for eg: yyyy-MM-dd''T''HH:mm:ss''Z'')'
        pointer:
          type: string
          description: String with a generated pointer to the wrong value; Collections integrated as an integer, starts with 0
          example: /data/0/from
      description: Extended error array to include descriptions about errors like validation errors.
    Problem:
      type: object
      properties:
        type:
          type: string
          description: A URI reference that identifies the problem type. This should be a human-redable documentation for the problem type (e.g. list of SiGREEN Validation errors). When this member is not present, its value is assumed to be 'about:blank'.
          example: https://developer.siemens.com/sigreen/validation-error.html
        title:
          type: string
          description: 'Developer friendly, human-readable description or summary that SHOULD NOT change from occurrence to occurrence of the problem. In case of using a custom HTTP status codes in the status field of the error object, the title MUST provide a concise description of the HTTP error code (for example: status: ''599'', title: ''Network Connection Timeout'').'
          example: Bad request
        status:
          type: integer
          description: Numeric HTTP status code for the specific error.
          format: int32
          example: 400
        instance:
          type: string
          description: 'A URI reference that points to the specific resource where the problem was identified (for example: points to the api resource /api/v1/products/{productId}).'
          example: /api/v1/products/{productId}
        traceId:
          type: string
          description: A unique string identifier (UUID), representing a flow through the system.
          example: UUID
        errors:
          type: array
          description: List of detailed error objects
          items:
            $ref: '#/components/schemas/Errors'
    Batch:
      required:
        - batchNumber
        - dataSource
        - quantity
      type: object
      properties:
        batchNumber:
          maxLength: 100
          minLength: 0
          type: string
          description: The batch number
          example: BATCH12345
        quantity:
          minimum: 1
          type: number
          description: Quantity of the batch
          example: 100
        assessmentYear:
          type: integer
          description: Assessment year for the batch
          format: int32
          example: 2023
        dataSource:
          maxLength: 100
          minLength: 0
          type: string
          description: Data source for the batch information
          example: Internal System
        comment:
          maxLength: 100
          minLength: 0
          type: string
          description: Additional comments about the batch
          example: First batch of the year
      description: Details of a batch including its number, quantity, assessment year, data source, and additional comments.
    FactoryEmissionActivity:
      required:
        - emissionUnit
        - primaryDataShare
        - shareOnTotal
        - total
        - typeOfActivity
      type: object
      properties:
        typeOfActivity:
          maxLength: 50
          minLength: 0
          type: string
          description: Type of activity causing the emission
          example: Electricity
        total:
          type: number
          description: Total emissions
          example: 1000.9
        primaryDataShare:
          type: number
          description: Share of primary data in the total calculation
          example: 75.8
        shareOnTotal:
          type: number
          description: Share of total emissions
          example: 25.8
        emissionUnit:
          type: string
          description: Unit of the emission measurement
          example: kgCO2e/piece
          enum:
            - kgCO2e/piece
            - kgCO2e/Piece
            - kgCO2e/kg
            - kgCO2e/L
            - kgCO2e/m²
            - kgCO2e/m³
            - kgCO2e/kWh
            - kgCO2e/tkm
            - kgCO2e/MJ
            - kgCO2e/m2
            - kgCO2e/m3
        comment:
          maxLength: 250
          minLength: 0
          type: string
          description: Additional comments about the emission
          example: Estimated values
        fossil:
          type: number
          description: Fossil emissions
          example: 500.8
        biogenic:
          type: number
          description: Biogenic emissions
          example: 300.5
        dLuc:
          type: number
          description: Direct Land Use Change emissions
          example: 200.7
        landUse:
          type: number
          description: Land use emissions
          example: 100.2
        aircraft:
          type: number
          description: Aircraft emissions
          example: 50.1
      description: List of factory emissions
    ProductFactoryEmissionRequest:
      required:
        - factoryId
        - from
        - productCarbonFootprint
        - to
      type: object
      properties:
        revision:
          maxLength: 100
          minLength: 0
          type: string
          description: Revision number of the emission data
          example: '1'
        factoryId:
          type: string
          description: Unique identifier of the factory
          example: 123e4567-e89b-12d3-a456-426614174000
        from:
          type: string
          description: Start date in ISO 8601 format
          example: '2023-01-01T00:00:00.000Z'
        to:
          type: string
          description: End date in ISO 8601 format
          example: '2023-01-31T23:59:59.590Z'
        batch:
          $ref: '#/components/schemas/Batch'
        productCarbonFootprint:
          type: number
          description: Product carbon footprint value
          example: 100.5
        emissions:
          maxItems: 2147483647
          minItems: 1
          type: array
          description: List of factory emissions
          items:
            $ref: '#/components/schemas/FactoryEmissionActivity'
        comment:
          maxLength: 200
          minLength: 0
          type: string
          description: Additional comments
          example: Emission data collected manually
        sourceSystem:
          maxLength: 200
          minLength: 0
          type: string
          description: Source system of the emission data
          example: API
      description: Product Factory emission request data.
    FactoryResponse:
      type: object
      properties:
        id:
          type: string
          description: UUID to identify the factory of a company in SiGREEN.
          example: 098MS0-IN9099-HJH98275-LML892
    IdentifierTypeRequest:
      required:
        - idType
      type: object
      properties:
        idType:
          maxLength: 100
          minLength: 0
          type: string
          description: Type of product identifier of a company in SiGREEN. First created identifier type will always be treated as main identifier type of a company in SiGREEN.
          example: C23523-233
    IdentifierTypeResponse:
      type: object
      properties:
        id:
          type: string
          description: UUID to identify the identifier type of the company in SiGREEN.
          example: 098QA0-UK9099-HJH98275-LML891
    ProductResponse:
      type: object
      properties:
        id:
          type: string
          description: UUID to identify the product of the company in SiGREEN
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
        name:
          type: string
          description: Name of the product
          example: Simatics PL7
        family:
          type: string
          description: Family name of the product
          example: Controls E1456
        identifiers:
          uniqueItems: true
          type: array
          description: There should be one identifier where default parameter is set to true. That will act as main identifier for this entity.
          items:
            $ref: '#/components/schemas/ProductIdentifier'
        description:
          type: string
          description: Description of the product
          example: Your product description
        weight:
          type: string
          description: Weight of the product
          example: '1.533'
        quantity:
          type: string
          description: Quantity of the product
          example: '5'
        unitType:
          type: string
          description: Unit type of the product
          example: kg
          enum:
            - piece
            - kg
            - m2
            - m3
            - kWh
            - tkm
            - MJ
            - L
        factoryIds:
          uniqueItems: true
          type: array
          description: Factory IDs associated with the product(UUIDs)
          example:
            - C98BE31E-3698-412D-91E3-8270102CC7D5
            - C99BE31E-3698-412D-99E3-8270102CC7D5
          items:
            type: string
            description: Factory IDs associated with the product(UUIDs)
            example: '["C98BE31E-3698-412D-91E3-8270102CC7D5","C99BE31E-3698-412D-99E3-8270102CC7D5"]'
        createdOn:
          type: string
        updatedOn:
          type: string
      description: Product response data.
    FactoryRequest:
      required:
        - factory
      type: object
      properties:
        factory:
          maxLength: 100
          minLength: 0
          type: string
          description: Name of the factory for a company in SiGREEN.
          example: Munich Data Center
    IdentifierTypeUpdateRequest:
      required:
        - idType
      type: object
      properties:
        idType:
          maxLength: 100
          minLength: 0
          type: string
          description: Type of identifier for a company in SiGREEN.
          example: C23523-233
    IdentifierType:
      type: object
      properties:
        id:
          type: string
          description: UUID to identify the identifier type present in a company in SiGREEN
          format: uuid
          example: c98be31e-3698-412d-91e3-8270102cc7d5
        idType:
          type: string
          description: Identifier type value.
          example: SAP-NO
        isMainIdentifierType:
          type: boolean
          description: Whether it is main identifier type or not.
          example: true
      description: Details about the Identifier Type
    ProductIdentifierTypesResponse:
      type: object
      properties:
        items:
          type: array
          description: List of product identifiers
          items:
            $ref: '#/components/schemas/IdentifierType'
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        page:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
        totalRecords:
          type: integer
          description: Total number of records.
          format: int64
          example: 100
    ProductPaginatedResponse:
      type: object
      properties:
        items:
          type: array
          description: List of products
          items:
            $ref: '#/components/schemas/ProductResponse'
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        page:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
        totalRecords:
          type: integer
          description: Total number of records.
          format: int64
          example: 100
      description: Paginated product response
    FactoryDetails:
      type: object
      properties:
        id:
          type: string
          description: A Unique identifier to identify a Factory for a company in SiGREEN.
          example: 098MS0-IN9099-HJH98275-LML892
        factory:
          type: string
          description: Factory name present in SiGREEN for a company.
          example: Munich Factory
      description: List of Factories
    PaginatedFactoryResponse:
      type: object
      properties:
        items:
          type: array
          description: List of Factories
          items:
            $ref: '#/components/schemas/FactoryDetails'
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        page:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        size:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
        totalRecords:
          type: integer
          description: Total number of records.
          format: int64
          example: 100
    BillOfMaterial:
      type: object
      required:
        - version
        - components
      properties:
        version:
          type: string
          maxLength: 50
          example: "3.1.1"
          description: "Version of the Bill of Material"
        comment:
          type: string
          maxLength: 200
          example: "Bill of Material Version 1"
          description: "Comments"
        revision:
          type: string
          maxLength: 200
          example: "1.9"
          description: "Revision of the product"
        components:
          type: array
          description: "List of BOM Components of the product"
          items:
            $ref: "#/components/schemas/BomComponent"
    BillOfMaterialVersion:
      type: object
      properties:
        version:
          maxLength: 50
          type: string
          description: Version of the Bill of Material
          example: 3.1.1
        locked:
          type: boolean
          description: Whether BOM is locked or not
          example: false
        comment:
          maxLength: 200
          type: string
          description: Comments
          example: Bill of Material Version 1
        revision:
          maxLength: 200
          type: string
          description: Revision of the BOM
          example: '1.9'
        productId:
          maxLength: 36
          type: string
          description: UUID to identify the product of the company in SiGREEN
          example: C98BE31E-3698-412D-91E3-8270102CC7D5
        productName:
          maxLength: 100
          type: string
          description: Name of Product
          example: Simatics PL7
    BillOfMaterialVersionPaginatedResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/BillOfMaterialVersion'
        hasNext:
          type: boolean
          example: true
          description: "true if next page exists (page < totalPages)"
        hasPrev:
          type: boolean
          example: false
          description: "true if a previous page exists (page > 0)"
        page:
          type: number
          example: 0
          description: "The current page-number (starts with 0)"
        pageNumber:
          type: number
          example: 1
          description: "The current page-number (starts with 1)"
        size:
          type: number
          example: 10
          description: "The size of elements in the response"
        totalPages:
          type: number
          example: 120
          description: "The total available pages"
    PaginatedResult:
      type: object
      properties:
        hasNext:
          type: boolean
          example: true
          description: "true if next page exists (page < totalPages)"
        hasPrev:
          type: boolean
          example: false
          description: "true if a previous page exists (page > 0)"
        page:
          type: number
          example: 0
          description: "The current page-number (starts with 0)"
        pageNumber:
          type: number
          example: 1
          description: "The current page-number (starts with 1)"
        size:
          type: number
          example: 10
          description: "The size of elements in the response"
        totalPages:
          type: number
          example: 120
          description: "The total available pages"
    OffsetRequest:
      type: object
      required:
        - batchNumber
        - taskId
        - offsetTotal
        - offsetUnit
        - offsetPortfolioId
        - offsetPrice
        - offsetPriceUnit
        - offsetOwnerVisibility
        - offsetReasonVisibility
        - offsetProviderOrderID
        - certificateLink
        - offsetProjects
      properties:
        batchNumber:
          type: string
          example: "200405"
          description: "batch number"
        taskId:
          type: string
          example: "34134513451345"
          description: "task id"
        offsetTotal:
          type: number
          format: float
          example: 19.2
          description: "offset total"
        offsetUnit:
          type: string
          enum: [tons]
          description: "offset unit"
        offsetPortfolioId:
          type: string
          example: "166"
          description: "offset portfolio id"
        offsetPrice:
          type: number
          format: currency
          example: 49.43
          description: "offset price"
        offsetPriceUnit:
          type: string
          example: "EUR"
          description: "offset price unit"
        offsetOwner:
          type: string
          example: "Siemens AG Amberg"
          description: "offset owner"
        offsetReason:
          type: string
          example: "Campaign"
          description: "offset reason"
        offsetOwnerVisibility:
          type: string
          enum: [public, private]
          description: "offset owner visibility"
        offsetReasonVisibility:
          type: string
          enum: [public, private]
          description: "offset reason visibility"
        offsetProviderOrderID:
          type: string
          example: "476-1"
          description: "offset provider order id"
        certificateLink:
          type: string
          example: "https://mycombayn.de/sd4/certificate.pdf"
          description: "certificate link"
        comment:
          type: string
          example: "Compensated with 150 trees."
          description: "Comments"
        offsetProjects:
          type: array
          items:
            $ref: "#/components/schemas/OffsetProject"
          maxItems: 10
          description: "List of offset projects"
    OffsetProject:
      type: object
      required:
        - offsetType
        - offsetProvider
        - offsetProviderOrderID
        - offsetProviderProjectID
        - offsetProviderFinalizationDate
        - offsetQuantity
        - offsetQuantityUnit
        - projectID
        - projectName
        - projectLocation
        - projectType
        - projectURL
        - productType
        - retirementURL
        - offsetRetirementDate
        - offsetVintageStart
        - offsetVintageEnd
        - offsetSerialNumber
        - offsetOwner
        - offsetReason
      properties:
        offsetType:
          type: string
          example: "CarbonCredits"
          description: "offset type"
        offsetProvider:
          type: string
          example: "Combayn"
          description: "offset provider"
        offsetProviderProjectID:
          type: string
          example: "234"
          description: "offset provider project id"
        offsetProviderFinalizationID:
          type: string
          example: "3456"
          description: "offset provider finalization id"
        offsetProviderFinalizationDate:
          type: string
          format: date-time
          example: "2022-11-20T08:30:00.000Z"
          description: "offset provider finalization date"
        offsetQuantity:
          type: number
          format: float
          example: 5
          description: "offset quantity"
        offsetQuantityUnit:
          type: string
          example: "tons"
          description: "offset quantity unit"
        projectID:
          type: string
          example: "vcs674"
          description: "project id"
        projectName:
          type: string
          example: "Rimba Raya Biodiversity Reserve Project Sanctuary"
          description: "project name"
        projectLocation:
          type: string
          example: "Indonesia"
          description: "project location"
        projectType:
          type: string
          example: "Agriculture Forestry and Other Land Use"
          description: "project type"
        projectURL:
          type: string
          example: "https://registry.verra.org/app/projectDetail/VCS/674"
          description: "project url"
        productType:
          type: string
          example: "VCU"
          description: "product type"
        offsetRetirementURL:
          type: string
          example: "https://registry.verra.org/myModule/rpt/myrpt.asp?r=206&h=179518"
          description: "offset retirement url"
        offsetRetirementDate:
          type: string
          format: date-time
          example: "2022-11-20T08:30:00.000Z"
          description: "offset retirement date"
        offsetVintageStart:
          type: string
          format: date-time
          example: "2022-11-20T08:30:00.000Z"
          description: "offset vintage start"
        offsetVintageEnd:
          type: string
          format: date-time
          example: "2022-11-20T08:30:00.000Z"
          description: "offset vintage end"
        offsetSerialNumber:
          type: string
          example: "8173-136788-137369-VCS-VCU-263-VER-ID-14-674-01012017-22062017-1"
          description: "offset serial number"
        offsetOwner:
          type: string
          example: "Siemens AG Amberg"
          description: "offset owner"
        offsetReason:
          type: string
          example: "Siemens AG Amberg"
          description: "offset reason"

    BomComponent:
      type: object
      required:
        - identifier
        - quantity
        - groupName
        - components
      properties:
        identifier:
          type: string
          maxLength: 50
          example: 3434AABD
          description: "Identifier of the component"
        quantity:
          type: string
          maxLength: 50
          example: "3"
          description: "Quantity of the component"
        groupName:
          type: string
          maxLength: 50
          description: "With this parameter you can specify if this a group of components or not. Leave this property null or empty will just take your componenents and not create a group."
          example: "Group 1"
        components:
          type: array
          items:
            $ref: "#/components/schemas/BomComponent"
          example:
            identifier: 3434A-4C
            quantity: "4"
            groupName: "Group 2"
            components: []
          description: "List of BOM Components of the product"
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
