Attachments

View as Markdown

Production documents.

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

  • idstring

    Unique identifier of the attachment, prefixed with att_. Treat it as an opaque string: store it and compare it, never parse it.

  • objectstring

    Names the type of this object. Always attachment.

  • namestring

    File name.

  • formatstring

    File extension, lowercase, for example pdf or mp4.

  • size_bytesinteger

    File size in bytes.

  • download_urlstring

    Signed URL to download the file. Valid for 15 minutes; fetch the attachment again for a fresh one.

  • ownerobject

    The product or stock this file belongs to.

  • created_attimestamp

    Point in time, ISO 8601 in UTC.

The attachment object
{
  ,
  ,
  ,
  ,
  ,
  ,
  ,
  
}

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

  • idstringRequired

    Unique identifier of the attachment, prefixed with att_. Treat it as an opaque string: store it and compare it, never parse it.

Returns200 OK

The attachment. Returns the 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.

GET/v2/attachments/{id}
curl "https://public-api.dapi.digital/v2/attachments/att_bfP0GSqKoZFrD72H5Os0rc7HV9XP6eQJu" \
  -H "x-api-key: $DAPI_API_KEY"
Response
{
  "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"
}