Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titlePIPEDRIVEgetDeal gets the Deal by using the provided ID.

PIPEDRIVEgetDeal is another example method of retrieving Deals in Pipedrive, this time querying for a specific Deal according to its ID in Pipedrive. At the end of main we invoke this example:

Code Block
languagelua
-- Get Deal using ID
P:getDeal{id=4, live=true}

PIPEDRIVEgetDeal is passed the client object and the table of defined parameters. Itcalls PIPEDRIVEcustom to with the required endpoint and parameters make the 'deal/{id}' API call.

Code Block
languagelua
local function PIPEDRIVEgetDeal(T, C)   
   return T:custom{api='deals/{id}',pathParams = {id=C.id},live=C.live}
end

return PIPEDRIVEgetDeal

Concepts used:

Thats it! You can easily extend the functionality based on your needs by creating new Pipedrive methods using their API documentation: https://developers.pipedrive.com/docs/api/v1.