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.
0
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.
0 -
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.
0 -
Thanks! It seems ok now for me too.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛