> For the complete documentation index, see [llms.txt](https://apps.docs.rootflo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apps.docs.rootflo.ai/ai-gold-auditor-app/gold-loan-submission-api-async.md).

# Gold Loan Submission API (Async)

### **Gold Submit API**

#### Overview

This is a comprehensive API for processing gold loan is async fashion. The API supports end to end loan processing which involves following functions:

1. Gold Loan Image Clarity and Overlap check
2. Gold Loan Segmentation and item detection, with item classification
3. Item level stone weight ratio estimation (including all non-gold items like threads, and other attachment)
4. Fraud design db check for spurious blacklist
5. Excess funding estimation
6. Spurious gold jewellery prediction.

The final results are stored in DB and can be fetched against loan\_id using APIs.

#### API Endpoint

**POST**: `https://<base_url>/floware/v1/image/analyse`

#### **Headers**

* `Content-Type`: application/json
* `X-Rootflo-Signature` : HMAC signature
* `X-Rootflo-Key` : HMAC Key

{% content-ref url="/pages/dd2YKnoHkmgvYrEIYsIj" %}
[Authentication](/authentication.md)
{% endcontent-ref %}

Please use the HMAC authentication document to create the HMAC Signature and use the same in the header.

```json
{
  "nonce": "<random 32 length nonce>", ## check auth docs
  "image": "<URL of the image or base64 data>",
  "metadata": {
    "branch": "branch 1234",
    "zone": "zone 12",
    "loan_id": "123455",
    "pos": 23.6,
    "parent_loan_id": "GL1223322",
    "loan_type": "top_up | new", // top_up / new 
    "items": [
      {
        "item_id": "ITM001",
        "item_type": "Ring",
        "item_count": 1,
        "item_description": "Gold ring with stone",
        "item_gross_weight": 20.4,
        "item_stone_weight": 10.1
      },
      {
        "item_id": "ITM002",
        "item_type": "Chain",
        "item_count": 2,
        "item_description": "Gold chain",
        "item_gross_weight": 16.4,
        "item_stone_weight": 8.1
      }
    ]
  }
}
```

#### **Image Formats**

* **Base64-encoded Image**: `"data:image/jpeg;base64,{base64_image}"`
  * Ensure the Base64 string includes the correct MIME type (e.g., image/jpeg, image/png).
  * **Max image size**: 2.5 MB.

### **Response**

**Status**: `200 OK`

```
{
  "meta": {
    "status": 1,
    "message": "success"
  },
  "data": {
    "message_id": "<id of the processing task>"
  }
}
```

### **Gold Audit API Metadata Fields**

&#x20;

| <p><strong>Field</strong></p><p> </p><p> </p>                  | <p><strong>Description</strong></p><p> </p><p> </p>                        | <p><strong>Type</strong></p><p> </p><p> </p> | <p><strong>Purpose</strong></p><p> </p><p> </p>                                                       | <p><strong>Optional</strong></p><p> </p><p> </p> |
| -------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| <p>branch</p><p> </p><p> </p>                                  | <p>Branch identifier</p><p> </p><p> </p>                                   | <p>String</p><p> </p><p> </p>                | <p>Identifies the branch submitting the gold item</p><p> </p><p> </p>                                 | <p>False</p><p> </p><p> </p>                     |
| <p>city</p><p> </p><p> </p>                                    | <p>City identifier</p><p> </p><p> </p>                                     | <p>String</p><p> </p><p> </p>                | <p>City where the branch is located</p><p> </p><p> </p>                                               | <p>True</p><p> </p><p> </p>                      |
| <p>region</p><p> </p><p> </p>                                  | <p>Region identifier</p><p> </p><p> </p>                                   | <p>String</p><p> </p><p> </p>                | <p>Broader geographical region</p><p> </p><p> </p>                                                    | <p>True</p><p> </p><p> </p>                      |
| <p>zone</p><p> </p><p> </p>                                    | <p>Zone identifier</p><p> </p><p> </p>                                     | <p>String</p><p> </p><p> </p>                | <p>Geographic zone for segmentation</p><p> </p><p> </p>                                               | <p>True</p><p> </p><p> </p>                      |
| <p>category</p><p> </p><p> </p>                                | <p>Branch category (e.g., rural/urban)</p><p> </p><p> </p>                 | <p>String</p><p> </p><p> </p>                | <p>Branch classification</p><p> </p><p> </p>                                                          | <p>True</p><p> </p><p> </p>                      |
| <p>customer\_id</p><p> </p><p> </p>                            | <p>Customer identifier</p><p> </p><p> </p>                                 | <p>String</p><p> </p><p> </p>                | <p>Links submission to a specific customer</p><p> </p><p> </p>                                        | <p>True</p><p> </p><p> </p>                      |
| <p>agent\_id</p><p> </p><p> </p>                               | <p>Agent identifier</p><p> </p><p> </p>                                    | <p>String</p><p> </p><p> </p>                | <p>Identifies the agent processing the item</p><p> </p><p> </p>                                       | <p>True</p><p> </p><p> </p>                      |
| <p>loan\_id</p><p> </p><p> </p>                                | <p>Loan identifier</p><p> </p><p> </p>                                     | <p>String</p><p> </p><p> </p>                | <p>Associates the item with a loan application</p><p> </p><p> </p>                                    | <p>False</p><p> </p><p> </p>                     |
| <p>loan\_date</p><p> </p><p> </p>                              | <p>Loan date</p><p> </p><p> </p>                                           | <p>Timestamp</p><p> </p><p> </p>             | <p>Format: <code>YYYY-MM-DD 00:00:00</code></p><p> </p><p> </p>                                       | <p>False</p><p> </p><p> </p>                     |
| <p>gold\_loan\_category</p><p> </p><p> </p>                    | <p>Gold loan scheme</p><p> </p><p> </p>                                    | <p>String</p><p> </p><p> </p>                | <p>Scheme the gold is pledged under</p><p> </p><p> </p>                                               | <p>True</p><p> </p><p> </p>                      |
| <p>loan\_tenure</p><p> </p><p> </p>                            | <p>Loan tenure</p><p> </p><p> </p>                                         | <p>Integer</p><p> </p><p> </p>               | <p>Duration of the loan (in months)</p><p> </p><p> </p>                                               | <p>True</p><p> </p><p> </p>                      |
| <p>loan\_amount</p><p> </p><p> </p>                            | <p>Loan amount</p><p> </p><p> </p>                                         | <p>Number</p><p> </p><p> </p>                | <p>Financial value of the loan</p><p> </p><p> </p>                                                    | <p>True</p><p> </p><p> </p>                      |
| <p>gross\_weight</p><p> </p><p> </p>                           | <p>Gross weight (including stones)</p><p> </p><p> </p>                     | <p>Number</p><p> </p><p> </p>                | <p>Total weight of the jewelry (grams)</p><p> </p><p> </p>                                            | <p>True</p><p> </p><p> </p>                      |
| <p>stone\_weight</p><p> </p><p> </p>                           | <p>Stone/gem weight</p><p> </p><p> </p>                                    | <p>Number</p><p> </p><p> </p>                | <p>Weight of non-gold components (grams)</p><p> </p><p> </p>                                          | <p>False</p><p> </p><p> </p>                     |
| <p>net\_weight</p><p> </p><p> </p>                             | <p>Net gold weight</p><p> </p><p> </p>                                     | <p>Number</p><p> </p><p> </p>                | <p>Gold weight after deducting stones (grams)</p><p> </p><p> </p>                                     | <p>False</p><p> </p><p> </p>                     |
| <p>gold\_purity</p><p> </p><p> </p>                            | <p>Gold purity</p><p> </p><p> </p>                                         | <p>Number</p><p> </p><p> </p>                | <p>Purity level (e.g., in carats)This is usually the average purity of the packet</p><p> </p><p> </p> | <p>False</p><p> </p><p> </p>                     |
| <p>items</p><p> </p><p> </p>                                   | <p>List of items in the image</p><p> </p><p> </p>                          | <p>Array</p><p> </p><p> </p>                 | <p>Details of individual items</p><p> </p><p> </p>                                                    | <p>True</p><p> </p><p> </p>                      |
| <p>items\[0].item\_id</p><p> </p><p> </p>                      | <p>Item identifier</p><p> </p><p> </p>                                     | <p>String</p><p> </p><p> </p>                | <p>Unique ID for the item</p><p> </p><p> </p>                                                         | <p>False</p><p> </p><p> </p>                     |
| <p>items\[0].item\_type</p><p> </p><p> </p>                    | <p>Item type (e.g., bangle, chain)</p><p> </p><p> </p>                     | <p>String</p><p> </p><p> </p>                | <p>Type of the item</p><p> </p><p> </p>                                                               | <p>False</p><p> </p><p> </p>                     |
| <p>items\[0].item\_count</p><p> </p><p> </p>                   | <p>Item count</p><p> </p><p> </p>                                          | <p>Number</p><p> </p><p> </p>                | <p>Quantity of the item</p><p> </p><p> </p>                                                           | <p>False</p><p> </p><p> </p>                     |
| <p>items\[0].item\_description</p><p> </p><p> </p>             | <p>Item description</p><p> </p><p> </p>                                    | <p>String</p><p> </p><p> </p>                | <p>Description of the item</p><p> </p><p> </p>                                                        | <p>False</p><p> </p><p> </p>                     |
| <p>items\[0].item\_gross\_weight</p><p> </p><p> </p>           | <p>Gross Weight of the item in grams</p><p> </p><p> </p>                   | <p>Float</p><p> </p><p> </p>                 | <p>Item net weight, including stone</p><p> </p><p> </p>                                               | <p>False</p><p> </p><p> </p>                     |
| <p>items\[0].item\_stone\_weight</p><p> </p><p> </p>           | <p>Stone Weight in grams</p><p> </p><p> </p>                               | <p>Float</p><p> </p><p> </p>                 | <p>The non-gold weight</p><p> </p><p> </p>                                                            | <p>False</p><p> </p><p> </p>                     |
| <p>items\[0].item\_purity</p><p> </p><p> </p>                  | <p>Purity of the item in grams</p><p> </p><p> </p>                         | <p>Float</p><p> </p><p> </p>                 | <p>Item purity</p><p> </p><p> </p>                                                                    | <p>False</p><p> </p><p> </p>                     |
| <p>metadata\_1</p><p> </p><p> </p>                             | <p>Customer information as JSON</p><p> </p><p> </p>                        | <p>JSON</p><p> </p><p> </p>                  | <p>Information like, customer risk profile, customer pincode</p><p> </p><p> </p>                      | <p>False</p><p> </p><p> </p>                     |
| <p>metadata\_1\['customer\_risk\_profile']</p><p> </p><p> </p> | <p>Risk profile of the customer, high vs medium vs low</p><p> </p><p> </p> | <p>String</p><p> </p><p> </p>                | <p>For spurious modelling</p><p> </p><p> </p>                                                         | <p>False</p><p> </p><p> </p>                     |
| <p>metadata\_1\['branch\_pincode']</p><p> </p><p> </p>         | <p>pincode customer</p><p> </p><p> </p>                                    | <p>String</p><p> </p><p> </p>                | <p>Customer profile</p><p> </p><p> </p>                                                               | <p>False</p><p> </p><p> </p>                     |
| pos                                                            | Principle outstanding amount                                               | Float                                        | When there is a top\_up on a previous loan or re-pledge                                               | False                                            |
| parent\_loan\_id                                               | The loan ID of the parent loan                                             | String                                       | When there is a top up or related loan                                                                | False                                            |
| loan\_type                                                     | The type of loan new vs top\_up vs re-pledge                               | String                                       | To evaluate the loan is a top-up loan or not                                                          | False                                            |

***

&#x20;

### **Example Payload**

```json
{
  "nonce": "bd2ac618c39d30e569f00feef27f77a2",
  "image": "data:image/png;base64,iVBORw0KGgoAAAANCDPMN/nn5GHb4UT/+Drfr5jbd",
  "metadata": {
    "customer_id": "CUST12345",
    "loan_id": "LN98765",
    "branch": "Main Branch",
    "city": "Mumbai",
    "region": "West",
    "zone": "Zone 1",
    "category": "Gold Loan",
    "agent_id": "AGT001",
    "item_id": "ITEM123",
    "loan_date": "2025-07-01T09:00:00",
    "gold_loan_category": "Regular",
    "loan_tenure": 12,
    "loan_amount": 250000.0,
    "gross_weight": 50.5,
    "stone_weight": 2.0,
    "net_weight": 48.5,
    "jewellery_items_count": 3,
    "pos": 23.6,
    "parent_loan_id": "GL1223322",
    "loan_type": "top_up | new", // top_up / new 
    "gold_purity": 22.0,
    "items": [
      {
        "item_id": "ITM001",
        "item_type": "Ring",
        "item_count": 1,
        "item_description": "Gold ring with stone",
        "item_gross_weight": 20.4,
        "item_stone_weight": 10.1
      },
      {
        "item_id": "ITM002",
        "item_type": "Chain",
        "item_count": 2,
        "item_description": "Gold chain",
        "item_gross_weight": 16.4,
        "item_stone_weight": 8.1
      }
    ],
    "metadata_1": {
        "customer_risk_profile": "high",
        "branch_pincode": "546567"
     }
  }
}
```

#### **Notes**

* All fields are included in the JSON payload.
* Metadata helps organize submissions for AI analysis.
* Data is used for gold assaying and audit workflows.
* This is an async API, and does detailed analysis of the gold ornaments in including clarity & overlap check, spurious design database checks, purity spurious ornament check and stone wieght assessment.


---

# 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://apps.docs.rootflo.ai/ai-gold-auditor-app/gold-loan-submission-api-async.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.
