<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Simple REST API]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=3433</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3433&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Simple REST API.]]></description>
		<lastBuildDate>Fri, 03 Feb 2017 16:32:30 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27471#p27471</link>
			<description><![CDATA[<p>SynPOS locations</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 03 Feb 2017 16:32:30 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27471#p27471</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27467#p27467</link>
			<description><![CDATA[<p><a href="https://sourceforge.net/projects/synpos/">SynPOS</a> hasn&#039;t been updated since Nov 2006 at SourceForge and is written in Java.</p><p><a href="https://github.com/anvie/synpos">synpos</a> mirror with some mods is on GitHub and was last updated in Sep 2015.</p><p>Which is your repo for the integration?</p><p>Initial user / password: 123 / 123<br />Uses the HSQL DB by default - can configure for MySQL with JDBC.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Fri, 03 Feb 2017 16:01:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27467#p27467</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=27456#p27456</link>
			<description><![CDATA[<p>Hi Again, hope you are all doing well.</p><p>It&#039;s been a long time since the first release of Simple REST API, and lots of people asked me about a POS integration.</p><p>I made some spare time and i am working on a new light weight API and the integration with SynPOS 0.9.3, this is still a work in progress and many data is hardcoded (for example the customer id to sync orders) and lots of bugs still, but i wanted to let you know i am working on this and if there is anyone interested in helping with testing, coding or code review it will be appreciated, just let me know in this post or via email.</p><p>... Andres Amaya</p>]]></description>
			<author><![CDATA[null@example.com (andresamayadiaz)]]></author>
			<pubDate>Thu, 02 Feb 2017 01:53:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=27456#p27456</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=23611#p23611</link>
			<description><![CDATA[<p>I gave the url&nbsp; http://localhost/frontaccounting/modules/api/category and i follow the steps as you said i got the response code is 200. I inserted the 6 row in stock_category table. But i got the response value is Response does not contain any data. In this url si redirect into login page. Pls anyone help me to clear this problem because i am struggling 1week. The problem in index.php file in api_login();<br /> function calling</p>]]></description>
			<author><![CDATA[null@example.com (saravanans)]]></author>
			<pubDate>Thu, 28 May 2015 14:41:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=23611#p23611</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20696#p20696</link>
			<description><![CDATA[<p>Hi, i am really sorry if i confuse with the Simple REST API for FA and another project on my github repo.</p><p>I created a branch of my Simple REST API for a client that wanted to connect FA and other Rails software with AutoFactura, so thats why i created the ruby gem for AutoFactura.</p><p>So for the Simple REST API i just changed the branch master with the help of Cambell Prince which send me a pull request that does not have anything additional.</p>]]></description>
			<author><![CDATA[null@example.com (andresamayadiaz)]]></author>
			<pubDate>Sat, 06 Sep 2014 17:42:37 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20696#p20696</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20188#p20188</link>
			<description><![CDATA[<p>Some posts in the forum indicate it was used for a desktop version of FA.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 16 Jun 2014 03:40:17 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20188#p20188</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20183#p20183</link>
			<description><![CDATA[<p>That sounds like it might be true. If so, I guess it tells us what to do with the code.</p><p>Does anybody know the current maintenance/support status of the API?</p>]]></description>
			<author><![CDATA[null@example.com (rsearle)]]></author>
			<pubDate>Mon, 16 Jun 2014 03:20:13 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20183#p20183</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20181#p20181</link>
			<description><![CDATA[<p>I suspect it&#039;s auto(-matic), rather than &quot;self-&quot;. While my Spanish is somewhat limited, it seems to be a service for electronic invoices (and/or payment of them) in Mexico. And the ruby code which (I guess) provides an interface to it is written by the same chap who wrote &quot;our&quot; REST API.</p><p>He might well have planned to exchange invoice data between Autofactura and FA, using a ruby-based web service. But the API was abandoned (?) before it was finished, so who knows what was actually planned...</p>]]></description>
			<author><![CDATA[null@example.com (tm)]]></author>
			<pubDate>Mon, 16 Jun 2014 03:16:17 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20181#p20181</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20179#p20179</link>
			<description><![CDATA[<div class="quotebox"><cite>apmuthu wrote:</cite><blockquote><p>What has the <a href="https://github.com/andresamayadiaz/autofactura">Autofactura</a> (<a href="http://www.autofactura.com/">Site</a> - Translation: Self Invoice) project (based on Ruby/Gems) got in common with Front Accounting?</p></blockquote></div><p>If that&#039;s what it is, then I&#039;d like to know that too. Why is it imported in the FA Simple REST API <strong>sales.inc</strong> file (apparently as part of some module entitled <strong>timbrado</strong>), and why is it used in the <strong>sales_cancel</strong> function?</p><p>But I think &quot;autofactura&quot; translates roughly as &quot;auto-billing&quot;, and the mysterious <strong>timbrado</strong> module may have something to do with a third-party billing system.</p>]]></description>
			<author><![CDATA[null@example.com (rsearle)]]></author>
			<pubDate>Mon, 16 Jun 2014 03:08:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20179#p20179</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20174#p20174</link>
			<description><![CDATA[<p>What has the <a href="https://github.com/andresamayadiaz/autofactura">Autofactura</a> (<a href="http://www.autofactura.com/">Site</a> - Translation: Self Invoice) project (based on Ruby/Gems) got in common with Front Accounting?</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Mon, 16 Jun 2014 02:47:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20174#p20174</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=20172#p20172</link>
			<description><![CDATA[<p>I&#039;m working through implementing this API as an element of an interface to/from a VirtueMart online shop. I will need to use sales.inc to post invoiced online orders to FA. Since 26 July 2013 sales.inc has included these imports:</p><div class="codebox"><pre><code>18: include_once($path_to_root . &quot;/modules/timbrado/includes/db/comprobantes_db.php.inc&quot;);
19: include_once($path_to_root . &quot;/modules/timbrado/includes/db/llavero_db.php.inc&quot;);
20: include_once($path_to_root . &quot;/modules/timbrado/includes/generate/AutoFacturaCore.php.inc&quot;);
21: include_once($path_to_root . &quot;/modules/timbrado/includes/db/configuraciones_db.php.inc&quot;);</code></pre></div><p>What is this <strong>timbrado</strong> (stamping?) module? I can&#039;t find any relevant reference to it anywhere.</p><p>Also, the <strong>sales_cancel</strong> function contains code that depends on <strong>AutoFacturaCore.php.inc</strong>. This code won&#039;t work without the missing includes:</p><div class="codebox"><pre><code>function sales_cancel($branch_id, $uuid)
{
    error_log(&quot;\r\n1&quot;, 3, &quot;/var/tmp/sasys.log&quot;);
    $AutoFactura = new AutoFacturaCore();
    $AutoFactura-&gt;userkey = get_cofig(&quot;Llave de Usuario&quot;, &quot;&quot;);
    $AutoFactura-&gt;suckey = $branch_id;
    $AutoFactura-&gt;url = get_cofig(&quot;Servidor&quot;, &quot;&quot;);
    $datos = array(&#039;autofactura_id&#039; =&gt; $uuid);
    $response = $AutoFactura-&gt;cancelar($datos);
    error_log(&quot;\r\n2=&gt;&quot; . json_encode($response), 3, &quot;/var/tmp/sasys.log&quot;);

    try {
        if ($response[&#039;exito&#039;] == 1) {
            error_log(&quot;\r\n3&quot;, 3, &quot;/var/tmp/sasys.log&quot;);
            set_sql_cancelar_digital($uuid, $response[&#039;url&#039;]);
            api_success_response(_(&quot;The invoice was cancelled.&quot;));
            return;
            error_log(&quot;\r\n4&quot;, 3, &quot;/var/tmp/sasys.log&quot;);
        } else {
            error_log(&quot;\r\n5&quot;, 3, &quot;/var/tmp/sasys.log&quot;);
            api_error(500, _(&#039;Could not cancel invoice.&#039;));
            return;
        }
    } catch (Exception $e) {
        error_log(&quot;\r\n6&quot;, 3, &quot;/var/tmp/sasys.log&quot;);
        api_error(500, _(&#039;Could not cancel invoice. &#039;) . $e-&gt;getMessage());
        return;
    }
}</code></pre></div><p>Thanks ...</p>]]></description>
			<author><![CDATA[null@example.com (rsearle)]]></author>
			<pubDate>Sun, 15 Jun 2014 23:46:57 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=20172#p20172</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=17789#p17789</link>
			<description><![CDATA[<p>Thank you. I&#039;m looking at the new code now (C Estrella&#039;s commit), and it&#039;s getting better. Not quite there yet, but... At least I&#039;m getting data into sales_add. </p><p>Line 282 is still passing a string to input_num() which can&#039;t be right.</p><p>And the .htaccess file causes the following entry in the error log<br />[Fri Sep 13 00:29:15 2013] [alert] [client 192.168.22.50] /var/www/frontaccounting/modules/api/.htaccess: Invalid command &#039;RewriteEngine&#039;, perhaps misspelled or defined by a module not included in the server configuration</p><p>Now I&#039;m sure that is a problem with my local configuration, so I&#039;ve just renamed it for now. I do however get another, more interesting entry:<br />[Fri Sep 13 00:49:26 2013] [error] [client 192.168.22.50] 0::connect_db.inc:51: mysql_query() expects parameter 2 to be resource, null given</p><p>Parameter 2 is $db, a global variable. It is not passed to the function (db_query) which calls mysql_query. It should just be there. How can it not be there? Does it get overwritten by the API code somewhere? Because everything is fine when accessing the system through a web browser.</p><p>Edit: No. More likely, it is never set to begin with.</p>]]></description>
			<author><![CDATA[null@example.com (tm)]]></author>
			<pubDate>Fri, 13 Sep 2013 01:38:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=17789#p17789</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=17788#p17788</link>
			<description><![CDATA[<p>This is a JSON representation of the POST, hope this helps</p><p>{<br />&nbsp; &quot;trans_type&quot;: &quot;10&quot;,<br />&nbsp; &quot;ref&quot;: &quot;NoGuia0001&quot;,<br />&nbsp; &quot;customer_id&quot;: &quot;4&quot;,<br />&nbsp; &quot;branch_id&quot;: &quot;15&quot;,<br />&nbsp; &quot;location&quot;: &quot;DEF&quot;,<br />&nbsp; &quot;deliver_to&quot;: &quot;ABC, S.A. DE C.V.&quot;,<br />&nbsp; &quot;delivery_date&quot;: &quot;2013-10-30&quot;,<br />&nbsp; &quot;delivery_address&quot;: &quot;Calle., #2333 int: 0, Algo, C.P. 64420, Monterrey, Nuevo Leon, Estados Unidos Mexicanos&quot;,<br />&nbsp; &quot;phone&quot;: &quot;&quot;,<br />&nbsp; &quot;cust_ref&quot;: &quot;&quot;,<br />&nbsp; &quot;comments&quot;: &quot;&quot;,<br />&nbsp; &quot;ship_via&quot;: &quot;1&quot;,<br />&nbsp; &quot;payment&quot;: &quot;5&quot;,<br />&nbsp; &quot;sales_type&quot;: &quot;1&quot;,<br />&nbsp; &quot;items&quot;: [<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &quot;stock_id&quot;: &quot;stock0001&quot;,&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &quot;description&quot;: &quot;TRANSPORTE MTY-LAREDO&quot;,<br />&nbsp; &nbsp; &nbsp; &quot;qty&quot;: &quot;1&quot;,<br />&nbsp; &nbsp; &nbsp; &quot;price&quot;: &quot;100&quot;,<br />&nbsp; &nbsp; &nbsp; &quot;discount&quot;: &quot;0&quot;<br />&nbsp; &nbsp; }<br />&nbsp; ]<br />}</p>]]></description>
			<author><![CDATA[null@example.com (andresamayadiaz)]]></author>
			<pubDate>Thu, 12 Sep 2013 22:15:42 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=17788#p17788</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=17787#p17787</link>
			<description><![CDATA[<p>Hi tm. Yes i noticed those bugs but i haven&#039;t got time to send it to github.com i probably will at the end of this week and let you know about those fixes. </p><p>There is also a bug on can_process:<br />/*if (!check_num(&#039;freight_cost&#039;, 0)) {<br />&nbsp; &nbsp; &nbsp;return array(&quot;passed&quot; =&gt; false, &quot;message&quot; =&gt; _(&quot;The shipping cost entered is expected to be numeric.&quot;));<br />&nbsp; &nbsp;}*/<br />This should be commented because check_num verifies POST variable and with the API freight_cost is not a required field.</p><p>Let me see if i can send you later a POST example of an invoice.</p>]]></description>
			<author><![CDATA[null@example.com (andresamayadiaz)]]></author>
			<pubDate>Thu, 12 Sep 2013 21:39:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=17787#p17787</guid>
		</item>
		<item>
			<title><![CDATA[Re: Simple REST API]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=17786#p17786</link>
			<description><![CDATA[<p>I&#039;m looking into importing sales data using this API, and I found the following errors in sales.inc:</p><p>On lines 220, 323 and 422 the string &#039;freight_cost&#039; should really be $info[&#039;freight_cost&#039;]<br />On lines 241 and 353 the test for ($can_process == false) should be ($can_process[&#039;passed&#039;] == false)</p><p>But I still don&#039;t seem to get any data whatsoever into the sales_add function. It&#039;s probably just me, but... Has anyone managed to POST data? In particular multi-dimensional arrays, such as required here. Just what format is the data expected to be in?</p>]]></description>
			<author><![CDATA[null@example.com (tm)]]></author>
			<pubDate>Thu, 12 Sep 2013 21:23:49 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=17786#p17786</guid>
		</item>
	</channel>
</rss>
