Crea negozio
Crea una sede. Richiede una chiave Write. In un’organizzazione name è spesso il brand; usa city (o indirizzo) per distinguere le sedi. Le credenziali del provider di pagamento (Zahls) si configurano nel dashboard, non tramite questa API.
POST
/storesAutorizzazione
AutorizzazioneToken Bearer (API key) · headerobbligatorioChiave API dell'organizzazione.
Corpo della richiesta
obbligatorioapplication/jsonnamestringobbligatorioaddressstringzipCodestringcitystringHuman-readable store label within the organization
vatNumberstringpaymentCashbooleanpaymentPaytecbooleanpaymentZahlsbooleanpaymentZahlsOfflinebooleanpaymentCashOfflinebooleanshowSupplierbooleanhideTextStartbooleangeneralMarginnumbercustomMessagestringbackgroundImageCartstring | objectMostra proprietàNascondi proprietà
Uno tra:
string
stringobject
srcstringbackgroundImagestring | objectMostra proprietàNascondi proprietà
Uno tra:
string
stringobject
srcstringbackgroundColorstringbackgroundFontColorstringplaySoundbooleanstandardSoundstringadminMailstringshowInfoButtonbooleandeleteCountdownnumberlogoUrlstringlanguageMultibooleanlanguageMainstringConsentiti:
deenfritlanguageSelectorstring[]translationsobjectRisposte
200Negozio creato
successbooleanobbligatorioidstringobbligatorio400Richiesta non valida
statusCodeintegerobbligatorioCodice di stato HTTP
messagestringobbligatorioMessaggio di errore leggibile
timestampstring<date-time>obbligatoriopathstringobbligatorioPercorso della richiesta
403Non autorizzato
statusCodeintegerobbligatorioCodice di stato HTTP
messagestringobbligatorioMessaggio di errore leggibile
timestampstring<date-time>obbligatoriopathstringobbligatorioPercorso della richiesta
Richiesta
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: {
"Autorizzazione": "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": {}
})
});Risposta
{
"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"
}