question

Upvotes
Accepted
1 0 2 2

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

apiintelligent-tagging-apipermid-apiopen-permid-apirecord-matching-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
4.6k 26 7 22

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)

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
1 0 2 2

@Zhenya Kovalyov

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,*/

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Click below to post an Idea Post Idea