Changes

Jump to navigation Jump to search
202 bytes added ,  14:55, 19 April 2016
Line 208: Line 208:  
=== Posting a new product ===
 
=== Posting a new product ===
 
* Product post to http://world.openfoodfacts.org/cgi/product_jqm2.pl <sup>(remember to do tests on world.openfoodfacts.net - login and password: off )</sup>
 
* Product post to http://world.openfoodfacts.org/cgi/product_jqm2.pl <sup>(remember to do tests on world.openfoodfacts.net - login and password: off )</sup>
 +
 +
* URL for your tests : <pre>http://world.openfoodfacts.net/cgi/product_jqm2.pl</pre>
 +
==== Quick overview ====
 
** var foodfact = { barcode : '3073780969000', name : 'KIRI GOUTER 280G 8 PORTIONS', energy: 500, energy_unit: "kJ", weight: 282 };
 
** var foodfact = { barcode : '3073780969000', name : 'KIRI GOUTER 280G 8 PORTIONS', energy: 500, energy_unit: "kJ", weight: 282 };
 
** var postData = {
 
** var postData = {
Line 221: Line 224:  
** {"status_verbose":"fields saved","status":1}
 
** {"status_verbose":"fields saved","status":1}
   −
<br>Example: <sup>(remember to do tests on world.openfoodfacts.net - login and password: off)</sup><br>
+
==== Example ====
 +
<sup>(remember to do tests on world.openfoodfacts.net - login and password: off)</sup><br>
 +
===== Query 1 =====
 +
<pre>http://world.openfoodfacts.net/cgi/product_jqm2.pl?code=072417136160&product_name=Maryland%20Choc%20Chip&quantity=230g&nutriment_energy=450&nutriment_energy_unit=kJ&nutrition_data_per=serving&ingredients_text=Fortified%20wheat%20flour%2C%20Chocolate%20chips%20%2825%25%29%2C%20Sugar%2C%20Palm%20oil%2C%20Golden%20syrup%2C%20Whey%20and%20whey%20derivatives%20%28Milk%29%2C%20Raising%20agents%2C%20Salt%2C%20Flavouring&traces=Milk%2C+Soya%2C+Nuts%2C+Wheat</pre>
 +
===== Result 2 =====
 +
<pre>http://uk.openfoodfacts.net/product/0072417136160/maryland-choc-chip</pre>
 +
 
 +
===== Query 2 =====
 
<pre>http://world.openfoodfacts.org/cgi/product_jqm2.pl?code=3073780969000&user_id=usernameexample&password=*****&product_name=KIRI%20GOUTER%20280G%208%20PORTIONS&quantity=282%20g&stores=Intermarch%C3%A9&nutriment_energy=500&nutriment_energy_unit=kJ&nutrition_data_per=serving</pre>
 
<pre>http://world.openfoodfacts.org/cgi/product_jqm2.pl?code=3073780969000&user_id=usernameexample&password=*****&product_name=KIRI%20GOUTER%20280G%208%20PORTIONS&quantity=282%20g&stores=Intermarch%C3%A9&nutriment_energy=500&nutriment_energy_unit=kJ&nutrition_data_per=serving</pre>
 +
===== Result 2 =====
 +
<pre></pre>
   −
<pre>http://uk.openfoodfacts.net/product/0072417136160/maryland-choc-chip</pre>
+
==== See editing a product for details on fields ====
<pre>http://world.openfoodfacts.net/cgi/product_jqm2.pl?code=072417136160&product_name=Maryland%20Choc%20Chip&quantity=230g&nutriment_energy=450&nutriment_energy_unit=kJ&nutrition_data_per=serving&ingredients_text=Fortified%20wheat%20flour%2C%20Chocolate%20chips%20%2825%25%29%2C%20Sugar%2C%20Palm%20oil%2C%20Golden%20syrup%2C%20Whey%20and%20whey%20derivatives%20%28Milk%29%2C%20Raising%20agents%2C%20Salt%2C%20Flavouring&traces=Milk%2C+Soya%2C+Nuts%2C+Wheat</pre>
  −
<pre>http://world.openfoodfacts.net/cgi/product_jqm2.pl</pre>
  −
 
      
=== Editing an existing product ===
 
=== Editing an existing product ===

Navigation menu