Mettre à jour un magasin
Met à jour un magasin (corps POST partiel). Nécessite une clé Write. Envoyez null pour effacer un champ optionnel. Les identifiants Zahls restent dans le tableau de bord.
POST
/stores/{storeId}Autorisation
AutorisationJeton Bearer (API key) · headerobligatoireClé API de l’organisation.
Paramètres de chemin
storeIdstringobligatoireCorps de la requête
obligatoireapplication/jsonnamestringaddressstring | nullzipCodestring | nullcitystring | nullLibellé lisible du magasin dans l'organisation
vatNumberstring | nullpaymentCashboolean | nullpaymentPaytecboolean | nullpaymentZahlsboolean | nullpaymentZahlsOfflineboolean | nullpaymentCashOfflineboolean | nullshowSupplierboolean | nullhideTextStartboolean | nullgeneralMarginnumber | nullcustomMessagestring | nullbackgroundImageCartstring | object | anyAfficher les propriétésMasquer les propriétés
Un parmi:
string
stringobject
srcstringany
anybackgroundImagestring | object | anyAfficher les propriétésMasquer les propriétés
Un parmi:
string
stringobject
srcstringany
anybackgroundColorstring | nullbackgroundFontColorstring | nullplaySoundboolean | nullstandardSoundstring | nulladminMailstring | nullshowInfoButtonboolean | nulldeleteCountdownnumber | nulllogoUrlstring | nulllanguageMultiboolean | nulllanguageMainstring | nullAutorisé:
deenfritlanguageSelectorstring[] | nulltranslationsobject | nulldeletedbooleanMettre à true pour une suppression logique.
Réponses
200Mis à jour
successbooleanobligatoire400Requête invalide
statusCodeintegerobligatoireCode de statut HTTP
messagestringobligatoireMessage d’erreur lisible
timestampstring<date-time>obligatoirepathstringobligatoireChemin de la requête
403Non autorisé
statusCodeintegerobligatoireCode de statut HTTP
messagestringobligatoireMessage d’erreur lisible
timestampstring<date-time>obligatoirepathstringobligatoireChemin de la requête
404Not found
statusCodeintegerobligatoireCode de statut HTTP
messagestringobligatoireMessage d’erreur lisible
timestampstring<date-time>obligatoirepathstringobligatoireChemin de la requête
Requête
curl -X POST "https://dashboard.scango.ch/api/v1/stores/string" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"address": "string",
"zipCode": "string",
"city": "string",
"vatNumber": "string",
"paymentCash": true,
"paymentPaytec": true,
"paymentZahls": true,
"paymentZahlsOffline": true,
"paymentCashOffline": true,
"showSupplier": true,
"hideTextStart": true,
"generalMargin": 0,
"customMessage": "string",
"backgroundImageCart": "string",
"backgroundImage": "string",
"backgroundColor": "string",
"backgroundFontColor": "string",
"playSound": true,
"standardSound": "string",
"adminMail": "string",
"showInfoButton": true,
"deleteCountdown": 0,
"logoUrl": "string",
"languageMulti": true,
"languageMain": "de",
"languageSelector": [
"de"
],
"translations": {},
"deleted": true
}'const response = await fetch("https://dashboard.scango.ch/api/v1/stores/string", {
method: "POST",
headers: {
"Autorisation": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"address": "string",
"zipCode": "string",
"city": "string",
"vatNumber": "string",
"paymentCash": true,
"paymentPaytec": true,
"paymentZahls": true,
"paymentZahlsOffline": true,
"paymentCashOffline": true,
"showSupplier": true,
"hideTextStart": true,
"generalMargin": 0,
"customMessage": "string",
"backgroundImageCart": "string",
"backgroundImage": "string",
"backgroundColor": "string",
"backgroundFontColor": "string",
"playSound": true,
"standardSound": "string",
"adminMail": "string",
"showInfoButton": true,
"deleteCountdown": 0,
"logoUrl": "string",
"languageMulti": true,
"languageMain": "de",
"languageSelector": [
"de"
],
"translations": {},
"deleted": true
})
});Réponse
{
"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"
}