Przejdź do głównej zawartości

Utwórz akcję własną

POST
/api/v3/UserEvents
curl --request POST \
--url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/UserEvents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "id": 1, "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, "position": 1, "refreshPageAfterAnyScriptFinishes": true }'

Operacja asynchroniczna – zwraca zadanie (job), którego wynik sprawdzisz w Zadaniach asynchronicznych.

Typ treściapplication/json
object
id
integer format: int64
nullable
name
string
nullable
description
string
nullable
button
object
enabled
boolean
caption
string
nullable
icon
string
nullable
color
string
nullable
location
Array<string>
nullable
Dozwolone wartości: Order Orders Returns Pick Pack Return
refreshPageAfterAnyScriptFinishes
boolean
shortcut
object
enabled
boolean
value
string
nullable
barcode
object
enabled
boolean
value
string
nullable
synchronous
boolean
nullable
position
integer format: int64
nullable
refreshPageAfterAnyScriptFinishes
boolean

Success

Typ treściapplication/json
object
id
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
payload
nullable
result
nullable
status
string
Dozwolone wartości: New InProgress Completed Failed
command
string
nullable
scope
string
nullable
scopeValue
string
nullable
silentMode
boolean
ajsChainId
string
nullable
ajsChainVisits
string
nullable
Example
{
"status": "New"
}