[POST] .../v1/retailcardmigration/settingcondition/add
Adds an additional condition to a retail card migration task setting. Use this method to add an item, item group or stock condition that narrows or excludes data for a retail card migration setting. The request requires setting_id and accepts condition type, value and exclude; SalesCount settings do not allow item or item group conditions and the response returns new_id for the created condition. The method checks the current request user and requires retail card migration edit permission; missing body, missing setting_id, missing setting, incompatible condition type, denied permission, invalid enum or value and storage errors are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| exclude | Boolean | Optional | Exclusion flag. If true, the object matching the additional condition is excluded. |
| setting_id | Int64 | Required | Setting ID that the additional condition belongs to. |
| type | String | Optional | Additional condition type. Allowed values: Default, Items, Item_Groups, Stocks. |
| value | Int64 | Optional | Value. |
Request Example
{
"exclude": true,
"setting_id": 1,
"type": "Items",
"value": 1
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Insert | Created record result. |
Response Example
{
"ok": true,
"result": {
"new_id": 1
}
}