example-data.com
Menu
Browse docs and collections

Overview

wishlists / #118

Want Later

userId
Sam Hegmann-Jast @sam_hegmann-jast86
name
Want Later
isPublic
false
productIds
              [
  73,
  161,
  144,
  162,
  136
]
            
createdAt
updatedAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/wishlists/118"
);
const wishlist = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/wishlists.d.ts https://example-data.com/types/wishlists.d.ts
import type { Wishlist } from "./types/wishlists";

const res = await fetch(
  "https://example-data.com/api/v1/wishlists/118"
);
const wishlist = (await res.json()) as Wishlist;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/wishlists/118"
)
wishlist = res.json()

Response

{
  "id": 118,
  "userId": 114,
  "name": "Want Later",
  "isPublic": false,
  "productIds": [
    73,
    161,
    144,
    162,
    136
  ],
  "createdAt": "2024-06-02T22:01:02.597Z",
  "updatedAt": "2024-12-16T22:10:57.869Z"
}