diff --git a/api-specs/api/examples/CartDiscount/CartDiscountChangeValueAction.json b/api-specs/api/examples/CartDiscount/CartDiscountChangeValueAction.json index 8796205258..9fb20b81c9 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountChangeValueAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountChangeValueAction.json @@ -7,6 +7,7 @@ "currencyCode": "EUR", "centAmount": 40099 } - ] + ], + "applicationMode": "IndividualApplication" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/extension-update-response.example.json b/api-specs/api/examples/extension-update-response.example.json new file mode 100644 index 0000000000..882edb5392 --- /dev/null +++ b/api-specs/api/examples/extension-update-response.example.json @@ -0,0 +1,21 @@ +{ + "id": "8062243c-46fc-40b5-88a4-75e2216aef75", + "version": 2, + "createdAt": "2017-01-25T14:14:22.417Z", + "lastModifiedAt": "2024-08-06T13:49:48.511Z", + "destination": { + "type": "HTTP", + "url": "https://example.azurewebsites.net/api/extension", + "authentication": { + "type": "AzureFunctions", + "key": "****code" + } + }, + "triggers": [ + { + "resourceTypeId": "cart", + "actions": ["Create", "Update"] + } + ], + "key": "my-new-extension-key" +} diff --git a/api-specs/api/examples/extension-update.example.json b/api-specs/api/examples/extension-update.example.json index b0ca53aaf3..392da2518a 100644 --- a/api-specs/api/examples/extension-update.example.json +++ b/api-specs/api/examples/extension-update.example.json @@ -1,7 +1,9 @@ { "version": 1, - "actions": [{ - "action": "setKey", - "key": "my-new-extension-key" - }] + "actions": [ + { + "action": "setKey", + "key": "my-new-extension-key" + } + ] } diff --git a/api-specs/api/examples/extension.example.json b/api-specs/api/examples/extension.example.json index 54cccc5e06..2094a8b2a8 100644 --- a/api-specs/api/examples/extension.example.json +++ b/api-specs/api/examples/extension.example.json @@ -8,12 +8,14 @@ "url": "https://example.azurewebsites.net/api/extension", "authentication": { "type": "AzureFunctions", - "key": "some-azure-function-code" + "key": "****code" } }, - "triggers": [{ - "resourceTypeId": "cart", - "actions": ["Create", "Update"] - }], + "triggers": [ + { + "resourceTypeId": "cart", + "actions": ["Create", "Update"] + } + ], "key": "my-extension" } diff --git a/api-specs/api/examples/state-create.example.json b/api-specs/api/examples/state-create.example.json index 210d50e195..7273d9e1f0 100644 --- a/api-specs/api/examples/state-create.example.json +++ b/api-specs/api/examples/state-create.example.json @@ -1,6 +1,12 @@ { - "key": "test-state", - "type": "ProductState", + "key": "Initial", + "type": "LineItemState", "roles": [], + "name": { + "en": "Initial" + }, + "description": { + "en": "Initial is the first State that a (custom) Line Item gets after its creation." + }, "initial": true } diff --git a/api-specs/api/examples/state-update-response.example.json b/api-specs/api/examples/state-update-response.example.json new file mode 100644 index 0000000000..91dcdfb0f2 --- /dev/null +++ b/api-specs/api/examples/state-update-response.example.json @@ -0,0 +1,17 @@ +{ + "id": "7c2e2694-aefe-43d7-888e-6a99514caaca", + "version": 2, + "key": "Initial", + "type": "LineItemState", + "roles": [], + "name": { + "en": "New Name" + }, + "description": { + "en": "Initial is the first State that a (custom) Line Item gets after its creation." + }, + "builtIn": true, + "initial": true, + "createdAt": "2015-01-21T09:22:03.906Z", + "lastModifiedAt": "2024-08-06T13:49:48.511Z" +} diff --git a/api-specs/api/examples/state-update.example.json b/api-specs/api/examples/state-update.example.json index f04710fc9b..e94e276728 100644 --- a/api-specs/api/examples/state-update.example.json +++ b/api-specs/api/examples/state-update.example.json @@ -1,9 +1,11 @@ { "version": 1, - "actions": [{ - "action": "setName", - "name": { - "en": "New Name" + "actions": [ + { + "action": "setName", + "name": { + "en": "New Name" + } } - }] + ] } diff --git a/api-specs/api/examples/state.example.json b/api-specs/api/examples/state.example.json index d78765f906..dd808e6173 100644 --- a/api-specs/api/examples/state.example.json +++ b/api-specs/api/examples/state.example.json @@ -8,7 +8,7 @@ "en": "Initial" }, "description": { - "en": "Initial is the first that (custom) line item gets after its creation" + "en": "Initial is the first State that a (custom) Line Item gets after its creation." }, "builtIn": true, "initial": true, diff --git a/api-specs/api/examples/states.example.json b/api-specs/api/examples/states.example.json index 9f78f89d81..6853e629c8 100644 --- a/api-specs/api/examples/states.example.json +++ b/api-specs/api/examples/states.example.json @@ -14,7 +14,7 @@ "en": "Initial" }, "description": { - "en": "Initial is the first that (custom) line item gets after it's creation" + "en": "Initial is the first State that a (custom) Line Item gets after its creation." }, "builtIn": true, "initial": true, diff --git a/api-specs/api/examples/subscription-create.example.json b/api-specs/api/examples/subscription-create.example.json index a335406032..9b580a9915 100644 --- a/api-specs/api/examples/subscription-create.example.json +++ b/api-specs/api/examples/subscription-create.example.json @@ -1,9 +1,9 @@ { "destination": { "type": "SQS", - "queueUrl": "", + "queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue", "authenticationMode": "IAM", - "region": "" + "region": "my-region" }, "messages": [ { diff --git a/api-specs/api/examples/subscription-update-response.example.json b/api-specs/api/examples/subscription-update-response.example.json new file mode 100644 index 0000000000..8753bed656 --- /dev/null +++ b/api-specs/api/examples/subscription-update-response.example.json @@ -0,0 +1,24 @@ +{ + "id": "bf79c5d2-2813-4229-9a88-e7c76be50986", + "version": 2, + "destination": { + "type": "SQS", + "queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue", + "authenticationMode": "IAM", + "region": "my-region" + }, + "messages": [ + { + "resourceTypeId": "product", + "types": [] + } + ], + "changes": [], + "createdAt": "2017-01-25T14:14:22.417Z", + "key": "new-key", + "format": { + "type": "Platform" + }, + "lastModifiedAt": "2024-08-06T13:49:48.511Z", + "status": "Healthy" +} diff --git a/api-specs/api/examples/subscription-update.example.json b/api-specs/api/examples/subscription-update.example.json index e737552346..c6bc40482c 100644 --- a/api-specs/api/examples/subscription-update.example.json +++ b/api-specs/api/examples/subscription-update.example.json @@ -1,7 +1,9 @@ { "version": 1, - "actions": [{ - "action": "setKey", - "key": "queue-key" - }] + "actions": [ + { + "action": "setKey", + "key": "new-key" + } + ] } diff --git a/api-specs/api/examples/subscription.example.json b/api-specs/api/examples/subscription.example.json index 19b703c589..1e01d75ee3 100644 --- a/api-specs/api/examples/subscription.example.json +++ b/api-specs/api/examples/subscription.example.json @@ -1,11 +1,11 @@ { - "id": "8062243c-46fc-40b5-88a4-75e2216aef75", + "id": "bf79c5d2-2813-4229-9a88-e7c76be50986", "version": 1, "destination": { "type": "SQS", - "queueUrl": "", + "queueUrl": "https://sqs.my-region.amazonaws.com/my-aws-account-number/my-queue", "authenticationMode": "IAM", - "region": "" + "region": "my-region" }, "messages": [ { diff --git a/api-specs/api/examples/subscriptions.example.json b/api-specs/api/examples/subscriptions.example.json index 44364b179f..e16bc159f3 100644 --- a/api-specs/api/examples/subscriptions.example.json +++ b/api-specs/api/examples/subscriptions.example.json @@ -5,7 +5,7 @@ "total": 1, "results": [ { - "id": "8062243c-46fc-40b5-88a4-75e2216aef75", + "id": "bf79c5d2-2813-4229-9a88-e7c76be50986", "version": 1, "destination": { "type": "SQS", diff --git a/api-specs/api/examples/type-update-response.example.json b/api-specs/api/examples/type-update-response.example.json new file mode 100644 index 0000000000..0eeedc5dab --- /dev/null +++ b/api-specs/api/examples/type-update-response.example.json @@ -0,0 +1,27 @@ +{ + "id": "3ae9bcca-df23-443e-bd22-0c592f9694fa", + "version": 2, + "key": "lineitemtype", + "name": { + "en": "New Name" + }, + "description": { + "en": "description" + }, + "resourceTypeIds": ["line-item"], + "fieldDefinitions": [ + { + "name": "offer_name", + "label": { + "en": "offer_name" + }, + "required": false, + "type": { + "name": "String" + }, + "inputHint": "SingleLine" + } + ], + "createdAt": "2015-10-07T06:56:19.217Z", + "lastModifiedAt": "2024-08-06T13:49:48.511Z" +} diff --git a/api-specs/api/examples/type-update.example.json b/api-specs/api/examples/type-update.example.json index 7cb405d234..d882d11493 100644 --- a/api-specs/api/examples/type-update.example.json +++ b/api-specs/api/examples/type-update.example.json @@ -1,9 +1,11 @@ { "version": 1, - "actions": [{ - "action": "changeName", - "name": { - "en": "New Name" + "actions": [ + { + "action": "changeName", + "name": { + "en": "New Name" + } } - }] + ] } diff --git a/api-specs/api/resources/discount-codes.raml b/api-specs/api/resources/discount-codes.raml index 51eab06f3c..1d33fd54ce 100644 --- a/api-specs/api/resources/discount-codes.raml +++ b/api-specs/api/resources/discount-codes.raml @@ -12,7 +12,7 @@ description: Discount Codes can be added to a discount-code to enable certain discount-code discounts. get: - description: 'Deprecated scope: `view_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }] responses: 200: @@ -29,7 +29,7 @@ post: description: | Creating a Discount Code produces the [DiscountCodeCreated](ctp:api:type:DiscountCodeCreatedMessage) Message. - Deprecated scope: `manage_orders:{projectKey}` + Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}` securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }] body: application/json: @@ -47,7 +47,7 @@ post: resourceType: DiscountCode resourceUpdateType: DiscountCodeUpdate get: - description: 'Deprecated scope: `view_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: [' view_discount_codes:{projectKey}'] }] responses: 200: @@ -58,7 +58,7 @@ post: securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }] description: Checks if a DiscountCode exists for a given `id`. Returns a `200 OK` status if the DiscountCode exists or a `404 Not Found` otherwise. post: - description: 'Deprecated scope: `manage_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }] body: application/json: @@ -74,7 +74,7 @@ post: description: | Deleting a Discount Code produces the [DiscountCodeDeleted](ctp:api:type:DiscountCodeDeletedMessage) Message. - Deprecated scope: `manage_orders:{projectKey}` + Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}` securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }] responses: 200: @@ -89,7 +89,7 @@ post: resourceType: DiscountCode resourceUpdateType: DiscountCodeUpdate get: - description: 'Deprecated scope: `view_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: [' view_discount_codes:{projectKey}'] }] responses: 200: @@ -100,7 +100,7 @@ post: securedBy: [oauth_2_0: { scopes: ['view_discount_codes:{projectKey}'] }] description: Checks if a DiscountCode exists for a given `key`. Returns a `200 OK` status if the DiscountCode exists or a `404 Not Found` otherwise. post: - description: 'Deprecated scope: `manage_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }] body: application/json: @@ -116,7 +116,7 @@ post: description: | Deleting a Discount Code produces the [DiscountCodeDeleted](ctp:api:type:DiscountCodeDeletedMessage) Message. - Deprecated scope: `manage_orders:{projectKey}` + Deprecated OAuth 2.0 Scope: `manage_orders:{projectKey}` securedBy: [oauth_2_0: { scopes: ['manage_discount_codes:{projectKey}'] }] responses: 200: diff --git a/api-specs/api/resources/extensions.raml b/api-specs/api/resources/extensions.raml index e89073b27d..d72765d839 100644 --- a/api-specs/api/resources/extensions.raml +++ b/api-specs/api/resources/extensions.raml @@ -75,7 +75,7 @@ post: body: application/json: type: Extension - example: !include ../examples/extension.example.json + example: !include ../examples/extension-update-response.example.json delete: displayName: Delete Extension by key securedBy: [oauth_2_0: { scopes: ['manage_extensions:{projectKey}'] }] @@ -122,7 +122,7 @@ post: body: application/json: type: Extension - example: !include ../examples/extension.example.json + example: !include ../examples/extension-update-response.example.json delete: displayName: Delete Extension by ID securedBy: [oauth_2_0: { scopes: ['manage_extensions:{projectKey}'] }] diff --git a/api-specs/api/resources/in-store.raml b/api-specs/api/resources/in-store.raml index 4cbd7b4be0..07e5d4a921 100644 --- a/api-specs/api/resources/in-store.raml +++ b/api-specs/api/resources/in-store.raml @@ -35,6 +35,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: @@ -46,7 +47,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 +105,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: @@ -115,6 +116,7 @@ uriParameters: application/json: example: !include ../examples/cart.example.json head: + displayName: Check if Cart exists in Store by Customer ID securedBy: [ oauth_2_0: @@ -126,7 +128,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 +150,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: @@ -157,6 +159,7 @@ uriParameters: application/json: example: !include ../examples/cart.example.json head: + displayName: Check if Cart exists in Store by Key securedBy: [ oauth_2_0: @@ -168,7 +171,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 +186,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 +198,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 +274,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: @@ -280,6 +283,7 @@ uriParameters: application/json: example: !include ../examples/cart.example.json head: + displayName: Check if Cart exists in Store by ID securedBy: [ oauth_2_0: @@ -291,7 +295,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 +311,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 +323,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: @@ -371,6 +375,7 @@ uriParameters: application/json: example: !include ../examples/orders.example.json head: + displayName: Check if Order exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -382,7 +387,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[] @@ -431,7 +436,7 @@ uriParameters: type: base displayName: Order from Quote post: - displayName: Create an Order from a Quote + displayName: Create Order in Store from Quote description: | Creating an Order produces the [OrderCreated](ctp:api:type:OrderCreatedMessage) Message. @@ -488,13 +493,14 @@ 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: application/json: example: !include ../examples/order.example.json head: + displayName: Check if Order exists in Store by OrderNumber securedBy: [ oauth_2_0: @@ -506,7 +512,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 +527,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 +539,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,13 +581,14 @@ 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: application/json: example: !include ../examples/order.example.json head: + displayName: Check if My Order exists in Store by ID securedBy: [ oauth_2_0: @@ -593,7 +600,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 +615,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 +627,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 +684,7 @@ uriParameters: application/json: example: !include ../examples/carts.example.json head: + displayName: Check if My Cart exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -691,7 +699,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 +719,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#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +763,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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 My Cart exists in Store by ID securedBy: [ oauth_2_0: @@ -794,11 +807,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. - 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 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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +839,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. + + 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 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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +873,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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. responses: 200: body: application/json: example: !include ../examples/orders.example.json head: + displayName: Check if My Order exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -871,20 +895,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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +945,8 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -926,7 +967,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + securedBy: [ oauth_2_0: @@ -935,6 +983,8 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -944,6 +994,7 @@ uriParameters: application/json: example: !include ../examples/order.example.json head: + displayName: Check if My Order exists in Store by ID securedBy: [ oauth_2_0: @@ -952,20 +1003,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + is: - expandable securedBy: @@ -976,6 +1042,8 @@ uriParameters: [ 'manage_my_orders:{projectKey}', 'manage_my_orders:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -986,6 +1054,7 @@ uriParameters: type: Cart example: !include ../examples/cart.example.json head: + displayName: Check if active Cart exists in Store securedBy: [ oauth_2_0: @@ -994,10 +1063,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + /shopping-lists: type: baseDomain: @@ -1009,7 +1088,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + securedBy: [ oauth_2_0: @@ -1018,6 +1106,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1033,6 +1123,7 @@ uriParameters: application/json: example: !include ../examples/shopping-lists.example.json head: + displayName: Check if My ShoppingList exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -1041,15 +1132,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1159,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1071,6 +1174,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#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +1191,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 +1200,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1104,13 +1212,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#composable-commerce-oauth) scope, + or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json head: + displayName: Check if My ShoppingList exists in Store by Key securedBy: [ oauth_2_0: @@ -1119,12 +1236,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1260,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1146,15 +1275,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1300,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1175,8 +1312,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: @@ -1190,7 +1333,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 +1342,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}:{storeKey}', 'manage_my_shopping_lists:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1209,14 +1354,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json head: + displayName: Check if My ShoppingList exists in Store by ID securedBy: [ oauth_2_0: @@ -1225,12 +1377,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1401,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1252,15 +1416,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1441,8 @@ uriParameters: [ 'manage_my_shopping_lists:{projectKey}', 'manage_my_shopping_lists:{projectKey}:{storeKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', ], }, ] @@ -1281,15 +1453,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. + 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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: application/json: example: !include ../examples/shopping-list.example.json get: - displayName: Get my customer details in a store + displayName: Get My Customer in Store is: - sortable: sortExample: createdAt asc @@ -1305,9 +1483,19 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'customer_id:{id}', ], }, ] + description: | + Returns a Customer for a given Query Predicate in a [Store](ctp:api:type:Store). Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Customer exists in the Store for the given Query Predicate. + - If a Customer exists in the Store for the given Query Predicate, but does not have an `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + - If a Customer exists for the given Query Predicate but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope. + responses: 200: body: @@ -1315,7 +1503,7 @@ uriParameters: example: !include ../examples/customer.example.json type: Customer post: - displayName: Update my customer in a store + displayName: Update My Customer in Store securedBy: [ oauth_2_0: @@ -1324,9 +1512,18 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'customer_id:{id}', ], }, ] + description: | + Updates the Customer in a [Store](ctp:api:type:Store). Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Customer exists with the `id` specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. + - If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope. + body: application/json: example: !include ../examples/customer-update.example.json @@ -1338,7 +1535,7 @@ uriParameters: example: !include ../examples/customer-update-response.example.json type: Customer delete: - displayName: Delete my Customer in a store + displayName: Delete My Customer in Store is: - versioned - conflicting @@ -1350,9 +1547,18 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'customer_id:{id}', ], }, ] + description: | + Deletes the Customer in a [Store](ctp:api:type:Store). Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Customer exists with the `id` specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. + - If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope. + responses: 200: body: @@ -1362,9 +1568,15 @@ uriParameters: /email/confirm: type: base post: - displayName: Verify my Customer's Email in a store + displayName: Verify email of My Customer in Store description: | - This is the last step in the [email verification process of a Customer](/../api/projects/customers#email-verification-of-customer-in-store). + This is the last step in the [email verification process of a Customer](/../api/projects/customers#email-verification-of-customer-in-store). Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Customer exists with the `id` specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. + - If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope. + securedBy: [ oauth_2_0: @@ -1373,6 +1585,7 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'customer_id:{id}', ], }, ] @@ -1390,9 +1603,15 @@ uriParameters: /password: type: base post: - displayName: Change my customers password in a store + displayName: Change password of My Customer in Store description: | - Changing the password of the Customer produces the [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=false`. + Changing the password of the Customer produces the [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=false`. Returns a `200 OK` status if successful. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Customer exists with the `id` specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. + - If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope. + is: - conflicting securedBy: @@ -1403,6 +1622,7 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'customer_id:{id}', ], }, ] @@ -1419,11 +1639,17 @@ uriParameters: /reset: type: base post: - displayName: Reset my Customer's Password in a store + displayName: Reset password of My Customer in Store description: | This is the last step in the [password reset process of the authenticated Customer](/../api/projects/customers#password-reset-of-customer-in-store). - Resetting a password produces the of the Customer [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=true`. + Resetting a password produces the Customer [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=true`. + + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Customer exists with the `id` specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. + - If the Customer exists but is associated with a different Store than what is specified in the `manage_my_profile:{projectKey}:{storeKey}` scope. + securedBy: [ oauth_2_0: @@ -1432,6 +1658,7 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'customer_id:{id}', ], }, ] @@ -1448,8 +1675,11 @@ uriParameters: /signup: type: base post: - displayName: Signup my customer in a store + displayName: Create (sign up) My Customer in Store description: | + + If used with an optional [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly created Customer. + If omitted in the request body, the [Customer](ctp:api:type:Customer) `stores` field is set to the [Store](ctp:api:type:Store) specified in the path parameter. A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError). @@ -1463,6 +1693,7 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'anonymous_id:{id}', ], }, ] @@ -1479,10 +1710,13 @@ uriParameters: /login: type: base post: - displayName: Authenticate my Customer (Sign In) in a store + displayName: Authenticate (sign in) My Customer in Store description: | + Retrieves the authenticated Customer (that matches the given email/password pair) if they are part of a specific [Store](ctp:api:type:Store). + If used with an optional [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly logged-in Customer. + - If the Customer does not have a Cart, the most recently modified anonymous cart becomes the Customer's Cart. - If the Customer already has a Cart, the most recently modified anonymous cart is handled according to [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode). @@ -1498,6 +1732,7 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'anonymous_id:{id}', ], }, ] @@ -1543,12 +1778,12 @@ 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[] post: - displayName: Create customer in store + displayName: Create Customer in Store securedBy: - oauth_2_0: scopes: @@ -1942,7 +2177,7 @@ uriParameters: description: | shopping-lists e.g. for wishlist support get: - displayName: Get shopping lists in store + displayName: Query ShoppingLists in Store securedBy: [ oauth_2_0: @@ -1966,6 +2201,7 @@ uriParameters: application/json: example: !include ../examples/shopping-lists.example.json head: + displayName: Check if ShoppingList exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -1977,12 +2213,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 ShoppingList in Store securedBy: [ oauth_2_0: @@ -2018,7 +2254,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: @@ -2045,6 +2281,7 @@ uriParameters: application/json: example: !include ../examples/shopping-list.example.json head: + displayName: Check if ShoppingList exists in Store by Key securedBy: [ oauth_2_0: @@ -2056,9 +2293,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 +2325,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 +2361,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: @@ -2151,6 +2388,7 @@ uriParameters: application/json: example: !include ../examples/shopping-list.example.json head: + displayName: Check if ShoppingList exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -2162,9 +2400,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 +2432,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: @@ -2781,7 +3019,7 @@ uriParameters: type: boolean description: If `true`, only the staged ProductTailoringVariant is updated. If `false`, both the current and staged ProductTailoringVariant are updated. description: | - Upload a JPEG, PNG and GIF file to a [ProductTailoringVariant](ctp:api:type:ProductTailoringVariant). The maximum file size of the image is 10MB. `variant` or `sku` is required to update a specific ProductVariant. Produces the [ProductTailoringImageAdded](/projects/messages#product-tailoring-image-added) Message when the `Small` version of the image has been uploaded to the CDN. + Upload a JPEG, PNG and GIF file to a [ProductTailoringVariant](ctp:api:type:ProductTailoringVariant). The maximum file size of the image is 10MB. `variant` or `sku` is required to update a specific ProductVariant. Produces the [ProductTailoringImageAdded](/projects/messages/product-catalog-messages#product-tailoring-image-added) Message when the `Small` version of the image has been uploaded to the CDN. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] body: type: file @@ -2890,7 +3128,7 @@ uriParameters: type: boolean description: If `true`, only the staged ProductTailoringVariant is updated. If `false`, both the current and staged ProductTailoringVariant are updated. description: | - Upload a JPEG, PNG and GIF file to a [ProductTailoringVariant](ctp:api:type:ProductTailoringVariant). The maximum file size of the image is 10MB. `variant` or `sku` is required to update a specific ProductVariant. Produces the [ProductTailoringImageAdded](/projects/messages#product-tailoring-image-added) Message when the `Small` version of the image has been uploaded to the CDN. + Upload a JPEG, PNG and GIF file to a [ProductTailoringVariant](ctp:api:type:ProductTailoringVariant). The maximum file size of the image is 10MB. `variant` or `sku` is required to update a specific ProductVariant. Produces the [ProductTailoringImageAdded](/projects/messages/product-catalog-messages#product-tailoring-image-added) Message when the `Small` version of the image has been uploaded to the CDN. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] body: type: file @@ -2916,6 +3154,7 @@ uriParameters: (createable): QuoteRequestDraft description: A request for a Quote holds product variants and can be ordered. get: + displayName: Query QuoteRequests in Store securedBy: [ oauth_2_0: @@ -2933,6 +3172,7 @@ uriParameters: application/json: example: !include ../examples/quote-requests.example.json head: + displayName: Check if QuoteRequest exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -2944,11 +3184,13 @@ 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[] post: + displayName: Create QuoteRequest in Store + description: | securedBy: [ oauth_2_0: @@ -2976,6 +3218,7 @@ uriParameters: resourceType: QuoteRequest resourceUpdateType: QuoteRequestUpdate get: + displayName: Get QuoteRequest in Store by Key securedBy: [ oauth_2_0: @@ -2993,6 +3236,7 @@ uriParameters: application/json: example: !include ../examples/quote-request.example.json head: + displayName: Check if QuoteRequest exists in Store by Key securedBy: [ oauth_2_0: @@ -3004,8 +3248,9 @@ 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: + displayName: Update QuoteRequest in Store by Key securedBy: [ oauth_2_0: @@ -3026,6 +3271,7 @@ uriParameters: application/json: example: !include ../examples/quote-request-update-response.example.json delete: + displayName: Delete QuoteRequest in Store by Key is: - dataErasure securedBy: @@ -3052,6 +3298,7 @@ uriParameters: resourceType: QuoteRequest resourceUpdateType: QuoteRequestUpdate get: + displayName: Get QuoteRequest in Store by ID securedBy: [ oauth_2_0: @@ -3069,6 +3316,7 @@ uriParameters: application/json: example: !include ../examples/quote-request.example.json head: + displayName: Check if QuoteRequest exists in Store by ID securedBy: [ oauth_2_0: @@ -3080,8 +3328,9 @@ 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: + displayName: Update QuoteRequest in Store by ID securedBy: [ oauth_2_0: @@ -3102,6 +3351,7 @@ uriParameters: application/json: example: !include ../examples/quote-request-update-response.example.json delete: + displayName: Delete QuoteRequest in Store by ID is: - dataErasure securedBy: @@ -3133,6 +3383,7 @@ uriParameters: (createable): StagedQuoteDraft description: A staged quote holds the negotiation between the [Buyer](/../api/quotes-overview#buyer) and the [Seller](/../api/quotes-overview#seller). get: + displayName: Query StagedQuotes in Store securedBy: [ oauth_2_0: @@ -3150,6 +3401,7 @@ uriParameters: application/json: example: !include ../examples/staged-quotes.example.json head: + displayName: Check if StagedQuote exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -3161,11 +3413,12 @@ 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[] post: + displayName: Create StagedQuote in Store securedBy: [ oauth_2_0: @@ -3193,6 +3446,7 @@ uriParameters: resourceType: StagedQuote resourceUpdateType: StagedQuoteUpdate get: + displayName: Get StagedQuote in Store by Key securedBy: [ oauth_2_0: @@ -3210,6 +3464,7 @@ uriParameters: application/json: example: !include ../examples/staged-quote.example.json head: + displayName: Check if StagedQuote exists in Store by Key securedBy: [ oauth_2_0: @@ -3221,8 +3476,9 @@ 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: + displayName: Update StagedQuote in Store by Key securedBy: [ oauth_2_0: @@ -3243,6 +3499,7 @@ uriParameters: application/json: example: !include ../examples/staged-quote.example.json delete: + displayName: Delete StagedQuote in Store by Key is: - dataErasure securedBy: @@ -3269,6 +3526,7 @@ uriParameters: resourceType: StagedQuote resourceUpdateType: StagedQuoteUpdate get: + displayName: Get StagedQuote in Store by ID securedBy: [ oauth_2_0: @@ -3286,6 +3544,7 @@ uriParameters: application/json: example: !include ../examples/staged-quote.example.json head: + displayName: Check if StagedQuote exists in Store by ID securedBy: [ oauth_2_0: @@ -3297,8 +3556,9 @@ 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: + displayName: Update StagedQuote in Store by ID securedBy: [ oauth_2_0: @@ -3319,6 +3579,7 @@ uriParameters: application/json: example: !include ../examples/staged-quote.example.json delete: + displayName: Delete StagedQuote in Store by ID is: - dataErasure securedBy: @@ -3350,6 +3611,7 @@ uriParameters: (createable): QuoteDraft description: A quote holds the negotiated offer. get: + displayName: Query Quotes in Store securedBy: [ oauth_2_0: @@ -3367,6 +3629,7 @@ uriParameters: application/json: example: !include ../examples/quotes.example.json head: + displayName: Check if Quote exists in Store by Query Predicate securedBy: [ oauth_2_0: @@ -3378,11 +3641,12 @@ 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[] post: + displayName: Create Quote in Store securedBy: [ oauth_2_0: @@ -3410,6 +3674,7 @@ uriParameters: resourceType: Quote resourceUpdateType: QuoteUpdate get: + displayName: Get Quote in Store by Key securedBy: [ oauth_2_0: @@ -3427,6 +3692,7 @@ uriParameters: application/json: example: !include ../examples/quote.example.json head: + displayName: Check if Quote exists in Store by Key securedBy: [ oauth_2_0: @@ -3438,8 +3704,9 @@ 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: + displayName: Update Quote in Store by Key securedBy: [ oauth_2_0: @@ -3460,6 +3727,7 @@ uriParameters: application/json: example: !include ../examples/quote.example.json delete: + displayName: Delete Quote in Store by Key is: - dataErasure securedBy: @@ -3486,6 +3754,7 @@ uriParameters: resourceType: Quote resourceUpdateType: QuoteUpdate get: + displayName: Get Quote in Store by ID securedBy: [ oauth_2_0: @@ -3503,6 +3772,7 @@ uriParameters: application/json: example: !include ../examples/quote.example.json head: + displayName: Check if Quote exists in Store by ID securedBy: [ oauth_2_0: @@ -3514,8 +3784,9 @@ 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: + displayName: Update Quote in Store by ID securedBy: [ oauth_2_0: @@ -3536,6 +3807,7 @@ uriParameters: application/json: example: !include ../examples/quote.example.json delete: + displayName: Delete Quote in Store by ID is: - dataErasure securedBy: diff --git a/api-specs/api/resources/me.raml b/api-specs/api/resources/me.raml index e2bf4880c6..c8052b9e2c 100644 --- a/api-specs/api/resources/me.raml +++ b/api-specs/api/resources/me.raml @@ -1,13 +1,25 @@ type: base get: - displayName: Get my customer details + displayName: Get My Customer is: - sortable: - paging - expandable - query: whereExample: 'customerEmail = "email@example.com"' - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'customer_id:{id}'] }, + ] + description: | + Returns a Customer 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 Customer exists for the given Query Predicate. + - If a Customer exists for the given Query Predicate, but does not have an `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: @@ -15,12 +27,18 @@ get: example: !include ../examples/customer.example.json type: Customer post: - displayName: Update my customer - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + displayName: Update My Customer + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: example: !include ../examples/customer-update.example.json type: MyCustomerUpdate + description: | + Updates the Customer specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. Returns a `200 OK` status if successful. responses: 200: body: @@ -28,11 +46,16 @@ post: example: !include ../examples/customer-update-response.example.json type: Customer delete: - displayName: Delete my Customer + displayName: Delete My Customer is: - versioned - conflicting - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'customer_id:{id}'] }, + ] + description: Deletes the Customer specified in the [customer:{id}](/scopes#composable-commerce-oauth) scope. Returns a `200 OK` status if successful. responses: 200: body: @@ -42,10 +65,14 @@ delete: /email/confirm: type: base post: - displayName: Verify my Customer's Email + displayName: Verify email of My Customer description: | This is the last step in the [email verification process of a Customer](/../api/projects/customers#email-verification-of-customer). - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: example: !include ../examples/Customer/CustomerEmailVerify.json @@ -60,14 +87,18 @@ delete: /password: type: base post: - displayName: Change my customers password + displayName: Change password of My Customer description: | Changing the password of the Customer produces the [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=false`. If the current password does not match, an [InvalidCurrentPassword](ctp:api:type:InvalidCurrentPasswordError) error is returned. is: - conflicting - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: type: MyCustomerChangePassword @@ -81,12 +112,16 @@ delete: /reset: type: base post: - displayName: Reset my Customer's Password + displayName: Reset password of My Customer description: | This is the last step in the [password reset process of a Customer](/../api/projects/customers#password-reset-of-customer). Resetting a password of the Customer produces the [CustomerPasswordUpdated](ctp:api:type:CustomerPasswordUpdatedMessage) Message with `reset=true`. - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'customer_id:{id}'] }, + ] body: application/json: example: !include ../examples/Customer/CustomerResetPassword.json @@ -100,12 +135,16 @@ delete: /signup: type: base post: - displayName: Signup my customer + displayName: Create (sign up) My Customer description: | - If used with an [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly created Customer. + If used with an optional [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly created Customer. Creating a Customer produces the [CustomerCreated](ctp:api:type:CustomerCreatedMessage) Message. - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'anonymous_id:{id}'] }, + ] body: application/json: example: !include ../examples/customer-create.example.json @@ -119,11 +158,11 @@ delete: /login: type: base post: - displayName: Authenticate my Customer (Sign In) + displayName: Authenticate (sign in) My Customer description: | Retrieves the authenticated customer (that matches the given email/password pair). - If used with [an access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly logged-in Customer. + If used with an optional [access token for an anonymous session](ctp:api:type:AnonymousSession), all Orders and Carts that belong to the `anonymousId` are assigned to the newly logged-in Customer. - If the Customer does not have a Cart yet, the most recently modified anonymous cart becomes the Customer's Cart. - If the Customer already has a Cart, the most recently modified anonymous cart is handled in accordance with [AnonymousCartSignInMode](ctp:api:type:AnonymousCartSignInMode). @@ -131,8 +170,11 @@ delete: A Cart returned in the [CustomerSignInResult](ctp:api:type:CustomerSignInResult) has any invalid Line Items removed and is [updated](/api/carts-orders-overview#cart-updates) with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError). If an account with the given credentials is not found, an [InvalidCredentials](ctp:api:type:InvalidCredentialsError) error is returned. - - securedBy: [oauth_2_0: { scopes: ['manage_my_profile:{projectKey}'] }] + securedBy: + [ + oauth_2_0: + { scopes: ['manage_my_profile:{projectKey}', 'anonymous_id:{id}'] }, + ] body: application/json: type: MyCustomerSignin @@ -146,23 +188,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 My active Cart exists by Query Predicate + 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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + /business-units: type: baseDomain: @@ -177,24 +254,47 @@ delete: description: MyBusinessUnit creates and provides access to Business Units scoped to a specific user. get: displayName: Query My Business Units + description: | + Returns all of the authenticated Customer’s Business Units in a Project. Returns a `200 OK` status if successful, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] responses: 200: body: application/json: example: !include ../examples/my-business-units.example.json head: + displayName: Check if My Business Unit exists by Query Predicate securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] - description: Checks if a BusinessUnit exists for a given Query Predicate. Returns a `200 OK` status if any BusinessUnits match the Query Predicate or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] + description: | + Checks if a BusinessUnit exists for a given Query Predicate. Returns a `200 OK` status if any BusinessUnits match the Query Predicate and the Customer has access to them, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. queryParameters: where?: type: QueryPredicate[] post: displayName: Create My Business Units securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] description: | Automatically assigns the Associate to the Business Unit in the default [Associate Role](ctp:api:type:AssociateRole) defined in [BusinessUnitConfiguration](ctp:api:type:BusinessUnitConfiguration). If there is no default Associate Role configured, this request fails with an [InvalidOperation](ctp:api:type:InvalidOperationError) error. When creating a Division, the Associate must have the `AddChildUnits` [Permission](ctp:api:type:Permission) in the parent unit. If the required [Permission](/projects/associate-roles#permission) is missing, an [AssociateMissingPermission](/errors#associatemissingpermission) error is returned. body: @@ -213,22 +313,46 @@ delete: resourceType: BusinessUnit resourceUpdateType: MyBusinessUnitUpdate get: - displayName: Get My Business Units by ID + displayName: Get My Business Unit by ID + description: | + Returns a Business Unit for a given `id`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] responses: 200: body: application/json: example: !include ../examples/my-business-unit.example.json head: + displayName: Check if My Business Unit exists by ID securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] - description: Checks if a BusinessUnit exists for a given `id`. Returns a `200 OK` status if the BusinessUnit exists or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] + description: Checks if a BusinessUnit exists for a given `id`. Returns a `200 OK` status if the BusinessUnit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: displayName: Update My Business Units by ID + description: | + Updates a Business Unit for a given `id`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] body: application/json: example: !include ../examples/my-business-unit-update.example.json @@ -237,15 +361,6 @@ delete: body: application/json: example: !include ../examples/my-business-unit.example.json - delete: - displayName: Delete My Business Units by ID - securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/my-business-unit.example.json /key={key}: (methodName): withKey type: @@ -254,22 +369,45 @@ delete: resourceType: BusinessUnit resourceUpdateType: MyBusinessUnitUpdate get: - displayName: Get My Business Units by Key + displayName: Get My Business Unit by Key + description: Returns a Business Unit for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] responses: 200: body: application/json: example: !include ../examples/my-business-unit.example.json head: + displayName: Check if My Business Unit exists by Key securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] - description: Checks if a BusinessUnit exists for a given `key`. Returns a `200 OK` status if the BusinessUnit exists or a `404 Not Found` otherwise. + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] + description: Checks if a BusinessUnit exists for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. post: - displayName: Update My Business Units by Key + displayName: Update My Business Unit by Key + description: Updates a Business Unit for a given `key`. Returns a `200 OK` status if the Business Unit exists and the Customer has access to it, or a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error otherwise. + securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] + [ + oauth_2_0: + { + scopes: + ['manage_my_business_units:{projectKey}', 'customer_id:{id}'], + }, + ] body: application/json: example: !include ../examples/my-business-unit-update.example.json @@ -278,15 +416,6 @@ delete: body: application/json: example: !include ../examples/my-business-unit.example.json - delete: - displayName: Delete My Business Units by Key - securedBy: - [oauth_2_0: { scopes: ['manage_my_business_units:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/my-business-unit.example.json /carts: type: baseDomain: @@ -321,6 +450,7 @@ delete: application/json: example: !include ../examples/carts.example.json head: + displayName: Check if My Cart exists by Query Predicate securedBy: [ oauth_2_0: @@ -334,7 +464,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 +483,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#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. Specific Error Codes: @@ -370,43 +501,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 +523,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 My Cart exists by ID securedBy: [ oauth_2_0: @@ -451,9 +550,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +572,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +602,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +670,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#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 My 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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + queryParameters: where?: type: QueryPredicate[] @@ -576,10 +725,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#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) scope, or the `anonymousId` does not match the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 +746,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 +775,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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) 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 My 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#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + /quotes: (methodName): orderQuote type: base @@ -638,7 +840,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 @@ -664,27 +870,63 @@ delete: The My Payments endpoint creates and provides access to payments scoped to a specific user. get: - displayName: Query my payments - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] - responses: - 200: - body: - application/json: - example: !include ../examples/my-payments.example.json + displayName: Query My Payments + description: Returns all [Payments](/projects/me-payments#mypayment) that match a given Query Predicate. + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] + responses: + 200: + body: + application/json: + example: !include ../examples/my-payments.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] - description: Checks if a Payment exists for a given Query Predicate. Returns a `200 OK` status if any Payments match the Query Predicate or a `404 Not Found` otherwise. + displayName: Check if My Payment exists by Query Predicate + description: Checks if a [Payment](/projects/me-payments#mypayment) exists for a given Query Predicate. Returns a `200 OK` status if any Payments match the Query Predicate or a `404 Not Found` otherwise. + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] queryParameters: where?: type: QueryPredicate[] post: - displayName: Create my payment - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] + displayName: Create My Payment + description: | + Creates a [Payment](/projects/me-payments#mypayment) for the Customer or an anonymous user. + Creating a Payment produces the [PaymentCreated](ctp:api:type:PaymentCreatedMessage) Message. + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] body: application/json: example: !include ../examples/my-payment-create.example.json - description: | - Creating a Payment produces the [PaymentCreated](ctp:api:type:PaymentCreatedMessage) Message. responses: 201: body: @@ -698,34 +940,82 @@ delete: resourceType: MyPayment resourceUpdateType: MyPaymentUpdate get: - displayName: Get my payment by id - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] + displayName: Get My Payment by ID + description: Returns a [Payment](/projects/me-payments#mypayment) for a given `id`. + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] responses: 200: body: application/json: example: !include ../examples/my-payment.example.json head: - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] - description: Checks if a Payment exists for a given `id`. Returns a `200 OK` status if the Payment exists or a `404 Not Found` otherwise. + displayName: Check if My Payment exists by ID + description: Checks if a [Payment](/projects/me-payments#mypayment) exists for a given `id`. Returns a `200 OK` status if the Payment exists or a `404 Not Found` otherwise. + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] post: - displayName: Update my payment by id - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] + displayName: Update My Payment by ID + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] body: application/json: example: !include ../examples/my-payment-update.example.json description: | - This endpoint can only update a Payment when it has no [Transactions](ctp:api:type:Transaction). + Updates a [Payment](/projects/me-payments#mypayment) for a given `id`. + You can only update a [Payment](/projects/me-payments#mypayment) if it has no [Transactions](ctp:api:type:Transaction). responses: 200: body: application/json: example: !include ../examples/my-payment.example.json delete: - displayName: Delete my payment by id - securedBy: [oauth_2_0: { scopes: ['manage_my_payments:{projectKey}'] }] + displayName: Delete My Payment by ID + securedBy: + [ + oauth_2_0: + { + scopes: + [ + 'manage_my_payments:{projectKey}', + 'customer_id:{id}', + 'anonymous_id:{id}', + ], + }, + ] description: | - This endpoint can only delete a Payment when it has no [Transactions](ctp:api:type:Transaction). + Deletes the [Payment](/projects/me-payments#mypayment) for a given `id`. + You can only delete a [Payment](/projects/me-payments#mypayment) if it has no [Transactions](ctp:api:type:Transaction). responses: 200: body: @@ -746,25 +1036,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 My 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 +1093,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 My 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 +1136,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 +1144,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 My 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 +1187,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 +1197,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 My 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 +1227,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 My 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 +1269,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 My 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 +1315,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + queryParameters: expand: description: | @@ -963,16 +1348,47 @@ delete: application/json: example: !include ../examples/my-shopping-lists.example.json head: + displayName: Check if My 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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope. + queryParameters: expand: description: | @@ -995,9 +1411,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + queryParameters: expand: description: | @@ -1010,13 +1444,41 @@ delete: application/json: example: !include ../examples/my-shopping-list.example.json head: + displayName: Check if My 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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1488,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: @@ -1054,28 +1542,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: application/json: example: !include ../examples/my-shopping-list.example.json head: + displayName: Check if My 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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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 +1619,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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) 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#composable-commerce-oauth) scope, or a `customer` with `id` value that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope. + responses: 200: body: diff --git a/api-specs/api/resources/messages.raml b/api-specs/api/resources/messages.raml index 8be8bcbf3c..2cd7553c03 100644 --- a/api-specs/api/resources/messages.raml +++ b/api-specs/api/resources/messages.raml @@ -9,7 +9,7 @@ description: A message represents a change or an action performed on a resource (like an Order or a Product). get: - description: 'Deprecated scope: `view_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: ['view_messages:{projectKey}'] }] responses: 200: @@ -34,7 +34,7 @@ head: uriParameterName: ID resourceType: Message get: - description: 'Deprecated scope: `view_orders:{projectKey}`' + description: 'Deprecated OAuth 2.0 Scope: `view_orders:{projectKey}`' securedBy: [oauth_2_0: { scopes: ['view_messages:{projectKey}'] }] responses: 200: diff --git a/api-specs/api/resources/product-projections-search.raml b/api-specs/api/resources/product-projections-search.raml index 7bb56543f3..ac7c4a1047 100644 --- a/api-specs/api/resources/product-projections-search.raml +++ b/api-specs/api/resources/product-projections-search.raml @@ -44,9 +44,10 @@ get: The fuzzy level desired, if fuzzy is enabled. This value cannot exceed the default value that is calculated based on the length of the searched text. markMatchingVariants?: type: boolean + default: false description: | - if `markMatchingVariants` parameter is `true` those ProductVariants that match the search query have the additional - field `isMatchingVariant` set to `true`. For the other variants in the same product projection this field is set to `false`. + If `markMatchingVariants` parameter is `true`, those ProductVariants that match the search query have the additional + field `isMatchingVariant` set to `true`. For the other variants in the same product projection, this field is set to `false`. filter?: type: string[] filter.facets?: diff --git a/api-specs/api/resources/product-projections-suggest.raml b/api-specs/api/resources/product-projections-suggest.raml index 7543ac6da5..9732f3424a 100644 --- a/api-specs/api/resources/product-projections-suggest.raml +++ b/api-specs/api/resources/product-projections-suggest.raml @@ -23,15 +23,13 @@ get: The default limit is `10` Suggestions per language and the maximum is `100`. fuzzy?: type: boolean + default: false description: | - Defaults to `false`. - If set to `true`, [fuzzy search](/../api/projects/products-search#fuzzy-search) is applied on the text to analyze. staged?: type: boolean + default: false description: | - Defaults to `false`. - If set to `true` (possible only while using the `view_products` scope), staged projections is queried. is: - projectionSelecting diff --git a/api-specs/api/resources/products.raml b/api-specs/api/resources/products.raml index 3d2e528cf4..1cefbe7259 100644 --- a/api-specs/api/resources/products.raml +++ b/api-specs/api/resources/products.raml @@ -55,7 +55,7 @@ post: description: | To create a new Product, send a representation that is going to become the initial _staged_ and _current_ representation of the new Product in the catalog. If [Product price selection query parameters](/../api/pricing-and-discounts-overview#product-price-selection) are provided, selected Prices will be added to the response. - Produces the [ProductCreated](/projects/messages#product-created) Message. + Produces the [ProductCreated](/projects/messages/product-catalog-messages#product-created) Message. is: - priceSelecting body: @@ -78,7 +78,7 @@ post: is: - priceSelecting description: |- - If [Product price selection query parameters]](/../api/pricing-and-discounts-overview#product-price-selection) are provided, the selected Prices are added to the response. + If [Product price selection query parameters](/../api/pricing-and-discounts-overview#product-price-selection) are provided, the selected Prices are added to the response. responses: 200: body: @@ -103,7 +103,7 @@ post: delete: description: |- If [Product price selection query parameters](/../api/pricing-and-discounts-overview#product-price-selection) are provided, the selected Prices are added to the response. - Produces the [ProductDeleted](/projects/messages#product-deleted) Message. + Produces the [ProductDeleted](/projects/messages/product-catalog-messages#product-deleted) Message. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] is: - priceSelecting @@ -167,7 +167,7 @@ post: delete: description: |- If [Product price selection query parameters](/../api/pricing-and-discounts-overview#product-price-selection) are provided, the selected Prices are added to the response. - Produces the [ProductDeleted](/projects/messages#product-deleted) Message. + Produces the [ProductDeleted](/projects/messages/product-catalog-messages#product-deleted) Message. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] is: - priceSelecting @@ -195,7 +195,7 @@ post: type: boolean description: If `true`, only the staged ProductVariant is updated. If `false`, both the current and staged ProductVariant are updated. description: | - Upload a JPEG, PNG and GIF file to a [ProductVariant](ctp:api:type:ProductVariant). The maximum file size of the image is 10MB. `variant` or `sku` is required to update a specific ProductVariant. The image is uploaded to the Master Variant if `variant` or `sku` are not included. Produces the [ProductImageAdded](/projects/messages#product-image-added) Message when the `Small` version of the image has been uploaded to the CDN. + Upload a JPEG, PNG and GIF file to a [ProductVariant](ctp:api:type:ProductVariant). The maximum file size of the image is 10MB. `variant` or `sku` is required to update a specific ProductVariant. The image is uploaded to the Master Variant if `variant` or `sku` are not included. Produces the [ProductImageAdded](/projects/messages/product-catalog-messages#product-image-added) Message when the `Small` version of the image has been uploaded to the CDN. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] body: type: file diff --git a/api-specs/api/resources/quote-requests.raml b/api-specs/api/resources/quote-requests.raml index ae4b7173c4..23b316868d 100644 --- a/api-specs/api/resources/quote-requests.raml +++ b/api-specs/api/resources/quote-requests.raml @@ -10,6 +10,7 @@ type: (createable): QuoteRequestDraft description: A request for a Quote holds product variants and can be ordered. get: + displayName: Query QuoteRequests securedBy: [oauth_2_0: { scopes: ['view_quote_requests:{projectKey}'] }] responses: 200: @@ -17,12 +18,14 @@ get: application/json: example: !include ../examples/quote-requests.example.json head: + displayName: Check if QuoteRequest exists by Query Predicate securedBy: [oauth_2_0: { scopes: ['view_quote_requests:{projectKey}'] }] 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. queryParameters: where?: type: QueryPredicate[] post: + displayName: Create QuoteRequest securedBy: [oauth_2_0: { scopes: ['manage_quote_requests:{projectKey}'] }] body: application/json: @@ -40,6 +43,7 @@ post: resourceType: QuoteRequest resourceUpdateType: QuoteRequestUpdate get: + displayName: Get QuoteRequest by Key securedBy: [oauth_2_0: { scopes: ['view_quote_requests:{projectKey}'] }] responses: 200: @@ -47,9 +51,11 @@ post: application/json: example: !include ../examples/quote-request.example.json head: + displayName: Check if QuoteRequest exists by Key securedBy: [oauth_2_0: { scopes: ['view_quote_requests:{projectKey}'] }] 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. post: + displayName: Update QuoteRequest by Key securedBy: [oauth_2_0: { scopes: ['manage_quote_requests:{projectKey}'] }] body: application/json: @@ -60,6 +66,7 @@ post: application/json: example: !include ../examples/quote-request-update-response.example.json delete: + displayName: Delete QuoteRequest by Key is: - dataErasure securedBy: [oauth_2_0: { scopes: ['manage_quote_requests:{projectKey}'] }] @@ -76,6 +83,7 @@ post: resourceType: QuoteRequest resourceUpdateType: QuoteRequestUpdate get: + displayName: Get QuoteRequest by ID securedBy: [oauth_2_0: { scopes: ['view_quote_requests:{projectKey}'] }] responses: 200: @@ -83,9 +91,11 @@ post: application/json: example: !include ../examples/quote-request.example.json head: + displayName: Check if QuoteRequest exists by ID securedBy: [oauth_2_0: { scopes: ['view_quote_requests:{projectKey}'] }] 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. post: + displayName: Update QuoteRequest by ID securedBy: [oauth_2_0: { scopes: ['manage_quote_requests:{projectKey}'] }] body: application/json: @@ -96,6 +106,7 @@ post: application/json: example: !include ../examples/quote-request-update-response.example.json delete: + displayName: Delete QuoteRequest by ID is: - dataErasure securedBy: [oauth_2_0: { scopes: ['manage_quote_requests:{projectKey}'] }] diff --git a/api-specs/api/resources/quotes.raml b/api-specs/api/resources/quotes.raml index 8a2ec556ff..b626c2286d 100644 --- a/api-specs/api/resources/quotes.raml +++ b/api-specs/api/resources/quotes.raml @@ -10,6 +10,7 @@ type: (createable): QuoteDraft description: A quote holds the negotiated offer. get: + displayName: Query Quotes securedBy: [oauth_2_0: { scopes: ['view_quotes:{projectKey}'] }] responses: 200: @@ -17,12 +18,14 @@ get: application/json: example: !include ../examples/quotes.example.json head: + displayName: Check if Quote exists by Query Predicate securedBy: [oauth_2_0: { scopes: ['view_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. queryParameters: where?: type: QueryPredicate[] post: + displayName: Create Quote securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }] body: application/json: @@ -40,6 +43,7 @@ post: resourceType: Quote resourceUpdateType: QuoteUpdate get: + displayName: Get Quote by Key securedBy: [oauth_2_0: { scopes: ['view_quotes:{projectKey}'] }] responses: 200: @@ -47,9 +51,11 @@ post: application/json: example: !include ../examples/quote.example.json head: + displayName: Check if Quote exists by Key securedBy: [oauth_2_0: { scopes: ['view_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. post: + displayName: Update Quote by Key securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }] body: application/json: @@ -60,6 +66,7 @@ post: application/json: example: !include ../examples/quote.example.json delete: + displayName: Delete Quote by Key is: - dataErasure securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }] @@ -76,6 +83,7 @@ post: resourceType: Quote resourceUpdateType: QuoteUpdate get: + displayName: Get Quote by ID securedBy: [oauth_2_0: { scopes: ['view_quotes:{projectKey}'] }] responses: 200: @@ -83,9 +91,11 @@ post: application/json: example: !include ../examples/quote.example.json head: + displayName: Check if Quote exists by ID securedBy: [oauth_2_0: { scopes: ['view_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. post: + displayName: Update Quote by ID securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }] body: application/json: @@ -96,6 +106,7 @@ post: application/json: example: !include ../examples/quote.example.json delete: + displayName: Delete Quote by ID is: - dataErasure securedBy: [oauth_2_0: { scopes: ['manage_quotes:{projectKey}'] }] diff --git a/api-specs/api/resources/staged-quotes.raml b/api-specs/api/resources/staged-quotes.raml index 5709a810a0..10688d5701 100644 --- a/api-specs/api/resources/staged-quotes.raml +++ b/api-specs/api/resources/staged-quotes.raml @@ -10,6 +10,7 @@ type: (createable): StagedQuoteDraft description: A staged quote holds the negotiation between the [Buyer](/../api/quotes-overview#buyer) and the [Seller](/../api/quotes-overview#seller). get: + displayName: Query StagedQuotes securedBy: [oauth_2_0: { scopes: ['view_staged_quotes:{projectKey}'] }] responses: 200: @@ -17,12 +18,14 @@ get: application/json: example: !include ../examples/staged-quotes.example.json head: + displayName: Check if StagedQuote exists by Query Predicate securedBy: [oauth_2_0: { scopes: ['view_staged_quotes:{projectKey}'] }] 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. queryParameters: where?: type: QueryPredicate[] post: + displayName: Create StagedQuote securedBy: [oauth_2_0: { scopes: ['manage_staged_quotes:{projectKey}'] }] body: application/json: @@ -40,6 +43,7 @@ post: resourceType: StagedQuote resourceUpdateType: StagedQuoteUpdate get: + displayName: Get StagedQuote by Key securedBy: [oauth_2_0: { scopes: ['view_staged_quotes:{projectKey}'] }] responses: 200: @@ -47,9 +51,11 @@ post: application/json: example: !include ../examples/staged-quote.example.json head: + displayName: Check if StagedQuote exists by Key securedBy: [oauth_2_0: { scopes: ['view_staged_quotes:{projectKey}'] }] 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. post: + displayName: Update StagedQuote by Key securedBy: [oauth_2_0: { scopes: ['manage_staged_quotes:{projectKey}'] }] body: application/json: @@ -60,6 +66,7 @@ post: application/json: example: !include ../examples/staged-quote.example.json delete: + displayName: Delete StagedQuote by Key is: - dataErasure securedBy: [oauth_2_0: { scopes: ['manage_staged_quotes:{projectKey}'] }] @@ -76,6 +83,7 @@ post: resourceType: StagedQuote resourceUpdateType: StagedQuoteUpdate get: + displayName: Get StagedQuote by ID securedBy: [oauth_2_0: { scopes: ['view_staged_quotes:{projectKey}'] }] responses: 200: @@ -83,9 +91,11 @@ post: application/json: example: !include ../examples/staged-quote.example.json head: + displayName: Check if StagedQuote exists by ID securedBy: [oauth_2_0: { scopes: ['view_staged_quotes:{projectKey}'] }] 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. post: + displayName: Update StagedQuote by ID securedBy: [oauth_2_0: { scopes: ['manage_staged_quotes:{projectKey}'] }] body: application/json: @@ -96,6 +106,7 @@ post: application/json: example: !include ../examples/staged-quote.example.json delete: + displayName: Delete StagedQuote by ID is: - dataErasure securedBy: [oauth_2_0: { scopes: ['manage_staged_quotes:{projectKey}'] }] diff --git a/api-specs/api/resources/states.raml b/api-specs/api/resources/states.raml index 1e1814bb08..bd71a69f2c 100644 --- a/api-specs/api/resources/states.raml +++ b/api-specs/api/resources/states.raml @@ -66,7 +66,7 @@ post: 200: body: application/json: - example: !include ../examples/state.example.json + example: !include ../examples/state-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_states:{projectKey}'] }] responses: @@ -100,7 +100,7 @@ post: 200: body: application/json: - example: !include ../examples/state.example.json + example: !include ../examples/state-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_states:{projectKey}'] }] responses: diff --git a/api-specs/api/resources/subscriptions.raml b/api-specs/api/resources/subscriptions.raml index e760e63784..d476581446 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 @@ -79,7 +79,7 @@ post: body: application/json: type: Subscription - example: !include ../examples/subscription.example.json + example: !include ../examples/subscription-update-response.example.json delete: displayName: Delete Subscription by key securedBy: [oauth_2_0: { scopes: ['manage_subscriptions:{projectKey}'] }] @@ -126,7 +126,7 @@ post: body: application/json: type: Subscription - example: !include ../examples/subscription.example.json + example: !include ../examples/subscription-update-response.example.json delete: displayName: Update Subscription by ID securedBy: [oauth_2_0: { scopes: ['manage_subscriptions:{projectKey}'] }] diff --git a/api-specs/api/resources/types.raml b/api-specs/api/resources/types.raml index 66869e6b7f..becd085ebc 100644 --- a/api-specs/api/resources/types.raml +++ b/api-specs/api/resources/types.raml @@ -63,7 +63,7 @@ post: 200: body: application/json: - example: !include ../examples/type.example.json + example: !include ../examples/type-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_types:{projectKey}'] }] responses: @@ -97,7 +97,7 @@ post: 200: body: application/json: - example: !include ../examples/type.example.json + example: !include ../examples/type-update-response.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_types:{projectKey}'] }] responses: diff --git a/api-specs/api/traits/conflicting.raml b/api-specs/api/traits/conflicting.raml index 81a1f1ac84..33756bdbdc 100644 --- a/api-specs/api/traits/conflicting.raml +++ b/api-specs/api/traits/conflicting.raml @@ -16,7 +16,7 @@ responses: The request conflicts with the current state of the involved resource(s). Typically, the request attempts to modify a resource that is out of date, i.e. that has been modified by another client since the last time it was retrieved. - The client application should resolve the conflict (with or without involving the end-user) + The client application should resolve the conflict (with or without involving the end user) before retrying the request. body: application/json: diff --git a/api-specs/api/traits/data-erasure.raml b/api-specs/api/traits/data-erasure.raml index d4d4058d5a..06165326de 100644 --- a/api-specs/api/traits/data-erasure.raml +++ b/api-specs/api/traits/data-erasure.raml @@ -4,6 +4,6 @@ queryParameters: dataErasure: type: boolean required: false + default: false description: | - Defaults to `false`. - Set to `true` if you want to [erase all related personal data](/../api/gdpr#data-erasure-of-personal-data) in compliance with GDPR. + To [erase all related personal data](/../api/gdpr#data-erasure-of-personal-data) in compliance with GDPR, set to `true`. diff --git a/api-specs/api/traits/projection-selecting.raml b/api-specs/api/traits/projection-selecting.raml index 4c8e27daef..700918a40c 100644 --- a/api-specs/api/traits/projection-selecting.raml +++ b/api-specs/api/traits/projection-selecting.raml @@ -5,6 +5,4 @@ queryParameters: type: boolean default: false description: | - Defaults to `false`. - Set to `true` to retrieve the [staged](ctp:api:type:CurrentStaged) Product Projection - (only for API Clients that have the `view_products:{projectKey}` scope). + To retrieve the [staged](ctp:api:type:CurrentStaged) Product Projection (only for API Clients that have the `view_products:{projectKey}` scope), set to `true`. diff --git a/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml b/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml index 506e779954..2028a6a62a 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueAbsolute.raml @@ -10,3 +10,7 @@ properties: type: CentPrecisionMoney[] description: | Cent precision money values in different currencies. + applicationMode?: + type: DiscountApplicationMode + description: | + Determines how the discount is applied on [CartDiscountLineItemTarget](ctp:api:type:CartDiscountLineItemsTarget) and [CartDiscountCustomLineItemTarget](ctp:api:type:CartDiscountCustomLineItemsTarget). diff --git a/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml b/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml index cdddf23f27..6b39554f12 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueAbsoluteDraft.raml @@ -11,3 +11,9 @@ properties: An absolute Cart Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error. If the array is empty, the discount does not apply. + applicationMode?: + type: DiscountApplicationMode + description: | + Determines how the discount applies on [CartDiscountLineItemTarget](ctp:api:type:CartDiscountLineItemsTarget) and [CartDiscountCustomLineItemTarget](ctp:api:type:CartDiscountCustomLineItemsTarget). + + If not set, the default behavior is `ProportionateDistribution`. diff --git a/api-specs/api/types/cart-discount/DiscountApplicationMode.raml b/api-specs/api/types/cart-discount/DiscountApplicationMode.raml new file mode 100644 index 0000000000..7e06c0fd5f --- /dev/null +++ b/api-specs/api/types/cart-discount/DiscountApplicationMode.raml @@ -0,0 +1,14 @@ +#%RAML 1.0 DataType +(package): CartDiscount +type: string +displayName: DiscountApplicationMode +description: | + This mode determines how absolute Discounts are applied on Line Items or Custom Line Items. +(enumDescriptions): + ProportionateDistribution: Distributes the Discount proportionately across eligible Line Items or Custom Line Items. + EvenDistribution: Distributes the Discount evenly across eligible Line Items or Custom Line Items. + IndividualApplication: Applies the Discount individually to eligible Line Item or Custom Line Item. +enum: + - ProportionateDistribution + - EvenDistribution + - IndividualApplication 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/common/CreatedBy.raml b/api-specs/api/types/common/CreatedBy.raml index a6ee5a18b0..70893097b8 100644 --- a/api-specs/api/types/common/CreatedBy.raml +++ b/api-specs/api/types/common/CreatedBy.raml @@ -11,7 +11,7 @@ properties: externalUserId?: type: string description: | - [External user ID](/../api/general-concepts#external-user-ids) provided by `X-External-User-ID` HTTP Header or [`external_user_id:{externalUserId}`](/../api/scopes#external_user_idexternaluserid) scope. + [External user ID](/../api/general-concepts#external-user-ids) provided by the `X-External-User-ID` HTTP Header or `external_user_id:{externalUserId}` [scope](/../api/scopes#external-oauth). maxLength: 128 customer?: type: CustomerReference diff --git a/api-specs/api/types/common/LastModifiedBy.raml b/api-specs/api/types/common/LastModifiedBy.raml index 9b4ccad01c..dccdf6808d 100644 --- a/api-specs/api/types/common/LastModifiedBy.raml +++ b/api-specs/api/types/common/LastModifiedBy.raml @@ -11,7 +11,7 @@ properties: externalUserId?: type: string description: | - [External user ID](/../api/general-concepts#external-user-ids) provided by `X-External-User-ID` HTTP Header or [`external_user_id:{externalUserId}`](/../api/scopes#external_user_idexternaluserid) scope. + [External user ID](/../api/general-concepts#external-user-ids) provided by the `X-External-User-ID` HTTP Header or `external_user_id:{externalUserId}` [scope](/../api/scopes#external-oauth). maxLength: 128 customer?: type: CustomerReference diff --git a/api-specs/api/types/error/ConcurrentModificationError.raml b/api-specs/api/types/error/ConcurrentModificationError.raml index 57df7dadfc..e2740a8d84 100644 --- a/api-specs/api/types/error/ConcurrentModificationError.raml +++ b/api-specs/api/types/error/ConcurrentModificationError.raml @@ -5,7 +5,7 @@ displayName: ConcurrentModificationError discriminatorValue: ConcurrentModification description: | Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). - The client application should resolve the conflict (with or without involving the end-user) before retrying the request. + The client application should resolve the conflict (with or without involving the end user) before retrying the request. properties: code: type: string diff --git a/api-specs/api/types/error/graphql/GraphQLConcurrentModificationError.raml b/api-specs/api/types/error/graphql/GraphQLConcurrentModificationError.raml index cb284ccf21..77899ad407 100644 --- a/api-specs/api/types/error/graphql/GraphQLConcurrentModificationError.raml +++ b/api-specs/api/types/error/graphql/GraphQLConcurrentModificationError.raml @@ -5,7 +5,7 @@ displayName: GraphQLConcurrentModificationError discriminatorValue: ConcurrentModification description: | Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). - The client application should resolve the conflict (with or without involving the end-user) before retrying the request. + The client application should resolve the conflict (with or without involving the end user) before retrying the request. properties: code: type: string 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/extension/ExtensionTrigger.raml b/api-specs/api/types/extension/ExtensionTrigger.raml index f723b23189..a617dfd7d4 100644 --- a/api-specs/api/types/extension/ExtensionTrigger.raml +++ b/api-specs/api/types/extension/ExtensionTrigger.raml @@ -6,7 +6,7 @@ properties: resourceTypeId: type: ExtensionResourceTypeId description: | - `cart`, `order`, `payment`, `customer`, `quote-request`, `staged-quote`, `quote`, and `business-unit` are supported. + `cart`, `order`, `payment`, `customer`, `quote-request`, `staged-quote`, `quote`, `business-unit`, and `shopping-list` are supported. actions: type: ExtensionAction[] description: | diff --git a/api-specs/api/types/me/MyQuoteRequestDraft.raml b/api-specs/api/types/me/MyQuoteRequestDraft.raml index 2fefa1db0f..13d54dcb08 100644 --- a/api-specs/api/types/me/MyQuoteRequestDraft.raml +++ b/api-specs/api/types/me/MyQuoteRequestDraft.raml @@ -6,7 +6,9 @@ properties: cartId: type: string description: | - `id` of the Cart from which the Quote Request is created. + `id` of the Cart from which the Quote Request is created. Carts with [Discount Codes](ctp:api:type:DiscountCode) and Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode) are not supported. + The Cart must have a `shippingAddress` defined, otherwise an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned when [creating a Quote Request](ctp:api:endpoint:/{projectKey}/me/quote-requests:POST). + cartVersion: type: number format: int64 diff --git a/api-specs/api/types/message/DeliveryAddressSetMessage.raml b/api-specs/api/types/message/DeliveryAddressSetMessage.raml index f6dcafb920..f4bb22d019 100644 --- a/api-specs/api/types/message/DeliveryAddressSetMessage.raml +++ b/api-specs/api/types/message/DeliveryAddressSetMessage.raml @@ -9,7 +9,7 @@ properties: deliveryId: type: string description: | - Unique identifier of the [Parcel](ctp:api:type:Delivery). + Unique identifier of the [Delivery](ctp:api:type:Delivery). address?: type: Address description: | diff --git a/api-specs/api/types/message/DeliveryCustomFieldAddedMessage.raml b/api-specs/api/types/message/DeliveryCustomFieldAddedMessage.raml new file mode 100644 index 0000000000..7ff6d7d2cb --- /dev/null +++ b/api-specs/api/types/message/DeliveryCustomFieldAddedMessage.raml @@ -0,0 +1,19 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessage +displayName: DeliveryCustomFieldAddedMessage +discriminatorValue: DeliveryCustomFieldAdded +description: | + Generated after adding a Custom Field to a Delivery using the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. +properties: + name: + type: string + description: | + Name of the Custom Field that was added. + value: + type: CustomFieldValue + description: The added [CustomFieldValue](ctp:api:type:CustomFieldValue) based on the [FieldType](ctp:api:type:FieldType). + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/DeliveryCustomFieldChangedMessage.raml b/api-specs/api/types/message/DeliveryCustomFieldChangedMessage.raml new file mode 100644 index 0000000000..9c2c40b5ef --- /dev/null +++ b/api-specs/api/types/message/DeliveryCustomFieldChangedMessage.raml @@ -0,0 +1,25 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessage +displayName: DeliveryCustomFieldChangedMessage +discriminatorValue: DeliveryCustomFieldChanged +description: | + Generated when an existing Custom Field on a Delivery has been changed using the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. +properties: + name: + type: string + description: | + Name of the Custom Field that changed. + value: + type: CustomFieldValue + description: | + [CustomFieldValue](ctp:api:type:CustomFieldValue) based on the [FieldType](ctp:api:type:FieldType) after the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. + previousValue?: + type: CustomFieldValue + description: | + [CustomFieldValue](ctp:api:type:CustomFieldValue) based on the [FieldType](ctp:api:type:FieldType) before the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. + When there has not been a Custom Field with the `name` on the Delivery before, a [Delivery Custom Field Added](ctp:api:type:DeliveryCustomFieldAddedMessage) Message is generated instead. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/DeliveryCustomFieldRemovedMessage.raml b/api-specs/api/types/message/DeliveryCustomFieldRemovedMessage.raml new file mode 100644 index 0000000000..2bb883fe9e --- /dev/null +++ b/api-specs/api/types/message/DeliveryCustomFieldRemovedMessage.raml @@ -0,0 +1,16 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessage +displayName: DeliveryCustomFieldRemovedMessage +discriminatorValue: DeliveryCustomFieldRemoved +description: | + Generated when a Custom Field has been removed from the Delivery using the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. +properties: + name: + type: string + description: | + Name of the Custom Field that was removed. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/DeliveryCustomTypeRemovedMessage.raml b/api-specs/api/types/message/DeliveryCustomTypeRemovedMessage.raml new file mode 100644 index 0000000000..aadbb629cd --- /dev/null +++ b/api-specs/api/types/message/DeliveryCustomTypeRemovedMessage.raml @@ -0,0 +1,16 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessage +displayName: DeliveryCustomTypeRemovedMessage +discriminatorValue: DeliveryCustomTypeRemoved +description: | + Generated after removing a Custom Type from a Delivery using the [Set Custom Type](ctp:api:type:OrderSetDeliveryCustomTypeAction) update action with empty parameters. +properties: + previousTypeId?: + type: string + description: | + `id` of the [Custom Type](ctp:api:type:Type) that was removed. Absent if there was no previous Custom Type present. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/DeliveryCustomTypeSetMessage.raml b/api-specs/api/types/message/DeliveryCustomTypeSetMessage.raml new file mode 100644 index 0000000000..634590bde3 --- /dev/null +++ b/api-specs/api/types/message/DeliveryCustomTypeSetMessage.raml @@ -0,0 +1,19 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessage +displayName: DeliveryCustomTypeSetMessage +discriminatorValue: DeliveryCustomTypeSet +description: | + Generated after adding a Custom Type to a Delivery using the [Set Custom Type](ctp:api:type:OrderSetDeliveryCustomTypeAction) update action. +properties: + customFields: + type: CustomFields + description: The Custom Fields that have been set. + previousTypeId?: + type: string + description: | + `id` of the previous [Custom Type](ctp:api:type:Type). Absent if there was no previous Custom Type present. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/ProductTailoringImageAddedMessage.raml b/api-specs/api/types/message/ProductTailoringImageAddedMessage.raml index 2444f6b996..beb1acf82e 100644 --- a/api-specs/api/types/message/ProductTailoringImageAddedMessage.raml +++ b/api-specs/api/types/message/ProductTailoringImageAddedMessage.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: Message -(beta): true displayName: ProductTailoringImageAddedMessage discriminatorValue: ProductTailoringImageAdded description: | diff --git a/api-specs/api/types/message/ProductTailoringImagesSetMessage.raml b/api-specs/api/types/message/ProductTailoringImagesSetMessage.raml index 34be4fd94f..bf79ee5e23 100644 --- a/api-specs/api/types/message/ProductTailoringImagesSetMessage.raml +++ b/api-specs/api/types/message/ProductTailoringImagesSetMessage.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: Message -(beta): true displayName: ProductTailoringImagesSetMessage discriminatorValue: ProductTailoringImagesSet description: | diff --git a/api-specs/api/types/message/ProductVariantDeletedMessage.raml b/api-specs/api/types/message/ProductVariantDeletedMessage.raml index 25b248f2d9..e0cc83ab8e 100644 --- a/api-specs/api/types/message/ProductVariantDeletedMessage.raml +++ b/api-specs/api/types/message/ProductVariantDeletedMessage.raml @@ -15,3 +15,8 @@ properties: items: string description: | List of image URLs that were removed with the [Remove Product Variant](ctp:api:type:ProductRemoveVariantAction) update action. + staged: + type: boolean + description: | + If `true`, this message informs that only the staged ProductVariant has been removed by the update action. + If `false`, both the current and staged ProductVariant have been removed. diff --git a/api-specs/api/types/message/ProductVariantTailoringAddedMessage.raml b/api-specs/api/types/message/ProductVariantTailoringAddedMessage.raml index e4d3d16aca..2955efba75 100644 --- a/api-specs/api/types/message/ProductVariantTailoringAddedMessage.raml +++ b/api-specs/api/types/message/ProductVariantTailoringAddedMessage.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: Message -(beta): true displayName: ProductVariantTailoringAddedMessage discriminatorValue: ProductVariantTailoringAdded description: | diff --git a/api-specs/api/types/message/ProductVariantTailoringRemovedMessage.raml b/api-specs/api/types/message/ProductVariantTailoringRemovedMessage.raml index 1e8df183f5..275dedaa71 100644 --- a/api-specs/api/types/message/ProductVariantTailoringRemovedMessage.raml +++ b/api-specs/api/types/message/ProductVariantTailoringRemovedMessage.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: Message -(beta): true displayName: ProductVariantTailoringRemovedMessage discriminatorValue: ProductVariantTailoringRemoved description: | diff --git a/api-specs/api/types/message/payload/DeliveryAddressSetMessagePayload.raml b/api-specs/api/types/message/payload/DeliveryAddressSetMessagePayload.raml index 6dac6a8714..912ed3620b 100644 --- a/api-specs/api/types/message/payload/DeliveryAddressSetMessagePayload.raml +++ b/api-specs/api/types/message/payload/DeliveryAddressSetMessagePayload.raml @@ -9,7 +9,7 @@ properties: deliveryId: type: string description: | - Unique identifier of the [Parcel](ctp:api:type:Delivery). + Unique identifier of the [Delivery](ctp:api:type:Delivery). address?: type: Address description: | diff --git a/api-specs/api/types/message/payload/DeliveryCustomFieldAddedMessagePayload.raml b/api-specs/api/types/message/payload/DeliveryCustomFieldAddedMessagePayload.raml new file mode 100644 index 0000000000..c57fb3093a --- /dev/null +++ b/api-specs/api/types/message/payload/DeliveryCustomFieldAddedMessagePayload.raml @@ -0,0 +1,19 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessagePayload +displayName: DeliveryCustomFieldAddedMessagePayload +discriminatorValue: DeliveryCustomFieldAdded +description: | + Generated after adding a Custom Field to a Delivery using the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. +properties: + name: + type: string + description: | + Name of the Custom Field that was added. + value: + type: CustomFieldValue + description: The added [CustomFieldValue](ctp:api:type:CustomFieldValue) based on the [FieldType](ctp:api:type:FieldType). + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/payload/DeliveryCustomFieldChangedMessagePayload.raml b/api-specs/api/types/message/payload/DeliveryCustomFieldChangedMessagePayload.raml new file mode 100644 index 0000000000..f57c09ccd8 --- /dev/null +++ b/api-specs/api/types/message/payload/DeliveryCustomFieldChangedMessagePayload.raml @@ -0,0 +1,25 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessagePayload +displayName: DeliveryCustomFieldChangedMessagePayload +discriminatorValue: DeliveryCustomFieldChanged +description: | + Generated when an existing Custom Field on a Delivery has been changed using the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. +properties: + name: + type: string + description: | + Name of the Custom Field that changed. + value: + type: CustomFieldValue + description: | + [CustomFieldValue](ctp:api:type:CustomFieldValue) based on the [FieldType](ctp:api:type:FieldType) after the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. + previousValue?: + type: CustomFieldValue + description: | + [CustomFieldValue](ctp:api:type:CustomFieldValue) based on the [FieldType](ctp:api:type:FieldType) before the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. + When there has not been a Custom Field with the `name` on the Delivery before, a [Delivery Custom Field Added](ctp:api:type:DeliveryCustomFieldAddedMessage) Message is generated instead. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/payload/DeliveryCustomFieldRemovedMessagePayload.raml b/api-specs/api/types/message/payload/DeliveryCustomFieldRemovedMessagePayload.raml new file mode 100644 index 0000000000..9e32192274 --- /dev/null +++ b/api-specs/api/types/message/payload/DeliveryCustomFieldRemovedMessagePayload.raml @@ -0,0 +1,16 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessagePayload +displayName: DeliveryCustomFieldRemovedMessagePayload +discriminatorValue: DeliveryCustomFieldRemoved +description: | + Generated when a Custom Field has been removed from the Delivery using the [Set CustomField](ctp:api:type:OrderSetDeliveryCustomFieldAction) update action. +properties: + name: + type: string + description: | + Name of the Custom Field that was removed. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/payload/DeliveryCustomTypeRemovedMessagePayload.raml b/api-specs/api/types/message/payload/DeliveryCustomTypeRemovedMessagePayload.raml new file mode 100644 index 0000000000..3892bce270 --- /dev/null +++ b/api-specs/api/types/message/payload/DeliveryCustomTypeRemovedMessagePayload.raml @@ -0,0 +1,16 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessagePayload +displayName: DeliveryCustomTypeRemovedMessagePayload +discriminatorValue: DeliveryCustomTypeRemoved +description: | + Generated after removing a Custom Type from a Delivery using the [Set Custom Type](ctp:api:type:OrderSetDeliveryCustomTypeAction) update action with empty parameters. +properties: + previousTypeId?: + type: string + description: | + `id` of the [Custom Type](ctp:api:type:Type) that was removed. Absent if there was no previous Custom Type present. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/payload/DeliveryCustomTypeSetMessagePayload.raml b/api-specs/api/types/message/payload/DeliveryCustomTypeSetMessagePayload.raml new file mode 100644 index 0000000000..169c955002 --- /dev/null +++ b/api-specs/api/types/message/payload/DeliveryCustomTypeSetMessagePayload.raml @@ -0,0 +1,19 @@ +#%RAML 1.0 DataType +(package): Message +type: OrderMessagePayload +displayName: DeliveryCustomTypeSetMessagePayload +discriminatorValue: DeliveryCustomTypeSet +description: | + Generated after adding a Custom Type to a Delivery using the [Set Custom Type](ctp:api:type:OrderSetDeliveryCustomTypeAction) update action. +properties: + customFields: + type: CustomFields + description: The Custom Fields that have been set. + previousTypeId?: + type: string + description: | + `id` of the previous [Custom Type](ctp:api:type:Type). Absent if there was no previous Custom Type present. + deliveryId: + type: string + description: | + Unique identifier of the [Delivery](ctp:api:type:Delivery). diff --git a/api-specs/api/types/message/payload/ProductTailoringImageAddedMessagePayload.raml b/api-specs/api/types/message/payload/ProductTailoringImageAddedMessagePayload.raml index b6440f0e4e..c6efd5551c 100644 --- a/api-specs/api/types/message/payload/ProductTailoringImageAddedMessagePayload.raml +++ b/api-specs/api/types/message/payload/ProductTailoringImageAddedMessagePayload.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: MessagePayload -(beta): true displayName: ProductTailoringImageAddedMessagePayload discriminatorValue: ProductTailoringImageAdded description: | diff --git a/api-specs/api/types/message/payload/ProductTailoringImagesSetMessagePayload.raml b/api-specs/api/types/message/payload/ProductTailoringImagesSetMessagePayload.raml index 379f67a6dd..0787d16dc9 100644 --- a/api-specs/api/types/message/payload/ProductTailoringImagesSetMessagePayload.raml +++ b/api-specs/api/types/message/payload/ProductTailoringImagesSetMessagePayload.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: MessagePayload -(beta): true displayName: ProductTailoringImagesSetMessagePayload discriminatorValue: ProductTailoringImagesSet description: | diff --git a/api-specs/api/types/message/payload/ProductVariantDeletedMessagePayload.raml b/api-specs/api/types/message/payload/ProductVariantDeletedMessagePayload.raml index 89e74c7522..9cd6a52163 100644 --- a/api-specs/api/types/message/payload/ProductVariantDeletedMessagePayload.raml +++ b/api-specs/api/types/message/payload/ProductVariantDeletedMessagePayload.raml @@ -15,3 +15,8 @@ properties: items: string description: | List of image URLs that were removed with the [Remove Product Variant](ctp:api:type:ProductRemoveVariantAction) update action. + staged: + type: boolean + description: | + If `true`, this message informs that only the staged ProductVariant has been removed by the update action. + If `false`, both the current and staged ProductVariant have been removed. diff --git a/api-specs/api/types/message/payload/ProductVariantTailoringAddedMessagePayload.raml b/api-specs/api/types/message/payload/ProductVariantTailoringAddedMessagePayload.raml index 8eec80dcb9..3aa3b129a6 100644 --- a/api-specs/api/types/message/payload/ProductVariantTailoringAddedMessagePayload.raml +++ b/api-specs/api/types/message/payload/ProductVariantTailoringAddedMessagePayload.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: MessagePayload -(beta): true displayName: ProductVariantTailoringAddedMessagePayload discriminatorValue: ProductVariantTailoringAdded description: | diff --git a/api-specs/api/types/message/payload/ProductVariantTailoringRemovedMessagePayload.raml b/api-specs/api/types/message/payload/ProductVariantTailoringRemovedMessagePayload.raml index 21dec99df6..67182073c2 100644 --- a/api-specs/api/types/message/payload/ProductVariantTailoringRemovedMessagePayload.raml +++ b/api-specs/api/types/message/payload/ProductVariantTailoringRemovedMessagePayload.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Message type: MessagePayload -(beta): true displayName: ProductVariantTailoringRemovedMessagePayload discriminatorValue: ProductVariantTailoringRemoved description: | diff --git a/api-specs/api/types/product-search/ProductSearchProjectionParams.raml b/api-specs/api/types/product-search/ProductSearchProjectionParams.raml index b986083838..5eb3968d91 100644 --- a/api-specs/api/types/product-search/ProductSearchProjectionParams.raml +++ b/api-specs/api/types/product-search/ProductSearchProjectionParams.raml @@ -3,6 +3,8 @@ type: object (beta): true displayName: ProductSearchProjectionParams +description: | + The query parameters used for [data integration with Product Projection parameters](/../api/projects/product-search#with-product-projection-parameters). properties: expand?: type: Expansion[] diff --git a/api-specs/api/types/product-search/ProductSearchRequest.raml b/api-specs/api/types/product-search/ProductSearchRequest.raml index 172a3783f0..4d5f8c448f 100644 --- a/api-specs/api/types/product-search/ProductSearchRequest.raml +++ b/api-specs/api/types/product-search/ProductSearchRequest.raml @@ -10,19 +10,23 @@ properties: The search query against [searchable Product fields](/../api/projects/product-search#searchable-product-fields). sort?: type: SearchSorting[] - description: Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order. + description: | + Controls how results to your query are [sorted](/../api/projects/product-search#sorting). + If not provided, the results are sorted by relevance score in descending order. limit?: type: number format: int32 default: 20 maximum: 100 - description: The maximum number of search results to be returned. + description: | + The maximum number of search results to be returned in one [page](/../api/projects/product-search#pagination). offset?: type: number format: int32 default: 0 maximum: 9900 - description: The number of search results to be skipped in the response for pagination. + description: | + The number of search results to be skipped in the response for [pagination](/../api/projects/product-search#pagination). markMatchingVariants?: type: boolean default: false @@ -31,8 +35,7 @@ properties: type: ProductSearchProjectionParams (beta): true description: | - Set this field to `{}` to get the [ProductProjection](ctp:api:type:ProductProjection) included in the [ProductSearchResult](ctp:api:type:ProductSearchResult). - Include query parameters for controlling [Reference Expansion](/../api/general-concepts#reference-expansion) or [projections](/../api/projects/productProjections#projection-dimensions) according to your needs. + Controls data integration [with Product Projection parameters](/../api/projects/product-search#with-product-projection-parameters). If not set, the result does not include the Product Projection. facets?: type: ProductSearchFacetExpression[] diff --git a/api-specs/api/types/product-tailoring/ProductTailoringData.raml b/api-specs/api/types/product-tailoring/ProductTailoringData.raml index a6baf545e0..82bc162951 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoringData.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoringData.raml @@ -32,6 +32,5 @@ properties: Matches the pattern `[a-zA-Z0-9_\\-]{2,256}`. variants?: type: ProductVariantTailoring[] - (beta): true description: | Tailored Variants of the Product. diff --git a/api-specs/api/types/product-tailoring/ProductTailoringDraft.raml b/api-specs/api/types/product-tailoring/ProductTailoringDraft.raml index 199c37777b..db31e201d6 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoringDraft.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoringDraft.raml @@ -49,6 +49,5 @@ properties: default: false variants?: type: ProductVariantTailoringDraft[] - (beta): true description: | Tailored Variants of the Product. diff --git a/api-specs/api/types/product-tailoring/ProductTailoringInStoreDraft.raml b/api-specs/api/types/product-tailoring/ProductTailoringInStoreDraft.raml index ab338ef995..ededf357cc 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoringInStoreDraft.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoringInStoreDraft.raml @@ -45,6 +45,5 @@ properties: default: false variants?: type: ProductVariantTailoringDraft[] - (beta): true description: | Tailored Variants of the Product. diff --git a/api-specs/api/types/product-tailoring/ProductVariantTailoring.raml b/api-specs/api/types/product-tailoring/ProductVariantTailoring.raml index b100a20890..fd17ca0a15 100644 --- a/api-specs/api/types/product-tailoring/ProductVariantTailoring.raml +++ b/api-specs/api/types/product-tailoring/ProductVariantTailoring.raml @@ -2,7 +2,6 @@ (package): ProductTailoring displayName: ProductVariantTailoring type: object -(beta): true description: | The tailoring of a [ProductVariant](ctp:api:type:ProductVariant). properties: diff --git a/api-specs/api/types/product-tailoring/ProductVariantTailoringDraft.raml b/api-specs/api/types/product-tailoring/ProductVariantTailoringDraft.raml index 1ebd97d346..42a2d3e3df 100644 --- a/api-specs/api/types/product-tailoring/ProductVariantTailoringDraft.raml +++ b/api-specs/api/types/product-tailoring/ProductVariantTailoringDraft.raml @@ -2,7 +2,6 @@ (package): ProductTailoring displayName: ProductVariantTailoringDraft type: object -(beta): true description: | Either `id` or `sku` is required to reference a [ProductVariant](ctp:api:type:ProductVariant) that exists. properties: diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringAddAssetAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringAddAssetAction.raml index da76adbe9e..6d8e205d54 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringAddAssetAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringAddAssetAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringAddAssetAction discriminatorValue: addAsset description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringAddExternalImageAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringAddExternalImageAction.raml index b431b74bd4..b5862ef8ba 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringAddExternalImageAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringAddExternalImageAction.raml @@ -1,11 +1,10 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringAddExternalImageAction discriminatorValue: addExternalImage description: | - Either `variantId` or `sku` is required to reference a [ProductVariant](ctp:api:type:ProductVariant) that exists. Produces the [ProductTailoringImageAdded](/projects/messages#product-tailoring-image-added) Message. + Either `variantId` or `sku` is required to reference a [ProductVariant](ctp:api:type:ProductVariant) that exists. Produces the [ProductTailoringImageAdded](/projects/messages/product-catalog-messages#product-tailoring-image-added) Message. example: !include ../../../examples/ProductTailoring/ProductTailoringAddExternalImageAction.json properties: variantId?: diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringAddVariantAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringAddVariantAction.raml index 7fc8960b2f..fd30767a72 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringAddVariantAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringAddVariantAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringAddVariantAction discriminatorValue: addVariant example: !include ../../../examples/ProductTailoring/ProductTailoringAddVariantAction.json diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetNameAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetNameAction.raml index 53ca158e92..5b5e1e41bb 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetNameAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetNameAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringChangeAssetNameAction discriminatorValue: changeAssetName description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetOrderAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetOrderAction.raml index 6364549359..bac21894e2 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetOrderAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringChangeAssetOrderAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringChangeAssetOrderAction discriminatorValue: changeAssetOrder description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringMoveImageToPositionAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringMoveImageToPositionAction.raml index 209163649e..f66db8960c 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringMoveImageToPositionAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringMoveImageToPositionAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringMoveImageToPositionAction discriminatorValue: moveImageToPosition description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveAssetAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveAssetAction.raml index e4150a11c8..192761f3c8 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveAssetAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveAssetAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringRemoveAssetAction discriminatorValue: removeAsset description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveImageAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveImageAction.raml index e358202186..f5adde49cd 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveImageAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveImageAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringRemoveImageAction discriminatorValue: removeImage description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveVariantAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveVariantAction.raml index 5153d3dd4a..3726aa168a 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveVariantAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringRemoveVariantAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringRemoveVariantAction discriminatorValue: removeVariant description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomFieldAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomFieldAction.raml index f97bff7e06..0e6b578e4e 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomFieldAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomFieldAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetAssetCustomFieldAction discriminatorValue: setAssetCustomField description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomTypeAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomTypeAction.raml index c9e23bdcb6..5346e3161a 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomTypeAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetCustomTypeAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetAssetCustomTypeAction discriminatorValue: setAssetCustomType description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetDescriptionAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetDescriptionAction.raml index 45c0fedcb9..0a43dddc8b 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetDescriptionAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetDescriptionAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetAssetDescriptionAction discriminatorValue: setAssetDescription description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetKeyAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetKeyAction.raml index 14907aa91b..ee4c5d0526 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetKeyAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetKeyAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetAssetKeyAction discriminatorValue: setAssetKey description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetSourcesAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetSourcesAction.raml index 780a951842..218c907288 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetSourcesAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetSourcesAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetAssetSourcesAction discriminatorValue: setAssetSources description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetTagsAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetTagsAction.raml index d174bfe678..711f104541 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetTagsAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAssetTagsAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetAssetTagsAction discriminatorValue: setAssetTags description: | diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetExternalImagesAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetExternalImagesAction.raml index 24d159db25..1e24cf6be0 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetExternalImagesAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetExternalImagesAction.raml @@ -1,11 +1,10 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetExternalImagesAction discriminatorValue: setImages description: | - Either `variantId` or `sku` is required to reference a [ProductVariant](ctp:api:type:ProductVariant) that exists. Produces the [ProductTailoringImagesSet](/projects/messages#product-tailoring-images-set) Message. + Either `variantId` or `sku` is required to reference a [ProductVariant](ctp:api:type:ProductVariant) that exists. Produces the [ProductTailoringImagesSet](/projects/messages/product-catalog-messages#product-tailoring-images-set) Message. example: !include ../../../examples/ProductTailoring/ProductTailoringSetExternalImagesAction.json properties: variantId?: diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetImageLabelAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetImageLabelAction.raml index a7bcb8ffe5..cba1af1bad 100644 --- a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetImageLabelAction.raml +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetImageLabelAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): ProductTailoring type: ProductTailoringUpdateAction -(beta): true displayName: ProductTailoringSetImageLabelAction discriminatorValue: setImageLabel description: | 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/product/updates/ProductAddExternalImageAction.raml b/api-specs/api/types/product/updates/ProductAddExternalImageAction.raml index a16d04641e..3c4fbff525 100644 --- a/api-specs/api/types/product/updates/ProductAddExternalImageAction.raml +++ b/api-specs/api/types/product/updates/ProductAddExternalImageAction.raml @@ -4,7 +4,7 @@ type: ProductUpdateAction displayName: ProductAddExternalImageAction discriminatorValue: addExternalImage description: | - Either `variantId` or `sku` is required. Produces the [ProductImageAdded](/projects/messages#product-image-added) Message. + Either `variantId` or `sku` is required. Produces the [ProductImageAdded](/projects/messages/product-catalog-messages#product-image-added) Message. example: !include ../../../examples/Product/ProductAddExternalImageAction.json properties: variantId?: diff --git a/api-specs/api/types/product/updates/ProductAddToCategoryAction.raml b/api-specs/api/types/product/updates/ProductAddToCategoryAction.raml index 734fe24c16..c9fe610ae6 100644 --- a/api-specs/api/types/product/updates/ProductAddToCategoryAction.raml +++ b/api-specs/api/types/product/updates/ProductAddToCategoryAction.raml @@ -4,7 +4,7 @@ type: ProductUpdateAction displayName: ProductAddToCategoryAction discriminatorValue: addToCategory example: !include ../../../examples/Product/ProductAddToCategoryAction.json -description: Produces the [ProductAddedToCategory](/projects/messages#product-added-to-category) Message. +description: Produces the [ProductAddedToCategory](/projects/messages/product-catalog-messages#product-added-to-category) Message. properties: category: type: CategoryResourceIdentifier diff --git a/api-specs/api/types/quote-request/QuoteRequestDraft.raml b/api-specs/api/types/quote-request/QuoteRequestDraft.raml index edffc7b097..7435a9e509 100644 --- a/api-specs/api/types/quote-request/QuoteRequestDraft.raml +++ b/api-specs/api/types/quote-request/QuoteRequestDraft.raml @@ -7,7 +7,8 @@ properties: type: CartResourceIdentifier description: | Cart for which a Quote is requested. - Anonymous Carts, Carts with [Discount Codes](ctp:api:type:DiscountCode), or Carts with a `Multiple` [ShippingMode](ctp:api:type:ShippingMode) are not supported. + Anonymous Carts, Carts with [Discount Codes](ctp:api:type:DiscountCode), and Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode) are not supported. + The Cart must have a `shippingAddress` defined, otherwise an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned when [creating a Quote Request](ctp:api:endpoint:/{projectKey}/quote-requests:POST). cartVersion: type: number format: int64 diff --git a/api-specs/api/types/search/SearchSorting.raml b/api-specs/api/types/search/SearchSorting.raml index ef22260bd3..a4391c2f38 100644 --- a/api-specs/api/types/search/SearchSorting.raml +++ b/api-specs/api/types/search/SearchSorting.raml @@ -4,13 +4,11 @@ type: object displayName: SearchSorting description: | Sorting parameters provided with a Search request. - Sorting allows you to control how results to your query are sorted. - If no sorting is specified, the results are sorted by relevance in descending (`desc`) order. properties: field: type: string description: | - Use any searchable field of the resource as sort criterion. + Use any searchable field of the resource as sort criterion, or `"score"` to sort by relevance score calculated by the API. language?: type: Locale 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: | diff --git a/api-specs/api/types/types.raml b/api-specs/api/types/types.raml index e7116880e7..1bc6c47c91 100644 --- a/api-specs/api/types/types.raml +++ b/api-specs/api/types/types.raml @@ -144,6 +144,7 @@ CartDiscountValueGiftLineItem: !include cart-discount/CartDiscountValueGiftLineI CartDiscountValueGiftLineItemDraft: !include cart-discount/CartDiscountValueGiftLineItemDraft.raml CartDiscountValueRelative: !include cart-discount/CartDiscountValueRelative.raml CartDiscountValueRelativeDraft: !include cart-discount/CartDiscountValueRelativeDraft.raml +DiscountApplicationMode: !include cart-discount/DiscountApplicationMode.raml MultiBuyCustomLineItemsTarget: !include cart-discount/MultiBuyCustomLineItemsTarget.raml MultiBuyLineItemsTarget: !include cart-discount/MultiBuyLineItemsTarget.raml SelectionMode: !include cart-discount/SelectionMode.raml @@ -917,6 +918,11 @@ CustomerPasswordUpdatedMessage: !include message/CustomerPasswordUpdatedMessage. CustomerTitleSetMessage: !include message/CustomerTitleSetMessage.raml DeliveryAddedMessage: !include message/DeliveryAddedMessage.raml DeliveryAddressSetMessage: !include message/DeliveryAddressSetMessage.raml +DeliveryCustomFieldAddedMessage: !include message/DeliveryCustomFieldAddedMessage.raml +DeliveryCustomFieldChangedMessage: !include message/DeliveryCustomFieldChangedMessage.raml +DeliveryCustomFieldRemovedMessage: !include message/DeliveryCustomFieldRemovedMessage.raml +DeliveryCustomTypeRemovedMessage: !include message/DeliveryCustomTypeRemovedMessage.raml +DeliveryCustomTypeSetMessage: !include message/DeliveryCustomTypeSetMessage.raml DeliveryItemsUpdatedMessage: !include message/DeliveryItemsUpdatedMessage.raml DeliveryRemovedMessage: !include message/DeliveryRemovedMessage.raml DiscountCodeCreatedMessage: !include message/DiscountCodeCreatedMessage.raml @@ -1182,6 +1188,11 @@ CustomerPasswordUpdatedMessagePayload: !include message/payload/CustomerPassword CustomerTitleSetMessagePayload: !include message/payload/CustomerTitleSetMessagePayload.raml DeliveryAddedMessagePayload: !include message/payload/DeliveryAddedMessagePayload.raml DeliveryAddressSetMessagePayload: !include message/payload/DeliveryAddressSetMessagePayload.raml +DeliveryCustomFieldAddedMessagePayload: !include message/payload/DeliveryCustomFieldAddedMessagePayload.raml +DeliveryCustomFieldChangedMessagePayload: !include message/payload/DeliveryCustomFieldChangedMessagePayload.raml +DeliveryCustomFieldRemovedMessagePayload: !include message/payload/DeliveryCustomFieldRemovedMessagePayload.raml +DeliveryCustomTypeRemovedMessagePayload: !include message/payload/DeliveryCustomTypeRemovedMessagePayload.raml +DeliveryCustomTypeSetMessagePayload: !include message/payload/DeliveryCustomTypeSetMessagePayload.raml DeliveryItemsUpdatedMessagePayload: !include message/payload/DeliveryItemsUpdatedMessagePayload.raml DeliveryRemovedMessagePayload: !include message/payload/DeliveryRemovedMessagePayload.raml DiscountCodeCreatedMessagePayload: !include message/payload/DiscountCodeCreatedMessagePayload.raml