Accessing Assignee, Attachments, etc. via API

Hi there,

first of all, thanks for creating such a comprehensive piece of software for free.

Currently I am evaluating if ERPNext is suitable for the needs of my company and one of the things I need is to access all of this regardless of the DocType:

  • Assigned to
  • Attachment

(e.g. the Attachment of a Sales / Purchase invoice).

Using the official API, those fields are not available and playing around with webhooks, I found out that there are fields like

attachment

and

_assign

However, even with an assignee and an attachment, those fields return null.

Example Doc (ISS-2025-00015):

Webhook data:

Am I missing something? Is this a bug?
I tagged this post with Frappe Framework since I believe this functionality is not limited to ERPNext.

Thanks in advance!

Edit:

I found it out myself and wanted to document it in case someone has a similar problem:

  • The assignee is found by querying the “ToDo” doctype with a filter “Reference” to the document.
  • The attachment is found by querying the “File” doctype with a filter to the document as well (this gets you the name of the file making it possible to get the details including the download path). You need to authenticate in order to download private files of course.
1 Like