Request
PATCH https://backend.net0.com/v1/travels/{travelId}
This endpoint allows for the retrieval of a trip available on your Net0 account.
curl --location --request PATCH 'https://backend.net0.com/v1/travels/639bde0e-f45e-4e9e-af74-d605b48d1g98' \
--header 'x-api-key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"movementDto": {
"fromAddress": {
"startAddress": "string",
"startPoint": "string"
},
"toAddress": {
"endAddress": "string",
"endPoint": "string"
},
"weight": 0,
"name": "string",
"referenceNumber": "string",
"customOptions": {},
"isReturnMoving": true,
"startDate": "2021-11-28T22:20:30.972Z",
"endDate": "2021-11-28T22:20:30.972Z",
"transportType": "TRUCK",
"vendorId": "string",
"transportWeightTon": 0,
"comment": "string"
},
"startDateUtc": "string",
"endDateUtc": "string",
"bookingReference": 0,
"hotelNights": 0,
"flightClass": "ECONOMY"
}'
Field Parameters
Attribute | Type | Description | In |
---|---|---|---|
travelId | String | This is the id of the travel to be updated. | path |
body | PatchOperations | Describes the update operations to be carried out on the given travel. NOTE: Not all the body parameters are required, just the ones you want updated and some compulsory fields like the startDateUtc , endDateUtc , etc. | body |
Response
The response returns the updated travel.
{
"id": "string",
"emissionKind": {
"id": "string",
"scope": "SCOPE_1",
"underScope": "Sites",
"activityTypeUnderScope": "COMPANY_VEHICLE",
"name": "string",
"companyId": 0,
"siteElectricitys": [
{
"id": "string",
"totalEmission": 0,
"value": 0,
"percentageOfCleanEnergy": 0,
"comment": "string",
"startDate": "2021-11-28T22:19:02.639Z",
"endDate": "2021-11-28T22:19:02.639Z",
"createdAt": "2021-11-28T22:19:02.639Z",
"updatedAt": "2021-11-28T22:19:02.639Z",
"emission": {
"id": "string",
"co2": 0,
"ch4": 0,
"n2o": 0,
"co2e": 0,
"createdAt": "2021-11-28T22:19:02.639Z",
"updatedAt": "2021-11-28T22:19:02.639Z",
"unit": {
"id": 0,
"name": "string",
"short_name": "string",
"multiplier": 0,
"parent_id": 0,
"typeUnit": "WEIGHT",
"emissionFactorsDenominators": [
null
]
}
}