example-data.com
Menu
Browse docs and collections

Overview

attachments / #298

Activity #298

User #193 attached application/pdf (44756272 bytes)

10/14/2025, 10:48:38 AM

Component variants

Medium
Small

User #193 attached application/pdf (44756272 bytes) · 10/14/2025, 10:48:38 AM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 298,
  "userId": 193,
  "targetType": "product",
  "targetId": 102,
  "url": "https://example.com/files/attachment-298.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 44756272,
  "createdAt": "2025-10-14T10:48:38.820Z"
}