Query Bond Schedule Table Error:

I am trying to query the bond schedule (specifically the call option within the gui) through the api. To test the query I am using the following:

{
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.BondScheduleExtractionRequest",
"ContentFieldNames": [
"Asset ID"
],
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [
{
"Identifier": "05490NAG0",
"IdentifierType": "Cusip"
}
]
}
}
}

I can see that Asset ID is an option within the gui for Bond Schedule template with Report Option = Call

image

The code above generates the following error:

{
"error": {
"message": "Validation Error:\r\n\r\nInternal constraint \"ReportTemplate.Conditions.InvalidBondScheduleTypeCode\" execution failure: message='Value cannot be null.\r\nParameter name: source' / exid='5b8489d2-31e0-4d96-b4ed-0cc21f454074'"
}
}

Thanks in advance for your assistance!

Best Answer

  • From the error message, the BondScheduleTypeCode parameter is required and cannot be null. This parameters should be equivalent to the Generic Schedule Types in GUI.

    image

    For example, the following request is for Call Schedule Type.

    {
    "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.BondScheduleExtractionRequest",
    "ContentFieldNames": [
    "Asset ID"
    ],
    "IdentifierList": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
    "InstrumentIdentifiers": [
    {
    "Identifier": "05490NAG0",
    "IdentifierType": "Cusip"
    }
    ]
    },
    "Condition":
    {
    "BondScheduleTypeCodes": ["CALS"]
    }

    }
    }

    You can find all defined values for this parameter in the REST API Reference Tree.

    image