example-data.com
Menu
Browse docs and collections

Overview

addresses / #101

home

userId
Jesse Kiehn @jesse_kiehn92
label
home
recipient
Sonja Conn
street1
7467 Albert Road
street2
city
North Vernerville
region
Louisiana
postalCode
26422
countryAlpha2
ET
isDefault
false
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 101,
  "userId": 76,
  "label": "home",
  "recipient": "Sonja Conn",
  "street1": "7467 Albert Road",
  "street2": null,
  "city": "North Vernerville",
  "region": "Louisiana",
  "postalCode": "26422",
  "countryAlpha2": "ET",
  "isDefault": false,
  "createdAt": "2024-09-05T09:46:03.756Z"
}