> For the complete documentation index, see [llms.txt](https://eshop.gitbook.io/eshopbox-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eshop.gitbook.io/eshopbox-developers/payment/transaction-rules/update-a-transaction-rule.md).

# 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 %}
