example-data.com
Menu
Browse docs and collections

Overview

addresses / #66

shipping

userId
Jo Haag-Mayer @jo_haag-mayer
label
shipping
recipient
Amelia Dickinson
street1
806 Market Place
street2
city
Fort Noemitown
region
Mississippi
postalCode
60960-6409
countryAlpha2
IS
isDefault
true
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 66,
  "userId": 54,
  "label": "shipping",
  "recipient": "Amelia Dickinson",
  "street1": "806 Market Place",
  "street2": null,
  "city": "Fort Noemitown",
  "region": "Mississippi",
  "postalCode": "60960-6409",
  "countryAlpha2": "IS",
  "isDefault": true,
  "createdAt": "2024-09-15T14:51:22.300Z"
}