Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

1. Search API URL

url : /vbs/driver/search

DriverSearchSo is ModelAttribute on backend side where request params in url will be picked from url and mapped to entity values of DriverSearchSo in backend side (frontend has to side params which are present in below DriverSearchSo only)

sample url : /vbs/driver/searchDriver?driverIdOrName=123&contactNumber=12312...

HTTP Method : GET

 Request
DriverSearchSo {
	private String driverIdOrName; // optional
  	private String emailId; // optional
  	private String linkedClientCode; // optional
  	private String contactNumber; // optional
  	private List<String> spSubLocationCodes; //  spSubLocationCode {"DPWVAN", "AOLADT1"}
  	private String spLocationCode; // spLocationCode ""
  	private List<String> status; // optional
  	private String driverTerminalLocationStatus; // optional siteStatus
  	private String portDriverId; // siteId
  	private String clientCode; // MANDATORY where logged in user is trucking company
  	private boolean isAdmin; // optional
}

 Response
ListResponseSO<DriverSearchresponseSo> {
	List<DriverSearchResponseSo> list;
	Long totalRecords;
}
 DriverSearchResponseSo
DriverSearchResponseSo {
	private Long driverId;
	private String firstName;
	private String lastName;
	private LocalDate dateOfBirth;
	private String addressLine;
	private String country;
	private String state;
	private String city;
	private String pinCode;
	private String emailId;
	private String countryCode;
	private String contactNumber;
	private String driverStatus;
	private String clientCode;	
}

2. Cancel Driver API

HTTP METHOD : DELETE
URI : /driver/cancel/{driverIds}
example : /vbs/driver/cancel/123,354?remarks=Cancelling%20the%20driver

Path variable : 
driverIds (List<Long>)

@ModelAttribute as Query String :
  remarks: "these are remarks" (String)

 Success Response 200

[

  {

    "driverId" : 123,

    "firstName" : "Xyz",

    "lastName" : "abc",

“processingRemarks” : “Successfully cancelled“

  }

]

Processing remarks in response can be “Successfully cancelled“ / “Already cancelled“ / “No data present or ownership issues.“.

3. Csv Download Driver API

HTTP METHOD : GET
URI : /driver/downloadCSV
example : /vbs/driver/downloadCSV?driverIdOrName=123&contactNumber=12312

 @ModelAttribute as Query string:

driverIdOrName
spSubLocationCodes (of type List<String>)
spLocationCode
driverStatuses (of type List<String>)
emailId
contactNumber
clientCode (this is for logged in user)
linkedClientCode
portDriverId
driverTerminalLocationStatus
isAdmin

Success Response 200 content type as text/csv

  • No labels