example-data.com
Menu
Browse docs and collections

Overview

addresses / #32

work

userId
Melvina Reilly @melvina_reilly83
label
work
recipient
Ms. Martha Romaguera
street1
70305 Alexanne Plains
street2
city
North Jan
region
Rhode Island
postalCode
10918-9710
countryAlpha2
DK
isDefault
true
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 32,
  "userId": 26,
  "label": "work",
  "recipient": "Ms. Martha Romaguera",
  "street1": "70305 Alexanne Plains",
  "street2": null,
  "city": "North Jan",
  "region": "Rhode Island",
  "postalCode": "10918-9710",
  "countryAlpha2": "DK",
  "isDefault": true,
  "createdAt": "2024-11-02T17:01:42.191Z"
}