From f8c14ad63a7fd158c82ea55c081461ef75c51e91 Mon Sep 17 00:00:00 2001 From: Auto Mation Date: Mon, 5 Aug 2024 07:36:10 +0000 Subject: [PATCH] Updated api-reference from documentation release --- api-specs/api/resources/in-store.raml | 336 ++++++--- api-specs/api/resources/me.raml | 644 ++++++++++++++---- api-specs/api/resources/subscriptions.raml | 2 +- .../api/types/cart/LineItemPriceMode.raml | 4 +- .../extension/ExtensionResourceTypeId.raml | 2 + .../AttributeReferenceTypeId.raml | 3 + .../subscription/AwsAuthenticationMode.raml | 2 +- .../AzureEventGridDestination.raml | 4 +- .../AzureServiceBusDestination.raml | 2 +- .../ChangeSubscriptionResourceTypeId.raml | 2 +- .../subscription/CloudEventsPayload.raml | 2 +- .../ConfluentCloudDestination.raml | 4 +- .../types/subscription/DeliveryPayload.raml | 4 +- .../GoogleCloudPubSubDestination.raml | 2 +- .../subscription/MessageDeliveryPayload.raml | 2 +- .../types/subscription/SnsDestination.raml | 2 +- .../api/types/subscription/Subscription.raml | 4 +- .../types/subscription/SubscriptionDraft.raml | 4 +- .../SubscriptionHealthStatus.raml | 12 +- .../SubscriptionChangeDestinationAction.raml | 2 +- .../types/type/CustomFieldReferenceValue.raml | 3 + 21 files changed, 801 insertions(+), 241 deletions(-) diff --git a/api-specs/api/resources/in-store.raml b/api-specs/api/resources/in-store.raml index 4cbd7b4be0..cb016e294b 100644 --- a/api-specs/api/resources/in-store.raml +++ b/api-specs/api/resources/in-store.raml @@ -46,7 +46,7 @@ uriParameters: ], }, ] - description: Checks if a Cart exists for a given Query Predicate. Returns a `200 OK` status if any Carts match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if a Cart exists for a given Query Predicate. Returns a `200 OK` status if any Carts match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -104,9 +104,9 @@ uriParameters: }, ] description: | - Retrieves the most recently modified active Cart of a Customer with [CartOrigin](ctp:api:type:CartOrigin) `Customer`. If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + Retrieves the most recently modified [active Cart](ctp:api:type:CartState) of a Customer with [CartOrigin](ctp:api:type:CartOrigin) `Customer`. If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action. responses: @@ -126,7 +126,7 @@ uriParameters: ], }, ] - description: Checks if a Cart of a Customer exists. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise. + description: Checks if a Cart of a Customer exists. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. /key={key}: (methodName): withKey type: @@ -148,7 +148,7 @@ uriParameters: }, ] description: | - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action. responses: @@ -168,7 +168,7 @@ uriParameters: ], }, ] - description: Checks if a Cart exists for a given `key`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise. + description: Checks if a Cart exists for a given `key`. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update Cart in Store by Key securedBy: @@ -183,7 +183,7 @@ uriParameters: }, ] description: | - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. body: application/json: example: !include ../examples/cart-update.example.json @@ -195,7 +195,7 @@ uriParameters: delete: displayName: Delete Cart in Store by Key description: | - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. is: - dataErasure securedBy: @@ -271,7 +271,7 @@ uriParameters: }, ] description: | - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. To ensure the Cart is up-to-date with current values (such as Prices and Discounts), use the [Recalculate](ctp:api:type:CartRecalculateAction) update action. responses: @@ -291,7 +291,7 @@ uriParameters: ], }, ] - description: Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise. + description: Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update Cart in Store by ID securedBy: @@ -307,7 +307,7 @@ uriParameters: ] description: | Updates a [Cart](ctp:api:type:Cart) in the [Store](ctp:api:type:Store) specified by `storeKey`. - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. body: application/json: example: !include ../examples/cart-update.example.json @@ -319,7 +319,7 @@ uriParameters: delete: displayName: Delete Cart in Store by ID description: | - If the Cart exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Cart exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. is: - dataErasure securedBy: @@ -382,7 +382,7 @@ uriParameters: ], }, ] - description: Checks if an Order exists for a given Query Predicate. Returns a `200 OK` status if any Orders match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if an Order exists for a given Query Predicate. Returns a `200 OK` status if any Orders match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -488,7 +488,7 @@ uriParameters: }, ] description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. responses: 200: body: @@ -506,7 +506,7 @@ uriParameters: ], }, ] - description: Checks if an Order exists for a given `orderNumber`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise. + description: Checks if an Order exists for a given `orderNumber`. Returns a `200 OK` status if the Order exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update Order in Store by OrderNumber securedBy: @@ -521,7 +521,7 @@ uriParameters: }, ] description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. body: application/json: example: !include ../examples/order-update.example.json @@ -533,7 +533,7 @@ uriParameters: delete: displayName: Delete Order in Store by OrderNumber description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. Deleting an Order produces the [OrderDeleted](ctp:api:type:OrderDeletedMessage) Message. is: @@ -575,7 +575,7 @@ uriParameters: }, ] description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. responses: 200: body: @@ -593,7 +593,7 @@ uriParameters: ], }, ] - description: Checks if an Order exists for a given `id`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise. + description: Checks if an Order exists for a given `id`. Returns a `200 OK` status if the Order exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update Order in Store by ID securedBy: @@ -608,7 +608,7 @@ uriParameters: }, ] description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. body: application/json: example: !include ../examples/order-update.example.json @@ -620,7 +620,7 @@ uriParameters: delete: displayName: Delete Order in Store by ID description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + If the Order exists in the Project but does not have a `store` specified, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. Deleting an Order produces the [OrderDeleted](ctp:api:type:OrderDeletedMessage) Message. is: @@ -677,6 +677,7 @@ uriParameters: application/json: example: !include ../examples/carts.example.json head: + displayName: Check if Cart exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -691,7 +692,7 @@ uriParameters: }, ] description: | - Checks if a Cart exists for a Store that matches the given Query Predicate, and contains a matching `customerId` or `anonymousId`. Returns a `200 OK` status if any Carts match these conditions, or a `404 Not Found` otherwise. + Checks if a Cart exists for a Store that matches the given Query Predicate, and contains a matching `customerId` or `anonymousId`. Returns a `200 OK` status if any Carts match these conditions, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -711,7 +712,8 @@ uriParameters: }, ] description: | - Creates a Cart in the specified Store for a given `customerId` or `anonymousId`. + + Creates a Cart in a Store for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Cart is automatically set based on the [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope. The `store` field in the created [Cart](ctp:api:type:Cart) is set to the Store specified by the `storeKey` path parameter. @@ -754,17 +756,21 @@ uriParameters: }, ] description: | - Returns a Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + Returns a Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + - If no Cart exists in the Store for the given `id`. + - If the Cart exists but does not belong to a Store, or the Cart's `store` field references a different Store. + - If the Cart exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. responses: 200: body: application/json: example: !include ../examples/cart.example.json head: + displayName: Check if Cart exists in Store by ID securedBy: [ oauth_2_0: @@ -794,11 +800,14 @@ uriParameters: }, ] description: | - Updates the Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + Updates the Cart for a given `id` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + - If no Cart exists in the Store for the given `id`. + - If the Cart exists but does not belong to a Store, or the Cart's `store` field references a different Store. + - If the Cart exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. body: application/json: example: !include ../examples/cart-update.example.json @@ -823,11 +832,14 @@ uriParameters: }, ] description: | - Deletes the Cart for a given `id` in a Store. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + Deletes the Cart for a given `id` in a Store. Returns a `200 OK` status if successful. - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Cart exists in the Store for the given `id`. + - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store. + - If the Cart exists in the Project but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. responses: 200: body: @@ -854,15 +866,20 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] + description: | + Returns all Orders in a Store that match a given Query Predicate and contain either a `customerId` that matches the [customer_id:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. responses: 200: body: application/json: example: !include ../examples/orders.example.json head: + displayName: Check if Order exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -871,20 +888,35 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer:{customerId}', + 'anonymous_id:{anonymousId}', ], }, ] - description: Checks if an Order exists for a given Query Predicate. Returns a `200 OK` status if any Orders match the Query Predicate or a `404 Not Found` otherwise. + description: | + Checks if an Order exists for a given Query Predicate in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Orders exist in the Store that match the Query Predicate. + - If an Order matches the Query Predicate, but no `store` is specified, or the `store` field references a different Store. + - If an Order matches the Query Predicate, but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + queryParameters: where?: type: QueryPredicate[] post: is: - conflicting - displayName: Create My Order in Store + displayName: Create My Order in Store from Cart description: | + + Creates an Order in a Store from a Cart for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Order is automatically set based on the [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope. + The Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction) for taxes to be calculated. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission). + If the Cart's `customerId` does not match the [customer:{id}](/scopes#customer_idid) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#anonymous_idid) scope, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned. + Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message. Specific Error Codes: @@ -906,6 +938,8 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -926,7 +960,14 @@ uriParameters: get: displayName: Get My Order in Store by ID description: | - If the Order exists in the Project but does not have the `store` field, or the `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + Returns an Order for a given `id` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Order exists in the Store for the given `id`. + - If the Order exists but does not have a `store` specified, or the `store` field references a different Store. + - If the Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + securedBy: [ oauth_2_0: @@ -935,6 +976,8 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -944,6 +987,7 @@ uriParameters: application/json: example: !include ../examples/order.example.json head: + displayName: Check if Order exists in Store by ID securedBy: [ oauth_2_0: @@ -952,20 +996,35 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] - description: Checks if an Order exists for a given `id`. Returns a `200 OK` status if the My Order exists or a `404 Not Found` otherwise. + description: | + Checks if an Order exists for a given `id` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Order exists in the Store for the given `id`. + - If the Order exists but does not have a `store` specified, or the `store` field references a different Store. + - If the Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + /active-cart: type: base get: - displayName: Get My Active Cart in Store + displayName: Get My active Cart in Store description: | - Retrieves the Customer's most recently modified active Cart in the Store specified by the `storeKey` path parameter. + Retrieves the Customer's most recently modified [active Cart](ctp:api:type:CartState) in a Store. Returns a `200 OK` status if successful. Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored. - If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no active Cart exists. + - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store. + - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + is: - expandable securedBy: @@ -976,6 +1035,8 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -994,10 +1055,20 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] - description: Checks if an active Cart exists. Returns a `200 OK` status if an active Cart exists or a `404 Not Found` otherwise. + description: | + Checks if an active Cart exists in a Store. Returns `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no active Cart exists in a Store. + - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store. + - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + /shopping-lists: type: baseDomain: @@ -1009,7 +1080,16 @@ uriParameters: description: | shopping-lists e.g. for wishlist support get: - displayName: Get my shopping lists in store + displayName: Query My ShoppingLists in Store + description: | + Returns ShoppingLists that match the given Query Predicate in a Store. Returns `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingLists exist in a Store. + - If a ShoppingList exists but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList exists in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + securedBy: [ oauth_2_0: @@ -1018,6 +1098,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1033,6 +1115,7 @@ uriParameters: application/json: example: !include ../examples/shopping-lists.example.json head: + displayName: Check if ShoppingList exists by Query Predicate securedBy: [ oauth_2_0: @@ -1041,15 +1124,25 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] - description: Checks if a ShoppingList exists for a given Query Predicate. Returns a `200 OK` status if any ShoppingLists match the Query Predicate or a `404 Not Found` otherwise. + description: | + Checks if a ShoppingList exists for the given Query Predicate in a Store. Returns `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingLists exist for a given Query Predicate in a Store. + - If a ShoppingList matches the Query Predicate but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList exists in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + queryParameters: where?: type: QueryPredicate[] post: - displayName: Create my shopping lists in store + displayName: Create My ShoppingList in Store securedBy: [ oauth_2_0: @@ -1058,6 +1151,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1071,6 +1166,9 @@ uriParameters: application/json: example: !include ../examples/shopping-list-create.example.json description: | + + Creates a ShoppingList in a Store for a Customer or anonymous user. The `customer` or `anonymousId` field on the ShoppingList is automatically set based on the given [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope. + When using this endpoint, the `store` field of a ShoppingList is always set to the [Store](ctp:api:type:Store) specified in the path parameter. responses: 201: @@ -1085,7 +1183,7 @@ uriParameters: resourceType: ShoppingList resourceUpdateType: MyShoppingListUpdate get: - displayName: Get my shopping list by key in store + displayName: Get My ShoppingList in Store by Key securedBy: [ oauth_2_0: @@ -1094,6 +1192,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1104,13 +1204,22 @@ uriParameters: type: Expansion[] required: false description: | - If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different [Store](ctp:api:type:Store), the [ResourceNotFound](/errors#404-not-found-1) error is returned. + Returns a ShoppingList for a given `key` in a Store. Returns `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `key` in a Store. + - If a ShoppingList matches the given `key` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `key` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, + or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json head: + displayName: Check if ShoppingList exists by Key securedBy: [ oauth_2_0: @@ -1119,12 +1228,22 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] - description: Checks if a ShoppingList exists for a given `key`. Returns a `200 OK` status if the ShoppingList exists or a `404 Not Found` otherwise. + description: | + Checks if a ShoppingList exists for a given `key` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists that matches the given `key` in a Store. + - If a ShoppingList matches the given `key` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `key` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + post: - displayName: Update my shopping list by key in store + displayName: Update My ShoppingList in Store by Key securedBy: [ oauth_2_0: @@ -1133,6 +1252,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1146,15 +1267,21 @@ uriParameters: application/json: example: !include ../examples/shopping-list-update.example.json description: | - If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different [Store](ctp:api:type:Store), - the [ResourceNotFound](/errors#404-not-found-1) error is returned. + Updates a ShoppingList for a given `key` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `key` in a Store. + - If a ShoppingList matches the given `key` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `key` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json delete: - displayName: Delete my shopping list by key in store + displayName: Delete My ShoppingList in Store by Key is: - dataErasure securedBy: @@ -1165,6 +1292,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1175,8 +1304,14 @@ uriParameters: type: Expansion[] required: false description: | - If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different [Store](ctp:api:type:Store), - the [ResourceNotFound](/errors#404-not-found-1) error is returned. + Deletes the ShoppingList for a given `key` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `key` in a Store. + - If a ShoppingList matches the given `key` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `key` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: @@ -1190,7 +1325,7 @@ uriParameters: resourceType: ShoppingList resourceUpdateType: MyShoppingListUpdate get: - displayName: Get my shopping list by id in store + displayName: Get My ShoppingList in Store by ID securedBy: [ oauth_2_0: @@ -1199,6 +1334,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}:{storeKey}', 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1209,14 +1346,21 @@ uriParameters: type: Expansion[] required: false description: | - If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different [Store](ctp:api:type:Store), - the [ResourceNotFound](/errors#404-not-found-1) error is returned. + Returns a ShoppingList for a given `id` in a Store. Returns `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `id` in a Store. + - If a ShoppingList matches the given `id` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `id` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json head: + displayName: Check if ShoppingList exists by ID securedBy: [ oauth_2_0: @@ -1225,12 +1369,22 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}:{storeKey}', 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] - description: Checks if a ShoppingList exists for a given `id`. Returns a `200 OK` status if the ShoppingList exists or a `404 Not Found` otherwise. + description: | + Checks if a ShoppingList exists for a given `id` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `id` in a Store. + - If a ShoppingList matches the given `id` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `id` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + post: - displayName: Update my shopping list by id in store + displayName: Update My ShoppingList in Store by ID securedBy: [ oauth_2_0: @@ -1239,6 +1393,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1252,15 +1408,21 @@ uriParameters: application/json: example: !include ../examples/shopping-list-update.example.json description: | - If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different [Store](ctp:api:type:Store), - the [ResourceNotFound](/errors#404-not-found-1) error is returned. + Updates a ShoppingList for a given `id` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `id` in a Store. + - If a ShoppingList matches the given `id` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `id` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json delete: - displayName: Delete my shopping list by id in store + displayName: Delete My ShoppingList in Store by ID is: - dataErasure securedBy: @@ -1271,6 +1433,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1281,8 +1445,14 @@ uriParameters: type: Expansion[] required: false description: | - If a ShoppingList exists in a Project but does _not_ have the `store` field, or the `store` field references a different [Store](ctp:api:type:Store), - the [ResourceNotFound](/errors#404-not-found-1) error is returned. + Deletes the ShoppingList for a given `id` in a Store. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList matches the given `id` in a Store. + - If a ShoppingList matches the given `id` but does not have a `store` specified, or the `store` field references a different Store. + - If a ShoppingList matches the given `id` in a Store but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: @@ -1543,7 +1713,7 @@ uriParameters: scopes: - 'view_customers:{projectKey}' - 'view_customers:{projectKey}:{storeKey}' - description: Checks if a Customer exists for a given Query Predicate. Returns a `200 OK` status if any Customers match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if a Customer exists for a given Query Predicate. Returns a `200 OK` status if any Customers match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -1942,7 +2112,7 @@ uriParameters: description: | shopping-lists e.g. for wishlist support get: - displayName: Get shopping lists in store + displayName: Get ShoppingLists in Store securedBy: [ oauth_2_0: @@ -1977,12 +2147,12 @@ uriParameters: ], }, ] - description: Checks if a ShoppingList exists for a given Query Predicate. Returns a `200 OK` status if any ShoppingLists match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if a ShoppingList exists for a given Query Predicate. Returns a `200 OK` status if any ShoppingLists match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] post: - displayName: Create shopping lists in store + displayName: Create ShoppingLists in Store securedBy: [ oauth_2_0: @@ -2018,7 +2188,7 @@ uriParameters: resourceType: ShoppingList resourceUpdateType: ShoppingListUpdate get: - displayName: Get shopping list by key in store + displayName: Get ShoppingList in Store by Key securedBy: [ oauth_2_0: @@ -2056,9 +2226,9 @@ uriParameters: ], }, ] - description: Checks if a ShoppingList exists for a given `key`. Returns a `200 OK` status if the ShoppingList exists or a `404 Not Found` otherwise. + description: Checks if a ShoppingList exists for a given `key`. Returns a `200 OK` status if the ShoppingList exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: - displayName: Update shopping list by key in store + displayName: Update ShoppingList in Store by Key securedBy: [ oauth_2_0: @@ -2088,7 +2258,7 @@ uriParameters: application/json: example: !include ../examples/shopping-list.example.json delete: - displayName: Delete shopping list by key in store + displayName: Delete ShoppingList in Store by Key is: - dataErasure securedBy: @@ -2124,7 +2294,7 @@ uriParameters: resourceType: ShoppingList resourceUpdateType: ShoppingListUpdate get: - displayName: Get shopping list by id in store + displayName: Get ShoppingList in Store by ID securedBy: [ oauth_2_0: @@ -2162,9 +2332,9 @@ uriParameters: ], }, ] - description: Checks if a ShoppingList exists for a given `id`. Returns a `200 OK` status if the ShoppingList exists or a `404 Not Found` otherwise. + description: Checks if a ShoppingList exists for a given `id`. Returns a `200 OK` status if the ShoppingList exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: - displayName: Update shopping list by id in store + displayName: Update ShoppingList in Store by ID securedBy: [ oauth_2_0: @@ -2194,7 +2364,7 @@ uriParameters: application/json: example: !include ../examples/shopping-list.example.json delete: - displayName: Delete shopping list by id in store + displayName: Delete ShoppingList in Store by ID is: - dataErasure securedBy: @@ -2944,7 +3114,7 @@ uriParameters: ], }, ] - description: Checks if a QuoteRequest exists for a given Query Predicate. Returns a `200 OK` status if any QuoteRequests match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if a QuoteRequest exists for a given Query Predicate. Returns a `200 OK` status if any QuoteRequests match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -3004,7 +3174,7 @@ uriParameters: ], }, ] - description: Checks if a QuoteRequest exists for a given `key`. Returns a `200 OK` status if the QuoteRequest exists or a `404 Not Found` otherwise. + description: Checks if a QuoteRequest exists for a given `key`. Returns a `200 OK` status if the QuoteRequest exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: securedBy: [ @@ -3080,7 +3250,7 @@ uriParameters: ], }, ] - description: Checks if a QuoteRequest exists for a given `id`. Returns a `200 OK` status if the QuoteRequest exists or a `404 Not Found` otherwise. + description: Checks if a QuoteRequest exists for a given `id`. Returns a `200 OK` status if the QuoteRequest exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: securedBy: [ @@ -3161,7 +3331,7 @@ uriParameters: ], }, ] - description: Checks if a StagedQuote exists for a given Query Predicate. Returns a `200 OK` status if any StagedQuotes match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if a StagedQuote exists for a given Query Predicate. Returns a `200 OK` status if any StagedQuotes match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -3221,7 +3391,7 @@ uriParameters: ], }, ] - description: Checks if a StagedQuote exists for a given `key`. Returns a `200 OK` status if the StagedQuote exists or a `404 Not Found` otherwise. + description: Checks if a StagedQuote exists for a given `key`. Returns a `200 OK` status if the StagedQuote exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: securedBy: [ @@ -3297,7 +3467,7 @@ uriParameters: ], }, ] - description: Checks if a StagedQuote exists for a given `id`. Returns a `200 OK` status if the StagedQuote exists or a `404 Not Found` otherwise. + description: Checks if a StagedQuote exists for a given `id`. Returns a `200 OK` status if the StagedQuote exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: securedBy: [ @@ -3378,7 +3548,7 @@ uriParameters: ], }, ] - description: Checks if a Quote exists for a given Query Predicate. Returns a `200 OK` status if any Quotes match the Query Predicate or a `404 Not Found` otherwise. + description: Checks if a Quote exists for a given Query Predicate. Returns a `200 OK` status if any Quotes match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -3438,7 +3608,7 @@ uriParameters: ], }, ] - description: Checks if a Quote exists for a given `key`. Returns a `200 OK` status if the Quote exists or a `404 Not Found` otherwise. + description: Checks if a Quote exists for a given `key`. Returns a `200 OK` status if the Quote exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: securedBy: [ @@ -3514,7 +3684,7 @@ uriParameters: ], }, ] - description: Checks if a Quote exists for a given `id`. Returns a `200 OK` status if the Quote exists or a `404 Not Found` otherwise. + description: Checks if a Quote exists for a given `id`. Returns a `200 OK` status if the Quote exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: securedBy: [ diff --git a/api-specs/api/resources/me.raml b/api-specs/api/resources/me.raml index e2bf4880c6..33e88aed69 100644 --- a/api-specs/api/resources/me.raml +++ b/api-specs/api/resources/me.raml @@ -146,23 +146,58 @@ delete: /active-cart: type: base get: - displayName: Get my active cart + displayName: Get My active Cart description: | - Retrieves the Customer's most recently modified active Cart. + Retrieves the Customer's most recently modified [active Cart](ctp:api:type:CartState). Returns a `200 OK` status if successful. + Carts with `Merchant` or `Quote` [CartOrigin](ctp:api:type:CartOrigin) are ignored. - If no active Cart exists, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no active Cart exists. + - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + is: - expandable - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] responses: 200: body: application/json: type: Cart head: - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - description: Checks if an active Cart exists. Returns a `200 OK` status if an active Cart exists or a `404 Not Found` otherwise. + displayName: Check if active Cart exists + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Checks if an active Cart exists. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no active Cart exists. + - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + /business-units: type: baseDomain: @@ -321,6 +356,7 @@ delete: application/json: example: !include ../examples/carts.example.json head: + displayName: Check if Cart exists by Query Predicate securedBy: [ oauth_2_0: @@ -334,7 +370,7 @@ delete: }, ] description: | - Checks if a Cart exists that matches a given Query Predicate and contains either a matching `customerId` or `anonymousId`. Returns a `200 OK` status if the Cart exists, or a `404 Not Found` otherwise. + Checks if a Cart exists that matches a given Query Predicate and contains either a matching `customerId` or `anonymousId`. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -353,7 +389,8 @@ delete: }, ] description: | - Creates a Cart for a given `customerId` or `anonymousId`. + + Creates a Cart for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Cart is automatically set based on the [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope. Specific Error Codes: @@ -370,43 +407,6 @@ delete: body: application/json: example: !include ../examples/cart.example.json - /key={key}: - (methodName): withKey - type: - baseResource: - uriParameterName: key - resourceType: Cart - resourceUpdateType: MyCartUpdate - get: - displayName: Get My Cart by Key - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/cart.example.json - head: - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - description: Checks if a Cart exists for a given `key`. Returns a `200 OK` status if the Cart exists or a `404 Not Found` otherwise. - post: - displayName: Update my cart by key - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - body: - application/json: - example: !include ../examples/cart-update.example.json - responses: - 200: - body: - application/json: - example: !include ../examples/cart.example.json - delete: - displayName: Delete my cart by key - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/cart.example.json /{ID}: (methodName): withId type: @@ -429,15 +429,20 @@ delete: }, ] description: | - Returns a Cart for a given `id`. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + Returns a Cart for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Cart exists for a given `id`. + - If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. responses: 200: body: application/json: example: !include ../examples/cart.example.json head: + displayName: Check if Cart exists by ID securedBy: [ oauth_2_0: @@ -451,9 +456,13 @@ delete: }, ] description: | - Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists, or a `404 Not Found` otherwise. + Checks if a Cart exists for a given `id`. Returns a `200 OK` status if the Cart exists. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Cart exists for a given `id`. + - If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. post: displayName: Update My Cart by ID securedBy: @@ -469,9 +478,13 @@ delete: }, ] description: | - Updates the Cart for a given `id`. Returns a `200 OK` status if the Cart exists, or a `404 Not Found` otherwise. + Updates the Cart for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Cart exists for a given `id`. + - If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. body: application/json: example: !include ../examples/cart-update.example.json @@ -495,9 +508,13 @@ delete: }, ] description: | - Deletes the Cart for a given `id`. Returns a `200 OK` status if the Cart exists, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + Deletes the Cart for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Cart exists for a given `id`. + - If the Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. - If the Cart exists in the Project but does not have a matching `customerId` or `anonymousId`, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. responses: 200: body: @@ -559,15 +576,53 @@ delete: been completed. get: displayName: Query My Orders - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Returns all Orders that match a given Query Predicate. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Orders exist for a given Query Predicate. + - If the Order exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + responses: 200: body: application/json: example: !include ../examples/orders.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - description: Checks if an Order exists for a given Query Predicate. Returns a `200 OK` status if any Orders match the Query Predicate or a `404 Not Found` otherwise. + displayName: Check if Order exists by Query Predicate + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer:{customerId}', + 'anonymous_id:{anonymousId}', + ], + }, + ] + description: | + Checks if an Order exists for a given Query Predicate. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Order exists that matches the Query Predicate. + - If one or more Orders exist but don't have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + queryParameters: where?: type: QueryPredicate[] @@ -576,10 +631,14 @@ delete: - conflicting displayName: Create My Order description: | - The Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction) for taxes to be calculated. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission). + Creates an Order from a Cart for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Order is automatically set based on the [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope. + + The Cart must have a [shipping address set](ctp:api:type:CartSetShippingAddressAction) for taxes to be calculated. When creating [B2B Orders](/associates-overview#b2b-resources), the Customer must have the `CreateMyOrdersFromMyCarts` [Permission](ctp:api:type:Permission). Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message. + If the Cart's `customerId` does not match the [customer:{id}](/scopes#customer_idid) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#anonymous_idid) scope, a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned. + If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Order by querying a unique identifier supplied during the creation request, such as the Order number. @@ -593,7 +652,18 @@ delete: - [ShippingMethodDoesNotMatchCart](ctp:api:type:ShippingMethodDoesNotMatchCartError) - [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) - [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] body: application/json: example: !include ../examples/my-order-create.example.json @@ -611,15 +681,53 @@ delete: resourceUpdateType: MyOrderUpdate get: displayName: Get My Order by ID - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] + description: | + Returns an Order for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Order exists for the given `id`. + - If the Order exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] responses: 200: body: application/json: example: !include ../examples/order.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_orders:{projectKey}'] }] - description: Checks if an Order exists for a given `id`. Returns a `200 OK` status if the Order exists or a `404 Not Found` otherwise. + displayName: Check if Order exists by ID + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_orders:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Checks if an Order exists for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Order exists for the given `id`. + - If the Order exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope. + /quotes: (methodName): orderQuote type: base @@ -638,7 +746,11 @@ delete: - [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError) - [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError) - [AssociateMissingPermission](ctp:api:type:AssociateMissingPermissionError) - securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_quotes:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: example: !include ../examples/my-order-from-quote.example.json @@ -746,25 +858,47 @@ delete: The My Quote Requests endpoint creates and provides access to Quote Requests scoped to a specific user. get: - displayName: Query My Quote Requests + displayName: Query My QuoteRequests + description: | + Returns all Quote Requests that match a given Query Predicate. Returns a `200 OK` status if successful. securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] responses: 200: body: application/json: example: !include ../examples/quote-requests.example.json head: + displayName: Check if QuoteRequest exists by Query Predicate securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] - description: Checks if my QuoteRequest exists for a given Query Predicate. Returns a `200 OK` status if any QuoteRequests match the Query Predicate or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] + description: | + Checks if a QuoteRequest exists for a given Query Predicate. Returns a `200 OK` status if any QuoteRequests match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] post: - displayName: Create My Quote Requests + displayName: Create My QuoteRequest securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] body: application/json: example: !include ../examples/my-quote-request-create.example.json @@ -781,22 +915,41 @@ delete: resourceType: QuoteRequest resourceUpdateType: MyQuoteRequestUpdate get: - displayName: Get My Quote Requests by ID + displayName: Get My QuoteRequest by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] responses: 200: body: application/json: example: !include ../examples/quote-request.example.json head: + displayName: Check if QuoteRequest exists by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] - description: Checks if my QuoteRequest exists for a given `id`. Returns a `200 OK` status if the QuoteRequest exists or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] + description: Checks if a QuoteRequest exists for a given `id`. Returns a `200 OK` status if the QuoteRequest exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: - displayName: Update My Quote Requests by ID + displayName: Update My QuoteRequest by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] body: application/json: example: !include ../examples/my-quote-request-update.example.json @@ -805,15 +958,6 @@ delete: body: application/json: example: !include ../examples/quote-request-update-response.example.json - delete: - displayName: Delete My Quote Requests by ID - securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/quote-request.example.json /key={key}: (methodName): withKey type: @@ -822,22 +966,41 @@ delete: resourceType: QuoteRequest resourceUpdateType: MyQuoteRequestUpdate get: - displayName: Get My Quote Requests by Key + displayName: Get My QuoteRequest by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] responses: 200: body: application/json: example: !include ../examples/quote-request.example.json head: + displayName: Check if QuoteRequest exists by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] - description: Checks if my QuoteRequest exists for a given `key`. Returns a `200 OK` status if the QuoteRequest exists or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] + description: Checks if a QuoteRequest exists for a given `key`. Returns a `200 OK` status if the QuoteRequest exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: - displayName: Update my Quote Requests by Key + displayName: Update My QuoteRequest by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_quote_requests:{projectKey}', 'customer_id:{id}'], + }, + ] body: application/json: example: !include ../examples/my-quote-request-update.example.json @@ -846,15 +1009,6 @@ delete: body: application/json: example: !include ../examples/quote-request-update-response.example.json - delete: - displayName: Delete my Quote Requests by Key - securedBy: - [oauth_2_0: { scopes: ['manage_my_quote_requests:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/quote-request.example.json /quotes: type: baseDomain: @@ -865,15 +1019,24 @@ delete: description: The My Quote endpoint provides access to Quotes scoped to a specific user. get: displayName: Query My Quotes - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] responses: 200: body: application/json: example: !include ../examples/quotes.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] - description: Checks if a Quote exists for a given Query Predicate. Returns a `200 OK` status if any Quotes match the Query Predicate or a `404 Not Found` otherwise. + displayName: Check if Quote exists by Query Predicate + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] + description: Checks if a Quote exists for a given Query Predicate. Returns a `200 OK` status if any Quotes match the Query Predicate or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] @@ -886,18 +1049,31 @@ delete: resourceUpdateType: MyQuoteUpdate get: displayName: Get My Quote by ID - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] responses: 200: body: application/json: example: !include ../examples/quote.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] - description: Checks if a Quote exists for a given `id`. Returns a `200 OK` status if the Quote exists or a `404 Not Found` otherwise. + displayName: Check if Quote exists by ID + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] + description: Checks if a Quote exists for a given `id`. Returns a `200 OK` status if the Quote exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update My Quote by ID - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: example: !include ../examples/my-quote-update.example.json @@ -915,18 +1091,31 @@ delete: resourceUpdateType: MyQuoteUpdate get: displayName: Get My Quote by Key - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] responses: 200: body: application/json: example: !include ../examples/quote.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] - description: Checks if a Quote exists for a given `key`. Returns a `200 OK` status if the Quote exists or a `404 Not Found` otherwise. + displayName: Check if Quote exists by Key + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] + description: Checks if a Quote exists for a given `key`. Returns a `200 OK` status if the Quote exists or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update My Quote by Key - securedBy: [oauth_2_0: { scopes: ['manage_my_quotes:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_quotes:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: example: !include ../examples/my-quote-update.example.json @@ -948,9 +1137,27 @@ delete: (createable): MyShoppingListDraft description: The My Shopping Lists endpoint creates and provides access to Shopping Lists scoped to a specific user. get: - displayName: Query my shopping lists + displayName: Query My ShoppingLists securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Returns all ShoppingLists that match the given Query Predicate. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given Query Predicate. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + queryParameters: expand: description: | @@ -963,16 +1170,47 @@ delete: application/json: example: !include ../examples/my-shopping-lists.example.json head: + displayName: Check if ShoppingList exists by Query Predicate securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] - description: Checks if a ShoppingList exists for a given Query Predicate. Returns a `200 OK` status if any ShoppingLists match the Query Predicate or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Checks if a ShoppingList matches the given Query Predicate. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given Query Predicate. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + queryParameters: where?: type: QueryPredicate[] post: - displayName: Create my shopping list + displayName: Create My ShoppingList securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Creates a ShoppingList for the Customer or anonymous user. The `customerId` or `anonymousId` on the ShoppingList is automatically set based on the given [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope. + queryParameters: expand: description: | @@ -995,9 +1233,27 @@ delete: resourceType: ShoppingList resourceUpdateType: MyShoppingListUpdate get: - displayName: Get my shopping list by id + displayName: Get My ShoppingList by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Returns a ShoppingList for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `id`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + queryParameters: expand: description: | @@ -1010,13 +1266,41 @@ delete: application/json: example: !include ../examples/my-shopping-list.example.json head: + displayName: Check if ShoppingList exists by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] - description: Checks if a ShoppingList exists for a given `id`. Returns a `200 OK` status if the ShoppingList exists or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Checks if a ShoppingList exists for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `id`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + post: - displayName: Update my shopping list by id + displayName: Update My ShoppingList by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] queryParameters: expand: description: | @@ -1026,21 +1310,47 @@ delete: body: application/json: example: !include ../examples/my-shopping-list-update.example.json + description: | + Updates a ShoppingList for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `id`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/my-shopping-list.example.json delete: - displayName: Delete my shopping list by id + displayName: Delete My ShoppingList by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] queryParameters: expand: description: | When expanding `variant` and `productSlug` on [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem), [expand the entire array](/general-concepts#reference-expansion). You cannot expand a single element (for example, `expand=lineItems[0].variant` is not supported). type: Expansion[] required: false + description: | + Deletes the ShoppingList for a given `id`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `id`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: @@ -1054,28 +1364,74 @@ delete: resourceType: ShoppingList resourceUpdateType: MyShoppingListUpdate get: - displayName: Get my shopping list by key + displayName: Get My ShoppingList by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] queryParameters: expand: description: | When expanding `variant` and `productSlug` on [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem), [expand the entire array](/general-concepts#reference-expansion). You cannot expand a single element (for example, `expand=lineItems[0].variant` is not supported). type: Expansion[] required: false + description: | + Returns a ShoppingList for a given `key`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `key`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/my-shopping-list.example.json head: + displayName: Check if ShoppingList exists by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] - description: Checks if a ShoppingList exists for a given `key`. Returns a `200 OK` status if the ShoppingList exists or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + description: | + Checks if a ShoppingList exists for a given `key`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `key`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + post: - displayName: Update my shopping list by key + displayName: Update My ShoppingList by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] queryParameters: expand: description: | @@ -1085,21 +1441,47 @@ delete: body: application/json: example: !include ../examples/my-shopping-list-update.example.json + description: | + Updates a ShoppingList for a given `key`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `key`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: application/json: example: !include ../examples/my-shopping-list.example.json delete: - displayName: Delete my shopping list by key + displayName: Delete My ShoppingList by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_shopping_lists:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] queryParameters: expand: description: | When expanding `variant` and `productSlug` on [ShoppingListLineItem](ctp:api:type:ShoppingListLineItem), [expand the entire array](/general-concepts#reference-expansion). You cannot expand a single element (for example, `expand=lineItems[0].variant` is not supported). type: Expansion[] required: false + description: | + Deletes the ShoppingList for a given `key`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no ShoppingList exists for the given `key`. + - If a ShoppingList exists but does not contain either an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#customer_idid) scope. + responses: 200: body: diff --git a/api-specs/api/resources/subscriptions.raml b/api-specs/api/resources/subscriptions.raml index e760e63784..454334a4fb 100644 --- a/api-specs/api/resources/subscriptions.raml +++ b/api-specs/api/resources/subscriptions.raml @@ -34,7 +34,7 @@ post: is: - deprecatable201 description: | - A test message is sent to ensure the correct configuration of the Destination. If the message cannot be delivered, the Subscription will not be created. The payload of the test message is a notification of type [ResourceCreated](/../api/projects/subscriptions#resourcecreateddeliverypayload) for the `resourceTypeId` `subscription`. + A test notification is sent to ensure the correct configuration of the Destination. If the notification cannot be delivered, the Subscription will not be created. The payload of the test notification is of type [ResourceCreated](/../api/projects/subscriptions#resourcecreateddeliverypayload) for the `resourceTypeId` `subscription`. body: application/json: type: SubscriptionDraft diff --git a/api-specs/api/types/cart/LineItemPriceMode.raml b/api-specs/api/types/cart/LineItemPriceMode.raml index 3b2e1ad5c6..819e5d99f1 100644 --- a/api-specs/api/types/cart/LineItemPriceMode.raml +++ b/api-specs/api/types/cart/LineItemPriceMode.raml @@ -20,5 +20,5 @@ enum: The Line Item price with the total is set externally. Cart Discounts are deactivated for Line Items with this price mode, despite a matching [CartDiscountLineItemsTarget](ctp:api:type:CartDiscountLineItemsTarget) or [MultiBuyLineItemsTarget](ctp:api:type:MultiBuyLineItemsTarget). Although a Line Item with this price mode has both `price` and `totalPrice` set externally, only `totalPrice` is used to calculate the total price of a Cart. - All update actions that change the quantity of a Line Item with this price mode can set the new price with the `externalTotal` field. - If the `externalTotal` field is not given in the update actions, the external price is unset and the price mode is set to `Platform`. + All update actions that change the quantity of a Line Item with this price mode can set the new price with the `externalTotalPrice` field. + If the `externalTotalPrice` field is not given in the update actions, the external price is unset and the price mode is set to `Platform`. diff --git a/api-specs/api/types/extension/ExtensionResourceTypeId.raml b/api-specs/api/types/extension/ExtensionResourceTypeId.raml index 359f8f5c29..4f019eca2b 100644 --- a/api-specs/api/types/extension/ExtensionResourceTypeId.raml +++ b/api-specs/api/types/extension/ExtensionResourceTypeId.raml @@ -13,6 +13,7 @@ enum: - staged-quote - quote - business-unit + - shopping-list (enumDescriptions): cart: Extension triggered for operations on [Carts](/../api/projects/carts). order: Extension triggered for operations on [Orders](/../api/projects/orders). @@ -22,3 +23,4 @@ enum: staged-quote: Extension triggered for operations on [StagedQuotes](/../api/projects/staged-quotes). quote: Extension triggered for operations on [Quotes](/../api/projects/quotes). business-unit: Extension triggered for operations on [BusinessUnits](/../api/projects/business-units). + shopping-list: Extension triggered for operations on [ShoppingLists](/../api/projects/shoppingLists). diff --git a/api-specs/api/types/product-type/AttributeReferenceTypeId.raml b/api-specs/api/types/product-type/AttributeReferenceTypeId.raml index bbd5fa6df2..d7c15549a5 100644 --- a/api-specs/api/types/product-type/AttributeReferenceTypeId.raml +++ b/api-specs/api/types/product-type/AttributeReferenceTypeId.raml @@ -12,6 +12,7 @@ enum: - category - channel - customer + - customer-group - key-value-document - order - product @@ -35,6 +36,8 @@ enum: References a [Channel](ctp:api:type:Channel). customer: | References a [Customer](ctp:api:type:Customer). + customer-group: | + References a [CustomerGroup](ctp:api:type:CustomerGroup). key-value-document: | References a [CustomObject](ctp:api:type:CustomObject). order: | diff --git a/api-specs/api/types/subscription/AwsAuthenticationMode.raml b/api-specs/api/types/subscription/AwsAuthenticationMode.raml index c306384a33..b2c0a78117 100644 --- a/api-specs/api/types/subscription/AwsAuthenticationMode.raml +++ b/api-specs/api/types/subscription/AwsAuthenticationMode.raml @@ -10,5 +10,5 @@ enum: Credentials: | Subscriptions with `Credentials` authentication mode are authenticated using an `accessKey` and `accessSecret` pair. This is the default authentication mode for backwards compatibility. IAM: | - Subscriptions with `IAM` authentication mode are authenticated using Identity and Access Management (IAM). For this authentication mode, the following user requires permissions to send messages to the queue or publish to the topic: `arn:aws-cn:iam::417094354346:user/subscriptions` if the Project is hosted in the China (AWS, Ningxia) Region; `arn:aws:iam::362576667341:user/subscriptions` for all other [Regions](/../api/general-concepts#regions). This is the recommended authentication mode, as it doesn't require additional key management. + Subscriptions with `IAM` authentication mode are authenticated using Identity and Access Management (IAM). For this authentication mode, the following user requires permissions to send notifications to the queue or publish to the topic: `arn:aws-cn:iam::417094354346:user/subscriptions` if the Project is hosted in the China (AWS, Ningxia) Region; `arn:aws:iam::362576667341:user/subscriptions` for all other [Regions](/../api/general-concepts#regions). This is the recommended authentication mode, as it doesn't require additional key management. default: Credentials diff --git a/api-specs/api/types/subscription/AzureEventGridDestination.raml b/api-specs/api/types/subscription/AzureEventGridDestination.raml index e00663a105..ef7e5abe73 100644 --- a/api-specs/api/types/subscription/AzureEventGridDestination.raml +++ b/api-specs/api/types/subscription/AzureEventGridDestination.raml @@ -5,8 +5,8 @@ displayName: AzureEventGridDestination discriminatorValue: EventGrid example: !include ../../examples/Subscription/SubscriptionAzureEventGridDestination.json description: | - [Azure Event Grid](https://azure.microsoft.com/en-us/products/event-grid/) can be used to push messages to Azure Functions, HTTP endpoints (webhooks), and several other Azure tools. Event Grid can only be used with the [CloudEventsFormat](ctp:api:type:CloudEventsFormat). - To set up a Subscription with Azure Event Grid, first create a topic in the [Azure Portal](https://azure.microsoft.com/en-us/get-started/azure-portal/). To allow Composable Commerce to push messages to your topic, provide an [access key](https://docs.microsoft.com/en-us/azure/event-grid/get-access-keys). + [Azure Event Grid](https://azure.microsoft.com/en-us/products/event-grid/) can be used to push notifications to Azure Functions, HTTP endpoints (webhooks), and several other Azure tools. Event Grid can only be used with the [CloudEventsFormat](ctp:api:type:CloudEventsFormat). + To set up a Subscription with Azure Event Grid, first create a topic in the [Azure Portal](https://azure.microsoft.com/en-us/get-started/azure-portal/). To allow Composable Commerce to push notifications to your topic, provide an [access key](https://docs.microsoft.com/en-us/azure/event-grid/get-access-keys). properties: uri: type: string diff --git a/api-specs/api/types/subscription/AzureServiceBusDestination.raml b/api-specs/api/types/subscription/AzureServiceBusDestination.raml index 6f7e400aa8..29e47761f0 100644 --- a/api-specs/api/types/subscription/AzureServiceBusDestination.raml +++ b/api-specs/api/types/subscription/AzureServiceBusDestination.raml @@ -5,7 +5,7 @@ displayName: AzureServiceBusDestination discriminatorValue: AzureServiceBus example: !include ../../examples/Subscription/SubscriptionAzureServiceBusDestination.json description: | - [Azure Service Bus](https://azure.microsoft.com/en-us/products/service-bus/) can be used as a pull-queue with [Queues](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions#queues), or to fan-out messages with [Topics and Subscriptions](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions). + [Azure Service Bus](https://azure.microsoft.com/en-us/products/service-bus/) can be used as a pull-queue with [Queues](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions#queues), or to fan-out notifications with [Topics and Subscriptions](https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions). To set up a Subscription with Azure Service Bus, first create a queue/topic in the [Azure Portal](https://azure.microsoft.com/en-us/get-started/azure-portal/) with a Shared Access Policy including the `Send` permission. properties: connectionString: diff --git a/api-specs/api/types/subscription/ChangeSubscriptionResourceTypeId.raml b/api-specs/api/types/subscription/ChangeSubscriptionResourceTypeId.raml index 5ff7c18809..a7edbc01e3 100644 --- a/api-specs/api/types/subscription/ChangeSubscriptionResourceTypeId.raml +++ b/api-specs/api/types/subscription/ChangeSubscriptionResourceTypeId.raml @@ -79,7 +79,7 @@ enum: key-value-document: | Changes to [CustomObjects](ctp:api:type:CustomObject). order: | - Changes to [Orders](ctp:api:type:Order). Changes to Orders via [Order Edits](/../api/projects/order-edits) do not trigger a Message. To achieve this, a [MessageSubscription](ctp:api:type:MessageSubscription) to [OrderEditApplied](ctp:api:type:OrderEditAppliedMessage) Message is necessary. + Changes to [Orders](ctp:api:type:Order). Modifying Orders via [Order Edits](/../api/projects/order-edits) does not trigger a notification. To achieve this, a [MessageSubscription](ctp:api:type:MessageSubscription) to the [OrderEditApplied](ctp:api:type:OrderEditAppliedMessage) Message is necessary. order-edit: | Changes to [OrderEdits](ctp:api:type:OrderEdit). payment: | diff --git a/api-specs/api/types/subscription/CloudEventsPayload.raml b/api-specs/api/types/subscription/CloudEventsPayload.raml index b0b6a601bb..b71e655504 100644 --- a/api-specs/api/types/subscription/CloudEventsPayload.raml +++ b/api-specs/api/types/subscription/CloudEventsPayload.raml @@ -5,7 +5,7 @@ displayName: CloudEventsPayload discriminatorValue: CloudEvents example: !include ../../examples/Subscription/cloudevents-payload.example.json description: | - The [CloudEventsFormat](ctp:api:type:CloudEventsFormat) represents event data in a way that conforms to a common specification. The message payload can be found inside the `data` field. + The [CloudEventsFormat](ctp:api:type:CloudEventsFormat) represents event data in a way that conforms to a common specification. The payload can be found inside the `data` field. properties: specversion: type: string diff --git a/api-specs/api/types/subscription/ConfluentCloudDestination.raml b/api-specs/api/types/subscription/ConfluentCloudDestination.raml index 4173f99b04..1b9b0c098e 100644 --- a/api-specs/api/types/subscription/ConfluentCloudDestination.raml +++ b/api-specs/api/types/subscription/ConfluentCloudDestination.raml @@ -5,9 +5,9 @@ displayName: ConfluentCloudDestination discriminatorValue: ConfluentCloud example: !include ../../examples/Subscription/SubscriptionConfluentCloudDestination.json description: | - This destination can be used to push events and messages to [Confluent Cloud](https://www.confluent.io/confluent-cloud/). + This destination can be used to push notifications to [Confluent Cloud](https://www.confluent.io/confluent-cloud/). To set up a Subscription of this type, first, create a topic in Confluent Cloud. - Then, to allow Composable Commerce to push events and messages to your topic, generate [API keys](https://docs.confluent.io/cloud/current/access-management/authenticate/api-keys/api-keys.html) for your topic, and create the Subscription destination using the generated credentials. + Then, to allow Composable Commerce to push notifications to your topic, generate [API keys](https://docs.confluent.io/cloud/current/access-management/authenticate/api-keys/api-keys.html) for your topic, and create the Subscription destination using the generated credentials. The Composable Commerce producer uses the following values: `SASL_SSL` for`security.protocol`, `PLAIN` for`sasl.mechanism`, and the default value (1048576) for `max.request.size`. properties: diff --git a/api-specs/api/types/subscription/DeliveryPayload.raml b/api-specs/api/types/subscription/DeliveryPayload.raml index 28eeca823f..fd04639927 100644 --- a/api-specs/api/types/subscription/DeliveryPayload.raml +++ b/api-specs/api/types/subscription/DeliveryPayload.raml @@ -10,7 +10,7 @@ properties: type: string description: | `key` of the [Project](ctp:api:type:Project). - Useful in message processing if the Destination receives events from multiple Projects. + Useful for processing notifications if the Destination receives them from multiple Projects. notificationType: type: string description: | @@ -18,7 +18,7 @@ properties: resource: type: Reference description: | - Reference to the resource that triggered the message. + Reference to the resource that triggered the notification. resourceUserProvidedIdentifiers?: type: UserProvidedIdentifiers description: | diff --git a/api-specs/api/types/subscription/GoogleCloudPubSubDestination.raml b/api-specs/api/types/subscription/GoogleCloudPubSubDestination.raml index 07cbecaa70..679f01d18e 100644 --- a/api-specs/api/types/subscription/GoogleCloudPubSubDestination.raml +++ b/api-specs/api/types/subscription/GoogleCloudPubSubDestination.raml @@ -8,7 +8,7 @@ description: | Destination for [Google Cloud Pub/Sub](https://cloud.google.com/pubsub/) that can be used for [Pull subscriptions](https://cloud.google.com/pubsub/docs/pull) as well as for [Push subscriptions](https://cloud.google.com/pubsub/docs/push). The `topic` must give the `pubsub.topics.publish` permission to the service account `subscriptions@commercetools-platform.iam.gserviceaccount.com`. - If used with the [CloudEventsFormat](#cloudeventsformat), the message conforms to the [PubSub Protocol Binding](https://github.com/google/knative-gcp/blob/master/docs/spec/pubsub-protocol-binding.md) of the [Structured Content Mode](https://github.com/google/knative-gcp/blob/master/docs/spec/pubsub-protocol-binding.md#32-structured-content-mode). + If used with the [CloudEventsFormat](#cloudeventsformat), the notification conforms to the [PubSub Protocol Binding](https://github.com/google/knative-gcp/blob/master/docs/spec/pubsub-protocol-binding.md) of the [Structured Content Mode](https://github.com/google/knative-gcp/blob/master/docs/spec/pubsub-protocol-binding.md#32-structured-content-mode). properties: projectId: type: string diff --git a/api-specs/api/types/subscription/MessageDeliveryPayload.raml b/api-specs/api/types/subscription/MessageDeliveryPayload.raml index 48c27b12d7..547b095512 100644 --- a/api-specs/api/types/subscription/MessageDeliveryPayload.raml +++ b/api-specs/api/types/subscription/MessageDeliveryPayload.raml @@ -34,7 +34,7 @@ properties: type: number format: int64 description: | - Version of the resource on which the change was performed. + Version of the resource on which the update was performed. payloadNotIncluded?: type: PayloadNotIncluded description: | diff --git a/api-specs/api/types/subscription/SnsDestination.raml b/api-specs/api/types/subscription/SnsDestination.raml index ccffd8317c..38ab0e5fb9 100644 --- a/api-specs/api/types/subscription/SnsDestination.raml +++ b/api-specs/api/types/subscription/SnsDestination.raml @@ -7,7 +7,7 @@ example: !include ../../examples/Subscription/SubscriptionSnsDestination.json description: | [AWS SNS](https://aws.amazon.com/sns/) can be used to push messages to AWS Lambda, HTTP endpoints (webhooks), or fan-out messages to SQS queues. The SQS queue must be a [Standard](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html) queue type. - We recommend setting `authenticationMode` to `IAM`, to avoid unnecessary key management. For IAM authentication and before creating the Subscription, give permissions to the following user account: `arn:aws-cn:iam::417094354346:user/subscriptions` if the Project is hosted in the China (AWS, Ningxia) Region; `arn:aws:iam::362576667341:user/subscriptions` for all other [Regions](/../api/general-concepts#regions). Otherwise, a test message will not be sent. + We recommend setting `authenticationMode` to `IAM`, to avoid unnecessary key management. For IAM authentication and before creating the Subscription, give permissions to the following user account: `arn:aws-cn:iam::417094354346:user/subscriptions` if the Project is hosted in the China (AWS, Ningxia) Region; `arn:aws:iam::362576667341:user/subscriptions` for all other [Regions](/../api/general-concepts#regions). Otherwise, a test notification will not be sent. If you prefer to use `Credentials` for authentication, we recommend [creating an IAM user](https://docs.aws.amazon.com/sns/latest/dg/sns-setting-up.html#create-iam-user) with an `accessKey` and `accessSecret` pair specifically for each Subscription. diff --git a/api-specs/api/types/subscription/Subscription.raml b/api-specs/api/types/subscription/Subscription.raml index 4874763e9d..00a2e2a902 100644 --- a/api-specs/api/types/subscription/Subscription.raml +++ b/api-specs/api/types/subscription/Subscription.raml @@ -36,11 +36,11 @@ properties: changes: type: ChangeSubscription[] description: | - Change notifications subscribed to. + Changes subscribed to. destination: type: Destination description: | - Messaging service to which the messages are to be sent. + Messaging service to which the notifications are sent. key?: type: string description: | diff --git a/api-specs/api/types/subscription/SubscriptionDraft.raml b/api-specs/api/types/subscription/SubscriptionDraft.raml index 6e71106941..1e519813c4 100644 --- a/api-specs/api/types/subscription/SubscriptionDraft.raml +++ b/api-specs/api/types/subscription/SubscriptionDraft.raml @@ -9,11 +9,11 @@ properties: changes?: type: ChangeSubscription[] description: | - Change notifications to be subscribed to. + Changes to be subscribed to. destination: type: Destination description: | - Messaging service to which the messages are sent. + Messaging service to which the notifications are sent. key?: type: string description: | diff --git a/api-specs/api/types/subscription/SubscriptionHealthStatus.raml b/api-specs/api/types/subscription/SubscriptionHealthStatus.raml index eb2ca0462c..7687c9887e 100644 --- a/api-specs/api/types/subscription/SubscriptionHealthStatus.raml +++ b/api-specs/api/types/subscription/SubscriptionHealthStatus.raml @@ -2,14 +2,14 @@ (package): Subscription displayName: SubscriptionHealthStatus description: | - The health status of the Subscription that indicates whether messages are being delivered. + The health status of the Subscription that indicates whether notifications are being delivered. type: string (enumDescriptions): - Healthy: Delivers messages as expected. - ConfigurationError: Messages cannot be delivered with the current configuration. Common causes are deleting the Destination queue, deleting access credentials, or removing the necessary permissions. The configuration can be fixed by re-creating the configuration on the Destination side, or by setting a new configuration with the [Change Destination](/../api/projects/subscriptions#change-destination) update action. If the configuration is fixed, undelivered messages will be delivered and the `status` will change to [Healthy](ctp:api:type:SubscriptionHealthStatus). `ConfigurationError` is automatically turned into `ConfigurationErrorDeliveryStopped` after some time. For more information, see [Delivery Guarantees](#delivery-guarantees). - ConfigurationErrorDeliveryStopped: Does not deliver messages with the current configuration and the delivery of the messages is no longer attempted. If the configuration is fixed, undelivered messages are not retained and will not be delivered. The `status` will change to [Healthy](ctp:api:type:SubscriptionHealthStatus) as soon as new messages can be delivered. - TemporaryError: Does not deliver messages temporarily due to reasons other than a configuration error. For example, the Destination has a temporary outage. - ManuallySuspended: Does not deliver messages with the current configuration and the delivery of the messages is no longer attempted. Undelivered messages are not retained and will not be delivered. The `status` will not automatically change to [Healthy](ctp:api:type:SubscriptionHealthStatus). To return your subscriptions to a [Healthy](ctp:api:type:SubscriptionHealthStatus) status, contact the [Composable Commerce support team](https://support.commercetools.com/). + Healthy: Delivers notifications as expected. + ConfigurationError: Notifications cannot be delivered with the current configuration. Common causes are deleting the Destination queue, deleting access credentials, or removing necessary permissions. You can fix the configuration by re-creating the configuration on the Destination side, or by setting a new configuration with the [Change Destination](/../api/projects/subscriptions#change-destination) update action. After the configuration is fixed, undelivered notifications will be delivered and the `status` will change to [Healthy](ctp:api:type:SubscriptionHealthStatus). `ConfigurationError` is automatically turned into `ConfigurationErrorDeliveryStopped` after some time. For more information, see [Delivery Guarantees](#delivery-guarantees). + ConfigurationErrorDeliveryStopped: Does not deliver notifications with the current configuration and the delivery of the notifications is no longer attempted. After the configuration is fixed, undelivered notifications are not retained and will not be delivered. The `status` will change to [Healthy](ctp:api:type:SubscriptionHealthStatus) as soon as new notifications can be delivered. + TemporaryError: Does not deliver notifications temporarily due to reasons other than a configuration error. For example, the Destination has a temporary outage. + ManuallySuspended: Does not deliver notifications with the current configuration and the delivery of the notifications is no longer attempted. Undelivered notifications are not retained and will not be delivered. The `status` will not automatically change to [Healthy](ctp:api:type:SubscriptionHealthStatus). To return your subscriptions to a [Healthy](ctp:api:type:SubscriptionHealthStatus) status, contact the [Composable Commerce support team](https://support.commercetools.com/). enum: - Healthy diff --git a/api-specs/api/types/subscription/updates/SubscriptionChangeDestinationAction.raml b/api-specs/api/types/subscription/updates/SubscriptionChangeDestinationAction.raml index 106ef987ed..9298c2521b 100644 --- a/api-specs/api/types/subscription/updates/SubscriptionChangeDestinationAction.raml +++ b/api-specs/api/types/subscription/updates/SubscriptionChangeDestinationAction.raml @@ -5,7 +5,7 @@ displayName: SubscriptionChangeDestinationAction discriminatorValue: changeDestination example: !include ../../../examples/Subscription/SubscriptionChangeDestinationAction.json description: | - A test message is sent to ensure the correct configuration of the Destination. If the message cannot be delivered, the update will fail. The payload of the test message is a notification of type [ResourceCreated](ctp:api:type:ResourceCreatedDeliveryPayload) for the `resourceTypeId` `subscription`. The `status` will change to [Healthy](ctp:api:type:SubscriptionHealthStatus), if it isn't already. + A test notification is sent to ensure the correct configuration of the Destination. If the notification cannot be delivered, the update will fail. The payload of the test notification is of type [ResourceCreated](ctp:api:type:ResourceCreatedDeliveryPayload) for the `resourceTypeId` `subscription`. The `status` will change to [Healthy](ctp:api:type:SubscriptionHealthStatus), if it isn't already. properties: destination: type: Destination diff --git a/api-specs/api/types/type/CustomFieldReferenceValue.raml b/api-specs/api/types/type/CustomFieldReferenceValue.raml index e346763f5c..a4a9a77ecb 100644 --- a/api-specs/api/types/type/CustomFieldReferenceValue.raml +++ b/api-specs/api/types/type/CustomFieldReferenceValue.raml @@ -13,6 +13,7 @@ enum: - category - channel - customer + - customer-group - key-value-document - order - product @@ -38,6 +39,8 @@ enum: [Channel](ctp:api:type:Channel) customer: | [Customer](ctp:api:type:Customer) + customer-group: | + [CustomerGroup](ctp:api:type:CustomerGroup) key-value-document: | [CustomObject](ctp:api:type:CustomObject) order: |