I am trying to build a matching request using csv file using python request library. I am getting <Response [500]> What I am doing wrong here?
My example csv input file contains just one column with the header name and 1 row, like this:
name
There is my code:
request_url = "https://api-eit.refinitiv.com/permid/match/file"
headers = { 'Content-Type': 'multipart/form-data',
'x-ag-access-token': my_apikey,
'x-openmatch-numberOfMatchesPerRecord': '1',
'x-openmatch-dataType': 'Organization'}
files = {'file': open('C:/My_Folder/input_file.csv') }
response = requests.post(url=request_url, headers=headers, files=files)
r = response.json()
print(r)
----------
<Response [500]>
{'error': {'status': {'code': '500',
'errorCode': 'Server Error',
'errorDescription': 'java.lang.NullPointerException'}}}