Saltar al contenido principal
POST
/
api
/
v1
/
service-footprint
/
glec
Create a new GLEC service footprint entry
curl --request POST \
  --url https://www.manglai.io/api/v1/service-footprint/glec \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "c5b87f15-33ed-4522-90eb-d23473ab911d",
  "clientId": "d0486f00-d1fc-4f96-95d3-155b038e98a7",
  "startDate": "2024-07-03",
  "endDate": "2024-07-18",
  "actions": [
    {
      "id": "ba7b8856-2ee7-43b4-ae42-9017a0bc273b",
      "mode": "internal",
      "externalId": "123456789",
      "vehicleId": "76aada41-80d3-4164-8dac-a1a638eccd16",
      "from": "Granada, Spain",
      "to": "Barcelona, Spain",
      "distance": "842.021",
      "vehicleClassification": "Trailer diesel / Articulado / 40 t GVW",
      "vehicleType": "hgv_diesel",
      "transportType": "articulated",
      "vehicleTransportSize": "articulated",
      "load": "100",
      "loadUnit": "mt",
      "licensePlate": "123456789",
      "energyQuantity": "0.53",
      "energyQuantityUnit": "l/km",
      "driver": "",
      "hasCleaning": true
    }
  ],
  "companyId": "e72a084e-e2ca-4a28-831c-be00bad46a93",
  "externalId": "",
  "from": "Granada, Spain",
  "to": "Barcelona"
}
'
{
  "message": "GLEC service footprint entry created successfully.",
  "id": "557628f1-1969-4222-9172-fa66e1c378de"
}

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Cuerpo

application/json
id
string<uuid>
requerido
Ejemplo:

"c5b87f15-33ed-4522-90eb-d23473ab911d"

clientId
string<uuid>
requerido
Ejemplo:

"d0486f00-d1fc-4f96-95d3-155b038e98a7"

startDate
string<date>
requerido
Ejemplo:

"2024-07-03"

endDate
string<date>
requerido
Ejemplo:

"2024-07-18"

actions
object[]
requerido
companyId
string<uuid>
requerido
Ejemplo:

"e72a084e-e2ca-4a28-831c-be00bad46a93"

externalId
string
Ejemplo:

""

from
string
Ejemplo:

"Granada, Spain"

to
string
Ejemplo:

"Barcelona"

Respuesta

Successfully created GLEC service footprint entry

message
string
Ejemplo:

"GLEC service footprint entry created successfully."

id
string<uuid>
Ejemplo:

"557628f1-1969-4222-9172-fa66e1c378de"