example-data.com
Menu
Browse docs and collections

Overview

addresses / #5

other

userId
Webster Skiles @webster_skiles39
label
other
recipient
Camille Treutel
street1
105 Erich Light
street2
city
North Ayana
region
Iowa
postalCode
87112
countryAlpha2
SA
isDefault
false
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 5,
  "userId": 5,
  "label": "other",
  "recipient": "Camille Treutel",
  "street1": "105 Erich Light",
  "street2": null,
  "city": "North Ayana",
  "region": "Iowa",
  "postalCode": "87112",
  "countryAlpha2": "SA",
  "isDefault": false,
  "createdAt": "2024-07-03T18:57:51.162Z"
}