Uruchom skrypt dla wielu obiektów
POST
/api/v3/automaticScripts/start_batch
const url = 'https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v3/automaticScripts/start_batch';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"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}'};
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/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.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”Parameters of the run. They will be passed to the script in object with name data.
object
context
wymagane
string
owner
object
email
string
userName
string
fullName
string
id
integer format: int64
roles
Array<string>
orders
wymagane
Array<integer>
orderIdToReturnIdsMap
object
key
additional properties
Array<integer>
userEventId
string
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}object
context
wymagane
string
owner
object
email
string
userName
string
fullName
string
id
integer format: int64
roles
Array<string>
orders
wymagane
Array<integer>
orderIdToReturnIdsMap
object
key
additional properties
Array<integer>
userEventId
string
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}object
context
wymagane
string
owner
object
email
string
userName
string
fullName
string
id
integer format: int64
roles
Array<string>
orders
wymagane
Array<integer>
orderIdToReturnIdsMap
object
key
additional properties
Array<integer>
userEventId
string
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}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Accepted
integer format: int64
integer format: int64
Examplegenerated
1integer format: int64
Examplegenerated
1Bad Request
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
type
string
title
string
status
integer format: int32
detail
string
instance
string
key
additional properties
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Client Error
object
scriptId
integer format: int64
inputDataSchema
inputUiSchema
inputDataDefaults
object
scriptId
integer format: int64
inputDataSchema
inputUiSchema
inputDataDefaults
Examplegenerated
{}object
scriptId
integer format: int64
inputDataSchema
inputUiSchema
inputDataDefaults
Examplegenerated
{}
