DRAFT: 4.4 Working With Vendor Products Via API
URL: https://myIsoraURL/api/vendorproducts
Verb | Address | Notes | Additional Details |
---|---|---|---|
GET | /vendorproducts /vendorproducts?page=X &page_size=Y | Returns a count of vendor products along with a paginated list of all products, Y at a time (by default up to 25). Each array entry includes details about the product. | The beginning of each response includes a count and a link to the next page. Each entry in the list has a link to itself. |
GET | /vendorproducts?search=string &page_size=Y | Returns any vendor products matching the search string. |
|
GET | /vendorproducts/<product id> | Retrieves information about an individual vendor product. If an invalid id is given, a “Not found error is returned”. | If the id of the vendor product is unknown, it can be found by GETting an app that has the vendor product as its selected product. |
POST | /vendorproducts | Creates a new vendor product. The product is returned. | body { “name”: “string”, “vendor”: “string”, “vertical”: “<vertical id>”,* “description”: “string” } *To find an unknown vertical id, follow the same process as finding an unknown vendor id and GET an app that has the desired vertical. |
PUT | /vendorproducts/<product id> | Updates (replaces) an existing vendor product. Returns the updated vendor product. | body { “name”: “string”, “vendor”: “string”, “vertical”: “<vertical id>”, “description”: “string”* } *Optional, will not overwrite previous description with a blank field if left out |
PATCH | /vendorproducts/<product id> | Similar to PUT command, but allows you to update one (or more) part(s) of the product at a time instead of replacing the entire product. Returns the updated product. | Cannot PATCH a managed product. Must include the vendor field when PATCHing a product even if you do not wish to change the vendor name. Updates only the fields specified. ex.) { “vendor”: “string”, “vertical”: “<vertical id>” } |
DELETE | /vendorproducts/<product id> | Removes the product. No content is returned. | Cannot DELETE a managed product. |