Skip to content

Commit d2c371d

Browse files
authored
Perso API: reworks price and currency definition (#2261)
1 parent d7d353a commit d2c371d

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

docs/personalization/api_reference/content_api.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ An XML representation of the data object used for item import can look like this
7575
<!-- Version is mandatory and must always be set to 1 -->
7676
<item id="102" type="1">
7777
<description>the item's description</description>
78-
<price currency="EUR">122</price>
78+
<price currency="EUR">1234</price>
7979
<validfrom>2011-01-01T00:00:00</validfrom>
8080
<validto>2021-01-01T00:00:00</validto>
8181
<categorypaths>
@@ -115,7 +115,7 @@ The following keys and attributes used in the XML object are available:
115115
| `type` | An ID of the type of item/product. This parameter is required. | integer |
116116
| `description`| Additional information about the item. | alphanumeric |
117117
| `currency` | Currency used for the price. By default, prices are expressed in EUR. | ISO 4217 |
118-
| `price` | The item's price in the currency's fractional units (for example, cents).<br/>See below for more information. | integer |
118+
| `price` | The item's price in the currency's fractional units (for example, cents).<br/>[See below for more information.](#price-and-currency) | integer |
119119
| `validfrom` | Together with `validto`, defines the lifespan of an item.<br/>If NULL or not available, the item is considered valid immediately.<br/>See below for more information. | ISO 8601 |
120120
| `validto` | Together with `validfrom`, defines the lifespan of an item.<br/>If NULL or not available, the item is considered valid indefinitely.<br/>See below for more information. | ISO 8601 |
121121
| `categorypath` | A logical (website) navigation path through which the end user can reach the item/product in your website.<br/>You can define multiple paths for the product.| alphanumeric, separated with "/" ("%2F") characters |
@@ -125,11 +125,16 @@ The following keys and attributes used in the XML object are available:
125125
Keys and their values can only contain letters, digits and underscore characters.
126126
Attribute keys are case-sensitive.
127127

128-
##### Currency
128+
##### Price and currency
129129

130-
If the currency does not have a fractional unit, the main unit is used,
131-
for example 12 for 12 Japanese Yen.
132-
To check whether the currency has fractional units, see the [ISO 4217 standard](https://en.wikipedia.org/wiki/ISO_4217#cite_note-ReferenceA-6).
130+
The price is given as an integer in the fractional unit of the currency, which ends as removing the decimal separators.
131+
For example:
132+
133+
- 1234 for 12.34 Euro: `<price currency="EUR">1234</price>`
134+
- 12 for 12 Japanese Yen: `<price currency="JPY">12</price>`
135+
- 12345 for 12.345 Tunisian Dinar: `<price currency="TND">12345</price>`
136+
137+
To check how many digits the fractional unit of a currency has, see the [ISO 4217 standard](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
133138

134139
##### Validity
135140

0 commit comments

Comments
 (0)