Zmień wybrane pola skryptu
PATCH
/api/v3/automaticScripts/patch/{id}
const url = 'https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v3/automaticScripts/patch/1';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":{"value":"example"},"groupId":{"value":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://twoja-instancja-ajs-api.enterprise.sellrocket.pl/api/v3/automaticScripts/patch/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": { "value": "example" }, "groupId": { "value": 1 } }'Częściowo aktualizuje wskazane pola skryptu i od razu zwraca jego aktualny stan (bez zadania asynchronicznego).
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”id
wymagane
integer format: int64
Id of the automatic script to update
Treść żądania
Dział zatytułowany „Treść żądania”Patch that should be applied on the automatic script.
object
name
object
hasValue
boolean
value
string
groupId
object
hasValue
boolean
value
integer format: int64
Examplegenerated
{ "name": { "value": "example" }, "groupId": { "value": 1 }}object
name
object
hasValue
boolean
value
string
groupId
object
hasValue
boolean
value
integer format: int64
Examplegenerated
{ "name": { "value": "example" }, "groupId": { "value": 1 }}object
name
object
hasValue
boolean
value
string
groupId
object
hasValue
boolean
value
integer format: int64
Examplegenerated
{ "name": { "value": "example" }, "groupId": { "value": 1 }}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
object
id
integer format: int64
name
string
body
string
groupId
integer format: int64
priority
integer format: int64
delaySeconds
integer format: int64
inputDataSchema
inputUiSchema
(absent ⇒ property omitted)
inputDataDefaultsScriptId
(absent ⇒ property omitted)
integer format: int64
type
string
updatedAt
string format: date-time
object
id
integer format: int64
name
string
body
string
groupId
integer format: int64
priority
integer format: int64
delaySeconds
integer format: int64
inputDataSchema
inputUiSchema
(absent ⇒ property omitted)
inputDataDefaultsScriptId
(absent ⇒ property omitted)
integer format: int64
type
string
updatedAt
string format: date-time
Example
{ "type": "AutomaticScript"}object
id
integer format: int64
name
string
body
string
groupId
integer format: int64
priority
integer format: int64
delaySeconds
integer format: int64
inputDataSchema
inputUiSchema
(absent ⇒ property omitted)
inputDataDefaultsScriptId
(absent ⇒ property omitted)
integer format: int64
type
string
updatedAt
string format: date-time
Example
{ "type": "AutomaticScript"}Bad 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"}
