example-data.com
Menu
Browse docs and collections

Overview

attachments / #336

Activity #336

User #219 attached image/jpeg (37799812 bytes)

11/22/2025, 11:22:31 PM

Component variants

Medium
Small

User #219 attached image/jpeg (37799812 bytes) · 11/22/2025, 11:22:31 PM

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/attachments/336"
);
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/336"
);
const attachment = (await res.json()) as Attachment;

Python example

import requests

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

Response

{
  "id": 336,
  "userId": 219,
  "targetType": "product",
  "targetId": 71,
  "url": "https://picsum.photos/seed/attachment-336/800/300",
  "mimeType": "image/jpeg",
  "sizeBytes": 37799812,
  "createdAt": "2025-11-22T23:22:31.107Z"
}