Risk Profiles

Risk profiles are essential for understanding and categorizing the risk tolerance and behavior of your customers. On this page, we’ll dive into the different risk profile endpoints you can use to manage risk profiles programmatically. We'll look at how to query, create, update, and delete risk profile records.

The risk profile model

The risk profile model contains all the information related to a customer's risk profile, including the profile type, score, and relevant details.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the risk profile record.

  • Name
    customer_id
    Type
    string
    Description

    Unique identifier for the customer.

  • Name
    profile_type
    Type
    string
    Description

    Type of risk profile (e.g., conservative, moderate, aggressive).

  • Name
    score
    Type
    number
    Description

    Risk score of the profile.

  • Name
    details
    Type
    object
    Description

    Details of the risk profile.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the risk profile record was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the risk profile record was last updated.


GET/v1/risk-profiles

List all risk profiles

This endpoint allows you to retrieve a paginated list of all your risk profile records. By default, a maximum of ten records are shown per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of risk profile records returned.

  • Name
    customer_id
    Type
    string
    Description

    Only show records for the specified customer.

  • Name
    profile_type
    Type
    string
    Description

    Only show records with the specified profile type.

Request

GET
/v1/risk-profiles
curl -G https://api.finx.ai/v1/risk-profiles \
  -H "Authorization: Bearer {token}" \
  -d limit=10

Response

{
  "has_more": false,
  "data": [
    {
      "id": "xgQQXg3hrtjh7AvZ",
      "customer_id": "WAz8eIbvDR60rouK",
      "profile_type": "conservative",
      "score": 40,
      "details": {
        "investment_horizon": "short-term",
        "income_stability": "high"
      },
      "created_at": 705103200,
      "updated_at": 705103200
    },
    {
      "id": "hSIhXBhNe8X1d8Et"
      // ...
    }
  ]
}

POST/v1/risk-profiles

Create a risk profile

This endpoint allows you to add a new risk profile record. You need to provide the customer ID, profile type, score, and details to create a risk profile record.

Required attributes

  • Name
    customer_id
    Type
    string
    Description

    Unique identifier for the customer.

  • Name
    profile_type
    Type
    string
    Description

    Type of risk profile (e.g., conservative, moderate, aggressive).

  • Name
    score
    Type
    number
    Description

    Risk score of the profile.

  • Name
    details
    Type
    object
    Description

    Details of the risk profile.

Request

POST
/v1/risk-profiles'
curl https://api.finx.ai/v1/risk-profiles \
  -H "Authorization: Bearer {token}" \
  -d 'customer_id'="WAz8eIbvDR60rouK" \
  -d 'profile_type'="conservative" \
  -d 'score'=40 \
  -d 'details'='{"investment_horizon": "short-term", "income_stability": "high"}'

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "customer_id": "WAz8eIbvDR60rouK",
  "profile_type": "conservative",
  "score": 40,
  "details": {
    "investment_horizon": "short-term",
    "income_stability": "high"
  },
  "created_at": 705103200,
  "updated_at": 705103200
}

GET/v1/risk-profiles/:id

Retrieve a risk profile

This endpoint allows you to retrieve a risk profile record by providing the record id. Refer to the list at the top of this page to see which properties are included with risk profile objects.

Request

GET
/v1/risk-profiles/xgQQXg3hrtjh7AvZ
curl https://api.finx.ai/v1/risk-profiles/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "customer_id": "WAz8eIbvDR60rouK",
  "profile_type": "conservative",
  "score": 40,
  "details": {
    "investment_horizon": "short-term",
    "income_stability": "high"
  },
  "created_at": 705103200,
  "updated_at": 705103200
}

PUT/v1/risk-profiles/:id

Update a risk profile

This endpoint allows you to perform an update on a risk profile record. Examples of updates are changing the profile type, updating the score, or modifying the details.

Optional attributes

  • Name
    profile_type
    Type
    string
    Description

    Updated type of risk profile.

  • Name
    score
    Type
    number
    Description

    Updated risk score of the profile.

  • Name
    details
    Type
    object
    Description

    Updated details of the risk profile.

Request

PUT
/v1/risk-profiles/xgQQXg3hrtjh7AvZ
curl -X PUT https://api.finx.ai/v1/risk-profiles/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}" \
  -d 'score'=45

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "customer_id": "WAz8eIbvDR60rouK",
  "profile_type": "conservative",
  "score": 45,
  "details": {
    "investment_horizon": "short-term",
    "income_stability": "high"
  },
  "created_at": 705103200,
  "updated_at": 705103200
}

DELETE/v1/risk-profiles/:id

Delete a risk profile

This endpoint allows you to delete your risk profile records in Fin X. Note: This will permanently delete the record and all its data — ensure this is the desired action before proceeding.

Request

DELETE
/v1/risk-profiles/xgQQXg3hrtjh7AvZ
curl -X DELETE https://api.finx.ai/v1/risk-profiles/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"

Was this page helpful?