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

# Create a new GLEC service footprint entry

> This endpoint creates a new entry for the GLEC service footprint.



## OpenAPI

````yaml /openapi.json post /api/v1/service-footprint/glec
openapi: 3.0.3
info:
  title: Manglai Public API
  description: Manglai API for Carbon Footprint Management
  contact:
    email: admin@manglai.io
    name: Manglai Support
    url: https://manglai.io
  termsOfService: https://manglai.io/privacy
  version: '1.0'
servers:
  - url: https://www.manglai.io
    description: Production
security:
  - apiTokenAuth: []
tags: []
paths:
  /api/v1/service-footprint/glec:
    post:
      tags:
        - service-footprint-glec
      summary: Create a new GLEC service footprint entry
      description: This endpoint creates a new entry for the GLEC service footprint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                  example: c5b87f15-33ed-4522-90eb-d23473ab911d
                externalId:
                  type: string
                  example: ''
                clientId:
                  type: string
                  format: uuid
                  example: d0486f00-d1fc-4f96-95d3-155b038e98a7
                startDate:
                  type: string
                  format: date
                  example: '2024-07-03'
                endDate:
                  type: string
                  format: date
                  example: '2024-07-18'
                actions:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: ba7b8856-2ee7-43b4-ae42-9017a0bc273b
                      externalId:
                        type: string
                        example: '123456789'
                      mode:
                        type: string
                        enum:
                          - internal
                          - external
                        example: internal
                      vehicleId:
                        type: string
                        format: uuid
                        example: 76aada41-80d3-4164-8dac-a1a638eccd16
                      from:
                        type: string
                        example: Granada, Spain
                      to:
                        type: string
                        example: Barcelona, Spain
                      distance:
                        type: string
                        example: '842.021'
                      vehicleClassification:
                        type: string
                        description: >-
                          Vehicle classification (Only needed if the 
                          classification vehicle is not defined)
                        example: Trailer diésel / Articulado / 40 t GVW
                      vehicleType:
                        type: string
                        description: >-
                          Vehicle type (Only needed if the vehicleClassification
                          is not defined)
                        example: hgv_diesel
                        enum:
                          - vans
                          - hgv_diesel
                          - flight
                          - train
                      transportType:
                        oneOf:
                          - type: string
                            description: >-
                              Transport type (Only needed if the
                              vehicleClassification is not 'hgv_diesel').
                            enum:
                              - rigid
                              - articulated
                              - average
                            example: articulated
                          - type: string
                            description: >-
                              Transport type specific to flights (Only
                              applicable if vehicleType is 'flight').
                            enum:
                              - freighter
                              - bellyFreight
                              - average
                            example: freighter
                          - type: string
                            description: >-
                              Transport type specific to flights (Only
                              applicable if vehicleType is 'train').
                            enum:
                              - average
                            example: average
                          - type: string
                            description: >-
                              Transport type specific to flights (Only
                              applicable if vehicleType is 'vans').
                            enum:
                              - average
                            example: average
                      vehicleTransportSize:
                        oneOf:
                          - type: string
                            description: >-
                              Transport size (Only needed if the
                              vehicleClassification is not "hgv_diesel /
                              rigid").
                            enum:
                              - 3.5-7.5_t_gvw
                              - 7.5-12_t_gvw
                              - 12-20_t_gvw
                              - 20-26_t_gvw
                              - 26-32_t_gvw
                            example: articulated
                          - type: string
                            description: >-
                              Transport size (Only needed if the
                              vehicleClassification is not "hgv_diesel /
                              articulated").
                            enum:
                              - 34_t_gvw
                              - 40_t_gvw
                            example: articulated
                          - type: string
                            description: >-
                              Transport type specific to flights (Only
                              applicable if vehicleType is 'vans / average').
                            enum:
                              - <_3.5_t
                            example: <_3.5_t
                      load:
                        type: number
                        example: '100'
                      loadUnit:
                        type: string
                        enum:
                          - kg
                          - mt
                        example: mt
                      licensePlate:
                        type: string
                        example: '123456789'
                      energyQuantity:
                        type: string
                        example: '0.53'
                      energyQuantityUnit:
                        type: string
                        enum:
                          - l
                          - kg
                          - kwh
                          - l/km
                          - kg/km
                          - kwh/km
                        example: l/km
                      driver:
                        type: string
                        example: ''
                      hasCleaning:
                        type: boolean
                        example: true
                    required:
                      - id
                      - mode
                from:
                  type: string
                  example: Granada, Spain
                to:
                  type: string
                  example: Barcelona
                companyId:
                  type: string
                  format: uuid
                  example: e72a084e-e2ca-4a28-831c-be00bad46a93
              required:
                - id
                - clientId
                - startDate
                - endDate
                - actions
                - companyId
      responses:
        '200':
          description: Successfully created GLEC service footprint entry
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: GLEC service footprint entry created successfully.
                  id:
                    type: string
                    format: uuid
                    example: 557628f1-1969-4222-9172-fa66e1c378de
        '400':
          description: Bad request due to invalid input
        '500':
          description: Internal server error
components:
  securitySchemes:
    apiTokenAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````