home
- userId
-
Charlene Roberts @charlene_roberts
- label
- home
- recipient
- Wilson Bradtke
- street1
- 216 Trantow Centers
- street2
- —
- city
- Schaumburg
- region
- Washington
- postalCode
- 97996-5137
- countryAlpha2
- IL
- isDefault
- false
- createdAt
Overview
addresses / #2
home
#2
Request
curl example
curl -sS \ "https://example-data.com/api/v1/addresses/2" \ -H "Accept: application/json"
JavaScript example
const res = await fetch( "https://example-data.com/api/v1/addresses/2" ); const address = await res.json();
TypeScript example
// Download once: mkdir -p types && curl -o types/addresses.d.ts https://example-data.com/types/addresses.d.ts
import type { Address } from "./types/addresses";
const res = await fetch(
"https://example-data.com/api/v1/addresses/2"
);
const address = (await res.json()) as Address; Python example
import requests
res = requests.get(
"https://example-data.com/api/v1/addresses/2"
)
addresse = res.json() Response
{
"id": 2,
"userId": 1,
"label": "home",
"recipient": "Wilson Bradtke",
"street1": "216 Trantow Centers",
"street2": null,
"city": "Schaumburg",
"region": "Washington",
"postalCode": "97996-5137",
"countryAlpha2": "IL",
"isDefault": false,
"createdAt": "2024-12-17T03:47:28.441Z"
}