taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

get-private-products.rst (1955B)


      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:`404 Not found`:
     22     The backend has does not know about the instance.
     23 
     24   **Details:**
     25 
     26   .. ts:def:: InventorySummaryResponse
     27 
     28     interface InventorySummaryResponse {
     29       // List of products that are present in the inventory.
     30       products: InventoryEntry[];
     31     }
     32 
     33   The `InventoryEntry` object describes an item in the inventory. It has the following structure:
     34 
     35   .. ts:def:: InventoryEntry
     36 
     37     interface InventoryEntry {
     38       // Product identifier, as found in the product.
     39       product_id: string;
     40 
     41       // ``product_serial_id`` of the product in the database.
     42       product_serial: Integer;
     43 
     44     }