API: Setting a Product's "active_flag" to False should deactivate a product instead of deleting it

Currently if you update a Product via its API (https://developers.pipedrive.com/docs/api/v1/#!/Products/put_productsid) and you set the "active_flag" property to False, it deletes the Product instead of setting it as "deactivated". In order to set it as "deactivated" you need to leave the "active_flag" property as True and instead set the "selectable" property to False. Note that the "selectable" property is not documented in the API.

I think this behavior is not clear in the documentation, especially when there is a completely separate endpoint for deleting Products: https://developers.pipedrive.com/docs/api/v1/#!/Products/delete_products_id.

The name "active_flag" implies that the Product is either activated or deactivated, not activated or deleted. For these reasons I suggest that setting the "active_flag" to False should simply deactivate the Product instead of deleting it. If someone wishes to delete it, they should use the DELETE endpoint.

0
0 votes

· Last Updated -

Comments

  • Inês Batata
    Inês Batata Admin Posts: 3,155 COMMUNITY MANAGER
    2500 Comments Second Anniversary 5 Likes First Answer
    edited February 24 #2

    Hi @Jean Pagan , we appreciate your feedback and I've made sure it reaches our team internally for consideration.

    Seeing as this is more of a technical part of Pipedrive and such a specific matter, I would also encourage you to post this in our dedicated Developers Community, which deals specifically with all things API and development - see this section. My colleague @David Lorbiecke is also there to help and moderate. 

  • Jean Pagan
    Jean Pagan Posts: 8
    edited August 2020 #3

    Hi @Jean Pagan , we appreciate your feedback and I've made sure it reaches our team internally for consideration.

    Seeing as this is more of a technical part of Pipedrive and such a specific matter, I would also encourage you to post this in our dedicated Developers Community, which deals specifically with all things API and development - see this section. My colleague @David Lorbiecke is also there to help and moderate. 

    Great. Thanks!