example-data.com
Menu
Browse docs and collections

Overview

addresses / #138

home

userId
Rosina Larkin @rosina.larkin75
label
home
recipient
Mr. Cesar O'Connell DDS
street1
811 Bartholome Village
street2
city
Aracelifield
region
Hawaii
postalCode
17562-2468
countryAlpha2
FJ
isDefault
false
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 138,
  "userId": 103,
  "label": "home",
  "recipient": "Mr. Cesar O'Connell DDS",
  "street1": "811 Bartholome Village",
  "street2": null,
  "city": "Aracelifield",
  "region": "Hawaii",
  "postalCode": "17562-2468",
  "countryAlpha2": "FJ",
  "isDefault": false,
  "createdAt": "2024-08-01T19:19:12.289Z"
}