commit d711e37bab9aba079931780c975f252cea71fcbc
parent 4b9341f99484d28dbd8e82323d5d468a4237fb5e
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Sun, 2 Nov 2025 23:31:14 +0100
small update to 072
Diffstat:
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/design-documents/072-products-units.rst b/design-documents/072-products-units.rst
@@ -69,7 +69,7 @@ Proposed Solution
Return the catalogue for the current instance.
:http:statuscode:`200 OK`:
- The response body is a :ts:ref:`MerchantUnitsResponse`.
+ The response body is a ``MerchantUnitsResponse``.
**Details:**
@@ -121,7 +121,7 @@ Proposed Solution
Return a single unit definition.
:http:statuscode:`200 OK`:
- The response body is a :ts:ref:`MerchantUnit`.
+ The response body is a ``MerchantUnit``.
:http:statuscode:`404 Not Found`:
The identifier is unknown or belongs to a deleted record.
@@ -132,7 +132,7 @@ Proposed Solution
:http:statuscode:`204 No Content`:
The unit was created successfully.
- **Request body:** :ts:ref:`MerchantUnitCreateRequest`
+ **Request body:** ``MerchantUnitCreateRequest``
**Details:**
@@ -141,16 +141,16 @@ Proposed Solution
interface MerchantUnitCreateRequest {
unit: string;
unit_name_long: string;
- //defaults to null
- unit_name_long_i18n?: InternationalizedString ;
+ // Optional translations for the long label (defaults to null).
+ unit_name_long_i18n?: InternationalizedString | null;
unit_name_short: string;
- //defaults to null
- unit_name_short_i18n?: InternationalizedString;
- //defaults to false
+ // Optional translations for the short label (defaults to null).
+ unit_name_short_i18n?: InternationalizedString | null;
+ // Defaults to false.
unit_allow_fraction?: boolean;
- //defaults to 0, ignored when unit_allow_fraction is false
+ // Defaults to 0 (ignored when unit_allow_fraction is false).
unit_precision_level?: number;
- //defaults to true
+ // Defaults to true.
unit_active?: boolean;
}
@@ -163,7 +163,7 @@ Proposed Solution
:http:statuscode:`409 Conflict`:
Attempted to modify immutable fields on a built-in unit.
- **Request body:** :ts:ref:`MerchantUnitPatchRequest`
+ **Request body:** ``MerchantUnitPatchRequest``
**Details:**
@@ -418,9 +418,10 @@ Proposed Solution
Older clients may still submit arbitrary ``unit`` strings in API requests. The
backend accepts those values by treating them as custom units with
- ``unit_allow_fraction`` = false and ``unit_precision_level`` = 0.
- The merchant SPA limits merchant to the drop-down populated via
- ``GET /private/units`` so newly created products stay consistent.
+ ``unit_allow_fraction`` = false and ``unit_precision_level`` = 0. The merchant
+ SPA limits merchants to the drop-down populated via ``GET /private/units`` so
+ newly created products stay consistent. This fallback path is considered
+ deprecated; clients SHOULD obtain unit strings from the catalogue.
7. **Quantity presentation in wallets and orders**