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

# Create Dataset

> Create a new dataset

export const permission_0 = 'dataset:create'

<Info>Requires permission: **{permission_0}**</Info>


## OpenAPI

````yaml POST /v1/dataset
openapi: 3.0.1
info:
  title: Variable API
  description: This is the Variable API
  version: 1.1.0
servers:
  - url: https://app.variable.global/api
security:
  - basicAuth: []
  - bearerAuth: []
  - oAuthNoScopes: []
paths:
  /v1/dataset:
    post:
      summary: Create a dataset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - name
              allOf:
                - $ref: '#/components/schemas/NewDataset'
      responses:
        '200':
          description: A dataset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dataset'
        '401':
          description: ExpiredToken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpiredTokenResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    NewDataset:
      allOf:
        - $ref: '#/components/schemas/NewProductBase'
    Dataset:
      allOf:
        - $ref: '#/components/schemas/EditDataset'
        - type: object
          properties:
            image:
              type: string
              example: https://app.variable.global/uploads/image.jpg
            footprint:
              allOf:
                - $ref: '#/components/schemas/Footprint'
              deprecated: true
              description: >-
                Deprecated — use `impacts["GWP-fossil"]`. Kept for backwards
                compatibility.
            impacts:
              $ref: '#/components/schemas/Impacts'
            dataQualityRating:
              $ref: '#/components/schemas/DataQualityRating'
            dataQualityIndicators:
              $ref: '#/components/schemas/DataQualityIndicators'
        - $ref: '#/components/schemas/CreatedUpdated'
        - properties:
            name:
              type: string
              example: Steel billet, hot rolled
            supplier:
              $ref: '#/components/schemas/Company'
    ExpiredTokenResponse:
      type: object
      properties:
        message:
          type: string
          example: token expired
    NewProductBase:
      allOf:
        - type: object
          properties:
            name:
              type: string
              example: Product Name
            description:
              type: string
              example: A descriptive description
            notes:
              type: string
              example: Internal notes about this product
            sku:
              type: string
              example: SKU123
            syncId:
              $ref: '#/components/schemas/SyncId'
            cpcCode:
              type: string
              example: CPC123
            supplierPartId:
              description: The supplier's part identifier for this product.
              type: string
              example: PART-123
            unit:
              $ref: '#/components/schemas/UnitString'
            weight:
              description: >
                The user-declared weight of the product. On read responses,
                compare with the server-computed `modeledWeight` to mass-balance
                the product against its bill of materials.
              type: object
              properties:
                quantity:
                  type: number
                  example: 100
                unit:
                  $ref: '#/components/schemas/UnitString'
            packagingWeight:
              description: >
                The user-declared weight of the product's packaging. On read
                responses, compare with the server-computed
                `modeledPackagingWeight` to mass-balance packaging against its
                bill of materials.
              type: object
              properties:
                quantity:
                  type: number
                  example: 10
                unit:
                  $ref: '#/components/schemas/UnitString'
            recycledPercent:
              description: >
                The user-declared recycled content of the product as a
                percentage (0–100). A `0` is a declared zero; omit the field
                when undeclared. On read responses, compare with the
                server-computed `modeledRecycledPercent`.
              type: number
              example: 30
            footprint:
              $ref: '#/components/schemas/EditFootprint'
            dataQualityIndicators:
              $ref: '#/components/schemas/DataQualityIndicatorsEdit'
            taxonomy:
              $ref: '#/components/schemas/TaxonomyRef'
            geoLocation:
              allOf:
                - $ref: '#/components/schemas/IDAndName'
                - properties:
                    name:
                      type: string
                      example: Pittsburgh, PA
            location:
              allOf:
                - $ref: '#/components/schemas/IDAndName'
                - properties:
                    name:
                      type: string
                      example: Pittsburgh Office
        - $ref: '#/components/schemas/StartEndDate'
    EditDataset:
      allOf:
        - properties:
            uuid:
              $ref: '#/components/schemas/UUID'
        - $ref: '#/components/schemas/NewDataset'
    Footprint:
      type: object
      properties:
        CO2e:
          allOf:
            - $ref: '#/components/schemas/FootprintCO2eComputed'
            - $ref: '#/components/schemas/FootprintCO2e'
    Impacts:
      type: object
      description: >-
        Environmental impact indicators keyed by canonical code (e.g.
        `GWP-fossil`, `ODP`, `AP`). Which indicators appear is controlled by the
        `impacts` query parameter — by default only `GWP-fossil` is returned.
      additionalProperties:
        $ref: '#/components/schemas/ApiImpact'
      example:
        GWP-fossil:
          unit: kgCO2e
          method: Mixed
          totalCarbonFootprint: '10'
          A1_A3: '10'
        ODP:
          unit: kgCFC11e
          method: EN15804+A2 - Core impact categories and indicators
          A1_A3: '0.0000012'
        AP:
          unit: molH+e
          method: EN15804+A2 - Core impact categories and indicators
          A1_A3: '2'
    DataQualityRating:
      type: number
      example: 1.4
    DataQualityIndicators:
      type: object
      allOf:
        - $ref: '#/components/schemas/DataQualityIndicatorsEdit'
        - properties:
            averagePercent:
              type: number
              example: 60
    CreatedUpdated:
      type: object
      properties:
        created:
          type: string
          description: ISO 8601 date
          example: '2021-01-01T00:00:00.000Z'
        updated:
          type: string
          description: ISO 8601 date
          example: '2021-01-31T23:59:59.000Z'
    Company:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/UUID'
        syncId:
          $ref: '#/components/schemas/SyncId'
        name:
          type: string
          example: Company Name
    SyncId:
      type: string
      description: >-
        An identifier to use when syncing data with other systems. [Read
        more](/docs/syncId)
      example: sync123
    UnitString:
      type: string
      example: kg
      description: >-
        The unit code (e.g. kg, lbs, etc.). All unit codes can be found in the
        [List Units](/api-reference/v1/unit/get) endpoint.
    EditFootprint:
      type: object
      description: >-
        Using `dataSource: external` allows setting certain `footprint.CO2e`
        values. The values are computed all other `dataSource`s.
      properties:
        CO2e:
          $ref: '#/components/schemas/FootprintCO2e'
    DataQualityIndicatorsEdit:
      type: object
      properties:
        description:
          type: string
          example: >-
            Primary data from the 2022 production year; background datasets from
            ecoinvent 3.9.
          description: >-
            Free-text justification for the data quality ratings (the EN 15804
            data-quality discussion).
        documentationYear:
          type: number
          example: 2019
        coveragePercent:
          type: number
          example: 80
        specificPercent:
          type: number
          example: 40
        technologicalDQR:
          type: number
          example: 1
        temporalDQR:
          type: number
          example: 1
          description: |
            Temporal representativeness rating: \
            1 = Good (same reporting year) \
            2 = Fair (less than 5 years old) \
            3 = Poor (more than 5 years old)
        geographicalDQR:
          type: number
          example: 1
        completenessDQR:
          type: number
          example: 1
        reliabilityDQR:
          type: number
          example: 1
    TaxonomyRef:
      type: object
      description: A reference to a taxonomy category, including its machine-readable path.
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
          example: Material
        path:
          type: string
          example: material
    IDAndName:
      type: object
      properties:
        uuid:
          $ref: '#/components/schemas/UUID'
        name:
          type: string
          example: Name
    StartEndDate:
      allOf:
        - properties:
            startDate:
              $ref: '#/components/schemas/Date'
            endDate:
              $ref: '#/components/schemas/Date'
    UUID:
      type: string
      format: uuid
    FootprintCO2eComputed:
      properties:
        totalCarbonFootprint:
          type: string
          example: '1234.5678'
        productCarbonFootprint:
          type: string
          example: '1234.0'
        upstream:
          type: string
          example: '1230.0'
        direct:
          type: string
          example: '4.0'
        downstream:
          type: string
          example: '0.5678'
        A1_A3:
          type: string
          example: '1234.0'
    FootprintCO2e:
      type: object
      properties:
        A1:
          type: string
          example: '1200.0'
        A2:
          type: string
          example: '30.0'
        A3:
          type: string
          example: '4.0'
        A4:
          type: string
          example: '0.5'
        B1:
          type: string
          example: '0.06'
        B2:
          type: string
          example: '0.007'
        B3:
          type: string
          example: '0.0008'
        B4:
          type: string
          example: ''
        B5:
          type: string
          example: ''
        C1:
          type: string
          example: ''
        C2:
          type: string
          example: ''
        C3:
          type: string
          example: ''
        C4:
          type: string
          example: ''
        D:
          type: string
          example: ''
    ApiImpact:
      type: object
      description: >-
        One environmental impact indicator. `unit` and `method` describe the
        indicator; the remaining fields carry its values — both individual
        life-cycle stages (`A1`, `A2`, `A3`, …) and aggregated totals
        (`totalCarbonFootprint`, `A1_A3`, …). A value that is genuinely zero is
        the string `"0"`; a missing one is absent. `method` is `Mixed` when the
        total aggregates two or more components from different methods — common
        for the headline `GWP-fossil` total.
      properties:
        unit:
          type: string
          example: kgCO2e
        method:
          type: string
          example: EN15804+A2 - Core impact categories and indicators
      allOf:
        - $ref: '#/components/schemas/FootprintCO2eComputed'
        - $ref: '#/components/schemas/FootprintCO2e'
    Date:
      type: string
      description: ISO 8601 date
      example: '2021-01-01T00:00:00.000Z'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    oAuthNoScopes:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /auth/token
          scopes: {}

````