diff --git a/api-specs/api/api.raml b/api-specs/api/api.raml index 1684a34740..163b1b1f62 100644 --- a/api-specs/api/api.raml +++ b/api-specs/api/api.raml @@ -15,8 +15,6 @@ baseUriParameters: - europe-west1.gcp - eu-central-1.aws - australia-southeast1.gcp - - api.cn-northwest-1.aws.commercetools.cn - - eastus.azure description: | [Region](/../api/general-concepts#hosts) in which the Project is hosted. version: v1 @@ -222,10 +220,11 @@ resourceTypes: body: application/json: type: ProjectUpdate + example: !include /examples/project-update.example.json responses: 200: body: - example: !include examples/project.example.json + example: !include examples/project-update-response.example.json type: Project /as-associate: !include resources/as-associate.raml /associate-roles: !include resources/associate-roles.raml diff --git a/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomFieldAction.json b/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomFieldAction.json +++ b/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomTypeAction.json b/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomTypeAction.json +++ b/api-specs/api/examples/ApprovalFlow/ApprovalFlowSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ApprovalRule/ApprovalRuleSetCustomFieldAction.json b/api-specs/api/examples/ApprovalRule/ApprovalRuleSetCustomFieldAction.json new file mode 100644 index 0000000000..3f01134b18 --- /dev/null +++ b/api-specs/api/examples/ApprovalRule/ApprovalRuleSetCustomFieldAction.json @@ -0,0 +1,5 @@ +{ + "action": "setCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/ApprovalRule/ApprovalRuleSetCustomTypeAction.json b/api-specs/api/examples/ApprovalRule/ApprovalRuleSetCustomTypeAction.json new file mode 100644 index 0000000000..8e85cc0f76 --- /dev/null +++ b/api-specs/api/examples/ApprovalRule/ApprovalRuleSetCustomTypeAction.json @@ -0,0 +1,10 @@ +{ + "action": "setCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" + } +} diff --git a/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.json b/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.json index 7014308a75..1308e714ab 100644 --- a/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.json +++ b/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setAddressCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString", "addressId": "{{address-id}}" } diff --git a/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomTypeAction.json b/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomTypeAction.json index 33fd0cb70c..b126a5d98d 100644 --- a/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomTypeAction.json +++ b/api-specs/api/examples/BusinessUnit/BusinessUnitSetAddressCustomTypeAction.json @@ -5,7 +5,7 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" }, "addressId": "{{address-id}}" } diff --git a/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomFieldAction.json b/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomFieldAction.json +++ b/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomTypeAction.json b/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomTypeAction.json +++ b/api-specs/api/examples/BusinessUnit/BusinessUnitSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/BusinessUnitSearch/BusinessUnitPagedSearchResponse.json b/api-specs/api/examples/BusinessUnitSearch/BusinessUnitPagedSearchResponse.json new file mode 100644 index 0000000000..4f398a1c54 --- /dev/null +++ b/api-specs/api/examples/BusinessUnitSearch/BusinessUnitPagedSearchResponse.json @@ -0,0 +1,19 @@ +{ + "results": [ + { + "id": "e41337a0-ea96-4ddc-a9a4-d267976f21e0", + "relevance": 0.9264881 + }, + { + "id": "05cd5998-015c-4232-8943-ff8a1880bcbc", + "relevance": 0.6989829 + }, + { + "id": "09c3c5a2-6569-49dd-b021-af5de4cf4b02", + "relevance": 0.6989829 + } + ], + "limit": 100, + "offset": 0, + "total": 3 +} diff --git a/api-specs/api/examples/BusinessUnitSearch/BusinessUnitSearchIndexingStatusResponse.json b/api-specs/api/examples/BusinessUnitSearch/BusinessUnitSearchIndexingStatusResponse.json new file mode 100644 index 0000000000..d902676215 --- /dev/null +++ b/api-specs/api/examples/BusinessUnitSearch/BusinessUnitSearchIndexingStatusResponse.json @@ -0,0 +1,11 @@ +{ + "status": "Indexing", + "states": { + "indexed": 43242, + "failed": 0, + "estimatedTotal": 100000 + }, + "startedAt": "2023-08-15T12:56:07.89Z", + "retryCount": 2, + "lastModifiedAt": "2023-08-15T12:56:07.89Z" +} diff --git a/api-specs/api/examples/BusinessUnitSearch/BusinessUnitSearchRequest.json b/api-specs/api/examples/BusinessUnitSearch/BusinessUnitSearchRequest.json new file mode 100644 index 0000000000..07b808d876 --- /dev/null +++ b/api-specs/api/examples/BusinessUnitSearch/BusinessUnitSearchRequest.json @@ -0,0 +1,8 @@ +{ + "query": { + "fullText": { + "field": "all", + "value": "plumbing" + } + } +} diff --git a/api-specs/api/examples/Cart/CartChangeCustomLineItemCustomTypeAction.json b/api-specs/api/examples/Cart/CartChangeCustomLineItemCustomTypeAction.json index df57712acf..2fef399ff8 100644 --- a/api-specs/api/examples/Cart/CartChangeCustomLineItemCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartChangeCustomLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Cart/CartSetBillingAddressCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetBillingAddressCustomFieldAction.json index 85599223e0..e58fc1a8ad 100644 --- a/api-specs/api/examples/Cart/CartSetBillingAddressCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetBillingAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setBillingAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setBillingAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Cart/CartSetBillingAddressCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetBillingAddressCustomTypeAction.json index 5f89866b87..67780519fc 100644 --- a/api-specs/api/examples/Cart/CartSetBillingAddressCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetBillingAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setBillingAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setBillingAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Cart/CartSetCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Cart/CartSetCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Cart/CartSetCustomLineItemCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetCustomLineItemCustomFieldAction.json index b5d7d65d0c..265fa69bab 100644 --- a/api-specs/api/examples/Cart/CartSetCustomLineItemCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetCustomLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setCustomLineItemCustomField", "customLineItemId": "{{customLineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Cart/CartSetCustomLineItemCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetCustomLineItemCustomTypeAction.json index 14aa21ce9b..c98de710c8 100644 --- a/api-specs/api/examples/Cart/CartSetCustomLineItemCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetCustomLineItemCustomTypeAction.json @@ -5,7 +5,7 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" }, "customLineItemId": "{{customLineItemId}}" } diff --git a/api-specs/api/examples/Cart/CartSetCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Cart/CartSetCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomFieldAction.json index ac47d5a66d..c81e65d393 100644 --- a/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { - "action": "setItemShippingAddressCustomField", - "addressKey": "{{address-key}}", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setItemShippingAddressCustomField", + "addressKey": "{{address-key}}", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomTypeAction.json index e00625e6b2..a196acc905 100644 --- a/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetItemShippingAddressCustomTypeAction.json @@ -1,11 +1,11 @@ { - "action": "setItemShippingAddressCustomType", - "addressKey": "{{address-key}}", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setItemShippingAddressCustomType", + "addressKey": "{{address-key}}", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Cart/CartSetLineItemCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetLineItemCustomFieldAction.json index e70c70489c..91bf99d090 100644 --- a/api-specs/api/examples/Cart/CartSetLineItemCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setLineItemCustomField", "lineItemId": "{{lineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Cart/CartSetLineItemCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetLineItemCustomTypeAction.json index a308f512fe..63299e8025 100644 --- a/api-specs/api/examples/Cart/CartSetLineItemCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Cart/CartSetShippingAddressCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetShippingAddressCustomFieldAction.json index 2320c0a861..0fd1555078 100644 --- a/api-specs/api/examples/Cart/CartSetShippingAddressCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetShippingAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setShippingAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setShippingAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Cart/CartSetShippingAddressCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetShippingAddressCustomTypeAction.json index 04983e7304..19e2820163 100644 --- a/api-specs/api/examples/Cart/CartSetShippingAddressCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetShippingAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setShippingAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setShippingAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Cart/CartSetShippingCustomFieldAction.json b/api-specs/api/examples/Cart/CartSetShippingCustomFieldAction.json index ec0d127156..ca440a8d5e 100644 --- a/api-specs/api/examples/Cart/CartSetShippingCustomFieldAction.json +++ b/api-specs/api/examples/Cart/CartSetShippingCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setShippingCustomField", "shippingKey": "shippingMethodKey1", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Cart/CartSetShippingCustomTypeAction.json b/api-specs/api/examples/Cart/CartSetShippingCustomTypeAction.json index 87cffc265c..6ea634c90e 100644 --- a/api-specs/api/examples/Cart/CartSetShippingCustomTypeAction.json +++ b/api-specs/api/examples/Cart/CartSetShippingCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } 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/CartDiscount/CartDiscountSetCustomFieldAction.json b/api-specs/api/examples/CartDiscount/CartDiscountSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountSetCustomFieldAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/CartDiscount/CartDiscountSetCustomTypeAction.json b/api-specs/api/examples/CartDiscount/CartDiscountSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/CartDiscount/CartDiscountSetCustomTypeAction.json +++ b/api-specs/api/examples/CartDiscount/CartDiscountSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Category/CategorySetAssetCustomFieldAction.json b/api-specs/api/examples/Category/CategorySetAssetCustomFieldAction.json index 2548d02ed5..6b335c3674 100644 --- a/api-specs/api/examples/Category/CategorySetAssetCustomFieldAction.json +++ b/api-specs/api/examples/Category/CategorySetAssetCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setAssetCustomField", "assetId": "{{assetId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Category/CategorySetAssetCustomTypeAction.json b/api-specs/api/examples/Category/CategorySetAssetCustomTypeAction.json index 1172e5d60d..f3e8a52800 100644 --- a/api-specs/api/examples/Category/CategorySetAssetCustomTypeAction.json +++ b/api-specs/api/examples/Category/CategorySetAssetCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Category/CategorySetCustomFieldAction.json b/api-specs/api/examples/Category/CategorySetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Category/CategorySetCustomFieldAction.json +++ b/api-specs/api/examples/Category/CategorySetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Category/CategorySetCustomTypeAction.json b/api-specs/api/examples/Category/CategorySetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Category/CategorySetCustomTypeAction.json +++ b/api-specs/api/examples/Category/CategorySetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Channel/ChannelSetAddressCustomFieldAction.json b/api-specs/api/examples/Channel/ChannelSetAddressCustomFieldAction.json index f37d074f4d..1bba2d55fc 100644 --- a/api-specs/api/examples/Channel/ChannelSetAddressCustomFieldAction.json +++ b/api-specs/api/examples/Channel/ChannelSetAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Channel/ChannelSetAddressCustomTypeAction.json b/api-specs/api/examples/Channel/ChannelSetAddressCustomTypeAction.json index d224ceaa09..4036f0b0af 100644 --- a/api-specs/api/examples/Channel/ChannelSetAddressCustomTypeAction.json +++ b/api-specs/api/examples/Channel/ChannelSetAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Channel/ChannelSetCustomFieldAction.json b/api-specs/api/examples/Channel/ChannelSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Channel/ChannelSetCustomFieldAction.json +++ b/api-specs/api/examples/Channel/ChannelSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Channel/ChannelSetCustomTypeAction.json b/api-specs/api/examples/Channel/ChannelSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Channel/ChannelSetCustomTypeAction.json +++ b/api-specs/api/examples/Channel/ChannelSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Channel/ChannelSetGeoLocationAction.json b/api-specs/api/examples/Channel/ChannelSetGeoLocationAction.json index 7bc742b53d..d0ad5cb430 100644 --- a/api-specs/api/examples/Channel/ChannelSetGeoLocationAction.json +++ b/api-specs/api/examples/Channel/ChannelSetGeoLocationAction.json @@ -2,6 +2,6 @@ "action": "setGeoLocation", "geoLocation": { "type": "Point", - "coordinates": [48.163569, 11.558663] + "coordinates": [13.412119019109015, 52.50103330534661] } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/Common/GeoJsonPoint.json b/api-specs/api/examples/Common/GeoJsonPoint.json new file mode 100644 index 0000000000..7e18d118e0 --- /dev/null +++ b/api-specs/api/examples/Common/GeoJsonPoint.json @@ -0,0 +1,4 @@ +{ + "type": "Point", + "coordinates": [13.412119019109015, 52.50103330534661] +} diff --git a/api-specs/api/examples/CustomObjects/CustomObjectReference.json b/api-specs/api/examples/CustomObjects/CustomObjectReference.json new file mode 100644 index 0000000000..b12ae8b87c --- /dev/null +++ b/api-specs/api/examples/CustomObjects/CustomObjectReference.json @@ -0,0 +1,4 @@ +{ + "id": "4e2b758f-f259-4c14-808e-2beb126bc0f1", + "typeId": "key-value-document" +} diff --git a/api-specs/api/examples/Customer/CustomerSetAddressCustomFieldAction.json b/api-specs/api/examples/Customer/CustomerSetAddressCustomFieldAction.json index de69cfc7ec..1308e714ab 100644 --- a/api-specs/api/examples/Customer/CustomerSetAddressCustomFieldAction.json +++ b/api-specs/api/examples/Customer/CustomerSetAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { - "action": "setAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString", - "addressId": "{{address-id}}" - } + "action": "setAddressCustomField", + "name": "exampleStringField", + "value": "TextString", + "addressId": "{{address-id}}" +} diff --git a/api-specs/api/examples/Customer/CustomerSetAddressCustomTypeAction.json b/api-specs/api/examples/Customer/CustomerSetAddressCustomTypeAction.json index 8b70678415..b126a5d98d 100644 --- a/api-specs/api/examples/Customer/CustomerSetAddressCustomTypeAction.json +++ b/api-specs/api/examples/Customer/CustomerSetAddressCustomTypeAction.json @@ -1,11 +1,11 @@ { - "action": "setAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - }, - "addressId": "{{address-id}}" - } + "action": "setAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" + }, + "addressId": "{{address-id}}" +} diff --git a/api-specs/api/examples/Customer/CustomerSetCustomFieldAction.json b/api-specs/api/examples/Customer/CustomerSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Customer/CustomerSetCustomFieldAction.json +++ b/api-specs/api/examples/Customer/CustomerSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Customer/CustomerSetCustomTypeAction.json b/api-specs/api/examples/Customer/CustomerSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Customer/CustomerSetCustomTypeAction.json +++ b/api-specs/api/examples/Customer/CustomerSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Customer/MyCustomerSignIn.json b/api-specs/api/examples/Customer/MyCustomerSignIn.json new file mode 100644 index 0000000000..aa8d977365 --- /dev/null +++ b/api-specs/api/examples/Customer/MyCustomerSignIn.json @@ -0,0 +1,4 @@ +{ + "email": "johndoe@example.com", + "password": "secret123" +} diff --git a/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomFieldAction.json b/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomFieldAction.json +++ b/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomTypeAction.json b/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomTypeAction.json +++ b/api-specs/api/examples/CustomerGroup/CustomerGroupSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomFieldAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomFieldAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomTypeAction.json b/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomTypeAction.json +++ b/api-specs/api/examples/DiscountCode/DiscountCodeSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/GraphQL/GraphQLError.json b/api-specs/api/examples/GraphQL/GraphQLError.json index 20ba971b33..b307d06990 100644 --- a/api-specs/api/examples/GraphQL/GraphQLError.json +++ b/api-specs/api/examples/GraphQL/GraphQLError.json @@ -1,12 +1,14 @@ { - "message": "Cannot query field 'aaa' on type 'PaymentQueryResult'", + "message": "Object 35d33405-2d39-4528-b195-fa3ab6beb927 has a different version than expected. Expected: 1 - Actual: 2.", + "path": ["deleteProduct"], "locations": [ { - "line": 3, - "column": 16 + "line": 2, + "column": 3 } ], "extensions": { - "code": "InvalidInput" + "code": "ConcurrentModification", + "currentVersion": 2 } } diff --git a/api-specs/api/examples/GraphQL/GraphQLVariablesMap.json b/api-specs/api/examples/GraphQL/GraphQLVariablesMap.json new file mode 100644 index 0000000000..9e8ea56fa7 --- /dev/null +++ b/api-specs/api/examples/GraphQL/GraphQLVariablesMap.json @@ -0,0 +1 @@ +{ "productKey": "a-product-key" } diff --git a/api-specs/api/examples/Inventory/InventoryEntrySetCustomFieldAction.json b/api-specs/api/examples/Inventory/InventoryEntrySetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Inventory/InventoryEntrySetCustomFieldAction.json +++ b/api-specs/api/examples/Inventory/InventoryEntrySetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Inventory/InventoryEntrySetCustomTypeAction.json b/api-specs/api/examples/Inventory/InventoryEntrySetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Inventory/InventoryEntrySetCustomTypeAction.json +++ b/api-specs/api/examples/Inventory/InventoryEntrySetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetBillingAddressCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetBillingAddressCustomFieldAction.json index 85599223e0..e58fc1a8ad 100644 --- a/api-specs/api/examples/Order/OrderSetBillingAddressCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetBillingAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setBillingAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setBillingAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Order/OrderSetBillingAddressCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetBillingAddressCustomTypeAction.json index 5f89866b87..67780519fc 100644 --- a/api-specs/api/examples/Order/OrderSetBillingAddressCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetBillingAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setBillingAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setBillingAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Order/OrderSetCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Order/OrderSetCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetCustomLineItemCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetCustomLineItemCustomFieldAction.json index b5d7d65d0c..265fa69bab 100644 --- a/api-specs/api/examples/Order/OrderSetCustomLineItemCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetCustomLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setCustomLineItemCustomField", "customLineItemId": "{{customLineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetCustomLineItemCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetCustomLineItemCustomTypeAction.json index df57712acf..2fef399ff8 100644 --- a/api-specs/api/examples/Order/OrderSetCustomLineItemCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetCustomLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Order/OrderSetCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomFieldAction.json index cbb70d6a25..62e61832a5 100644 --- a/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { - "action": "setDeliveryAddressCustomField", - "deliveryId": "{{delivery-id}}", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setDeliveryAddressCustomField", + "deliveryId": "{{delivery-id}}", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomTypeAction.json index 6b788eb448..5a6c76c8d5 100644 --- a/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetDeliveryAddressCustomTypeAction.json @@ -1,11 +1,11 @@ { - "action": "setDeliveryAddressCustomType", - "deliveryId": "{{delivery-id}}", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setDeliveryAddressCustomType", + "deliveryId": "{{delivery-id}}", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Order/OrderSetDeliveryCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetDeliveryCustomFieldAction.json index 1656be7599..5ead3f170f 100644 --- a/api-specs/api/examples/Order/OrderSetDeliveryCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetDeliveryCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setDeliveryCustomField", "deliveryId": "exampleDeliveryID", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetDeliveryCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetDeliveryCustomTypeAction.json index 16f700418e..92a84504dc 100644 --- a/api-specs/api/examples/Order/OrderSetDeliveryCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetDeliveryCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomFieldAction.json index ac47d5a66d..c81e65d393 100644 --- a/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { - "action": "setItemShippingAddressCustomField", - "addressKey": "{{address-key}}", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setItemShippingAddressCustomField", + "addressKey": "{{address-key}}", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomTypeAction.json index e00625e6b2..a196acc905 100644 --- a/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetItemShippingAddressCustomTypeAction.json @@ -1,11 +1,11 @@ { - "action": "setItemShippingAddressCustomType", - "addressKey": "{{address-key}}", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setItemShippingAddressCustomType", + "addressKey": "{{address-key}}", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Order/OrderSetLineItemCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetLineItemCustomFieldAction.json index e70c70489c..91bf99d090 100644 --- a/api-specs/api/examples/Order/OrderSetLineItemCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setLineItemCustomField", "lineItemId": "{{lineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetLineItemCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetLineItemCustomTypeAction.json index a308f512fe..63299e8025 100644 --- a/api-specs/api/examples/Order/OrderSetLineItemCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetParcelCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetParcelCustomFieldAction.json index 67985c4c9c..09daf51945 100644 --- a/api-specs/api/examples/Order/OrderSetParcelCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetParcelCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setParcelCustomField", "parcelId": "exampleParcelID", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetParcelCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetParcelCustomTypeAction.json index 5cc2669472..2d8d885809 100644 --- a/api-specs/api/examples/Order/OrderSetParcelCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetParcelCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetReturnItemCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetReturnItemCustomFieldAction.json index 53dc3119cc..5fab04a954 100644 --- a/api-specs/api/examples/Order/OrderSetReturnItemCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetReturnItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setReturnItemCustomField", "returnItemId": "exampleReturnItemID", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetReturnItemCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetReturnItemCustomTypeAction.json index 03b1f50e1b..457d394558 100644 --- a/api-specs/api/examples/Order/OrderSetReturnItemCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetReturnItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Order/OrderSetShippingAddressCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetShippingAddressCustomFieldAction.json index 2320c0a861..0fd1555078 100644 --- a/api-specs/api/examples/Order/OrderSetShippingAddressCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetShippingAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setShippingAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setShippingAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/Order/OrderSetShippingAddressCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetShippingAddressCustomTypeAction.json index 04983e7304..19e2820163 100644 --- a/api-specs/api/examples/Order/OrderSetShippingAddressCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetShippingAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setShippingAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setShippingAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/Order/OrderSetShippingCustomFieldAction.json b/api-specs/api/examples/Order/OrderSetShippingCustomFieldAction.json index 1d892be368..261a403e36 100644 --- a/api-specs/api/examples/Order/OrderSetShippingCustomFieldAction.json +++ b/api-specs/api/examples/Order/OrderSetShippingCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setShippingCustomField", "shippingKey": "shipping-key-express", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Order/OrderSetShippingCustomTypeAction.json b/api-specs/api/examples/Order/OrderSetShippingCustomTypeAction.json index 00a1b09445..14868e0bcf 100644 --- a/api-specs/api/examples/Order/OrderSetShippingCustomTypeAction.json +++ b/api-specs/api/examples/Order/OrderSetShippingCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/OrderEditSetCustomFieldAction.json b/api-specs/api/examples/OrderEdit/OrderEditSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/OrderEdit/OrderEditSetCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/OrderEditSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/OrderEditSetCustomTypeAction.json b/api-specs/api/examples/OrderEdit/OrderEditSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/OrderEdit/OrderEditSetCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/OrderEditSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.json index 85599223e0..e58fc1a8ad 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setBillingAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setBillingAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomTypeAction.json index 5f89866b87..67780519fc 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetBillingAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setBillingAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setBillingAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.json index b5d7d65d0c..265fa69bab 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setCustomLineItemCustomField", "customLineItemId": "{{customLineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.json index df57712acf..2fef399ff8 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.json index cbb70d6a25..62e61832a5 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { - "action": "setDeliveryAddressCustomField", - "deliveryId": "{{delivery-id}}", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setDeliveryAddressCustomField", + "deliveryId": "{{delivery-id}}", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomTypeAction.json index 6b788eb448..5a6c76c8d5 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryAddressCustomTypeAction.json @@ -1,11 +1,11 @@ { - "action": "setDeliveryAddressCustomType", - "deliveryId": "{{delivery-id}}", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setDeliveryAddressCustomType", + "deliveryId": "{{delivery-id}}", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.json index 1656be7599..5ead3f170f 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setDeliveryCustomField", "deliveryId": "exampleDeliveryID", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomTypeAction.json index 16f700418e..92a84504dc 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetDeliveryCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.json index ac47d5a66d..c81e65d393 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomFieldAction.json @@ -1,6 +1,6 @@ { - "action": "setItemShippingAddressCustomField", - "addressKey": "{{address-key}}", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setItemShippingAddressCustomField", + "addressKey": "{{address-key}}", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomTypeAction.json index e00625e6b2..a196acc905 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetItemShippingAddressCustomTypeAction.json @@ -1,11 +1,11 @@ { - "action": "setItemShippingAddressCustomType", - "addressKey": "{{address-key}}", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setItemShippingAddressCustomType", + "addressKey": "{{address-key}}", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomFieldAction.json index e70c70489c..91bf99d090 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setLineItemCustomField", "lineItemId": "{{lineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomTypeAction.json index a308f512fe..63299e8025 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomFieldAction.json index 67985c4c9c..09daf51945 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setParcelCustomField", "parcelId": "exampleParcelID", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomTypeAction.json index 5cc2669472..2d8d885809 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetParcelCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.json index 53dc3119cc..5fab04a954 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setReturnItemCustomField", "returnItemId": "exampleReturnItemID", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.json index 8eacbaebbd..cecdf40de5 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetReturnItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.json index 2320c0a861..0fd1555078 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomFieldAction.json @@ -1,5 +1,5 @@ { - "action": "setShippingAddressCustomField", - "name": "ExampleStringTypeField", - "value": "TextString" - } + "action": "setShippingAddressCustomField", + "name": "exampleStringField", + "value": "TextString" +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomTypeAction.json index 04983e7304..19e2820163 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingAddressCustomTypeAction.json @@ -1,10 +1,10 @@ { - "action": "setShippingAddressCustomType", - "type": { - "id": "{{type-id}}", - "typeId": "type" - }, - "fields": { - "exampleStringTypeField": "TextString" - } + "action": "setShippingAddressCustomType", + "type": { + "id": "{{type-id}}", + "typeId": "type" + }, + "fields": { + "exampleStringField": "TextString" } +} diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomFieldAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomFieldAction.json index 1d892be368..261a403e36 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomFieldAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setShippingCustomField", "shippingKey": "shipping-key-express", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomTypeAction.json b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomTypeAction.json index 00a1b09445..14868e0bcf 100644 --- a/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomTypeAction.json +++ b/api-specs/api/examples/OrderEdit/StagedOrderSetShippingCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Payment/MyPaymentSetTransactionCustomFieldAction.json b/api-specs/api/examples/Payment/MyPaymentSetTransactionCustomFieldAction.json index 8a60041fbc..94e4f0b502 100644 --- a/api-specs/api/examples/Payment/MyPaymentSetTransactionCustomFieldAction.json +++ b/api-specs/api/examples/Payment/MyPaymentSetTransactionCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setTransactionCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Payment/PaymentSetCustomFieldAction.json b/api-specs/api/examples/Payment/PaymentSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Payment/PaymentSetCustomFieldAction.json +++ b/api-specs/api/examples/Payment/PaymentSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Payment/PaymentSetCustomTypeAction.json b/api-specs/api/examples/Payment/PaymentSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Payment/PaymentSetCustomTypeAction.json +++ b/api-specs/api/examples/Payment/PaymentSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Payment/PaymentSetTransactionCustomFieldAction.json b/api-specs/api/examples/Payment/PaymentSetTransactionCustomFieldAction.json index 473f446523..59ec83871b 100644 --- a/api-specs/api/examples/Payment/PaymentSetTransactionCustomFieldAction.json +++ b/api-specs/api/examples/Payment/PaymentSetTransactionCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setTransactionCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString", "transactionId": "transactionIdTest" } diff --git a/api-specs/api/examples/Payment/PaymentSetTransactionCustomTypeAction.json b/api-specs/api/examples/Payment/PaymentSetTransactionCustomTypeAction.json index 9b6f470e19..e80af65db6 100644 --- a/api-specs/api/examples/Payment/PaymentSetTransactionCustomTypeAction.json +++ b/api-specs/api/examples/Payment/PaymentSetTransactionCustomTypeAction.json @@ -5,7 +5,7 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" }, "transactionId": "transactionIdTest" } diff --git a/api-specs/api/examples/Product/ProductSetAssetCustomFieldAction.json b/api-specs/api/examples/Product/ProductSetAssetCustomFieldAction.json index fa3b0ae8e6..05370b3aa9 100644 --- a/api-specs/api/examples/Product/ProductSetAssetCustomFieldAction.json +++ b/api-specs/api/examples/Product/ProductSetAssetCustomFieldAction.json @@ -2,6 +2,6 @@ "action": "setAssetCustomField", "variantId": 1, "assetId": "{{assetId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Product/ProductSetAssetCustomTypeAction.json b/api-specs/api/examples/Product/ProductSetAssetCustomTypeAction.json index 0de58e64a7..55a60ba9b9 100644 --- a/api-specs/api/examples/Product/ProductSetAssetCustomTypeAction.json +++ b/api-specs/api/examples/Product/ProductSetAssetCustomTypeAction.json @@ -7,6 +7,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Product/ProductSetProductPriceCustomFieldAction.json b/api-specs/api/examples/Product/ProductSetProductPriceCustomFieldAction.json index 538a532055..bdb25ed581 100644 --- a/api-specs/api/examples/Product/ProductSetProductPriceCustomFieldAction.json +++ b/api-specs/api/examples/Product/ProductSetProductPriceCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setProductPriceCustomField", "priceId": "{{priceId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Product/ProductSetProductPriceCustomTypeAction.json b/api-specs/api/examples/Product/ProductSetProductPriceCustomTypeAction.json index ceb9e74208..f7676a9395 100644 --- a/api-specs/api/examples/Product/ProductSetProductPriceCustomTypeAction.json +++ b/api-specs/api/examples/Product/ProductSetProductPriceCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomFieldAction.json b/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomFieldAction.json +++ b/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomTypeAction.json b/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomTypeAction.json +++ b/api-specs/api/examples/ProductSelection/ProductSelectionSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomFieldAction.json b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomFieldAction.json index 146336b1af..ba6fc33f74 100644 --- a/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomFieldAction.json +++ b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomFieldAction.json @@ -2,6 +2,6 @@ "action": "setAssetCustomField", "assetId": "{{assetId}}", "variantId": 1, - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomTypeAction.json b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomTypeAction.json index 0de58e64a7..55a60ba9b9 100644 --- a/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomTypeAction.json +++ b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAssetCustomTypeAction.json @@ -7,6 +7,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ProductTailoring/ProductTailoringSetAttributeAction.json b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAttributeAction.json new file mode 100644 index 0000000000..03c3e5f744 --- /dev/null +++ b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAttributeAction.json @@ -0,0 +1,6 @@ +{ + "action": "setAttribute", + "variantId": 1, + "name": "ExampleStringTypeAttribute", + "value": "TextString" +} diff --git a/api-specs/api/examples/ProductTailoring/ProductTailoringSetAttributeInAllVariantsAction.json b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAttributeInAllVariantsAction.json new file mode 100644 index 0000000000..9c11f4c399 --- /dev/null +++ b/api-specs/api/examples/ProductTailoring/ProductTailoringSetAttributeInAllVariantsAction.json @@ -0,0 +1,5 @@ +{ + "action": "setAttributeInAllVariants", + "name": "ExampleStringTypeAttribute", + "value": "TextString" +} diff --git a/api-specs/api/examples/Project/ProjectChangeBusinessUnitSearchStatusAction.json b/api-specs/api/examples/Project/ProjectChangeBusinessUnitSearchStatusAction.json new file mode 100644 index 0000000000..84f6d45c36 --- /dev/null +++ b/api-specs/api/examples/Project/ProjectChangeBusinessUnitSearchStatusAction.json @@ -0,0 +1,4 @@ +{ + "action": "changeBusinessUnitSearchStatus", + "status": "Activated" +} diff --git a/api-specs/api/examples/Quote/QuoteSetCustomFieldAction.json b/api-specs/api/examples/Quote/QuoteSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Quote/QuoteSetCustomFieldAction.json +++ b/api-specs/api/examples/Quote/QuoteSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Quote/QuoteSetCustomTypeAction.json b/api-specs/api/examples/Quote/QuoteSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Quote/QuoteSetCustomTypeAction.json +++ b/api-specs/api/examples/Quote/QuoteSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomFieldAction.json b/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomFieldAction.json +++ b/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomTypeAction.json b/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomTypeAction.json +++ b/api-specs/api/examples/QuoteRequest/QuoteRequestSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Review/ReviewSetCustomFieldAction.json b/api-specs/api/examples/Review/ReviewSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Review/ReviewSetCustomFieldAction.json +++ b/api-specs/api/examples/Review/ReviewSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Review/ReviewSetCustomTypeAction.json b/api-specs/api/examples/Review/ReviewSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Review/ReviewSetCustomTypeAction.json +++ b/api-specs/api/examples/Review/ReviewSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomFieldAction.json b/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomFieldAction.json +++ b/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomTypeAction.json b/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomTypeAction.json +++ b/api-specs/api/examples/ShippingMethod/ShippingMethodSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ShoppingList/ShoppingListSetCustomFieldAction.json b/api-specs/api/examples/ShoppingList/ShoppingListSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/ShoppingList/ShoppingListSetCustomFieldAction.json +++ b/api-specs/api/examples/ShoppingList/ShoppingListSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ShoppingList/ShoppingListSetCustomTypeAction.json b/api-specs/api/examples/ShoppingList/ShoppingListSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/ShoppingList/ShoppingListSetCustomTypeAction.json +++ b/api-specs/api/examples/ShoppingList/ShoppingListSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomFieldAction.json b/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomFieldAction.json index e70c70489c..91bf99d090 100644 --- a/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomFieldAction.json +++ b/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setLineItemCustomField", "lineItemId": "{{lineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomTypeAction.json b/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomTypeAction.json index a308f512fe..63299e8025 100644 --- a/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomTypeAction.json +++ b/api-specs/api/examples/ShoppingList/ShoppingListSetLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.json b/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.json index a9c2ee703b..d69c4d0469 100644 --- a/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.json +++ b/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomFieldAction.json @@ -1,6 +1,6 @@ { "action": "setTextLineItemCustomField", "textLineItemId": "{{lineItemId}}", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.json b/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.json index 9cac524e6f..d1f6bb16eb 100644 --- a/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.json +++ b/api-specs/api/examples/ShoppingList/ShoppingListSetTextLineItemCustomTypeAction.json @@ -6,6 +6,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomFieldAction.json b/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomFieldAction.json +++ b/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomTypeAction.json b/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomTypeAction.json +++ b/api-specs/api/examples/StagedQuote/StagedQuoteSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomFieldAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomFieldAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomTypeAction.json b/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomTypeAction.json +++ b/api-specs/api/examples/StandalonePrice/StandalonePriceSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Store/StoreSetCustomFieldAction.json b/api-specs/api/examples/Store/StoreSetCustomFieldAction.json index 600781b63a..3f01134b18 100644 --- a/api-specs/api/examples/Store/StoreSetCustomFieldAction.json +++ b/api-specs/api/examples/Store/StoreSetCustomFieldAction.json @@ -1,5 +1,5 @@ { "action": "setCustomField", - "name": "ExampleStringTypeField", + "name": "exampleStringField", "value": "TextString" } diff --git a/api-specs/api/examples/Store/StoreSetCustomTypeAction.json b/api-specs/api/examples/Store/StoreSetCustomTypeAction.json index f91f59d9e0..8e85cc0f76 100644 --- a/api-specs/api/examples/Store/StoreSetCustomTypeAction.json +++ b/api-specs/api/examples/Store/StoreSetCustomTypeAction.json @@ -5,6 +5,6 @@ "typeId": "type" }, "fields": { - "exampleStringTypeField": "TextString" + "exampleStringField": "TextString" } } diff --git a/api-specs/api/examples/Subscription/SubscriptionEventBridgeDestination.json b/api-specs/api/examples/Subscription/SubscriptionEventBridgeDestination.json index 556a7f5d3c..d578679707 100644 --- a/api-specs/api/examples/Subscription/SubscriptionEventBridgeDestination.json +++ b/api-specs/api/examples/Subscription/SubscriptionEventBridgeDestination.json @@ -1,5 +1,6 @@ { "type": "EventBridge", "accountId": "", - "region": "" + "region": "", + "source": "aws.partner/commercetools.com/commercetools-project-1/eventbridge" } diff --git a/api-specs/api/examples/Type/CustomFieldEnumType.json b/api-specs/api/examples/Type/CustomFieldEnumType.json new file mode 100644 index 0000000000..190dde0ff1 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldEnumType.json @@ -0,0 +1,13 @@ +{ + "name": "Enum", + "values": [ + { + "key": "first-value", + "label": "First" + }, + { + "key": "second-value", + "label": "Second" + } + ] +} diff --git a/api-specs/api/examples/Type/CustomFieldEnumValue.json b/api-specs/api/examples/Type/CustomFieldEnumValue.json new file mode 100644 index 0000000000..28b077e607 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldEnumValue.json @@ -0,0 +1,4 @@ +{ + "key": "enum-value-key", + "label": "Enum value label" +} diff --git a/api-specs/api/examples/Type/CustomFieldLocalizedEnumType.json b/api-specs/api/examples/Type/CustomFieldLocalizedEnumType.json new file mode 100644 index 0000000000..3b98e910a5 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldLocalizedEnumType.json @@ -0,0 +1,13 @@ +{ + "name": "LocalizedEnum", + "values": [ + { + "key": "first-value", + "label": { "en": "First", "de": "Erste" } + }, + { + "key": "second-value", + "label": { "en": "Second", "de": "Zweite" } + } + ] +} diff --git a/api-specs/api/examples/Type/CustomFieldLocalizedEnumValue.json b/api-specs/api/examples/Type/CustomFieldLocalizedEnumValue.json new file mode 100644 index 0000000000..c9fa1fd321 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldLocalizedEnumValue.json @@ -0,0 +1,4 @@ +{ + "key": "localized-enum-value-key", + "label": { "en": "Localized enum value label" } +} diff --git a/api-specs/api/examples/Type/CustomFieldReferenceType.json b/api-specs/api/examples/Type/CustomFieldReferenceType.json new file mode 100644 index 0000000000..e657d4f39b --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldReferenceType.json @@ -0,0 +1,4 @@ +{ + "name": "Reference", + "referenceTypeId": "product" +} diff --git a/api-specs/api/examples/Type/CustomFieldSetType.json b/api-specs/api/examples/Type/CustomFieldSetType.json new file mode 100644 index 0000000000..66a8e8ebc9 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldSetType.json @@ -0,0 +1,7 @@ +{ + "name": "Set", + "elementType": { + "name": "Reference", + "referenceTypeId": "product" + } +} diff --git a/api-specs/api/examples/Type/CustomFields.json b/api-specs/api/examples/Type/CustomFields.json new file mode 100644 index 0000000000..7df498cf54 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFields.json @@ -0,0 +1,9 @@ +{ + "type": { + "id": "ff8b0f8c-78c8-4c4c-a4b7-2545d9279515", + "typeId": "type" + }, + "fields": { + "exampleStringField": "The value of this Custom Field." + } +} diff --git a/api-specs/api/examples/Type/CustomFieldsDraft.json b/api-specs/api/examples/Type/CustomFieldsDraft.json new file mode 100644 index 0000000000..728249f423 --- /dev/null +++ b/api-specs/api/examples/Type/CustomFieldsDraft.json @@ -0,0 +1,9 @@ +{ + "type": { + "key": "key-of-type", + "typeId": "type" + }, + "fields": { + "exampleStringField": "The value of this Custom Field." + } +} diff --git a/api-specs/api/examples/Type/FieldContainer.json b/api-specs/api/examples/Type/FieldContainer.json index 41408bf192..98b1cb7c67 100644 --- a/api-specs/api/examples/Type/FieldContainer.json +++ b/api-specs/api/examples/Type/FieldContainer.json @@ -1,13 +1,13 @@ { - "example-boolean-field": true, - "example-set-of-boolean-field": [true, false, true], - "example-string-field": "Any String value", - "example-set-of-string-field": ["Some String value", "Another String value"], - "example-localized-string-field": { + "exampleBooleanField": true, + "exampleSetOfBooleanField": [true, false, true], + "exampleStringField": "Any String value", + "exampleSetOfStringField": ["Some String value", "Another String value"], + "exampleLocalizedStringField": { "en": "English text", "es": "texto en español" }, - "example-set-of-localized-string-field": [ + "exampleSetOfLocalizedStringField": [ { "en": "English text 1", "es": "texto en español 1" @@ -17,25 +17,25 @@ "es": "texto en español 2" } ], - "example-enum-field": "enum key defined in FieldDefinition", - "example-set-of-enum-field": [ + "exampleEnumField": "enum key defined in FieldDefinition", + "exampleSetOfEnumField": [ "enum key defined in FieldDefinition-1", "enum key defined in FieldDefinition-2" ], - "example-localized-enum-field": "enum key defined in FieldDefinition", - "example-set-of-localized-enum-field": [ + "exampleLocalizedEnumField": "enum key defined in FieldDefinition", + "exampleSetOfLocalizedEnumField": [ "enum key defined in FieldDefinition-1", "enum key defined in FieldDefinition-2" ], - "example-number-field": 42, - "example-set-of-number-field": [1, 2, 7], - "example-money-field": { + "exampleNumberField": 42, + "exampleSetOfNumberField": [1, 2, 7], + "exampleMoneyField": { "type": "centPrecision", "currencyCode": "USD", "centAmount": 124500, "fractionDigits": 2 }, - "example-set-of-money-field": [ + "exampleSetOfMoneyField": [ { "type": "centPrecision", "currencyCode": "USD", @@ -49,23 +49,23 @@ "fractionDigits": 2 } ], - "example-date-field": "2001-10-12", - "example-set-of-date-field": ["2001-10-12", "2015-03-14", "2003-05-15"], - "example-time-field": "14:00:00.000", - "example-set-of-time-field": ["14:00:00.000", "14:30:00.000"], - "example-datetime-field": "2018-10-14T14:00:00.000Z", - "example-set-of-datetime-field": ["2018-10-14T14:00:00.000Z"], - "example-reference-field": { + "exampleDateField": "2001-10-12", + "exampleSetOfDateField": ["2001-10-12", "2015-03-14", "2003-05-15"], + "exampleTimeField": "14:00:00.000", + "exampleSetOfTimeField": ["14:00:00.000", "14:30:00.000"], + "exampleDatetimeField": "2018-10-14T14:00:00.000Z", + "exampleSetOfDatetimeField": ["2018-10-14T14:00:00.000Z"], + "exampleReferenceField": { "typeId": "product", "id": "d1229e6f-2b79-441e-b419-180311e52754" }, - "example-set-of-reference-field": [ + "exampleSetOfReferenceField": [ { "typeId": "product", "id": "d1229e6f-2b79-441e-b419-180311e52754" }, { - "typeId": "customer", + "typeId": "product", "id": "e1549e6f-3b79-441e-c486-957480r23744" } ] diff --git a/api-specs/api/examples/Type/FieldDefinition.json b/api-specs/api/examples/Type/FieldDefinition.json new file mode 100644 index 0000000000..ce13d26da0 --- /dev/null +++ b/api-specs/api/examples/Type/FieldDefinition.json @@ -0,0 +1,15 @@ +{ + "type": { + "name": "Set", + "elementType": { + "name": "Reference", + "referenceTypeId": "product" + } + }, + "name": "exampleSetOfReferenceField", + "label": { + "en": "Example Set of Reference Field" + }, + "required": false, + "inputHint": "SingleLine" +} diff --git a/api-specs/api/examples/Type/TypeAddEnumValueAction.json b/api-specs/api/examples/Type/TypeAddEnumValueAction.json index 5e6c91d82b..1704a384e5 100644 --- a/api-specs/api/examples/Type/TypeAddEnumValueAction.json +++ b/api-specs/api/examples/Type/TypeAddEnumValueAction.json @@ -1,8 +1,8 @@ { "action": "addEnumValue", - "fieldName": "CustomENumField", + "fieldName": "exampleEnumField", "value": { "key": "NewENumKey", "label": "NewENumLabel" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/Type/TypeAddLocalizedEnumValueAction.json b/api-specs/api/examples/Type/TypeAddLocalizedEnumValueAction.json index fe5c2ae0c9..33c3049059 100644 --- a/api-specs/api/examples/Type/TypeAddLocalizedEnumValueAction.json +++ b/api-specs/api/examples/Type/TypeAddLocalizedEnumValueAction.json @@ -1,6 +1,6 @@ { "action": "addLocalizedEnumValue", - "fieldName": "CustomLeNumField", + "fieldName": "exampleLocalizedEnumField", "value": { "key": "NewLocalizedEnumKeyString", "label": { @@ -8,4 +8,4 @@ "de": "NewLocalizedEnumLabelDE" } } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/Type/TypeChangeEnumValueLabelAction.json b/api-specs/api/examples/Type/TypeChangeEnumValueLabelAction.json new file mode 100644 index 0000000000..8245fb4f3e --- /dev/null +++ b/api-specs/api/examples/Type/TypeChangeEnumValueLabelAction.json @@ -0,0 +1,8 @@ +{ + "action": "changeEnumValueLabel", + "fieldName": "exampleEnumField", + "value": { + "key": "NewENumKey", + "label": "New value" + } +} diff --git a/api-specs/api/examples/Type/TypeChangeEnumValueOrderAction.json b/api-specs/api/examples/Type/TypeChangeEnumValueOrderAction.json index ebce7ef0ea..098ec33d94 100644 --- a/api-specs/api/examples/Type/TypeChangeEnumValueOrderAction.json +++ b/api-specs/api/examples/Type/TypeChangeEnumValueOrderAction.json @@ -1,10 +1,5 @@ { "action": "changeEnumValueOrder", - "fieldName": "CustomENumField", - "keys": [ - "neweNumKey", - "NewENumKey", - "enum2", - "enum1" - ] -} \ No newline at end of file + "fieldName": "exampleEnumField", + "keys": ["enum3", "enum4", "enum2", "enum1"] +} diff --git a/api-specs/api/examples/Type/TypeChangeFieldDefinitionOrderAction.json b/api-specs/api/examples/Type/TypeChangeFieldDefinitionOrderAction.json index f69c8f11dd..fa74a8182c 100644 --- a/api-specs/api/examples/Type/TypeChangeFieldDefinitionOrderAction.json +++ b/api-specs/api/examples/Type/TypeChangeFieldDefinitionOrderAction.json @@ -1,8 +1,8 @@ { "action": "changeFieldDefinitionOrder", "fieldNames": [ - "CustomENumField", - "CustomLeNumField", - "CustomTextField" + "exampleEnumField", + "exampleLocalizedEnumField", + "exampleStringField" ] -} \ No newline at end of file +} diff --git a/api-specs/api/examples/Type/TypeChangeInputHintAction.json b/api-specs/api/examples/Type/TypeChangeInputHintAction.json new file mode 100644 index 0000000000..aa5f1806a1 --- /dev/null +++ b/api-specs/api/examples/Type/TypeChangeInputHintAction.json @@ -0,0 +1,5 @@ +{ + "action": "changeInputHint", + "fieldName": "exampleBooleanField", + "inputHint": "MultiLine" +} diff --git a/api-specs/api/examples/Type/TypeChangeLabelAction.json b/api-specs/api/examples/Type/TypeChangeLabelAction.json index 90a8d3deb8..f473e3555f 100644 --- a/api-specs/api/examples/Type/TypeChangeLabelAction.json +++ b/api-specs/api/examples/Type/TypeChangeLabelAction.json @@ -1,8 +1,8 @@ { "action": "changeLabel", - "fieldName": "CustomTextField", + "fieldName": "exampleStringField", "label": { "de": "NewLabelDE", "en": "NewLabelEN" } -} \ No newline at end of file +} diff --git a/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueLabelAction.json b/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueLabelAction.json new file mode 100644 index 0000000000..84514b2fe6 --- /dev/null +++ b/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueLabelAction.json @@ -0,0 +1,11 @@ +{ + "action": "changeLocalizedEnumValueLabel", + "fieldName": "exampleLocalizedEnumField", + "value": { + "key": "NewLocalizedEnumKeyString", + "label": { + "en": "NewLocalizedEnumLabelEN", + "de": "NewLocalizedEnumLabelDE" + } + } +} diff --git a/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueOrderAction.json b/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueOrderAction.json index 09421136d5..f88ffee84b 100644 --- a/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueOrderAction.json +++ b/api-specs/api/examples/Type/TypeChangeLocalizedEnumValueOrderAction.json @@ -1,10 +1,5 @@ { "action": "changeLocalizedEnumValueOrder", - "fieldName": "CustomLeNumField", - "keys": [ - "newleNumKey", - "NewLocalizedEnumKeyString", - "lenum2", - "lenum1" - ] -} \ No newline at end of file + "fieldName": "exampleLocalizedEnumField", + "keys": ["lenum3", "lenum4", "lenum2", "lenum1"] +} diff --git a/api-specs/api/examples/Type/TypeDraft.json b/api-specs/api/examples/Type/TypeDraft.json new file mode 100644 index 0000000000..eb467532e1 --- /dev/null +++ b/api-specs/api/examples/Type/TypeDraft.json @@ -0,0 +1,23 @@ +{ + "key": "line-item-string-field", + "name": { + "en": "String Custom Field on Line Items" + }, + "description": { + "en": "This adds a Custom Field on Line Items, which can hold any string value." + }, + "resourceTypeIds": ["line-item"], + "fieldDefinitions": [ + { + "name": "exampleStringField", + "label": { + "en": "Example string field." + }, + "required": false, + "type": { + "name": "String" + }, + "inputHint": "SingleLine" + } + ] +} diff --git a/api-specs/api/examples/Warning/ImageProcessingOngoingWarning.json b/api-specs/api/examples/Warning/ImageProcessingOngoingWarning.json new file mode 100644 index 0000000000..20dcf49b3b --- /dev/null +++ b/api-specs/api/examples/Warning/ImageProcessingOngoingWarning.json @@ -0,0 +1,4 @@ +{ + "code": "ImageProcessingOngoing", + "message": "The image processing is still ongoing." +} diff --git a/api-specs/api/examples/channel-updated.example.json b/api-specs/api/examples/channel-updated.example.json new file mode 100644 index 0000000000..ff1d5b633c --- /dev/null +++ b/api-specs/api/examples/channel-updated.example.json @@ -0,0 +1,13 @@ +{ + "id": "ac390383-370f-43f8-a534-db1604cb96a8", + "key": "commercetools", + "version": 2, + "name": { + "en": "New Name" + }, + "roles": [ + "InventorySupply" + ], + "createdAt": "2015-05-28T09:48:35.023Z", + "lastModifiedAt": "2015-06-02T09:48:35.023Z" +} diff --git a/api-specs/api/examples/custom-objects.example.json b/api-specs/api/examples/custom-objects.example.json index 594afcc2d9..0f71af5cd3 100644 --- a/api-specs/api/examples/custom-objects.example.json +++ b/api-specs/api/examples/custom-objects.example.json @@ -10,10 +10,12 @@ "container": "test-container", "key": "ac390383-370f-43f8-a534-db1604cb96a8", "value": { - "name": "commercetools Composable Commerce", - "slug": "commercetools-composable-commerce", - "lat": 52.523753, - "lng": 13.380434 + "name": "commercetools", + "slug": "commercetools", + "geoLocation": { + "type": "Point", + "coordinates": [13.412119019109015, 52.50103330534661] + } }, "createdAt": "2015-05-28T09:48:35.098Z", "lastModifiedAt": "2015-07-01T15:58:36.930Z" 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/graphql-query.example.json b/api-specs/api/examples/graphql-query.example.json index ffacb0298f..cbbff21455 100644 --- a/api-specs/api/examples/graphql-query.example.json +++ b/api-specs/api/examples/graphql-query.example.json @@ -1,5 +1,5 @@ { - "query": "\n query query_1($productId: String){\n product(key:$productId){\n key\n }\n }\n ", - "operationName": "query_1", - "variables": { "productId": "f8ded810-a1" } + "query": "query getProductByKey($productKey: String!) { product(key: $productKey) { id version }}", + "operationName": "getProductByKey", + "variables": { "productKey": "a-product-key" } } diff --git a/api-specs/api/examples/graphql.example.json b/api-specs/api/examples/graphql.example.json index 2175623d69..d34345b5a1 100644 --- a/api-specs/api/examples/graphql.example.json +++ b/api-specs/api/examples/graphql.example.json @@ -1,25 +1,8 @@ { "data": { - "products": { - "results": [ - { - "id": "00f230ac-da51-4a18-99eb-83368f1435b1", - "masterData": { - "staged": { - "skus": [ - "test" - ], - "name": "Test" - }, - "current": { - "skus": [ - "test" - ], - "name": "Test" - } - } - } - ] + "product": { + "id": "35d33405-2d39-4528-b195-fa3ab6beb927", + "version": 2 } } } diff --git a/api-specs/api/examples/inventory-create.example.json b/api-specs/api/examples/inventory-create.example.json index 6682f1523f..f6d6da3e7b 100644 --- a/api-specs/api/examples/inventory-create.example.json +++ b/api-specs/api/examples/inventory-create.example.json @@ -1,5 +1,5 @@ { + "key": "ie-key-1", "sku": "sku_GIRLS_CREW_variant1_1421832124541", - "quantityOnStock": 4, - "availableQuantity": 4 + "quantityOnStock": 4 } diff --git a/api-specs/api/examples/order-import-create.example.json b/api-specs/api/examples/order-import-create.example.json new file mode 100644 index 0000000000..48f8b77c41 --- /dev/null +++ b/api-specs/api/examples/order-import-create.example.json @@ -0,0 +1,74 @@ +{ + "type": "Order", + "id": "35f816ea-7770-4623-895b-7a6454e22e8a", + "version": 1, + "createdAt": "2024-10-09T23:12:14.264Z", + "lastModifiedAt": "2024-10-09T23:12:14.264Z", + "lastModifiedBy": { + "clientId": "qnfzsm5-qNfCGwHiRgI03Emc", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "qnfzsm5-qNfCGwHiRgI03Emc", + "isPlatformClient": false + }, + "orderNumber": "100000001", + "totalPrice": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 4200, + "fractionDigits": 2 + }, + "orderState": "Open", + "syncInfo": [], + "returnInfo": [], + "taxMode": "External", + "inventoryMode": "None", + "taxRoundingMode": "HalfEven", + "taxCalculationMode": "LineItemLevel", + "origin": "Customer", + "shippingMode": "Single", + "shipping": [], + "lineItems": [], + "customLineItems": [ + { + "id": "fc864da7-0cc9-438f-9626-4d5907ea51c9", + "name": { + "en": "Name EN", + "de": "Name DE" + }, + "money": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 4200, + "fractionDigits": 2 + }, + "slug": "mySlug", + "quantity": 1, + "discountedPricePerQuantity": [], + "state": [ + { + "quantity": 1, + "state": { + "typeId": "state", + "id": "7e3b7f8b-74c1-4d01-8335-0197ba1de6e9" + } + } + ], + "totalPrice": { + "type": "centPrecision", + "currencyCode": "EUR", + "centAmount": 4200, + "fractionDigits": 2 + }, + "taxedPricePortions": [], + "perMethodTaxRate": [], + "priceMode": "Standard" + } + ], + "transactionFee": false, + "discountCodes": [], + "directDiscounts": [], + "itemShippingAddresses": [], + "refusedGifts": [] +} diff --git a/api-specs/api/examples/order-import.example.json b/api-specs/api/examples/order-import.example.json index 74570987b9..0d3875dd9b 100644 --- a/api-specs/api/examples/order-import.example.json +++ b/api-specs/api/examples/order-import.example.json @@ -1,7 +1,22 @@ { "orderNumber": "100000001", "totalPrice": { - "centAmount": 1000, + "centAmount": 4200, "currencyCode": "EUR" - } + }, + "lineItems": [], + "customLineItems": [ + { + "name": { + "en": "Name EN", + "de": "Name DE" + }, + "quantity": 1, + "money": { + "currencyCode": "EUR", + "centAmount": 4200 + }, + "slug": "mySlug" + } + ] } diff --git a/api-specs/api/examples/product-tailoring-create.example.json b/api-specs/api/examples/product-tailoring-create.example.json index 706275ff3c..f5f4614b80 100644 --- a/api-specs/api/examples/product-tailoring-create.example.json +++ b/api-specs/api/examples/product-tailoring-create.example.json @@ -21,7 +21,8 @@ "h": 300 } } - ] + ], + "attributes": [{ "name": "my-attribute", "value": "attribute-1" }] }, { "sku": "sku-1", @@ -33,7 +34,8 @@ "h": 300 } } - ] + ], + "attributes": [{ "name": "my-attribute", "value": "attribute-2" }] } ], "publish": false diff --git a/api-specs/api/examples/product-tailoring-in-store-create.example.json b/api-specs/api/examples/product-tailoring-in-store-create.example.json index 75883c0169..1efa30a9e0 100644 --- a/api-specs/api/examples/product-tailoring-in-store-create.example.json +++ b/api-specs/api/examples/product-tailoring-in-store-create.example.json @@ -20,7 +20,21 @@ "h": 300 } } - ] + ], + "attributes": [{ "name": "my-attribute", "value": "attribute-1" }] + }, + { + "sku": "sku-1", + "images": [ + { + "url": "//myimage-2.png", + "dimensions": { + "w": 400, + "h": 300 + } + } + ], + "attributes": [{ "name": "my-attribute", "value": "attribute-2" }] } ], "publish": false diff --git a/api-specs/api/examples/product-tailoring-list.example.json b/api-specs/api/examples/product-tailoring-list.example.json index 3242760eb4..21c9a52015 100644 --- a/api-specs/api/examples/product-tailoring-list.example.json +++ b/api-specs/api/examples/product-tailoring-list.example.json @@ -6,7 +6,6 @@ { "id": "207ee692-6002-4570-a78c-d15e7adbebbb", "version": 2, - "versionModifiedAt": "2023-09-01T13:41:50.662Z", "createdAt": "2023-09-01T13:26:10.475Z", "lastModifiedAt": "2023-09-01T13:26:10.475Z", "lastModifiedBy": { @@ -59,7 +58,8 @@ } } ], - "assets": [] + "assets": [], + "attributes": [] }, { "id": 2, @@ -72,7 +72,8 @@ } } ], - "assets": [] + "assets": [], + "attributes": [] } ] }, @@ -83,7 +84,6 @@ { "id": "207ee692-6002-4570-a78c-d15e7adbecc", "version": 2, - "versionModifiedAt": "2023-09-01T13:42:50.662Z", "createdAt": "2023-09-01T13:27:10.475Z", "lastModifiedAt": "2023-09-01T14:26:10.475Z", "lastModifiedBy": { diff --git a/api-specs/api/examples/product-tailoring-updated.example.json b/api-specs/api/examples/product-tailoring-updated.example.json index a9cc5bdac2..7463bb95fb 100644 --- a/api-specs/api/examples/product-tailoring-updated.example.json +++ b/api-specs/api/examples/product-tailoring-updated.example.json @@ -1,7 +1,6 @@ { "id": "207ee692-6002-4570-a78c-d15e7adbebbb", "version": 2, - "versionModifiedAt": "2023-09-01T13:41:50.662Z", "createdAt": "2023-09-01T13:26:10.475Z", "lastModifiedAt": "2023-09-01T13:26:10.475Z", "lastModifiedBy": { diff --git a/api-specs/api/examples/product-tailoring-with-image-processing-warning.example.json b/api-specs/api/examples/product-tailoring-with-image-processing-warning.example.json new file mode 100644 index 0000000000..3c3bdfa57d --- /dev/null +++ b/api-specs/api/examples/product-tailoring-with-image-processing-warning.example.json @@ -0,0 +1,81 @@ +{ + "id": "207ee692-6002-4570-a78c-d15e7adbebbb", + "version": 2, + "createdAt": "2023-09-01T13:26:10.475Z", + "lastModifiedAt": "2023-09-01T13:26:10.475Z", + "lastModifiedBy": { + "clientId": "ywjliB_u26xzmcJNKznjbJp4", + "isPlatformClient": false + }, + "createdBy": { + "clientId": "ywjliB_u26xzmcJNKznjbJp4", + "isPlatformClient": false + }, + "product": { + "typeId": "product", + "id": "daf720e5-9e8e-4300-98db-3a3219327db9" + }, + "store": { + "typeId": "store", + "key": "store-key" + }, + "current": { + "variants": [] + }, + "staged": { + "name": { + "en": "tailored name" + }, + "description": { + "en": "tailored description" + }, + "metaTitle": { + "en": "tailored meta title" + }, + "metaDescription": { + "en": "tailored meta description" + }, + "metaKeywords": { + "en": "tailored meta keywords" + }, + "slug": { + "en": "tailored-slug" + }, + "variants": [ + { + "id": 1, + "images": [ + { + "url": "//myimage.jpg", + "dimensions": { + "w": 400, + "h": 300 + } + } + ], + "assets": [] + }, + { + "id": 2, + "images": [ + { + "url": "//myimage-2.png", + "dimensions": { + "w": 400, + "h": 300 + } + } + ], + "assets": [] + } + ] + }, + "published": false, + "hasStagedChanges": true, + "warnings": [ + { + "code": "ImageProcessingOngoing", + "message": "The image processing is still ongoing." + } + ] +} diff --git a/api-specs/api/examples/product-tailoring.example.json b/api-specs/api/examples/product-tailoring.example.json index 18756c3d04..0072c3e2a1 100644 --- a/api-specs/api/examples/product-tailoring.example.json +++ b/api-specs/api/examples/product-tailoring.example.json @@ -1,7 +1,6 @@ { "id": "207ee692-6002-4570-a78c-d15e7adbebbb", "version": 2, - "versionModifiedAt": "2023-09-01T13:41:50.662Z", "createdAt": "2023-09-01T13:26:10.475Z", "lastModifiedAt": "2023-09-01T13:26:10.475Z", "lastModifiedBy": { @@ -54,7 +53,8 @@ } } ], - "assets": [] + "assets": [], + "attributes": [] }, { "id": 2, @@ -67,7 +67,8 @@ } } ], - "assets": [] + "assets": [], + "attributes": [] } ] }, diff --git a/api-specs/api/examples/product-with-image-processing-warning.example.json b/api-specs/api/examples/product-with-image-processing-warning.example.json new file mode 100644 index 0000000000..2a109bda54 --- /dev/null +++ b/api-specs/api/examples/product-with-image-processing-warning.example.json @@ -0,0 +1,112 @@ +{ + "id": "e7ba4c75-b1bb-483d-94d8-2c4a10f78472", + "version": 2, + "masterData": { + "current": { + "categories": [ + { + "id": "cf6d790a-f027-4f46-9a2b-4bc9a31066fb", + "typeId": "category" + } + ], + "description": { + "en": "Sample description" + }, + "masterVariant": { + "attributes": [], + "id": 1, + "images": [ + { + "dimensions": { + "h": 1400, + "w": 1400 + }, + "url": "https://commercetools.com/cli/data/253245821_1.jpg" + } + ], + "prices": [ + { + "value": { + "type": "centPrecision", + "fractionDigits": 2, + "centAmount": 10000, + "currencyCode": "EUR" + }, + "id": "753472a3-ddff-4e0f-a93b-2eb29c90ba54" + } + ], + "sku": "sku_MB_PREMIUM_TECH_T_variant1_1369226795424" + }, + "name": { + "en": "MB PREMIUM TECH T" + }, + "slug": { + "en": "mb-premium-tech-t1369226795424" + }, + "variants": [], + "searchKeywords": {} + }, + "hasStagedChanges": false, + "published": true, + "staged": { + "categories": [ + { + "id": "cf6d790a-f027-4f46-9a2b-4bc9a31066fb", + "typeId": "category" + } + ], + "description": { + "en": "Sample description" + }, + "masterVariant": { + "attributes": [], + "id": 1, + "images": [ + { + "dimensions": { + "h": 1400, + "w": 1400 + }, + "url": "https://commercetools.com/cli/data/253245821_1.jpg" + } + ], + "prices": [ + { + "value": { + "type": "centPrecision", + "fractionDigits": 2, + "centAmount": 10000, + "currencyCode": "EUR" + }, + "id": "753472a3-ddff-4e0f-a93b-2eb29c90ba54" + } + ], + "sku": "sku_MB_PREMIUM_TECH_T_variant1_1369226795424" + }, + "name": { + "en": "MB PREMIUM TECH T" + }, + "slug": { + "en": "mb-premium-tech-t1369226795424" + }, + "variants": [], + "searchKeywords": {} + } + }, + "productType": { + "id": "24f510c3-f334-4099-94e2-d6224a8eb919", + "typeId": "product-type" + }, + "taxCategory": { + "id": "f1e10e3a-45eb-49d8-ad0b-fdf984202f59", + "typeId": "tax-category" + }, + "createdAt": "1970-01-01T00:00:00.001Z", + "lastModifiedAt": "1970-01-01T00:00:00.001Z", + "warnings": [ + { + "code": "ImageProcessingOngoing", + "message": "The image processing is still ongoing." + } + ] +} diff --git a/api-specs/api/examples/project-update-response.example.json b/api-specs/api/examples/project-update-response.example.json new file mode 100644 index 0000000000..165a1b3a59 --- /dev/null +++ b/api-specs/api/examples/project-update-response.example.json @@ -0,0 +1,15 @@ +{ + "version": 2, + "key": "test-project", + "name": "Some project name", + "countries": ["DE", "US"], + "currencies": ["EUR", "USD"], + "languages": ["en"], + "createdAt": "2019-08-01T15:14:34.325Z", + "messages": { + "enabled": false + }, + "carts": { + "countryTaxRateFallbackEnabled": false + } +} diff --git a/api-specs/api/examples/project-update.example.json b/api-specs/api/examples/project-update.example.json new file mode 100644 index 0000000000..5969438e86 --- /dev/null +++ b/api-specs/api/examples/project-update.example.json @@ -0,0 +1,9 @@ +{ + "version": 1, + "actions": [ + { + "action": "changeCurrencies", + "currencies": ["EUR", "USD"] + } + ] +} diff --git a/api-specs/api/examples/project.example.json b/api-specs/api/examples/project.example.json index 9fe1258f77..01245cdcc6 100644 --- a/api-specs/api/examples/project.example.json +++ b/api-specs/api/examples/project.example.json @@ -2,18 +2,10 @@ "version": 1, "key": "test-project", "name": "Some project name", - "countries": [ - "DE", - "US" - ], - "currencies": [ - "EUR" - ], - "languages": [ - "en" - ], - "createdAt": "2013-11-01T15:14:34.325Z", - "trialUntil": "2013-11-01T15:14:34.325Z", + "countries": ["DE", "US"], + "currencies": ["EUR"], + "languages": ["en"], + "createdAt": "2019-08-01T15:14:34.325Z", "messages": { "enabled": false }, 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-create.example.json b/api-specs/api/examples/type-create.example.json index b696124a0e..eb467532e1 100644 --- a/api-specs/api/examples/type-create.example.json +++ b/api-specs/api/examples/type-create.example.json @@ -1,19 +1,17 @@ { - "key": "lineitemtype", + "key": "line-item-string-field", "name": { - "en": "lineitem" + "en": "String Custom Field on Line Items" }, "description": { - "en": "description" + "en": "This adds a Custom Field on Line Items, which can hold any string value." }, - "resourceTypeIds": [ - "line-item" - ], + "resourceTypeIds": ["line-item"], "fieldDefinitions": [ { - "name": "offer_name", + "name": "exampleStringField", "label": { - "en": "offer_name" + "en": "Example string field." }, "required": false, "type": { 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..bf2fdc2f74 --- /dev/null +++ b/api-specs/api/examples/type-update-response.example.json @@ -0,0 +1,27 @@ +{ + "id": "ff8b0f8c-78c8-4c4c-a4b7-2545d9279515", + "version": 2, + "key": "line-item-string-field", + "name": { + "en": "New Name" + }, + "description": { + "en": "This adds a Custom Field on Line Items, which can hold any string value." + }, + "resourceTypeIds": ["line-item"], + "fieldDefinitions": [ + { + "name": "exampleStringField", + "label": { + "en": "Example string field." + }, + "required": false, + "type": { + "name": "String" + }, + "inputHint": "SingleLine" + } + ], + "createdAt": "2023-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/examples/type.example.json b/api-specs/api/examples/type.example.json index e06041fb92..9863a8976c 100644 --- a/api-specs/api/examples/type.example.json +++ b/api-specs/api/examples/type.example.json @@ -1,21 +1,19 @@ { - "id": "3ae9bcca-df23-443e-bd22-0c592f9694fa", + "id": "ff8b0f8c-78c8-4c4c-a4b7-2545d9279515", "version": 1, - "key": "lineitemtype", + "key": "line-item-string-field", "name": { - "en": "lineitem" + "en": "String Custom Field on Line Items" }, "description": { - "en": "description" + "en": "This adds a Custom Field on Line Items, which can hold any string value." }, - "resourceTypeIds": [ - "line-item" - ], + "resourceTypeIds": ["line-item"], "fieldDefinitions": [ { - "name": "offer_name", + "name": "exampleStringField", "label": { - "en": "offer_name" + "en": "Example string field." }, "required": false, "type": { @@ -24,6 +22,6 @@ "inputHint": "SingleLine" } ], - "createdAt": "2015-10-07T06:56:19.217Z", - "lastModifiedAt": "2015-10-07T06:56:19.217Z" + "createdAt": "2023-10-07T06:56:19.217Z", + "lastModifiedAt": "2023-10-07T06:56:19.217Z" } diff --git a/api-specs/api/examples/types.example.json b/api-specs/api/examples/types.example.json index 798e9cb2fe..9afe16fe93 100644 --- a/api-specs/api/examples/types.example.json +++ b/api-specs/api/examples/types.example.json @@ -5,23 +5,21 @@ "total": 1, "results": [ { - "id": "3ae9bcca-df23-443e-bd22-0c592f9694fa", + "id": "ff8b0f8c-78c8-4c4c-a4b7-2545d9279515", "version": 1, - "key": "lineitemtype", + "key": "line-item-string-field", "name": { - "en": "lineitem" + "en": "String Custom Field on Line Items" }, "description": { - "en": "description" + "en": "This adds a Custom Field on Line Items, which can hold any string value." }, - "resourceTypeIds": [ - "line-item" - ], + "resourceTypeIds": ["line-item"], "fieldDefinitions": [ { - "name": "offer_name", + "name": "exampleStringField", "label": { - "en": "offer_name" + "en": "Example string field." }, "required": false, "type": { @@ -30,8 +28,8 @@ "inputHint": "SingleLine" } ], - "createdAt": "2015-10-07T06:56:19.217Z", - "lastModifiedAt": "2015-10-07T06:56:19.217Z" + "createdAt": "2023-10-07T06:56:19.217Z", + "lastModifiedAt": "2023-10-07T06:56:19.217Z" } ] } diff --git a/api-specs/api/resources/business-units.raml b/api-specs/api/resources/business-units.raml index cb8ad007e4..24427087f3 100644 --- a/api-specs/api/resources/business-units.raml +++ b/api-specs/api/resources/business-units.raml @@ -100,3 +100,44 @@ post: body: application/json: example: !include ../examples/business-unit.example.json +/search: + type: base + displayName: Business Unit Search + description: | + This endpoint provides high-performance search queries over Business Units. + post: + displayName: Search Business Units + securedBy: [oauth_2_0: { scopes: ['view_business_units:{projectKey}'] }] + description: | + If the initial indexing is in progress or the feature is inactive, A [SearchNotReady](ctp:api:type:SearchNotReadyError) error is returned. If inactive, you can [reactivate](/../api/projects/business-unit-search#reactivate) it. + body: + application/json: + type: BusinessUnitSearchRequest + responses: + 200: + body: + application/json: + type: BusinessUnitPagedSearchResponse + head: + securedBy: [oauth_2_0: { scopes: ['view_business_units:{projectKey}'] }] + description: | + Checks whether a search index of Business Units exists for a Project. + Returns a `200 OK` if an index exists; otherwise, returns a `409 Conflict`. + responses: + 200: + description: A search index exists and the [Search Business Units](ctp:api:endpoint:/{projectKey}/business-units/search:POST) endpoint is fully operational. + 409: + description: A search index does not exist and the [Search Business Units](ctp:api:endpoint:/{projectKey}/business-units/search:POST) endpoint returns a 409 error. +/search/indexing-status: + type: base + displayName: Business Unit Search Status + get: + displayName: Business Unit Search Status + description: | + Returns the indexing status of the Business Unit Search for a Project. + securedBy: [oauth_2_0: { scopes: ['view_project_settings:{projectKey}'] }] + responses: + 200: + body: + application/json: + type: BusinessUnitSearchIndexingStatusResponse diff --git a/api-specs/api/resources/channels.raml b/api-specs/api/resources/channels.raml index e382fe0bfe..5171fb25cc 100644 --- a/api-specs/api/resources/channels.raml +++ b/api-specs/api/resources/channels.raml @@ -60,11 +60,48 @@ post: body: application/json: example: !include ../examples/channel-update.example.json + responses: + 200: + body: + application/json: + example: !include ../examples/channel-updated.example.json + delete: + securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] + description: | + Returns a [ReferenceExists](ctp:api:type:ReferenceExistsError) error if other resources reference the Channel to be deleted. + responses: + 200: + body: + application/json: + example: !include ../examples/channel.example.json + +/key={key}: + (methodName): withKey + type: + baseResource: + uriParameterName: key + resourceType: Channel + resourceUpdateType: ChannelUpdate + get: + securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }] responses: 200: body: application/json: example: !include ../examples/channel.example.json + head: + securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }] + description: Checks if a Channel exists for a given `key`. Returns a `200 OK` status if the Channel exists or a `404 Not Found` otherwise. + post: + securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] + body: + application/json: + example: !include ../examples/channel-update.example.json + responses: + 200: + body: + application/json: + example: !include ../examples/channel-updated.example.json delete: securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] description: | diff --git a/api-specs/api/resources/custom-objects.raml b/api-specs/api/resources/custom-objects.raml index a4b380d5ec..9bf8c38274 100644 --- a/api-specs/api/resources/custom-objects.raml +++ b/api-specs/api/resources/custom-objects.raml @@ -51,7 +51,7 @@ post: If an object with the given container/key exists, the object will be replaced with the new value and the version is incremented. If the request contains a version and an object with the given container/key, then the version must match the version of the existing object. Concurrent updates to the same Custom Object returns a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error even if the version is not provided. - Fields with `null` values will **not be saved**. + Fields within `value` that have `null` values **are not saved**. body: application/json: example: !include ../examples/custom-object-create.example.json @@ -61,7 +61,7 @@ post: required: false description: | Expands a `value` of type [Reference](ctp:api:type:Reference). - In case the referenced object does not exist, the API returns the non-expanded reference. + If the referenced object does not exist, the API returns the non-expanded reference. responses: 200: body: @@ -99,7 +99,7 @@ post: required: false description: | Expands a `value` of type [Reference](ctp:api:type:Reference). - In case the referenced object does not exist, the API returns the non-expanded reference. + If the referenced object does not exist, the API returns the non-expanded reference. responses: 200: body: @@ -126,7 +126,7 @@ post: required: false description: | Expands a `value` of type [Reference](ctp:api:type:Reference). - In case the referenced object does not exist, the API returns the non-expanded reference. + If the referenced object does not exist, the API returns the non-expanded reference. responses: 200: body: @@ -162,14 +162,14 @@ post: required: false description: | `id`, `key`, `version`, `createdAt`, and `lastModifiedAt` can be used as predicate. - The `field` value can also be used as predicate but is not checked for validity. - For example, you can use any predicates: `value(aValue=true)` or `value(myObject(myValue="abc"))`. + `value` can also be used as predicate, but is not checked for validity. + For example: `value(exampleNumber > 1233)` or `value(exampleObject(exampleBoolean = true))`. expand: type: Expansion[] required: false description: | Expands a `value` of type [Reference](ctp:api:type:Reference). - In case the referenced object does not exist, the API returns the non-expanded reference. + If the referenced object does not exist, the API returns the non-expanded reference. responses: 200: body: diff --git a/api-specs/api/resources/customers.raml b/api-specs/api/resources/customers.raml index 429bd4a86b..4f1582ff15 100644 --- a/api-specs/api/resources/customers.raml +++ b/api-specs/api/resources/customers.raml @@ -238,6 +238,9 @@ post: post: displayName: Search Customers securedBy: [oauth_2_0: { scopes: ['view_customers:{projectKey}'] }] + description: | + If the initial indexing is in progress or the feature is inactive, a [SearchNotReady](ctp:api:type:SearchNotReadyError) error is returned. + If inactive, you can [reactivate](/../api/projects/customer-search#reactivate) it. body: application/json: type: CustomerSearchRequest @@ -249,20 +252,20 @@ post: head: securedBy: [oauth_2_0: { scopes: ['view_customers:{projectKey}'] }] description: | - Checks whether a search index for the Project's Customers exists. - Returns a `200 OK` status if the index exists or `404 Not Found` otherwise. + Checks whether a search index of Customers exists for a Project. + Returns a `200 OK` if an index exists; otherwise, returns a `409 Conflict`. responses: 200: - description: The search index exists and the Search Customers endpoint is fully operational. - 404: - description: The search index does not exist and the Search Customers endpoint returns Error 404 only. + description: A search index exists and the [Search Customers](ctp:api:endpoint:/{projectKey}/customers/search:POST) endpoint is fully operational. + 409: + description: A search index does not exist and the [Search Customers](ctp:api:endpoint:/{projectKey}/customers/search:POST) endpoint returns a 409 error. /search/indexing-status: type: base displayName: Customer Search Status - description: | - This endpoint provides information on the status of a Customer search for a project get: displayName: Customer Search Status + description: | + Returns the indexing status of the Customer Search for a Project. securedBy: [oauth_2_0: { scopes: ['view_project_settings:{projectKey}'] }] responses: 200: 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/graphql.raml b/api-specs/api/resources/graphql.raml index af6df4bcfb..c3b1ab9ce2 100644 --- a/api-specs/api/resources/graphql.raml +++ b/api-specs/api/resources/graphql.raml @@ -3,10 +3,10 @@ displayName: graphql description: commercetools Composable Commerce provides a GraphQL API post: displayName: GraphQL - description: Execute a GraphQL query + description: Execute a GraphQL request. securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }] body: - application/graphql: + application/json: example: !include ../examples/graphql-query.example.json type: GraphQLRequest responses: diff --git a/api-specs/api/resources/in-store.raml b/api-specs/api/resources/in-store.raml index 4cbd7b4be0..eb70c34a5a 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. + + 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. 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. - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store, this method returns a [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error. + A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios: + + - If no Cart exists in the Store for the given `id`. + - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store. + - If the Cart exists in the Project but does not have either a `customerId` that matches the [customer:{id}](/scopes#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,13 +1732,14 @@ uriParameters: [ 'manage_my_profile:{projectKey}', 'manage_my_profile:{projectKey}:{storeKey}', + 'anonymous_id:{id}', ], }, ] body: application/json: type: MyCustomerSignin - example: !include ../examples/Customer/CustomerSignIn.json + example: !include ../examples/Customer/MyCustomerSignIn.json responses: 200: body: @@ -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: @@ -2766,34 +3004,66 @@ uriParameters: /images: post: displayName: Upload a Product Tailoring image + description: | + Uploads a JPEG, PNG and GIF file to a [ProductVariantTailoring](ctp:api:type:ProductVariantTailoring). + The maximum file size of the image is **10MB**. + Either `variant` or `sku` is required to update a specific ProductVariant. + If neither is provided, the image is uploaded to the Master Variant of the Product. + + The response status code depends on the size of the original image. + If the image is small, the API responds with `200 OK`, and if the image is larger, it responds with `202 Accepted`. + The Product returned with a `202 Accepted` status code contains a `warnings` field with an [ImageProcessingOngoing](ctp:api:type:ImageProcessingOngoingWarning) Warning. + + Produces the [ProductTailoringImageAdded](/projects/messages/product-catalog-messages#product-tailoring-image-added) Message. queryParameters: filename?: type: string - description: Base filename of the image when stored in the Content Delivery Network. The filename will be modified when uploaded to prevent filename conflicts. If not included a random filename will be allocated. + default: 'img' + description: | + URL-encoded filename of the image when stored in the Content Delivery Network (CDN). + The filename is modified when uploaded to prevent filename conflicts. + If not provided, a random filename is generated. variant?: type: number format: int64 - description: The `id` of the [ProductTailoringVariant](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. + description: | + The `id` of the [ProductVariantTailoring](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. + It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. sku?: type: string - description: The `sku` of the [ProductTailoringVariant](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. + description: | + The `sku` of the [ProductVariantTailoring](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. + It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. staged?: 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. + default: true + description: | + If `true`, only the staged ProductVariantTailoring is updated. + If `false`, both the current and staged ProductVariantTailoring are updated. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] body: - type: file - fileTypes: ['image/jpeg', 'image/png', 'image/gif'] + image/jpeg: + type: file + image/png: + type: file + image/gif: + type: file headers: Content-Type: - enum: ['image/jpeg', 'image/png', 'image/gif'] + type: string + description: | + One of `image/jpeg`, `image/png`, or `image/gif`. responses: 200: body: - type: ProductTailoring - example: !include ../examples/product-tailoring.example.json + application/json: + type: ProductTailoring + example: !include ../examples/product-tailoring.example.json + 202: + body: + application/json: + type: ProductTailoring + example: !include ../examples/product-tailoring-with-image-processing-warning.example.json /key={productKey}: (methodName): withProductKey uriParameters: @@ -2875,34 +3145,66 @@ uriParameters: /images: post: displayName: Upload a Product Tailoring image + description: | + Uploads a JPEG, PNG and GIF file to a [ProductVariantTailoring](ctp:api:type:ProductVariantTailoring). + The maximum file size of the image is **10MB**. + Either `variant` or `sku` is required to update a specific ProductVariant. + If neither is provided, the image is uploaded to the Master Variant of the Product. + + The response status code depends on the size of the original image. + If the image is small, the API responds with `200 OK`, and if the image is larger, it responds with `202 Accepted`. + The Product returned with a `202 Accepted` status code contains a `warnings` field with an [ImageProcessingOngoing](ctp:api:type:ImageProcessingOngoingWarning) Warning. + + Produces the [ProductTailoringImageAdded](/projects/messages/product-catalog-messages#product-tailoring-image-added) Message. queryParameters: filename?: type: string - description: Base filename of the image when stored in the Content Delivery Network. The filename will be modified when uploaded to prevent filename conflicts. If not included a random filename will be allocated. + default: 'img' + description: | + URL-encoded filename of the image when stored in the Content Delivery Network (CDN). + The filename is modified when uploaded to prevent filename conflicts. + If not provided, a random filename is generated. variant?: type: number format: int64 - description: The `id` of the [ProductTailoringVariant](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. + description: | + The `id` of the [ProductVariantTailoring](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. + It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. sku?: type: string - description: The `sku` of the [ProductTailoringVariant](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. + description: | + The `sku` of the [ProductVariantTailoring](/projects/product-tailoring#productvarianttailoring) the image should be uploaded to. + It must correspond to an existing [ProductVariant](/projects/products#productvariant) in the Product. staged?: 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. + default: true + description: | + If `true`, only the staged ProductVariantTailoring is updated. + If `false`, both the current and staged ProductVariantTailoring are updated. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] body: - type: file - fileTypes: ['image/jpeg', 'image/png', 'image/gif'] + image/jpeg: + type: file + image/png: + type: file + image/gif: + type: file headers: Content-Type: - enum: ['image/jpeg', 'image/png', 'image/gif'] + type: string + description: | + One of `image/jpeg`, `image/png`, or `image/gif`. responses: 200: body: - type: ProductTailoring - example: !include ../examples/product-tailoring.example.json + application/json: + type: ProductTailoring + example: !include ../examples/product-tailoring.example.json + 202: + body: + application/json: + type: ProductTailoring + example: !include ../examples/product-tailoring-with-image-processing-warning.example.json /quote-requests: type: baseDomain: @@ -2916,6 +3218,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 +3236,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 +3248,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 +3282,7 @@ uriParameters: resourceType: QuoteRequest resourceUpdateType: QuoteRequestUpdate get: + displayName: Get QuoteRequest in Store by Key securedBy: [ oauth_2_0: @@ -2993,6 +3300,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 +3312,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 +3335,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 +3362,7 @@ uriParameters: resourceType: QuoteRequest resourceUpdateType: QuoteRequestUpdate get: + displayName: Get QuoteRequest in Store by ID securedBy: [ oauth_2_0: @@ -3069,6 +3380,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 +3392,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 +3415,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 +3447,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 +3465,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 +3477,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 +3510,7 @@ uriParameters: resourceType: StagedQuote resourceUpdateType: StagedQuoteUpdate get: + displayName: Get StagedQuote in Store by Key securedBy: [ oauth_2_0: @@ -3210,6 +3528,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 +3540,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 +3563,7 @@ uriParameters: application/json: example: !include ../examples/staged-quote.example.json delete: + displayName: Delete StagedQuote in Store by Key is: - dataErasure securedBy: @@ -3269,6 +3590,7 @@ uriParameters: resourceType: StagedQuote resourceUpdateType: StagedQuoteUpdate get: + displayName: Get StagedQuote in Store by ID securedBy: [ oauth_2_0: @@ -3286,6 +3608,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 +3620,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 +3643,7 @@ uriParameters: application/json: example: !include ../examples/staged-quote.example.json delete: + displayName: Delete StagedQuote in Store by ID is: - dataErasure securedBy: @@ -3350,6 +3675,7 @@ uriParameters: (createable): QuoteDraft description: A quote holds the negotiated offer. get: + displayName: Query Quotes in Store securedBy: [ oauth_2_0: @@ -3367,6 +3693,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 +3705,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 +3738,7 @@ uriParameters: resourceType: Quote resourceUpdateType: QuoteUpdate get: + displayName: Get Quote in Store by Key securedBy: [ oauth_2_0: @@ -3427,6 +3756,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 +3768,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 +3791,7 @@ uriParameters: application/json: example: !include ../examples/quote.example.json delete: + displayName: Delete Quote in Store by Key is: - dataErasure securedBy: @@ -3486,6 +3818,7 @@ uriParameters: resourceType: Quote resourceUpdateType: QuoteUpdate get: + displayName: Get Quote in Store by ID securedBy: [ oauth_2_0: @@ -3503,6 +3836,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 +3848,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 +3871,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..59f013195a 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,12 +170,15 @@ 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 - example: !include ../examples/Customer/CustomerSignIn.json + example: !include ../examples/Customer/MyCustomerSignIn.json responses: 200: body: @@ -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/orders.raml b/api-specs/api/resources/orders.raml index 7c54a6b6af..deaf733ad7 100644 --- a/api-specs/api/resources/orders.raml +++ b/api-specs/api/resources/orders.raml @@ -77,7 +77,7 @@ post: 201: body: application/json: - example: !include ../examples/order.example.json + example: !include ../examples/order-import-create.example.json type: Order /quotes: (methodName): orderQuote 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/product-selections.raml b/api-specs/api/resources/product-selections.raml index 61d6f7569e..7d078916e7 100644 --- a/api-specs/api/resources/product-selections.raml +++ b/api-specs/api/resources/product-selections.raml @@ -80,6 +80,9 @@ post: type: base get: description: + queryParameters: + where?: + type: QueryPredicate[] securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }] is: @@ -133,6 +136,9 @@ post: type: base get: description: + queryParameters: + where?: + type: QueryPredicate[] securedBy: [oauth_2_0: { scopes: ['view_product_selections:{projectKey}'] }] is: diff --git a/api-specs/api/resources/product-tailoring.raml b/api-specs/api/resources/product-tailoring.raml index f455ef369a..d42fa19593 100644 --- a/api-specs/api/resources/product-tailoring.raml +++ b/api-specs/api/resources/product-tailoring.raml @@ -16,6 +16,12 @@ get: body: application/json: example: !include ../examples/product-tailoring-list.example.json +head: + securedBy: [oauth_2_0: { scopes: ['view_products:{projectKey}'] }] + description: Checks if a ProductTailoring exists for a given Query Predicate. Returns a `200 OK` status if any ProductTailoring match the Query Predicate or a `404 Not Found` otherwise. + queryParameters: + where?: + type: QueryPredicate[] post: description: | Generates the [ProductTailoringCreated](ctp:api:type:ProductTailoringCreatedMessage) Message. diff --git a/api-specs/api/resources/products.raml b/api-specs/api/resources/products.raml index 3d2e528cf4..0d69f4c4ff 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 @@ -180,35 +180,65 @@ post: /images: post: displayName: Upload a Product image + description: | + Uploads a JPEG, PNG, or a GIF image file to a [ProductVariant](ctp:api:type:ProductVariant). + The maximum file size of the image is **10MB**. + Either `variant` or `sku` is required to update a specific ProductVariant. + If neither is provided, the image is uploaded to the Master Variant of the Product. + + The response status code depends on the size of the original image. + If the image is small, the API responds with `200 OK`, and if the image is larger, it responds with `202 Accepted`. + The Product returned with a `202 Accepted` status code contains a `warnings` field with an [ImageProcessingOngoing](ctp:api:type:ImageProcessingOngoingWarning) Warning. + + Produces the [ProductImageAdded](/projects/messages/product-catalog-messages#product-image-added) Message. + queryParameters: filename?: type: string - description: Base filename of the image when stored in the Content Delivery Network. The filename will be modified when uploaded to prevent filename conflicts. If not included a random filename will be allocated. + default: 'img' + description: | + URL-encoded filename of the image when stored in the Content Delivery Network (CDN). + The filename is modified when uploaded to prevent filename conflicts. + If not provided, a random filename is generated. variant?: type: number format: int64 - description: The id of the [ProductVariant](ctp:api:type:ProductVariant) the image should be uploaded to. + description: | + The `id` of the [ProductVariant](ctp:api:type:ProductVariant) the image should be uploaded to. sku?: type: string - description: The sku of the [ProductVariant](ctp:api:type:ProductVariant) the image should be uploaded to. + description: | + The `sku` of the [ProductVariant](ctp:api:type:ProductVariant) the image should be uploaded to. staged?: 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. + default: true + description: | + If `true`, only the staged ProductVariant is updated. + If `false`, both the current and staged ProductVariant are updated. securedBy: [oauth_2_0: { scopes: ['manage_products:{projectKey}'] }] body: - type: file - fileTypes: ['image/jpeg', 'image/png', 'image/gif'] + image/jpeg: + type: file + image/png: + type: file + image/gif: + type: file headers: Content-Type: - enum: ['image/jpeg', 'image/png', 'image/gif'] + type: string + description: | + One of `image/jpeg`, `image/png`, or `image/gif`. responses: 200: body: - example: !include ../examples/product.example.json - type: Product - + application/json: + type: Product + example: !include ../examples/product.example.json + 202: + body: + application/json: + type: Product + example: !include ../examples/product-with-image-processing-warning.example.json /product-selections: type: baseDomain: @@ -230,6 +260,9 @@ post: post: displayName: Search Products securedBy: [oauth_2_0: { scopes: ['view_published_products:{projectKey}'] }] + description: | + If the indexing is in progress or the feature is inactive, an [ObjectNotFound](ctp:api:type:ObjectNotFoundError) error is returned. + If inactive, you can [reactivate](/../api/projects/product-search#activation-of-the-feature) it. body: application/json: type: ProductSearchRequest 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..cf09c526f7 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,9 +126,9 @@ 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 + displayName: Delete Subscription by ID securedBy: [oauth_2_0: { scopes: ['manage_subscriptions:{projectKey}'] }] is: - versioned 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/ruleset.xml b/api-specs/api/ruleset.xml index 9c44860f9f..2e2d4cd9c0 100644 --- a/api-specs/api/ruleset.xml +++ b/api-specs/api/ruleset.xml @@ -53,6 +53,8 @@ + + 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/approval-rule/ApprovalRule.raml b/api-specs/api/types/approval-rule/ApprovalRule.raml index 3f8925c453..663f5254c8 100644 --- a/api-specs/api/types/approval-rule/ApprovalRule.raml +++ b/api-specs/api/types/approval-rule/ApprovalRule.raml @@ -69,3 +69,7 @@ properties: type: BusinessUnitKeyReference description: | The [Business Unit](ctp:api:type:BusinessUnit) the Approval Rule belongs to. + custom?: + type: CustomFields + description: | + Custom Fields on the Approval Rule. diff --git a/api-specs/api/types/approval-rule/ApprovalRuleSetCustomFieldAction.raml b/api-specs/api/types/approval-rule/ApprovalRuleSetCustomFieldAction.raml new file mode 100644 index 0000000000..00a3bb444a --- /dev/null +++ b/api-specs/api/types/approval-rule/ApprovalRuleSetCustomFieldAction.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 DataType +(package): ApprovalRule +type: ApprovalRuleUpdateAction +displayName: ApprovalRuleSetCustomFieldAction +discriminatorValue: setCustomField +example: !include ../../examples/ApprovalRule/ApprovalRuleSetCustomFieldAction.json +properties: + name: + type: string + description: | + Name of the [Custom Field](ctp:api:type:CustomFields). + value?: + type: CustomFieldValue + description: | + If `value` is absent or `null`, this field will be removed if it exists. + Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error. + If `value` is provided, it is set for the field defined by `name`. diff --git a/api-specs/api/types/approval-rule/ApprovalRuleSetCustomTypeAction.raml b/api-specs/api/types/approval-rule/ApprovalRuleSetCustomTypeAction.raml new file mode 100644 index 0000000000..0eebae0898 --- /dev/null +++ b/api-specs/api/types/approval-rule/ApprovalRuleSetCustomTypeAction.raml @@ -0,0 +1,16 @@ +#%RAML 1.0 DataType +(package): ApprovalRule +type: ApprovalRuleUpdateAction +displayName: ApprovalRuleSetCustomTypeAction +discriminatorValue: setCustomType +example: !include ../../examples/ApprovalRule/ApprovalRuleSetCustomTypeAction.json +properties: + type?: + type: TypeResourceIdentifier + description: | + Defines the [Type](ctp:api:type:Type) that extends the ApprovalRule with [Custom Fields](ctp:api:type:CustomFields). + If absent, any existing Type and Custom Fields are removed from the ApprovalRule. + fields?: + type: FieldContainer + description: | + Sets the [Custom Fields](ctp:api:type:CustomFields) fields for the ApprovalRule. diff --git a/api-specs/api/types/approval-rule/ApproverConjunctionDraft.raml b/api-specs/api/types/approval-rule/ApproverConjunctionDraft.raml index fe670673f7..f6a4e0fe09 100644 --- a/api-specs/api/types/approval-rule/ApproverConjunctionDraft.raml +++ b/api-specs/api/types/approval-rule/ApproverConjunctionDraft.raml @@ -6,7 +6,7 @@ properties: and: description: | All of the nested disjunctions must be approved in order for the conjunction to be considered approved. - The total count of approvers across the nested disjunctions must not exceed 10. type: array items: ApproverDisjunctionDraft minItems: 1 + maxItems: 10 diff --git a/api-specs/api/types/business-unit-search/BusinessUnitIndexingProgress.raml b/api-specs/api/types/business-unit-search/BusinessUnitIndexingProgress.raml new file mode 100644 index 0000000000..8e022a2334 --- /dev/null +++ b/api-specs/api/types/business-unit-search/BusinessUnitIndexingProgress.raml @@ -0,0 +1,18 @@ +#%RAML 1.0 DataType +(package): BusinessUnitSearch +type: object +(beta): true +displayName: BusinessUnitIndexingProgress +properties: + indexed: + type: number + format: int32 + description: The number of Business Units successfully indexed. + failed: + type: number + format: int32 + description: The number of Business Units that failed to be indexed. + estimatedTotal: + type: number + format: int32 + description: The estimated total number of Business Units to be indexed. diff --git a/api-specs/api/types/business-unit-search/BusinessUnitIndexingStatus.raml b/api-specs/api/types/business-unit-search/BusinessUnitIndexingStatus.raml new file mode 100644 index 0000000000..c21e23be7f --- /dev/null +++ b/api-specs/api/types/business-unit-search/BusinessUnitIndexingStatus.raml @@ -0,0 +1,17 @@ +#%RAML 1.0 DataType +(package): Project +type: string +(beta): true +displayName: BusinessUnitIndexingStatus +description: | + The current indexing status of Business Unit Search. +(enumDescriptions): + Scheduled: Indexing is scheduled. + Indexing: Indexing is in progress. + Ready: Indexing is complete and the [Search Business Units](ctp:api:endpoint:/{projectKey}/business-units/search:POST) endpoint returns up-to-date results. + Failed: Indexing failed due to an internal error. +enum: + - Scheduled + - Indexing + - Ready + - Failed diff --git a/api-specs/api/types/business-unit-search/BusinessUnitPagedSearchResponse.raml b/api-specs/api/types/business-unit-search/BusinessUnitPagedSearchResponse.raml new file mode 100644 index 0000000000..55278517cc --- /dev/null +++ b/api-specs/api/types/business-unit-search/BusinessUnitPagedSearchResponse.raml @@ -0,0 +1,30 @@ +#%RAML 1.0 DataType +(package): BusinessUnitSearch +displayName: BusinessUnitPagedSearchResponse +example: !include ../../examples/BusinessUnitSearch/BusinessUnitPagedSearchResponse.json +type: object +(beta): true +properties: + total: + type: number + format: int64 + minimum: 0 + description: Total number of results matching the query. + limit: + type: number + format: int32 + minimum: 0 + maximum: 100 + description: | + Number of [results requested](/../api/general-concepts#limit). + offset: + type: number + format: int32 + minimum: 0 + maximum: 9900 + description: | + Number of [elements skipped](/../api/general-concepts#offset). + results: + type: BusinessUnitSearchResult[] + description: | + Search result containing the Business Units matching the search query. diff --git a/api-specs/api/types/business-unit-search/BusinessUnitSearchIndexingStatusResponse.raml b/api-specs/api/types/business-unit-search/BusinessUnitSearchIndexingStatusResponse.raml new file mode 100644 index 0000000000..2ac098c378 --- /dev/null +++ b/api-specs/api/types/business-unit-search/BusinessUnitSearchIndexingStatusResponse.raml @@ -0,0 +1,24 @@ +#%RAML 1.0 DataType +(package): BusinessUnitSearch +displayName: BusinessUnitSearchIndexingStatusResponse +type: object +(beta): true +example: !include ../../examples/BusinessUnitSearch/BusinessUnitSearchIndexingStatusResponse.json +properties: + status: + type: BusinessUnitIndexingStatus + description: Current status of indexing the Business Unit Search. + states?: + type: BusinessUnitIndexingProgress + description: Progress of indexing. Only available when indexing is in progress. + startedAt?: + type: datetime + description: Date and time (UTC) when the last indexing started. + lastModifiedAt?: + type: datetime + description: Time when the status was last modified. + retryCount?: + type: number + format: int32 + description: | + Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully. diff --git a/api-specs/api/types/business-unit-search/BusinessUnitSearchRequest.raml b/api-specs/api/types/business-unit-search/BusinessUnitSearchRequest.raml new file mode 100644 index 0000000000..ec6bd03154 --- /dev/null +++ b/api-specs/api/types/business-unit-search/BusinessUnitSearchRequest.raml @@ -0,0 +1,25 @@ +#%RAML 1.0 DataType +(package): BusinessUnitSearch +type: object +(beta): true +example: !include ../../examples/BusinessUnitSearch/BusinessUnitSearchRequest.json +displayName: BusinessUnitSearchRequest +properties: + query?: + type: SearchQuery + description: The Business Unit Search query. + sort?: + type: SearchSorting[] + description: Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order. + limit?: + type: number + format: int32 + default: 20 + maximum: 100 + description: The maximum number of search results to be returned. + offset?: + type: number + format: int32 + default: 0 + maximum: 9900 + description: The number of search results to be skipped in the response for pagination. diff --git a/api-specs/api/types/business-unit-search/BusinessUnitSearchResult.raml b/api-specs/api/types/business-unit-search/BusinessUnitSearchResult.raml new file mode 100644 index 0000000000..77748bdeaa --- /dev/null +++ b/api-specs/api/types/business-unit-search/BusinessUnitSearchResult.raml @@ -0,0 +1,15 @@ +#%RAML 1.0 DataType +(package): BusinessUnitSearch +displayName: BusinessUnitSearchResult +type: object +(beta): true +properties: + id: + (identifier): true + type: string + description: | + `id` of the [BusinessUnit](ctp:api:type:BusinessUnit) matching the search query. + relevance: + type: number + description: | + How closely this customer matches the search query. diff --git a/api-specs/api/types/business-unit/Associate.raml b/api-specs/api/types/business-unit/Associate.raml index c31d37bf68..8018f341bf 100644 --- a/api-specs/api/types/business-unit/Associate.raml +++ b/api-specs/api/types/business-unit/Associate.raml @@ -8,6 +8,7 @@ properties: type: AssociateRoleAssignment[] description: | Roles assigned to the Associate within a Business Unit. + maxItems: 5 roles?: (deprecated): true type: AssociateRoleDeprecated[] diff --git a/api-specs/api/types/business-unit/AssociateDraft.raml b/api-specs/api/types/business-unit/AssociateDraft.raml index 9b9ea013e2..26fa79a744 100644 --- a/api-specs/api/types/business-unit/AssociateDraft.raml +++ b/api-specs/api/types/business-unit/AssociateDraft.raml @@ -7,6 +7,7 @@ properties: description: | Roles assigned to the Associate within a Business Unit. minItems: 1 + maxItems: 5 roles?: (deprecated): true type: AssociateRoleDeprecated[] diff --git a/api-specs/api/types/business-unit/BusinessUnit.raml b/api-specs/api/types/business-unit/BusinessUnit.raml index f101aaf66f..74a7301271 100644 --- a/api-specs/api/types/business-unit/BusinessUnit.raml +++ b/api-specs/api/types/business-unit/BusinessUnit.raml @@ -102,6 +102,7 @@ properties: type: Associate[] description: | Associates that are part of the Business Unit in specific [roles](ctp:api:type:AssociateRole). + maxItems: 2000 inheritedAssociates?: type: InheritedAssociate[] description: | diff --git a/api-specs/api/types/business-unit/BusinessUnitDraft.raml b/api-specs/api/types/business-unit/BusinessUnitDraft.raml index c1ee9cb22e..3650bd1bdf 100644 --- a/api-specs/api/types/business-unit/BusinessUnitDraft.raml +++ b/api-specs/api/types/business-unit/BusinessUnitDraft.raml @@ -52,6 +52,7 @@ properties: type: AssociateDraft[] description: | List of members that are part of the Business Unit in specific [roles](ctp:api:type:AssociateRole). + maxItems: 2000 approvalRuleMode?: type: BusinessUnitApprovalRuleMode description: | diff --git a/api-specs/api/types/business-unit/updates/BusinessUnitSetAssociatesAction.raml b/api-specs/api/types/business-unit/updates/BusinessUnitSetAssociatesAction.raml index 1e9cab6352..4214c77887 100644 --- a/api-specs/api/types/business-unit/updates/BusinessUnitSetAssociatesAction.raml +++ b/api-specs/api/types/business-unit/updates/BusinessUnitSetAssociatesAction.raml @@ -10,4 +10,5 @@ properties: associates: type: AssociateDraft[] description: | - The new list of Associates. If not provided, any existing list is removed. + The new list of Associates. If empty, existing values will be removed. + maxItems: 2000 diff --git a/api-specs/api/types/cart-discount/CartDiscountPatternTarget.raml b/api-specs/api/types/cart-discount/CartDiscountPatternTarget.raml new file mode 100644 index 0000000000..102b8958a9 --- /dev/null +++ b/api-specs/api/types/cart-discount/CartDiscountPatternTarget.raml @@ -0,0 +1,37 @@ +#%RAML 1.0 DataType +(package): 'CartDiscount' +type: CartDiscountTarget +displayName: CartDiscountPatternTarget +discriminatorValue: pattern +description: | + Pattern targets can be used to model Buy and Get discounts. + + Unlike [CartDiscountLineItemsTarget](#cartdiscountlineitemstarget) and [CartDiscountCustomLineItemsTarget](#cartdiscountcustomlineitemstarget), it does not apply to a (Custom) Line Item as a whole, but to individual units of a (Custom) Line Item. The discounts can apply multiple times on the same cart, but each unit can be discounted only once. +properties: + triggerPattern?: + type: array + items: PatternComponent + description: | + Units of a (Custom) Line Item that trigger a discount application. + + Based on the availability of matching units, the `triggerPattern` can match multiple times, effecting the number of times the discount will be applied. + To further limit the discount application, set the `maxOccurrence`. + + If empty or not set, the Discount will apply indefinitely. + targetPattern: + type: array + items: PatternComponent + description: | + Units of (Custom) Line Items on which the Discount is applied. + + Based on the availability of matching units and the limits from the `triggerPattern` or `maxOccurence`, the `targetPattern` can match multiple times. + maxOccurrence?: + type: integer + description: | + Maximum number of times the Discount can apply on a Cart. + + If empty or not set, the Discount will apply indefinitely. + selectionMode: + type: SelectionMode + description: | + Determines which of the matching units of (Custom) Line Items are discounted. 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/CartDiscountValueFixed.raml b/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml index 3e01997b1b..66f9b2db02 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueFixed.raml @@ -10,3 +10,10 @@ properties: type: TypedMoney[] description: | Money values in [cent precision](ctp:api:type:CentPrecisionMoney) or [high precision](ctp:api:type:HighPrecisionMoney) of different currencies. + applicationMode?: + type: DiscountApplicationMode + description: | + Indicates how the discount is applied on [CartDiscountLineItemTarget](ctp:api:type:CartDiscountLineItemsTarget) or [CartDiscountCustomLineItemTarget](ctp:api:type:CartDiscountCustomLineItemsTarget). + + For [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget), the mode can also be `ProportionateDistribution` or `EvenDistribution`. + default: IndividualApplication diff --git a/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml b/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml index d7abab2149..21a07730f4 100644 --- a/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml +++ b/api-specs/api/types/cart-discount/CartDiscountValueFixedDraft.raml @@ -13,3 +13,10 @@ properties: A fixed 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 discounted by 10€ and the matching $ price will be discounted to 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) or [CartDiscountCustomLineItemTarget](ctp:api:type:CartDiscountCustomLineItemsTarget). + + For [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget), you can also set the mode to `ProportionateDistribution` or `EvenDistribution`. + default: IndividualApplication diff --git a/api-specs/api/types/cart-discount/CountOnCustomLineItemUnits.raml b/api-specs/api/types/cart-discount/CountOnCustomLineItemUnits.raml new file mode 100644 index 0000000000..328263beae --- /dev/null +++ b/api-specs/api/types/cart-discount/CountOnCustomLineItemUnits.raml @@ -0,0 +1,37 @@ +#%RAML 1.0 DataType +(package): CartDiscount +type: PatternComponent +(beta): true +displayName: CountOnCustomLineItemUnits +discriminatorValue: CountOnCustomLineItemUnits +properties: + predicate: + type: string + description: | + Valid [CustomLineItem predicate](/../api/projects/predicates#customlineitem-field-identifiers) that determines the units participating in the Discount. + minCount?: + type: integer + description: | + Minimum number of units of a Custom Line Item that match the predicate. + minimum: 0 + default: 1 + maxCount?: + type: integer + description: | + Maximum number of units of a Custom Line Item that match the predicate. + There might be more units matching the predicate, but they will not be participating to the resulting set. + + The value must be greater than or equal to `minCount`. + If not provided, the component will match all units that satisfy the predicate. + minimum: 1 + excludeCount?: + type: integer + description: | + Number of units of a Custom Line Item to exclude on every application of the Discount. + + Set only when configuring the `targetPattern`. + + The units matched first (satisfying the pattern component) will be excluded from the resulting set. + The `minCount`and `maxCount` are considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. + For example, if 5 jeans are required but only 3 should be discounted, the `excludeCount` value must be 2. + default: 0 diff --git a/api-specs/api/types/cart-discount/CountOnLineItemUnits.raml b/api-specs/api/types/cart-discount/CountOnLineItemUnits.raml new file mode 100644 index 0000000000..fc64e892a6 --- /dev/null +++ b/api-specs/api/types/cart-discount/CountOnLineItemUnits.raml @@ -0,0 +1,37 @@ +#%RAML 1.0 DataType +(package): CartDiscount +type: PatternComponent +(beta): true +displayName: CountOnLineItemUnits +discriminatorValue: CountOnLineItemUnits +properties: + predicate: + type: string + description: | + Valid [LineItem predicate](/../api/projects/predicates#lineitem-field-identifiers) that determines the units participating in the Discount. + minCount?: + type: integer + description: | + Minimum number of units of a Line Item that match the predicate. + minimum: 0 + default: 1 + maxCount?: + type: integer + description: | + Maximum number of units of a Line Item that match the predicate. + There might be more units matching the predicate, but they will not be participating to the resulting set. + + The value must be greater than or equal to `minCount`. + If not provided, the component will match all units that satisfy the predicate. + minimum: 1 + excludeCount?: + type: integer + description: | + Number of units of a Line Item to exclude on every application of the Discount. + + Set only when configuring the `targetPattern`. + + The units matched first (satisfying the pattern component) will be excluded from the resulting set. + The `minCount`and `maxCount` are considered only after the exclusion. Pattern components are matched only if any further units satisfying the pattern component exist. + For example, if 5 jeans are required but only 3 should be discounted, the `excludeCount` value must be 2. + default: 0 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-discount/PatternComponent.raml b/api-specs/api/types/cart-discount/PatternComponent.raml new file mode 100644 index 0000000000..2811d71db4 --- /dev/null +++ b/api-specs/api/types/cart-discount/PatternComponent.raml @@ -0,0 +1,11 @@ +#%RAML 1.0 DataType +(package): CartDiscount +type: object +(beta): true +displayName: PatternComponent +discriminator: type +description: | + The pattern component it used to define a set of units based on some criteria. The criteria depends on the type of component used. +properties: + type: + type: string diff --git a/api-specs/api/types/cart/Cart.raml b/api-specs/api/types/cart/Cart.raml index 2f71f31c54..914d2c97fa 100644 --- a/api-specs/api/types/cart/Cart.raml +++ b/api-specs/api/types/cart/Cart.raml @@ -155,6 +155,7 @@ properties: type: DiscountCodeInfo[] description: | Discount Codes applied to the Cart. A Cart that has `directDiscounts` cannot have `discountCodes`. + maxItems: 10 directDiscounts: type: DirectDiscount[] description: | diff --git a/api-specs/api/types/cart/CustomLineItem.raml b/api-specs/api/types/cart/CustomLineItem.raml index 95072e3b9f..49e91234b4 100644 --- a/api-specs/api/types/cart/CustomLineItem.raml +++ b/api-specs/api/types/cart/CustomLineItem.raml @@ -83,4 +83,4 @@ properties: priceMode: type: CustomLineItemPriceMode description: | - Indicates whether Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) are applied to the Custom Line Item. + Indicates whether Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget), [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget), or [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget) are applied to the Custom Line Item. diff --git a/api-specs/api/types/cart/CustomLineItemDraft.raml b/api-specs/api/types/cart/CustomLineItemDraft.raml index 2ddcb2db0d..aca9b13073 100644 --- a/api-specs/api/types/cart/CustomLineItemDraft.raml +++ b/api-specs/api/types/cart/CustomLineItemDraft.raml @@ -50,7 +50,6 @@ properties: priceMode?: type: CustomLineItemPriceMode description: | - - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) - are applied to the Custom Line Item. + - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget), [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget), or [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget) are applied to the Custom Line Item. - If `External`, Cart Discounts are not considered on the Custom Line Item. default: Standard diff --git a/api-specs/api/types/cart/CustomLineItemPriceMode.raml b/api-specs/api/types/cart/CustomLineItemPriceMode.raml index 3d48d5634a..a08addb3e5 100644 --- a/api-specs/api/types/cart/CustomLineItemPriceMode.raml +++ b/api-specs/api/types/cart/CustomLineItemPriceMode.raml @@ -13,4 +13,4 @@ enum: This is the default mode for backwards compatibility. External: | - Deactivates application of Cart Discounts for the Custom Line Item, despite a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) and [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget). + Deactivates application of Cart Discounts for the Custom Line Item despite a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget), [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget), or [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget). 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/cart/updates/CartAddCustomLineItemAction.raml b/api-specs/api/types/cart/updates/CartAddCustomLineItemAction.raml index 10e306ac1c..05d281f77c 100644 --- a/api-specs/api/types/cart/updates/CartAddCustomLineItemAction.raml +++ b/api-specs/api/types/cart/updates/CartAddCustomLineItemAction.raml @@ -63,7 +63,6 @@ properties: priceMode?: type: CustomLineItemPriceMode description: | - - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) - are applied to the Custom Line Item. + - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget), [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget), or [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget) are applied to the Custom Line Item. - If `External`, Cart Discounts are not considered on the Custom Line Item. default: Standard diff --git a/api-specs/api/types/cart/updates/CartSetCustomShippingMethodAction.raml b/api-specs/api/types/cart/updates/CartSetCustomShippingMethodAction.raml index f2b6abe079..ff88b0b507 100644 --- a/api-specs/api/types/cart/updates/CartSetCustomShippingMethodAction.raml +++ b/api-specs/api/types/cart/updates/CartSetCustomShippingMethodAction.raml @@ -28,3 +28,7 @@ properties: type: ExternalTaxRateDraft description: | External Tax Rate for the `shippingRate` to be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode). + custom?: + type: CustomFieldsDraft + description: | + Custom Fields for the custom Shipping Method. diff --git a/api-specs/api/types/category/CategoryDraft.raml b/api-specs/api/types/category/CategoryDraft.raml index e8f6b029e4..3cc8ad2d9e 100644 --- a/api-specs/api/types/category/CategoryDraft.raml +++ b/api-specs/api/types/category/CategoryDraft.raml @@ -55,6 +55,8 @@ properties: type: string description: | User-defined unique identifier for the Category. + + This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Categories with the [Import API](/../import-export/overview) and the [Merchant Center](/../merchant-center/import-data). pattern: ^[A-Za-z0-9_-]+$ minLength: 2 maxLength: 256 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/DiscountedPriceDraft.raml b/api-specs/api/types/common/DiscountedPriceDraft.raml index ac10248dd8..2a8317159d 100644 --- a/api-specs/api/types/common/DiscountedPriceDraft.raml +++ b/api-specs/api/types/common/DiscountedPriceDraft.raml @@ -7,6 +7,8 @@ properties: type: Money description: | Sets the money value for the discounted price. + + To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft). discount: type: ProductDiscountReference description: | diff --git a/api-specs/api/types/common/GeoJsonPoint.raml b/api-specs/api/types/common/GeoJsonPoint.raml index b124f3f00c..d4b3233910 100644 --- a/api-specs/api/types/common/GeoJsonPoint.raml +++ b/api-specs/api/types/common/GeoJsonPoint.raml @@ -2,6 +2,7 @@ (package): Common displayName: GeoJsonPoint type: GeoJson +example: !include ../../examples/Common/GeoJsonPoint.json discriminatorValue: Point properties: coordinates: diff --git a/api-specs/api/types/common/Image.raml b/api-specs/api/types/common/Image.raml index 675e7325c9..a83f607e14 100644 --- a/api-specs/api/types/common/Image.raml +++ b/api-specs/api/types/common/Image.raml @@ -6,7 +6,7 @@ properties: url: type: string description: | - URL of the image in its original size that must be unique within a single [ProductVariant](ctp:api:type:ProductVariant). If the Project is hosted in the China (AWS, Ningxia) Region, verify that the URL is not blocked due to firewall restrictions. + URL of the image in its original size that must be unique within a single [ProductVariant](ctp:api:type:ProductVariant). dimensions: type: ImageDimensions description: | 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/common/PriceDraft.raml b/api-specs/api/types/common/PriceDraft.raml index 525cb15c5d..0d0bc35965 100644 --- a/api-specs/api/types/common/PriceDraft.raml +++ b/api-specs/api/types/common/PriceDraft.raml @@ -16,6 +16,8 @@ properties: type: Money description: | Money value of this Price. + + To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft). country?: type: CountryCode description: | diff --git a/api-specs/api/types/common/PriceTierDraft.raml b/api-specs/api/types/common/PriceTierDraft.raml index dda133d45b..fcb8a8fa2f 100644 --- a/api-specs/api/types/common/PriceTierDraft.raml +++ b/api-specs/api/types/common/PriceTierDraft.raml @@ -18,5 +18,6 @@ properties: type: Money description: | Money value that applies when the `minimumQuantity` is greater than or equal to the [LineItem](ctp:api:type:LineItem) `quantity`. + To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft). The `currencyCode` of a Price tier must be the same as the `currencyCode` in the `value` of the related Price. diff --git a/api-specs/api/types/custom-object/CustomObject.raml b/api-specs/api/types/custom-object/CustomObject.raml index eb18da4c28..6d6ba981ba 100644 --- a/api-specs/api/types/custom-object/CustomObject.raml +++ b/api-specs/api/types/custom-object/CustomObject.raml @@ -46,6 +46,6 @@ properties: value: type: any description: | - JSON standard types Number, String, Boolean, Array, Object, and [common API data types](/../api/types). - For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed. - If the referenced object is deleted, the API does not delete the corresponding reference to it and the `value` points to a non-existing object in such case. + Can be any JSON standard type, such as number, string, boolean, array, object, or a [common API data type](/../api/types). + + - For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the `value` points to a non-existing object in such case. diff --git a/api-specs/api/types/custom-object/CustomObjectDraft.raml b/api-specs/api/types/custom-object/CustomObjectDraft.raml index 09bcb35ffa..756add9fe5 100644 --- a/api-specs/api/types/custom-object/CustomObjectDraft.raml +++ b/api-specs/api/types/custom-object/CustomObjectDraft.raml @@ -19,9 +19,10 @@ properties: value: type: any description: | - JSON standard types Number, String, Boolean, Array, Object, and [common API data types](/../api/types). - For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed. - If the referenced object is deleted, the API does not delete the corresponding reference to it and the `value` points to a non-existing object in such case. + Can be any JSON standard type, such as number, string, boolean, array, object, or a [common API data type](/../api/types). + + - Fields within `value` that have `null` values **are not saved**. + - For values of type [Reference](ctp:api:type:Reference) the integrity of the data is not guaranteed. If the referenced object is deleted, the API does not delete the corresponding reference to it and the `value` points to a non-existing object in such case. version?: type: number format: int64 diff --git a/api-specs/api/types/custom-object/CustomObjectReference.raml b/api-specs/api/types/custom-object/CustomObjectReference.raml index cb4e31a674..fcff6fcf5b 100644 --- a/api-specs/api/types/custom-object/CustomObjectReference.raml +++ b/api-specs/api/types/custom-object/CustomObjectReference.raml @@ -2,6 +2,7 @@ (package): CustomObject type: Reference displayName: CustomObjectReference +example: !include ../../examples/CustomObjects/CustomObjectReference.json discriminatorValue: key-value-document description: | [Reference](ctp:api:type:Reference) to a [CustomObject](ctp:api:type:CustomObject). diff --git a/api-specs/api/types/customer-search/CustomerIndexingProgress.raml b/api-specs/api/types/customer-search/CustomerIndexingProgress.raml index a529fdb0fc..5aadda85e6 100644 --- a/api-specs/api/types/customer-search/CustomerIndexingProgress.raml +++ b/api-specs/api/types/customer-search/CustomerIndexingProgress.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): CustomerSearch type: object -(beta): true displayName: CustomerIndexingProgress properties: indexed: diff --git a/api-specs/api/types/customer-search/CustomerIndexingStatus.raml b/api-specs/api/types/customer-search/CustomerIndexingStatus.raml index 7eed68ce17..df3311883e 100644 --- a/api-specs/api/types/customer-search/CustomerIndexingStatus.raml +++ b/api-specs/api/types/customer-search/CustomerIndexingStatus.raml @@ -1,14 +1,13 @@ #%RAML 1.0 DataType (package): Project type: string -(beta): true displayName: CustomerIndexingStatus description: | The current indexing status of Customer Search. (enumDescriptions): Scheduled: Indexing is scheduled. Indexing: Indexing is in progress. - Ready: Indexing is complete and the [Search Customers](/../api/projects/customer-search#search-customers) endpoint returns up-to-date results. + Ready: Indexing is complete and the [Search Customers](ctp:api:endpoint:/{projectKey}/customers/search:POST) endpoint returns up-to-date results. Failed: Indexing failed due to an internal error. enum: - Scheduled diff --git a/api-specs/api/types/customer-search/CustomerPagedSearchResponse.raml b/api-specs/api/types/customer-search/CustomerPagedSearchResponse.raml index cf19ce3e93..6c3a3d0feb 100644 --- a/api-specs/api/types/customer-search/CustomerPagedSearchResponse.raml +++ b/api-specs/api/types/customer-search/CustomerPagedSearchResponse.raml @@ -3,7 +3,6 @@ displayName: CustomerPagedSearchResponse example: !include ../../examples/CustomerSearch/CustomerPagedSearchResponse.json type: object -(beta): true properties: total: type: number diff --git a/api-specs/api/types/customer-search/CustomerSearchIndexingStatusResponse.raml b/api-specs/api/types/customer-search/CustomerSearchIndexingStatusResponse.raml index 6271f4f101..e33aeeb4e9 100644 --- a/api-specs/api/types/customer-search/CustomerSearchIndexingStatusResponse.raml +++ b/api-specs/api/types/customer-search/CustomerSearchIndexingStatusResponse.raml @@ -2,7 +2,6 @@ (package): CustomerSearch displayName: CustomerSearchIndexingStatusResponse type: object -(beta): true example: !include ../../examples/CustomerSearch/CustomerSearchIndexingStatusResponse.json properties: status: diff --git a/api-specs/api/types/customer-search/CustomerSearchRequest.raml b/api-specs/api/types/customer-search/CustomerSearchRequest.raml index 7db27488c3..b9fabb620e 100644 --- a/api-specs/api/types/customer-search/CustomerSearchRequest.raml +++ b/api-specs/api/types/customer-search/CustomerSearchRequest.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): CustomerSearch type: object -(beta): true example: !include ../../examples/CustomerSearch/CustomerSearchRequest.json displayName: CustomerSearchRequest properties: diff --git a/api-specs/api/types/customer-search/CustomerSearchResult.raml b/api-specs/api/types/customer-search/CustomerSearchResult.raml index e7577de131..4907a1e4ee 100644 --- a/api-specs/api/types/customer-search/CustomerSearchResult.raml +++ b/api-specs/api/types/customer-search/CustomerSearchResult.raml @@ -2,7 +2,6 @@ (package): CustomerSearch displayName: CustomerSearchResult type: object -(beta): true properties: id: (identifier): true diff --git a/api-specs/api/types/customer/CustomerDraft.raml b/api-specs/api/types/customer/CustomerDraft.raml index 66c71e0c74..15c44e122f 100644 --- a/api-specs/api/types/customer/CustomerDraft.raml +++ b/api-specs/api/types/customer/CustomerDraft.raml @@ -8,6 +8,8 @@ properties: description: | User-defined unique identifier for the Customer. The `key` field is preferred over `customerNumber` as it is mutable and provides more flexibility. + + This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the [Import API](/../import-export/overview). pattern: ^[A-Za-z0-9_-]+$ minLength: 2 maxLength: 256 diff --git a/api-specs/api/types/customer/MyCustomerSignin.raml b/api-specs/api/types/customer/MyCustomerSignin.raml index c4a354c3fc..efe51b4772 100644 --- a/api-specs/api/types/customer/MyCustomerSignin.raml +++ b/api-specs/api/types/customer/MyCustomerSignin.raml @@ -1,7 +1,7 @@ #%RAML 1.0 DataType (package): Customer displayName: MyCustomerSignin -example: !include ../../examples/Customer/CustomerSignIn.json +example: !include ../../examples/Customer/MyCustomerSignIn.json type: object properties: email: diff --git a/api-specs/api/types/discount-code/DiscountCode.raml b/api-specs/api/types/discount-code/DiscountCode.raml index 5c584e7475..cca8bda394 100644 --- a/api-specs/api/types/discount-code/DiscountCode.raml +++ b/api-specs/api/types/discount-code/DiscountCode.raml @@ -55,6 +55,7 @@ properties: type: CartDiscountReference[] description: | Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied. + maxItems: 10 cartPredicate?: type: string description: | diff --git a/api-specs/api/types/discount-code/DiscountCodeDraft.raml b/api-specs/api/types/discount-code/DiscountCodeDraft.raml index ee77202a95..5d8f35d081 100644 --- a/api-specs/api/types/discount-code/DiscountCodeDraft.raml +++ b/api-specs/api/types/discount-code/DiscountCodeDraft.raml @@ -7,6 +7,8 @@ properties: type: string description: |- User-defined unique identifier for the DiscountCode. + + This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Discount Codes with the [Import API](/../import-export/overview) and the [Merchant Center](/../merchant-center/import-data). pattern: ^[A-Za-z0-9_-]+$ minLength: 2 maxLength: 256 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/ObjectNotFoundError.raml b/api-specs/api/types/error/ObjectNotFoundError.raml index 4c4c6a392f..377a29eb4d 100644 --- a/api-specs/api/types/error/ObjectNotFoundError.raml +++ b/api-specs/api/types/error/ObjectNotFoundError.raml @@ -4,11 +4,13 @@ type: ErrorObject displayName: ObjectNotFoundError discriminatorValue: ObjectNotFound description: | - Returned when the requested resource was not found. + Returned if the requested resource was not found or the Product Search index is [inactive](/../api/projects/product-search#activation-of-the-feature). properties: code: type: string message: type: string description: | - `"A $resourceType with identifier $id was unexpectedly not found."` + `"A $resourceType with identifier $id was unexpectedly not found."` or + + `"No index found for project"` diff --git a/api-specs/api/types/error/SearchNotReadyError.raml b/api-specs/api/types/error/SearchNotReadyError.raml new file mode 100644 index 0000000000..e9c43d5f58 --- /dev/null +++ b/api-specs/api/types/error/SearchNotReadyError.raml @@ -0,0 +1,14 @@ +#%RAML 1.0 DataType +(package): Error +type: ErrorObject +displayName: SearchNotReadyError +discriminatorValue: SearchNotReady +description: | + Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress. +properties: + code: + type: string + message: + type: string + description: | + `$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.` 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/error/graphql/GraphQLErrorObject.raml b/api-specs/api/types/error/graphql/GraphQLErrorObject.raml index 739f09973a..5845d92c0e 100644 --- a/api-specs/api/types/error/graphql/GraphQLErrorObject.raml +++ b/api-specs/api/types/error/graphql/GraphQLErrorObject.raml @@ -8,7 +8,7 @@ properties: code: type: string description: | - Error identifier. + One of the error codes that is listed on the [Errors](/errors) page. //: type: any description: | diff --git a/api-specs/api/types/error/graphql/GraphQLObjectNotFoundError.raml b/api-specs/api/types/error/graphql/GraphQLObjectNotFoundError.raml index 8b3f68b8b8..f4eba88ed8 100644 --- a/api-specs/api/types/error/graphql/GraphQLObjectNotFoundError.raml +++ b/api-specs/api/types/error/graphql/GraphQLObjectNotFoundError.raml @@ -4,7 +4,7 @@ type: GraphQLErrorObject displayName: GraphQLObjectNotFoundError discriminatorValue: ObjectNotFound description: | - Returned when the requested resource was not found. + Returned if the requested resource was not found or the Product Search index is [inactive](/../api/projects/product-search#activation-of-the-feature). properties: code: type: string diff --git a/api-specs/api/types/error/graphql/GraphQLSearchNotReadyError.raml b/api-specs/api/types/error/graphql/GraphQLSearchNotReadyError.raml new file mode 100644 index 0000000000..e4909a90ad --- /dev/null +++ b/api-specs/api/types/error/graphql/GraphQLSearchNotReadyError.raml @@ -0,0 +1,10 @@ +#%RAML 1.0 DataType +(package): Error +type: GraphQLErrorObject +displayName: GraphQLSearchNotReadyError +discriminatorValue: SearchNotReady +description: | + Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress. +properties: + code: + type: string diff --git a/api-specs/api/types/extension/Extension.raml b/api-specs/api/types/extension/Extension.raml index eebceb33eb..1afa35f0ad 100644 --- a/api-specs/api/types/extension/Extension.raml +++ b/api-specs/api/types/extension/Extension.raml @@ -51,6 +51,6 @@ properties: type: integer description: | Maximum time (in milliseconds) that the Extension can respond within. - If no timeout is provided, the default value is used for all types of Extensions. + If no timeout is provided, the [default value](#time-limits) is used for all types of Extensions, including `payment` Extensions. The maximum value is 10000 ms (10 seconds) for `payment` Extensions and 2000 ms (2 seconds) for all other Extensions. default: 2000 diff --git a/api-specs/api/types/extension/ExtensionDraft.raml b/api-specs/api/types/extension/ExtensionDraft.raml index 661fd32400..946a2b7748 100644 --- a/api-specs/api/types/extension/ExtensionDraft.raml +++ b/api-specs/api/types/extension/ExtensionDraft.raml @@ -22,7 +22,7 @@ properties: type: integer description: | Maximum time (in milliseconds) the Extension can respond within. - If no timeout is provided, the default value is used for all types of Extensions. + If no timeout is provided, the [default value](/#time-limits) is used for all types of Extensions, including `payment` Extensions. The maximum value is 10000 ms (10 seconds) for `payment` Extensions and 2000 ms (2 seconds) for all other Extensions. This limit can be increased per Project after we review the performance impact. diff --git a/api-specs/api/types/extension/ExtensionResourceTypeId.raml b/api-specs/api/types/extension/ExtensionResourceTypeId.raml index 359f8f5c29..9fe7ae4f7e 100644 --- a/api-specs/api/types/extension/ExtensionResourceTypeId.raml +++ b/api-specs/api/types/extension/ExtensionResourceTypeId.raml @@ -9,16 +9,20 @@ enum: - order - payment - customer + - customer-group - quote-request - 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). payment: Extension triggered for operations on [Payments](/../api/projects/payments). customer: Extension triggered for operations on [Customers](/../api/projects/customers). + customer-group: Extension triggered for operations on [CustomerGroups](/../api/projects/customerGroups). quote-request: Extension triggered for operations on [QuoteRequests](/../api/projects/quote-requests). 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..b187407d4c 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. + The resource that triggers the Extension. actions: type: ExtensionAction[] description: | diff --git a/api-specs/api/types/extension/HttpDestination.raml b/api-specs/api/types/extension/HttpDestination.raml index 7e0b538280..110a20f875 100644 --- a/api-specs/api/types/extension/HttpDestination.raml +++ b/api-specs/api/types/extension/HttpDestination.raml @@ -9,7 +9,7 @@ properties: url: type: string description: | - URL to the target destination. If the Project is hosted in the China (AWS, Ningxia) Region, verify that the URL is not blocked due to firewall restrictions. + URL to the target destination. authentication?: type: HttpDestinationAuthentication description: | diff --git a/api-specs/api/types/extension/updates/ExtensionSetTimeoutInMsAction.raml b/api-specs/api/types/extension/updates/ExtensionSetTimeoutInMsAction.raml index 8473f68529..085225dedc 100644 --- a/api-specs/api/types/extension/updates/ExtensionSetTimeoutInMsAction.raml +++ b/api-specs/api/types/extension/updates/ExtensionSetTimeoutInMsAction.raml @@ -8,7 +8,7 @@ properties: type: integer description: | Value to set. If not defined, the maximum value is used. - If no timeout is provided, the default value is used for all types of Extensions. + If no timeout is provided, the [default value](#time-limits) is used for all types of Extensions, including `payment` Extensions. The maximum value is 10000 ms (10 seconds) for `payment` Extensions and 2000 ms (2 seconds) for all other Extensions. This limit can be increased per Project after we review the performance impact. diff --git a/api-specs/api/types/graphql/GraphQLError.raml b/api-specs/api/types/graphql/GraphQLError.raml index d9aa680301..b18cc1d402 100644 --- a/api-specs/api/types/graphql/GraphQLError.raml +++ b/api-specs/api/types/graphql/GraphQLError.raml @@ -2,15 +2,20 @@ (package): GraphQL displayName: GraphQLError type: object +description: Contains an error message, the location of the code that caused the error, and other information to help you correct the error. example: !include ../../examples/GraphQL/GraphQLError.json properties: message: type: string + description: Detailed description of the error explaining the root cause of the problem and suggesting how to correct the error. locations: type: array items: GraphQLErrorLocation + description: Location within your query where the error occurred. path?: type: array items: any + description: Query fields listed in order from the root of the query response up to the field in which the error occurred. `path` is displayed in the response only if an error is associated with a particular field in the query result. extensions: type: GraphQLErrorObject + description: Dictionary with additional information where applicable. diff --git a/api-specs/api/types/graphql/GraphQLErrorLocation.raml b/api-specs/api/types/graphql/GraphQLErrorLocation.raml index 393d11dbf2..8b6cdc20a4 100644 --- a/api-specs/api/types/graphql/GraphQLErrorLocation.raml +++ b/api-specs/api/types/graphql/GraphQLErrorLocation.raml @@ -2,8 +2,13 @@ (package): GraphQL displayName: GraphQLErrorLocation type: object +description: Represents the location within your query where the error occurred. properties: line: - type: integer + type: number + format: int64 + description: Line number of the query where the error occurred. column: - type: integer + type: number + format: int64 + description: Position in `line` where the error occurred. diff --git a/api-specs/api/types/graphql/GraphQLRequest.raml b/api-specs/api/types/graphql/GraphQLRequest.raml index 24eda544fa..a108964194 100644 --- a/api-specs/api/types/graphql/GraphQLRequest.raml +++ b/api-specs/api/types/graphql/GraphQLRequest.raml @@ -1,12 +1,16 @@ #%RAML 1.0 DataType (package): GraphQL displayName: GraphQLRequest +example: !include ../../examples/graphql-query.example.json +description: The query, operation name, and variables that are sent to the GraphQL API. type: object properties: query: type: string + description: String representation of the _Source Text_ of the _Document_ that is specified in the [Language section of the GraphQL specification](https://spec.graphql.org/draft/#sec-Language). operationName?: type: string + description: Name of the operation, if you defined several operations in `query`. variables?: type: GraphQLVariablesMap - description: '' + description: JSON object that contains key-value pairs in which the keys are variable names and the values are variable values. diff --git a/api-specs/api/types/graphql/GraphQLResponse.raml b/api-specs/api/types/graphql/GraphQLResponse.raml index 0349e90916..9a54e7f321 100644 --- a/api-specs/api/types/graphql/GraphQLResponse.raml +++ b/api-specs/api/types/graphql/GraphQLResponse.raml @@ -2,10 +2,14 @@ (package): GraphQL displayName: GraphQLResponse type: object +example: !include ../../examples/graphql.example.json +description: | + `error` is present in the response only if the GraphQL query was unsuccessful. properties: data?: type: any + description: JSON object that contains the results of a GraphQL query. errors?: type: array items: GraphQLError - description: '' + description: Errors that the GraphQL query returns. diff --git a/api-specs/api/types/graphql/GraphQLVariablesMap.raml b/api-specs/api/types/graphql/GraphQLVariablesMap.raml index 302a4044e1..3ff08f5fcc 100644 --- a/api-specs/api/types/graphql/GraphQLVariablesMap.raml +++ b/api-specs/api/types/graphql/GraphQLVariablesMap.raml @@ -2,6 +2,9 @@ (package): GraphQL displayName: GraphQLVariablesMap type: object +description: The variables that the GraphQL query uses. +example: !include ../../examples/GraphQL/GraphQLVariablesMap.json properties: //: type: any + description: JSON object that contains key-value pairs in which the keys are variable names and the values are variable values. diff --git a/api-specs/api/types/inventory/InventoryEntryDraft.raml b/api-specs/api/types/inventory/InventoryEntryDraft.raml index 52927526fe..250f467608 100644 --- a/api-specs/api/types/inventory/InventoryEntryDraft.raml +++ b/api-specs/api/types/inventory/InventoryEntryDraft.raml @@ -11,6 +11,8 @@ properties: type: string description: | User-defined unique identifier for the InventoryEntry. + + This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing InventoryEntries with the [Import API](/../import-export/overview) and the [Merchant Center](/../merchant-center/import-data). pattern: ^[A-Za-z0-9_-]+$ minLength: 2 maxLength: 256 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/ShoppingListLineItemAddedMessage.raml b/api-specs/api/types/message/ShoppingListLineItemAddedMessage.raml new file mode 100644 index 0000000000..24040dc0a8 --- /dev/null +++ b/api-specs/api/types/message/ShoppingListLineItemAddedMessage.raml @@ -0,0 +1,12 @@ +#%RAML 1.0 DataType +(package): Message +type: ShoppingListMessage +displayName: ShoppingListLineItemAddedMessage +discriminatorValue: ShoppingListLineItemAdded +description: | + Generated after a successful [Add ShoppingListLineItem](ctp:api:type:ShoppingListAddLineItemAction) update action. +properties: + lineItem: + type: ShoppingListLineItem + description: | + [Line Item](ctp:api:type:ShoppingListLineItem) that was added to the [ShoppingList](ctp:api:type:ShoppingList). diff --git a/api-specs/api/types/message/ShoppingListLineItemRemovedMessage.raml b/api-specs/api/types/message/ShoppingListLineItemRemovedMessage.raml new file mode 100644 index 0000000000..9909cfee7e --- /dev/null +++ b/api-specs/api/types/message/ShoppingListLineItemRemovedMessage.raml @@ -0,0 +1,12 @@ +#%RAML 1.0 DataType +(package): Message +type: ShoppingListMessage +displayName: ShoppingListLineItemRemovedMessage +discriminatorValue: ShoppingListLineItemRemoved +description: | + Generated after a successful [Remove ShoppingListLineItem](ctp:api:type:ShoppingListRemoveLineItemAction) update action. +properties: + lineItem: + type: ShoppingListLineItem + description: | + [Line Item](ctp:api:type:ShoppingListLineItem) that was removed from the [ShoppingList](ctp:api:type:ShoppingList). diff --git a/api-specs/api/types/message/ShoppingListMessage.raml b/api-specs/api/types/message/ShoppingListMessage.raml new file mode 100644 index 0000000000..92abfceb86 --- /dev/null +++ b/api-specs/api/types/message/ShoppingListMessage.raml @@ -0,0 +1,5 @@ +#%RAML 1.0 DataType +(package): Message +type: Message +(ignoreValidators): [PolymorphicSubtypesRule] +displayName: ShoppingListMessage 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/message/payload/ShoppingListLineItemAddedMessagePayload.raml b/api-specs/api/types/message/payload/ShoppingListLineItemAddedMessagePayload.raml new file mode 100644 index 0000000000..fea47dc3fd --- /dev/null +++ b/api-specs/api/types/message/payload/ShoppingListLineItemAddedMessagePayload.raml @@ -0,0 +1,12 @@ +#%RAML 1.0 DataType +(package): Message +type: ShoppingListMessagePayload +displayName: ShoppingListLineItemAddedMessagePayload +discriminatorValue: ShoppingListLineItemAdded +description: | + Generated after a successful [Add ShoppingListLineItem](ctp:api:type:ShoppingListAddLineItemAction) update action. +properties: + lineItem: + type: ShoppingListLineItem + description: | + [Line Item](ctp:api:type:ShoppingListLineItem) that was added to the [ShoppingList](ctp:api:type:ShoppingList). diff --git a/api-specs/api/types/message/payload/ShoppingListLineItemRemovedMessagePayload.raml b/api-specs/api/types/message/payload/ShoppingListLineItemRemovedMessagePayload.raml new file mode 100644 index 0000000000..72f50fa6ee --- /dev/null +++ b/api-specs/api/types/message/payload/ShoppingListLineItemRemovedMessagePayload.raml @@ -0,0 +1,12 @@ +#%RAML 1.0 DataType +(package): Message +type: ShoppingListMessagePayload +displayName: ShoppingListLineItemRemovedMessagePayload +discriminatorValue: ShoppingListLineItemRemoved +description: | + Generated after a successful [Remove ShoppingListLineItem](ctp:api:type:ShoppingListRemoveLineItemAction) update action. +properties: + lineItem: + type: ShoppingListLineItem + description: | + [Line Item](ctp:api:type:ShoppingListLineItem) that was removed from the [ShoppingList](ctp:api:type:ShoppingList). diff --git a/api-specs/api/types/message/payload/ShoppingListMessagePayload.raml b/api-specs/api/types/message/payload/ShoppingListMessagePayload.raml new file mode 100644 index 0000000000..f56fe6512c --- /dev/null +++ b/api-specs/api/types/message/payload/ShoppingListMessagePayload.raml @@ -0,0 +1,5 @@ +#%RAML 1.0 DataType +(package): Message +type: MessagePayload +(ignoreValidators): [PolymorphicSubtypesRule] +displayName: ShoppingListMessagePayload diff --git a/api-specs/api/types/order-edit/updates/StagedOrderAddCustomLineItemAction.raml b/api-specs/api/types/order-edit/updates/StagedOrderAddCustomLineItemAction.raml index 1e70e666eb..459a7a353d 100644 --- a/api-specs/api/types/order-edit/updates/StagedOrderAddCustomLineItemAction.raml +++ b/api-specs/api/types/order-edit/updates/StagedOrderAddCustomLineItemAction.raml @@ -56,8 +56,7 @@ properties: priceMode?: type: CustomLineItemPriceMode description: | - - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) - are applied to the Custom Line Item. + - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget), [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget), or [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget) are applied to the Custom Line Item. - If `External`, Cart Discounts are not considered on the Custom Line Item. default: Standard custom?: diff --git a/api-specs/api/types/order-edit/updates/StagedOrderSetCustomShippingMethodAction.raml b/api-specs/api/types/order-edit/updates/StagedOrderSetCustomShippingMethodAction.raml index 3c8bb3a8fb..8a99b19984 100644 --- a/api-specs/api/types/order-edit/updates/StagedOrderSetCustomShippingMethodAction.raml +++ b/api-specs/api/types/order-edit/updates/StagedOrderSetCustomShippingMethodAction.raml @@ -25,3 +25,7 @@ properties: type: ExternalTaxRateDraft description: | External Tax Rate for the `shippingRate` to be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode). + custom?: + type: CustomFieldsDraft + description: | + Custom Fields for the custom Shipping Method. diff --git a/api-specs/api/types/order-edit/updates/StagedOrderSetShippingAddressAndCustomShippingMethodAction.raml b/api-specs/api/types/order-edit/updates/StagedOrderSetShippingAddressAndCustomShippingMethodAction.raml index 144fa0749b..fffa3a703d 100644 --- a/api-specs/api/types/order-edit/updates/StagedOrderSetShippingAddressAndCustomShippingMethodAction.raml +++ b/api-specs/api/types/order-edit/updates/StagedOrderSetShippingAddressAndCustomShippingMethodAction.raml @@ -27,3 +27,7 @@ properties: type: ExternalTaxRateDraft description: | An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode). + custom?: + type: CustomFieldsDraft + description: | + Custom Fields for the custom Shipping Method. diff --git a/api-specs/api/types/order/CustomLineItemImportDraft.raml b/api-specs/api/types/order/CustomLineItemImportDraft.raml index bc3e188109..bd3e37085b 100644 --- a/api-specs/api/types/order/CustomLineItemImportDraft.raml +++ b/api-specs/api/types/order/CustomLineItemImportDraft.raml @@ -40,8 +40,7 @@ properties: type: CustomLineItemPriceMode default: Standard description: | - - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) - are applied to the Custom Line Item. + - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget), [MultiBuyCustomLineItemsTarget](ctp:api:type:MultiBuyCustomLineItemsTarget), or [CartDiscountPatternTarget](ctp:api:type:CartDiscountPatternTarget) are applied to the Custom Line Item. - If `External`, Cart Discounts are not considered on the Custom Line Item. shippingDetails?: type: ItemShippingDetailsDraft diff --git a/api-specs/api/types/order/Order.raml b/api-specs/api/types/order/Order.raml index 873ecf56d1..6627c25dce 100644 --- a/api-specs/api/types/order/Order.raml +++ b/api-specs/api/types/order/Order.raml @@ -59,7 +59,7 @@ properties: description: | [Custom Line Items](ctp:api:type:CustomLineItems) that are part of the Order. totalPrice: - type: TypedMoney + type: CentPrecisionMoney description: | Sum of the `totalPrice` field of all [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem), and if available, the `price` field of [ShippingInfo](ctp:api:type:ShippingInfo). If a discount applies on `totalPrice`, this field holds the discounted value. diff --git a/api-specs/api/types/order/ShipmentState.raml b/api-specs/api/types/order/ShipmentState.raml index bdfcf4a0c2..655356c25b 100644 --- a/api-specs/api/types/order/ShipmentState.raml +++ b/api-specs/api/types/order/ShipmentState.raml @@ -11,6 +11,7 @@ enum: - Delayed - Partial - Backorder + - Canceled (enumDescriptions): Shipped: | Indicates that the Order is shipped. @@ -26,3 +27,5 @@ enum: Indicates that items in the Order are shipped in more than one shipment. Backorder: | Indicates that items in the Order are not in stock and will be delivered once the items are restocked. + Canceled: | + Indicates that the shipment of the Order is canceled. 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-selection/ProductSelectionAssignment.raml b/api-specs/api/types/product-selection/ProductSelectionAssignment.raml index e327e5cb88..e2a8dd07a7 100644 --- a/api-specs/api/types/product-selection/ProductSelectionAssignment.raml +++ b/api-specs/api/types/product-selection/ProductSelectionAssignment.raml @@ -20,14 +20,16 @@ properties: variantSelection?: type: ProductVariantSelection description: | - Define which Variants of the added Product will be included in the Product Selection. + Defines which particular Variants of the Product are included in the Product Selection. + If undefined all Variants of the referenced Product are included. This field is only available for assignments to a Product Selection with `Individual` [ProductSelectionMode](ctp:api:type:ProductSelectionMode). The list of SKUs will be updated automatically on any change of those performed on the respective Product itself. variantExclusion?: type: ProductVariantExclusion description: | - Defines which Variants of the Product will be excluded from the Product Selection. + Defines which particular Variants of the Product are excluded from the Product Selection. + If undefined all Variants of the referenced Product are excluded. This field is only available for assignments to a Product Selection with `IndividualExclusion` [ProductSelectionMode](ctp:api:type:ProductSelectionMode). The list of SKUs will be updated automatically on any change of those performed on the respective Product itself. diff --git a/api-specs/api/types/product-tailoring/ProductTailoring.raml b/api-specs/api/types/product-tailoring/ProductTailoring.raml index 0f50a2f476..b80081e1f3 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoring.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoring.raml @@ -62,3 +62,10 @@ properties: type: boolean description: | `true` if the `staged` data is different from the `current` data. + warnings?: + type: array + description: | + Warnings about processing of a request. + Appears in response to requests with response status code `202 Accepted`. + items: + type: WarningObject diff --git a/api-specs/api/types/product-tailoring/ProductTailoringAttribute.raml b/api-specs/api/types/product-tailoring/ProductTailoringAttribute.raml new file mode 100644 index 0000000000..8c29877b94 --- /dev/null +++ b/api-specs/api/types/product-tailoring/ProductTailoringAttribute.raml @@ -0,0 +1,28 @@ +#%RAML 1.0 DataType +(package): ProductTailoring +type: object +displayName: ProductTailoringAttribute +description: | + The same rules for `name` and `value` apply as for [Attribute](ctp:api:type:Attribute) in Product Variants. +properties: + name: + (identifier): true + (elementIdentifier): true + type: string + description: | + Name of the Attribute. + value: + (expandable): true + type: any + description: | + The [AttributeType](ctp:api:type:AttributeType) determines the format of the Attribute `value` to be provided: + + - For [Enum Type](ctp:api:type:AttributeEnumType) and [Localized Enum Type](ctp:api:type:AttributeLocalizedEnumType), + use the `key` of the [Plain Enum Value](ctp:api:type:AttributePlainEnumValue) or [Localized Enum Value](ctp:api:type:AttributeLocalizedEnumValue) objects, + or the complete objects as `value`. + - For [Localizable Text Type](ctp:api:type:AttributeLocalizableTextType), use the [LocalizedString](ctp:api:type:LocalizedString) object as `value`. + - For [Money Type](ctp:api:type:AttributeMoneyType) Attributes, use the [Money](ctp:api:type:Money) object as `value`. + - For [Set Type](ctp:api:type:AttributeSetType) Attributes, use the entire `set` object as `value`. + - For [Reference Type](ctp:api:type:AttributeReferenceType) Attributes, use the [Reference](ctp:api:type:Reference) object as `value`. + + Tailoring of [Nested Type](ctp:api:type:AttributeNestedType) Attributes is not supported. diff --git a/api-specs/api/types/product-tailoring/ProductTailoringData.raml b/api-specs/api/types/product-tailoring/ProductTailoringData.raml index a6baf545e0..e7e8d08cfc 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoringData.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoringData.raml @@ -16,15 +16,15 @@ properties: metaTitle?: type: LocalizedString description: | - Tailored title of the Product used by external search engines for improved search engine performance. + Tailored title of the Product that is used by search engines. metaDescription?: type: LocalizedString description: | - Tailored description of the Product used by external search engines for improved search engine performance. + Tailored description of the Product that is used by search engines. metaKeywords?: type: LocalizedString description: | - Tailored keywords related to the Product used by external search engines for improved search engine performance. + Tailored keywords related to the Product that are used by search engines. slug?: type: LocalizedString description: | @@ -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..e4a84300ea 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoringDraft.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoringDraft.raml @@ -28,15 +28,15 @@ properties: metaTitle?: type: LocalizedString description: | - Tailored title of the Product used by external search engines for improved search engine performance. + Tailored title of the Product that is used by search engines. metaDescription?: type: LocalizedString description: | - Tailored description of the Product used by external search engines for improved search engine performance. + Tailored description of the Product that is used by search engines. metaKeywords?: type: LocalizedString description: | - Tailored keywords related to the Product used by external search engines for improved search engine performance. + Tailored keywords related to the Product that are used by search engines. slug?: type: LocalizedString description: | @@ -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..0d40b6b99d 100644 --- a/api-specs/api/types/product-tailoring/ProductTailoringInStoreDraft.raml +++ b/api-specs/api/types/product-tailoring/ProductTailoringInStoreDraft.raml @@ -24,15 +24,15 @@ properties: metaTitle?: type: LocalizedString description: | - Tailored title of the Product used by external search engines for improved search engine performance. + Tailored title of the Product that is used by search engines. metaDescription?: type: LocalizedString description: | - Tailored description of the Product used by external search engines for improved search engine performance. + Tailored description of the Product that is used in search engine. metaKeywords?: type: LocalizedString description: | - Tailored keywords related to the Product used by external search engines for improved search engine performance. + Tailored keywords related to the Product that are used by search engines. slug?: type: LocalizedString description: | @@ -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..6787f47c82 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: @@ -21,3 +20,11 @@ properties: description: | Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding [ProductVariant](ctp:api:type:ProductVariant) in total. + attributes?: + type: ProductTailoringAttribute[] + description: | + Attributes of the tailored Product Variant. + If present, these Attributes are selectively merged into the `attributes` of the corresponding [ProductVariant](ctp:api:type:ProductVariant): + + - If the ProductVariant contains an Attribute with the same `name`, its `value` is overwritten, + - otherwise the Attribute and its value are added to the ProductVariant. diff --git a/api-specs/api/types/product-tailoring/ProductVariantTailoringDraft.raml b/api-specs/api/types/product-tailoring/ProductVariantTailoringDraft.raml index 1ebd97d346..1e951e06b1 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: @@ -23,3 +22,11 @@ properties: type: Asset[] description: | Media assets of the tailored Product Variant. + attributes?: + type: ProductTailoringAttribute[] + description: | + Attributes of the tailored Product Variant according to the respective [AttributeDefinition](ctp:api:type:AttributeDefinition). + If provided, these Attributes are selectively merged into the `attributes` of the corresponding [ProductVariant](ctp:api:type:ProductVariant): + + - If the ProductVariant contains an Attribute with the same `name`, its `value` is overwritten, + - otherwise the Attribute and its value are added to the ProductVariant. 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..187e6a5a5c 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 @@ -26,6 +25,10 @@ properties: type: AssetDraft[] description: | Media assets for the Product Variant Tailoring. + attributes?: + type: ProductTailoringAttribute[] + description: | + Attributes for the Product Variant Tailoring. staged?: type: boolean description: | 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..601ea2b852 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: | @@ -25,4 +24,4 @@ properties: assetOrder: type: string[] description: | - All existing Asset `id`s of the ProductTailoringVariant in the desired new order. + All existing Asset `id`s of the ProductVariantTailoring in the desired new order. 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/ProductTailoringSetAttributeAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAttributeAction.raml new file mode 100644 index 0000000000..a328f43e6f --- /dev/null +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAttributeAction.raml @@ -0,0 +1,45 @@ +#%RAML 1.0 DataType +(package): ProductTailoring +type: ProductTailoringUpdateAction +displayName: ProductTailoringSetAttributeAction +discriminatorValue: setAttribute +description: | + Either `variantId` or `sku` is required. +example: !include ../../../examples/ProductTailoring/ProductTailoringSetAttributeAction.json +properties: + variantId?: + type: number + format: int64 + description: | + The `id` of the ProductVariant to update. + Required if `sku` is absent. + sku?: + type: string + description: | + The `sku` of the ProductVariant to update. + Required if `variantId` is absent. + name: + type: string + description: | + The name of the Attribute to set. + value?: + type: any + description: | + Value to set for the Attribute. If empty, any existing value will be removed. + + The [AttributeType](ctp:api:type:AttributeType) determines the format of the Attribute `value` to be provided: + + - For [Enum Type](ctp:api:type:AttributeEnumType) and [Localized Enum Type](ctp:api:type:AttributeLocalizedEnumType), + use the `key` of the [Plain Enum Value](ctp:api:type:AttributePlainEnumValue) or [Localized Enum Value](ctp:api:type:AttributeLocalizedEnumValue) objects, + or the complete objects as `value`. + - For [Localizable Text Type](ctp:api:type:AttributeLocalizableTextType), use the [LocalizedString](ctp:api:type:LocalizedString) object as `value`. + - For [Money Type](ctp:api:type:AttributeMoneyType) Attributes, use the [Money](ctp:api:type:Money) object as `value`. + - For [Set Type](ctp:api:type:AttributeSetType) Attributes, use the entire `set` object as `value`. + - For [Reference Type](ctp:api:type:AttributeReferenceType) Attributes, use the [Reference](ctp:api:type:Reference) object as `value`. + + Tailoring of [Nested Type](ctp:api:type:AttributeNestedType) Attributes is **not supported**. + staged?: + type: boolean + description: | + If `true`, only the staged Attribute is set. If `false`, both current and staged Attribute is set. + default: true diff --git a/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAttributeInAllVariantsAction.raml b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAttributeInAllVariantsAction.raml new file mode 100644 index 0000000000..aff5f18561 --- /dev/null +++ b/api-specs/api/types/product-tailoring/updates/ProductTailoringSetAttributeInAllVariantsAction.raml @@ -0,0 +1,36 @@ +#%RAML 1.0 DataType +(package): ProductTailoring +type: ProductTailoringUpdateAction +displayName: ProductTailoringSetAttributeInAllVariantsAction +discriminatorValue: setAttributeInAllVariants +example: !include ../../../examples/ProductTailoring/ProductTailoringSetAttributeInAllVariantsAction.json +description: |- + Adds, removes, or changes a tailored Attribute in all Product Variants of a Product at the same time. + This action is useful for setting tailored values for Attributes with the [Constraint](ctp:api:type:AttributeConstraintEnum) `SameForAll`. +properties: + name: + type: string + description: | + The name of the Attribute to set. + value?: + type: any + description: | + Value to set for the Attributes. If empty, any existing value will be removed. + + The [AttributeType](ctp:api:type:AttributeType) determines the format of the Attribute `value` to be provided: + + - For [Enum Type](ctp:api:type:AttributeEnumType) and [Localized Enum Type](ctp:api:type:AttributeLocalizedEnumType), + use the `key` of the [Plain Enum Value](ctp:api:type:AttributePlainEnumValue) or [Localized Enum Value](ctp:api:type:AttributeLocalizedEnumValue) objects, + or the complete objects as `value`. + - For [Localizable Text Type](ctp:api:type:AttributeLocalizableTextType), use the [LocalizedString](ctp:api:type:LocalizedString) object as `value`. + - For [Money Type](ctp:api:type:AttributeMoneyType) Attributes, use the [Money](ctp:api:type:Money) object as `value`. + - For [Set Type](ctp:api:type:AttributeSetType) Attributes, use the entire `set` object as `value`. + - For [Reference Type](ctp:api:type:AttributeReferenceType) Attributes, use the [Reference](ctp:api:type:Reference) object as `value`. + + Tailoring of [Nested Type](ctp:api:type:AttributeNestedType) Attributes is **not supported**. + + staged?: + type: boolean + description: | + If `true`, only the staged Attributes are set. If `false`, both the current and staged Attributes are set. + default: true 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/AttributeDefinition.raml b/api-specs/api/types/product-type/AttributeDefinition.raml index 51425ba701..0f0756c293 100644 --- a/api-specs/api/types/product-type/AttributeDefinition.raml +++ b/api-specs/api/types/product-type/AttributeDefinition.raml @@ -36,7 +36,7 @@ properties: isSearchable: type: boolean description: |- - If `true`, the Attribute's values are available for the [Product Projections Search API](/../api/projects/products-search) for use in full-text search queries, filters, and facets. + If `true`, the Attribute's values are available in the [Product Projection Search](/../api/projects/products-search) or the [Product Search](/../api/projects/product-search) API for use in full-text search queries, filters, and facets. Which exact features are available with this flag depends on the specific [AttributeType](ctp:api:type:AttributeType). The maximum size of a searchable field is **restricted** by the [Field content size limit](/../api/limits#field-content-size). diff --git a/api-specs/api/types/product-type/AttributeDefinitionDraft.raml b/api-specs/api/types/product-type/AttributeDefinitionDraft.raml index 075b41ceef..df5c6df592 100644 --- a/api-specs/api/types/product-type/AttributeDefinitionDraft.raml +++ b/api-specs/api/types/product-type/AttributeDefinitionDraft.raml @@ -17,7 +17,7 @@ properties: minLength: 2 maxLength: 256 description: |- - User-defined name of the Attribute that is unique with the [Project](ctp:api:type:Project). + User-defined name of the Attribute that is unique to the [Project](ctp:api:type:Project). When using the same `name` for an Attribute in multiple ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes, else an [AttributeDefinitionAlreadyExists](ctp:api:type:AttributeDefinitionAlreadyExistsError) error is returned. An exception to this are the values of an `enum` or `lenum` Type and sets thereof. @@ -45,7 +45,7 @@ properties: isSearchable?: type: boolean description: |- - Set to `true` if the Attribute's values should be available in the [Product Projections Search API](/../api/projects/products-search) and can be used in full-text search queries, filters, and facets. + Set to `true` if the Attribute's values should be available in the [Product Projection Search](/../api/projects/products-search) or the [Product Search](/../api/projects/product-search) API and can be used in full-text search queries, filters, and facets. Which exact features are available with this flag depends on the specific [AttributeType](ctp:api:type:AttributeType). The maximum size of a searchable field is **restricted** by the [Field content size limit](/../api/limits#field-content-size). This constraint is enforced at both Product creation and Product update. 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-type/updates/ProductTypeChangeAttributeNameAction.raml b/api-specs/api/types/product-type/updates/ProductTypeChangeAttributeNameAction.raml index 927de610c0..694aa5c938 100644 --- a/api-specs/api/types/product-type/updates/ProductTypeChangeAttributeNameAction.raml +++ b/api-specs/api/types/product-type/updates/ProductTypeChangeAttributeNameAction.raml @@ -21,7 +21,7 @@ properties: minLength: 2 maxLength: 256 description: |- - New user-defined name of the Attribute that is unique with the [Project](ctp:api:type:Project). + New user-defined name of the Attribute that is unique to the [Project](ctp:api:type:Project). When using the same `name` for an Attribute in two or more ProductTypes, all fields of the AttributeDefinition of this Attribute must be the same across the ProductTypes. If not, an [AttributeDefinitionAlreadyExists](ctp:api:type:AttributeDefinitionAlreadyExistsError) error is returned. An exception to this are the values of an `enum` or `lenum` type and sets thereof. diff --git a/api-specs/api/types/product/Product.raml b/api-specs/api/types/product/Product.raml index c2c221aae6..1631848317 100644 --- a/api-specs/api/types/product/Product.raml +++ b/api-specs/api/types/product/Product.raml @@ -68,3 +68,10 @@ properties: description: | Type of Price to be used when looking up a price for the Product. default: Embedded + warnings?: + type: array + description: | + Warnings about processing of a request. + Appears in response to requests with response status code `202 Accepted`. + items: + type: WarningObject diff --git a/api-specs/api/types/product/ProductData.raml b/api-specs/api/types/product/ProductData.raml index 3d115ecf69..4df2e0d4b9 100644 --- a/api-specs/api/types/product/ProductData.raml +++ b/api-specs/api/types/product/ProductData.raml @@ -31,11 +31,11 @@ properties: metaTitle?: type: LocalizedString description: | - Title of the Product displayed in search results. + Title of the Product as used by search engines. metaDescription?: type: LocalizedString description: | - Description of the Product displayed in search results below the meta title. + Description of the Product as used by search engines. metaKeywords?: type: LocalizedString description: | @@ -48,6 +48,7 @@ properties: type: ProductVariant[] description: | Additional Product Variants. + maxItems: 100 searchKeywords: type: SearchKeywords description: | diff --git a/api-specs/api/types/product/ProductDraft.raml b/api-specs/api/types/product/ProductDraft.raml index 3d37524292..7d5c96093a 100644 --- a/api-specs/api/types/product/ProductDraft.raml +++ b/api-specs/api/types/product/ProductDraft.raml @@ -23,7 +23,9 @@ properties: description: | User-defined unique identifier for the Product. - To update a Product using the [Import API](/../import-export/product), the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`. + This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Products with the [Import API](/../api/import-export/overview) and the [Merchant Center](/../merchant-center/import-data). + + To update a Product using the Import API or Merchant Center, the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`. description?: type: LocalizedString description: | @@ -39,11 +41,11 @@ properties: metaTitle?: type: LocalizedString description: | - Title of the Product displayed in search results. + Title of the Product as used by search engines. metaDescription?: type: LocalizedString description: | - Description of the Product displayed in search results. + Description of the Product as used by search engines. metaKeywords?: type: LocalizedString description: | @@ -56,6 +58,7 @@ properties: type: ProductVariantDraft[] description: | The additional Product Variants for the Product. + maxItems: 100 taxCategory?: type: TaxCategoryResourceIdentifier description: | diff --git a/api-specs/api/types/product/ProductVariant.raml b/api-specs/api/types/product/ProductVariant.raml index 1789fc5ab7..607a29bdb5 100644 --- a/api-specs/api/types/product/ProductVariant.raml +++ b/api-specs/api/types/product/ProductVariant.raml @@ -26,6 +26,7 @@ properties: description: | The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, `validFrom` and `validUntil`). + maxItems: 100 attributes?: type: Attribute[] description: | diff --git a/api-specs/api/types/product/ProductVariantAvailability.raml b/api-specs/api/types/product/ProductVariantAvailability.raml index 04c6ebff08..dff6083603 100644 --- a/api-specs/api/types/product/ProductVariantAvailability.raml +++ b/api-specs/api/types/product/ProductVariantAvailability.raml @@ -3,7 +3,7 @@ displayName: ProductVariantAvailability type: object description: | - The [InventoryEntry](ctp:api:type:InventoryEntry) information of the Product Variant. If there is a supply [Channel](ctp:api:type:Channel) for the InventoryEntry, then `channels` is returned. If not, then `isOnStock`, `restockableInDays`, and `quantityOnStock` are returned. + The [InventoryEntry](ctp:api:type:InventoryEntry) information of the Product Variant. If there is a supply [Channel](ctp:api:type:Channel) for the InventoryEntry, then `channels` is returned. If not, then `isOnStock`, `restockableInDays`, and `availableQuantity` are returned. properties: channels?: type: ProductVariantChannelAvailabilityMap 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/product/updates/ProductSetKeyAction.raml b/api-specs/api/types/product/updates/ProductSetKeyAction.raml index e3af614492..16074b87c3 100644 --- a/api-specs/api/types/product/updates/ProductSetKeyAction.raml +++ b/api-specs/api/types/product/updates/ProductSetKeyAction.raml @@ -10,4 +10,4 @@ properties: description: | Value to set. If empty, any existing value will be removed. - To update a Product using the [Import API](/../import-export/product), the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`. + To update a Product using the [Import API](/../api/import-export/overview) and the [Merchant Center](/../merchant-center/import-data), the Product `key` must match the pattern `^[A-Za-z0-9_-]{2,256}$`. diff --git a/api-specs/api/types/product/updates/ProductSetPricesAction.raml b/api-specs/api/types/product/updates/ProductSetPricesAction.raml index 48c6b43819..ebbad1b441 100644 --- a/api-specs/api/types/product/updates/ProductSetPricesAction.raml +++ b/api-specs/api/types/product/updates/ProductSetPricesAction.raml @@ -21,6 +21,7 @@ properties: description: | The Embedded Prices to set. Each Price must have its unique Price scope (with same currency, country, Customer Group, Channel, `validFrom` and `validUntil`). + maxItems: 100 staged?: type: boolean description: | diff --git a/api-specs/api/types/project/BusinessUnitSearchStatus.raml b/api-specs/api/types/project/BusinessUnitSearchStatus.raml new file mode 100644 index 0000000000..ae79519750 --- /dev/null +++ b/api-specs/api/types/project/BusinessUnitSearchStatus.raml @@ -0,0 +1,14 @@ +#%RAML 1.0 DataType +(package): Project +type: string +(beta): true +displayName: BusinessUnitSearchStatus +description: | + Specifies the status of the [Business Unit Search](/../api/projects/business-unit-search) index. + You can change the status using the [Change Business Unit Search Status](ctp:api:type:ProjectChangeBusinessUnitSearchStatusAction) update action. +(enumDescriptions): + Activated: indicates that the Business Unit Search feature is fully operational. + Deactivated: indicates that the Business Unit Search feature is currently not active. +enum: + - Activated + - Deactivated diff --git a/api-specs/api/types/project/CustomerSearchStatus.raml b/api-specs/api/types/project/CustomerSearchStatus.raml index a0260abecf..a7cae0a501 100644 --- a/api-specs/api/types/project/CustomerSearchStatus.raml +++ b/api-specs/api/types/project/CustomerSearchStatus.raml @@ -1,14 +1,13 @@ #%RAML 1.0 DataType (package): Project type: string -(beta): true displayName: CustomerSearchStatus description: | Specifies the status of the [Customer Search](/../api/projects/customer-search) index. You can change the status using the [Change Customer Search Status](ctp:api:type:ProjectChangeCustomerSearchStatusAction) update action. (enumDescriptions): - Activated: indicates that the [Customer Search](/../api/projects/customer-search#search-customers) endpoint is fully operational. - Deactivated: indicates that the Customer Search enpoint is currently not active. + Activated: indicates that the Customer Search feature is fully operational. + Deactivated: indicates that the Customer Search feature is currently not active. enum: - Activated - Deactivated diff --git a/api-specs/api/types/project/ExternalOAuth.raml b/api-specs/api/types/project/ExternalOAuth.raml index c474660859..2fca7d9f9c 100644 --- a/api-specs/api/types/project/ExternalOAuth.raml +++ b/api-specs/api/types/project/ExternalOAuth.raml @@ -10,7 +10,7 @@ properties: url: type: string description: | - URL with authorization header. If the Project is hosted in the China (AWS, Ningxia) Region, verify that the URL is not blocked due to firewall restrictions. + URL with authorization header. authorizationHeader: type: string description: Must not contain any leading or trailing whitespaces. Partially hidden on retrieval. diff --git a/api-specs/api/types/project/ProductSearchIndexingMode.raml b/api-specs/api/types/project/ProductSearchIndexingMode.raml index 71e3d270ed..4441847bec 100644 --- a/api-specs/api/types/project/ProductSearchIndexingMode.raml +++ b/api-specs/api/types/project/ProductSearchIndexingMode.raml @@ -2,7 +2,6 @@ (package): Project displayName: ProductSearchIndexingMode type: string -(beta): true enum: - ProductProjectionsSearch - ProductsSearch diff --git a/api-specs/api/types/project/ProductSearchStatus.raml b/api-specs/api/types/project/ProductSearchStatus.raml deleted file mode 100644 index 5caa2e7fef..0000000000 --- a/api-specs/api/types/project/ProductSearchStatus.raml +++ /dev/null @@ -1,12 +0,0 @@ -#%RAML 1.0 DataType -(package): Project -type: string -(beta): true -displayName: ProductSearchStatus -description: Specifies the status of the [Product Search](/../api/projects/product-search) index. -(enumDescriptions): - Activated: indicates that the [Search Products](/../api/projects/product-search#search-products) endpoint is fully operational. - Deactivated: indicates that the Product Search feature is currently not active. -enum: - - Activated - - Deactivated diff --git a/api-specs/api/types/project/SearchIndexingConfiguration.raml b/api-specs/api/types/project/SearchIndexingConfiguration.raml index 403cc37144..064bc47f9f 100644 --- a/api-specs/api/types/project/SearchIndexingConfiguration.raml +++ b/api-specs/api/types/project/SearchIndexingConfiguration.raml @@ -10,9 +10,15 @@ properties: description: Configuration for the [Product Projection Search](/../api/projects/products-search) and [Product Suggestions](/../api/projects/products-suggestions) endpoints. productsSearch?: type: SearchIndexingConfigurationValues - (beta): true description: Configuration for the [Product Search](/../api/projects/product-search) feature. orders?: type: SearchIndexingConfigurationValues (beta): true description: Configuration for the [Order Search](/../api/projects/order-search) feature. + customers?: + type: SearchIndexingConfigurationValues + description: Configuration for the [Customer Search](/../api/projects/customer-search) feature. + businessUnits?: + type: SearchIndexingConfigurationValues + (beta): true + description: Configuration for the [Business Unit Search](/../api/projects/business-unit-search) feature. diff --git a/api-specs/api/types/project/updates/ProjectChangeBusinessUnitSearchStatusAction.raml b/api-specs/api/types/project/updates/ProjectChangeBusinessUnitSearchStatusAction.raml new file mode 100644 index 0000000000..0e5e621c1c --- /dev/null +++ b/api-specs/api/types/project/updates/ProjectChangeBusinessUnitSearchStatusAction.raml @@ -0,0 +1,11 @@ +#%RAML 1.0 DataType +(package): Project +type: ProjectUpdateAction +(beta): true +displayName: ProjectChangeBusinessUnitSearchStatusAction +discriminatorValue: changeBusinessUnitSearchStatus +example: !include ../../../examples/Project/ProjectChangeBusinessUnitSearchStatusAction.json +properties: + status: + type: BusinessUnitSearchStatus + description: Activates or deactivates the [Search Business Units](ctp:api:endpoint:/{projectKey}/business-units/search:POST) feature. Activation will trigger building a search index for the Business Units in the Project. diff --git a/api-specs/api/types/project/updates/ProjectChangeCustomerSearchStatusAction.raml b/api-specs/api/types/project/updates/ProjectChangeCustomerSearchStatusAction.raml index e1ee2d2086..b90edf6672 100644 --- a/api-specs/api/types/project/updates/ProjectChangeCustomerSearchStatusAction.raml +++ b/api-specs/api/types/project/updates/ProjectChangeCustomerSearchStatusAction.raml @@ -1,7 +1,6 @@ #%RAML 1.0 DataType (package): Project type: ProjectUpdateAction -(beta): true displayName: ProjectChangeCustomerSearchStatusAction discriminatorValue: changeCustomerSearchStatus example: !include ../../../examples/Project/ProjectChangeCustomerSearchStatusAction.json diff --git a/api-specs/api/types/project/updates/ProjectChangeProductSearchIndexingEnabledAction.raml b/api-specs/api/types/project/updates/ProjectChangeProductSearchIndexingEnabledAction.raml index e39ea26c9c..9dc512024d 100644 --- a/api-specs/api/types/project/updates/ProjectChangeProductSearchIndexingEnabledAction.raml +++ b/api-specs/api/types/project/updates/ProjectChangeProductSearchIndexingEnabledAction.raml @@ -12,7 +12,6 @@ properties: - If `true`, the indexing of [Product](ctp:api:type:Product) information will start and the [Product Projection Search](/../api/projects/products-search) as well as the [Product Suggestions](/../api/projects/products-suggestions) endpoint will become available soon after for this Project. Proportional to the amount of information being indexed, the Project's [SearchIndexingConfiguration](ctp:api:type:SearchIndexingConfiguration) `status` for `products` will be shown as `"Indexing"` during this time. As soon as the indexing has finished, the configuration status will be changed to `"Activated"` making the aforementioned endpoints fully available for this Project. mode?: type: ProductSearchIndexingMode - (beta): true description: | Controls whether the action should apply to [Product Projection Search](/../api/projects/products-search) or to [Product Search](/../api/projects/product-search). default: ProductProjectionsSearch 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/SearchExactExpression.raml b/api-specs/api/types/search/SearchExactExpression.raml index 2740075c95..90e5985dd7 100644 --- a/api-specs/api/types/search/SearchExactExpression.raml +++ b/api-specs/api/types/search/SearchExactExpression.raml @@ -4,4 +4,4 @@ type: SearchQueryExpression displayName: SearchExactExpression properties: exact: - type: SearchAnyValue + type: SearchExactValue diff --git a/api-specs/api/types/search/SearchExactValue.raml b/api-specs/api/types/search/SearchExactValue.raml new file mode 100644 index 0000000000..230b45f74c --- /dev/null +++ b/api-specs/api/types/search/SearchExactValue.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Search +type: SearchQueryExpressionValue +displayName: SearchExactValue +properties: + value?: + type: any + values?: + type: any[] + language?: + type: Locale + caseInsensitive?: + type: boolean 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/shopping-list/updates/ShoppingListAddLineItemAction.raml b/api-specs/api/types/shopping-list/updates/ShoppingListAddLineItemAction.raml index 46ce67dcd6..6ef67bd051 100644 --- a/api-specs/api/types/shopping-list/updates/ShoppingListAddLineItemAction.raml +++ b/api-specs/api/types/shopping-list/updates/ShoppingListAddLineItemAction.raml @@ -7,6 +7,9 @@ description: | The [ProductVariant](ctp:api:type:ProductVariant) to be included in the ShoppingListLineItem must be specified using the `productID` and `variantID`, or by the `sku`. If the ShoppingList already contains a ShoppingListLineItem for the same Product Variant with the same Custom Fields, then only the quantity of the existing ShoppingListLineItem is increased. A ShoppingListLineItem with an empty `variantId` is not considered the same as a ShoppingListLineItem with a `variantId` currently referring to the Master Variant. + + Produces the [Shopping List Line Item Added](ctp:api:type:ShoppingListLineItemAddedMessage) Message. + example: !include ../../../examples/ShoppingList/ShoppingListAddLineItemAction.json properties: key?: @@ -39,7 +42,7 @@ properties: addedAt?: type: datetime description: | - Date and time the TextLineItem is added to the [ShoppingList](ctp:api:type:ShoppingList). If not set, the current date and time (UTC) is used. + Date and time the ShoppingListLineItem is added to the [ShoppingList](ctp:api:type:ShoppingList). If not set, the current date and time (UTC) is used. custom?: type: CustomFieldsDraft description: | diff --git a/api-specs/api/types/shopping-list/updates/ShoppingListRemoveLineItemAction.raml b/api-specs/api/types/shopping-list/updates/ShoppingListRemoveLineItemAction.raml index c8551df383..663ddbeb83 100644 --- a/api-specs/api/types/shopping-list/updates/ShoppingListRemoveLineItemAction.raml +++ b/api-specs/api/types/shopping-list/updates/ShoppingListRemoveLineItemAction.raml @@ -4,6 +4,8 @@ type: ShoppingListUpdateAction displayName: ShoppingListRemoveLineItemAction discriminatorValue: removeLineItem example: !include ../../../examples/ShoppingList/ShoppingListRemoveLineItemAction.json +description: | + Produces the [Shopping List Line Item Removed](ctp:api:type:ShoppingListLineItemRemovedMessage) Message. properties: lineItemId?: type: string diff --git a/api-specs/api/types/standalone-price/StandalonePriceDraft.raml b/api-specs/api/types/standalone-price/StandalonePriceDraft.raml index 8d288c133a..5c2a33cc98 100644 --- a/api-specs/api/types/standalone-price/StandalonePriceDraft.raml +++ b/api-specs/api/types/standalone-price/StandalonePriceDraft.raml @@ -19,6 +19,8 @@ properties: type: Money description: | Sets the money value of this Price. + + To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft). country?: type: CountryCode description: | diff --git a/api-specs/api/types/standalone-price/updates/StandalonePriceChangeValueAction.raml b/api-specs/api/types/standalone-price/updates/StandalonePriceChangeValueAction.raml index afabc539ea..7ab04a6684 100644 --- a/api-specs/api/types/standalone-price/updates/StandalonePriceChangeValueAction.raml +++ b/api-specs/api/types/standalone-price/updates/StandalonePriceChangeValueAction.raml @@ -11,6 +11,8 @@ properties: type: Money description: | New value to set. Must not be empty. + + To set the money value in high precision, use [HighPrecisionMoneyDraft](ctp:api:type:HighPrecisionMoneyDraft). staged?: type: boolean default: false diff --git a/api-specs/api/types/standalone-price/updates/StandalonePriceSetDiscountedPriceAction.raml b/api-specs/api/types/standalone-price/updates/StandalonePriceSetDiscountedPriceAction.raml index d02e03b260..6992a1a73b 100644 --- a/api-specs/api/types/standalone-price/updates/StandalonePriceSetDiscountedPriceAction.raml +++ b/api-specs/api/types/standalone-price/updates/StandalonePriceSetDiscountedPriceAction.raml @@ -4,10 +4,15 @@ type: StandalonePriceUpdateAction displayName: StandalonePriceSetDiscountedPriceAction discriminatorValue: setDiscountedPrice description: | - Discounts a Standalone Price. The referenced [ProductDiscount](ctp:api:type:ProductDiscount) in the discounted field must be of type external, active, and its predicate must match the referenced Price. Produces the [StandalonePriceExternalDiscountSet](ctp:api:type:StandalonePriceExternalDiscountSetMessage) Message. + Discounts a Standalone Price of a Product Variant on a published [Product](ctp:api:type:Product). + If the Product Variant does not exist or if it exists only in the staged representation of a Product, an [InvalidOperationError](ctp:api:type:InvalidOperationError) error is returned. + + Produces the [StandalonePriceExternalDiscountSet](ctp:api:type:StandalonePriceExternalDiscountSetMessage) Message. example: !include ../../../examples/StandalonePrice/StandalonePriceSetDiscountedPriceAction.json properties: discounted?: type: DiscountedPriceDraft description: | Value to set. If empty, any existing value will be removed. + + The referenced [ProductDiscount](ctp:api:type:ProductDiscount) must be of type external, active, and its predicate must match the referenced Price. diff --git a/api-specs/api/types/store/Store.raml b/api-specs/api/types/store/Store.raml index 29edd9aa0d..3d2ad26187 100644 --- a/api-specs/api/types/store/Store.raml +++ b/api-specs/api/types/store/Store.raml @@ -55,10 +55,12 @@ properties: type: ChannelReference[] description: | Product Distribution Channels allowed for the Store. + maxItems: 100 supplyChannels: type: ChannelReference[] description: | Inventory Supply Channels allowed for the Store. + maxItems: 100 productSelections: type: ProductSelectionSetting[] description: |- @@ -68,6 +70,7 @@ properties: - If only `inactive` Product Selections with `IndividualExclusion` [ProductSelectionMode](ctp:api:type:ProductSelectionMode) are provided, all the Products are availlable in this Store. - If all the Product Selections provided are `inactive` and there's at least a Product Selection of mode `Individual`, no Product is availlable in this Store. - If at least an `active` Product Selection is provided, only `active` Product Selections are considered to compute the availlability in this Store. + maxItems: 100 custom?: type: CustomFields diff --git a/api-specs/api/types/store/StoreDraft.raml b/api-specs/api/types/store/StoreDraft.raml index 3c93cf69f5..66dabd2ee0 100644 --- a/api-specs/api/types/store/StoreDraft.raml +++ b/api-specs/api/types/store/StoreDraft.raml @@ -27,10 +27,12 @@ properties: type: ChannelResourceIdentifier[] description: | ResourceIdentifier of a Channel with `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum). + maxItems: 100 supplyChannels?: type: ChannelResourceIdentifier[] description: | ResourceIdentifier of a Channel with `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum). + maxItems: 100 productSelections?: type: ProductSelectionSettingDraft[] description: | @@ -40,6 +42,7 @@ properties: - If only `inactive` Product Selections with `IndividualExclusion` [ProductSelectionMode](ctp:api:type:ProductSelectionMode) are provided, all the Products are available in this Store. - If all the Product Selections provided are `inactive` and there's at least a Product Selection of mode `Individual`, no Product is available in this Store. - If at least an `active` Product Selection is provided, only `active` Product Selections are considered to compute the availability in this Store. + maxItems: 100 custom?: type: CustomFieldsDraft diff --git a/api-specs/api/types/store/updates/StoreSetDistributionChannelsAction.raml b/api-specs/api/types/store/updates/StoreSetDistributionChannelsAction.raml index b770f02d40..bac79a5855 100644 --- a/api-specs/api/types/store/updates/StoreSetDistributionChannelsAction.raml +++ b/api-specs/api/types/store/updates/StoreSetDistributionChannelsAction.raml @@ -14,3 +14,4 @@ properties: description: | Value to set. If not defined, the Store's `distributionChannels` are unset. + maxItems: 100 diff --git a/api-specs/api/types/store/updates/StoreSetProductSelectionsAction.raml b/api-specs/api/types/store/updates/StoreSetProductSelectionsAction.raml index d59b412ec7..8ca064fe53 100644 --- a/api-specs/api/types/store/updates/StoreSetProductSelectionsAction.raml +++ b/api-specs/api/types/store/updates/StoreSetProductSelectionsAction.raml @@ -14,3 +14,4 @@ properties: - If provided, Product Selections for which `active` is set to `true` are available in the Store. - If not provided or provided as empty array, the action removes all Product Selections from this Store, meaning all Products in the [Project](ctp:api:type:Project) are available in this Store. + maxItems: 100 diff --git a/api-specs/api/types/store/updates/StoreSetSupplyChannelsAction.raml b/api-specs/api/types/store/updates/StoreSetSupplyChannelsAction.raml index 81f33b9945..2f014d0e8c 100644 --- a/api-specs/api/types/store/updates/StoreSetSupplyChannelsAction.raml +++ b/api-specs/api/types/store/updates/StoreSetSupplyChannelsAction.raml @@ -14,3 +14,4 @@ properties: description: | Value to set. If not defined, the Store's `supplyChannels` are unset. + maxItems: 100 diff --git a/api-specs/api/types/subscription/AwsAuthenticationMode.raml b/api-specs/api/types/subscription/AwsAuthenticationMode.raml index c306384a33..44b8726083 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:iam::362576667341:user/subscriptions`. 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/CloudEventsFormat.raml b/api-specs/api/types/subscription/CloudEventsFormat.raml index d7bfe709a8..06b58628f8 100644 --- a/api-specs/api/types/subscription/CloudEventsFormat.raml +++ b/api-specs/api/types/subscription/CloudEventsFormat.raml @@ -4,7 +4,7 @@ type: DeliveryFormat displayName: CloudEventsFormat discriminatorValue: CloudEvents description: | - The CloudEventsFormat can be used with any [Destination](#destination), and the payload is delivered in the `JSON Event Format`. [AzureEventGridDestination](ctp:api:type:AzureEventGridDestination) offers native support to filter and route CloudEvents. + The CloudEventsFormat can be used with any [Destination](#destination-1), and the payload is delivered in the `JSON Event Format`. [AzureEventGridDestination](ctp:api:type:AzureEventGridDestination) offers native support to filter and route CloudEvents. properties: cloudEventsVersion: type: string 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/EventBridgeDestination.raml b/api-specs/api/types/subscription/EventBridgeDestination.raml index db3deb5c95..b13cd8fd50 100644 --- a/api-specs/api/types/subscription/EventBridgeDestination.raml +++ b/api-specs/api/types/subscription/EventBridgeDestination.raml @@ -16,3 +16,7 @@ properties: type: string description: | ID of the AWS account that receives the events. + source: + type: string + description: | + URN for the EventBridge destination. 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/MessageSubscription.raml b/api-specs/api/types/subscription/MessageSubscription.raml index 6c72178ded..429c7c45e5 100644 --- a/api-specs/api/types/subscription/MessageSubscription.raml +++ b/api-specs/api/types/subscription/MessageSubscription.raml @@ -3,7 +3,7 @@ type: object displayName: MessageSubscription description: | - For supported resources and message types, see [Message Types](/../api/projects/messages#message-types). Messages will be delivered even if the Messages Query HTTP API [is not enabled](/../api/projects/messages#enable-querying-messages-via-the-api). + Messages will be delivered even if the Messages Query HTTP API [is not enabled](/../api/projects/messages#enable-querying-messages-via-the-api). For MessageSubscriptions, the format of the payload is [MessageDeliveryPayload](ctp:api:type:MessageDeliveryPayload). properties: diff --git a/api-specs/api/types/subscription/MessageSubscriptionResourceTypeId.raml b/api-specs/api/types/subscription/MessageSubscriptionResourceTypeId.raml index f0059ca81b..5374985704 100644 --- a/api-specs/api/types/subscription/MessageSubscriptionResourceTypeId.raml +++ b/api-specs/api/types/subscription/MessageSubscriptionResourceTypeId.raml @@ -19,9 +19,11 @@ enum: - payment - product - product-selection + - product-tailoring - quote - quote-request - review + - shopping-list - staged-quote - standalone-price - store @@ -54,12 +56,16 @@ enum: Messages related to [Products](ctp:api:type:Product). product-selection: | Messages related to [ProductSelections](ctp:api:type:ProductSelection). + product-tailoring: | + Messages related to [ProductTailoring](ctp:api:type:ProductTailoring). quote: | Messages related to [Quotes](ctp:api:type:Quote). quote-request: | Messages related to [Quote Requests](ctp:api:type:QuoteRequest). review: | Messages related to [Reviews](ctp:api:type:Review). + shopping-list: | + Messages related to [Shopping Lists](ctp:api:type:ShoppingList). staged-quote: | Messages related to [Staged Quotes](ctp:api:type:StagedQuote). standalone-price: | diff --git a/api-specs/api/types/subscription/SnsDestination.raml b/api-specs/api/types/subscription/SnsDestination.raml index ccffd8317c..e6c6ff0803 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:iam::362576667341:user/subscriptions`. 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/SqsDestination.raml b/api-specs/api/types/subscription/SqsDestination.raml index 80fa5565bc..29a2da4610 100644 --- a/api-specs/api/types/subscription/SqsDestination.raml +++ b/api-specs/api/types/subscription/SqsDestination.raml @@ -8,7 +8,7 @@ description: | [AWS SQS](https://aws.amazon.com/sqs/) is a pull-queue on AWS. The queue must be a [Standard](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/standard-queues.html) queue type with a `MaximumMessageSize` of `256 KB`. - 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:iam::362576667341:user/subscriptions`. Otherwise, a test message 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/CustomFieldEnumType.raml b/api-specs/api/types/type/CustomFieldEnumType.raml index a1113ff537..4f5453b562 100644 --- a/api-specs/api/types/type/CustomFieldEnumType.raml +++ b/api-specs/api/types/type/CustomFieldEnumType.raml @@ -3,6 +3,7 @@ type: FieldType displayName: CustomFieldEnumType discriminatorValue: Enum +example: !include ../../examples/Type/CustomFieldEnumType.json description: | Field type for enum values. properties: diff --git a/api-specs/api/types/type/CustomFieldEnumValue.raml b/api-specs/api/types/type/CustomFieldEnumValue.raml index e4844dfa61..10d800c1af 100644 --- a/api-specs/api/types/type/CustomFieldEnumValue.raml +++ b/api-specs/api/types/type/CustomFieldEnumValue.raml @@ -2,6 +2,7 @@ (package): Type type: object displayName: CustomFieldEnumValue +example: !include ../../examples/Type/CustomFieldEnumValue.json description: | Defines an allowed value of a [CustomFieldEnumType](ctp:api:type:CustomFieldEnumType) field. properties: diff --git a/api-specs/api/types/type/CustomFieldLocalizedEnumType.raml b/api-specs/api/types/type/CustomFieldLocalizedEnumType.raml index 68051977ed..6f99fd0183 100644 --- a/api-specs/api/types/type/CustomFieldLocalizedEnumType.raml +++ b/api-specs/api/types/type/CustomFieldLocalizedEnumType.raml @@ -2,6 +2,7 @@ (package): Type type: FieldType displayName: CustomFieldLocalizedEnumType +example: !include ../../examples/Type/CustomFieldLocalizedEnumType.json discriminatorValue: LocalizedEnum description: | Field type for localized enum values. diff --git a/api-specs/api/types/type/CustomFieldLocalizedEnumValue.raml b/api-specs/api/types/type/CustomFieldLocalizedEnumValue.raml index 46031d6dd5..969afb56ce 100644 --- a/api-specs/api/types/type/CustomFieldLocalizedEnumValue.raml +++ b/api-specs/api/types/type/CustomFieldLocalizedEnumValue.raml @@ -2,6 +2,7 @@ (package): Type type: object displayName: CustomFieldLocalizedEnumValue +example: !include ../../examples/Type/CustomFieldLocalizedEnumValue.json description: | Defines an allowed value of a [CustomFieldLocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) field. properties: diff --git a/api-specs/api/types/type/CustomFieldReferenceType.raml b/api-specs/api/types/type/CustomFieldReferenceType.raml index 69e183d11e..3f07efcddb 100644 --- a/api-specs/api/types/type/CustomFieldReferenceType.raml +++ b/api-specs/api/types/type/CustomFieldReferenceType.raml @@ -3,6 +3,7 @@ type: FieldType displayName: CustomFieldReferenceType discriminatorValue: Reference +example: !include ../../examples/Type/CustomFieldReferenceType.json description: | Field type for [Reference](ctp:api:type:Reference) values. properties: diff --git a/api-specs/api/types/type/CustomFieldReferenceValue.raml b/api-specs/api/types/type/CustomFieldReferenceValue.raml index e346763f5c..13624a710a 100644 --- a/api-specs/api/types/type/CustomFieldReferenceValue.raml +++ b/api-specs/api/types/type/CustomFieldReferenceValue.raml @@ -6,6 +6,7 @@ description: | Defines which resource type a [CustomFieldReferenceType](ctp:api:type:CustomFieldReferenceType) can reference. enum: - approval-flow + - approval-rule - associate-role - business-unit - cart @@ -13,6 +14,7 @@ enum: - category - channel - customer + - customer-group - key-value-document - order - product @@ -24,6 +26,8 @@ enum: (enumDescriptions): approval-flow: | [ApprovalFlow](ctp:api:type:ApprovalFlow) + approval-rule: | + [ApprovalRule](ctp:api:type:ApprovalRule) associate-role: | [AssociateRole](ctp:api:type:AssociateRole) business-unit: | @@ -38,6 +42,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/type/CustomFieldSetType.raml b/api-specs/api/types/type/CustomFieldSetType.raml index 857b9223df..ee50379ea9 100644 --- a/api-specs/api/types/type/CustomFieldSetType.raml +++ b/api-specs/api/types/type/CustomFieldSetType.raml @@ -2,6 +2,7 @@ (package): Type type: FieldType displayName: CustomFieldSetType +example: !include ../../examples/Type/CustomFieldSetType.json discriminatorValue: Set description: | Values of a SetType Custom Field are sets of values of the specified `elementType` (without duplicate elements). diff --git a/api-specs/api/types/type/CustomFields.raml b/api-specs/api/types/type/CustomFields.raml index 178bc860da..df8945211f 100644 --- a/api-specs/api/types/type/CustomFields.raml +++ b/api-specs/api/types/type/CustomFields.raml @@ -1,6 +1,7 @@ #%RAML 1.0 DataType (package): Type displayName: CustomFields +example: !include ../../examples/Type/CustomFields.json type: object (expandable): true description: | @@ -13,4 +14,4 @@ properties: fields: type: FieldContainer description: | - Object containing the Custom Fields for the [customized resource or data type](/../api/projects/types#list-of-customizable-data-types). + Object containing the Custom Fields for the [customized resource or data type](/../api/projects/types#resourcetypeid). diff --git a/api-specs/api/types/type/CustomFieldsDraft.raml b/api-specs/api/types/type/CustomFieldsDraft.raml index 012d1fc358..9c1475790f 100644 --- a/api-specs/api/types/type/CustomFieldsDraft.raml +++ b/api-specs/api/types/type/CustomFieldsDraft.raml @@ -1,9 +1,10 @@ #%RAML 1.0 DataType (package): Type displayName: CustomFieldsDraft +example: !include ../../examples/Type/CustomFieldsDraft.json type: object description: | - The representation used when creating or updating a [customizable data type](/../api/projects/types#list-of-customizable-data-types) with Custom Fields. + The representation used when creating or updating a [customizable data type](/../api/projects/types#resourcetypeid) with Custom Fields. properties: type: description: | @@ -12,4 +13,4 @@ properties: fields?: type: FieldContainer description: | - Object containing the Custom Fields for the [customized resource or data type](/../api/projects/types#list-of-customizable-data-types). + Object containing the Custom Fields for the [customized resource or data type](/../api/projects/types#resourcetypeid). diff --git a/api-specs/api/types/type/FieldDefinition.raml b/api-specs/api/types/type/FieldDefinition.raml index cb21221276..354b05dff7 100644 --- a/api-specs/api/types/type/FieldDefinition.raml +++ b/api-specs/api/types/type/FieldDefinition.raml @@ -2,6 +2,7 @@ (package): Type type: object displayName: FieldDefinition +example: !include ../../examples/Type/FieldDefinition.json description: | Defines a [Custom Field](/../api/projects/custom-fields) and its meta-information. This FieldDefinition is similar to an [AttributeDefinition](ctp:api:type:AttributeDefinition) of [Product Types](/../api/projects/productTypes). diff --git a/api-specs/api/types/type/ResourceTypeId.raml b/api-specs/api/types/type/ResourceTypeId.raml index 9adff3c82e..7fe0cd41f7 100644 --- a/api-specs/api/types/type/ResourceTypeId.raml +++ b/api-specs/api/types/type/ResourceTypeId.raml @@ -3,11 +3,12 @@ displayName: ResourceTypeId type: string description: | - IDs indicating the [customizable resources and data types](/../api/projects/types#list-of-customizable-data-types). + With Types, you can model your own Custom Fields on the following resources and data types. enum: - address - asset - approval-flow + - approval-rule - associate-role - business-unit - cart-discount @@ -28,6 +29,7 @@ enum: - payment-interface-interaction - product-price - product-selection + - product-tailoring - quote - review - shipping @@ -44,6 +46,8 @@ enum: [Asset](ctp:api:type:Asset) on [Category](ctp:api:type:Category) and [ProductVariant](ctp:api:type:ProductVariant) approval-flow: | [ApprovalFlow](ctp:api:type:ApprovalFlow) + approval-rule: | + [ApprovalRule](ctp:api:type:ApprovalRule) associate-role: | [AssociateRole](ctp:api:type:AssociateRole) business-unit: | @@ -86,6 +90,8 @@ enum: [Embedded Price](ctp:api:type:Price) on [ProductVariant](ctp:api:type:ProductVariant) product-selection: | [ProductSelection](ctp:api:type:ProductSelection) + product-tailoring: | + [ProductTailoring](ctp:api:type:ProductTailoring) quote: | [Quote](ctp:api:type:Quote), [QuoteRequest](ctp:api:type:QuoteRequest) and [StagedQuote](ctp:api:type:StagedQuote). When a [StagedQuote](ctp:api:type:StagedQuote) is created, the [CustomFields](ctp:api:type:CustomFields) will be copied from the [QuoteRequest](ctp:api:type:QuoteRequest) and when a [Quote](ctp:api:type:Quote) is created, the [CustomFields](ctp:api:type:CustomFields) will be copied from the [StagedQuote](ctp:api:type:StagedQuote). diff --git a/api-specs/api/types/type/TypeDraft.raml b/api-specs/api/types/type/TypeDraft.raml index b34242b989..1a86ae2dae 100644 --- a/api-specs/api/types/type/TypeDraft.raml +++ b/api-specs/api/types/type/TypeDraft.raml @@ -2,6 +2,7 @@ (package): Type type: object displayName: TypeDraft +example: !include ../../examples/Type/TypeDraft.json properties: key: type: string diff --git a/api-specs/api/types/type/updates/TypeChangeEnumValueLabelAction.raml b/api-specs/api/types/type/updates/TypeChangeEnumValueLabelAction.raml index 44bf6c91d0..eb7c23456b 100644 --- a/api-specs/api/types/type/updates/TypeChangeEnumValueLabelAction.raml +++ b/api-specs/api/types/type/updates/TypeChangeEnumValueLabelAction.raml @@ -3,6 +3,7 @@ type: TypeUpdateAction displayName: TypeChangeEnumValueLabelAction discriminatorValue: changeEnumValueLabel +example: !include ../../../examples/Type/TypeChangeEnumValueLabelAction.json description: | Changes the `label` of an [EnumValue](ctp:api:type:CustomFieldEnumValue) of an [EnumType](ctp:api:type:CustomFieldEnumType) FieldDefinition. properties: diff --git a/api-specs/api/types/type/updates/TypeChangeInputHintAction.raml b/api-specs/api/types/type/updates/TypeChangeInputHintAction.raml index b7513500b2..62f9759c5a 100644 --- a/api-specs/api/types/type/updates/TypeChangeInputHintAction.raml +++ b/api-specs/api/types/type/updates/TypeChangeInputHintAction.raml @@ -2,6 +2,7 @@ (package): Type type: TypeUpdateAction displayName: TypeChangeInputHintAction +example: !include ../../../examples/Type/TypeChangeInputHintAction.json discriminatorValue: changeInputHint description: | Changes the `inputHint` of [CustomFieldStringType](ctp:api:type:CustomFieldStringType) [FieldDefinition](ctp:api:type:FieldDefinition), a [CustomFieldLocalizedStringType](ctp:api:type:CustomFieldLocalizedStringType) [FieldDefinition](ctp:api:type:FieldDefinition), and [CustomFieldSetType](ctp:api:type:CustomFieldSetType) [FieldDefinition](ctp:api:type:FieldDefinition) of these string-based FieldTypes. diff --git a/api-specs/api/types/type/updates/TypeChangeLocalizedEnumValueLabelAction.raml b/api-specs/api/types/type/updates/TypeChangeLocalizedEnumValueLabelAction.raml index c2f5a0e25f..a434dda7df 100644 --- a/api-specs/api/types/type/updates/TypeChangeLocalizedEnumValueLabelAction.raml +++ b/api-specs/api/types/type/updates/TypeChangeLocalizedEnumValueLabelAction.raml @@ -3,6 +3,7 @@ type: TypeUpdateAction displayName: TypeChangeLocalizedEnumValueLabelAction discriminatorValue: changeLocalizedEnumValueLabel +example: !include ../../../examples/Type/TypeChangeLocalizedEnumValueLabelAction.json description: | Changes the `label` of a [LocalizedEnumValue](ctp:api:type:CustomFieldLocalizedEnumValue) of a [LocalizedEnumType](ctp:api:type:CustomFieldLocalizedEnumType) FieldDefinition. properties: diff --git a/api-specs/api/types/types.raml b/api-specs/api/types/types.raml index e7116880e7..4bf990219d 100644 --- a/api-specs/api/types/types.raml +++ b/api-specs/api/types/types.raml @@ -19,6 +19,8 @@ ApprovalRule: !include approval-rule/ApprovalRule.raml ApprovalRuleDraft: !include approval-rule/ApprovalRuleDraft.raml ApprovalRulePagedQueryResponse: !include approval-rule/ApprovalRulePagedQueryResponse.raml ApprovalRuleSetApproversAction: !include approval-rule/ApprovalRuleSetApproversAction.raml +ApprovalRuleSetCustomFieldAction: !include approval-rule/ApprovalRuleSetCustomFieldAction.raml +ApprovalRuleSetCustomTypeAction: !include approval-rule/ApprovalRuleSetCustomTypeAction.raml ApprovalRuleSetDescriptionAction: !include approval-rule/ApprovalRuleSetDescriptionAction.raml ApprovalRuleSetKeyAction: !include approval-rule/ApprovalRuleSetKeyAction.raml ApprovalRuleSetNameAction: !include approval-rule/ApprovalRuleSetNameAction.raml @@ -68,6 +70,12 @@ AttributeGroupRemoveAttributeAction: !include attribute-group/updates/AttributeG AttributeGroupSetAttributesAction: !include attribute-group/updates/AttributeGroupSetAttributesAction.raml AttributeGroupSetDescriptionAction: !include attribute-group/updates/AttributeGroupSetDescriptionAction.raml AttributeGroupSetKeyAction: !include attribute-group/updates/AttributeGroupSetKeyAction.raml +BusinessUnitIndexingProgress: !include business-unit-search/BusinessUnitIndexingProgress.raml +BusinessUnitIndexingStatus: !include business-unit-search/BusinessUnitIndexingStatus.raml +BusinessUnitPagedSearchResponse: !include business-unit-search/BusinessUnitPagedSearchResponse.raml +BusinessUnitSearchIndexingStatusResponse: !include business-unit-search/BusinessUnitSearchIndexingStatusResponse.raml +BusinessUnitSearchRequest: !include business-unit-search/BusinessUnitSearchRequest.raml +BusinessUnitSearchResult: !include business-unit-search/BusinessUnitSearchResult.raml Associate: !include business-unit/Associate.raml AssociateDraft: !include business-unit/AssociateDraft.raml AssociateRoleAssignment: !include business-unit/AssociateRoleAssignment.raml @@ -127,6 +135,7 @@ CartDiscountCustomLineItemsTarget: !include cart-discount/CartDiscountCustomLine CartDiscountDraft: !include cart-discount/CartDiscountDraft.raml CartDiscountLineItemsTarget: !include cart-discount/CartDiscountLineItemsTarget.raml CartDiscountPagedQueryResponse: !include cart-discount/CartDiscountPagedQueryResponse.raml +CartDiscountPatternTarget: !include cart-discount/CartDiscountPatternTarget.raml CartDiscountReference: !include cart-discount/CartDiscountReference.raml CartDiscountResourceIdentifier: !include cart-discount/CartDiscountResourceIdentifier.raml CartDiscountShippingCostTarget: !include cart-discount/CartDiscountShippingCostTarget.raml @@ -144,8 +153,12 @@ CartDiscountValueGiftLineItem: !include cart-discount/CartDiscountValueGiftLineI CartDiscountValueGiftLineItemDraft: !include cart-discount/CartDiscountValueGiftLineItemDraft.raml CartDiscountValueRelative: !include cart-discount/CartDiscountValueRelative.raml CartDiscountValueRelativeDraft: !include cart-discount/CartDiscountValueRelativeDraft.raml +CountOnCustomLineItemUnits: !include cart-discount/CountOnCustomLineItemUnits.raml +CountOnLineItemUnits: !include cart-discount/CountOnLineItemUnits.raml +DiscountApplicationMode: !include cart-discount/DiscountApplicationMode.raml MultiBuyCustomLineItemsTarget: !include cart-discount/MultiBuyCustomLineItemsTarget.raml MultiBuyLineItemsTarget: !include cart-discount/MultiBuyLineItemsTarget.raml +PatternComponent: !include cart-discount/PatternComponent.raml SelectionMode: !include cart-discount/SelectionMode.raml StackingMode: !include cart-discount/StackingMode.raml CartDiscountAddStoreAction: !include cart-discount/updates/CartDiscountAddStoreAction.raml @@ -565,6 +578,7 @@ SearchDeactivatedError: !include error/SearchDeactivatedError.raml SearchExecutionFailureError: !include error/SearchExecutionFailureError.raml SearchFacetPathNotFoundError: !include error/SearchFacetPathNotFoundError.raml SearchIndexingInProgressError: !include error/SearchIndexingInProgressError.raml +SearchNotReadyError: !include error/SearchNotReadyError.raml SemanticErrorError: !include error/SemanticErrorError.raml ShippingMethodDoesNotMatchCartError: !include error/ShippingMethodDoesNotMatchCartError.raml StoreCartDiscountsLimitReachedError: !include error/StoreCartDiscountsLimitReachedError.raml @@ -647,6 +661,7 @@ GraphQLSearchDeactivatedError: !include error/graphql/GraphQLSearchDeactivatedEr GraphQLSearchExecutionFailureError: !include error/graphql/GraphQLSearchExecutionFailureError.raml GraphQLSearchFacetPathNotFoundError: !include error/graphql/GraphQLSearchFacetPathNotFoundError.raml GraphQLSearchIndexingInProgressError: !include error/graphql/GraphQLSearchIndexingInProgressError.raml +GraphQLSearchNotReadyError: !include error/graphql/GraphQLSearchNotReadyError.raml GraphQLSemanticErrorError: !include error/graphql/GraphQLSemanticErrorError.raml GraphQLShippingMethodDoesNotMatchCartError: !include error/graphql/GraphQLShippingMethodDoesNotMatchCartError.raml GraphQLStoreCartDiscountsLimitReachedError: !include error/graphql/GraphQLStoreCartDiscountsLimitReachedError.raml @@ -917,6 +932,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 @@ -1037,6 +1057,9 @@ ReturnInfoSetMessage: !include message/ReturnInfoSetMessage.raml ReviewCreatedMessage: !include message/ReviewCreatedMessage.raml ReviewRatingSetMessage: !include message/ReviewRatingSetMessage.raml ReviewStateTransitionMessage: !include message/ReviewStateTransitionMessage.raml +ShoppingListLineItemAddedMessage: !include message/ShoppingListLineItemAddedMessage.raml +ShoppingListLineItemRemovedMessage: !include message/ShoppingListLineItemRemovedMessage.raml +ShoppingListMessage: !include message/ShoppingListMessage.raml StagedQuoteCreatedMessage: !include message/StagedQuoteCreatedMessage.raml StagedQuoteDeletedMessage: !include message/StagedQuoteDeletedMessage.raml StagedQuoteSellerCommentSetMessage: !include message/StagedQuoteSellerCommentSetMessage.raml @@ -1182,6 +1205,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 @@ -1306,6 +1334,9 @@ ReturnInfoSetMessagePayload: !include message/payload/ReturnInfoSetMessagePayloa ReviewCreatedMessagePayload: !include message/payload/ReviewCreatedMessagePayload.raml ReviewRatingSetMessagePayload: !include message/payload/ReviewRatingSetMessagePayload.raml ReviewStateTransitionMessagePayload: !include message/payload/ReviewStateTransitionMessagePayload.raml +ShoppingListLineItemAddedMessagePayload: !include message/payload/ShoppingListLineItemAddedMessagePayload.raml +ShoppingListLineItemRemovedMessagePayload: !include message/payload/ShoppingListLineItemRemovedMessagePayload.raml +ShoppingListMessagePayload: !include message/payload/ShoppingListMessagePayload.raml ShoppingListStoreSetMessagePayload: !include message/payload/ShoppingListStoreSetMessagePayload.raml StagedQuoteCreatedMessagePayload: !include message/payload/StagedQuoteCreatedMessagePayload.raml StagedQuoteDeletedMessagePayload: !include message/payload/StagedQuoteDeletedMessagePayload.raml @@ -1723,6 +1754,7 @@ ProductSelectionSetVariantExclusionAction: !include product-selection/updates/Pr # yamllint disable-line rule:line-length ProductSelectionSetVariantSelectionAction: !include product-selection/updates/ProductSelectionSetVariantSelectionAction.raml ProductTailoring: !include product-tailoring/ProductTailoring.raml +ProductTailoringAttribute: !include product-tailoring/ProductTailoringAttribute.raml ProductTailoringData: !include product-tailoring/ProductTailoringData.raml ProductTailoringDraft: !include product-tailoring/ProductTailoringDraft.raml ProductTailoringInStoreDraft: !include product-tailoring/ProductTailoringInStoreDraft.raml @@ -1753,6 +1785,9 @@ ProductTailoringSetAssetDescriptionAction: !include product-tailoring/updates/Pr ProductTailoringSetAssetKeyAction: !include product-tailoring/updates/ProductTailoringSetAssetKeyAction.raml ProductTailoringSetAssetSourcesAction: !include product-tailoring/updates/ProductTailoringSetAssetSourcesAction.raml ProductTailoringSetAssetTagsAction: !include product-tailoring/updates/ProductTailoringSetAssetTagsAction.raml +ProductTailoringSetAttributeAction: !include product-tailoring/updates/ProductTailoringSetAttributeAction.raml +# yamllint disable-line rule:line-length +ProductTailoringSetAttributeInAllVariantsAction: !include product-tailoring/updates/ProductTailoringSetAttributeInAllVariantsAction.raml ProductTailoringSetDescriptionAction: !include product-tailoring/updates/ProductTailoringSetDescriptionAction.raml ProductTailoringSetExternalImagesAction: !include product-tailoring/updates/ProductTailoringSetExternalImagesAction.raml ProductTailoringSetImageLabelAction: !include product-tailoring/updates/ProductTailoringSetImageLabelAction.raml @@ -1909,6 +1944,7 @@ ProductTransitionStateAction: !include product/updates/ProductTransitionStateAct ProductUnpublishAction: !include product/updates/ProductUnpublishAction.raml BusinessUnitConfiguration: !include project/BusinessUnitConfiguration.raml BusinessUnitConfigurationStatus: !include project/BusinessUnitConfigurationStatus.raml +BusinessUnitSearchStatus: !include project/BusinessUnitSearchStatus.raml CartClassificationType: !include project/CartClassificationType.raml CartScoreType: !include project/CartScoreType.raml CartValueType: !include project/CartValueType.raml @@ -1917,7 +1953,6 @@ CustomerSearchStatus: !include project/CustomerSearchStatus.raml ExternalOAuth: !include project/ExternalOAuth.raml OrderSearchStatus: !include project/OrderSearchStatus.raml ProductSearchIndexingMode: !include project/ProductSearchIndexingMode.raml -ProductSearchStatus: !include project/ProductSearchStatus.raml Project: !include project/Project.raml ProjectUpdate: !include project/ProjectUpdate.raml ProjectUpdateAction: !include project/ProjectUpdateAction.raml @@ -1926,6 +1961,7 @@ SearchIndexingConfigurationStatus: !include project/SearchIndexingConfigurationS SearchIndexingConfigurationValues: !include project/SearchIndexingConfigurationValues.raml ShippingRateInputType: !include project/ShippingRateInputType.raml ShoppingListsConfiguration: !include project/ShoppingListsConfiguration.raml +ProjectChangeBusinessUnitSearchStatusAction: !include project/updates/ProjectChangeBusinessUnitSearchStatusAction.raml # yamllint disable-line rule:line-length ProjectChangeBusinessUnitStatusOnCreationAction: !include project/updates/ProjectChangeBusinessUnitStatusOnCreationAction.raml ProjectChangeCartsConfigurationAction: !include project/updates/ProjectChangeCartsConfigurationAction.raml @@ -2001,6 +2037,7 @@ SearchDateRangeValue: !include search/SearchDateRangeValue.raml SearchDateTimeRangeExpression: !include search/SearchDateTimeRangeExpression.raml SearchDateTimeRangeValue: !include search/SearchDateTimeRangeValue.raml SearchExactExpression: !include search/SearchExactExpression.raml +SearchExactValue: !include search/SearchExactValue.raml SearchExistsExpression: !include search/SearchExistsExpression.raml SearchExistsValue: !include search/SearchExistsValue.raml SearchFieldType: !include search/SearchFieldType.raml @@ -2281,6 +2318,8 @@ TypeChangeLocalizedEnumValueOrderAction: !include type/updates/TypeChangeLocaliz TypeChangeNameAction: !include type/updates/TypeChangeNameAction.raml TypeRemoveFieldDefinitionAction: !include type/updates/TypeRemoveFieldDefinitionAction.raml TypeSetDescriptionAction: !include type/updates/TypeSetDescriptionAction.raml +ImageProcessingOngoingWarning: !include warning/ImageProcessingOngoingWarning.raml +WarningObject: !include warning/WarningObject.raml Location: !include zone/Location.raml Zone: !include zone/Zone.raml ZoneDraft: !include zone/ZoneDraft.raml diff --git a/api-specs/api/types/warning/ImageProcessingOngoingWarning.raml b/api-specs/api/types/warning/ImageProcessingOngoingWarning.raml new file mode 100644 index 0000000000..1d2b63cf4b --- /dev/null +++ b/api-specs/api/types/warning/ImageProcessingOngoingWarning.raml @@ -0,0 +1,16 @@ +#%RAML 1.0 DataType +(package): Warning +type: WarningObject +displayName: ImageProcessingOngoingWarning +discriminatorValue: ImageProcessingOngoing +description: | + Contained in responses to an [Upload Product image](/projects/products#upload-product-image) or an [Upload Product Tailoring image](/projects/product-tailoring#upload-product-tailoring-image) request with response status code `202 Accepted`. + Indicates that the API is still creating the remaining sizes of the uploaded image. They will be available on the Content Delivery Network (CDN) soon. +example: !include /../../examples/Warning/ImageProcessingOngoingWarning.json +properties: + code: + type: string + message: + type: string + description: | + `"The image processing is still ongoing."` diff --git a/api-specs/api/types/warning/WarningObject.raml b/api-specs/api/types/warning/WarningObject.raml new file mode 100644 index 0000000000..3dd9b1011d --- /dev/null +++ b/api-specs/api/types/warning/WarningObject.raml @@ -0,0 +1,15 @@ +#%RAML 1.0 DataType +(package): Warning +type: object +displayName: WarningObject +discriminator: code +description: Represents a warning related to the returned response. +properties: + code: + type: string + description: | + Identifier for the type of warning. + message: + type: string + description: | + Contains information about the returned response.