example-data.com
Menu
Browse docs and collections

Overview

attachments / #636

Activity #636

User #174 attached application/pdf (19757888 bytes)

12/26/2025, 6:21:05 PM

Component variants

Medium
Small

User #174 attached application/pdf (19757888 bytes) · 12/26/2025, 6:21:05 PM

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 636,
  "userId": 174,
  "targetType": "product",
  "targetId": 115,
  "url": "https://example.com/files/attachment-636.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 19757888,
  "createdAt": "2025-12-26T18:21:05.262Z"
}