# Attachments

Production documents.

## Endpoints

-   [GET `/v2/attachments/{id}`](https://public-api.dapi.digital/docs/reference/attachments.md#get_attachment)

## The attachment object

A production document, such as assembly instructions or a guide. It is sent to the production partner with every order of its product or stock and is never shown to buyers.

### Attributes

-   `id` (string): Unique identifier of the attachment, prefixed with `att_`. Treat it as an opaque string: store it and compare it, never parse it.
-   `object` (string): Names the type of this object. Always `attachment`.
-   `name` (string): File name.
-   `format` (string): File extension, lowercase, for example `pdf` or `mp4`.
-   `size_bytes` (integer): File size in bytes.
-   `download_url` (string): Signed URL to download the file. Valid for 15 minutes; fetch the attachment again for a fresh one.
-   `owner` (object): The product or stock this file belongs to.
    -   Shape **Reference** (default):
        
        Reference to a product. Pass the matching `expand[]` path to receive the full product instead.
        
        -   `id` (string): Unique identifier of the product, prefixed with `prd_`. Treat it as an opaque string: store it and compare it, never parse it.
        -   `object` (string): Names the type of this object. Always `product`.
        -   `name` (string): Display name of the product.
    -   Shape **Reference** (default):
        
        Reference to a stock. Pass the matching `expand[]` path to receive the full stock instead.
        
        -   `id` (string): Unique identifier of the stock, prefixed with `stk_`. Treat it as an opaque string: store it and compare it, never parse it.
        -   `object` (string): Names the type of this object. Always `stock`.
        -   `name` (string): Display name of the stock.
-   `created_at` (timestamp): Point in time, ISO 8601 in UTC.

**The attachment object**

```json
{
  "id": "att_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
  "object": "attachment",
  "name": "assembly-guide.pdf",
  "format": "pdf",
  "size_bytes": 482113,
  "download_url": "https://files.example.com/assembly-guide.pdf?signature=abc",
  "owner": {
    "id": "prd_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu",
    "object": "product",
    "name": "PR Tracker"
  },
  "created_at": "2026-09-30T14:21:07Z"
}
```

## Get an attachment

GET `/v2/attachments/{id}`

- **Credentials**: An API key with the `products:read` or `stocks:read` scope (full access includes every scope). A signed-in dashboard session works too.

- **For**: Designers

- **Operation id**: `get_attachment`

Returns one production document with a download link. Designers only.

### Path parameters

-   `id` (string, required): Unique identifier of the attachment, prefixed with `att_`. Treat it as an opaque string: store it and compare it, never parse it.

### Returns 200 OK

The attachment. Returns [the attachment object](https://public-api.dapi.digital/docs/reference/attachments.md#attachment_object).

### Responses

-   `200`: The attachment.
-   `401`: Credentials are missing (`missing_credentials`), the API key is unknown or inactive (`invalid_api_key`), the session expired (`invalid_session`), or both a key and a session were sent (`ambiguous_credentials`).
-   `403`: The credentials are valid but not allowed to do this: a scope is missing (`missing_scope`), the endpoint is for another kind of account (`actor_not_allowed`) or another kind of credential (`credential_not_allowed`), the account may no longer use the API (`account_blacklisted`), or the account must change something first, in which case `details.fix_url` links to the dashboard page that fixes it.
-   `404`: You have no attachment with this id (`attachment_not_found`).
-   `429`: Too many requests (`rate_limited`): the limit is 500 per minute per API key (or signed-in user). Wait for the number of seconds in the `Retry-After` header, then retry; `details` has `limit`, `window_seconds`, `reset_at` and `retry_after_seconds`.

Errors use [the error object](https://public-api.dapi.digital/docs/guides/errors.md#error-object).

**Request**

```bash
curl "https://public-api.dapi.digital/v2/attachments/att_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu" \
  -H "x-api-key: $DAPI_API_KEY"
```

---

3DAPI API Docs. This page on the web: https://public-api.dapi.digital/docs/reference/attachments. Index of every page: https://public-api.dapi.digital/docs/llms.txt.
