dolibarr 21.0.0-beta
server_productorservice.php File Reference

File that is entry point to call Dolibarr WebServices. More...

Go to the source code of this file.

Functions

 getProductOrService ($authentication, $id=0, $ref='', $ref_ext='', $lang='')
 Get produt or service.
 
 createProductOrService ($authentication, $product)
 Create an invoice.
 
 updateProductOrService ($authentication, $product)
 Update a product or service.
 
 deleteProductOrService ($authentication, $listofidstring)
 Delete a product or service.
 
 getListOfProductsOrServices ($authentication, $filterproduct)
 getListOfProductsOrServices
 
 getProductsForCategory ($authentication, $id, $lang='')
 Get list of products for a category.
 

Detailed Description

File that is entry point to call Dolibarr WebServices.

Definition in file server_productorservice.php.

Function Documentation

◆ createProductOrService()

createProductOrService ( $authentication,
$product )

Create an invoice.

Parameters
array{login:string,password:string,entity:?int,dolibarrkey:string}$authentication Array of authentication information
array{id:string,ref:string,ref_ext:string,type:string,label:string,description:string,date_creation:string,date_modification:string,note:string,status_tobuy:string,status_tosell:string,barcode:string,barcode_type:string,country_id:string,country_code:string,customcode:string,price_net:string,price:string,price_min_net:string,price_min:string,price_base_type:string,vat_rate:string,vat_npr:string,localtax1_tx:string,localtax2_tx:string,stock_alert:string,stock_real:string,stock_pmp:string,warehouse_ref:string,canvas:string,import_key:string,dir:string,images:array<array{photo:string,photo_vignette:string,imgWidth:string,imgHeight:string}>}$product Product
Returns
array{result:array{result_code:string,result_label:string}} Array result

Definition at line 509 of file server_productorservice.php.

References $conf, check_authentication(), dol_now(), dol_syslog(), and getCountry().

◆ deleteProductOrService()

deleteProductOrService ( $authentication,
$listofidstring )

Delete a product or service.

Parameters
array{login:string,password:string,entity:?int,dolibarrkey:string}$authentication Array of authentication information
string$listofidstringList of id with comma
Returns
array{result:array{result_code:string,result_label:string}} Array result

Definition at line 842 of file server_productorservice.php.

References $conf, $id, check_authentication(), and dol_syslog().

◆ getListOfProductsOrServices()

getListOfProductsOrServices ( $authentication,
$filterproduct )

getListOfProductsOrServices

Parameters
array{login:string,password:string,entity:?int,dolibarrkey:string}$authentication Array of authentication information
array<string,mixed>$filterproduct Filter fields
Returns
array{result:array{result_code:string,result_label:string}} Array result

Definition at line 929 of file server_productorservice.php.

References $conf, check_authentication(), and dol_syslog().

◆ getProductOrService()

getProductOrService ( $authentication,
$id = 0,
$ref = '',
$ref_ext = '',
$lang = '' )

Get produt or service.

Parameters
array{login:string,password:string,entity:?int,dolibarrkey:string}$authentication Array of authentication information
int$idId of object
string$refRef of object
string$ref_extRef external of object
string$langLang to force
Returns
array{product?:mixed[],result:array{result_code:string,result_label:string}} Array result

French VAT NPR

Spanish local taxes

Definition at line 369 of file server_productorservice.php.

References $conf, $id, check_authentication(), dol_print_date(), dol_syslog(), get_exdir(), and getDolGlobalString().

◆ getProductsForCategory()

getProductsForCategory ( $authentication,
$id,
$lang = '' )

Get list of products for a category.

Parameters
array{login:string,password:string,entity:?int,dolibarrkey:string}$authentication Array of authentication information
int$idCategory id
string$langForce lang
Returns
array{result:array{result_code:string,result_label:string}} Array result

Definition at line 1004 of file server_productorservice.php.

References $conf, $id, check_authentication(), dol_print_date(), dol_syslog(), get_exdir(), and getDolGlobalString().

◆ updateProductOrService()

updateProductOrService ( $authentication,
$product )

Update a product or service.

Parameters
array{login:string,password:string,entity:?int,dolibarrkey:string}$authentication Array of authentication information
array{id:string,ref:string,ref_ext:string,type:string,label:string,description:string,date_creation:string,date_modification:string,note:string,status_tobuy:string,status_tosell:string,barcode:string,barcode_type:string,country_id:string,country_code:string,customcode:string,price_net:string,price:string,price_min_net:string,price_min:string,price_base_type:string,vat_rate:string,vat_npr:string,localtax1_tx:string,localtax2_tx:string,stock_alert:string,stock_real:string,stock_pmp:string,warehouse_ref:string,canvas:string,import_key:string,dir:string,images:array<array{photo:string,photo_vignette:string,imgWidth:string,imgHeight:string}>}$product Product
Returns
array{result:array{result_code:string,result_label:string}} Array result

Definition at line 675 of file server_productorservice.php.

References $conf, check_authentication(), dol_now(), dol_syslog(), and getCountry().