For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
41 3 4 9

RESTAPI and Fields to extract for LegalEntityDetailReport using Python

Hallo All,

I need to get master data information for Business Partner Instrument List. For example i want to get information such as Lei, Contact Information, Address Information and other details for our Business Partner.

From report template i can get this when i create new Entity List and search by entity name or identifier.


But now i need to know which REST API i can use to get the LegalEntityDetailReport and what are the number of fields i can extract from this RESTAPI. In Refinitiv tutorial do we have any Python working example for this REST API extraction request ?

datascope-selectentity
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.

Upvote
Accepted
23k 22 9 14

Hello @rahul.deshmukh ,

Please find the complete list of fields for LegalEntityDetail extraction attached


LegalEntityFieldList.txt


You can obtain it in two ways, via HTTP REST Request

GET
{
                {protocol}}{
                {host}}{
                {api}}Extractions/GetValidContentFieldTypes(ReportTemplateType=DataScope.Select.Api.Extractions.ReportTemplates.ReportTemplateTypes'LegalEntityDetail')

Or from DSS GUI:

Select Extraction Request as LegalEntityDetailedExtractionRequest as see it in ContentFieldNames drop down see screenshot:

legal.png



legal.png (80.4 KiB)
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.

@zoya.farberov thanks i will check the list and also start working with Intraday REST API and try to replace with legal request to see if its working ...

Upvotes
23k 22 9 14

Hello @rahul.deshmukh ,

LegalEntityDetailExtraction request can be used via DSS REST API to request the same legal entity information that you request via DSS GUI.

Please see DSS REST API Reference Tree -> LegalEntityDetailExtraction spec for the complete information on the request.

There are two programmatic approaches to implement this with DSS REST API:

  • On demand request, an approach where you issue a single request with all the required details
  • Scheduled request - an approach where you proceed same as with GUI, defined instrument list, report template and extraction trigger

Find detailed explanation of the two approaches in DSS Introductions Tutorial.

Two python code examples, of On Demand and Scheduled can be downloaded from Downloads -> RTH Python Code Samples.

I would suggest:

To use Postman to define and tune LegalEntityDetailExtraction request per your requirement, (how to get started on DSS REST with Postman is in REST API Tutorials Introduction)

To start with the starter Python example beforementioned, reuse the approach and the code, while replacing the request in the example with LegalEntityDetailExtraction request per your requirement.

Hope this information helps

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.

@zoya.farberov i dont know why but i cannot access postman...i checked the tutorial for on demand and scheduled request and i also checked the python example but in both case the IntradayPricingExtractionRequest with fields such as "Ask Price", "bid price", "trade date" are given...i dont want this information..i just need information for master data instrument list such as LEI, contact information, address etc for our business partner.....For example if i provide for example Identifier as "BLMG.DE" in the extraction request i should get the response with the fields as mentioned in the gui report template ..for example with below field details :

Official Name

Org ID

RCP ID

Entity LEI

Type

Subtype

TRBC

Record Active

Is Issuer

Has Affiliates

Has Joint Venture

Has Subsidiary

Headquarters Address

Headquarters Telephone

Headquarters Fax

Is Ultimate Parent

Upvotes
23k 22 9 14

Hello @rahul.deshmukh,

Using Postman tool is not strictly necessary, but if you are looking to work fluently with DSS REST, implement new requirements, define and tune HTTP REST requests and test them interactively, without having to write any code, then using Postman can make your integration tasks much more efficient and quick.

Just in case, Postman can be downloaded from https://www.postman.com/downloads/

---

I have just tested a Legal request with Postman. If you like, you can use it as a starter from your Postman:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/ExtractWithNotes

{
    "ExtractionRequest": {
        "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.LegalEntityDetailExtractionRequest",
        "ContentFieldNames": [
            "CIK",
            "Company/Registration Authority",
            "Company/Registration Number",
            "Country of Incorporation",
            "Country of Incorporation Description",
            "Date of Incorporation",
            "Domicile",
            "Domicile Description",
            "Entity URL",
            "Event Date",
            "Event Type",
            "FATF Jurisdiction",
            "GICS Industry Code",
            "ID",
            "ID Type",
            "Immediate Parent Official Name",
            "Immediate Parent RCP ID",
            "Immediate Parent Reuters Editorial RIC",
            "Is Issuer",
            "Jurisdiction of Incorporation",
            "Official Name",
            "Primary Regulator",
            "Primary Regulator ID",
            "RCP ID",
            "RCP Reuters Editorial RIC",
            "Record Active Flag",
            "Registered City/Town",
            "Registered Country",
            "Registered Country Description",
            "Registered Fax",
            "Registered Postal/Zip Code",
            "Registered State/County/Region",
            "S&P Issuer Long Rating",
            "S&P Issuer Long Rating - F",
            "S&P Issuer Long Rating Date",
            "S&P Issuer Long Rating Date - F",
            "S&P Issuer Long Rating Rank",
            "S&P Issuer Long Rating Rank - F",
            "S&P Issuer Short Rating",
            "S&P Issuer Short Rating - F",
            "S&P Issuer Short Rating Date",
            "S&P Issuer Short Rating Date - F",
            "S&P Issuer Short Rating Rank",
            "S&P Issuer Short Rating Rank - F"
        ],
        "IdentifierList": {
            "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.EntityIdentifierListWithValidationOptions",
            "EntityIdentifiers": [
                {
                    "Identifier": "18228",
                    "IdentifierType": "OrgId"
                },
                  {
                    "Identifier": "18229",
                    "IdentifierType": "OrgId"
                }
            ],
            "ValidationOptions": {
                "AllowDuplicateInstruments": true,
                "IncludeParentAndUltimateParent": false,
                "AllowUnmanagedOrUnverifiedEntities": true
            },
            "UseUserPreferencesForValidationOptions": false
        },
        "Condition": {
            "DeltaDays": 100
        }
    }
  }

Resulting in:


{
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#DataScope.Select.Api.Extractions.ExtractionRequests.ExtractionResult",
    "Contents": [
        {
            "IdentifierType": "OrgId",
            "Identifier": "18228",
            "CIK": "0000051143",
            "Company/Registration Authority": "New York State Department of State",
            "Company/Registration Number": "30059",
            "Country of Incorporation": "US",
            "Country of Incorporation Description": "United States",
            "Date of Incorporation": "19110616",
            "Domicile": "US",
            "Domicile Description": "United States",
            "Entity URL": "https://www.ibm.com/",
            "Event Date": null,
            "Event Type": null,
            "FATF Jurisdiction": "Y",
            "GICS Industry Code": "45102010",
            "ID": "18228",
            "ID Type": "ORG",
            "Immediate Parent Official Name": "INTERNATIONAL BUSINESS MACHINES CORPORATION",
            "Immediate Parent RCP ID": "300018228",
            "Immediate Parent Reuters Editorial RIC": "IBM.N",
            "Is Issuer": "Y",
            "Jurisdiction of Incorporation": "NEW YORK",
            "Official Name": "INTERNATIONAL BUSINESS MACHINES CORPORATION",
            "Primary Regulator": "NA01",
            "Primary Regulator ID": "NA01",
            "RCP ID": "300018228",
            "RCP Reuters Editorial RIC": "IBM.N",
            "Record Active Flag": "Y",
            "Registered City/Town": "ARMONK",
            "Registered Country": "US",
            "Registered Country Description": "United States",
            "Registered Fax": "NA02",
            "Registered Postal/Zip Code": "10504",
            "Registered State/County/Region": "NEW YORK",
            "S&P Issuer Long Rating": "A-",
            "S&P Issuer Long Rating - F": "A-",
            "S&P Issuer Long Rating Date": "2021-05-06",
            "S&P Issuer Long Rating Date - F": "2021-05-06",
            "S&P Issuer Long Rating Rank": 7,
            "S&P Issuer Long Rating Rank - F": 7,
            "S&P Issuer Short Rating": "A-2",
            "S&P Issuer Short Rating - F": "A-2",
            "S&P Issuer Short Rating Date": "2021-05-06",
            "S&P Issuer Short Rating Date - F": "2021-05-06",
            "S&P Issuer Short Rating Rank": 3,
            "S&P Issuer Short Rating Rank - F": 3
        },
...

Let us know if this helps, or where you run into an issue, so we can try to help?


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
41 3 4 9

@zoya.farberov Thanks yes exactly this is what i needed, Is this all the fields you extracted from LegalEntityDetailExtractionRequest ? Because i dont see Headquarter address, Entity LEI fields in this....And do we have working example of Python which i can use with this rest api LegalEntityDetailExtractionRequest ? When i checked the Postman url it says Url does not exist...Actually i am planning to implement this in code as we need to save this information in our oracle database table ...

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.

Upvote
23k 22 9 14

Hello @rahul.deshmukh ,

You could start with this request, in Postman, and add any fields that you require from those defined in the request spec.

We do not have a python example for every request type. You could start with the working python example for Intraday that we offer, and replace the intraday request with the working legal request, or any other request, per your requirement

Could you please try the Postman link again, I think the dot at the end of the sentence somehow became part of URL, I have removed it now, should help.

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.

ok i will try with the python example of Intraday. As i cannot access Postman and the link is not working in this case i actually dont know the name of the fields which i need to add in the extraction request...Can you please tell where can i find the list of fields that we can use for this extraction request ?

Click below to post an Idea Post Idea