IsraelOrtuno / pipedrive

Complete Pipedrive API client for PHP
MIT License
166 stars 58 forks source link

How to update the stage of a deal? #92

Closed techguydev closed 3 years ago

techguydev commented 3 years ago

Hi,

I would like to update the stage of a deal.

Not clear how to do it according with the docs.

Thanks

IsraelOrtuno commented 3 years ago

Every endpoint has a mapped method, but since we use inheritance for this, it's quite tricky to be documenting all endpoints.

https://developers.pipedrive.com/docs/api/v1/#!/Deals/put_deals_id

This endpoint accepts a stage_id, so this should work:

$pipedrive->deals->update($dealId, ['stage_id' => $stageId]);

Deals extends Resource: https://github.com/IsraelOrtuno/pipedrive/blob/master/src/Resources/Basics/Resource.php#L85-L90