example-data.com
Menu
Browse docs and collections

Overview

attachments / #285

Activity #285

User #157 attached image/jpeg (11688524 bytes)

1/24/2026, 7:20:55 PM

Component variants

Medium
Small

User #157 attached image/jpeg (11688524 bytes) · 1/24/2026, 7:20:55 PM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments/285"
);
const attachment = await res.json();

TypeScript example

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

const res = await fetch(
  "https://example-data.com/api/v1/attachments/285"
);
const attachment = (await res.json()) as Attachment;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/attachments/285"
)
attachment = res.json()

Response

{
  "id": 285,
  "userId": 157,
  "targetType": "product",
  "targetId": 56,
  "url": "https://picsum.photos/seed/attachment-285/600/800",
  "mimeType": "image/jpeg",
  "sizeBytes": 11688524,
  "createdAt": "2026-01-24T19:20:55.604Z"
}