Examples

POST /api/v2/filter-presets
{
  "data": {
    "type": "filter-presets",
    "attributes": {
      "name": "Asean Tech",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": null,
      "imperatives": null,
      "time-horizons": null
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "115"
        }
      }
    }
  }
}
201
{
  "data": {
    "id": "19",
    "type": "filter-presets",
    "links": {
      "self": "http://test.host/api/v2/filter-presets/19"
    },
    "attributes": {
      "name": "Asean Tech",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": null,
      "imperatives": null,
      "time-horizons": null
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/filter-presets/19/relationships/account",
          "related": "http://test.host/api/v2/filter-presets/19/account"
        }
      }
    }
  }
}

Params

Param name Description
data
required

filter preset information

Validations:

  • Must be a Hash

data[type]
required

Validations:

data[attributes]
required

Validations:

  • Must be a Hash

data[attributes][name]
required

Validations:

  • Must be a String

data[attributes][countries]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][sectors]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][strategies]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][verticals]
optional , nil allowed

Validations:

  • Must be an array of any type

data[relationships]
required

Validations:

  • Must be a Hash

data[relationships][account]
required

Validations:

  • Must be a Hash

data[relationships][account][data]
required

Validations:

  • Must be a Hash

data[relationships][account][data][type]
required

Account type, which is `accounts`

Validations:

  • Must be a String

data[relationships][account][data][id]
required

Account ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.