> For the complete documentation index, see [llms.txt](https://docs.bullcredtech.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bullcredtech.com/api-reference/apis-en/proposal-flow/post-proposals-credit-analysis-retry.md).

# 4.2. Reprocess analysis

**POST** `/proposals/{proposalId}/credit-analysis/retry` *(synchronous, default)*

**POST** `/proposals/{proposalId}/credit-analysis/retry?async=true` *(asynchronous via query param)*

**POST** `/proposals/{proposalId}/credit-analysis/retry/async` *(asynchronous — dedicated endpoint)*

Reprocesses a proposal's credit analysis using the last saved consent, without requiring new customer consent.

This endpoint is intended for technical credit analysis failures, such as Dataprev unavailability, Dataprev maintenance window, credit engine error, or instability in integrated partners.

There are **three variants** with the same business semantics (dispatch guard with dedup + retry limit) — choose the one that best fits the partner's flow:

| Variant                                                                    | Behavior                                                                                                                                                                                                             |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`POST /proposals/{proposalId}/credit-analysis/retry`** (sync)            | Blocks until the analysis completes and returns the result directly (`200 OK`). It may take up to \~120s.                                                                                                            |
| **`POST /proposals/{proposalId}/credit-analysis/retry?async=true`**        | Returns `202 Accepted` immediately and processes in the background. The partner retrieves the result via [`GET /credit-analysis`](/api-reference/apis-en/proposal-flow/get-proposals-credit-analysis.md) or webhook. |
| **`POST /proposals/{proposalId}/credit-analysis/retry/async`** (dedicated) | Dedicated endpoint equivalent to the `?async=true`. Recommended for new integrations — the gateway has a short timeout (29s) configured specifically for this route.                                                 |

In all variants, if there has already been a recent retry for the same proposal within the dedup window, or if the retry limit has been reached, the response is **synchronous (200 OK)** with the appropriate message — the `?async=true` does not apply in these cases because they are instant decisions.

{% hint style="info" %}
**When to use**

Use this route only after receiving the status `CREDIT_ANALYSIS_FAILED` via webhook or when identifying this status in the proposal query.
{% endhint %}

## URL Parameters

| Parameter    | Type          | Description |
| ------------ | ------------- | ----------- |
| `proposalId` | string (UUID) | Proposal ID |

## Query Parameters

| Parameter | Type    | Description                                                                                                                                                                   |
| --------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `async`   | boolean | Applicable only to `POST /credit-analysis/retry`. If `true`, returns `202 Accepted` immediately and processes in the background. Use polling or webhook to obtain the result. |

## Headers

| Header          | Required | Description                                     |
| --------------- | :------: | ----------------------------------------------- |
| `Authorization` |    Yes   | Bearer token from the authorized partner source |

## Request Body

This endpoint does not accept a body.

## Business Rules

* Retry is allowed only for technical failures in the credit analysis that are eligible for retry
* The proposal must be in a status compatible with reprocessing, such as `CREDIT_ANALYSIS_FAILED`
* The proposal's latest consent must exist
* The partner has up to 96 hours after the failure to call retry
* The partner is responsible for storing the status received in the webhook and deciding when to start the retry

## Recommended Flow

1. Monitor the proposal webhook until the status is identified `CREDIT_ANALYSIS_FAILED`
2. Wait a few minutes if the failure was caused by temporary instability
3. Call `POST /proposals/{proposalId}/credit-analysis/retry`
4. Track the new result via webhook or by querying `GET /proposals/{proposalId}`

## Request Example (sync — default)

```http
POST /proposals/99afc6ce-4720-4746-9cf6-0a23e85cdf75/credit-analysis/retry HTTP/1.1
Authorization: Bearer your_token
```

## Request Example (asynchronous — recommended)

Use one of the two forms below. Both are equivalent:

```http
POST /proposals/99afc6ce-4720-4746-9cf6-0a23e85cdf75/credit-analysis/retry?async=true HTTP/1.1
Authorization: Bearer your_token
```

```http
POST /proposals/99afc6ce-4720-4746-9cf6-0a23e85cdf75/credit-analysis/retry/async HTTP/1.1
Authorization: Bearer your_token
```

## Success Response (200 OK)

```json
{
  "message": "Credit analysis completed with 1 offer(s) generated",
  "proposal_id": "99afc6ce-4720-4746-9cf6-0a23e85cdf75",
  "status": "OFFERS_RECEIVED",
  "offer": {
    "id": "a69660f8-2309-4a55-a0c6-e6a701a04a67",
    "proposal_id": "99afc6ce-4720-4746-9cf6-0a23e85cdf75",
    "offer_type": "STANDARD",
    "status": "ACTIVE",
    "description": "Payroll-Deducted Credit Offer",
    "principal_amount": 25153.66,
    "interest_rate": 4.99,
    "installments": 18,
    "installment_amount": 2327.96,
    "total_amount": 41903.28
  },
  "available_margin": 3071.6,
  "maxLoanAmount": 25153.66,
  "maxInstallments": 18,
  "bank_skip": false
}
```

### Response Fields

| Field              | Type           | Description                                                                                      |
| ------------------ | -------------- | ------------------------------------------------------------------------------------------------ |
| `message`          | string         | Message summarizing the retry result                                                             |
| `proposal_id`      | string (UUID)  | ID of the reprocessed proposal                                                                   |
| `status`           | string         | Logical result of the analysis (`OFFERS_RECEIVED`, `REJECTED` or another final analysis outcome) |
| `offer`            | object \| null | Returned standard offer                                                                          |
| `insuredOffer`     | object \| null | Offer with insurance, when available                                                             |
| `available_margin` | number         | Available payroll-deductible margin                                                              |
| `maxLoanAmount`    | number         | Maximum approved amount                                                                          |
| `maxInstallments`  | number         | Maximum number of installments                                                                   |
| `bank_skip`        | boolean        | Indicates whether bank validation can be skipped                                                 |

### Response Notes

* `offer` may come as `null` when reprocessing ends without an approved offer
* `insuredOffer` is only returned when the partner has loan protection insurance enabled
* Even after the retry, the official tracking of the result must be done via webhook or proposal query

## Asynchronous Response (202 Accepted)

Returned when using `?async=true` or `/credit-analysis/retry/async`. **The analysis has not yet been completed** — it is necessary to use polling on [`GET /proposals/{proposalId}/credit-analysis`](/api-reference/apis-en/proposal-flow/get-proposals-credit-analysis.md) or track the webhook.

```json
{
  "async_processing": true,
  "message": "Credit analysis retry started in the background",
  "proposal_id": "99afc6ce-4720-4746-9cf6-0a23e85cdf75",
  "status": "CREDIT_ANALYSIS_IN_PROGRESS",
  "processing_started_at": "2026-05-08T14:30:00.000Z",
  "status_url": "/proposals/99afc6ce-4720-4746-9cf6-0a23e85cdf75/credit-analysis"
}
```

| Field                   | Type         | Description                                     |
| ----------------------- | ------------ | ----------------------------------------------- |
| `async_processing`      | boolean      | `true` while the analysis has not finished      |
| `status`                | string       | `CREDIT_ANALYSIS_IN_PROGRESS` during processing |
| `processing_started_at` | string (ISO) | When processing started                         |
| `status_url`            | string       | URL for polling                                 |

{% hint style="info" %}
**Instant decisions remain synchronous**

Even in asynchronous mode, if the retry falls under **dedup** (another recent retry in flight) or **retry limit** reached, the response is returned as `200 OK` direct — there is no long-running work to move to the background in these cases.
{% endhint %}

## Possible Errors

| Code | Message                                                                                        |
| ---- | ---------------------------------------------------------------------------------------------- |
| 400  | Credit analysis retry available only for retryable failures from Dataprev or the credit engine |
| 400  | Proposal without saved consent. Credit analysis reprocessing unavailable                       |
| 400  | 96-hour reprocessing window expired                                                            |
| 403  | JWT not permitted to reprocess the specified proposal                                          |
| 404  | Proposal not found                                                                             |

{% hint style="success" %}
**Next Step**

After calling retry, track the result by:

* **Polling:** [`GET /proposals/{proposalId}/credit-analysis`](/api-reference/apis-en/proposal-flow/get-proposals-credit-analysis.md) — recommended for integrations via `/retry/async` or `?async=true`
* **Webhook** — receives the proposal status updated automatically
* General proposal details: [`GET /proposals/{proposalId}`](/api-reference/apis-en/queries/get-proposals-by-id.md)
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.bullcredtech.com/api-reference/apis-en/proposal-flow/post-proposals-credit-analysis-retry.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
