example-data.com
Menu
Browse docs and collections

Overview

addresses / #203

work

userId
Wiley Rodriguez @wiley.rodriguez19
label
work
recipient
Gabriel Simonis
street1
75930 Ondricka Loaf
street2
Suite 460
city
Weymouth Town
region
New Hampshire
postalCode
43330-8711
countryAlpha2
NL
isDefault
false
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 203,
  "userId": 151,
  "label": "work",
  "recipient": "Gabriel Simonis",
  "street1": "75930 Ondricka Loaf",
  "street2": "Suite 460",
  "city": "Weymouth Town",
  "region": "New Hampshire",
  "postalCode": "43330-8711",
  "countryAlpha2": "NL",
  "isDefault": false,
  "createdAt": "2024-07-29T04:58:07.082Z"
}