Get all products
GET {{baseUrl}}/products?user_id=<integer>&filter_id=<integer>&ids=<integer>&ids=<integer>&first_char=<string>&get_summary=<boolean>&start=0&limit=<integer>
Returns data about all products.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
user_id | string | If supplied, only products owned by the given user will be returned | |
filter_id | string | The ID of the filter to use | |
ids | string | An array of integers with the IDs of the products that should be returned in the response | |
ids | string | An array of integers with the IDs of the products that should be returned in the response | |
first_char | string | If supplied, only products whose name starts with the specified letter will be returned (case-insensitive) | |
get_summary | string | If supplied, the response will return the total numbers of products in the additional_data.summary.total_count property | |
start | number | Pagination start | |
limit | string | Items shown per page |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"success":true,"data":[{"id":1,"name":"Mechanical Pencil","code":"MPENCIL","description":null,"unit":"","tax":0,"category":null,"active_flag":true,"selectable":true,"first_char":"m","visible_to":"3","owner_id":{"id":10100010,"name":"Test User","email":"example@test.com","has_pic":true,"pic_hash":"5df5332929fab76702207f38b29a5d88","active_flag":true,"value":10100010},"files_count":null,"add_time":"2019-12-19 11:36:49","update_time":"2019-12-19 11:36:49","billing_frequency":"weekly","billing_frequency_cycles":null,"prices":[{"id":1,"product_id":1,"price":5,"currency":"EUR","cost":2,"overhead_cost":3,"notes":"this is a note"}]}],"additional_data":{"pagination":{"start":0,"limit":50,"next_start":25,"more_items_in_collection":true},"summary":{"total_count":"35"}},"related_objects":{"user":{"10100010":{"id":10100010,"name":"Test User","email":"example@test.com","has_pic":true,"pic_hash":"5df5332929fab76702207f38b29a5d88","active_flag":true}}}}