get-private-products.rst (2179B)
1 .. http:get:: [/instances/$INSTANCE]/private/products 2 3 This is used to return the list of all items in the inventory. 4 5 **Required permission:** ``products-read`` 6 7 **Request:** 8 9 :query limit: *Optional*. At most return the given number of results. Negative for descending by row ID, positive for ascending by row ID. Default is ``20``. Since protocol **v12**. 10 :query offset: *Optional*. Starting ``product_serial_id`` for an iteration. Since protocol **v12**. 11 :query category_filter: *Optional*. Only returns products that are in a category where the category name contains the given text as a substring. Matching is case-insensitive. Since protocol **v23**. 12 :query name_filter: *Optional*. Only returns products where the product name contains the given text as a substring. Matching is case-insensitive. Since protocol **v23**. 13 :query description_filter: *Optional*. Only returns products where the product description contains the given text as a substring. Matching is case-insensitive. Since protocol **v23**. 14 :query product_group_serial: *Optional*. Only returns products where the product group serial matches the given value. Since protocol **v25**. 15 16 **Response:** 17 18 :http:statuscode:`200 OK`: 19 The backend has successfully returned the inventory. Returns 20 a `InventorySummaryResponse`. 21 :http:statuscode:`401 Unauthorized`: 22 The request is unauthorized. 23 :http:statuscode:`404 Not found`: 24 The backend has does not know about the instance. 25 :http:statuscode:`500 Internal Server Error`: 26 The server experienced an internal failure. 27 Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED``. 28 29 **Details:** 30 31 .. ts:def:: InventorySummaryResponse 32 33 interface InventorySummaryResponse { 34 // List of products that are present in the inventory. 35 products: InventoryEntry[]; 36 } 37 38 The `InventoryEntry` object describes an item in the inventory. It has the following structure: 39 40 .. ts:def:: InventoryEntry 41 42 interface InventoryEntry { 43 // Product identifier, as found in the product. 44 product_id: string; 45 46 // ``product_serial_id`` of the product in the database. 47 product_serial: Integer; 48 49 }