Querying for catastrophes

Use the following endpoints to query for catastrophes:

  • GET /admin/v1/catastrophes
  • GET /admin/v1/catastrophes/{catastropheId}

The first endpoint retrieves a collection of catastrophes and their details. For example, the following request retrieves all the available catastrophes in your system.

Command

GET /admin/v1/catastrophes

Response


{
    "count": 2,
    "data": [
        {
            "attributes": {
                "active": true,
                "catastropheNumber": "074",
                "catastropheValidFrom": "2002-05-01T00:00:00.000Z",
                "catastropheValidTo": "2002-05-05T00:00:00.000Z",
                "description": "Hurricane Sample",
                "id": "xc:SU5u9VXWkGhivWLmAp7Yy",
                "name": "Hurricane Sample",
                "scheduleBatch": false,
                "type": {
                    "code": "iso",
                    "name": "ISO"
                }
            }
        },
        {
            "attributes": {
                "active": true,
                "catastropheNumber": "082",
                "catastropheValidFrom": "2003-01-02T00:00:00.000Z",
                "catastropheValidTo": "2003-01-02T00:00:00.000Z",
                "description": "Flood Sample",
                "id": "xc:SiJLu2uASJxHF_Zp_63eD",
                "name": "Flood Sample",
                "scheduleBatch": false,
                "type": {
                    "code": "iso",
                    "name": "ISO"
                }
            }
        }
    ]
}

You can use a catastrophe's id from the response to retrieve that specific catastrophe. For example, the following request retrieves information about a hurricane, xc:SU5u9VXWkGhivWLmAp7Yy.

Command

GET /admin/v1/catastrophes/xc:SU5u9VXWkGhivWLmAp7Yy

Response


{
    "data": {
        "attributes": {
            "active": true,
            "catastropheNumber": "074",
            "catastropheValidFrom": "2002-05-01T00:00:00.000Z",
            "catastropheValidTo": "2002-05-01T00:00:00.000Z",
            "description": "Hurricane Sample",
            "id": "xc:SU5u9VXWkGhivWLmAp7Yy",
            "name": "Hurricane Sample",
            "scheduleBatch": false,
            "type": {
                "code": "iso",
                "name": "ISO"
        }
    }
}