Sales Invoice Item API

Hi, does anyone know if we can run Sales Invoice Item API?

I am getting the parent document permission error, i dont know why.

What I want to really look for is, I want to look for the list of salesman, selling particular item codes, on that month.

Appreciate your help and thanks in advance.

Hi,

Sales Invoice Item is child table. I don’t think it has api for getting data. before I try to find this end point but I cannot get it.

I think you have to create your own api.

Thanks,

You can definitely call the standard APIs for Child Documents, without going through the parent.

  1. First, choose a particular 'Sales Invoice Item' by its unique 'name'
    Example: 0000e8581b

  2. Next, perform an ordinary GET call, as shown below:

curl --request GET \
  --url http://your_erp_site.com/api/resource/Sales%20Invoice%20Item/0000e8581b \
  --header 'Authorization: token abcde:12345' \
  --header 'Content-Type: application/json' \
  --cookie 'sid=Guest; system_user=yes; full_name=Guest; user_id=Guest; user_image='

The result = all DocFields for the Sales Invoice Item.

NOTE: I would strongly caution against trying a PUT or POST. Because when you do this, the controller methods on the parent are -not- called. And you will end up with invalid data in the ERP. I’ve spent a ton of time writing workarounds for this, and it’s not easy.