Produkt aktualisieren
Produkt aktualisieren (POST-Body ist partiell). Erfordert einen Write-Key.
POST
/products/{productId}Autorisierung
AutorisierungBearer-Token (API key) · headererforderlichOrganisations-API-Key.
Pfadparameter
productIdstringerforderlichRequest-Body
erforderlichapplication/jsonnamestringpricenumberPreis in Rappen
taxCategorystringErlaubt:
8.12.63.80supplierstringcategorystringdeclarationsstringbarcodestringNormalisiert zu Kleinbuchstaben; leer wird zur Dokument-ID
externalIdstringdepositProductnumberDepot in Rappen
depositProductLabelstringdescriptionstringsalePricenumbersalePercentagenumbersalePriceDateFromstring<date-time>salePriceDateTostring<date-time>costPricenumbermarginnumbershowOnScreenbooleanageRestrictionbooleanshowOnScalebooleansaleStopbooleanindexnumberdeletedbooleanAuf 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/products/string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"price": 0,
"taxCategory": "8.1",
"supplier": "string",
"category": "string",
"declarations": "string",
"barcode": "string",
"externalId": "string",
"depositProduct": 0,
"depositProductLabel": "string",
"description": "string",
"salePrice": 0,
"salePercentage": 0,
"salePriceDateFrom": "2024-01-01T00:00:00Z",
"salePriceDateTo": "2024-01-01T00:00:00Z",
"costPrice": 0,
"margin": 0,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"index": 0,
"deleted": true
}'const response = await fetch("https://dashboard.scango.ch/api/v1/products/string", {
method: "POST",
headers: {
"Autorisierung": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"price": 0,
"taxCategory": "8.1",
"supplier": "string",
"category": "string",
"declarations": "string",
"barcode": "string",
"externalId": "string",
"depositProduct": 0,
"depositProductLabel": "string",
"description": "string",
"salePrice": 0,
"salePercentage": 0,
"salePriceDateFrom": "2024-01-01T00:00:00Z",
"salePriceDateTo": "2024-01-01T00:00:00Z",
"costPrice": 0,
"margin": 0,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"index": 0,
"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"
}