<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Dear David,<br>
    <br>
    Files contain 404 responses from your server.<br>
    To investigate further, could you please also send full curl command
    (& output) that you used to create invoice and download it?<br>
    <br>
    Like this:<br>
    <br>
    <blockquote><font size="-2">root@sp1:~# curl -i -X POST -H
        'Connection: close' -H 'Content-Type: application/json' --user
        administrator:pwd -k '<a class="moz-txt-link-freetext" href="https://127.0.0.1:1443/api/invoices/">https://127.0.0.1:1443/api/invoices/</a>'
        --data-binary '{ "customer_id" : "209", "template_id" : "1",
        "period_start": "2018-03-01 00:00:00", "period_end": "2018-03-31
        23:59:59"  }'</font><br>
      <font size="-2">HTTP/1.1 201 Created</font><br>
      <font size="-2">Server: nginx</font><br>
      <font size="-2">Date: Thu, 15 Mar 2018 06:59:17 GMT</font><br>
      <font size="-2">Content-Length: 0</font><br>
      <font size="-2">Connection: close</font><br>
      <font size="-2">Location: /api/invoices/3</font><br>
      <font size="-2">Set-Cookie:
        ngcp_panel_session=f6327544c9b771feac45d52f00dd0c2de0589ff0;
        path=/; expires=Thu, 15-Mar-2018 07:59:16 GMT; HttpOnly</font><br>
      <font size="-2">X-Catalyst: 5.90114</font><br>
      <font size="-2">Strict-Transport-Security: max-age=15768000</font><br>
      <br>
    </blockquote>
    You can see above that response header "Location" contains
    information about newly generated invoice id and relative path. So
    you can use it to download generated invoice.<br>
    <blockquote><br>
      <font size="-2">root@sp1:~# curl -i -X GET -H 'Connection: close'
        -H 'Accept: application/pdf' --user administrator:administrator
        -k '<a class="moz-txt-link-freetext" href="https://127.0.0.1:1443/api/invoices/3">https://127.0.0.1:1443/api/invoices/3</a>' >
        /tmp/invoice_3.pdf</font><br>
      <br>
      <font size="-2">root@sp1:~# ls -l /tmp/invoice_3.pdf</font><br>
      <font size="-2">-rwxrwx--- 1 root vboxsf 42005 Mar 15 07:59
        /tmp/invoice_3.pdf</font><br>
      <br>
    </blockquote>
    Size of the downloaded file should be something around 30Kb-50Kb<br>
    .<br>
    <br>
    <div class="moz-cite-prefix">On 2018-03-14 22:47, David | csr-online
      SPAIN wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:6c8b1b95dd674298b1fe5b4963b7fa60@exch2013.csronline.local">
      <pre wrap="">I generate this attached


-----Mensaje original-----
De: Irina Peshinskaya [<a class="moz-txt-link-freetext" href="mailto:ipeshinskaya@sipwise.com">mailto:ipeshinskaya@sipwise.com</a>]
Enviado el: miércoles, 14 de marzo de 2018 22:45
Para: David | csr-online SPAIN <a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><davidp@csr-online.net></a>
CC: <a class="moz-txt-link-abbreviated" href="mailto:spce-user@lists.sipwise.com">spce-user@lists.sipwise.com</a>
Asunto: Re: [Spce-user] generare invoices all months

Dear David,

Could you please send me your downloaded file that is not opened in the adobe reader?
Later I maybe will ask for usual ngcp-panel logs.

Thanks in advance.

Best regards,
Irina Peshinskaya

On 2018-03-14 22:38, David | csr-online SPAIN wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hello i run this line but the pdf download is unreadable by the adobe
reader If I check de url via browser don’t return the pdf




De: Irina Peshinskaya <a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><ipeshinskaya@sipwise.com></a>
Fecha: miércoles, 14 de marzo de 2018, 8:10
Para: David Pablo <a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><davidp@csr-online.net></a>
CC: <a class="moz-txt-link-rfc2396E" href="mailto:spce-user@lists.sipwise.com">"spce-user@lists.sipwise.com"</a> <a class="moz-txt-link-rfc2396E" href="mailto:spce-user@lists.sipwise.com"><spce-user@lists.sipwise.com></a>
Asunto: Re: [Spce-user] generare invoices all months

Dear David,

Regarding invoice saved to some directory. You can download generated invoice pdf and save it to the directory:
curl -i -X GET -H 'Connection: close' -H 'Accept: application/pdf'
--user administrator:pwd -k '<a class="moz-txt-link-freetext" href="https://127.0.0.1:1443/api/invoices/1">https://127.0.0.1:1443/api/invoices/1</a>' > /tmp/invoice_1.pdf About your other question:

One question, is possible to group calls by subscriber to have better
costs report

????
No, now it is not implemented that way. Calls are shown chronologically.

Best regards,
Irina Peshinskaya


On 2018-03-13 14:43, David | csr-online SPAIN wrote:

Is possible to send invoice to a folder?



writing on the go



El 13 mar 2018, a las 14:36, Irina Peshinskaya <<a class="moz-txt-link-abbreviated" href="mailto:ipeshinskaya@sipwise.com">ipeshinskaya@sipwise.com</a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a>> escribi?:



Dear David,

I need to make some "script" that create invoice for all customers and put invoices in a directory?

Yes, your supposition is correct and further automation need to be done on your side.



Best regards,

Irina



On 2018-03-13 13:18, David | csr-online SPAIN wrote:



Its works one question please.



Is possible to make this every month for all customers? Or I need tu make one line for every customer???

Are the invoices possible to put all in one folder?



I need to make some "script" that create invoice for all customers and put invoices in a directory?



Than you very much





?El 13/3/18 12:41, "Irina Peshinskaya" <a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a> escribi?:



     Dear David,



     Could you please write full curl command (without credentials)
that

     produces such error for you?



     Also please send me your log files:

     /var/log/ngcp/api.log

     /var/log/ngcp/panel.log

     /var/log/ngcp/panel-debug.log



     Best regards,

     Irina Peshinskaya



     On 2018-03-13 11:13, David | csr-online SPAIN wrote:

     > Thank you i send this:

     >

     > <a class="moz-txt-link-freetext" href="https://sbc1eu.csr-online.net:1443/api/invoices/">https://sbc1eu.csr-online.net:1443/api/invoices/</a>' --data-binary '{ "customer_id" : "5", "template_id" : "3", "period_start": "2018-02-01 00:00:00", "period_end": "2018-02-30 23:59:59"  }'

     >

     > always I receive: {"message":"Invalid id in request
URI","code":"400"}

     >

     > I have customer 5 and template 3

     >

     > ???? any idea?

     > thanks

     >

     > El 13/3/18 11:01, "Irina Peshinskaya" <a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:ipeshinskaya@sipwise.com"><mailto:ipeshinskaya@sipwise.com></a> escribi?:

     >

     >      Dear David,

     >

     >      In the ngcp-panel 5.5.1 you can use POST method in the /api/invoices

     >      REST interface.

     >

     >      curl -i -X POST -H 'Connection: close' -H 'Content-Type:

     >      application/json' --user administrator:pwd -k

     >      '<a class="moz-txt-link-freetext" href="https://127.0.0.1:1443/api/invoices/">https://127.0.0.1:1443/api/invoices/</a>' --data-binary '{ "customer_id" :

     >      "15", "template_id" : "1", "period_start": "2017-11-01 00:00:00",

     >      "period_end": "2017-11-30 23:59:59"  }'

     >

     >      Best regards,

     >      Irina Peshinskaya

     >

     >      On 2018-03-13 10:39, David | csr-online SPAIN wrote:

     >      > Hello i use version 5.5.1 and i see the gen invoice is disbaled by default because can damage the databse.

     >      > How I can create every month all invoices for my customers? Not manually

     >      >

     >      > Any help please?

     >      >

     >      >

     >      >

     >      > Cordialment | Atentamente | Sincerely

     >      > David Pablo Mitchell

     >      > CTO

     >      >

     >      > CSR ONLINE

     >      > Movil: +34 658174990

     >      > Tel.Oficina:+34 931860160 / +34 902056355 ext.101

     >      > Mail: <a class="moz-txt-link-abbreviated" href="mailto:davidp@csr-online.net">davidp@csr-online.net</a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a>

     >      > Web: <a class="moz-txt-link-abbreviated" href="http://www.csr-online.net">www.csr-online.net</a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a>

     >      > You run your business, we run your IT.

     >      >

     >      >

     >      > La informaci?n contenida en el mensaje y/o archivo(s) adjunto(s) es confidencial y est? destinada a ser le?da s?lo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario se?alado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicaci?n por error, le informamos que est? totalmente prohibida, y puede ser ilegal, cualquier divulgaci?n, distribuci?n o reproducci?n de esta comunicaci?n, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la direcci?n arriba mencionada.

     >      > _______________________________________________

     >      > Spce-user mailing list

     >      > <a class="moz-txt-link-abbreviated" href="mailto:Spce-user@lists.sipwise.com">Spce-user@lists.sipwise.com</a><a class="moz-txt-link-rfc2396E" href="mailto:Spce-user@lists.sipwise.com"><mailto:Spce-user@lists.sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:Spce-user@lists.sipwise.com"><mailto:Spce-user@lists.sipwise.com></a><a class="moz-txt-link-rfc2396E" href="mailto:Spce-user@lists.sipwise.com"><mailto:Spce-user@lists.sipwise.com></a>

     >      > <a class="moz-txt-link-freetext" href="https://lists.sipwise.com/listinfo/spce-user">https://lists.sipwise.com/listinfo/spce-user</a>

     >

     >

     >

     >

     > Cordialment | Atentamente | Sincerely

     > David Pablo Mitchell

     > CTO

     >

     > CSR ONLINE

     > Movil: +34 658174990

     > Tel.Oficina:+34 931860160 / +34 902056355  ext.101

     > Mail:
<a class="moz-txt-link-abbreviated" href="mailto:davidp@csr-online.net">davidp@csr-online.net</a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-
online.net></a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a>

     > Web:
<a class="moz-txt-link-abbreviated" href="http://www.csr-online.net">www.csr-online.net</a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.ne
t></a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a>

     > You run your business, we run your IT.

     >

     >

     > La informaci?n contenida en el mensaje y/o archivo(s) adjunto(s) es confidencial y est? destinada a ser le?da s?lo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario se?alado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicaci?n por error, le informamos que est? totalmente prohibida, y puede ser ilegal, cualquier divulgaci?n, distribuci?n o reproducci?n de esta comunicaci?n, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la direcci?n arriba mencionada.









Cordialment | Atentamente | Sincerely

David Pablo Mitchell

CTO



CSR ONLINE

Movil: +34 658174990

Tel.Oficina:+34 931860160 / +34 902056355  ext.101

Mail:
<a class="moz-txt-link-abbreviated" href="mailto:davidp@csr-online.net">davidp@csr-online.net</a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-
online.net></a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a>

Web:
<a class="moz-txt-link-abbreviated" href="http://www.csr-online.net">www.csr-online.net</a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.ne
t></a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a>

You run your business, we run your IT.





La informaci?n contenida en el mensaje y/o archivo(s) adjunto(s) es confidencial y est? destinada a ser le?da s?lo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario se?alado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicaci?n por error, le informamos que est? totalmente prohibida, y puede ser ilegal, cualquier divulgaci?n, distribuci?n o reproducci?n de esta comunicaci?n, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la direcci?n arriba mencionada.









Cordialment | Atentamente | Sincerely

David Pablo Mitchell

CTO



CSR ONLINE

Movil: +34 658174990

Tel.Oficina:+34 931860160 / +34 902056355 ext.101

Mail: <a class="moz-txt-link-abbreviated" href="mailto:davidp@csr-online.net">davidp@csr-online.net</a><a class="moz-txt-link-rfc2396E" href="mailto:davidp@csr-online.net"><mailto:davidp@csr-online.net></a>

Web: <a class="moz-txt-link-abbreviated" href="http://www.csr-online.net">www.csr-online.net</a><a class="moz-txt-link-rfc2396E" href="http://www.csr-online.net"><http://www.csr-online.net></a>

You run your business, we run your IT.





La informaci?n contenida en el mensaje y/o archivo(s) adjunto(s) es confidencial y est? destinada a ser le?da s?lo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario se?alado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicaci?n por error, le informamos que est? totalmente prohibida, y puede ser ilegal, cualquier divulgaci?n, distribuci?n o reproducci?n de esta comunicaci?n, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la direcci?n arriba mencionada.




Cordialment | Atentamente | Sincerely
David Pablo Mitchell
CTO

CSR ONLINE
Movil: +34 658174990
Tel.Oficina:+34 931860160 / +34 902056355 ext.101
Mail: <a class="moz-txt-link-abbreviated" href="mailto:davidp@csr-online.net">davidp@csr-online.net</a>
Web: <a class="moz-txt-link-abbreviated" href="http://www.csr-online.net">www.csr-online.net</a>
You run your business, we run your IT.


La información contenida en el mensaje y/o archivo(s) adjunto(s) es confidencial y está destinada a ser leída sólo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario señalado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicación por error, le informamos que está totalmente prohibida, y puede ser ilegal, cualquier divulgación, distribución o reproducción de esta comunicación, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la dirección arriba mencionada.
</pre>
      </blockquote>
      <pre wrap="">

Cordialment | Atentamente | Sincerely
David Pablo Mitchell
CTO

CSR ONLINE
Movil: +34 658174990
Tel.Oficina:+34 931860160 / +34 902056355  ext.101
Mail: <a class="moz-txt-link-abbreviated" href="mailto:davidp@csr-online.net">davidp@csr-online.net</a>
Web: <a class="moz-txt-link-abbreviated" href="http://www.csr-online.net">www.csr-online.net</a>
You run your business, we run your IT.


La información contenida en el mensaje y/o archivo(s) adjunto(s) es confidencial y está destinada a ser leída sólo por la(s) persona(s) a la(s) que va dirigida. Si usted lee este mensaje y no es el destinatario señalado, el empleado o el agente responsable de entregar el mensaje al destinatario, o ha recibido esta comunicación por error, le informamos que está totalmente prohibida, y puede ser ilegal, cualquier divulgación, distribución o reproducción de esta comunicación, y le rogamos que nos lo notifique inmediatamente y nos devuelva el mensaje original a la dirección arriba mencionada.
</pre>
    </blockquote>
    <br>
  </body>
</html>