Credit Score

Credit scores are a vital aspect of financial services, providing an assessment of a customer's creditworthiness. On this page, we’ll dive into the different credit score endpoints you can use to manage credit scores programmatically. We'll look at how to query, create, update, and delete credit score records.

The credit score model

The credit score model contains all the information related to a customer's credit score, including the score itself, the score range, and the date of the score.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the credit score record.

  • Name
    customer_id
    Type
    string
    Description

    Unique identifier for the customer.

  • Name
    score
    Type
    number
    Description

    Credit score of the customer.

  • Name
    score_range
    Type
    string
    Description

    Range of the credit score (e.g., 300-850).

  • Name
    score_date
    Type
    date
    Description

    Date when the credit score was calculated.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the credit score record was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the credit score record was last updated.


GET/v1/credit-scores

List all credit scores

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

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of credit score records returned.

  • Name
    customer_id
    Type
    string
    Description

    Only show records for the specified customer.

  • Name
    min_score
    Type
    number
    Description

    Only show records with a score greater than or equal to this value.

  • Name
    max_score
    Type
    number
    Description

    Only show records with a score less than or equal to this value.

Request

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

Response

{
  "has_more": false,
  "data": [
    {
      "id": "xgQQXg3hrtjh7AvZ",
      "customer_id": "WAz8eIbvDR60rouK",
      "score": 720,
      "score_range": "300-850",
      "score_date": "2024-05-01",
      "created_at": 705103200,
      "updated_at": 705103200
    },
    {
      "id": "hSIhXBhNe8X1d8Et"
      // ...
    }
  ]
}

POST/v1/credit-scores

Create a credit score

This endpoint allows you to add a new credit score record. You need to provide the customer ID, score, score range, and score date to create a credit score record.

Required attributes

  • Name
    customer_id
    Type
    string
    Description

    Unique identifier for the customer.

  • Name
    score
    Type
    number
    Description

    Credit score of the customer.

  • Name
    score_range
    Type
    string
    Description

    Range of the credit score (e.g., 300-850).

  • Name
    score_date
    Type
    date
    Description

    Date when the credit score was calculated.

Request

POST
/v1/credit-scores'
curl https://api.finx.ai/v1/credit-scores \
  -H "Authorization: Bearer {token}" \
  -d 'customer_id'="WAz8eIbvDR60rouK" \
  -d 'score'=720 \
  -d 'score_range'="300-850" \
  -d 'score_date'="2024-05-01"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "customer_id": "WAz8eIbvDR60rouK",
  "score": 720,
  "score_range": "300-850",
  "score_date": "2024-05-01",
  "created_at": 705103200,
  "updated_at": 705103200
}

GET/v1/credit-scores/:id

Retrieve a credit score

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

Request

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

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "customer_id": "WAz8eIbvDR60rouK",
  "score": 720,
  "score_range": "300-850",
  "score_date": "2024-05-01",
  "created_at": 705103200,
  "updated_at": 705103200
}

PUT/v1/credit-scores/:id

Update a credit score

This endpoint allows you to perform an update on a credit score record. Examples of updates are changing the score, updating the score range, or modifying the score date.

Optional attributes

  • Name
    score
    Type
    number
    Description

    Updated credit score of the customer.

  • Name
    score_range
    Type
    string
    Description

    Updated range of the credit score.

  • Name
    score_date
    Type
    date
    Description

    Updated date when the credit score was calculated.

Request

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

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "customer_id": "WAz8eIbvDR60rouK",
  "score": 750,
  "score_range": "300-850",
  "score_date": "2024-05-01",
  "created_at": 705103200,
  "updated_at": 705103200
}

DELETE/v1/credit-scores/:id

Delete a credit score

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

Was this page helpful?