Przejdź do głównej zawartości

Utwórz modyfikator tagu

POST
/api/v2/Modifiers
curl --request POST \
--url https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v2/Modifiers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "tag": "[waluta]", "operator": "replace_if", "condition": "USD", "newValue": "PLN", "position": 1, "parentId": 1 }'

Tworzy regułę zmieniającą wartość tagu w szablonie (np. podmianę wartości przy spełnionym warunku), bez edycji samego szablonu.

Example

{
    "parentId": 1,
    "tag": "[tag]",
    "operator": "replace_if",
    "condition": "val1",
    "newValue": "val2",
}
Typ treściapplication/json
object
tag
wymagane
string
Example
[waluta]
operator
wymagane
string
Dozwolone wartości: replace_if replace_if_diff no_operator
Example
replace_if
condition
wymagane
string
Example
USD
newValue
wymagane
string
Example
PLN
position
integer format: int64
nullable
parentId
integer format: int64
nullable

Success

Typ treściapplication/json
integer format: int64
Examplegenerated
1