Lieferant anlegen
Lieferant anlegen. Erfordert einen Write-Key.
POST
/suppliersAutorisierung
AutorisierungBearer-Token (API key) · headererforderlichOrganisations-API-Key.
Request-Body
erforderlichapplication/jsonnamestringerforderlichcompanystringcitystringstreetstringplzstringemailstringpayoutEmailstringorderEmailstringphonestringcontactPersonstringcontactPhonestringdailyMailstringsupplierMarginnumberibanstringbicstringbankNamestringpayoutsEnabledbooleanAntworten
200Lieferant angelegt
successbooleanerforderlichidstringerforderlich400Ungültige Anfrage
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
403Nicht autorisiert
statusCodeintegererforderlichHTTP-Statuscode
messagestringerforderlichLesbare Fehlermeldung
timestampstring<date-time>erforderlichpathstringerforderlichRequest-Pfad
Anfrage
curl -X POST "https://dashboard.scango.ch/api/v1/suppliers" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"company": "string",
"city": "string",
"street": "string",
"plz": "string",
"email": "string",
"payoutEmail": "string",
"orderEmail": "string",
"phone": "string",
"contactPerson": "string",
"contactPhone": "string",
"dailyMail": "string",
"supplierMargin": 0,
"iban": "string",
"bic": "string",
"bankName": "string",
"payoutsEnabled": true
}'const response = await fetch("https://dashboard.scango.ch/api/v1/suppliers", {
method: "POST",
headers: {
"Autorisierung": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "string",
"company": "string",
"city": "string",
"street": "string",
"plz": "string",
"email": "string",
"payoutEmail": "string",
"orderEmail": "string",
"phone": "string",
"contactPerson": "string",
"contactPhone": "string",
"dailyMail": "string",
"supplierMargin": 0,
"iban": "string",
"bic": "string",
"bankName": "string",
"payoutsEnabled": true
})
});Antwort
{
"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"
}