# Getting the stage (status) of the application

**method:** POST

**url:** <https://test.ninjalender.online/loan/get-stage>

**Headers:**

| header\_key   | content           |
| ------------- | ----------------- |
| Content-Type: | application/json; |
| Authorization | Bearer {{Token}}  |

Where {{Token}} - token obtained during authorization

&#x20;

**Request body:**

| Key    | Type        | Required | Description        |
| ------ | ----------- | -------- | ------------------ |
| params | JSON.object | +        | Request parameters |

**Params:**

| Key | Type    | Required | Description       |
| --- | ------- | -------- | ----------------- |
| id  | numeric | +        | id of application |

**Response:**

| Key     | Type        | Description      |
| ------- | ----------- | ---------------- |
| code    | int         | Response code    |
| message | string      | Response message |
| data    | JSON.object | Response data    |

**data:**

| Key           | Type   | Description                                                                                                                                                                                        |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id            | int    | Application id                                                                                                                                                                                     |
| stage         | string | Application stage                                                                                                                                                                                  |
| confirm\_link | string | Optional parameter. If the application is at the "Awaiting confirmation by the borrower" stage, there will be a link to redirect the borrower in his personal account on the Ninja Lender platform |

**Stage description:**

<table><thead><tr><th data-type="number">Stage id</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>Awaiting confirmation by the borrower</td></tr><tr><td>2</td><td>Application in progress of distribution</td></tr><tr><td>3</td><td>The application did not interest any of the buyers and withdraw from system.</td></tr><tr><td>4</td><td>ЗApplication sold</td></tr><tr><td>5</td><td>The application has been sold, and information on issuance has been received on it (from the buyer)</td></tr><tr><td>6</td><td>The borrower refused the application</td></tr><tr><td>7</td><td>The borrower did not confirm the application within a week</td></tr></tbody></table>

**Request example:**

```
{
    "params":{
        "id": 121
    }
}
```

**Response example:**

**Success:**

```
{
    "code": 0,
    "message": "ok",
    "data": {
        "id": 121,
        "stage": 4
    },
    "log_key": 4949
}
```

**Error:**

```
{
    "code": -1,
    "message": "error",
    "log_key": 748,
    "errors":[
        {
            "code": -1020401,
            "message": "Params is required"
        }
    ]
}
```

**Error list:**

| Ключ         | Сообщение          |
| ------------ | ------------------ |
| -96          | invalid key        |
| -97          | invalid token      |
| -98          | expired token      |
| -99          | system error       |
| -100         | access denied      |
| -1020**4**01 | Params is required |
| -1020402     | Id is blank        |
| -1020403     | Loan not found     |


---

# 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://ninja-lender.gitbook.io/ninja-lender-v2-api-en/seller/getting-the-stage-status-of-the-application.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.
