> ## Documentation Index
> Fetch the complete documentation index at: https://docs.methodfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Custom Credit Score

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Credit Score simulations allow you to update pending Credit Scores with custom responses for entities in the development environment.

<Warning>If no action is taken within 20 seconds of creating a credit score, it will automatically update with default data.</Warning>

## Path Parameters

<ParamList
  items={[
{
name: 'entity_id',
type: 'string',
required: true,
description: 'ID of the Entity.',
},
{
name: 'crs_id',
type: 'string',
required: true,
description: 'ID of the Credit Score to update.',
},
]}
/>

## Body

<ParamList
  items={[
{
name: 'scores',
type:'object[]',
required: false,
description: 'An array of score objects.',
items: [
  {
    name: 'scores.score',
    type: 'number',
    description: 'The credit score.'
  },
  {
    name: 'scores.source',
    type: 'enum',
    description: 'The source of the credit score.',
    enums: [
      {
        name: 'equifax',
        description: 'Equifax is the source used to pull the credit score.'
      },
      {
        name: 'experian',
        description: 'Experian is the source used to pull the credit score.'
      },
      {
        name: 'transunion',
        description: 'TransUnion is the source used to pull the credit score.'
      }
    ]
  },
  {
    name: 'scores.model',
    type: 'enum',
    description: 'The model used to calculate the credit score.',
    enums: [
      {
        name: 'vantage_3',
        description: <><a href="https://www.creditkarma.com/credit-cards/i/vantagescore-30">VantageScore 3.0</a> credit score model.</>,
      },
      {
        name: 'vantage_4',
        description: <><a href="https://www.creditkarma.com/advice/i/new-vantagescore-4-0-explained">VantageScore 4.0</a> credit score model.</>,
      }
    ]
  },
  {
    name: 'scores.factors',
    type: 'object[]',
    description: 'An array of factors that contributed to the credit score.',
    items: [
      {
        name: 'scores.factors.code',
        type: 'string',
        description: 'The code of the factor.'
      },
      {
        name: 'scores.factors.description',
        type: 'string',
        description: 'The description of the factor.'
      }
    ]
  },
  {
    name: 'scores.created_at',
    type: 'string',
    description: 'Timestamp of when the credit score was generated.'
  }
]
},
]}
/>

## Returns

Returns the updated Credit Score object.

<RequestExample>
  ```bash cURL theme={null}
  curl https://dev.methodfi.com/simulate/entities/{entity_id}/credit_scores/{crs_id} \
    -X POST \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
    -H "Content-Type: application/json" \
    -d '{
      "scores": [
        {
          "score": 800,
          "source": "equifax",
          "model": "vantage_4",
          "factors": [
            {
              "code": "00034",
              "description": "Total of all balances on bankcard or revolving accounts is too high"
            },
            {
              "code": "00012",
              "description": "The date that you opened your oldest account is too recent"
            },
            {
              "code": "00063",
              "description": "Lack of sufficient relevant real estate account information"
            }
          ],
          "created_at": "2024-04-12T00:12:32.768Z"
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  const creditScore = await method
    .simulate
    .entities(entityId)
    .creditScores(crsId)
    .create({
      scores: [
        {
          score: 800,
          source: "equifax",
          model: "vantage_4",
          factors: [
            {
              code: "00034",
              description: "Total of all balances on bankcard or revolving accounts is too high"
            },
            {
              code: "00012",
              description: "The date that you opened your oldest account is too recent"
            },
            {
              code: "00063",
              description: "Lack of sufficient relevant real estate account information"
            }
          ],
          created_at: "2024-04-12T00:12:32.768Z"
        }
      ]
    });
  ```

  ```python Python theme={null}
  credit_score = method.simulate.entities(entity_id).credit_scores(crs_id).create({
    "scores": [
      {
        "score": 800,
        "source": "equifax",
        "model": "vantage_4",
        "factors": [
          {
            "code": "00034",
            "description": "Total of all balances on bankcard or revolving accounts is too high"
          },
          {
            "code": "00012",
            "description": "The date that you opened your oldest account is too recent"
          },
          {
            "code": "00063",
            "description": "Lack of sufficient relevant real estate account information"
          }
        ],
        "created_at": "2024-04-12T00:12:32.768Z"
      }
    ]
  })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "crs_pn4ca33GXFaCE",
    "entity_id": "ent_au22b1fbFJbp8",
    "status": "completed",
    "scores": [
      {
          "score": 800,
          "source": "equifax",
          "model": "vantage_4",
          "factors": [
            {
              "code": "00034",
              "description": "Total of all balances on bankcard or revolving accounts is too high"
            },
            {
              "code": "00012",
              "description": "The date that you opened your oldest account is too recent"
            },
            {
              "code": "00063",
              "description": "Lack of sufficient relevant real estate account information"
            }
          ],
          "created_at": "2024-04-12T00:12:32.768Z"
        }
    ],
    "error": null,
    "created_at": "2024-04-12T00:12:30.228Z",
    "updated_at": "2024-04-12T00:12:41.303Z"
  }
  ```
</ResponseExample>
