Zaktualizuj akcję własną
PUT
/api/v3/UserEvents/{userEventId}
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/UserEvents/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","description":"example","button":{"enabled":true,"caption":"example","icon":"example","color":"example","location":["Order"],"refreshPageAfterAnyScriptFinishes":true},"shortcut":{"enabled":true,"value":"example"},"barcode":{"enabled":true,"value":"example"},"synchronous":true,"refreshPageAfterAnyScriptFinishes":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/UserEvents/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "description": "example", "button": { "enabled": true, "caption": "example", "icon": "example", "color": "example", "location": [ "Order" ], "refreshPageAfterAnyScriptFinishes": true }, "shortcut": { "enabled": true, "value": "example" }, "barcode": { "enabled": true, "value": "example" }, "synchronous": true, "refreshPageAfterAnyScriptFinishes": true }'Operacja asynchroniczna – zwraca zadanie (job), którego wynik sprawdzisz w Zadaniach asynchronicznych.
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”userEventId
wymagane
integer format: int64
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
name
string
description
string
button
object
enabled
boolean
caption
string
icon
string
color
string
location
Array<string>
refreshPageAfterAnyScriptFinishes
boolean
shortcut
object
enabled
boolean
value
string
barcode
object
enabled
boolean
value
string
synchronous
boolean
refreshPageAfterAnyScriptFinishes
boolean
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Typ treściapplication/json
object
id
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
payload
result
status
string
command
string
scope
string
scopeValue
string
silentMode
boolean
ajsChainId
string
ajsChainVisits
string
Example
{ "status": "New"}
