diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 2eb5f95d05e..3f3aa064030 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -386,7 +386,7 @@ class Shipments extends DolibarrApi * * @url DELETE {id}/lines/{lineid} * - * @return int + * @return array * * @throws RestException 401 * @throws RestException 404 @@ -410,7 +410,12 @@ class Shipments extends DolibarrApi $updateRes = $this->shipment->deleteLine(DolibarrApiAccess::$user, $lineid); if ($updateRes > 0) { - return $this->get($id); + return array( + 'success' => array( + 'code' => 200, + 'message' => 'line ' .$lineid. ' deleted' + ) + ); } else { throw new RestException(405, $this->shipment->error); }