Kategorie aktualisieren
Kategorie aktualisieren (POST-Body ist partiell). Erfordert einen Write-Key. Leere allowStore- oder hideStore-Arrays entfernen das Feld.
POST
/categories/{categoryId}Autorisierung
AutorisierungBearer-Token (API key) · headererforderlichOrganisations-API-Key.
Pfadparameter
categoryIdstringerforderlichRequest-Body
erforderlichapplication/jsonnamestringindexnumbershowOnScreenbooleanimageUrlstringmarginMinPercentnumbermarginMaxPercentnumberhideStorestring[]Leeres Array entfernt das Feld.
allowStorestring[]Leeres Array entfernt das Feld.
deletedbooleanAuf true setzen zum Soft-Löschen.
Antworten
200Aktualisiert
successbooleanerforderlich400Ungültige Anfrage
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
403Nicht autorisiert
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
404Not found
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
Anfrage
curl -X POST "https://dashboard.scango.ch/api/v1/categories/string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"index": 0,
"showOnScreen": true,
"imageUrl": "string",
"marginMinPercent": 0,
"marginMaxPercent": 0,
"hideStore": [
"string"
],
"allowStore": [
"string"
],
"deleted": true
}'const response = await fetch("https://dashboard.scango.ch/api/v1/categories/string", {
method: "POST",
headers: {
"Autorisierung": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"index": 0,
"showOnScreen": true,
"imageUrl": "string",
"marginMinPercent": 0,
"marginMaxPercent": 0,
"hideStore": [
"string"
],
"allowStore": [
"string"
],
"deleted": true
})
});Antwort
{
"success": true
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}