---
page_title: Update a mandate's metadata
product: LotusPay
platform: Web
page_source: https://juspay.io/in/docs/lotuspay/web/core-resources/update-a-mandates-metadata
openapi: https://juspay.io/in/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fin%2Fdocs%2Flotuspay%2Fweb%2Fcore-resources%2Fupdate-a-mandates-metadata
llms_txt: https://juspay.io/in/docs/llms.txt
product_llms_txt: https://juspay.io/in/docs/lotuspay/llms.txt
---

## API Version: default


# **Update a mandate's metadata** 



Updates the metadata on an existing mandate object. Supply the unique mandate identifier and the metadata to be updated.

**ARGUMENTS** 


| Argument | Description |
|---|---|
| metadata REQUIRED	 | A JSON array of key-value pairs. Up to 30 pairs may be passed. The pairs will be stored in ascending order of key length (i.e. key abc will come before key abcd) regardless of the order passed. |


**Returns**  Returns an upated mandate object if a valid identifier was provided.## Endpoints:
- Sandbox: https://api-test.lotuspay.com/v1/mandates/{ID}/update

- Production: https://api.lotuspay.com/v1/mandates/{ID}/update

## Request Type: 
PATCH

## Content-Type: 
application/json

## Authorization:

#### Basic Auth:
Auth example
- Value:  sk_test_XjIHowXWSI23uvjepz2X82
## Sample Code Snippets:
### Sample Request and Response:

#### Request:
```Shell
$ curl https://api-test.lotuspay.com/v1/mandates/MD004433221AA/update \
   -u sk_test_XjIHowXWSI23uvjepz2X82: \
   -d metadata={"key1": "value1", "key2": "value2", "key3": "value3"}

```

#### Response:
```json
{
    "id": "MD004433221AA",
    "object": "mandate",
    "created": 1530224170,
    "livemode": false,
    "metadata": {
      "key1": "value1",
      "key2": "value2",
      "key3": "value3"
    },
    "amount_collection": 10000,
    "amount_maximum": null,
    "category_code": "L001",
    "category_description": "Loan installment amount",
    "creditor_agent_code": "HDFC",
    "creditor_agent_mmbid": "HDFC0999999",
    "creditor_agent_name": "HDFC BANK",
    "creditor_name": "LOTUSPAY SOLUTIONS PVT LTD",
    "creditor_utility_code": "NACH00000000005549",
    "date_first_collection": "2020-01-01",
    "date_final_collection": "2021-12-31",
    "debtor_account_name": "AMIT JAIN",
    "debtor_account_number": "****5678",
    "debtor_account_type": "savings",
    "debtor_agent_code": "ICIC",
    "debtor_agent_mmbid": "ICIC0000001",
    "debtor_agent_name": "ICICI BANK",
    "debtor_email": "test@lotuspay.com",
    "debtor_mobile": "9999123456",
    "debtor_pan": "******234B",
    "debtor_phone": null,
    "frequency": "MNTH",
    "instrument": "DEBIT",
    "occurrence_sequence_type": "RCUR",
    "reference1": "CUSTOMER_123",
    "reference2": "PRODUCT_ABC",
    "reference3": null,
    "reference4": null,
    "reference5": null,
    "variant": "emandate_api",
    "mandate_request_id": "SC004433221AA001",
    "reason_code": "ac01",
    "reason_description": "ACK Default Accept Reason",
    "umrn": "ICIC7000000000272000",
    "class": "internal",
    "date_acknowledged": "2018-06-15",
    "date_responded": "2018-06-17",
    "date_cancelled": null,
    "status": "active",
    "status_cancel": null,
    "agent": "AG004433DD55AA",
    "bank_account": "BA004433DD55AA",
    "customer": "CU00443311DDAA",
    "nach_profile": "NP00AABBCC1122",
    "source": "SC004433221AA"
  }

```

## API Responses:


---

## See Also

- [Retrieve a mandate](https://juspay.io/in/docs/lotuspay/web/core-resources/retrieve-a-mandate)
- [Cancel a mandate (Via Sponsor Bank)](https://juspay.io/in/docs/lotuspay/web/core-resources/cancel-a-mandate-via-sponsor-bank)
