Record Matching API website support gives an error
Hello,
I'm trying to use the website feature through a python script using the REST API, and hitting a snag. It appears that there is a trailing \r after the data that messes up the JSON parsing:
URL='https://api.thomsonreuters.com/permid/match'
header={'Accept': 'application/json', 'Content-Type': 'text/plain', 'x-ag-access-token': 'xxx', 'x-openmatch-dataType': 'Organization', 'x-openmatch-numberOfMatchesPerRecord': 1}
data='LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website \n ,,Apple,,,,,,http://www.apple.com'
Exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/requests/models.py", line 819, in json return json.loads(self.text, **kwargs)
...File "/usr/lib/python2.7/site-packages/simplejson/decoder.py", line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end())
JSONDecodeError: Invalid control character u'\r' at: line 1 column 692 (char 691)
Note: i am running python 2.7 and requests 2.7 in cygwin, on windows 10.
Best Answer
-
I found that the problem only happens when the request text contains the website information.
LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website
,,Apple,,,,,,www.apple.com
The response will contain 0x0D after the "Input_Website" text.
However, if I removed the website information, the response is fine.
LocalID,Standard Identifier,Name,Country,Street,City,PostalCode,State,Website
,,Apple,,,,,,
The response is:
{
"ignore": " ",
"unMatched": 0,
"matched": {
"total": 1,
"excellent": 1
},
"numReceivedRecords": 1,
"numProcessedRecords": 1,
"numErrorRecords": 0,
"headersIdentifiedSuccessfully": [
"localid",
"standard identifier",
"name",
"country",
"street",
"city",
"postalcode",
"state",
"website"
],
"headersNotIdentified": [],
"headersSupportedWereNotSent": [],
"errorCode": 0,
"errorCodeMessage": "Success",
"resolvingTimeInMs": 238,
"requestTimeInMs": 238,
"outputContentResponse": [
{
"ProcessingStatus": "OK",
"Match OpenPermID": "https://permid.org/1-4295905573",
"Match OrgName": "Apple Inc",
"Match Score": "92%",
"Match Level": "Excellent",
"Match Ordinal": "1",
"Original Row Number": "2",
"Input_Name": "Apple"
}
]
}Please confirm if it is the same problem that you found.
1
Answers
-
Yes, it is the same issue I have. Did you find any way to counteract that? (that ideally doesn't require me to hack into the requests library for this one special case)
0 -
I have contacted the support team to verify this problem.
1 -
The development team can replicate the issue. They will handle it. I will keep you updated on its progress.
0 -
Hello Jira, any news on this bug? I was hoping to start using websites by next month
0 -
There was no response back from the development team. I will contact them again for the update.
0 -
Hello Sunil & Jira,
any response yet? I am blocked trying to use the API if i can't match websites...
best
VnA
0 -
I have tested it. The problem has been fixed. There is no 0x0D after the "Input_Website" text anymore.
1 -
Thanks! It seems ok now for me too.
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 中文论坛