Skip to content

Commit 785c84a

Browse files
committed
Updated API from documentation release
1 parent f94e106 commit 785c84a

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"categoryOrderHints": {
3-
"7bcd33e6-c1c7-4b96-8d70-9b9b18b19b70": "0.992"
4-
}
2+
"1d20faef-e8e1-44f4-b1b9-3a25b68fd266": "0.1234",
3+
"ed9556d2-203f-4c80-840d-79305f341ba8": "0.5678"
54
}
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{
22
"cd724bd4-52fa-4d6d-b4b0-bb1560d70475": {
3+
"id": "f64af276-a1ad-4eea-a8bc-89c453742a40",
4+
"version": 3,
35
"isOnStock": true,
46
"restockableInDays": 10,
5-
"availableQuantity": 20,
6-
"version": 1,
7-
"id": "f64af276-a1ad-4eea-a8bc-89c453742a40"
7+
"availableQuantity": 20
8+
},
9+
"f73fa437-e244-4d6f-8723-52b447427e0b": {
10+
"id": "beaa0b68-562b-4866-a42b-e61baf1043d1",
11+
"version": 5,
12+
"isOnStock": true,
13+
"restockableInDays": 5,
14+
"availableQuantity": 12
815
}
916
}

api-specs/api/types/product/CategoryOrderHints.raml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ type: object
66
key: string
77
value: string
88
description: |-
9-
JSON object where the key is a [Category](ctp:api:type:Category) `id` and the value is an order hint.
10-
Allows controlling the order of Products and how they appear in Categories. Products with no order hint have an order score below `0`. Order hints are non-unique.
11-
If a subset of Products have the same value for order hint in a specific category, the behavior is undetermined.
9+
JSON object where the keys are [Category](ctp:api:type:Category) `id`, and the values are order hint values: strings representing a number between `0` and `1`, but not ending in `0`. Order hints allow controlling the order of Products and how they appear in Categories. Products without order hints have an order score below `0`. Order hints are not unique. If a subset of Products have the same value for order hint in a specific category, the behavior is undetermined.
1210
example: !include ../../examples/Product/CategoryOrderHints.json
1311
properties:
1412
#prettier-ignore
15-
/[0-9].[0-9]*[1-9]/:
13+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/:
1614
type: string
1715
description: |-
18-
A string representing a number between 0 and 1 that must start with `0.` and cannot end with `0`.
16+
A string representing a number between `0` and `1`, but not ending in `0`.
17+
pattern: ^0\.[0-9]*[1-9]$

api-specs/api/types/product/ProductVariantChannelAvailabilityMap.raml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ type: object
66
key: string
77
value: ProductVariantChannelAvailability
88
description: |
9-
JSON object where the key is a supply [Channel](ctp:api:type:Channel) `id` and the value is the [ProductVariantChannelAvailability](ctp:api:type:ProductVariantChannelAvailability) of the [InventoryEntry](ctp:api:type:InventoryEntry).
9+
JSON object where the keys are supply [Channel](/projects/channels) `id`, and the values are [ProductVariantChannelAvailability](/projects/products#productvariantchannelavailability).
1010
example: !include ../../examples/Product/ProductVariantChannelAvailabilityMap.json
1111
properties:
12-
//:
12+
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/:
1313
type: ProductVariantChannelAvailability
14+
description: |
15+
JSON object where the keys are supply [Channel](ctp:api:type:Channel) `id`, and the values are [ProductVariantChannelAvailability](ctp:api:type:ProductVariantChannelAvailability).

api-specs/api/types/product/SearchKeywords.raml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ type: object
66
key: Locale
77
value: SearchKeyword[]
88
description: |
9-
Search keywords are JSON objects primarily used by [Product Suggestions](/projects/products-suggestions), but are also considered for a [full text search](/projects/product-projection-search#full-text-search).
10-
The keys are of type [Locale](ctp:api:type:Locale), and the values are an array of [SearchKeyword](ctp:api:type:SearchKeyword).
9+
Although search keywords are primarily used by [Product Suggestions](/projects/products-suggestions), they are also considered for a [full text search](/projects/products-search#full-text-search). The keys are of type [Locale](ctp:api:type:Locale), and the values are an array of [SearchKeyword](ctp:api:type:SearchKeyword).
1110
example: !include ../../examples/Product/SearchKeywords.json
1211
properties:
1312
/^[a-z]{2}(-[A-Z]{2})?$/:
1413
type: SearchKeyword[]
14+
description: |
15+
Key-value pair where the keys are of type [Locale](ctp:api:type:Locale) and the values are an array of [SearchKeyword](ctp:api:type:SearchKeyword).

0 commit comments

Comments
 (0)