# Fetch Score Results

## Fetch Score

<mark style="color:green;">`GET`</mark> `{{BASE_URL}}/api/v1/transactions/score?merchant_id=`M12345

This endpoint allows you to submit transaction data for credit scoring.

#### Headers

<table><thead><tr><th width="206">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>Authentication</td><td>String</td><td>Authentication token to track down who is emptying our stocks.</td></tr></tbody></table>

#### Request Parameters

<table><thead><tr><th>Name</th><th width="233">Type</th><th>Description</th></tr></thead><tbody><tr><td>merchant_id</td><td>String</td><td>ID of the merchant</td></tr></tbody></table>

{% tabs %}
{% tab title="Request" %}

<pre class="language-javascript"><code class="lang-javascript">{
<strong>  "merchant_id": "P-CUST-2023-00084"
</strong><strong>}
</strong></code></pre>

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "status": 200,
  "message": "Transaction score data fetched successfully",
  "data": {
    "customer_id": 1001,
    "merchant_id": "M12345",
    "loan_type": "short_term",
    "principal_segment": "SME",

    // Order count
    "no_of_orders_1m": 15,
    "no_of_orders_3m": 45,
    "no_of_orders_6m": 120,

    // Total order amount
    "total_order_amount_1m": 20000.25,
    "total_order_amount_3m": 54000.45,
    "total_order_amount_6m": 150000.75,

    // Maximum order amount
    "max_order_amount_1m": 2500.0,
    "max_order_amount_3m": 4000.0,
    "max_order_amount_6m": 5000.0,

    // Minimum order amount
    "min_order_amount_1m": 350.0,
    "min_order_amount_3m": 300.0,
    "min_order_amount_6m": 250.0,

    // Number of unique products
    "no_unique_products_1m": 10,
    "no_unique_products_3m": 18,
    "no_unique_products_6m": 35,

    {...}

    "score_output": {
      "reason_code_1": "Low number of transactions",
      "reason_code_2": "Low frequency of transactions",
      "reason_code_3": "Customer inactive for a long period",
      "reason_code_4": "Low transaction volumes",
      "probability": "45.56",
      "grade": "GG",
      "credit_score": "412",
    },

    "fraud_output": {
      "transaction_risk_score": 68.45,
      "risk_grade": "High Risk",
      "reason_codes": {
        "code_1": "Low transaction count over the past 90 days",
        "code_2":
          "Irregular transaction frequency compared to historical patterns",
        "code_3":
          "Extended inactivity period detected (last transaction > 180 days)",
      },
      "alert_flag": "Red",
      "recommended_action": "Immediate manual review and enhanced due diligence",
    },
  },
};
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.patascore.com/transactions-operations/fetch-score-results.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
