Code: Select all
"errors": [
{
"code": "Unauthorized",
"message": "Access to the resource is forbidden",
"details": ""
}
]
public String requestCreateReport() {
System.out.println("-req: requestCreateReport");
ReportsApi lAPi = new ReportsApi(API_CLIENT);
CreateReportSpecification lSpec = new CreateReportSpecification();
lSpec.setReportType("GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING");
lSpec.setMarketplaceIds(SUPPORTER_MARKETPLACES);
lSpec.setDataStartTime(OffsetDateTime.now().minusDays(14));
lSpec.setDataEndTime(OffsetDateTime.now());
try {
System.out.println("before CREATE_REPORT");
_responseCreateReport = lAPi.createReport(lSpec);
System.out.println("after CREATE_REPORT");
return _responseCreateReport.getReportId();
} catch (ApiException e) {
System.err.println("Error creating report: " + e.getResponseBody());
e.printStackTrace();
}
return null;
}
Mobile version