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

Jump to navigation Jump to search
m
m (inserted link to Dolibarrpy and put year numbers after all 3 modules with the latest release.)
Tag: 2017 source edit
Line 401: Line 401:
"email" => "customer company email",
"email" => "customer company email",
"client" => "1",
"client" => "1",
"code_client" => "-1"
"code_client" => "auto"
];
];
$newClientResult = CallAPI("POST", $apiKey, $apiUrl."thirdparties", json_encode($newClient));
$newClientResult = CallAPI("POST", $apiKey, $apiUrl."thirdparties", json_encode($newClient));
Line 407: Line 407:
$clientDoliId = $newClientResult;
$clientDoliId = $newClientResult;
</syntaxhighlight>
</syntaxhighlight>
Comments :


*client => 1 He is a customer (not a supplier)
Comments:
*code_client => -1 so the customer code will be generated automatically.
*client => 1, he is a customer.
*code_client => 'auto' so the customer code will be generated automatically.
*we get the customer ID in $clientDoliId
*we get the customer ID in $clientDoliId


Navigation menu