Aller au contenu
scango.ch
Français
Esc
naviguerouvrir⌘Japerçu

Mettre à jour un produit

Met à jour un produit (corps POST partiel). Nécessite une clé Write.

POST/products/{productId}
Autorisation
AutorisationJeton Bearer (API key) · headerobligatoire
Clé API de l’organisation.
Paramètres de chemin
productIdstringobligatoire
Corps de la requête
obligatoireapplication/json
namestring
pricenumber
Prix en centimes
taxCategorystring
Autorisé:8.12.63.80
supplierstring
categorystring
declarationsstring
barcodestring
Normalisé en minuscules ; vide devient l’id du document
barcodeAliasesobject[]
Optional additional EANs. Empty array removes the field. Available when the barcode aliases feature is enabled for the organization.
Afficher les propriétés
Array of object
codestringobligatoire
quantitynumber
priceinteger
Optional pack price in cents
labelstring
externalIdstring
Optional external article ID
externalIdstring
depositProductnumber
Consigne en centimes
depositProductLabelstring
descriptionstring
salePricenumber | null
Prix promo en centimes. Null ou chaîne vide supprime le champ.
salePercentagenumber | null
Remise promo en pourcentage. Null ou chaîne vide supprime le champ.
salePriceDateFromstring<date-time> | null
Début de la promo. Null ou chaîne vide supprime le champ.
salePriceDateTostring<date-time> | null
Fin de la promo. Null ou chaîne vide supprime le champ.
costPricenumber
marginnumber
showOnScreenboolean
ageRestrictionboolean
showOnScaleboolean
saleStopboolean
deactivatedboolean
imageUrlstring
Image URL. Empty string clears the field and deletes the stored asset when it belongs to this organization (same as DELETE /products/{productId}/image).
indexnumber
deletedboolean
Mettre à true pour une suppression logique.
Réponses
200Mis à jour
successbooleanobligatoire
400Requête incorrecte
statusCodeintegerobligatoire
Code de statut HTTP
messagestringobligatoire
Message d’erreur lisible
timestampstring<date-time>obligatoire
pathstringobligatoire
Chemin de la requête
403Non autorisé
statusCodeintegerobligatoire
Code de statut HTTP
messagestringobligatoire
Message d’erreur lisible
timestampstring<date-time>obligatoire
pathstringobligatoire
Chemin de la requête
404Not found
statusCodeintegerobligatoire
Code de statut HTTP
messagestringobligatoire
Message d’erreur lisible
timestampstring<date-time>obligatoire
pathstringobligatoire
Chemin de la requête
Requête
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",
  "barcodeAliases": [
    {
      "code": "string",
      "quantity": 0,
      "price": 0,
      "label": "string",
      "externalId": "string"
    }
  ],
  "externalId": "string",
  "depositProduct": 0,
  "depositProductLabel": "string",
  "description": "string",
  "salePrice": 0,
  "salePercentage": 0,
  "salePriceDateFrom": "2019-08-24T14:15:22Z",
  "salePriceDateTo": "2019-08-24T14:15:22Z",
  "costPrice": 0,
  "margin": 0,
  "showOnScreen": true,
  "ageRestriction": true,
  "showOnScale": true,
  "saleStop": true,
  "deactivated": true,
  "imageUrl": "string",
  "index": 0,
  "deleted": true
}'
Réponse
{
  "success": true
}