Module Web Services API REST (developer): Difference between revisions

Jump to navigation Jump to search
→‎Examples: warning about non-working example
mNo edit summary
Tag: 2017 source edit
(→‎Examples: warning about non-working example)
Line 117: Line 117:
* $data : string, datas in json format. This parameter is not mandatory.
* $data : string, datas in json format. This parameter is not mandatory.


= Examples =
= Examples with PHP =


This is more examples, for different uses cases:
This is more examples, for different uses cases:
Line 193: Line 193:
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.
* I choose this method to do less API calls when I have to import 500 orders. I just need to retrieve the products list once at the beginning instead of searching Dolibarr each time.


Warning: The example below is not working properly. Creating an order and lines in one go is not supported. Instead you have to create an order first and with the returned order id add the lines using the /orders/{id}/lines endpoint.


<source lang="php">
<source lang="php">
53

edits

Navigation menu