Open PermID - Record Matching - RESTful API, Required fields are missing: [standard identifier,name]
1,RIC:AAPL.O|Ticker:AAPL,Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,
for data not working reply error like "
{"errorCode":3,"errorCodeMessage":"Invalid Content – Required fields are missing: [standard identifier,name]."}
"
The code like bellow
$url="https://api.thomsonreuters.com/permid/match";
$ch = curl_init();
$headers = array(
'Content-Type:text/plain',
'x-openmatch-numberOfMatchesPerRecord: 1',
'x-openmatch-datatype: Organization',
'X-AG-Access-Token:33CpiIRai3nqQjEAEuQ05n1sIHg2Fum0'
);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_HEADER, 0);
/*test1
LocalID,RIC,TICKER,Name,Country,Street,City,PostalCode,State,Website
1,AAPL.O,,Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,*/
/*test2
LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website
1,RIC:AAPL.O|Ticker:AAPL,Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,*/
//LocalID:1,Standard Identifier:"RIC:AAPL.O|Ticker:AAPL",Name:Apple,Country:US,Street:"Apple Campus, 1 Infinite Loop",City:Cupertino,PostalCode:95014,State:California,Website:""
$body = '1,"RIC:AAPL.O|Ticker:AAPL",Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,';
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,$body);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Timeout in seconds
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$authToken = curl_exec($ch);
print_r($authToken);
this is php curl example. so can you give me exact body i have to test? or give me proper php example with body i can test.
i have to test the persons data which is proper or not. at singapore and india.
but my example gives error so please reply as soon as possible
Best Answer
-
Here is a sample request done with python:
POST https://api.thomsonreuters.com/permid/match/file HTTP/1.1
Host: api.thomsonreuters.com
User-Agent: python-requests/2.14.2
Accept-Encoding: gzip, deflate
Accept: application/json
Connection: keep-alive
x-ag-access-token: your_token
x-openmatch-numberOfMatchesPerRecord: 1
x-openmatch-dataType: Organization
Content-Length: 576
Content-Type: multipart/form-data; boundary=b797ce52bdb64e9fafe39d85ea2fd223
--b797ce52bdb64e9fafe39d85ea2fd223
Content-Disposition: form-data; name="file"; filename="input.csv"
Content-Type: application/vnd.ms-excel
LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website
1,,Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,
2,,Apple,,,,,,
3,,Teva Pharmaceutical Industries Ltd,IL,,Petah Tikva,,,
4,,Tata Sky,IN,,,,,
5,RIC:IBM.N|Ticker:IBM,,,,,,,
6,Ticker:MSFT,,,,,,,
7,LEI:INR2EJN1ERAN0W5ZP974,,,,,,,
8,Ticker:FB&&Exchange:NSM,,,,,,,
9,Ticker:AAPL&&MIC:XNGS,,,,,,,
--b797ce52bdb64e9fafe39d85ea2fd223--Here is the listing, should you require:
url = 'https://api.thomsonreuters.com/permid/match/file'
headers = {
'x-ag-access-token':'',
'x-openmatch-numberOfMatchesPerRecord':'1',
'x-openmatch-dataType':'Organization',
'Accept':'application/json'
}
with open('input.csv', 'rb') as input_file:
content = input_file.read()
files = {'file': ('input.csv', content, 'application/vnd.ms-excel')}
response = requests.post(url=url, headers=headers, files=files, verify=False)0
Answers
-
thanks for you answer but i want to do with php without a file. thats why i had use
$url="https://api.thomsonreuters.com/permid/match";
can you put example of body in php without file. i had tried with bellow 2 test but same error as above
/*test1
LocalID,RIC,TICKER,Name,Country,Street,City,PostalCode,State,Website
1,AAPL.O,,Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,*/
/*test2
LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website
1,RIC:AAPL.O|Ticker:AAPL,Apple,US,"Apple Campus, 1 Infinite Loop",Cupertino,95014,California,*/0 -
you are free to explore the possibilities of the API with the use of PHP, for this I would recommend trying to mimic the post request that I have posted above with the tools that are available to you.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛