example-data.com
Menu
Browse docs and collections

Overview

addresses / #342

shipping

userId
Santa Corwin @santa.corwin59
label
shipping
recipient
Cary Dibbert
street1
3496 Vivianne Knoll
street2
city
Port Kalichester
region
Texas
postalCode
14540
countryAlpha2
AE
isDefault
true
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 342,
  "userId": 247,
  "label": "shipping",
  "recipient": "Cary Dibbert",
  "street1": "3496 Vivianne Knoll",
  "street2": null,
  "city": "Port Kalichester",
  "region": "Texas",
  "postalCode": "14540",
  "countryAlpha2": "AE",
  "isDefault": true,
  "createdAt": "2024-08-04T20:24:11.863Z"
}