example-data.com
Menu
Browse docs and collections

Overview

addresses / #308

work

userId
Loren Schmidt @loren_schmidt
label
work
recipient
Warren Hickle
street1
831 Stehr Point
street2
city
El Centro
region
South Dakota
postalCode
09431
countryAlpha2
MA
isDefault
true
createdAt

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/addresses/308" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/addresses/308"
);
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/308"
);
const address = (await res.json()) as Address;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/addresses/308"
)
addresse = res.json()

Response

{
  "id": 308,
  "userId": 222,
  "label": "work",
  "recipient": "Warren Hickle",
  "street1": "831 Stehr Point",
  "street2": null,
  "city": "El Centro",
  "region": "South Dakota",
  "postalCode": "09431",
  "countryAlpha2": "MA",
  "isDefault": true,
  "createdAt": "2024-08-11T06:00:34.607Z"
}