General Admin-API Info
Bulk Payloads
An excerpt from the Shopware doc:
/api/_action/syncExample Request
// POST /api/_action/sync
{
"write-tax": {
"entity": "tax",
"action": "upsert",
"payload": [
{ "name": "tax-1", "taxRate": 16 },
{ "name": "tax-2", "taxRate": 15 }
]
},
"write-category": {
"entity": "category",
"action": "upsert",
"payload": [
{ "name": "category-1" },
{ "name": "category-2" }
]
},
"write-country": {
"entity": "country",
"action": "upsert",
"payload": [
{ "name": "country-1" },
{ "name": "country-2" }
]
}
}
// Response
{
"success": true,
"data": {
"write-tax": {
"result": [
{
"entities": {
"tax": ["bd59bcc0ceaa4acbbbb9e5e9d22b0312"]
}
},
{
"entities": {
"tax": ["38bfe5140d58429a840190c6ed43f0c4"]
}
}
]
},
"write-category": {
"result": [
{
"entities": {
"category": ["0a2275ff38a747069fce697bc2582bdc"],
"category_translation": [
{ "categoryId": "0a2275ff38a747069fce697bc2582bdc", "languageId": "2fbb5fe2e29a4d70aa5854ce7ce3e20b" }
]
}
},
{
"entities": {
"category": ["8df6114ba9c84116b6011d6b9ce1fa3a"],
"category_translation": [
{ "categoryId": "8df6114ba9c84116b6011d6b9ce1fa3a", "languageId": "2fbb5fe2e29a4d70aa5854ce7ce3e20b" }
]
}
}
]
},
"write-country": {
"result": [
{
"entities": {
"country": ["91738c2ee74a464e8ffe4f1d572449b3"],
"country_translation": [
{ "countryId": "91738c2ee74a464e8ffe4f1d572449b3", "languageId": "2fbb5fe2e29a4d70aa5854ce7ce3e20b" }
]
}
},
{
"entities": {
"country": ["69b2d17d04364620ad9ded6b01f471cd"],
"country_translation": [
{ "countryId": "69b2d17d04364620ad9ded6b01f471cd", "languageId": "2fbb5fe2e29a4d70aa5854ce7ce3e20b" }
]
}
}
]
}
}
}
Last updated
Was this helpful?