Wygeneruj złożony skrypt z kreatora
POST
/api/v4/AjsAopsBuilder/CreateComplexConfig
const url = 'https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v4/AjsAopsBuilder/CreateComplexConfig';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"context":"Empty","trigger":{"events":["example"],"condition":{"type":"Single","leftOperand":"example","rightOperand":"example","operator":"Equals","inner":[]}},"actions":[{"actions":{"data":[{"command":"NewConst","input":"example","output":"example","parameters":{"additionalProperty":{}}}],"condition":{"type":"Single","leftOperand":"example","rightOperand":"example","operator":"Equals","inner":[]},"actions":[{"command":"UpdateOrderStatus","parameters":{"additionalProperty":{}},"onErrorCancelSubsequentActionsExecution":true}]},"metadata":{"scopeNo":"example"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v4/AjsAopsBuilder/CreateComplexConfig \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "context": "Empty", "trigger": { "events": [ "example" ], "condition": { "type": "Single", "leftOperand": "example", "rightOperand": "example", "operator": "Equals", "inner": [] } }, "actions": [ { "actions": { "data": [ { "command": "NewConst", "input": "example", "output": "example", "parameters": { "additionalProperty": {} } } ], "condition": { "type": "Single", "leftOperand": "example", "rightOperand": "example", "operator": "Equals", "inner": [] }, "actions": [ { "command": "UpdateOrderStatus", "parameters": { "additionalProperty": {} }, "onErrorCancelSubsequentActionsExecution": true } ] }, "metadata": { "scopeNo": "example" } } ] }'Tworzy skrypt automatyczny z rozbudowanej konfiguracji kreatora (wiele grup warunków i akcji). Używane głównie przez panel Sellrocket.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”object
context
wymagane
string
trigger
wymagane
object
events
wymagane
Array<string>
condition
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object>
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object> recursive
actions
wymagane
Array<object>
object
actions
wymagane
object
data
Array<object>
object
command
string
input
string
output
string
parameters
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
condition
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object>
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object> recursive
actions
wymagane
Array
One of:
object
command
wymagane
string
parameters
wymagane
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
onErrorCancelSubsequentActionsExecution
boolean
object
command
wymagane
string
parameters
wymagane
object
value
wymagane
string
object
command
wymagane
string
parameters
wymagane
object
object
command
wymagane
string
parameters
object
updates
wymagane
Array<object>
object
path
wymagane
string
value
wymagane
string
op
string
object
command
wymagane
string
parameters
object
comment
wymagane
string
object
command
wymagane
string
parameters
object
comment
wymagane
string
object
command
wymagane
string
parameters
wymagane
object
url
wymagane
string
useRetries
boolean
breakOnFail
boolean
breakOnFailTrigger
integer format: int64
object
command
wymagane
string
parameters
object
emailTemplateId
wymagane
integer format: int64
smerpConnectionId
wymagane
string
subject
string
textBody
string
htmlBody
string
toEmail
Array<string>
emailFrom
string
emailOrderField
string
object
command
string
parameters
object
symbol
wymagane
string
rate
wymagane
number format: double
object
command
wymagane
string
parameters
object
status
wymagane
string
paymentName
wymagane
string
metadata
wymagane
object
scopeNo
string
object
context
wymagane
string
trigger
wymagane
object
events
wymagane
Array<string>
condition
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object>
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object> recursive
actions
wymagane
Array<object>
object
actions
wymagane
object
data
Array<object>
object
command
string
input
string
output
string
parameters
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
condition
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object>
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object> recursive
actions
wymagane
Array
One of:
object
command
wymagane
string
parameters
wymagane
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
onErrorCancelSubsequentActionsExecution
boolean
object
command
wymagane
string
parameters
wymagane
object
value
wymagane
string
object
command
wymagane
string
parameters
wymagane
object
object
command
wymagane
string
parameters
object
updates
wymagane
Array<object>
object
path
wymagane
string
value
wymagane
string
op
string
object
command
wymagane
string
parameters
object
comment
wymagane
string
object
command
wymagane
string
parameters
object
comment
wymagane
string
object
command
wymagane
string
parameters
wymagane
object
url
wymagane
string
useRetries
boolean
breakOnFail
boolean
breakOnFailTrigger
integer format: int64
object
command
wymagane
string
parameters
object
emailTemplateId
wymagane
integer format: int64
smerpConnectionId
wymagane
string
subject
string
textBody
string
htmlBody
string
toEmail
Array<string>
emailFrom
string
emailOrderField
string
object
command
string
parameters
object
symbol
wymagane
string
rate
wymagane
number format: double
object
command
wymagane
string
parameters
object
status
wymagane
string
paymentName
wymagane
string
metadata
wymagane
object
scopeNo
string
object
context
wymagane
string
trigger
wymagane
object
events
wymagane
Array<string>
condition
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object>
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object> recursive
actions
wymagane
Array<object>
object
actions
wymagane
object
data
Array<object>
object
command
string
input
string
output
string
parameters
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
condition
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object>
object
type
string
leftOperand
string
rightOperand
string
operator
string
inner
Array<object> recursive
actions
wymagane
Array
One of:
object
command
wymagane
string
parameters
wymagane
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
onErrorCancelSubsequentActionsExecution
boolean
object
command
wymagane
string
parameters
wymagane
object
value
wymagane
string
object
command
wymagane
string
parameters
wymagane
object
object
command
wymagane
string
parameters
object
updates
wymagane
Array<object>
object
path
wymagane
string
value
wymagane
string
op
string
object
command
wymagane
string
parameters
object
comment
wymagane
string
object
command
wymagane
string
parameters
object
comment
wymagane
string
object
command
wymagane
string
parameters
wymagane
object
url
wymagane
string
useRetries
boolean
breakOnFail
boolean
breakOnFailTrigger
integer format: int64
object
command
wymagane
string
parameters
object
emailTemplateId
wymagane
integer format: int64
smerpConnectionId
wymagane
string
subject
string
textBody
string
htmlBody
string
toEmail
Array<string>
emailFrom
string
emailOrderField
string
object
command
string
parameters
object
symbol
wymagane
string
rate
wymagane
number format: double
object
command
wymagane
string
parameters
object
status
wymagane
string
paymentName
wymagane
string
metadata
wymagane
object
scopeNo
string
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success

