Skip to content

Commit 91ef231

Browse files
committed
Updated API from documentation release
1 parent c6e3250 commit 91ef231

File tree

10 files changed

+21
-32
lines changed

10 files changed

+21
-32
lines changed

api-specs/api/resources/customers.raml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ post:
2929
displayName: Create (sign up) Customer
3030
securedBy: [oauth_2_0: { scopes: ['manage_customers:{projectKey}'] }]
3131
description: |
32-
If the `anonymousCart` field is set on the [CustomerDraft](ctp:api:type:CustomerDraft), then the newly created Customer will be assigned to that [Cart](ctp:api:type:Cart).
33-
Similarly, if the `anonymousId` field is set, the Customer will be set on all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList) and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
34-
3532
Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message. Simultaneously creating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
3633
body:
3734
application/json:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ post:
4444
description: |
4545
When using this endpoint, if omitted, the Customer `stores` field is set to the [Store](ctp:api:type:Store) specified in the path parameter.
4646
47-
If the `anonymousCart` field is set on the [CustomerDraft](ctp:api:type:CustomerDraft), then the newly created Customer will be assigned to that [Cart](ctp:api:type:Cart).
48-
Similarly, if the `anonymousId` field is set, the Customer will be set on all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList) and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
4947
If a Cart with a `store` field specified, the `store` field must reference the same [Store](ctp:api:type:Store) specified in the `{storeKey}` path parameter.
5048
49+
If the Customer has multiple active Carts, the anonymous Cart is [merged](/../api/customers-overview#cart-merge-during-sign-in-and-sign-up) into the most recently modified active Cart.
50+
5151
Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message. Simultaneously creating two Customers with the same email address can return a [LockedField](ctp:api:type:LockedFieldError) error.
5252
body:
5353
application/json:

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ uriParameters:
2424
post:
2525
displayName: Authenticate (sign in) Customer in Store
2626
description: |
27-
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).
27+
Authenticates a Customer associated with a [Store](ctp:api:type:Store).
2828
29-
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).
30-
31-
Triggers [Cart merge during sign-in](/../api/customers-overview#cart-merge-during-sign-in).
29+
If the Customer has multiple active Carts, the anonymous Cart is [merged](/../api/customers-overview#cart-merge-during-sign-in-and-sign-up) into the most recently modified active Cart.
3230
3331
If the Customer exists in the Project but the `stores` field references a different [Store](ctp:api:type:Store), this method returns an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error.
34-
3532
securedBy:
3633
- oauth_2_0:
3734
scopes:

api-specs/api/resources/in-store/my-carts-orders-shoppinglists-in-store.raml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,12 +1044,11 @@ delete:
10441044
post:
10451045
displayName: Create (sign up) My Customer in Store
10461046
description: |
1047-
10481047
If used with an optional [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly created Customer.
10491048
10501049
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.
10511050
1052-
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).
1051+
If the Customer has multiple active Carts, the anonymous Cart is [merged](/../api/customers-overview#cart-merge-during-sign-in-and-sign-up) into the most recently modified active Cart.
10531052
10541053
Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message.
10551054
securedBy:
@@ -1087,10 +1086,7 @@ delete:
10871086
- If the Customer does not have a Cart, the most recently modified anonymous cart becomes the Customer's Cart.
10881087
- If the Customer already has a Cart, the most recently modified anonymous cart is handled according to [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode).
10891088
1090-
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).
1091-
10921089
If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
1093-
10941090
securedBy:
10951091
[
10961092
oauth_2_0:

api-specs/api/resources/login.raml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,11 @@ description: Retrieves the authenticated customer.
33
post:
44
displayName: Authenticate (sign in) Customer
55
description: |
6-
Authenticates a global Customer not associated with a Store.
7-
For more information, see [Global versus Store-specific Customers](/../api/customers-overview#global-versus-store-specific-customers).
8-
If the Customer is registered in a Store, use the [Authenticate (sign in) Customer in Store](ctp:api:endpoint:/{projectKey}/in-store/key={storeKey}/login:POST) method.
6+
Authenticates a global Customer.
97
10-
Triggers [Cart merge during sign-in](/../api/customers-overview#cart-merge-during-sign-in).
11-
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).
8+
If the Customer has multiple active Carts, the anonymous Cart is [merged](/../api/customers-overview#cart-merge-during-sign-in-and-sign-up) into the most recently modified active Cart.
139
1410
If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
15-
1611
securedBy: [oauth_2_0: { scopes: ['manage_customers:{projectKey}'] }]
1712
body:
1813
application/json:

api-specs/api/resources/me.raml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ 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#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).
183-
184182
If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned.
185183
securedBy:
186184
[

api-specs/api/types/customer/AnonymousCartSignInMode.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ enum:
66
- MergeWithExistingCustomerCart
77
- UseAsNewActiveCustomerCart
88
(enumDescriptions):
9-
MergeWithExistingCustomerCart: If set, the content of an anonymous [Cart is merged during sign-in](/../api/customers-overview#cart-merge-during-sign-in) with the Customer's most recently modified active Cart.
9+
MergeWithExistingCustomerCart: If set, the content of an anonymous [Cart is merged during sign-in](/../api/customers-overview#cart-merge-during-sign-in-and-sign-up) with the Customer's most recently modified active Cart.
1010
UseAsNewActiveCustomerCart: If set, an anonymous Cart is used as the new active Customer Cart, and no [LineItems](ctp:api:type:LineItem) or [CustomLineItems](ctp:api:type:CustomLineItem) are merged.

api-specs/api/types/customer/CustomerDraft.raml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ properties:
5858
anonymousCart?:
5959
type: CartResourceIdentifier
6060
description: |
61-
Identifies a [Cart](ctp:api:type:Cart) that will be assigned to the new Customer.
61+
Assigns the Customer to the specified Cart.
6262
anonymousId?:
6363
type: string
6464
description: |
65-
Identifies Carts and Orders belonging to an anonymous session that will be assigned to the new Customer.
65+
Assigns the Customer to all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList), and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
66+
67+
If `anonymousCart` is provided, this value must match the `anonymousId` of the anonymous [Cart](ctp:api:type:Cart); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
6668
dateOfBirth?:
6769
type: date-only
6870
description: |

api-specs/api/types/customer/CustomerSignInResult.raml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ properties:
1111
type: Cart
1212
description: |
1313
Cart associated with the Customer.
14-
If empty, the Customer does not have a Cart assigned.
14+
15+
The Cart is recalculated to remove invalid Line Items and apply the latest prices, taxes, and discounts.
16+
During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
17+
18+
For more information, see [Cart updates](/../api/carts-orders-overview#update-a-cart).

api-specs/api/types/customer/CustomerSignin.raml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ properties:
2020
anonymousCart?:
2121
type: CartResourceIdentifier
2222
description: |
23-
Identifies a [Cart](ctp:api:type:Cart) that will be assigned to the Customer.
23+
Assigns the Customer to the specified Cart.
2424
anonymousCartSignInMode?:
2525
type: AnonymousCartSignInMode
2626
description: |
@@ -30,9 +30,9 @@ properties:
3030
anonymousId?:
3131
type: string
3232
description: |
33-
If both `anonymousCart` and `anonymousId` are provided, the `anonymousId` on the CustomerSignin must match that of the anonymous [Cart](ctp:api:type:Cart).
34-
Otherwise a [400 Bad Request](ctp:api:type:InvalidOperationError) `Invalid Operation` error is returned with the message:
35-
"Cart with the ID cart-id does not have the expected anonymousId.".
33+
Assigns the Customer to all [Carts](ctp:api:type:Cart), [Orders](ctp:api:type:Order), [ShoppingLists](ctp:api:type:ShoppingList), and [Payments](ctp:api:type:Payment) with the same `anonymousId`.
34+
35+
If `anonymousCart` is provided, this value must match the `anonymousId` of the anonymous [Cart](ctp:api:type:Cart); otherwise, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
3636
updateProductData?:
3737
type: boolean
3838
description: |

0 commit comments

Comments
 (0)