# Is there a way to make a detailed customer statements using API?

**URL:** <https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491>\
**Category:** Uncategorized\
**Created:** [May 12, 2024, 12:21pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491 "2024-05-12T12:21:51Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 12, 2024, 12:21pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/1 "2024-05-12T12:21:51Z")

</div>

Hello

I have a big problem. I previously convinced my company to use this software and the biggest letdown was that the (customer statements transactions) report didn’t show everything in detail, which they wanted. Then it was [solved for me with a custom report](https://forum.manager.io/t/can-i-expand-invoice-details-in-customer-statement-transactions-report/50426/11) after that I migrated all our the data to this software. then I found out that the report only works with base currency (where the customer’s currency is the base currency), and where there aren’t any Journal entries involved.

Our customers are very primitive and want literally each and every invoice details in the statement report.

What are my options? I really don’t want to use another software.

**Now my question:**  
I’m a programmer, can the API help me? does the API allow me to get all the information needed to construct the (customer statements transactions) report?

Thank you for you time

---

<div class="post-metadata">

**Author:** ![shahabb](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@shahabb](https://forum.manager.io/u/shahabb)\
**Post date:** [May 12, 2024, 1:54pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/2 "2024-05-12T13:54:55Z")

</div>

Hello bro.

> [@hunar1997](#):
>
> where there aren’t any Journal entries involved.

I told you at that time that it would not show Journal entries etc.

> [@hunar1997](#):
>
> I found out that the report only works with base currency (where the customer’s currency is the base currency)

Btw this shouldnt be an issue can you explain in detail?

---

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 12, 2024, 2:00pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/3 "2024-05-12T14:00:07Z")

</div>

Yeah I was hoping that I will rarely use journal entries, but turns out that It’s very common for our business.

If a user’s currency was a foreign one, then In the custom report it shows the value of the transactions in the base currency.

I’m interested in the API … I saw this comment [What I suggest is to create transaction in Manager, then look how it was saved in API.](https://forum.manager.io/t/the-manager-api/5132/20) I’m trying to figure out how to do that to see if it helps… I cant find any documentation for the API

---

<div class="post-metadata">

**Author:** ![shahabb](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@shahabb](https://forum.manager.io/u/shahabb)\
**Post date:** [May 12, 2024, 2:20pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/4 "2024-05-12T14:20:09Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/f/0/f00a56aab2fc37988cf187db7ceab958305361d0.png)

Try this. then let me know if it worked

P.S Recently i asked the developer about this feature and if it is implemented then this kind of report will be very easy.

> [@Renamed "Advanced Search" to "Custom Reports" and making the feature look report-like](https://forum.manager.io/t/renamed-advanced-search-to-custom-reports-and-making-the-feature-look-report-like/51856/11):
>
> > [@Renamed "Advanced Search" to "Custom Reports" and making the feature look report-like](https://forum.manager.io/t/renamed-advanced-search-to-custom-reports-and-making-the-feature-look-report-like/51856/8):
> >
> > Extending Transaction lines capability to individual accounts (Like acc receivables, payables, capital accounts etc) with running balance and Custom report capability.
> 
> Yes, this is still missing piece. I’m working on it.

---

<div class="post-metadata">

**Author:** ![shahabb](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@shahabb](https://forum.manager.io/u/shahabb)\
**Post date:** [May 12, 2024, 2:20pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/5 "2024-05-12T14:20:42Z")

</div>

> [@hunar1997](#):
>
> I’m interested in the API … I saw this comment [What I suggest is to create transaction in Manager, then look how it was saved in API.](https://forum.manager.io/t/the-manager-api/5132/20) I’m trying to figure out how to do that to see if it helps… I cant find any documentation for the API

Yes there is no documentation for API yet and it is not fully developed yet.

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [May 12, 2024, 9:40pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/6 "2024-05-12T21:40:19Z")

</div>

@hunar1997 this is not something that needs to be solved using API.

There is already feature request for this in `ideas`

> [@Detailed statment for customers and Suppliers](https://forum.manager.io/t/detailed-statment-for-customers-and-suppliers/22064):
>
> Currently Customer/Supplier statement shows description, credit and debit amounts only. is it possible to add details of invoice. lie sometime invoice have 6,7 items, in statement it just shows 1 line description, so for details we have to open invoice and check. almost all other software has option to show invoice items on statements. someone asked same question in 2016, but no proper solution was offered. i hope @lubos will look into it. i also checked custom reports, there is not optio…

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [May 12, 2024, 9:41pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/7 "2024-05-12T21:41:20Z")

</div>

> [@shahabb](#):
>
> Yes there is no documentation for API yet and it is not fully developed yet.

New API does have documentation at [https://manager.readme.io](https://manager.readme.io) with full reference at [https://manager.readme.io/reference](https://manager.readme.io/reference)

---

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 13, 2024, 5:40am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/8 "2024-05-13T05:40:44Z")

</div>

Thank you 🙂 that kind of solves the foreign currency but i actually need (TransactionAmountMultipliedByNegativeOne) and (TransactionAmountMultipliedByNegativeOne) which doesn’t exist

---

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 13, 2024, 5:54am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/9 "2024-05-13T05:54:46Z")

</div>

> [@hunar1997](#):
>
> [What I suggest is to create transaction in Manager, then look how it was saved in API](https://forum.manager.io/t/the-manager-api/5132/20)

Thanks, I saw that page before but yesterday I search aloot in google but couldn’t find it.

but my question is, it is possible right? all the data needed to create the report can be obtained through the API?

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [May 13, 2024, 6:04am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/10 "2024-05-13T06:04:27Z")

</div>

> [@hunar1997](#):
>
> it is possible right? all the data needed to create the report can be obtained through the API?

No one can answer that. Just try.

---

<div class="post-metadata">

**Author:** ![shahabb](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@shahabb](https://forum.manager.io/u/shahabb)\
**Post date:** [May 13, 2024, 6:48am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/11 "2024-05-13T06:48:51Z")

</div>

Why not use Advance Queries. Go to Summary tab and at the bottom right click “Transactions” then create an advance query

 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/1/1/11c3c6e8215513132beb7a50c43879b0887aaee6.png)  
And use this method until a proper solution is implemented.  
But on customer statement only Sales invoices and credit notes are not shown on line level. Other than that it shows every transaction line. So why not just give them transaction detailed report along with regular statement. If they want to see details of an invoice they can look at the detail report.

---

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 13, 2024, 7:04am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/12 "2024-05-13T07:04:44Z")

</div>

I didn’t know the Summary tab had Advanced Queries 🙂 that is useful … but I’m currently experimenting with the API and it looks very promising… but it’s quite slow … takes afew seconds per request, not sure why.

---

<div class="post-metadata">

**Author:** ![eko](https://avatars.discourse-cdn.com/v4/letter/e/a8b319/32.png) [@eko](https://forum.manager.io/u/eko)\
**Post date:** [May 13, 2024, 7:49am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/13 "2024-05-13T07:49:40Z")

</div>

> [@hunar1997](#):
>
> but it’s quite slow … takes afew seconds per request, not sure why.

This is too open a statement for anyone to comment but just sympathise. It is for you to figure out why you experience slowness. It depends on lots of factors and mostly related to your hardware and operating system, available bandwidth (& internet speed), how you retrieve the records, etc. We do not experience slowness with both API and API2 but decided to stop using them because of security risks (mainly API because API2 already uses tokens and not login) as posted elsewhere.

Except when we will be forced like quite a number of countries now do to use an e-invoicing system then we will use API2 to figure it out or change away from Manager when not feasible because there maybe better local solutions. As we operate in multiple countries we would be reluctant to change but complying with authorities is paramount given the types of investments and loans most of the youth businesses get. Financial discipline and auditable records are essential in our circumstances.

---

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 13, 2024, 12:13pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/14 "2024-05-13T12:13:09Z")

</div>

How to get the contents of a journal entry using the API? “api2/journal-entries” this gives me the key… And I can see the content in “api2/transactions?term=Journal%20Entry” but that doens’t contain anything that refers to which journal entry it’s coming from

In case my comment was confusing.  
when I GET journal entries, I get (key, debit, credit) and some other stuff.  
when i GET transactions, i get (date, transaction=Journal Entry, reference=null, account, debit, credit).

But using those information I cant relate them to each other. If the transaction’s reference was the journal’s key then everything would be good

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [May 13, 2024, 6:00pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/15 "2024-05-13T18:00:01Z")

</div>

@hunar1997 rather than talking about API endpoints, what specific screen in Manager you would like to access programatically. Is it the screen when you click on “View” button within “Journal Entries” screen?

---

<div class="post-metadata">

**Author:** ![hunar1997](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/hunar1997/32/34693_2.png) [@hunar1997](https://forum.manager.io/u/hunar1997)\
**Post date:** [May 14, 2024, 6:02am UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/16 "2024-05-14T06:02:16Z")

</div>

That would be useful, can you show me some code to do that?  
Ideally I want to do the equivalent of (click customers, search and find customer, click the money, loop though and click “view” on all of them)

I’m currently doing things like this in python (I’m showing it here because I think you guys aren’t doing it this way and hopefully redirect me to some code)

```auto
response = requests.get(f"http://localhost:55667/api2/sales-invoice-lines?term={name}", headers=headers)
r=response.json()
for l in r['salesInvoiceLines']:
    print( l['item'],l['qty'],l['amount']['value'],l['amount']['currency'] )

```

I did this for receipts too, but I also want journal entries to get all the data i need for constructing the report.

---

<div class="post-metadata">

**Author:** ![Inspire](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/inspire/32/47773_2.png) [@Inspire](https://forum.manager.io/u/Inspire)\
**Post date:** [July 22, 2024, 12:47pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/17 "2024-07-22T12:47:35Z")

</div>

Can you add the affected account/customer/etc… of a journal entry to the result of api2 call? that would solve my problem  
currently when showing a journal entry All you get is this

```auto
    {
      "key": "47822a16-7ccb-42d7-a1f4-f29636d1b6bc",
      "image": null,
      "attachment": "False",
      "edit": null,
      "view": null,
      "date": "2024-06-01",
      "narration": "the narration/comment",
      "debit": {
        "value": 10000,
        "currency": "USD"
      },
      "credit": {
        "value": 10000,
        "currency": "USD"
      },
      "status": "Balanced"
    },

```

in the “debit” and “credit” sections I want “accounts” because currently there is no way to know what was debited and credited.

while in API (not api2) it does show the account

```auto
{
  "Date": "2024-06-01",
  "Currency": "cdfa971e-230d-4bf6-b803-45de847f4ba9",
  "ExchangeRate": 1450,
  "Narration": "The narration",
  "Lines": [
    {
      "Account": "d1489e95-bb28-4f5d-b42e-67d3291b3893",
      "AccountsReceivableCustomer": "82bc314f-4cb1-46f1-890c-8a4248905715",
      "AccountsReceivableSalesInvoice": "d0a60062-128f-41f0-86d5-455edbb143cb",
      "CustomFields2": {},
      "Credit": 10000
    },
    {
      "Account": "dac7ba37-0ccd-45e5-906e-548e6c50df37",
      "AccountsPayableSupplier": "c9ba74ab-2d2b-4752-a411-1d42490b0025",
      "CustomFields2": {},
      "Debit": 10000
    }
  ],
  "CustomFields2": {}
}

```

---

<div class="post-metadata">

**Author:** ![Mabaega](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/mabaega/32/47471_2.png) [@Mabaega](https://forum.manager.io/u/Mabaega)\
**Post date:** [July 22, 2024, 1:20pm UTC](https://forum.manager.io/t/is-there-a-way-to-make-a-detailed-customer-statements-using-api/53491/18 "2024-07-22T13:20:52Z")

</div>

For Api2, Get `Key` from `/journal-entries` path.  
Then Get the complete transaction Json via `/journal-entry-form/{key}` path.
