commit 3c4c2cebea13dad21f346107c7fb0057cb7aa5ac
parent 2dd53f5cae7febc7028657de64a39324fbe7a0af
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 31 Jan 2026 14:24:36 +0100
restructure API order, no actual change
Diffstat:
| M | core/api-merchant.rst | | | 368 | ++++++++++++++++++++++++++++++++++++++++--------------------------------------- |
1 file changed, 186 insertions(+), 182 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst
@@ -2956,6 +2956,7 @@ Managing measurement units
:http:statuscode:`404 Not found`:
The unit is unknown to the backend.
+
.. http:post:: [/instances/$INSTANCE]/private/units
Create a custom measurement unit or reactivate a previously disabled one.
@@ -3001,6 +3002,7 @@ Managing measurement units
unit_active?: boolean;
}
+
.. http:patch:: [/instances/$INSTANCE]/private/units/$UNIT
Update attributes of a measurement unit.
@@ -3049,6 +3051,7 @@ Managing measurement units
Fractional precision is capped at six decimal places. Disabling
``unit_allow_fraction`` forces ``unit_precision_level`` to zero.
+
.. http:delete:: [/instances/$INSTANCE]/private/units/$UNIT
Remove a custom unit from an instance.
@@ -3224,8 +3227,8 @@ Managing product categories
The category was possibly already deleted or is unknown.
-Adding products to the inventory
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Managing products in the inventory
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. http:post:: [/instances/$INSTANCE]/private/products
@@ -3508,8 +3511,6 @@ Adding products to the inventory
The same compatibility rules for the ``unit_*`` fields and their deprecated counterparts apply
when patching an existing product.
-Inspecting inventory
-^^^^^^^^^^^^^^^^^^^^
.. http:get:: [/instances/$INSTANCE]/private/products
@@ -3657,6 +3658,28 @@ Inspecting inventory
}
+
+.. http:delete:: [/instances/$INSTANCE]/private/products/$PRODUCT_ID
+
+ Delete information about a product. Fails if the product is locked by
+ anyone.
+
+ **Required permission:** ``products-write``
+
+ **Response:**
+
+ :http:statuscode:`204 No content`:
+ The backend has successfully deleted the product.
+ :http:statuscode:`404 Not found`:
+ The backend does not know the instance or the product.
+ :http:statuscode:`409 Conflict`:
+ The backend refuses to delete the product because it is locked.
+
+
+
+Providing configuration data for point-of-sale terminals
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
.. http:get:: [/instances/$INSTANCE]/private/pos
This is used to return the point-of-sale (POS) configuration with full details on all items in the inventory.
@@ -3857,184 +3880,6 @@ Reserving inventory
to generate such timeflakes for clients written in C.
-Removing products from inventory
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-.. http:delete:: [/instances/$INSTANCE]/private/products/$PRODUCT_ID
-
- Delete information about a product. Fails if the product is locked by
- anyone.
-
- **Required permission:** ``products-write``
-
- **Response:**
-
- :http:statuscode:`204 No content`:
- The backend has successfully deleted the product.
- :http:statuscode:`404 Not found`:
- The backend does not know the instance or the product.
- :http:statuscode:`409 Conflict`:
- The backend refuses to delete the product because it is locked.
-
-
-
---------------
-Product groups
---------------
-
-Product groups are used to manage taxes. Each product is in
-exactly one group and that group is typically used to determine
-the applicable tax rules. Products that are not assigned explicitly
-to a group are considered to be in the *default* product group.
-
-Product groups are different from categories as a product can be
-in multiple categories. Furthermore, categories are used to make
-it easier to find products in user interfaces, while product
-groups are used to make it easier to manage taxes.
-
-Since protocol **v25**.
-
-Adding groups
-^^^^^^^^^^^^^
-
-.. http:post:: [/instances/$INSTANCES]/private/groups
-
- This is used to create a group.
-
- **Required permission:** ``groups-write``
-
- **Request:**
-
- The request must be a `GroupAddRequest`.
-
- **Response:**
-
- :http:statuscode:`200 OK`:
- The backend has successfully added a new group. Returns a `GroupAddedResponse`.
-
- :http:statuscode:`404 Not found`:
- The merchant instance is unknown.
-
- **Details:**
-
- .. ts:def:: GroupAddRequest
-
- interface GroupAddRequest {
-
- // Unique name for the group (unique per instance).
- group_name: string;
-
- // Description of the group.
- description: string;
-
- }
-
- .. ts:def:: GroupAddedResponse
-
- interface GroupAddedResponse {
-
- // Unique ID for the group.
- group_serial_id: Integer;
-
- }
-
-
-Editing groups
-^^^^^^^^^^^^^^
-
-.. http:patch:: [/instances/$INSTANCES]/private/groups/$GROUP_ID
-
- This is used to update a group.
-
- **Required permission:** ``groups-write``
-
- **Request:**
-
- The request body must be a `GroupAddRequest`.
-
- **Response:**
-
- :http:statuscode:`204 No content`:
- The group has successfully modified.
- :http:statuscode:`404 Not found`:
- The group or instance is unknown to the backend.
- :http:statuscode:`409 Conflict`:
- The specified group name is already in use.
-
-
-Inspecting groups
-^^^^^^^^^^^^^^^^^
-
-.. http:get:: [/instances/$INSTANCES]/private/groups
-
- This is used to return all the groups
- that are present in our backend.
-
- **Required permission:** ``groups-read``
-
- **Request:**
-
- :query limit: *Optional.*
- At most return the given number of results. Negative for descending by ``serial``, positive for ascending by ``serial``. Defaults to ``-20``.
- :query offset: *Optional.*
- Starting ``serial`` for :ref:`pagination <row-id-pagination>`.
-
- **Response:**
-
- :http:statuscode:`200 OK`:
- The backend has successfully returned all the groups.
- Returns a `GroupsSummaryResponse`.
-
- :http:statuscode:`404 Not found`:
- The backend has does not know about the instance.
-
- **Details:**
-
- .. ts:def:: GroupsSummaryResponse
-
- interface GroupsSummaryResponse {
-
- // Return groups that are present in our backend.
- groups: GroupEntry[];
-
- }
-
- The `GroupEntry` object describes a group.
- It has the following structure:
-
- .. ts:def:: GroupEntry
-
- interface GroupEntry {
-
- // Group identifier
- group_serial: Integer;
-
- // Unique name for the group (unique per instance).
- group_name: string;
-
- // Description for the group.
- description: string;
-
- }
-
-
-Removing groups
-^^^^^^^^^^^^^^^
-
-.. http:delete:: [/instances/$INSTANCES]/private/groups/$GROUP_SERIAL
-
- This is used to delete information about a group.
-
- **Required permission:** ``groups-write``
-
- **Response:**
-
- :http:statuscode:`204 No content`:
- The backend has successfully deleted the group.
-
- :http:statuscode:`404 Not found`:
- The group or the instance is unknown to the backend.
-
------------------
Payment processing
@@ -6610,6 +6455,165 @@ Removing scheduled reports
+--------------
+Product groups
+--------------
+
+Product groups are used to manage taxes. Each product is in
+exactly one group and that group is typically used to determine
+the applicable tax rules. Products that are not assigned explicitly
+to a group are considered to be in the *default* product group.
+
+Product groups are different from categories as a product can be
+in multiple categories. Furthermore, categories are used to make
+it easier to find products in user interfaces, while product
+groups are used to make it easier to manage taxes.
+
+Since protocol **v25**.
+
+Adding groups
+^^^^^^^^^^^^^
+
+.. http:post:: [/instances/$INSTANCES]/private/groups
+
+ This is used to create a group.
+
+ **Required permission:** ``groups-write``
+
+ **Request:**
+
+ The request must be a `GroupAddRequest`.
+
+ **Response:**
+
+ :http:statuscode:`200 OK`:
+ The backend has successfully added a new group. Returns a `GroupAddedResponse`.
+
+ :http:statuscode:`404 Not found`:
+ The merchant instance is unknown.
+
+ **Details:**
+
+ .. ts:def:: GroupAddRequest
+
+ interface GroupAddRequest {
+
+ // Unique name for the group (unique per instance).
+ group_name: string;
+
+ // Description of the group.
+ description: string;
+
+ }
+
+ .. ts:def:: GroupAddedResponse
+
+ interface GroupAddedResponse {
+
+ // Unique ID for the group.
+ group_serial_id: Integer;
+
+ }
+
+
+Editing groups
+^^^^^^^^^^^^^^
+
+.. http:patch:: [/instances/$INSTANCES]/private/groups/$GROUP_ID
+
+ This is used to update a group.
+
+ **Required permission:** ``groups-write``
+
+ **Request:**
+
+ The request body must be a `GroupAddRequest`.
+
+ **Response:**
+
+ :http:statuscode:`204 No content`:
+ The group has successfully modified.
+ :http:statuscode:`404 Not found`:
+ The group or instance is unknown to the backend.
+ :http:statuscode:`409 Conflict`:
+ The specified group name is already in use.
+
+
+Inspecting groups
+^^^^^^^^^^^^^^^^^
+
+.. http:get:: [/instances/$INSTANCES]/private/groups
+
+ This is used to return all the groups
+ that are present in our backend.
+
+ **Required permission:** ``groups-read``
+
+ **Request:**
+
+ :query limit: *Optional.*
+ At most return the given number of results. Negative for descending by ``serial``, positive for ascending by ``serial``. Defaults to ``-20``.
+ :query offset: *Optional.*
+ Starting ``serial`` for :ref:`pagination <row-id-pagination>`.
+
+ **Response:**
+
+ :http:statuscode:`200 OK`:
+ The backend has successfully returned all the groups.
+ Returns a `GroupsSummaryResponse`.
+
+ :http:statuscode:`404 Not found`:
+ The backend has does not know about the instance.
+
+ **Details:**
+
+ .. ts:def:: GroupsSummaryResponse
+
+ interface GroupsSummaryResponse {
+
+ // Return groups that are present in our backend.
+ groups: GroupEntry[];
+
+ }
+
+ The `GroupEntry` object describes a group.
+ It has the following structure:
+
+ .. ts:def:: GroupEntry
+
+ interface GroupEntry {
+
+ // Group identifier
+ group_serial: Integer;
+
+ // Unique name for the group (unique per instance).
+ group_name: string;
+
+ // Description for the group.
+ description: string;
+
+ }
+
+
+Removing groups
+^^^^^^^^^^^^^^^
+
+.. http:delete:: [/instances/$INSTANCES]/private/groups/$GROUP_SERIAL
+
+ This is used to delete information about a group.
+
+ **Required permission:** ``groups-write``
+
+ **Response:**
+
+ :http:statuscode:`204 No content`:
+ The backend has successfully deleted the group.
+
+ :http:statuscode:`404 Not found`:
+ The group or the instance is unknown to the backend.
+
+
+
----
Pots
----