Morton
- ownerUserId
-
Carmel Schultz @carmel.schultz
- name
- Morton
- species
- dog
- breedId
- Boxer
- gender
- male
- birthDate
- 2022-07-13
- weightKg
- 9.9
- color
- Brown
- imageUrl
- https://picsum.photos/seed/pet-147/600/600
- createdAt
- updatedAt
Overview
pets / #147
Morton
#147
Request
curl example
curl -sS \ "https://example-data.com/api/v1/pets/147" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/pets/147" ); const pet = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/pets.d.ts https://example-data.com/types/pets.d.ts
import type { Pet } from "./types/pets";
const res = await fetch(
"https://example-data.com/api/v1/pets/147"
);
const pet = (await res.json()) as Pet; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/pets/147"
)
pet = res.json() Response
{
"id": 147,
"ownerUserId": 156,
"name": "Morton",
"species": "dog",
"breedId": 10,
"gender": "male",
"birthDate": "2022-07-13",
"weightKg": 9.9,
"color": "Brown",
"imageUrl": "https://picsum.photos/seed/pet-147/600/600",
"createdAt": "2016-08-26T18:05:43.735Z",
"updatedAt": "2018-03-11T15:35:46.285Z"
}