Get Packages with DRAFT Status
Sunday, June 16, 2019 at 01:56pmHi,
I am trying to retrieve the packages which are in "DRAFT" status , below is API url. Below is my code that i am running, in the response it always returns only one package and that too with the status "COMPLETE" . There are packages which are in DRAFT status but not sure why are they not returned.
Can you please help me with this issue. Also i am attaching the "Results" zip file which has the model classes for response mapping.
https://sandbox.esignlive.com/api/packages?query=DRAFT&from=0&to=100&lastUpdatedStartDate=2019-01-01&lastUpdatedEndDate=2019-06-16
public static void main(String args[]){
String url = "https://sandbox.esignlive.com/api/packages";
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
String auth;
try{
String encodedAuth = "xxxxxx"; // using our API key
String authHeader = IWebserviceConstants.BASIC + encodedAuth;
headers.set(IWebserviceConstants.AUTHORIZATION , authHeader);
headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
HttpEntity entity = new HttpEntity("parameters", headers);
Map params = new HashMap();
params.put("query", "DRAFT");
params.put("from", "0");
params.put("to", "100");
params.put("lastUpdatedStartDate", "2019-01-01");
params.put("lastUpdatedEndDate", "2019-06-06");
ResponseEntity result = restTemplate.exchange(url, HttpMethod.GET, entity, Results.class,params);
System.out.println(result);
}catch(HttpStatusCodeException e){
int statusCode = e.getStatusCode().value();
String errorMessage = e.getResponseBodyAsString();
System.out.println(statusCode + " : " + errorMessage);
}
}
Reply to: Get Packages with DRAFT Status
Monday, June 17, 2019 at 06:41amReply to: Get Packages with DRAFT Status
Monday, June 17, 2019 at 11:30amReply to: Get Packages with DRAFT Status
Monday, June 17, 2019 at 11:34am