Skip to content

Commit 9fb33bf

Browse files
committed
Updated API from documentation release
1 parent af5df9d commit 9fb33bf

15 files changed

+36
-22
lines changed

api-specs/api/resources/carts.raml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,18 @@ post:
5252
post:
5353
displayName: Replicate cart
5454
description: |
55-
Creates a new Cart by replicating an existing Cart or Order. Can be useful in cases where a customer wants to cancel a recent order to make some changes or reorder a previous order.
55+
Creates a new Cart by replicating an existing Cart or Order.
5656
57-
The replicated Cart preserves Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the Cart or Order. If the Line Items become invalid, for example, due to removed Products or Prices, they are removed from the new Cart. If the Customer switches to another Customer Group, the new Cart is updated with the new value. It has up-to-date Tax Rates, Prices, and Line Item product data and is in `Active` [CartState](ctp:api:type:CartState).
57+
The following applies to the new Cart:
5858
59-
The new Cart does not contain Payments or Deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
59+
- It contains the same Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the originating Cart or Order.
60+
- If a Line Item becomes invalid, it is removed from the new Cart. A common reason for this is removed Products or Prices.
61+
- Line items and Custom Line Items are reset to their initial [state](/projects/carts#itemstate).
62+
- It contains no payments or delivery information.
63+
- It contains up-to-date Tax Rates, Prices, and Line Item product data.
64+
- The [CartState](/projects/carts#cartstate) is `Active`.
65+
- If using the `customerGroup` field (for a single Customer Group) and the referenced Customer switched to another Customer Group, the new Cart is automatically updated to reflect the new group and corresponding prices.
66+
- If using the `customerGroupAssignments` field (for multiple Customer Groups), the Cart no longer keeps a direct reference to a Customer Group. If a Customer’s group assignments change, the Cart and its Line Item prices are not updated automatically. Prices are only updated when the Cart is changed via a [direct update action](/projects/carts#update-actions).
6067
6168
Specific Error Codes:
6269

api-specs/api/resources/in-store.raml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,18 @@ uriParameters:
229229
post:
230230
displayName: Replicate Cart in Store
231231
description: |
232-
Creates a new Cart by replicating an existing Cart or Order. Can be useful in cases where a customer wants to cancel a recent order to make some changes or reorder a previous order.
232+
Creates a new Cart in a [Store](ctp:api:type:Store) by replicating an existing Cart or Order.
233233
234-
The replicated Cart preserves Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the Cart or Order. If the Line Items become invalid, for example, due to removed Products or Prices, they are removed from the new Cart. If the Customer switches to another Customer Group, the new Cart is updated with the new value. It has up-to-date Tax Rates, Prices, and Line Item product data and is in `Active` [CartState](ctp:api:type:CartState).
234+
The following applies to the new Cart:
235235
236-
The new Cart does not contain payments or deliveries. The [State](ctp:api:type:ItemState) of Line Items and Custom Line Items is reset to `initial`.
236+
- It contains the same Customer information, Line Items and Custom Line Items, Custom Fields, Discount Codes, and other settings of the originating Cart or Order.
237+
- If a Line Item becomes invalid, it is removed from the new Cart. A common reason for this is removed Products or Prices.
238+
- Line items and Custom Line Items are reset to their initial [state](/projects/carts#itemstate).
239+
- It contains no payments or delivery information.
240+
- It contains up-to-date Tax Rates, Prices, and Line Item product data.
241+
- The [CartState](/projects/carts#cartstate) is `Active`.
242+
- If using the `customerGroup` field (for a single Customer Group) and the referenced Customer switched to another Customer Group, the new Cart is automatically updated to reflect the new group and corresponding prices.
243+
- If using the `customerGroupAssignments` field (for multiple Customer Groups), the Cart no longer keeps a direct reference to a Customer Group. If a Customer’s group assignments change, the Cart and its Line Item prices are not updated automatically. Prices are only updated when the Cart is changed via a [direct update action](/projects/carts#update-actions).
237244
238245
Specific Error Codes:
239246
@@ -1724,7 +1731,7 @@ uriParameters:
17241731
17251732
If omitted in the request body, the [Customer](ctp:api:type:Customer) `stores` field is set to the [Store](ctp:api:type:Store) specified in the path parameter.
17261733
1727-
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
1734+
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#update-a-cart) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
17281735
17291736
Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message.
17301737
securedBy:
@@ -1762,7 +1769,7 @@ uriParameters:
17621769
- If the Customer does not have a Cart, the most recently modified anonymous cart becomes the Customer's Cart.
17631770
- If the Customer already has a Cart, the most recently modified anonymous cart is handled according to [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode).
17641771
1765-
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
1772+
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#update-a-cart) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
17661773
17671774
If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
17681775
@@ -2176,7 +2183,7 @@ uriParameters:
21762183
description: |
21772184
Authenticates a Customer associated with a [Store](ctp:api:type:Store). For more information, see [Global versus Store-specific Customers](/../api/customers-overview#global-versus-store-specific-customers).
21782185
2179-
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
2186+
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#update-a-cart) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
21802187
21812188
Triggers [Cart merge during sign-in](/../api/customers-overview#cart-merge-during-sign-in).
21822189

api-specs/api/resources/login.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ post:
99
1010
Triggers [Cart merge during sign-in](/../api/customers-overview#cart-merge-during-sign-in).
1111
12-
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
12+
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#update-a-cart) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
1313
1414
If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
1515

api-specs/api/resources/me.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ delete:
179179
- If the Customer does not have a Cart yet, the most recently modified anonymous cart becomes the Customer's Cart.
180180
- If the Customer already has a Cart, the most recently modified anonymous cart is handled in accordance with [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode).
181181
182-
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
182+
A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#update-a-cart) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
183183
184184
If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
185185
securedBy:

api-specs/api/types/cart/updates/CartChangeTaxCalculationModeAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ displayName: CartChangeTaxCalculationModeAction
55
discriminatorValue: changeTaxCalculationMode
66
example: !include ../../../examples/Cart/CartChangeTaxCalculationModeAction.json
77
description: |
8-
Changing the tax calculation mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation).
8+
Changing the tax calculation mode leads to [recalculation of taxes](/../api/carts-orders-overview#taxes).
99
properties:
1010
taxCalculationMode:
1111
type: TaxCalculationMode

api-specs/api/types/cart/updates/CartChangeTaxRoundingModeAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ displayName: CartChangeTaxRoundingModeAction
55
discriminatorValue: changeTaxRoundingMode
66
example: !include ../../../examples/Cart/CartChangeTaxRoundingModeAction.json
77
description: |
8-
Changing the tax rounding mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation).
8+
Changing the tax rounding mode leads to [recalculation of taxes](/../api/carts-orders-overview#taxes).
99
properties:
1010
taxRoundingMode:
1111
type: RoundingMode

api-specs/api/types/cart/updates/CartRecalculateAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ displayName: CartRecalculateAction
55
discriminatorValue: recalculate
66
example: !include ../../../examples/Cart/CartRecalculateAction.json
77
description: |
8-
This update action does not set any Cart field in particular, but it triggers several [Cart updates](/../api/carts-orders-overview#cart-updates)
8+
This update action does not set any Cart field in particular, but it triggers several [Cart updates](/../api/carts-orders-overview#update-a-cart)
99
to bring prices and discounts to the latest state. Those can become stale over time when no Cart updates have been performed for a while and
1010
prices on related Products have changed in the meanwhile.
1111

api-specs/api/types/cart/updates/CartSetCustomerGroupAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: |
88
This update action can only be used if a Customer is not assigned to the Cart.
99
If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.
1010
11-
To reflect the new Customer Group, this update action can result in [updates to the Cart](/api/carts-orders-overview#cart-updates). When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
11+
To reflect the new Customer Group, this update action can result in [updates to the Cart](/api/carts-orders-overview#update-a-cart). When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
1212
properties:
1313
customerGroup?:
1414
type: CustomerGroupResourceIdentifier

api-specs/api/types/cart/updates/CartSetLineItemSupplyChannelAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ displayName: CartSetLineItemSupplyChannelAction
55
discriminatorValue: setLineItemSupplyChannel
66
example: !include ../../../examples/Cart/CartSetLineItemSupplyChannelAction.json
77
description: |
8-
Performing this action has no impact on inventory that should be reserved.
8+
Performing this action does not reserve stock. Stock is only reserved at Order creation if the [InventoryMode](ctp:api:type:InventoryMode) of the Cart is `TrackOnly` or `ReserveOnOrder`.
99
properties:
1010
lineItemId?:
1111
type: string

api-specs/api/types/customer/updates/CustomerSetCustomerGroupAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ example: !include ../../../examples/Customer/CustomerSetCustomerGroupAction.json
77
description: |
88
Setting the Customer Group of the Customer produces the [CustomerGroupSet](ctp:api:type:CustomerGroupSetMessage) Message.
99
10-
To reflect the new Customer Group, this update action can result in [updates](/api/carts-orders-overview#cart-updates) to the most recently modified active Cart. When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
10+
To reflect the new Customer Group, this update action can result in [updates](/api/carts-orders-overview#update-a-cart) to the most recently modified active Cart. When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
1111
1212
properties:
1313
customerGroup?:

0 commit comments

Comments
 (0)