# Update a Transaction Rule

## Update Transaction Rule

<mark style="color:orange;">`PUT`</mark> `https://workspace.myeshopbox.com/payments/v1/transactionRules`

#### Headers

| Name          | Type   | Description                                 |
| ------------- | ------ | ------------------------------------------- |
| Authorization | string | The Bearer token to grant access to the API |

#### Request Body

| Name               | Type    | Description                                                                                                 |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------- |
| channelId          | string  | <p>Unique Id for sales channel,<br>It is a combination of portal, seller account and fulfillment module</p> |
| feeId              | array   | <p>Fee Ids for which transaction <br>rule is created</p>                                                    |
| dueDays            | number  | Number of days in which payment will be due                                                                 |
| settlementType     | string  | <p>Frequency at which payment is received,<br><code>Enum: WEEKLY, MONTHLY, DAILY</code></p>                 |
| settlementDates    | string  | <p>Date of month at which payment is to be done iff<br><code>settlementType</code> is MONTHLY</p>           |
| settlementWeekdays | string  | <p>Day of week at which payment is to done iff<br><code>settlementType</code> is WEEKLY</p>                 |
| transactionRuleId  | string  | Rule Id for a particular channel                                                                            |
| status             | boolean | <p>Active or Inactive status of a transaction rule,<br>Reconciliation is not done for Inactive status</p>   |
| ruleName           | string  | Name for a transaction rule                                                                                 |
| portalId           | number  | Unique Id for a portal (Ex. Amazon, Flipkart)                                                               |

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

```
{
    "status": "success"
}
```

{% endtab %}
{% endtabs %}

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

```scheme
curl -X PUT https://workspace.myeshopbox.com/payments/api/v1/transactionRules \
-H "Content-Type: application/json" \
-H "Authorization: Bearer XXXX" \
-d $'{
    "channelId": "262",
    "feeId": [
        "33"
    ],
    "dueDays": "4",
    "settlementType": "weekly",
    "settlementDates": "2",
    "settlementWeekdays": "Monday,Tuesday",
    "transactionRuleId": "47",
    "status": true,
    "ruleName": "abcd",
    "transactionId": 3
}'
```

{% 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://eshop.gitbook.io/eshopbox-developers/payment/transaction-rules/update-a-transaction-rule.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.
