IsraelOrtuno / pipedrive

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

Any update on Leads & Subscription Endpoint? #86

Closed manshu closed 2 years ago

manshu commented 4 years ago

I was checking the API and found no resource for both the endpoints. Any plan on that yet?

IsraelOrtuno commented 4 years ago

Probably new endpoints, could you share the links?

manshu commented 4 years ago

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

That's for leads. I can't seem to find Subscriptions yet.

IsraelOrtuno commented 4 years ago

Just got an email from Pipedrive itself, will implement it ASAP:

Hi Israel,

My name is Elina and I'm a Technical Writer in Pipedrive. I'm writing to let you know that we have released the support for Leads API with 11 new endpoints:

GET /leads GET /leads/{id} GET /leadLabels GET /leadLabels/{id} GET /leadSources POST /leads POST /leadLabels DELETE /leads/{id} DELETE /leadLabels/{id} PATCH /leads/{id} PATCH /leadLabels/{id}

It'd be great if you could consider adding the support of those endpoints also to your public PHP client for Pipedrive API.

For any questions related to the new endpoints or how to work with them, I've also added our Lead Engineer for Leads, Jakub Kadlubiec, as a cc to this email. Don't hesitate to contact us if you have any questions or concerns.

iammichiel commented 4 years ago

Perhaps, Pipedrive itself could sponsor the work? 🤔

IsraelOrtuno commented 3 years ago

Will add subscriptions before the end of the week too

felixjunghans commented 3 years ago

Hi @IsraelOrtuno are there any updates regarding subscriptions?

kg-bot commented 3 years ago

Hi @IsraelOrtuno, when trying to add new lead I always get error Devio/Pipedrive/Exceptions/PipedriveException with message 'expected request body to be sent with application/json content-type', looks like that we can't use form_params as POST request but instead use json for this endpoint?

IsraelOrtuno commented 3 years ago

@kg-bot could you update this file in your vendor by adding a third parameter: https://github.com/IsraelOrtuno/pipedrive/blob/master/src/Resources/Basics/Resource.php#L75

return $this->request->post('', $values, ['headers' => ['content-type' => 'application/json']]);

And let me know if this works? I could quickly fix then!

kg-bot commented 3 years ago

@IsraelOrtuno still does not work. I think issue is on this line https://github.com/IsraelOrtuno/pipedrive/blob/master/src/Http/PipedriveClient.php#L102

I've tried changing this to json and it worked.

IsraelOrtuno commented 3 years ago

Mmm not sure if this may be a breaking change for other endpoints

kg-bot commented 3 years ago

Let's try some other endpoint that is working with form_params right now, shall we :smile:

kg-bot commented 3 years ago

Ok, my project does creation of organisation, person and lead, first two where working with form_params and they also work with json change, last one is only working with json.

kg-bot commented 3 years ago

Any update on this @IsraelOrtuno?

IsraelOrtuno commented 3 years ago

@kg-bot PR #101 will fix the issue

kg-bot commented 3 years ago

Perfect, thanks.

simensen commented 3 years ago

101 was merged, but unclear what more needs to be done for subscriptions. It's possible I can help with that if I had more detail on what still needs to be done.

mikebastarache commented 3 years ago

I was wondering if there has been any head way in the new Subscription end points? I haven't been able to locate them in the Master branch.