Update Trip Avoid Favors

Trip Management’s update trip avoid favors API handles add, update or delete avoid favors associated with a trip. After a trip is planned without avoid favors, user can add them later. After a trip is planned with avoid favors, user can update or delete avoid favors using this API. Planning a trip does not need both afSetIds and afSetNames. When the database is updated, afSetIds and afSetNames are treated as separate entities.

  • If both afSetIds and afSetNames are not supplied, all previously saved values for a trip will be removed.
  • If afSetIds are not supplied, ids will be removed.
  • If afSetNames are not supplied, names will be removed.
  • If a supplied list is different from the previously saved list, the value will be added if any value does not exist in the database; any value stored in the database before does not exit in the supplied list will be removed.

POST /trip/avoidFavors

Request Fields

FieldDescriptionTypeRequired
tripIdThe alkTripId returned when you planned the trip.
Note: If no trip is found with the given alkTripId, then an error message will be returned. If the tmsTripId in your planning system is also supplied in the body of this request, then the alkTripId will be ignored irrespective of whether it is valid or not and the trip corresponding to the provided tmsTripId will be updated. In this case, if no trip is found with the given tmsTripId, then an error message will be returned.
integerYes if tmsTripId is not supplied.
tmsTripIdThe tmsTripId of your previously generated route.
Note: Even if tripId, which is the alkTripId, is also supplied with this request, it will be ignored and only trip corresponding to the given tmsTripId will be updated. If no trip is found with the given tmsTripId, then an error message will be returned.
stringYes if tripId is not supplied.
afSetIdsAn array of avoid favor set ids.Array <integer>No, either set ids or names.
afSetNamesAn array of avoid favor set names.Array <string>No, either set ids or names.

Response Fields

FieldDescriptionType
successtrue or falseboolean
messageError message if there is any.string

Example

Sample Response

{
  "success": true,
  "message": null
}