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

# Update Emissions

> Updates an existing record or inserts new goods emissions data for the specified company and report.



## OpenAPI

````yaml api-reference/openapi.json put /v1/companies/{company_id}/reports/{report_id}/goods/emissions
openapi: 3.0.0
info:
  description: Validate, store, and query compliance carbon data.
  title: NueBorder API
  termsOfService: https://nueborder.com/terms/
  contact:
    name: Jack Dunlap
    url: https://nueborder.com/support
    email: support@nueborder.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://nueborder.com/api/v1
security: []
externalDocs:
  description: OpenAPI
  url: https://nueborder.com/openapi/
paths:
  /v1/companies/{company_id}/reports/{report_id}/goods/emissions:
    put:
      tags:
        - Good Emissions
      summary: Update Emissions
      description: >-
        Updates an existing record or inserts new goods emissions data for the
        specified company and report.
      parameters:
        - description: >-
            Unique identifier for the company associated with the goods
            emissions
          name: company_id
          in: path
          required: true
          schema:
            type: string
        - description: Unique identifier for the report associated with the goods emissions
          name: report_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/flat.GoodsEmissionsType'
        description: Goods emissions data
        required: true
      responses:
        '200':
          description: Successfully updated or inserted goods emissions data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.SuccessResponse'
        '400':
          description: Missing or invalid company_id or report_id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.JSONPayloadErrorResponse'
        '500':
          description: Error updating/inserting goods emissions data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.InternalServerErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    flat.GoodsEmissionsType:
      description: Summary of Struct
      type: object
      required:
        - applicable_reporting_type_methodology
        - determination_type
        - direct_emissions_measurement_unit
        - electricity_source
        - indirect_emissions_measurement_unit
        - item_number
        - produced_measure_measurement_unit
        - specific_embedded_emissions
      properties:
        applicable_reporting_type_methodology:
          description: >-
            The type of applicable reporting methodology used to calculate the
            emissions of the CBAM Good while being produced. (Min Length: 1, Max
            Length: 5)
          type: string
          example: TOM02
        companyID:
          description: Company identifier
          type: integer
        createdAt:
          description: Creation time
          type: string
        determination_type:
          description: >-
            The type of determination of the indirect embedded emissions. The
            possible values are: Actual data, Default value. (Min Length: 1, Max
            Length: 5)
          type: string
          example: '01'
        direct_emissions_measurement_unit:
          description: >-
            The type of measurement unit of the quantity of the CBAM Good. (Min
            Length: 1, Max Length: 5)
          type: string
          example: EMU1
        electricity_source:
          description: '(Min Length: 1, Max Length: 5)'
          type: string
          example: SOE03
        indirect_emissions_measurement_unit:
          description: >-
            The type of measurement unit of the quantity of the CBAM Good. (Min
            Length: 1, Max Length: 5)
          type: string
          example: EMU1
        installation:
          description: ''
          allOf:
            - $ref: '#/components/schemas/flat.InstallationType'
        installation_operator:
          description: ''
          allOf:
            - $ref: '#/components/schemas/flat.InstallationOperatorType'
        internalReportID:
          description: Internal report ID
          type: integer
        item_number:
          description: >-
            Import Good Item Number, sequencial This element specifies the
            number of every CBAM Good emission. It is a sequential number
            starting at 1. (1,2..)
          type: string
          example: '1'
        organizationID:
          description: Organization identifier
          type: integer
        produced_measure_measurement_unit:
          description: >-
            The type of measurement unit of the quantity of the CBAM Good. The
            type of measurement unit of the quantity of the CBAM Good. The type
            of measurement unit of the quantity of the CBAM Good. (Min Length:
            1, Max Length: 5)
          type: string
          example: '01'
        remarks_emissions:
          description: (max-occurs=9)
          type: array
          items:
            $ref: '#/components/schemas/flat.RemarksEmissionsType'
        sequence_number:
          description: >-
            This element specifies the number of every CBAM Good emission. It is
            a sequential number starting at 1. (Pattern: \d{1,5})
          type: integer
          example: 1
        specific_embedded_emissions:
          description: >-
            This is the element to declare the emissions per measurement unit of
            the product produced.  When editable, it is a possibility to enter
            the default values made available and published by the commission. 
            When automatically calculated, the value of this element is the
            result of the following formula:  Electricity consumed
            (MWh/measurement unit of CBAM Good) * emissions factor (Tonnes
            CO2/MWh) (Total Digits: 16, Fraction Digits: 7)
          type: number
          example: 10
        updatedAt:
          description: Last update time
          type: string
        updatedBy:
          description: Updater identifier
          type: string
        version:
          description: Report Versions
          type: string
    models.SuccessResponse:
      description: A standard successful API response.
      type: object
      properties:
        message:
          description: A detailed success message.
          type: string
          example: Operation completed successfully
        status:
          description: HTTP status code.
          type: integer
          example: 200
    models.JSONPayloadErrorResponse:
      description: A response indicating that the JSON payload is invalid.
      type: object
      properties:
        message:
          description: A detailed error message.
          type: string
          example: The JSON payload is invalid
        status:
          description: HTTP status code.
          type: integer
          example: 400
    models.InternalServerErrorResponse:
      description: A response indicating that an internal server error occurred.
      type: object
      properties:
        message:
          description: A detailed error message.
          type: string
          example: An internal server error occurred
        status:
          description: HTTP status code.
          type: integer
          example: 500
    flat.InstallationType:
      description: Summary of Struct
      type: object
      required:
        - city
        - establishment_country
        - installation_id
        - installation_name
      properties:
        city:
          description: >-
            The city where the installation is located. (Min Length: 1, Max
            Length: 35)
          type: string
          example: Istanbul
        establishment_country:
          description: >-
            The country where the installation that produced the good or the
            Declarant is established. (Min Length: 2, Max Length: 2)
          type: string
          example: TR
        installation_id:
          description: 'The unique ID of the Installation. (Min Length: 1, Max Length: 20)'
          type: string
          example: IN03
        installation_name:
          description: 'The name of the Installation. (Min Length: 1, Max Length: 256)'
          type: string
          example: Augusta Steel INC
    flat.InstallationOperatorType:
      description: Summary of Struct
      type: object
      required:
        - city
        - contact_details
        - country
        - operator_id
        - operator_name
      properties:
        city:
          description: >-
            The city where the Declarant is located. The city where the
            Declarant is located. The city where the importer is located. The
            city where the Declarant is located. The city where the importer is
            located. The city where the operator is located. (Min Length: 1, Max
            Length: 35)
          type: string
          example: Declarant city
        contact_details:
          description: (max-occurs=9)
          type: array
          items:
            $ref: '#/components/schemas/flat.ContactDetailsType'
        country:
          description: >-
            The country where the Installation is established. (Min Length: 2,
            Max Length: 2)
          type: string
          example: BE
        operator_id:
          description: >-
            The unique identification number of the operator. (Min Length: 1,
            Max Length: 25)
          type: string
          example: OP04-0001
        operator_name:
          description: 'The Name of the operator. (Min Length: 1, Max Length: 70)'
          type: string
          example: TR Steel Operator LTD
    flat.RemarksEmissionsType:
      description: Summary of Struct
      type: object
      required:
        - additional_information
      properties:
        additional_information:
          description: 'Any additional information (Min Length: 1, Max Length: 512)'
          type: string
          example: Additional information
        sequence_number:
          description: 'Remarks sequence number (Pattern: \d{1,5})'
          type: integer
          example: 0
    flat.ContactDetailsType:
      description: Summary of Struct
      type: object
      required:
        - email
        - name
        - phone
      properties:
        email:
          description: >-
            The email of the person that is assigned in the contact details of
            the operator. (Min Length: 1, Max Length: 256)
          type: string
          example: OP04-0001@cbam.com
        name:
          description: >-
            The full name (person or company) of the Declarant. (Min Length: 1,
            Max Length: 70)
          type: string
          example: OP04-0001 Contact name
        phone:
          description: >-
            The phone number of the person that is assigned in the contact
            details of the operator. (Min Length: 1, Max Length: 35)
          type: string
          example: '901234567'
  securitySchemes:
    BearerAuth:
      description: 'Provide your Bearer token in the format: Bearer <your_api_key>'
      type: apiKey
      name: Authorization
      in: header

````