Hello @paul.bleeker
Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
AHS
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such. Thanks, AHS
The code in Java looks like:
CloseableHttpClient httpclient = HttpClientBuilder.create().disableContentCompression().build(); String urlHost = "https://api.thomsonreuters.com"; HttpPost httppost = new HttpPost(urlHost + "/permid/match"); httppost.addHeader("x-ag-access-token", "<token>"); httppost.addHeader("x-openmatch-dataType","Organization"); httppost.addHeader("Content-Type","text/plain" ); String body="LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website\r\n1,RIC:AAPL.O|Ticker:AAPL,Apple,US,\"Apple Campus, 1 Infinite Loop\",Cupertino,95014,California,"; try { StringEntity requestBody = new StringEntity(body); httppost.setEntity(requestBody); ResponseHandler<String> responseHandler = new BasicResponseHandler(); String response = httpclient.execute(httppost, responseHandler); System.out.println(response); } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }
Set the value of x-ag-access-token to your token. The format of text in the body is available at https://permid.org/match.
The code uses org.apache.httpcomponents for HTTP post request.
<dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.8</version> </dependency>