Compliance

Compliance is a critical aspect of financial services, ensuring that all activities meet regulatory standards and legal requirements. On this page, we’ll dive into the different compliance endpoints you can use to manage compliance programmatically. We'll look at how to query, create, update, and delete compliance records.

The compliance model

The compliance model contains all the information related to regulatory compliance, including policies, procedures, and monitoring activities.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the compliance record.

  • Name
    policy_name
    Type
    string
    Description

    Name of the compliance policy.

  • Name
    description
    Type
    string
    Description

    Description of the compliance policy.

  • Name
    status
    Type
    string
    Description

    Current status of the compliance policy (e.g., active, inactive).

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the compliance policy was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the compliance policy was last updated.


GET/v1/compliance

List all compliance records

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

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of compliance records returned.

  • Name
    status
    Type
    string
    Description

    Only show records with the specified status.

  • Name
    policy_name
    Type
    string
    Description

    Only show records with the specified policy name.

Request

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

Response

{
  "has_more": false,
  "data": [
    {
      "id": "xgQQXg3hrtjh7AvZ",
      "policy_name": "Data Privacy Policy",
      "description": "Policy regarding data privacy and protection.",
      "status": "active",
      "created_at": 705103200,
      "updated_at": 705103200
    },
    {
      "id": "hSIhXBhNe8X1d8Et"
      // ...
    }
  ]
}

POST/v1/compliance

Create a compliance record

This endpoint allows you to add a new compliance record. You need to provide the policy name, description, and status to create a compliance record.

Required attributes

  • Name
    policy_name
    Type
    string
    Description

    Name of the compliance policy.

  • Name
    description
    Type
    string
    Description

    Description of the compliance policy.

  • Name
    status
    Type
    string
    Description

    Current status of the compliance policy (e.g., active, inactive).

Request

POST
/v1/compliance
curl https://api.finx.ai/v1/compliance \
  -H "Authorization: Bearer {token}" \
  -d 'policy_name'="Data Privacy Policy" \
  -d 'description'="Policy regarding data privacy and protection." \
  -d 'status'="active"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "policy_name": "Data Privacy Policy",
  "description": "Policy regarding data privacy and protection.",
  "status": "active",
  "created_at": 705103200,
  "updated_at": 705103200
}

GET/v1/compliance/:id

Retrieve a compliance record

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

Request

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

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "policy_name": "Data Privacy Policy",
  "description": "Policy regarding data privacy and protection.",
  "status": "active",
  "created_at": 705103200,
  "updated_at": 705103200
}

PUT/v1/compliance/:id

Update a compliance record

This endpoint allows you to perform an update on a compliance record. Examples of updates are changing the policy name, updating the description, or modifying the status.

Optional attributes

  • Name
    policy_name
    Type
    string
    Description

    Updated name of the compliance policy.

  • Name
    description
    Type
    string
    Description

    Updated description of the compliance policy.

  • Name
    status
    Type
    string
    Description

    Updated status of the compliance policy.

Request

PUT
/v1/compliance/xgQQXg3hrtjh7AvZ
curl -X PUT https://api.finx.ai/v1/compliance/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}" \
  -d 'status'="inactive"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "policy_name": "Data Privacy Policy",
  "description": "Policy regarding data privacy and protection.",
  "status": "inactive",
  "created_at": 705103200,
  "updated_at": 705103200
}

DELETE/v1/compliance/:id

Delete a compliance record

This endpoint allows you to delete your compliance 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/compliance/xgQQXg3hrtjh7AvZ
curl -X DELETE https://api.finx.ai/v1/compliance/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"

Was this page helpful?