Obtenir un produit par ID
Récupère un produit par id.
GET
/products/{productId}Autorisation
AutorisationJeton Bearer (API key) · headerobligatoireClé API de l’organisation.
Paramètres de chemin
productIdstringobligatoireRéponses
200Détails du produit
dataProductobligatoireProduit. Les champs monétaires sont des entiers en centimes.
Afficher les propriétésMasquer les propriétés
idstringId du document produit
externalIdstringIdentifiant externe optionnel
namestringpriceintegerPrix en centimes.
supplierstringId du fournisseur
taxCategorystringCode de catégorie TVA suisse
Autorisé:
8.12.63.80categorystringId de la catégorie
declarationsstringbarcodestringdepositProductintegerConsigne en centimes.
depositProductLabelstringdescriptionstringsalePriceintegerPrix de vente promotionnel en centimes.
salePercentagenumbersalePriceDateFromstring<date-time>salePriceDateTostring<date-time>costPriceintegerPrix de revient en centimes.
marginnumbershowOnScreenbooleanageRestrictionbooleanshowOnScalebooleansaleStopbooleandeactivatedbooleanopenInputbooleanimageUrlstringURL de l’image (lecture seule).
indexintegerallowStorestring[]Ids de magasins autorisés (lecture seule).
hideStorestring[]Ids de magasins masqués (lecture seule).
deletedbooleanSupprimé logiquement lorsque true.
createdatestring<date-time>lastupdatestring<date-time>instancestringId de l’organisation lorsqu’il est présent
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 GET "https://dashboard.scango.ch/api/v1/products/string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://dashboard.scango.ch/api/v1/products/string", {
method: "GET",
headers: {
"Autorisation": "Bearer YOUR_TOKEN"
}
});Réponse
{
"data": {
"id": "string",
"externalId": "string",
"name": "string",
"price": 0,
"supplier": "string",
"taxCategory": "8.1",
"category": "string",
"declarations": "string",
"barcode": "string",
"depositProduct": 0,
"depositProductLabel": "string",
"description": "string",
"salePrice": 0,
"salePercentage": 0,
"salePriceDateFrom": "2024-01-01T00:00:00Z",
"salePriceDateTo": "2024-01-01T00:00:00Z",
"costPrice": 0,
"margin": 0,
"showOnScreen": true,
"ageRestriction": true,
"showOnScale": true,
"saleStop": true,
"deactivated": true,
"openInput": true,
"imageUrl": "string",
"index": 0,
"allowStore": [
"string"
],
"hideStore": [
"string"
],
"deleted": true,
"createdate": "2024-01-01T00:00:00Z",
"lastupdate": "2024-01-01T00:00:00Z",
"instance": "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"
}