Przejdź do głównej zawartości

Uruchom skrypt dla wielu obiektów

POST
/api/v3/automaticScripts/start_batch
curl --request POST \
--url https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v3/automaticScripts/start_batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "context": "example", "owner": { "email": "example", "userName": "example", "fullName": "example", "id": 1, "roles": [ "example" ] }, "orders": [ 1 ], "orderIdToReturnIdsMap": { "additionalProperty": [ 1 ] }, "userEventId": "example", "inputData": { "additionalProperty": {} }, "useInputDataSchemaScripts": true, "useFastTriggersEvaluator": true, "useFastTriggersIncludeDisabled": true, "dryRun": true }'

Uruchamia skrypt wsadowo dla wielu obiektów (np. zamówień); postęp śledzisz przez /api/runs/batchProgress/{id}. Odpowiednik ręcznego uruchomienia akcji dla zaznaczonych zamówień w BaseLinkerze.

Parameters of the run. They will be passed to the script in object with name data.

object
context
wymagane
string
>= 1 characters
owner
object
email
string
nullable
userName
string
nullable
fullName
string
nullable
id
integer format: int64
roles
Array<string>
nullable
orders
wymagane
Array<integer>
orderIdToReturnIdsMap
object
key
additional properties
Array<integer>
userEventId
string
nullable
inputData
object
key
additional properties
object
options
object
propertyNameCaseInsensitive
boolean
parent
object
object recursive
root
object
object recursive
useInputDataSchemaScripts
boolean
useFastTriggersEvaluator
boolean
useFastTriggersIncludeDisabled
boolean
dryRun
boolean
Examplegenerated
{
"context": "example",
"owner": {
"email": "example",
"userName": "example",
"fullName": "example",
"id": 1,
"roles": [
"example"
]
},
"orders": [
1
],
"orderIdToReturnIdsMap": {
"additionalProperty": [
1
]
},
"userEventId": "example",
"inputData": {
"additionalProperty": {}
},
"useInputDataSchemaScripts": true,
"useFastTriggersEvaluator": true,
"useFastTriggersIncludeDisabled": true,
"dryRun": true
}

Accepted

integer format: int64

Bad Request

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties

Not Found

object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
key
additional properties

Client Error

object
scriptId
integer format: int64
inputDataSchema
nullable
inputUiSchema
nullable
inputDataDefaults
nullable