Obtenir une catégorie par ID
Récupère une catégorie par id.
GET
/categories/{categoryId}Autorisation
AutorisationJeton Bearer (API key) · headerobligatoireClé API de l’organisation.
Paramètres de chemin
categoryIdstringobligatoireRéponses
200Détails de la catégorie
dataCategoryobligatoireAfficher les propriétésMasquer les propriétés
idstringnamestringindexintegershowOnScreenbooleanimageUrlstringmarginMinPercentnumbermarginMaxPercentnumberdeletedbooleanhideStorestring[]allowStorestring[]createdatestring<date-time>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/categories/string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://dashboard.scango.ch/api/v1/categories/string", {
method: "GET",
headers: {
"Autorisation": "Bearer YOUR_TOKEN"
}
});Réponse
{
"data": {
"id": "string",
"name": "string",
"index": 0,
"showOnScreen": true,
"imageUrl": "string",
"marginMinPercent": 0,
"marginMaxPercent": 0,
"deleted": true,
"hideStore": [
"string"
],
"allowStore": [
"string"
],
"createdate": "2024-01-01T00:00:00Z"
}
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}{
"statusCode": 0,
"message": "string",
"timestamp": "2024-01-01T00:00:00Z",
"path": "string"
}