Browse documentation
API referenceGET/v1/earnings/attachments1 credit / item

Get earnings attachment URLs

GET /v1/earnings/attachments

Accepts earnings filing ids from /v1/earnings/index, /v1/earnings, or /v1/earnings/detail and returns presigned R2 URLs when available.

When to use it

Call this endpoint only when a user or workflow actually needs to open or download a filing. Each ready attachment URL costs 1 credit, so avoid requesting attachments for every list row up front. For live feeds that already include attachment URLs, subscribe to the earnings WebSocket stream instead.

Authentication and billing

  • Requires X-API-Key or api_key.
  • Credit cost: 1 credit / item. Bills 1 credit per ready attachment URL returned.
  • See pricing for plan allowances and full billing details.

Request

This endpoint does not require a request body.

FieldLocationRequiredNotes
idsqueryYesComma-separated earnings filing ids or repeated query parameters. Maximum 20 ids.
api_keyqueryNoOptional alternative to the X-API-Key header. Prefer the header for server-side applications.

Response

Returns ordered attachment lookup records with status, url, optional expires_in for presigned R2 links, and message when unavailable.

Successful Responseapplication/json
{
  "data": [
    {
      "expires_in": 604800,
      "id": "67c2f8a1b2c3d4e5f6a7b8c9",
      "status": "ready",
      "url": "https://767579b349213bb8b367495226a5488f.r2.cloudflarestorage.com/example.pdf?X-Amz-Signature=example"
    },
    {
      "id": "67c2f8a1b2c3d4e5f6a7b8d0",
      "message": "Attachment is not available for this record.",
      "status": "no_attachment"
    },
    {
      "id": "not-an-objectid",
      "message": "The requested id is not a valid ObjectId.",
      "status": "invalid_id"
    }
  ]
}

Request pattern

bash
curl -G "https://developers.manasija.in/v1/earnings/attachments" \
  -H "X-API-Key: $DRISHTI_API_KEY" \
  --data-urlencode "ids=67c2f8a1b2c3d4e5f6a7b8c9"

JavaScript / TypeScript SDK

ts
const files = await client.getEarningsAttachments({ ids: ["67c2f8a1b2c3d4e5f6a7b8c9"] })

Python SDK

python
files = client.get_earnings_attachments(ids=["67c2f8a1b2c3d4e5f6a7b8c9"])

Interactive reference

Use the Scalar API client for executable requests, schemas, and the full OpenAPI contract.