example-data.com
Menu
Browse docs and collections

Overview

addresses / #199

shipping

userId
Jonathan Howe @jonathan_howe77
label
shipping
recipient
Jimmy Daugherty
street1
5531 Johnston Alley
street2
city
Corkeryland
region
Vermont
postalCode
61834-1901
countryAlpha2
BE
isDefault
true
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 199,
  "userId": 150,
  "label": "shipping",
  "recipient": "Jimmy Daugherty",
  "street1": "5531 Johnston Alley",
  "street2": null,
  "city": "Corkeryland",
  "region": "Vermont",
  "postalCode": "61834-1901",
  "countryAlpha2": "BE",
  "isDefault": true,
  "createdAt": "2024-10-26T13:10:57.166Z"
}