Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Aug 9, 2024
1 parent b9e9337 commit 6fbc046
Show file tree
Hide file tree
Showing 2 changed files with 216 additions and 66 deletions.
81 changes: 69 additions & 12 deletions api-specs/api/resources/in-store.raml
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ uriParameters:
application/json:
example: !include ../examples/shopping-list.example.json
get:
displayName: Get my customer details in a store
displayName: Get My Customer in Store
is:
- sortable:
sortExample: createdAt asc
Expand All @@ -1475,17 +1475,27 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'customer_id:{id}',
],
},
]
description: |
Returns a Customer for a given Query Predicate in a [Store](ctp:api:type:Store). Returns a `200 OK` status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Customer exists in the Store for the given Query Predicate.
- If a Customer exists in the Store for the given Query Predicate, but does not have an `id` value that matches the [customer:{id}](/scopes#customer_idid) scope.
- If a Customer exists for the given Query Predicate but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope.
responses:
200:
body:
application/json:
example: !include ../examples/customer.example.json
type: Customer
post:
displayName: Update my customer in a store
displayName: Update My Customer in Store
securedBy:
[
oauth_2_0:
Expand All @@ -1494,9 +1504,18 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'customer_id:{id}',
],
},
]
description: |
Updates the Customer in a [Store](ctp:api:type:Store). Returns a `200 OK` status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Customer exists with the `id` specified in the [customer:{id}](/scopes#customer_idid) scope.
- If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope.
body:
application/json:
example: !include ../examples/customer-update.example.json
Expand All @@ -1508,7 +1527,7 @@ uriParameters:
example: !include ../examples/customer-update-response.example.json
type: Customer
delete:
displayName: Delete my Customer in a store
displayName: Delete My Customer in Store
is:
- versioned
- conflicting
Expand All @@ -1520,9 +1539,18 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'customer_id:{id}',
],
},
]
description: |
Deletes the Customer in a [Store](ctp:api:type:Store). Returns a `200 OK` status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Customer exists with the `id` specified in the [customer:{id}](/scopes#customer_idid) scope.
- If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope.
responses:
200:
body:
Expand All @@ -1532,9 +1560,15 @@ uriParameters:
/email/confirm:
type: base
post:
displayName: Verify my Customer's Email in a store
displayName: Verify email of My Customer in Store
description: |
This is the last step in the [email verification process of a Customer](/../api/projects/customers#email-verification-of-customer-in-store).
This is the last step in the [email verification process of a Customer](/../api/projects/customers#email-verification-of-customer-in-store). Returns a `200 OK` status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Customer exists with the `id` specified in the [customer:{id}](/scopes#customer_idid) scope.
- If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope.
securedBy:
[
oauth_2_0:
Expand All @@ -1543,6 +1577,7 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'customer_id:{id}',
],
},
]
Expand All @@ -1560,9 +1595,15 @@ uriParameters:
/password:
type: base
post:
displayName: Change my customers password in a store
displayName: Change password of My Customer in Store
description: |
Changing the password of the Customer produces the [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=false`.
Changing the password of the Customer produces the [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=false`. Returns a `200 OK` status if successful.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Customer exists with the `id` specified in the [customer:{id}](/scopes#customer_idid) scope.
- If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope.
is:
- conflicting
securedBy:
Expand All @@ -1573,6 +1614,7 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'customer_id:{id}',
],
},
]
Expand All @@ -1589,11 +1631,17 @@ uriParameters:
/reset:
type: base
post:
displayName: Reset my Customer's Password in a store
displayName: Reset password of My Customer in Store
description: |
This is the last step in the [password reset process of the authenticated Customer](/../api/projects/customers#password-reset-of-customer-in-store).
Resetting a password produces the of the Customer [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=true`.
Resetting a password produces the Customer [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=true`.
A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
- If no Customer exists with the `id` specified in the [customer:{id}](/scopes#customer_idid) scope.
- If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope.
securedBy:
[
oauth_2_0:
Expand All @@ -1602,6 +1650,7 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'customer_id:{id}',
],
},
]
Expand All @@ -1618,8 +1667,11 @@ uriParameters:
/signup:
type: base
post:
displayName: Signup my customer in a store
displayName: Create (sign up) My Customer in Store
description: |
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.
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.
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).
Expand All @@ -1633,6 +1685,7 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'anonymous_id:{id}',
],
},
]
Expand All @@ -1649,10 +1702,13 @@ uriParameters:
/login:
type: base
post:
displayName: Authenticate my Customer (Sign In) in a store
displayName: Authenticate (sign in) My Customer in Store
description: |
Retrieves the authenticated Customer (that matches the given email/password pair) if they are part of a specific [Store](ctp:api:type:Store).
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 logged-in Customer.
- If the Customer does not have a Cart, the most recently modified anonymous cart becomes the Customer's Cart.
- If the Customer already has a Cart, the most recently modified anonymous cart is handled according to [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode).
Expand All @@ -1668,6 +1724,7 @@ uriParameters:
[
'manage_my_profile:{projectKey}',
'manage_my_profile:{projectKey}:{storeKey}',
'anonymous_id:{id}',
],
},
]
Expand Down Expand Up @@ -1718,7 +1775,7 @@ uriParameters:
where?:
type: QueryPredicate[]
post:
displayName: Create customer in store
displayName: Create Customer in Store
securedBy:
- oauth_2_0:
scopes:
Expand Down
Loading

0 comments on commit 6fbc046

Please sign in to comment.