Pinvoice / pipedrive-php-api

PHP API for Pipedrive. Currently supports READ-ONLY requests.
MIT License
6 stars 7 forks source link

Add Products #10

Closed melvinsh closed 9 years ago

melvinsh commented 10 years ago

Products are the goods or services you are dealing with. Each product can have N different price points - first, each Product can have a price in N different currencies, and secondly, each Product can have N variations of itself, each having N prices different currencies. Note that only one price per variation per currency is supported. Products can be instantiated to Deals. In the context of instatiation, a custom price, quantity, duration and discount can be applied.

GET Get all products/products GET Get one product/products/:id GET Get deals where a product is attached to/products/:id/deals POST Add a product/products PUT Update a product/products/:id DELETE Delete a product/products/:id

GET List files attached to a product/products/:id/files GET List permitted users/products/:id/permittedUsers GET Find products by name/products/find

ProductFields represent the near-complete schema for a Product in the context of the company of the authorized user. Each company can have a different schema for their Products, with various custom fields. In the context of using ProductFields as a schema for defining the data fields of a Product, it must be kept in mind that some types of custom fields can have additional data fields which are not separate ProductFields per se. Such is the case with monetary, daterange and timerange fields – each of these fields will have one additional data field in addition to the one presented in the context of ProductFields. For example, if there is a monetary field with the key 'ffk9s9' stored on the account, 'ffk9s9' would hold the numeric value of the field, and 'ffk9s9_currency' would hold the ISO currency code that goes along with the numeric value. To find out which data fields are available, fetch one Product and list its keys.

GET Get all product fields/productFields GET Get one product field/productFields/:id POST Add a new product field/productFields DELETE Delete a product field/productFields/:id DELETE Delete multiple product fields in bulk/productFields