taler-docs

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

get-private-pos.rst (3202B)


      1 .. http:get:: [/instances/$INSTANCE]/private/pos
      2 
      3   This is used to return the point-of-sale (POS) configuration with full details on all items in the inventory.
      4 
      5   Endpoint was introduced in protocol **v15**.
      6 
      7   **Required permission:** ``products-read``
      8 
      9   **Response:**
     10 
     11   :http:statuscode:`200 OK`:
     12     The backend has successfully returned the inventory. Returns
     13     a `FullInventoryDetailsResponse`.
     14   :http:statuscode:`404 Not found`:
     15     The backend has does not know about the instance.
     16 
     17   **Details:**
     18 
     19   .. ts:def:: FullInventoryDetailsResponse
     20 
     21     interface FullInventoryDetailsResponse {
     22 
     23       // List of products that are present in the inventory.
     24       products: MerchantPosProductDetail[];
     25 
     26       // List of categories in the inventory.
     27       categories: MerchantCategory[];
     28 
     29     }
     30 
     31   .. ts:def:: MerchantPosProductDetail
     32 
     33     interface MerchantPosProductDetail {
     34 
     35       // A unique numeric ID of the product
     36       product_serial: Integer;
     37 
     38       // A merchant-internal unique identifier for the product.
     39       product_id: string;
     40 
     41       // Human-readable product name.
     42       // Since API version **v20**.
     43       product_name: string;
     44 
     45       // A list of category IDs this product belongs to.
     46       // Typically, a product only belongs to one category, but more than one is supported.
     47       categories: Integer[];
     48 
     49       // Human-readable product description.
     50       description: string;
     51 
     52       // Map from IETF BCP 47 language tags to localized descriptions.
     53       description_i18n: { [lang_tag: string]: string };
     54 
     55       // Unit in which the product is measured (liters, kilograms, packages, etc.).
     56       unit: string;
     57 
     58       // Does the backend allow fractional quantities for this unit?
     59       unit_allow_fraction: boolean;
     60 
     61       // Maximum fractional precision (0-6) enforced for inventory operations.
     62       unit_precision_level: Integer;
     63 
     64       // Price tiers for this product. The first entry represents the base price and MUST include
     65       // applicable taxes. Zero implies the product is not sold separately or that the price is not
     66       // fixed, and must be supplied by the front-end.
     67       unit_price: Amount[];
     68 
     69       // Legacy price field kept for compatibility. Deprecated; equal to the first element of ``unit_price``.
     70       price: Amount;
     71 
     72       // An optional base64-encoded product image.
     73       image?: ImageDataUrl;
     74 
     75       // A list of taxes paid by the merchant for one unit of this product.
     76       taxes?: Tax[];
     77 
     78       // Legacy integer stock counter kept for compatibility. ``-1`` indicates unlimited stock.
     79       total_stock?: Integer;
     80 
     81       // Stock expressed using "<integer>[.<fraction>]" syntax with up to six fractional digits.
     82       // Use ``"-1"`` for unlimited stock.
     83       unit_total_stock: string;
     84 
     85       // Minimum age buyer must have (in years).
     86       minimum_age?: Integer;
     87 
     88     }
     89 
     90   .. ts:def:: MerchantCategory
     91 
     92     interface MerchantCategory {
     93       // A unique numeric ID of the category
     94       id: Integer;
     95 
     96       // The name of the category. This will be shown to users and used in the order summary.
     97       name: string;
     98 
     99       // Map from IETF BCP 47 language tags to localized names
    100       name_i18n?: { [lang_tag: string]: string };
    101     }