Zaktualizuj szablon produktowy
PUT
/api/v1/PimTemplates/{templateId}
const url = 'https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v1/PimTemplates/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","body":"example","lang":"example","tableTemplateType":"example","settings":{"pdfHeight":"example","pdfWidth":"example","pdfMarginTop":"example","pdfMarginBottom":"example","pdfMarginLeftRight":"example","type":"CSV"},"sections":{"product":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"parameter":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"relation":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"source":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"variant":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"bundle":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"manufacturer":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"supplier":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"category":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"},"stats":{"body":"example","enabled":true,"orderBy":"example","groupBy":"example"}},"ownedTags":[{"id":1,"name":"example","value":"example"}],"modifiers":[{"tag":"[waluta]","operator":"replace_if","condition":"USD","newValue":"PLN","position":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-renderer-api.enterprise.sellrocket.pl/api/v1/PimTemplates/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "body": "example", "lang": "example", "tableTemplateType": "example", "settings": { "pdfHeight": "example", "pdfWidth": "example", "pdfMarginTop": "example", "pdfMarginBottom": "example", "pdfMarginLeftRight": "example", "type": "CSV" }, "sections": { "product": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "parameter": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "relation": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "source": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "variant": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "bundle": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "manufacturer": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "supplier": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "category": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" }, "stats": { "body": "example", "enabled": true, "orderBy": "example", "groupBy": "example" } }, "ownedTags": [ { "id": 1, "name": "example", "value": "example" } ], "modifiers": [ { "tag": "[waluta]", "operator": "replace_if", "condition": "USD", "newValue": "PLN", "position": 1 } ] }'Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”templateId
wymagane
integer format: int64
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
name
string
body
string
lang
string
tableTemplateType
string
settings
object
pdfHeight
string
pdfWidth
string
pdfMarginTop
string
pdfMarginBottom
string
pdfMarginLeftRight
string
type
string
sections
object
product
object
body
string
enabled
boolean
orderBy
string
groupBy
string
parameter
object
body
string
enabled
boolean
orderBy
string
groupBy
string
relation
object
body
string
enabled
boolean
orderBy
string
groupBy
string
source
object
body
string
enabled
boolean
orderBy
string
groupBy
string
variant
object
body
string
enabled
boolean
orderBy
string
groupBy
string
bundle
object
body
string
enabled
boolean
orderBy
string
groupBy
string
manufacturer
object
body
string
enabled
boolean
orderBy
string
groupBy
string
supplier
object
body
string
enabled
boolean
orderBy
string
groupBy
string
category
object
body
string
enabled
boolean
orderBy
string
groupBy
string
stats
object
body
string
enabled
boolean
orderBy
string
groupBy
string
ownedTags
Array<object>
object
id
integer format: int64
name
string
value
string
modifiers
Array<object>
object
tag
wymagane
string
Example
[waluta]operator
wymagane
string
Example
replace_ifcondition
wymagane
string
Example
USDnewValue
wymagane
string
Example
PLNposition
integer format: int64
Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Typ treściapplication/json
object
id
integer format: int64
name
string
body
string
lang
string
tableTemplateType
string
createdAt
string format: date-time
updatedAt
string format: date-time
scope
string
settings
object
id
integer format: int64
pdfHeight
string
pdfWidth
string
pdfMarginTop
string
pdfMarginBottom
string
pdfMarginLeftRight
string
type
string
createdAt
string format: date-time
updatedAt
string format: date-time
sections
object
product
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
parameter
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
relation
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
source
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
variant
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
bundle
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
manufacturer
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
supplier
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
category
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
stats
object
name
string
body
string
enabled
boolean
orderBy
string
groupBy
string
ownedTags
Array<object>
object
id
integer format: int64
name
string
value
string
createdAt
string format: date-time
updatedAt
string format: date-time
modifiers
Array<object>
object
id
integer format: int64
parentId
integer format: int64
tag
string
operator
string
condition
string
newValue
string
position
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
Example
{ "scope": "Orders", "settings": { "type": "CSV" }}
