Aller au contenu principal

Rechercher un animal par identifiant

Rechercher un animal de compagnie à l'aide de son identifiant unique.

GET https://petstore3.swagger.io/api/v3/pet/{petId}

Exemples

cURL
GET "https://petstore3.swagger.io/api/v3/pet/210" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

Réponses

CodeDescription
200Opération réussie
400Identifiant invalide fourni
404Animal introuvable
defaultErreur inattendue
Exemple de réponse

200: Opération réussie

Response
{
"id": 210,
"name": "Krypto",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"chaîne de caractères"
],
"tags": [
{
"id": 0,
"name": "chaîne de caractères"
}
],
"status": "available"
}

Paramètres

Paramètres de chemin
NomTypeDescription
petIdentierIdentifiant de l'animal à récupérer