Créer un magasin
Créer un point de vente. Nécessite une clé Write. Dans une organisation, name est souvent la marque ; utilisez city (ou l’adresse) pour distinguer les emplacements. Les identifiants du prestataire de paiement (Zahls) se configurent dans le tableau de bord, pas via cette API.
POST
/storesAutorisation
AutorisationJeton Bearer (API key) · headerobligatoireClé API de l’organisation.
Corps de la requête
obligatoireapplication/jsonnamestringobligatoireaddressstringzipCodestringcitystringHuman-readable store label within the organization
vatNumberstringpaymentCashbooleanpaymentPaytecbooleanpaymentZahlsbooleanpaymentZahlsOfflinebooleanpaymentCashOfflinebooleanshowSupplierbooleanhideTextStartbooleangeneralMarginnumbercustomMessagestringbackgroundImageCartstring | objectAfficher les propriétésMasquer les propriétés
Un parmi:
string
stringobject
srcstringbackgroundImagestring | objectAfficher les propriétésMasquer les propriétés
Un parmi:
string
stringobject
srcstringbackgroundColorstringbackgroundFontColorstringplaySoundbooleanstandardSoundstringadminMailstringshowInfoButtonbooleandeleteCountdownnumberlogoUrlstringlanguageMultibooleanlanguageMainstringAutorisé:
deenfritlanguageSelectorstring[]translationsobjectRéponses
200Magasin créé
successbooleanobligatoireidstringobligatoire400Requê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
Requête
curl -X POST "https://dashboard.scango.ch/api/v1/stores" \
-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": {}
}'const response = await fetch("https://dashboard.scango.ch/api/v1/stores", {
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": {}
})
});Réponse
{
"success": true,
"id": "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"
}