diff --git a/storeapi.json b/storeapi.json index a142114..36e4e49 100644 --- a/storeapi.json +++ b/storeapi.json @@ -3048,10 +3048,10 @@ "required": [ "id", "documentTypeId", - "fileType", "orderId", "config", - "deepLinkCode" + "deepLinkCode", + "fileType" ], "properties": { "id": { @@ -3064,10 +3064,6 @@ "pattern": "^[0-9a-f]{32}$", "description": "Unique identity of document type." }, - "fileType": { - "type": "string", - "description": "Type of file like PDF." - }, "referencedDocumentId": { "type": "string", "pattern": "^[0-9a-f]{32}$", @@ -3083,6 +3079,10 @@ "pattern": "^[0-9a-f]{32}$", "description": "Unique identity of document media file." }, + "documentA11yMediaFileId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, "orderVersionId": { "type": "string", "pattern": "^[0-9a-f]{32}$", @@ -3123,6 +3123,10 @@ "type": "object", "description": "Additional fields that offer a possibility to add own fields for the different program-areas." }, + "fileType": { + "type": "string", + "description": "Type of file like PDF." + }, "createdAt": { "type": "string", "format": "date-time", @@ -3150,6 +3154,9 @@ }, "documentMediaFile": { "$ref": "#/components/schemas/Media" + }, + "documentA11yMediaFile": { + "$ref": "#/components/schemas/Media" } }, "type": "object" @@ -11142,395 +11149,39 @@ }, "type": "object" }, - "BreadcrumbCollection": { - "type": "object", - "properties": { - "breadcrumbs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Breadcrumb" - } - }, - "apiAlias": { - "type": "string", - "enum": [ - "breadcrumb_collection" - ] - } - }, - "required": [ - "breadcrumbs", - "apiAlias" - ] - }, - "CrossSellingElementCollection": { + "ShippingMethodPageRouteResponse": { "type": "array", "items": { - "$ref": "#/components/schemas/CrossSellingElement" - }, - "properties": { - "total": { - "description": "Number of cross selling elements found." - } - } - }, - "FindProductVariantRouteResponse": { - "type": "object", - "properties": { - "foundCombination": { - "type": "object", - "properties": { - "variantId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$", - "description": "Unique identity of a variant." - }, - "options": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Available product variant options. For example, for variant `Size`, option would be `XS`, `S`, `M`, `L`, `XL`." - } - } - } - } - }, - "Breadcrumb": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "categoryId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "type": { - "type": "string", - "enum": [ - "page", - "link", - "folder" - ] - }, - "translated": { - "type": "object", - "additionalProperties": true, - "properties": { - "customFields": { - "type": "object" - }, - "slotConfig": { - "type": "object" - }, - "linkType": { - "type": "string", - "enum": [ - "external", - "category", - "product", - "landing_page" - ] - }, - "internalLink": { - "type": "string" - }, - "externalLink": { - "type": "string" - }, - "linkNewTab": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "metaTitle": { - "type": "string" - }, - "metaDescription": { - "type": "string" - }, - "keywords": { - "type": "string" - } - } - }, - "path": { - "type": "string" - }, - "seoUrls": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeoUrl" - } - }, - "apiAlias": { - "type": "string", - "enum": [ - "breadcrumb" - ] - } - }, - "required": [ - "name", - "categoryId", - "type", - "translated", - "path", - "apiAlias" - ] - }, - "CalculatedPrice": { - "type": "object", - "description": "Represents a product along with detailed information required to display a variant selection.", - "properties": { - "unitPrice": { - "type": "number" - }, - "quantity": { - "type": "number" - }, - "rawTotal": { - "type": "number" - }, - "totalPrice": { - "type": "number" - }, - "calculatedTaxes": { - "type": "array", - "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "deliveryTimeId": { + "type": "string" + }, + "deliveryTime": { "type": "object", "properties": { - "apiAlias": { - "type": "string", - "enum": [ - "cart_tax_calculated" - ] + "name": { + "type": "string" }, - "tax": { - "type": "number" + "min": { + "type": "integer", + "format": "int32" }, - "taxRate": { - "type": "number" + "max": { + "type": "integer", + "format": "int32" }, - "price": { - "type": "number" - } - }, - "required": [ - "apiAlias", - "tax", - "taxRate", - "price" - ] - } - }, - "referencePrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/CartPriceReference" - }, - { - "type": "null" - } - ] - }, - "listPrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/CartListPrice" - }, - { - "type": "null" - } - ] - }, - "positionPrice": { - "type": "number" - }, - "netPrice": { - "type": "number" - }, - "regulationPrice": { - "type": "object", - "properties": { - "price": { - "type": "number" - }, - "apiAlias": { - "type": "string", - "enum": [ - "cart_regulation_price" - ] - } - }, - "nullable": true - }, - "hasRange": { - "type": "boolean" - }, - "variantId": { - "type": "string", - "format": "^[0-9a-f]{32}$", - "nullable": true - }, - "apiAlias": { - "type": "string", - "enum": [ - "calculated_price" - ] - }, - "taxRules": { - "type": "array", - "description": "Currently active tax rules and/or rates", - "items": { - "type": "object", - "properties": { - "taxRate": { - "type": "number", - "format": "float" - }, - "name": { - "type": "string" - } - } - } - } - }, - "required": [ - "apiAlias", - "hasRange", - "regulationPrice", - "listPrice", - "referencePrice", - "calculatedTaxes", - "totalPrice", - "quantity", - "unitPrice", - "positionPrice", - "netPrice", - "taxRules" - ] - }, - "CrossSellingElement": { - "type": "object", - "properties": { - "crossSelling": { - "$ref": "#/components/schemas/ProductCrossSelling" - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Product" - } - }, - "total": { - "type": "integer", - "format": "int32" - }, - "streamId": { - "type": "string", - "format": "uuid" - }, - "apiAlias": { - "type": "string", - "enum": [ - "cross_selling_element" - ] - } - }, - "required": [ - "crossSelling", - "products", - "total", - "apiAlias" - ] - }, - "CartDelivery": { - "type": "object", - "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", - "properties": { - "deliveryDate": { - "type": "object", - "properties": { - "earliest": { - "type": "string", - "format": "date-time" - }, - "latest": { - "type": "string", - "format": "date-time" - } - } - }, - "location": { - "type": "object", - "properties": { - "apiAlias": { - "type": "string", - "enum": [ - "cart_delivery_shipping_location" - ] - }, - "country": { - "$ref": "#/components/schemas/Country" - }, - "address": { - "$ref": "#/components/schemas/CustomerAddress" - }, - "state": { - "$ref": "#/components/schemas/CountryState" - } - } - }, - "positions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartDeliveryPosition" - } - }, - "shippingCosts": { - "$ref": "#/components/schemas/CalculatedPrice" - }, - "shippingMethod": { - "$ref": "#/components/schemas/ShippingMethod" - } - } - }, - "ShippingMethodPageRouteResponse": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "description": { - "type": "string" - }, - "deliveryTimeId": { - "type": "string" - }, - "deliveryTime": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "min": { - "type": "integer", - "format": "int32" - }, - "max": { - "type": "integer", - "format": "int32" - }, - "unit": { - "type": "string" + "unit": { + "type": "string" } } }, @@ -12127,73 +11778,285 @@ } } }, - "CartDeliveryPosition": { - "type": "object", - "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", + "NavigationRouteResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Category" + }, "properties": { - "deliveryDate": { - "type": "object", - "properties": { - "earliest": { - "type": "string", - "format": "date-time" - }, - "latest": { - "type": "string", - "format": "date-time" - } - } - }, - "identifier": { - "type": "string" - }, - "lineItem": { - "$ref": "#/components/schemas/LineItem" - }, - "price": { - "$ref": "#/components/schemas/CalculatedPrice" + "id": { + "description": "Unique identity of navigation route response." } } }, - "CustomerAddressRead": { + "CartPriceReference": { "type": "object", "properties": { - "id": { - "type": "string", - "pattern": "^[0-9a-f]{32}$", - "readOnly": true + "purchaseUnit": { + "type": "number" }, - "customerId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$", - "readOnly": true + "referenceUnit": { + "type": "number" }, - "createdAt": { - "type": "string", - "format": "date-time" + "unitName": { + "type": "string" }, - "updatedAt": { + "price": { + "type": "number" + }, + "apiAlias": { "type": "string", - "format": "date-time", - "nullable": true + "enum": [ + "cart_price_reference" + ] }, - "country": { - "$ref": "#/components/schemas/Country" + "listPrice": { + "oneOf": [ + { + "$ref": "#/components/schemas/CartListPrice" + }, + { + "type": "null" + } + ] }, - "countryState": { - "$ref": "#/components/schemas/CountryState", + "regulationPrice": { + "type": "object", + "properties": { + "price": { + "type": "number" + }, + "apiAlias": { + "type": "string", + "enum": [ + "cart_regulation_price" + ] + } + }, "nullable": true }, - "salutation": { - "$ref": "#/components/schemas/Salutation" + "hasRange": { + "type": "boolean" + }, + "variantId": { + "type": "string", + "format": "^[0-9a-f]{32}$", + "nullable": true } }, "required": [ - "customerId", - "createdAt", - "updatedAt", - "country", - "salutation" + "apiAlias", + "hasRange", + "regulationPrice", + "listPrice", + "calculatedTaxes", + "totalPrice", + "quantity", + "unitName" + ] + }, + "ProductDetailResponse": { + "type": "object", + "description": "Represents a product along with detailed information required to display a variant selection.", + "properties": { + "product": { + "$ref": "#/components/schemas/Product" + }, + "configurator": { + "type": "array", + "description": "List of property groups with their corresponding options and information on how to display them.", + "items": { + "$ref": "#/components/schemas/PropertyGroup" + } + }, + "id": { + "description": "Unique identity of product detail response." + }, + "available": { + "description": "When boolean value is true, the product is available for purchase." + }, + "isCloseout": { + "description": "Boolean value to check if the product is still buyable when stock value is 0." + }, + "displayGroup": { + "description": "Internal field." + }, + "manufacturerNumber": { + "description": "Unique number of the product manufacturer." + }, + "stock": { + "description": "Quantity of product available." + }, + "sortedProperties": { + "description": "Properties of the product that are sorted" + } + }, + "required": [ + "product" + ] + }, + "CustomerAddressBody": { + "description": "Added since version: 6.0.0.0", + "required": [ + "countryId", + "firstName", + "lastName", + "city", + "street" + ], + "properties": { + "countryId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "countryStateId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "salutationId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "firstName": { + "type": "string" + }, + "lastName": { + "type": "string" + }, + "zipcode": { + "type": "string" + }, + "city": { + "type": "string" + }, + "company": { + "type": "string" + }, + "street": { + "type": "string" + }, + "department": { + "type": "string" + }, + "title": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "additionalAddressLine1": { + "type": "string" + }, + "additionalAddressLine2": { + "type": "string" + }, + "customFields": { + "type": "object" + }, + "country": { + "$ref": "#/components/schemas/Country" + }, + "countryState": { + "$ref": "#/components/schemas/CountryState" + }, + "salutation": { + "$ref": "#/components/schemas/Salutation" + } + }, + "type": "object" + }, + "AggregationMetrics": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "avg", + "count", + "max", + "min", + "stats", + "sum" + ] + }, + "field": { + "type": "string" + } + }, + "required": [ + "name", + "type", + "field" + ] + }, + "CartDelivery": { + "type": "object", + "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", + "properties": { + "deliveryDate": { + "type": "object", + "properties": { + "earliest": { + "type": "string", + "format": "date-time" + }, + "latest": { + "type": "string", + "format": "date-time" + } + } + }, + "location": { + "type": "object", + "properties": { + "apiAlias": { + "type": "string", + "enum": [ + "cart_delivery_shipping_location" + ] + }, + "country": { + "$ref": "#/components/schemas/Country" + }, + "address": { + "$ref": "#/components/schemas/CustomerAddress" + }, + "state": { + "$ref": "#/components/schemas/CountryState" + } + } + }, + "positions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CartDeliveryPosition" + } + }, + "shippingCosts": { + "$ref": "#/components/schemas/CalculatedPrice" + }, + "shippingMethod": { + "$ref": "#/components/schemas/ShippingMethod" + } + } + }, + "SuccessResponse": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + } + }, + "NavigationType": { + "type": "string", + "enum": [ + "main-navigation", + "footer-navigation", + "service-navigation" ] }, "EntitySearchResult": { @@ -12223,253 +12086,761 @@ } } }, - "Sitemap": { + "ProductListingFlags": { "type": "object", + "description": "Additional flags for product listings", "properties": { - "filename": { + "no-aggregations": { + "description": "Resets all aggregations in the criteria. This parameter is a flag, the value has no effect.", "type": "string", - "description": "Name of the file which holds a list of all URL's." + "nullable": true }, - "created": { + "only-aggregations": { + "description": "If this flag is set, no products are fetched. Sorting and associations are also ignored. This parameter is a flag, the value has no effect.", "type": "string", - "format": "date-time" - } - }, - "required": [ - "filename", - "created" - ] - }, - "SuccessResponse": { - "type": "object", - "properties": { - "success": { - "type": "boolean" + "nullable": true } } }, - "Criteria": { + "Cart": { "type": "object", - "description": "Criteria to query entities.", "properties": { - "page": { - "description": "Search result page", - "type": "integer" + "name": { + "description": "Name of the cart - for example `guest-cart`", + "type": "string" }, - "term": { - "description": "Search term", + "token": { + "description": "Context token identifying the cart and the user session", "type": "string" }, - "limit": { - "description": "Number of items per result page", - "type": "integer" + "price": { + "$ref": "#/components/schemas/CalculatedPrice" }, - "filter": { + "lineItems": { + "description": "All items within the cart", "type": "array", - "description": "List of filters to restrict the search result. For more information, see [Search Queries > Filter](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#filter)", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SimpleFilter" - }, - { - "$ref": "#/components/schemas/EqualsFilter" - }, - { - "$ref": "#/components/schemas/MultiNotFilter" - }, - { - "$ref": "#/components/schemas/RangeFilter" - } - ] + "$ref": "#/components/schemas/LineItem" + } + }, + "errors": { + "type": "array", + "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", + "items": { + "$ref": "#/components/schemas/CartError" }, "properties": { - "type": { - "description": "To filter the results and aggregations with filter types like ==, >=, etc." + "key": { + "description": "Unique key for every message." }, - "field": { - "description": "To filter the results and aggregations by field like an property identifier." + "level": { + "description": "Types of level - Notice, warning and error. " }, - "value": { - "description": "To filter the results and aggregations by value." + "message": { + "description": "A persistent error passed from the shopping cart calculation processes to the user end." } } }, - "ids": { - "type": "array", - "description": "List of ids to search for", - "items": { - "type": "string" - } - }, - "query": { + "deliveries": { "type": "array", - "description": "List of queries to restrict the search result. For more information, see [Search Queries > Query](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#query)", "items": { - "$ref": "#/components/schemas/Query" + "$ref": "#/components/schemas/CartDelivery" } }, - "associations": { - "$ref": "#/components/schemas/Associations" - }, - "post-filter": { + "transactions": { + "description": "A list of all payment transactions associated with the current cart.", "type": "array", - "description": "Filters that applied without affecting aggregations. For more information, see [Search Queries > Post Filter](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#post-filter)", "items": { - "anyOf": [ - { - "$ref": "#/components/schemas/SimpleFilter" - }, - { - "$ref": "#/components/schemas/EqualsFilter" - }, - { - "$ref": "#/components/schemas/MultiNotFilter" + "type": "object", + "properties": { + "paymentMethodId": { + "type": "string" }, - { - "$ref": "#/components/schemas/RangeFilter" + "amount": { + "$ref": "#/components/schemas/CalculatedPrice" } - ] - }, - "properties": { - "type": { - "description": "To filter only the results but not the aggregations with filter types like ==, >=, etc." - }, - "field": { - "description": "To filter only the results but not the aggregations by field like an property identifier." - }, - "value": { - "description": "To filter only the results but not the aggregations by value." } - } - }, - "sort": { - "type": "array", - "description": "Sorting in the search result.", - "items": { - "$ref": "#/components/schemas/Sort" }, "properties": { - "field": { - "description": "Sort the search results by field like an property identifier." - }, - "order": { - "description": "Sort the search results of orders by ascending or descending." - }, - "naturalSorting": { - "description": "Sorting for special cases such as German letters with umlauts and similar characters etc." + "paymentMethodId": { + "description": "Unique identity of payment method." } } }, - "aggregations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Aggregation" - } + "modified": { + "type": "boolean", + "description": "It signifies any changes to cart." }, - "fields": { - "type": "array", - "description": "Fields which should be returned in the search result.", - "items": { - "type": "string", - "description": "Name of a field" - } + "customerComment": { + "type": "string", + "description": "A comment that can be added to the cart.", + "nullable": true }, - "grouping": { - "type": "array", - "description": "Perform groupings over certain fields", - "items": { - "type": "string", - "description": "Name of a field" - } + "affiliateCode": { + "type": "string", + "description": "An affiliate tracking code", + "nullable": true }, - "total-count-mode": { - "$ref": "#/components/schemas/TotalCountMode" + "campaignCode": { + "type": "string", + "description": "A campaign tracking code", + "nullable": true }, - "includes": { - "$ref": "#/components/schemas/Includes" + "id": { + "description": "Unique identity of cart." } } }, - "Associations": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Criteria" - } - }, - "Includes": { + "CartPriceQuantity": { "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Aggregation": { - "anyOf": [ - { - "$ref": "#/components/schemas/AggregationMetrics" - }, - { - "title": "AggregationEntity", - "allOf": [ - { - "$ref": "#/components/schemas/AggregationEntity" - }, - { - "$ref": "#/components/schemas/SubAggregations" - } + "properties": { + "apiAlias": { + "type": "string", + "enum": [ + "cart_price_quantity" ] }, - { - "title": "AggregationFilter", - "allOf": [ - { - "$ref": "#/components/schemas/AggregationFilter" - }, - { - "$ref": "#/components/schemas/SubAggregations" - } - ] + "isCalculated": { + "type": "boolean" }, - { - "title": "AggregationTerms", - "allOf": [ - { - "$ref": "#/components/schemas/AggregationTerms" - }, - { - "$ref": "#/components/schemas/SubAggregations" - } - ] + "listPrice": { + "$ref": "#/components/schemas/CartListPrice" }, - { - "title": "AggregationHistogram", - "allOf": [ - { - "$ref": "#/components/schemas/AggregationHistogram" - }, - { - "$ref": "#/components/schemas/SubAggregations" + "price": { + "type": "number" + }, + "quantity": { + "type": "number" + }, + "regulationPrice": { + "properties": { + "price": { + "type": "number", + "format": "float" } - ] + }, + "type": "object" }, - { - "title": "AggregationRange", - "allOf": [ - { - "$ref": "#/components/schemas/AggregationRange" - }, - { - "$ref": "#/components/schemas/SubAggregations" + "taxRules": { + "type": "array", + "items": { + "type": "object", + "properties": { + "taxRate": { + "type": "number", + "format": "float" + }, + "name": { + "type": "string" + } } - ] + } + }, + "type": { + "type": "string" } + }, + "required": [ + "apiAlias" ] }, - "SubAggregations": { - "type": "object", + "LineItemType": { + "type": "string", + "enum": [ + "product", + "credit", + "custom", + "promotion", + "discount", + "container", + "quantity" + ] + }, + "LineItem": { + "type": "object", + "properties": { + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LineItem" + } + }, + "cover": { + "$ref": "#/components/schemas/ProductMedia" + }, + "dataContextHash": { + "type": "string" + }, + "dataTimestamp": { + "type": "string" + }, + "deliveryInformation": { + "$ref": "#/components/schemas/CartDeliveryInformation" + }, + "description": { + "type": "string", + "description": "Description of line items in an order." + }, + "good": { + "type": "boolean", + "description": "When set to true, it indicates the line item is physical else it is virtual." + }, + "id": { + "type": "string", + "description": "Unique identity of line item." + }, + "label": { + "type": "string", + "description": "It is a typical product name given to the line item." + }, + "modified": { + "type": "boolean", + "description": "When boolean value is `true`, line items are said to be modified." + }, + "modifiedByApp": { + "type": "boolean" + }, + "payload": { + "$ref": "#/components/schemas/ProductJsonApi" + }, + "price": { + "type": "object", + "properties": { + "apiAlias": { + "type": "string", + "enum": [ + "calculated_price" + ] + }, + "calculatedTaxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "apiAlias": { + "type": "string", + "enum": [ + "cart_tax_calculated" + ] + }, + "tax": { + "type": "number" + }, + "taxRate": { + "type": "number" + }, + "price": { + "type": "number" + } + }, + "required": [ + "apiAlias", + "tax", + "taxRate", + "price" + ] + } + }, + "listPrice": { + "oneOf": [ + { + "$ref": "#/components/schemas/CartListPrice" + }, + { + "type": "null" + } + ] + }, + "quantity": { + "type": "number" + }, + "referencePrice": { + "oneOf": [ + { + "$ref": "#/components/schemas/CartPriceReference" + }, + { + "type": "null" + } + ] + }, + "regulationPrice": { + "type": "object", + "properties": { + "price": { + "type": "number" + }, + "apiAlias": { + "type": "string", + "enum": [ + "cart_regulation_price" + ] + } + }, + "nullable": true + }, + "totalPrice": { + "type": "number" + }, + "unitPrice": { + "type": "number" + }, + "taxRules": { + "type": "array", + "description": "Currently active tax rules and/or rates", + "items": { + "type": "object", + "properties": { + "taxRate": { + "type": "number", + "format": "float" + }, + "name": { + "type": "string" + } + } + } + } + }, + "required": [ + "apiAlias", + "totalPrice", + "quantity", + "unitPrice" + ] + }, + "priceDefinition": { + "$ref": "#/components/schemas/CartPriceQuantity" + }, + "quantity": { + "type": "number", + "description": "Number of items of product." + }, + "quantityInformation": { + "type": "object", + "properties": { + "maxPurchase": { + "type": "number" + }, + "minPurchase": { + "type": "number" + }, + "purchaseSteps": { + "type": "number" + } + } + }, + "referencedId": { + "type": "string", + "description": "Unique identity of type of entity." + }, + "removable": { + "type": "boolean", + "description": "Allows the line item to be removable from the cart when set to true." + }, + "stackable": { + "type": "boolean", + "description": "Allows to change the quantity of the line item when set to true." + }, + "states": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "is-physical", + "is-download" + ] + } + }, + "type": { + "$ref": "#/components/schemas/LineItemType", + "description": "Type refers to the entity type of an item whether it is product or promotion for instance." + }, + "uniqueIdentifier": { + "type": "string" + } + }, + "required": [ + "id", + "type" + ] + }, + "CalculatedPrice": { + "type": "object", + "description": "Represents a product along with detailed information required to display a variant selection.", + "properties": { + "unitPrice": { + "type": "number" + }, + "quantity": { + "type": "number" + }, + "rawTotal": { + "type": "number" + }, + "totalPrice": { + "type": "number" + }, + "calculatedTaxes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "apiAlias": { + "type": "string", + "enum": [ + "cart_tax_calculated" + ] + }, + "tax": { + "type": "number" + }, + "taxRate": { + "type": "number" + }, + "price": { + "type": "number" + } + }, + "required": [ + "apiAlias", + "tax", + "taxRate", + "price" + ] + } + }, + "referencePrice": { + "oneOf": [ + { + "$ref": "#/components/schemas/CartPriceReference" + }, + { + "type": "null" + } + ] + }, + "listPrice": { + "oneOf": [ + { + "$ref": "#/components/schemas/CartListPrice" + }, + { + "type": "null" + } + ] + }, + "positionPrice": { + "type": "number" + }, + "netPrice": { + "type": "number" + }, + "regulationPrice": { + "type": "object", + "properties": { + "price": { + "type": "number" + }, + "apiAlias": { + "type": "string", + "enum": [ + "cart_regulation_price" + ] + } + }, + "nullable": true + }, + "hasRange": { + "type": "boolean" + }, + "variantId": { + "type": "string", + "format": "^[0-9a-f]{32}$", + "nullable": true + }, + "apiAlias": { + "type": "string", + "enum": [ + "calculated_price" + ] + }, + "taxRules": { + "type": "array", + "description": "Currently active tax rules and/or rates", + "items": { + "type": "object", + "properties": { + "taxRate": { + "type": "number", + "format": "float" + }, + "name": { + "type": "string" + } + } + } + } + }, + "required": [ + "apiAlias", + "hasRange", + "regulationPrice", + "listPrice", + "referencePrice", + "calculatedTaxes", + "totalPrice", + "quantity", + "unitPrice", + "positionPrice", + "netPrice", + "taxRules" + ] + }, + "FindProductVariantRouteResponse": { + "type": "object", + "properties": { + "foundCombination": { + "type": "object", + "properties": { + "variantId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$", + "description": "Unique identity of a variant." + }, + "options": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Available product variant options. For example, for variant `Size`, option would be `XS`, `S`, `M`, `L`, `XL`." + } + } + } + } + }, + "Criteria": { + "type": "object", + "description": "Criteria to query entities.", + "properties": { + "page": { + "description": "Search result page", + "type": "integer" + }, + "term": { + "description": "Search term", + "type": "string" + }, + "limit": { + "description": "Number of items per result page", + "type": "integer" + }, + "filter": { + "type": "array", + "description": "List of filters to restrict the search result. For more information, see [Search Queries > Filter](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#filter)", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SimpleFilter" + }, + { + "$ref": "#/components/schemas/EqualsFilter" + }, + { + "$ref": "#/components/schemas/MultiNotFilter" + }, + { + "$ref": "#/components/schemas/RangeFilter" + } + ] + }, + "properties": { + "type": { + "description": "To filter the results and aggregations with filter types like ==, >=, etc." + }, + "field": { + "description": "To filter the results and aggregations by field like an property identifier." + }, + "value": { + "description": "To filter the results and aggregations by value." + } + } + }, + "ids": { + "type": "array", + "description": "List of ids to search for", + "items": { + "type": "string" + } + }, + "query": { + "type": "array", + "description": "List of queries to restrict the search result. For more information, see [Search Queries > Query](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#query)", + "items": { + "$ref": "#/components/schemas/Query" + } + }, + "associations": { + "$ref": "#/components/schemas/Associations" + }, + "post-filter": { + "type": "array", + "description": "Filters that applied without affecting aggregations. For more information, see [Search Queries > Post Filter](https://shopware.stoplight.io/docs/store-api/docs/concepts/search-queries.md#post-filter)", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/SimpleFilter" + }, + { + "$ref": "#/components/schemas/EqualsFilter" + }, + { + "$ref": "#/components/schemas/MultiNotFilter" + }, + { + "$ref": "#/components/schemas/RangeFilter" + } + ] + }, + "properties": { + "type": { + "description": "To filter only the results but not the aggregations with filter types like ==, >=, etc." + }, + "field": { + "description": "To filter only the results but not the aggregations by field like an property identifier." + }, + "value": { + "description": "To filter only the results but not the aggregations by value." + } + } + }, + "sort": { + "type": "array", + "description": "Sorting in the search result.", + "items": { + "$ref": "#/components/schemas/Sort" + }, + "properties": { + "field": { + "description": "Sort the search results by field like an property identifier." + }, + "order": { + "description": "Sort the search results of orders by ascending or descending." + }, + "naturalSorting": { + "description": "Sorting for special cases such as German letters with umlauts and similar characters etc." + } + } + }, + "aggregations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Aggregation" + } + }, + "fields": { + "type": "array", + "description": "Fields which should be returned in the search result.", + "items": { + "type": "string", + "description": "Name of a field" + } + }, + "grouping": { + "type": "array", + "description": "Perform groupings over certain fields", + "items": { + "type": "string", + "description": "Name of a field" + } + }, + "total-count-mode": { + "$ref": "#/components/schemas/TotalCountMode" + }, + "includes": { + "$ref": "#/components/schemas/Includes" + } + } + }, + "Associations": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Criteria" + } + }, + "Includes": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "Aggregation": { + "anyOf": [ + { + "$ref": "#/components/schemas/AggregationMetrics" + }, + { + "title": "AggregationEntity", + "allOf": [ + { + "$ref": "#/components/schemas/AggregationEntity" + }, + { + "$ref": "#/components/schemas/SubAggregations" + } + ] + }, + { + "title": "AggregationFilter", + "allOf": [ + { + "$ref": "#/components/schemas/AggregationFilter" + }, + { + "$ref": "#/components/schemas/SubAggregations" + } + ] + }, + { + "title": "AggregationTerms", + "allOf": [ + { + "$ref": "#/components/schemas/AggregationTerms" + }, + { + "$ref": "#/components/schemas/SubAggregations" + } + ] + }, + { + "title": "AggregationHistogram", + "allOf": [ + { + "$ref": "#/components/schemas/AggregationHistogram" + }, + { + "$ref": "#/components/schemas/SubAggregations" + } + ] + }, + { + "title": "AggregationRange", + "allOf": [ + { + "$ref": "#/components/schemas/AggregationRange" + }, + { + "$ref": "#/components/schemas/SubAggregations" + } + ] + } + ] + }, + "SubAggregations": { + "type": "object", "properties": { "aggregation": { "anyOf": [ @@ -12630,635 +13001,623 @@ }, "required": [ "type", - "field", - "value" + "field", + "value" + ] + }, + "MultiNotFilter": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "multi", + "not" + ] + }, + "operator": { + "type": "string", + "enum": [ + "and", + "or", + "nor", + "nand" + ] + }, + "queries": { + "$ref": "#/components/schemas/Filters" + } + }, + "required": [ + "type", + "operator", + "queries" + ] + }, + "RangeFilter": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "range" + ] + }, + "field": { + "type": "string" + }, + "parameters": { + "type": "object", + "properties": { + "gte": { + "type": "number" + }, + "gt": { + "type": "number" + }, + "lte": { + "type": "number" + }, + "lt": { + "type": "number" + } + } + } + }, + "required": [ + "type", + "field", + "parameters" + ] + }, + "CartItems": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LineItem" + }, + "properties": { + "id": { + "description": "Unique identity of cart item." + }, + "modified": { + "description": "When boolean value is `true`, the cart is said to be modified." + } + } + } + } + }, + "CartDeliveryPosition": { + "type": "object", + "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", + "properties": { + "deliveryDate": { + "type": "object", + "properties": { + "earliest": { + "type": "string", + "format": "date-time" + }, + "latest": { + "type": "string", + "format": "date-time" + } + } + }, + "identifier": { + "type": "string" + }, + "lineItem": { + "$ref": "#/components/schemas/LineItem" + }, + "price": { + "$ref": "#/components/schemas/CalculatedPrice" + } + } + }, + "AggregationEntity": { + "title": "AggregationEntity", + "type": "object", + "properties": { + "name": { + "description": "Give your aggregation an identifier, so you can find it easier", + "type": "string" + }, + "type": { + "description": "The type of aggregation", + "type": "string", + "enum": [ + "entity" + ] + }, + "field": { + "description": "The field you want to aggregate over.", + "type": "string" + }, + "definition": { + "description": "The entity definition e.g \"product_manufacturer\".", + "type": "string" + } + }, + "required": [ + "name", + "type", + "field", + "definition" + ] + }, + "AggregationFilter": { + "title": "AggregationFilter", + "type": "object", + "properties": { + "name": { + "description": "Give your aggregation an identifier, so you can find it easier", + "type": "string" + }, + "type": { + "description": "The type of aggregation", + "type": "string", + "enum": [ + "filter" + ] + }, + "filter": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Filters" + } + } + }, + "required": [ + "name", + "type", + "filter" + ] + }, + "AggregationTerms": { + "title": "AggregationTerms", + "type": "object", + "properties": { + "name": { + "description": "Give your aggregation an identifier, so you can find it easier", + "type": "string" + }, + "type": { + "description": "The type of aggregation", + "type": "string", + "enum": [ + "terms" + ] + }, + "field": { + "description": "The field you want to aggregate over.", + "type": "string" + }, + "limit": { + "description": "The number of terms to return", + "type": "number" + }, + "sort": { + "type": "array", + "description": "Sorting the aggregation result.", + "items": { + "$ref": "#/components/schemas/Sort" + } + } + }, + "required": [ + "name", + "type", + "field" ] }, - "MultiNotFilter": { + "AggregationHistogram": { + "title": "AggregationHistogram", "type": "object", "properties": { + "name": { + "description": "Give your aggregation an identifier, so you can find it easier", + "type": "string" + }, "type": { + "description": "The type of aggregation", "type": "string", "enum": [ - "multi", - "not" + "histogram" ] }, - "operator": { - "type": "string", - "enum": [ - "and", - "or", - "nor", - "nand" - ] + "field": { + "description": "The field you want to aggregate over.", + "type": "string" }, - "queries": { - "$ref": "#/components/schemas/Filters" + "interval": { + "description": "The interval of the histogram", + "type": "number" + }, + "format": { + "description": "The format of the histogram", + "type": "string" + }, + "timeZone": { + "description": "The timezone of the histogram", + "type": "string" } }, "required": [ + "name", "type", - "operator", - "queries" + "field" ] }, - "RangeFilter": { + "AggregationRange": { + "title": "AggregationRange", + "description": "For more information, see [Aggregations Reference > Range Aggregation](https://developer.shopware.com/docs/resources/references/core-reference/dal-reference/aggregations-reference.html#range-aggregations)", "type": "object", "properties": { + "name": { + "description": "Give your aggregation an identifier, so you can find it easier", + "type": "string" + }, "type": { + "description": "The type of aggregation", "type": "string", "enum": [ "range" ] }, "field": { + "description": "The field you want to aggregate over.", "type": "string" }, - "parameters": { - "type": "object", - "properties": { - "gte": { - "type": "number" - }, - "gt": { - "type": "number" - }, - "lte": { - "type": "number" - }, - "lt": { - "type": "number" - } + "ranges": { + "description": "The ranges of the aggregation", + "type": "array", + "items": { + "type": "object", + "anyOf": [ + { + "type": "object", + "title": "From and to", + "properties": { + "from": { + "type": "number", + "description": "The lower bound of the range" + }, + "to": { + "type": "number", + "description": "The upper bound of the range" + } + }, + "required": [ + "from", + "to" + ] + }, + { + "type": "object", + "title": "From only", + "properties": { + "from": { + "type": "string", + "description": "The lower bound of the range" + } + }, + "required": [ + "from" + ] + }, + { + "type": "object", + "title": "To only", + "properties": { + "to": { + "type": "string", + "description": "The upper bound of the range" + } + }, + "required": [ + "to" + ] + } + ] } } }, "required": [ + "name", "type", "field", - "parameters" + "ranges" ] }, - "CartPriceReference": { + "AccountNewsletterRecipient": { "type": "object", "properties": { - "purchaseUnit": { - "type": "number" - }, - "referenceUnit": { - "type": "number" - }, - "unitName": { - "type": "string" - }, - "price": { - "type": "number" - }, - "apiAlias": { + "status": { "type": "string", "enum": [ - "cart_price_reference" - ] - }, - "listPrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/CartListPrice" - }, - { - "type": "null" - } + "undefined", + "notSet", + "direct", + "optIn", + "optOut" ] }, - "regulationPrice": { - "type": "object", - "properties": { - "price": { - "type": "number" - }, - "apiAlias": { - "type": "string", - "enum": [ - "cart_regulation_price" - ] - } - }, - "nullable": true - }, - "hasRange": { - "type": "boolean" - }, - "variantId": { + "apiAlias": { "type": "string", - "format": "^[0-9a-f]{32}$", - "nullable": true + "enum": [ + "account_newsletter_recipient" + ] } }, "required": [ - "apiAlias", - "hasRange", - "regulationPrice", - "listPrice", - "calculatedTaxes", - "totalPrice", - "quantity", - "unitName" + "status", + "apiAlias" ] }, - "CartPriceQuantity": { + "CartListPrice": { "type": "object", + "description": "", "properties": { - "apiAlias": { - "type": "string", - "enum": [ - "cart_price_quantity" - ] - }, - "isCalculated": { - "type": "boolean" - }, - "listPrice": { - "$ref": "#/components/schemas/CartListPrice" - }, - "price": { + "discount": { "type": "number" }, - "quantity": { + "percentage": { "type": "number" }, - "regulationPrice": { - "properties": { - "price": { - "type": "number", - "format": "float" - } - }, - "type": "object" - }, - "taxRules": { - "type": "array", - "items": { - "type": "object", - "properties": { - "taxRate": { - "type": "number", - "format": "float" - }, - "name": { - "type": "string" - } - } - } - }, - "type": { - "type": "string" + "price": { + "type": "number" + }, + "apiAlias": { + "type": "string", + "enum": [ + "cart_list_price" + ] } }, "required": [ "apiAlias" ] }, - "LineItemType": { - "type": "string", - "enum": [ - "product", - "credit", - "custom", - "promotion", - "discount", - "container", - "quantity" - ] + "CrossSellingElementCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CrossSellingElement" + }, + "properties": { + "total": { + "description": "Number of cross selling elements found." + } + } }, - "LineItem": { + "CrossSellingElement": { "type": "object", "properties": { - "children": { + "crossSelling": { + "$ref": "#/components/schemas/ProductCrossSelling" + }, + "products": { "type": "array", "items": { - "$ref": "#/components/schemas/LineItem" + "$ref": "#/components/schemas/Product" } }, - "cover": { - "$ref": "#/components/schemas/ProductMedia" - }, - "dataContextHash": { - "type": "string" - }, - "dataTimestamp": { - "type": "string" - }, - "deliveryInformation": { - "$ref": "#/components/schemas/CartDeliveryInformation" + "total": { + "type": "integer", + "format": "int32" }, - "description": { + "streamId": { "type": "string", - "description": "Description of line items in an order." - }, - "good": { - "type": "boolean", - "description": "When set to true, it indicates the line item is physical else it is virtual." + "format": "uuid" }, - "id": { + "apiAlias": { "type": "string", - "description": "Unique identity of line item." - }, - "label": { + "enum": [ + "cross_selling_element" + ] + } + }, + "required": [ + "crossSelling", + "products", + "total", + "apiAlias" + ] + }, + "Price": { + "type": "object", + "description": "Price object", + "properties": { + "currencyId": { "type": "string", - "description": "It is a typical product name given to the line item." + "pattern": "^[0-9a-f]{32}$" }, - "modified": { - "type": "boolean", - "description": "When boolean value is `true`, line items are said to be modified." + "gross": { + "description": "", + "type": "number" }, - "modifiedByApp": { - "type": "boolean" + "net": { + "description": "", + "type": "number" }, - "payload": { - "$ref": "#/components/schemas/ProductJsonApi" + "linked": { + "description": "", + "type": "boolean" }, - "price": { + "listPrice": { + "description": "", "type": "object", "properties": { - "apiAlias": { + "currencyId": { "type": "string", - "enum": [ - "calculated_price" - ] - }, - "calculatedTaxes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "apiAlias": { - "type": "string", - "enum": [ - "cart_tax_calculated" - ] - }, - "tax": { - "type": "number" - }, - "taxRate": { - "type": "number" - }, - "price": { - "type": "number" - } - }, - "required": [ - "apiAlias", - "tax", - "taxRate", - "price" - ] - } - }, - "listPrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/CartListPrice" - }, - { - "type": "null" - } - ] - }, - "quantity": { - "type": "number" - }, - "referencePrice": { - "oneOf": [ - { - "$ref": "#/components/schemas/CartPriceReference" - }, - { - "type": "null" - } - ] - }, - "regulationPrice": { - "type": "object", - "properties": { - "price": { - "type": "number" - }, - "apiAlias": { - "type": "string", - "enum": [ - "cart_regulation_price" - ] - } - }, - "nullable": true + "pattern": "^[0-9a-f]{32}$" }, - "totalPrice": { + "gross": { + "description": "", "type": "number" }, - "unitPrice": { + "net": { + "description": "", "type": "number" }, - "taxRules": { - "type": "array", - "description": "Currently active tax rules and/or rates", - "items": { - "type": "object", - "properties": { - "taxRate": { - "type": "number", - "format": "float" - }, - "name": { - "type": "string" - } - } - } + "linked": { + "description": "", + "type": "boolean" } }, "required": [ - "apiAlias", - "totalPrice", - "quantity", - "unitPrice" + "gross", + "net" ] }, - "priceDefinition": { - "$ref": "#/components/schemas/CartPriceQuantity" - }, - "quantity": { - "type": "number", - "description": "Number of items of product." - }, - "quantityInformation": { + "regulationPrice": { + "description": "", "type": "object", "properties": { - "maxPurchase": { - "type": "number" + "currencyId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" }, - "minPurchase": { + "gross": { + "description": "", "type": "number" }, - "purchaseSteps": { - "type": "number" - } - } - }, - "referencedId": { - "type": "string", - "description": "Unique identity of type of entity." - }, - "removable": { - "type": "boolean", - "description": "Allows the line item to be removable from the cart when set to true." - }, - "stackable": { - "type": "boolean", - "description": "Allows to change the quantity of the line item when set to true." - }, - "states": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "is-physical", - "is-download" - ] - } - }, - "type": { - "$ref": "#/components/schemas/LineItemType", - "description": "Type refers to the entity type of an item whether it is product or promotion for instance." - }, - "uniqueIdentifier": { - "type": "string" + "net": { + "description": "", + "type": "number" + }, + "linked": { + "description": "", + "type": "boolean" + } + }, + "required": [ + "gross", + "net" + ] } }, "required": [ - "id", - "type" + "currencyId", + "gross", + "net" ] }, - "AggregationMetrics": { + "Breadcrumb": { "type": "object", "properties": { "name": { "type": "string" }, + "categoryId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, "type": { "type": "string", "enum": [ - "avg", - "count", - "max", - "min", - "stats", - "sum" + "page", + "link", + "folder" ] }, - "field": { - "type": "string" - } - }, - "required": [ - "name", - "type", - "field" - ] - }, - "CartError": { - "type": "object", - "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", - "properties": { - "items": { + "translated": { "type": "object", + "additionalProperties": true, "properties": { - "key": { - "type": "string" + "customFields": { + "type": "object" }, - "level": { - "type": "number", + "slotConfig": { + "type": "object" + }, + "linkType": { + "type": "string", "enum": [ - 0, - 10, - 20 - ], - "description": "* `0` - notice,\n* `10` - warning,\n* `20` - error" + "external", + "category", + "product", + "landing_page" + ] }, - "message": { + "internalLink": { "type": "string" }, - "messageKey": { + "externalLink": { + "type": "string" + }, + "linkNewTab": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "metaTitle": { + "type": "string" + }, + "metaDescription": { + "type": "string" + }, + "keywords": { "type": "string" } } - } - } - }, - "ProductDetailResponse": { - "type": "object", - "description": "Represents a product along with detailed information required to display a variant selection.", - "properties": { - "product": { - "$ref": "#/components/schemas/Product" }, - "configurator": { + "path": { + "type": "string" + }, + "seoUrls": { "type": "array", - "description": "List of property groups with their corresponding options and information on how to display them.", "items": { - "$ref": "#/components/schemas/PropertyGroup" + "$ref": "#/components/schemas/SeoUrl" } }, - "id": { - "description": "Unique identity of product detail response." - }, - "available": { - "description": "When boolean value is true, the product is available for purchase." - }, - "isCloseout": { - "description": "Boolean value to check if the product is still buyable when stock value is 0." - }, - "displayGroup": { - "description": "Internal field." - }, - "manufacturerNumber": { - "description": "Unique number of the product manufacturer." - }, - "stock": { - "description": "Quantity of product available." - }, - "sortedProperties": { - "description": "Properties of the product that are sorted" + "apiAlias": { + "type": "string", + "enum": [ + "breadcrumb" + ] } }, "required": [ - "product" + "name", + "categoryId", + "type", + "translated", + "path", + "apiAlias" ] }, - "NavigationRouteResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Category" - }, - "properties": { - "id": { - "description": "Unique identity of navigation route response." - } - } - }, - "Cart": { + "CartError": { "type": "object", + "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", "properties": { - "name": { - "description": "Name of the cart - for example `guest-cart`", - "type": "string" - }, - "token": { - "description": "Context token identifying the cart and the user session", - "type": "string" - }, - "price": { - "$ref": "#/components/schemas/CalculatedPrice" - }, - "lineItems": { - "description": "All items within the cart", - "type": "array", - "items": { - "$ref": "#/components/schemas/LineItem" - } - }, - "errors": { - "type": "array", - "description": "A list of all cart errors, such as insufficient stocks, invalid addresses or vouchers.", - "items": { - "$ref": "#/components/schemas/CartError" - }, + "items": { + "type": "object", "properties": { "key": { - "description": "Unique key for every message." - }, - "level": { - "description": "Types of level - Notice, warning and error. " + "type": "string" }, - "message": { - "description": "A persistent error passed from the shopping cart calculation processes to the user end." - } - } - }, - "deliveries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CartDelivery" - } - }, - "transactions": { - "description": "A list of all payment transactions associated with the current cart.", - "type": "array", - "items": { - "type": "object", - "properties": { - "paymentMethodId": { - "type": "string" - }, - "amount": { - "$ref": "#/components/schemas/CalculatedPrice" - } - } - }, - "properties": { - "paymentMethodId": { - "description": "Unique identity of payment method." - } - } - }, - "modified": { - "type": "boolean", - "description": "It signifies any changes to cart." - }, - "customerComment": { - "type": "string", - "description": "A comment that can be added to the cart.", - "nullable": true - }, - "affiliateCode": { - "type": "string", - "description": "An affiliate tracking code", - "nullable": true - }, - "campaignCode": { - "type": "string", - "description": "A campaign tracking code", - "nullable": true - }, - "id": { - "description": "Unique identity of cart." - } - } - }, - "AccountNewsletterRecipient": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "undefined", - "notSet", - "direct", - "optIn", - "optOut" - ] - }, - "apiAlias": { - "type": "string", - "enum": [ - "account_newsletter_recipient" - ] + "level": { + "type": "number", + "enum": [ + 0, + 10, + 20 + ], + "description": "* `0` - notice,\n* `10` - warning,\n* `20` - error" + }, + "message": { + "type": "string" + }, + "messageKey": { + "type": "string" + } + } } - }, - "required": [ - "status", - "apiAlias" - ] + } }, "OrderRouteResponse": { "type": "object", @@ -13288,22 +13647,6 @@ "orders" ] }, - "ProductListingFlags": { - "type": "object", - "description": "Additional flags for product listings", - "properties": { - "no-aggregations": { - "description": "Resets all aggregations in the criteria. This parameter is a flag, the value has no effect.", - "type": "string", - "nullable": true - }, - "only-aggregations": { - "description": "If this flag is set, no products are fetched. Sorting and associations are also ignored. This parameter is a flag, the value has no effect.", - "type": "string", - "nullable": true - } - } - }, "CartDeliveryInformation": { "type": "object", "properties": { @@ -13362,26 +13705,46 @@ "apiAlias" ] }, - "WishlistLoadRouteResponse": { + "CustomerAddressRead": { "type": "object", "properties": { - "wishlist": { - "type": "object", - "properties": { - "customerId": { - "type": "string", - "description": "Unique identity of the customer." - }, - "salesChannelId": { - "type": "string", - "description": "Unique identity of the sales channel." - } - } + "id": { + "type": "string", + "pattern": "^[0-9a-f]{32}$", + "readOnly": true }, - "products": { - "$ref": "#/components/schemas/ProductListingResult" + "customerId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$", + "readOnly": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "country": { + "$ref": "#/components/schemas/Country" + }, + "countryState": { + "$ref": "#/components/schemas/CountryState", + "nullable": true + }, + "salutation": { + "$ref": "#/components/schemas/Salutation" } - } + }, + "required": [ + "customerId", + "createdAt", + "updatedAt", + "country", + "salutation" + ] }, "ProductListingResult": { "allOf": [ @@ -13523,84 +13886,136 @@ } ] }, - "Price": { - "type": "object", - "description": "Price object", - "properties": { - "currencyId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "gross": { - "description": "", - "type": "number" - }, - "net": { - "description": "", - "type": "number" - }, - "linked": { - "description": "", - "type": "boolean" + "ProductListingCriteria": { + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" }, - "listPrice": { - "description": "", + { "type": "object", + "description": "Additional search parameters for product listings", "properties": { - "currencyId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "order": { + "description": "Specifies the sorting of the products by `availableSortings`. If not set, the default sorting will be set according to the shop settings. The available sorting options are sent within the response under the `availableSortings` key. In order to sort by a field, consider using the `sort` parameter from the listing criteria. Do not use both parameters together, as it might lead to unexpected results.", + "type": "string" }, - "gross": { - "description": "", - "type": "number" + "limit": { + "description": "Number of items per result page. If not set, the limit will be set according to the default products per page, defined in the system settings.", + "type": "integer", + "minimum": 0 }, - "net": { - "description": "", - "type": "number" + "p": { + "description": "Search result page", + "type": "integer", + "default": 1 }, - "linked": { - "description": "", - "type": "boolean" + "manufacturer": { + "description": "Filter by manufacturers. List of manufacturer identifiers separated by a `|`.", + "type": "string" + }, + "min-price": { + "description": "Filters by a minimum product price. Has to be lower than the `max-price` filter.", + "type": "integer", + "minimum": 0, + "default": 0 + }, + "max-price": { + "description": "Filters by a maximum product price. Has to be higher than the `min-price` filter.", + "type": "integer", + "minimum": 0, + "default": 0 + }, + "rating": { + "description": "Filter products with a minimum average rating.", + "type": "integer" + }, + "shipping-free": { + "description": "Filters products that are marked as shipping-free.", + "type": "boolean", + "default": false + }, + "properties": { + "description": "Filters products by their properties. List of property identifiers separated by a `|`.", + "type": "string" + }, + "manufacturer-filter": { + "description": "Enables/disabled filtering by manufacturer. If set to false, the `manufacturer` filter will be ignored. Also the `aggregations[manufacturer]` key will be removed from the response.", + "type": "boolean", + "default": true + }, + "price-filter": { + "description": "Enables/disabled filtering by price. If set to false, the `min-price` and `max-price` filter will be ignored. Also the `aggregations[price]` key will be removed from the response.", + "type": "boolean", + "default": true + }, + "rating-filter": { + "description": "Enables/disabled filtering by rating. If set to false, the `rating` filter will be ignored. Also the `aggregations[rating]` key will be removed from the response.", + "type": "boolean", + "default": true + }, + "shipping-free-filter": { + "description": "Enables/disabled filtering by shipping-free products. If set to false, the `shipping-free` filter will be ignored. Also the `aggregations[shipping-free]` key will be removed from the response.", + "type": "boolean", + "default": true + }, + "property-filter": { + "description": "Enables/disabled filtering by properties products. If set to false, the `properties` filter will be ignored. Also the `aggregations[properties]` key will be removed from the response.", + "type": "boolean", + "default": true + }, + "property-whitelist": { + "description": "A whitelist of property identifiers which can be used for filtering. List of property identifiers separated by a `|`. The `property-filter` must be `true`, otherwise the whitelist has no effect.", + "type": "string" + }, + "reduce-aggregations": { + "description": "By sending the parameter `reduce-aggregations` , the post-filters that were applied by the customer, are also applied to the aggregations. This has the consequence that only values are returned in the aggregations that would lead to further filter results. This parameter is a flag, the value has no effect.", + "type": "string", + "nullable": true } - }, - "required": [ - "gross", - "net" - ] + } + } + ], + "properties": { + "filter": { + "properties": { + "type": { + "description": "To filter the results and aggregations with filter types like ==, >=, etc." + }, + "field": { + "description": "To filter the results and aggregations by field like an property identifier." + }, + "value": { + "description": "To filter the results and aggregations by value." + } + } }, - "regulationPrice": { - "description": "", - "type": "object", + "sort": { "properties": { - "currencyId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "field": { + "description": "Sort the search results by field like an property identifier." }, - "gross": { - "description": "", - "type": "number" + "order": { + "description": "Sort the search results of orders by ascending or descending." }, - "net": { - "description": "", - "type": "number" + "naturalSorting": { + "description": "Sorting for special cases such as German letters with umlauts and similar characters etc." + } + } + }, + "post-filter": { + "properties": { + "type": { + "description": "To filter only the results but not the aggregations with filter types like ==, >=, etc." }, - "linked": { - "description": "", - "type": "boolean" + "field": { + "description": "To filter only the results but not the aggregations by field like an property identifier." + }, + "value": { + "description": "To filter only the results but not the aggregations by value." } - }, - "required": [ - "gross", - "net" - ] + } } - }, - "required": [ - "currencyId", - "gross", - "net" - ] + } }, "SalesChannelContext": { "type": "object", @@ -13986,491 +14401,68 @@ } }, "scope": { - "type": "string", - "description": "Scope defines if its related to system or user context." - }, - "source": { - "type": "string", - "description": "When context is related to user in the source, then there is userId." - }, - "taxState": { - "type": "string", - "description": "Tax state can either be `gross` or `net`." - }, - "useCache": { - "type": "boolean", - "description": "When boolean value is `true`, caching is used." - } - } - } - } - }, - "CartItems": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LineItem" - }, - "properties": { - "id": { - "description": "Unique identity of cart item." - }, - "modified": { - "description": "When boolean value is `true`, the cart is said to be modified." - } - } - } - } - }, - "CustomerAddressBody": { - "description": "Added since version: 6.0.0.0", - "required": [ - "countryId", - "firstName", - "lastName", - "city", - "street" - ], - "properties": { - "countryId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "countryStateId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "salutationId": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - }, - "zipcode": { - "type": "string" - }, - "city": { - "type": "string" - }, - "company": { - "type": "string" - }, - "street": { - "type": "string" - }, - "department": { - "type": "string" - }, - "title": { - "type": "string" - }, - "phoneNumber": { - "type": "string" - }, - "additionalAddressLine1": { - "type": "string" - }, - "additionalAddressLine2": { - "type": "string" - }, - "customFields": { - "type": "object" - }, - "country": { - "$ref": "#/components/schemas/Country" - }, - "countryState": { - "$ref": "#/components/schemas/CountryState" - }, - "salutation": { - "$ref": "#/components/schemas/Salutation" - } - }, - "type": "object" - }, - "CartListPrice": { - "type": "object", - "description": "", - "properties": { - "discount": { - "type": "number" - }, - "percentage": { - "type": "number" - }, - "price": { - "type": "number" - }, - "apiAlias": { - "type": "string", - "enum": [ - "cart_list_price" - ] - } - }, - "required": [ - "apiAlias" - ] - }, - "ProductListingCriteria": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" - }, - { - "type": "object", - "description": "Additional search parameters for product listings", - "properties": { - "order": { - "description": "Specifies the sorting of the products by `availableSortings`. If not set, the default sorting will be set according to the shop settings. The available sorting options are sent within the response under the `availableSortings` key. In order to sort by a field, consider using the `sort` parameter from the listing criteria. Do not use both parameters together, as it might lead to unexpected results.", - "type": "string" - }, - "limit": { - "description": "Number of items per result page. If not set, the limit will be set according to the default products per page, defined in the system settings.", - "type": "integer", - "minimum": 0 - }, - "p": { - "description": "Search result page", - "type": "integer", - "default": 1 - }, - "manufacturer": { - "description": "Filter by manufacturers. List of manufacturer identifiers separated by a `|`.", - "type": "string" - }, - "min-price": { - "description": "Filters by a minimum product price. Has to be lower than the `max-price` filter.", - "type": "integer", - "minimum": 0, - "default": 0 - }, - "max-price": { - "description": "Filters by a maximum product price. Has to be higher than the `min-price` filter.", - "type": "integer", - "minimum": 0, - "default": 0 - }, - "rating": { - "description": "Filter products with a minimum average rating.", - "type": "integer" - }, - "shipping-free": { - "description": "Filters products that are marked as shipping-free.", - "type": "boolean", - "default": false - }, - "properties": { - "description": "Filters products by their properties. List of property identifiers separated by a `|`.", - "type": "string" - }, - "manufacturer-filter": { - "description": "Enables/disabled filtering by manufacturer. If set to false, the `manufacturer` filter will be ignored. Also the `aggregations[manufacturer]` key will be removed from the response.", - "type": "boolean", - "default": true - }, - "price-filter": { - "description": "Enables/disabled filtering by price. If set to false, the `min-price` and `max-price` filter will be ignored. Also the `aggregations[price]` key will be removed from the response.", - "type": "boolean", - "default": true - }, - "rating-filter": { - "description": "Enables/disabled filtering by rating. If set to false, the `rating` filter will be ignored. Also the `aggregations[rating]` key will be removed from the response.", - "type": "boolean", - "default": true - }, - "shipping-free-filter": { - "description": "Enables/disabled filtering by shipping-free products. If set to false, the `shipping-free` filter will be ignored. Also the `aggregations[shipping-free]` key will be removed from the response.", - "type": "boolean", - "default": true - }, - "property-filter": { - "description": "Enables/disabled filtering by properties products. If set to false, the `properties` filter will be ignored. Also the `aggregations[properties]` key will be removed from the response.", - "type": "boolean", - "default": true - }, - "property-whitelist": { - "description": "A whitelist of property identifiers which can be used for filtering. List of property identifiers separated by a `|`. The `property-filter` must be `true`, otherwise the whitelist has no effect.", - "type": "string" - }, - "reduce-aggregations": { - "description": "By sending the parameter `reduce-aggregations` , the post-filters that were applied by the customer, are also applied to the aggregations. This has the consequence that only values are returned in the aggregations that would lead to further filter results. This parameter is a flag, the value has no effect.", - "type": "string", - "nullable": true - } - } - } - ], - "properties": { - "filter": { - "properties": { - "type": { - "description": "To filter the results and aggregations with filter types like ==, >=, etc." - }, - "field": { - "description": "To filter the results and aggregations by field like an property identifier." - }, - "value": { - "description": "To filter the results and aggregations by value." - } - } - }, - "sort": { - "properties": { - "field": { - "description": "Sort the search results by field like an property identifier." - }, - "order": { - "description": "Sort the search results of orders by ascending or descending." + "type": "string", + "description": "Scope defines if its related to system or user context." }, - "naturalSorting": { - "description": "Sorting for special cases such as German letters with umlauts and similar characters etc." - } - } - }, - "post-filter": { - "properties": { - "type": { - "description": "To filter only the results but not the aggregations with filter types like ==, >=, etc." + "source": { + "type": "string", + "description": "When context is related to user in the source, then there is userId." }, - "field": { - "description": "To filter only the results but not the aggregations by field like an property identifier." + "taxState": { + "type": "string", + "description": "Tax state can either be `gross` or `net`." }, - "value": { - "description": "To filter only the results but not the aggregations by value." + "useCache": { + "type": "boolean", + "description": "When boolean value is `true`, caching is used." } } } } }, - "AggregationEntity": { - "title": "AggregationEntity", - "type": "object", - "properties": { - "name": { - "description": "Give your aggregation an identifier, so you can find it easier", - "type": "string" - }, - "type": { - "description": "The type of aggregation", - "type": "string", - "enum": [ - "entity" - ] - }, - "field": { - "description": "The field you want to aggregate over.", - "type": "string" - }, - "definition": { - "description": "The entity definition e.g \"product_manufacturer\".", - "type": "string" - } - }, - "required": [ - "name", - "type", - "field", - "definition" - ] - }, - "AggregationFilter": { - "title": "AggregationFilter", + "WishlistLoadRouteResponse": { "type": "object", "properties": { - "name": { - "description": "Give your aggregation an identifier, so you can find it easier", - "type": "string" - }, - "type": { - "description": "The type of aggregation", - "type": "string", - "enum": [ - "filter" - ] - }, - "filter": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Filters" + "wishlist": { + "type": "object", + "properties": { + "customerId": { + "type": "string", + "description": "Unique identity of the customer." + }, + "salesChannelId": { + "type": "string", + "description": "Unique identity of the sales channel." + } } - } - }, - "required": [ - "name", - "type", - "filter" - ] - }, - "AggregationTerms": { - "title": "AggregationTerms", - "type": "object", - "properties": { - "name": { - "description": "Give your aggregation an identifier, so you can find it easier", - "type": "string" - }, - "type": { - "description": "The type of aggregation", - "type": "string", - "enum": [ - "terms" - ] - }, - "field": { - "description": "The field you want to aggregate over.", - "type": "string" - }, - "limit": { - "description": "The number of terms to return", - "type": "number" }, - "sort": { - "type": "array", - "description": "Sorting the aggregation result.", - "items": { - "$ref": "#/components/schemas/Sort" - } + "products": { + "$ref": "#/components/schemas/ProductListingResult" } - }, - "required": [ - "name", - "type", - "field" - ] + } }, - "AggregationHistogram": { - "title": "AggregationHistogram", + "Sitemap": { "type": "object", "properties": { - "name": { - "description": "Give your aggregation an identifier, so you can find it easier", - "type": "string" - }, - "type": { - "description": "The type of aggregation", + "filename": { "type": "string", - "enum": [ - "histogram" - ] - }, - "field": { - "description": "The field you want to aggregate over.", - "type": "string" - }, - "interval": { - "description": "The interval of the histogram", - "type": "number" - }, - "format": { - "description": "The format of the histogram", - "type": "string" - }, - "timeZone": { - "description": "The timezone of the histogram", - "type": "string" - } - }, - "required": [ - "name", - "type", - "field" - ] - }, - "AggregationRange": { - "title": "AggregationRange", - "description": "For more information, see [Aggregations Reference > Range Aggregation](https://developer.shopware.com/docs/resources/references/core-reference/dal-reference/aggregations-reference.html#range-aggregations)", - "type": "object", - "properties": { - "name": { - "description": "Give your aggregation an identifier, so you can find it easier", - "type": "string" + "description": "Name of the file which holds a list of all URL's." }, - "type": { - "description": "The type of aggregation", + "created": { "type": "string", - "enum": [ - "range" - ] - }, - "field": { - "description": "The field you want to aggregate over.", - "type": "string" - }, - "ranges": { - "description": "The ranges of the aggregation", - "type": "array", - "items": { - "type": "object", - "anyOf": [ - { - "type": "object", - "title": "From and to", - "properties": { - "from": { - "type": "number", - "description": "The lower bound of the range" - }, - "to": { - "type": "number", - "description": "The upper bound of the range" - } - }, - "required": [ - "from", - "to" - ] - }, - { - "type": "object", - "title": "From only", - "properties": { - "from": { - "type": "string", - "description": "The lower bound of the range" - } - }, - "required": [ - "from" - ] - }, - { - "type": "object", - "title": "To only", - "properties": { - "to": { - "type": "string", - "description": "The upper bound of the range" - } - }, - "required": [ - "to" - ] - } - ] - } + "format": "date-time" } }, "required": [ - "name", - "type", - "field", - "ranges" + "filename", + "created" ] }, - "NavigationType": { - "type": "string", - "enum": [ - "main-navigation", - "footer-navigation", - "service-navigation" - ] + "BreadcrumbCollection": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Breadcrumb" + } }, "AccountNewsletterRecipientResult": { "properties": { @@ -15130,30 +15122,6 @@ "204": { "description": "No Content" }, - "ContextTokenResponse": { - "description": "Returns the context token. Use that as your `sw-context-token` header for subsequent requests. Redirect if getRedirectUrl is set.", - "headers": { - "sw-context-token": { - "description": "Contains sw-context-token value", - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "redirectUrl": { - "description": "Define the URL which browser will be redirected to", - "type": "string" - } - } - } - } - } - }, "OpenApi3": { "description": "Returns information about the store API.", "content": { @@ -15342,6 +15310,30 @@ } } } + }, + "ContextTokenResponse": { + "description": "Returns the context token. Use that as your `sw-context-token` header for subsequent requests. Redirect if getRedirectUrl is set.", + "headers": { + "sw-context-token": { + "description": "Contains sw-context-token value", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "redirectUrl": { + "description": "Define the URL which browser will be redirected to", + "type": "string" + } + } + } + } + } } }, "parameters": { @@ -15387,63 +15379,25 @@ } ], "paths": { - "/customer-group-registration/config/{customerGroupId}": { - "get": { + "/navigation/{activeId}/{rootId}": { + "post": { "tags": [ - "Login & Registration" + "Category", + "Endpoints supporting Criteria " ], - "summary": "Fetch registration settings for customer group", - "operationId": "getCustomerGroupRegistrationInfo", + "summary": "Fetch a navigation menu", + "description": "This endpoint returns categories that can be used as a page navigation. You can either return them as a tree or as a flat list. You can also control the depth of the tree.\n\n Instead of passing uuids, you can also use one of the following aliases for the activeId and rootId parameters to get the respective navigations of your sales channel.\n\n * main-navigation\n * service-navigation\n * footer-navigation", + "operationId": "readNavigation", "parameters": [ { - "name": "customerGroupId", - "in": "path", - "description": "Customer group id", - "required": true, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "sw-language-id", + "name": "sw-include-seo-urls", "in": "header", - "description": "Instructs Shopware to return the response in the given language.", + "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item", "required": false, "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } - ], - "responses": { - "200": { - "description": "Returns the customer group including registration settings.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CustomerGroup" - } - } + "type": "boolean" } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/checkout/cart": { - "get": { - "tags": [ - "Cart" - ], - "summary": "Fetch or create a cart", - "description": "Used to fetch the current cart or for creating a new one.", - "operationId": "readCart", - "parameters": [ + }, { "name": "sw-language-id", "in": "header", @@ -15453,88 +15407,80 @@ "type": "string", "pattern": "^[0-9a-f]{32}$" } - } - ], - "responses": { - "200": { - "description": "Cart", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } - } - }, - "security": [ + }, { - "ApiKey": [] - } - ] - }, - "delete": { - "tags": [ - "Cart" - ], - "summary": "Delete a cart", - "description": "This route deletes the cart of the customer.", - "operationId": "deleteCart", - "responses": { - "204": { - "description": "Successfully deleted the cart", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "name": "activeId", + "in": "path", + "description": "Identifier of the active category in the navigation tree (if not used, just set to the same as rootId).", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + { + "$ref": "#/components/schemas/NavigationType" } - } + ] } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/checkout/cart/line-item": { - "post": { - "tags": [ - "Cart" - ], - "summary": "Add items to the cart", - "description": "This route adds items to the cart. An item can be a product or promotion for example. They are referenced by the `referencedId`-parameter.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#adding-new-items-to-the-cart)", - "operationId": "addLineItem", - "parameters": [ + }, { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, + "name": "rootId", + "in": "path", + "description": "Identifier of the root category for your desired navigation tree. You can use it to fetch sub-trees of your navigation tree.", + "required": true, "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "oneOf": [ + { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + { + "$ref": "#/components/schemas/NavigationType" + } + ] } } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CartItems" + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" + }, + { + "properties": { + "depth": { + "description": "Determines the depth of fetched navigation levels.", + "type": "integer", + "format": "int32" + }, + "buildTree": { + "description": "Return the categories as a tree or as a flat list.", + "type": "array", + "items": { + "type": "object" + } + } + }, + "type": "object" + } + ] } } } }, "responses": { "200": { - "description": "The updated cart.", + "description": "All available navigations", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Cart" + "$ref": "#/components/schemas/NavigationRouteResponse" } } } @@ -15545,50 +15491,43 @@ "ApiKey": [] } ] - }, - "delete": { + } + }, + "/newsletter/confirm": { + "post": { "tags": [ - "Cart" + "Newsletter" ], - "summary": "Remove items from the cart", - "description": "DEPRECATED: use removeLineItem instead. This route removes items from the cart and recalculates it.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#deleting-items-in-the-cart)", - "operationId": "removeLineItemDeprecated", - "deprecated": true, - "parameters": [ - { - "name": "ids", - "in": "query", - "description": "A list of product identifiers.", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "summary": "Confirm a newsletter registration", + "description": "You have to use the hash from the link sent out via email to confirm the user registration.", + "operationId": "confirmNewsletter", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "hash", + "em" + ], + "properties": { + "hash": { + "description": "Hash parameter from link the in the confirmation mail", + "type": "string" + }, + "em": { + "description": "Email hash parameter from the link in the confirmation mail", + "type": "string" + } + }, + "type": "object" } } - }, - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } } - ], + }, "responses": { "200": { - "description": "The updated cart.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } + "description": "The newsletter confirmation was successful." } }, "security": [ @@ -15596,45 +15535,86 @@ "ApiKey": [] } ] - }, - "patch": { + } + }, + "/newsletter/subscribe": { + "post": { "tags": [ - "Cart" - ], - "summary": "Update items in the cart", - "description": "This route updates items in the cart. A typical example is updating the quantity of an item.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#updating-items-in-the-cart)", - "operationId": "updateLineItem", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Newsletter" ], + "summary": "Create or remove a newsletter subscription", + "description": "This route is used to create/remove/confirm a newsletter subscription.\n\nThe `option` property controls what should happen:\n* `direct`: The subscription is directly active and does not need a confirmation.\n* `subscribe`: An email will be send to the provided email address containing a link to the /newsletter/confirm route.\nThe subscription is only successful, if the /newsletter/confirm route is called with the generated hashes.\n* `unsubscribe`: The email address will be removed from the newsletter subscriptions.\n* `confirmSubscribe`: Confirms the newsletter subscription for the provided email address.", + "operationId": "subscribeToNewsletter", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CartItems" + "required": [ + "email", + "option", + "storefrontUrl" + ], + "properties": { + "email": { + "description": "Email address that will receive the confirmation and the newsletter.", + "type": "string" + }, + "option": { + "description": "Defines what should be done.", + "type": "string" + }, + "storefrontUrl": { + "description": "Url of the storefront of the shop. This will be used for generating the link to the /newsletter/confirm inside the confirm email.", + "type": "string" + }, + "salutationId": { + "description": "Identifier of the salutation.", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "firstName": { + "description": "First name", + "type": "string" + }, + "lastName": { + "description": "Last name", + "type": "string" + }, + "street": { + "description": "Street", + "type": "string" + }, + "city": { + "description": "City", + "type": "string" + }, + "zipCode": { + "description": "Zip code", + "type": "string" + }, + "tags": { + "description": "Zip code", + "type": "string" + }, + "languageId": { + "description": "Identifier of the language.", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "customFields": { + "description": "Custom field data that should be added to the subscription.", + "type": "string" + } + }, + "type": "object" } } } }, "responses": { "200": { - "description": "The updated cart.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Cart" - } - } - } + "description": "Success" } }, "security": [ @@ -15644,43 +15624,26 @@ ] } }, - "/checkout/cart/line-item/delete": { + "/newsletter/unsubscribe": { "post": { "tags": [ - "Cart" - ], - "summary": "Remove items from the cart", - "description": "This route removes items from the cart and recalculates it.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#deleting-items-in-the-cart)", - "operationId": "removeLineItem", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Newsletter" ], + "summary": "Remove a newsletter subscription", + "description": "Removes a newsletter recipient from the mailing lists.", + "operationId": "unsubscribeToNewsletter", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "ids" + "email" ], "properties": { - "ids": { - "description": "A list of product identifiers.", - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } + "email": { + "description": "Email address that should be removed from the mailing lists.", + "type": "string" } }, "type": "object" @@ -15690,11 +15653,47 @@ }, "responses": { "200": { - "description": "The updated cart.", + "description": "Unsubscribing was successful." + } + }, + "security": [ + { + "ApiKey": [] + } + ] + } + }, + "/account/newsletter-recipient": { + "post": { + "tags": [ + "Profile", + "Newsletter", + "Endpoints supporting Criteria" + ], + "summary": "Fetch newsletter recipients", + "description": "Perform a filtered search for newsletter recipients.", + "operationId": "readNewsletterRecipient", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Cart" + "$ref": "#/components/schemas/AccountNewsletterRecipient" } } } @@ -15702,62 +15701,120 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/checkout/order": { + "/account/change-profile": { "post": { "tags": [ - "Order" - ], - "summary": "Create an order from a cart", - "description": "Creates a new order from the current cart and deletes the cart.\n\nIf you are using the [prepared payment flow](https://developer.shopware.com/docs/concepts/commerce/checkout-concept/payments#2.1-prepare-payment-optional), this endpoint also receives additional transaction details. The exact name of the parameters depends on the implementation of the corresponding *payment handler*.", - "operationId": "createOrder", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Profile" ], + "summary": "Change the customer's information", + "description": "Make changes to a customer's account, like changing their name, salutation or title.", + "operationId": "changeProfile", "requestBody": { - "description": "Contains additional metadata which is stored together with the order. It can also contain payment transaction details.", + "required": true, "content": { "application/json": { "schema": { + "type": "object", + "required": [ + "salutationId", + "firstName", + "lastName" + ], "properties": { - "customerComment": { - "description": "Adds a comment from the customer to the order.", + "salutationId": { + "description": "Id of the salutation for the customer account. Fetch options using `salutation` endpoint.", "type": "string" }, - "affiliateCode": { - "description": "The affiliate code can be used to track which referrer the customer came through. An example could be `Price-comparison-company-XY`.", + "title": { + "description": "(Academic) title of the customer", + "type": "string" + }, + "firstName": { + "description": "Customer first name. Value will be reused for shipping and billing address if not provided explicitly.", "type": "string" }, - "campaignCode": { - "description": "The campaign code is used to track which action the customer came from. An example could be `Summer-Deals`", - "type": "string" + "lastName": { + "description": "Customer last name. Value will be reused for shipping and billing address if not provided explicitly.", + "type": "string" + }, + "birthdayDay": { + "description": "Birthday day", + "type": "integer" + }, + "birthdayMonth": { + "description": "Birthday month", + "type": "integer" + }, + "birthdayYear": { + "description": "Birthday year", + "type": "integer" } }, - "type": "object" + "oneOf": [ + { + "properties": { + "accountType": { + "description": "Type of the customer account. Default value is 'private'.", + "type": "string", + "enum": [ + "private" + ], + "default": "private" + }, + "company": { + "type": "null" + }, + "vatIds": { + "type": "null" + } + } + }, + { + "required": [ + "accountType", + "company", + "vatIds" + ], + "properties": { + "accountType": { + "description": "Type of the customer account. Can be `private` or `business`.", + "type": "string", + "enum": [ + "business" + ] + }, + "company": { + "description": "Company of the customer. Only required when `accountType` is `business`.", + "type": "string" + }, + "vatIds": { + "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + } + } + ] } } } }, "responses": { "200": { - "description": "Order", + "description": "Returns a success response indicating a successful update", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Order" + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -15771,119 +15828,35 @@ ] } }, - "/checkout/gateway": { - "get": { - "tags": [ - "Gateway" - ], - "summary": "Call the checkout gateway", - "description": "Call the checkout gateway, which is used to manipulate certain aspects of the checkout process (e.g. available payment methods).", - "operationId": "checkoutGateway", - "responses": { - "200": { - "description": "Checkout gateway response", - "content": { - "application/json": { - "schema": { - "properties": { - "paymentMethods": { - "properties": { - "total": { - "description": "Total amount", - "type": "integer" - }, - "aggregations": { - "description": "aggregation result", - "type": "object" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethod" - } - } - }, - "type": "object" - }, - "shippingMethods": { - "properties": { - "total": { - "description": "Total amount", - "type": "integer" - }, - "aggregations": { - "description": "aggregation result", - "type": "object" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShippingMethod" - } - } - }, - "type": "object" - }, - "errors": { - "type": "array", - "items": { - "properties": { - "code": { - "description": "Error code", - "type": "string" - }, - "detail": { - "description": "Error detail", - "type": "string" - }, - "blocking": { - "description": "If the error is blocking", - "type": "boolean" - } - } - } - } - } - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/handle-payment": { + "/account/change-email": { "post": { "tags": [ - "Payment & Shipping" + "Profile" ], - "summary": "Initiate a payment for an order", - "description": "This generic endpoint is should be called to initiate a payment flow after an order has been created. The details of the payment flow can differ depending on the payment integration and might require calling additional operations or the setup of webhooks.\n\nThe endpoint internally calls the payment handler of the payment method currently set for the order.", - "operationId": "handlePaymentMethod", + "summary": "Change the customer's email address", + "description": "Changes a customer's email address to a new email address, using their current password as a validation.", + "operationId": "changeEmail", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "orderId" + "email", + "emailConfirmation", + "password" ], "properties": { - "orderId": { - "description": "Identifier of an order", - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "email": { + "description": "New email address. Has to be unique amongst all customers", + "type": "string" }, - "finishUrl": { - "description": "URL to which the client should be redirected after successful payment", + "emailConfirmation": { + "description": "Confirmation of the new email address.", "type": "string" }, - "errorUrl": { - "description": "URL to which the client should be redirected after erroneous payment", + "password": { + "description": "Customer's current password", "type": "string" } }, @@ -15894,19 +15867,11 @@ }, "responses": { "200": { - "description": "Redirect to external payment provider", + "description": "Returns a success response indicating a successful update", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "redirectUrl": { - "type": "string" - } - }, - "required": [ - "redirectUrl" - ] + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -15914,113 +15879,46 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/navigation/{activeId}/{rootId}": { - "post": { - "tags": [ - "Category", - "Endpoints supporting Criteria " - ], - "summary": "Fetch a navigation menu", - "description": "This endpoint returns categories that can be used as a page navigation. You can either return them as a tree or as a flat list. You can also control the depth of the tree.\n\n Instead of passing uuids, you can also use one of the following aliases for the activeId and rootId parameters to get the respective navigations of your sales channel.\n\n * main-navigation\n * service-navigation\n * footer-navigation", - "operationId": "readNavigation", - "parameters": [ - { - "name": "sw-include-seo-urls", - "in": "header", - "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "activeId", - "in": "path", - "description": "Identifier of the active category in the navigation tree (if not used, just set to the same as rootId).", - "required": true, - "schema": { - "oneOf": [ - { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - { - "$ref": "#/components/schemas/NavigationType" - } - ] - } - }, - { - "name": "rootId", - "in": "path", - "description": "Identifier of the root category for your desired navigation tree. You can use it to fetch sub-trees of your navigation tree.", - "required": true, - "schema": { - "oneOf": [ - { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - { - "$ref": "#/components/schemas/NavigationType" - } - ] - } - } + "/account/change-language": { + "post": { + "tags": [ + "Profile" ], + "summary": "Change the customer's language.", + "description": "Changes the language of the logged in customer", + "operationId": "changeLanguage", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" - }, - { - "properties": { - "depth": { - "description": "Determines the depth of fetched navigation levels.", - "type": "integer", - "format": "int32" - }, - "buildTree": { - "description": "Return the categories as a tree or as a flat list.", - "type": "array", - "items": { - "type": "object" - } - } - }, - "type": "object" + "required": [ + "languageId" + ], + "properties": { + "language": { + "description": "New languageId", + "type": "string" } - ] + }, + "type": "object" } } } }, "responses": { "200": { - "description": "All available navigations", + "description": "Returns a success response indicating a successful update", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NavigationRouteResponse" + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -16028,64 +15926,56 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/search-suggest": { + "/account/change-password": { "post": { "tags": [ - "Product" - ], - "summary": "Search for products (suggest)", - "description": "Can be used to implement search previews or suggestion listings, that don’t require any interaction.", - "operationId": "searchSuggest", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Profile" ], + "summary": "Change the customer's password", + "description": "Changes a customer's password using their current password as a validation.", + "operationId": "changePassword", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "allOf": [ - { - "required": [ - "search" - ], - "properties": { - "search": { - "description": "Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag.", - "type": "string" - } - }, - "type": "object" + "required": [ + "password", + "newPassword", + "newPasswordConfirm" + ], + "properties": { + "password": { + "description": "Current password of the customer", + "type": "string" }, - { - "$ref": "#/components/schemas/ProductListingFlags" + "newPassword": { + "description": "New Password for the customer", + "type": "string" + }, + "newPasswordConfirm": { + "description": "Confirmation of the new password", + "type": "string" } - ] + }, + "type": "object" } } } }, "responses": { "200": { - "description": "Returns a product listing containing all products and additional fields.\n\nNote: Aggregations, currentFilters and availableSortings are empty in this response. If you need them to display a listing, use the /search route instead.", + "description": "Returns a success response indicating a successful update.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProductListingResult" + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -16093,35 +15983,73 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/app-system/{name}/generate-token": { + "/account/change-payment-method/{paymentMethodId}": { "post": { "tags": [ - "App system" + "Profile" ], - "summary": "Generate JWT token for app system backend", - "description": "Generate JWT token for authenticated communication with the app server", - "operationId": "generateJWTAppSystemAppServer", + "summary": "Change the customer's default payment method", + "description": "Changes a customer's default (preselected) payment method.", + "operationId": "changePaymentMethod", "parameters": [ { + "name": "paymentMethodId", "in": "path", - "name": "name", + "description": "Identifier of the desired default payment method", "required": true, - "description": "Name of the app", "schema": { "type": "string" } } ], + "responses": { + "200": { + "description": "Returns a success response indicating a successful update.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/account/customer-recovery-is-expired": { + "post": { + "tags": [ + "Profile" + ], + "summary": "Checks if the customer recovery entry for a given hash is expired.", + "description": "This can be used to validate a provided hash has a valid and not expired customer recovery hash.", + "operationId": "getCustomerRecoveryIsExpired", "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { + "required": [ + "hash" + ], + "properties": { + "hash": { + "description": "Parameter from the link in the confirmation mail sent in Step 1", + "type": "string" + } + }, "type": "object" } } @@ -16129,20 +16057,30 @@ }, "responses": { "200": { - "description": "", + "description": "Returns a CustomerRecoveryIsExpiredResponse that indicates if the hash is expired or not.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "token": { - "type": "string" - }, - "expires": { - "type": "string", - "format": "date-time" + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "isExpired": { + "type": "boolean" + } + }, + "required": [ + "isExpired" + ] + } }, - "shopId": { + "apiAlias": { + "enum": [ + "array_struct" + ], "type": "string" } } @@ -16158,176 +16096,165 @@ ] } }, - "/cms/{id}": { + "/account/customer": { "post": { "tags": [ - "Content" + "Profile", + "Endpoints supporting Criteria " ], - "summary": "Fetch and resolve a CMS page", - "description": "Loads a content management page by its identifier and resolve the slot data. This could be media files, product listing and so on.\n\n**Important notice**\n\nThe criteria passed with this route also affects the listing, if there is one within the cms page.", - "operationId": "readCms", + "summary": "Get information about current customer", + "description": "Returns information about the current customer.", + "operationId": "readCustomer", + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Returns the logged in customer, also for guest sessions. Check for the value of `guest` field to see whether the customer is a guest.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + }, + "delete": { + "tags": [ + "Profile" + ], + "summary": "Delete the customer's profile", + "description": "Deletes a customer profile along with their addresses, wishlists and associated data. Created orders and their payment/shipping information (addresses) and reviews are not deleted.", + "operationId": "deleteCustomer", + "responses": { + "204": { + "description": "Returns a no content response indicating a successful removal of the customer profile" + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/account/address/{addressId}": { + "delete": { + "tags": [ + "Address" + ], + "summary": "Delete an address of a customer", + "description": "Delete an address of customer.\n\n Only addresses which are not set as default addresses for shipping or billing can be deleted. You can check the current default addresses of your customer using the profile information endpoint and change them using the default address endpoint.\n\n **A customer must have at least one address (which can be used for shipping and billing).**\n\n An automatic fallback is not applied.", + "operationId": "deleteCustomerAddress", "parameters": [ { - "name": "id", + "name": "addressId", "in": "path", - "description": "Identifier of the CMS page to be resolved", + "description": "ID of the address to be deleted.", "required": true, "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "properties": { - "slots": { - "description": "Resolves only the given slot identifiers. The identifiers have to be seperated by a `|` character.", - "type": "string" - } - }, - "type": "object" - }, - { - "$ref": "#/components/schemas/ProductListingCriteria" - } - ] - } - } - } - }, "responses": { - "200": { - "description": "The loaded cms page", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CmsPage" - } - } - } + "204": { + "description": "No Content response, when the address has been deleted" }, - "404": { - "$ref": "#/components/responses/404" + "400": { + "description": "Response containing a list of errors, most likely due to the address being in use" } }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] - } - }, - "/seo-url": { - "post": { + }, + "patch": { "tags": [ - "Sitemap & Routes", - "Endpoints supporting Criteria " + "Address" ], - "summary": "Fetch SEO routes", - "description": "Perform a filtered search for seo urls.", - "operationId": "readSeoUrl", + "summary": "Modify an address of a customer", + "description": "Modifies an existing address of a customer.", + "operationId": "updateCustomerAddress", "parameters": [ { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, + "name": "addressId", + "in": "path", + "description": "Address ID", + "required": true, "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "type": "string" } } ], "requestBody": { - "required": false, "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" - } - ] + "$ref": "#/components/schemas/CustomerAddressBody" } } } }, "responses": { "200": { - "description": "Entity search result containing seo urls.", + "description": "", "content": { "application/json": { "schema": { "allOf": [ { - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SeoUrl" - } - } - }, - "type": "object", - "required": [ - "elements" - ] + "$ref": "#/components/schemas/CustomerAddress" }, { - "$ref": "#/components/schemas/EntitySearchResult" + "$ref": "#/components/schemas/CustomerAddressRead" } ] } } } - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/currency": { + "/account/list-address": { "post": { "tags": [ - "System & Context", + "Address", "Endpoints supporting Criteria " ], - "summary": "Fetch currencies", - "description": "Perform a filtered search for currencies.", - "operationId": "readCurrency", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } - ], + "summary": "Fetch addresses of a customer", + "description": "Lists all addresses of the current customer and allows filtering them based on a criteria.", + "operationId": "listAddress", "requestBody": { "required": false, "content": { @@ -16344,26 +16271,14 @@ }, "responses": { "200": { - "description": "Entity search result containing currencies.", + "description": "", "content": { "application/json": { "schema": { - "allOf": [ - { - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Currency" - } - } - }, - "type": "object" - }, - { - "$ref": "#/components/schemas/EntitySearchResult" - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomerAddress" + } } } } @@ -16371,35 +16286,36 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/newsletter/confirm": { + "/account/login": { "post": { "tags": [ - "Newsletter" + "Login & Registration" ], - "summary": "Confirm a newsletter registration", - "description": "You have to use the hash from the link sent out via email to confirm the user registration.", - "operationId": "confirmNewsletter", + "summary": "Log in a customer", + "description": "Logs in customers given their credentials.", + "operationId": "loginCustomer", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "hash", - "em" + "username", + "password" ], "properties": { - "hash": { - "description": "Hash parameter from link the in the confirmation mail", + "username": { + "description": "Email", "type": "string" }, - "em": { - "description": "Email hash parameter from the link in the confirmation mail", + "password": { + "description": "Password", "type": "string" } }, @@ -16410,7 +16326,17 @@ }, "responses": { "200": { - "description": "The newsletter confirmation was successful." + "$ref": "#/components/responses/ContextTokenResponse" + }, + "401": { + "description": "If credentials are incorrect an error is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/failure" + } + } + } } }, "security": [ @@ -16420,73 +16346,35 @@ ] } }, - "/newsletter/subscribe": { + "/account/login/imitate-customer": { "post": { "tags": [ - "Newsletter" + "Login & Registration" ], - "summary": "Create or remove a newsletter subscription", - "description": "This route is used to create/remove/confirm a newsletter subscription.\n\nThe `option` property controls what should happen:\n* `direct`: The subscription is directly active and does not need a confirmation.\n* `subscribe`: An email will be send to the provided email address containing a link to the /newsletter/confirm route.\nThe subscription is only successful, if the /newsletter/confirm route is called with the generated hashes.\n* `unsubscribe`: The email address will be removed from the newsletter subscriptions.\n* `confirmSubscribe`: Confirms the newsletter subscription for the provided email address.", - "operationId": "subscribeToNewsletter", + "summary": "Imitate the log in as a customer", + "description": "Imitate the log in as a customer given a generated token.", + "operationId": "imitateCustomerLogin", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "email", - "option", - "storefrontUrl" + "token", + "customerId", + "userId" ], "properties": { - "email": { - "description": "Email address that will receive the confirmation and the newsletter.", - "type": "string" - }, - "option": { - "description": "Defines what should be done.", - "type": "string" - }, - "storefrontUrl": { - "description": "Url of the storefront of the shop. This will be used for generating the link to the /newsletter/confirm inside the confirm email.", - "type": "string" - }, - "salutationId": { - "description": "Identifier of the salutation.", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "firstName": { - "description": "First name", - "type": "string" - }, - "lastName": { - "description": "Last name", - "type": "string" - }, - "street": { - "description": "Street", - "type": "string" - }, - "city": { - "description": "City", - "type": "string" - }, - "zipCode": { - "description": "Zip code", - "type": "string" - }, - "tags": { - "description": "Zip code", + "token": { + "description": "Generated customer impersonation token", "type": "string" }, - "languageId": { - "description": "Identifier of the language.", - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "customerId": { + "description": "ID of the customer", + "type": "string" }, - "customFields": { - "description": "Custom field data that should be added to the subscription.", + "userId": { + "description": "ID of the user who generated the token", "type": "string" } }, @@ -16497,7 +16385,17 @@ }, "responses": { "200": { - "description": "Success" + "$ref": "#/components/responses/ContextTokenResponse" + }, + "400": { + "description": "If the token is incorrect an error is returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/failure" + } + } + } } }, "security": [ @@ -16507,25 +16405,54 @@ ] } }, - "/newsletter/unsubscribe": { + "/account/logout": { "post": { "tags": [ - "Newsletter" + "Login & Registration" ], - "summary": "Remove a newsletter subscription", - "description": "Removes a newsletter recipient from the mailing lists.", - "operationId": "unsubscribeToNewsletter", + "summary": "Log out a customer", + "description": "Logs out a customer.", + "operationId": "logoutCustomer", + "responses": { + "200": { + "$ref": "#/components/responses/ContextTokenResponse" + }, + "403": { + "$ref": "#/components/responses/403" + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/account/register-confirm": { + "post": { + "tags": [ + "Login & Registration" + ], + "summary": "Confirm a customer registration", + "description": "Confirms a customer registration when double opt-in is activated.\n\nLearn more about double opt-in registration in our guide \"Register a customer\".", + "operationId": "registerConfirm", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "email" + "hash", + "em" ], "properties": { - "email": { - "description": "Email address that should be removed from the mailing lists.", + "hash": { + "description": "Hash from the email received", + "type": "string" + }, + "em": { + "description": "Email hash from the email received", "type": "string" } }, @@ -16536,7 +16463,13 @@ }, "responses": { "200": { - "description": "Unsubscribing was successful." + "description": "Returns the logged in customer. The customer is automatically logged in with the `sw-context-token` header provided, which can be reused for subsequent requests." + }, + "404": { + "description": "No hash provided" + }, + "412": { + "description": "The customer has already been confirmed" } }, "security": [ @@ -16546,79 +16479,154 @@ ] } }, - "/shipping-method": { + "/account/register": { "post": { "tags": [ - "Payment & Shipping", - "Endpoints supporting Criteria " - ], - "summary": "Fetch shipping methods", - "description": "Perform a filtered search for shipping methods.", - "operationId": "readShippingMethod", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "onlyAvailable", - "in": "query", - "description": "List only available shipping methods. This filters shipping methods methods which can not be used in the actual context because of their availability rule.", - "schema": { - "type": "boolean" - } - } + "Login & Registration" ], + "summary": "Register a customer", + "description": "Registers a customer. Used both for normal customers and guest customers.See the Guide \"Register a customer\" for more information on customer registration.", + "operationId": "register", "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" + "properties": { + "email": { + "description": "Email of the customer. Has to be unique, unless `guest` is `true`", + "type": "string" + }, + "password": { + "description": "Password for the customer. Required, unless `guest` is `true`", + "type": "string" + }, + "salutationId": { + "description": "Id of the salutation for the customer account. Fetch options using `salutation` endpoint.", + "type": "string" + }, + "firstName": { + "description": "Customer first name. Value will be reused for shipping and billing address if not provided explicitly.", + "type": "string" + }, + "lastName": { + "description": "Customer last name. Value will be reused for shipping and billing address if not provided explicitly.", + "type": "string" + }, + "acceptedDataProtection": { + "description": "Flag indicating accepted data protection", + "type": "boolean" + }, + "storefrontUrl": { + "description": "URL of the storefront for that registration. Used in confirmation emails. Has to be one of the configured domains of the sales channel.", + "type": "string" + }, + "billingAddress": { + "$ref": "#/components/schemas/CustomerAddress" + }, + "shippingAddress": { + "$ref": "#/components/schemas/CustomerAddress" + }, + "guest": { + "description": "If set, will create a guest customer. Guest customers can re-use an email address and don't need a password.", + "type": "boolean", + "default": false + }, + "birthdayDay": { + "description": "Birthday day", + "type": "integer" + }, + "birthdayMonth": { + "description": "Birthday month", + "type": "integer" + }, + "birthdayYear": { + "description": "Birthday year", + "type": "integer" + }, + "title": { + "description": "(Academic) title of the customer", + "type": "string" + }, + "affiliateCode": { + "description": "Field can be used to store an affiliate tracking code", + "type": "string" + }, + "campaignCode": { + "description": "Field can be used to store a campaign tracking code", + "type": "string" } - ] - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "properties": { - "total": { - "description": "Total amount", - "type": "integer" - }, - "aggregations": { - "description": "aggregation result", - "type": "object" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ShippingMethod" - } - } + }, + "required": [ + "email", + "password", + "salutationId", + "firstName", + "lastName", + "acceptedDataProtection", + "storefrontUrl", + "billingAddress" + ], + "oneOf": [ + { + "properties": { + "accountType": { + "description": "Type of the customer account. Default value is 'private'.", + "type": "string", + "enum": [ + "private" + ], + "default": "private" }, - "type": "object" - }, - { - "$ref": "#/components/schemas/EntitySearchResult" + "company": { + "type": "null" + }, + "vatIds": { + "type": "null" + } + } + }, + { + "required": [ + "accountType", + "company", + "vatIds" + ], + "properties": { + "accountType": { + "description": "Type of the customer account. Can be `private` or `business`.", + "type": "string", + "enum": [ + "business" + ] + }, + "company": { + "description": "Company of the customer. Only required when `accountType` is `business`.", + "type": "string" + }, + "vatIds": { + "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } } - ] + } + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" } } } @@ -16631,66 +16639,50 @@ ] } }, - "/language": { + "/account/recovery-password-confirm": { "post": { "tags": [ - "System & Context", - "Endpoints supporting Criteria " - ], - "summary": "Fetch languages", - "description": "Perform a filtered search for languages.", - "operationId": "readLanguages", - "parameters": [ - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Profile" ], + "summary": "Reset a password with recovery credentials", + "description": "This operation is Step 2 of the password reset flow. It is required to conduct Step 1 \"Send a password recovery mail\" in order to obtain the required credentials for this step.Resets a customer's password using credentials from a password recovery mail as a validation.", + "operationId": "recoveryPassword", "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" + "required": [ + "hash", + "newPassword", + "newPasswordConfirm" + ], + "properties": { + "hash": { + "description": "Parameter from the link in the confirmation mail sent in Step 1", + "type": "string" + }, + "newPassword": { + "description": "New password for the customer", + "type": "string" + }, + "newPasswordConfirm": { + "description": "Confirmation of the new password", + "type": "string" } - ] + }, + "type": "object" } } } }, "responses": { "200": { - "description": "Entity search result containing languages.", + "description": "Returns a success response indicating a successful update.", "content": { "application/json": { "schema": { - "allOf": [ - { - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Language" - } - } - }, - "required": [ - "elements" - ], - "type": "object" - }, - { - "$ref": "#/components/schemas/EntitySearchResult" - } - ] + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -16703,72 +16695,45 @@ ] } }, - "/country-state/{countryId}": { + "/account/recovery-password": { "post": { "tags": [ - "System & Context", - "Endpoints supporting Criteria " - ], - "summary": "Fetch the states of a country", - "description": "Perform a filtered search the states for a country", - "operationId": "readCountryState", - "parameters": [ - { - "name": "countryId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Profile" ], + "summary": "Send a password recovery mail", + "description": "This operation is Step 1 of the password reset flow. Make sure to implement Step 2 \"Reset password with recovery credentials\" in order to allow for the complete flow in your application. Sends a recovery mail containing a link with credentials that allows a customer to reset their password.", + "operationId": "sendRecoveryMail", "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" + "required": [ + "email", + "storefrontUrl" + ], + "properties": { + "email": { + "description": "E-Mail address to identify the customer", + "type": "string" + }, + "storefrontUrl": { + "description": "URL of the storefront to use for the generated reset link. It has to be a domain that is configured in the sales channel domain settings.", + "type": "string" } - ] + }, + "type": "object" } } } }, "responses": { "200": { - "description": "Entity search result containing countries.", + "description": "If email corresponds to an existing customer, a mail will be sent out to that customer containing a link assembled using the following schema:\n\nReturns a success indicating a successful initialisation of the reset flow.", "content": { "application/json": { "schema": { - "allOf": [ - { - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CountryState" - } - } - }, - "type": "object" - }, - { - "$ref": "#/components/schemas/EntitySearchResult" - } - ] + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -16781,27 +16746,51 @@ ] } }, - "/product-export/{accessKey}/{fileName}": { - "get": { + "/account/address/default-shipping/{addressId}": { + "patch": { "tags": [ - "Product" + "Address" ], - "summary": "Export product export", - "operationId": "readProductExport", + "summary": "Change a customer's default shipping address", + "description": "Updates the default (preselected) shipping addresses of a customer.", + "operationId": "defaultShippingAddress", "parameters": [ { - "name": "accessKey", + "name": "addressId", "in": "path", - "description": "Access Key", + "description": "Address ID", "required": true, "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "description": "" + } + }, + "security": [ { - "name": "fileName", + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/account/address/default-billing/{addressId}": { + "patch": { + "tags": [ + "Address" + ], + "summary": "Change a customer's default billing address", + "description": "Updates the default (preselected) billing addresses of a customer.", + "operationId": "defaultBillingAddress", + "parameters": [ + { + "name": "addressId", "in": "path", - "description": "File Name", + "description": "Address ID", "required": true, "schema": { "type": "string" @@ -16815,20 +16804,65 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/salutation": { + "/account/address": { + "post": { + "tags": [ + "Address" + ], + "summary": "Create a new address for a customer", + "description": "Creates a new address for a customer.", + "operationId": "createCustomerAddress", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerAddress" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/CustomerAddress" + }, + { + "$ref": "#/components/schemas/CustomerAddressRead" + } + ] + } + } + } + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/currency": { "post": { "tags": [ "System & Context", "Endpoints supporting Criteria " ], - "summary": "Fetch salutations", - "description": "Fetches salutations with a criteria obj.", - "operationId": "readSalutation", + "summary": "Fetch currencies", + "description": "Perform a filtered search for currencies.", + "operationId": "readCurrency", "parameters": [ { "name": "sw-language-id", @@ -16857,7 +16891,7 @@ }, "responses": { "200": { - "description": "Entity search result containing salutations.", + "description": "Entity search result containing currencies.", "content": { "application/json": { "schema": { @@ -16867,7 +16901,7 @@ "elements": { "type": "array", "items": { - "$ref": "#/components/schemas/Salutation" + "$ref": "#/components/schemas/Currency" } } }, @@ -16889,14 +16923,15 @@ ] } }, - "/sitemap": { - "get": { + "/shipping-method": { + "post": { "tags": [ - "Sitemap & Routes" + "Payment & Shipping", + "Endpoints supporting Criteria " ], - "summary": "Fetch sitemaps", - "description": "Fetches a list of compressed sitemap files, which are often used by search engines.", - "operationId": "readSitemap", + "summary": "Fetch shipping methods", + "description": "Perform a filtered search for shipping methods.", + "operationId": "readShippingMethod", "parameters": [ { "name": "sw-language-id", @@ -16907,18 +16942,60 @@ "type": "string", "pattern": "^[0-9a-f]{32}$" } + }, + { + "name": "onlyAvailable", + "in": "query", + "description": "List only available shipping methods. This filters shipping methods methods which can not be used in the actual context because of their availability rule.", + "schema": { + "type": "boolean" + } } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" + } + ] + } + } + } + }, "responses": { "200": { - "description": "Returns a list of available sitemaps.", + "description": "", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Sitemap" - } + "allOf": [ + { + "properties": { + "total": { + "description": "Total amount", + "type": "integer" + }, + "aggregations": { + "description": "aggregation result", + "type": "object" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShippingMethod" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] } } } @@ -16931,23 +17008,23 @@ ] } }, - "/sitemap/{filePath}": { - "get": { + "/country-state/{countryId}": { + "post": { "tags": [ - "Sitemap & Routes" + "System & Context", + "Endpoints supporting Criteria " ], - "summary": "Download sitemap file", - "description": "Downloads the sitemap file from the configured sitemap storage.", - "operationId": "getSitemapFile", + "summary": "Fetch the states of a country", + "description": "Perform a filtered search the states for a country", + "operationId": "readCountryState", "parameters": [ { - "name": "filePath", + "name": "countryId", "in": "path", - "description": "The path to the sitemap file", "required": true, "schema": { "type": "string", - "pattern": ".*\\.(xml|gz)$" + "pattern": "^[0-9a-f]{32}$" } }, { @@ -16961,156 +17038,42 @@ } } ], - "responses": { - "200": { - "description": "Returns the blob to download.", - "content": { - "application/xml": { - "schema": { - "type": "string", - "format": "binary" - } - }, - "application/gzip": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/context": { - "get": { - "tags": [ - "System & Context" - ], - "summary": "Fetch the current context", - "description": "Fetches the current context. This includes for example the `customerGroup`, `currency`, `taxRules` and many more.", - "operationId": "readContext", - "responses": { - "200": { - "description": "Returns the current context.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SalesChannelContext" - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "patch": { - "tags": [ - "System & Context" - ], - "summary": "Modify the current context", - "description": "Used for switching the context. A typical example would be changing the language or changing the currency.", - "operationId": "updateContext", "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { - "properties": { - "currencyId": { - "description": "Currency", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "languageId": { - "description": "Language", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "billingAddressId": { - "description": "Billing Address", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "shippingAddressId": { - "description": "Shipping Address", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "paymentMethodId": { - "description": "Payment Method", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "shippingMethodId": { - "description": "Shipping Method", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "countryId": { - "description": "Country", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "countryStateId": { - "description": "Country State", - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" } - }, - "type": "object" + ] } } } }, "responses": { "200": { - "$ref": "#/components/responses/ContextTokenResponse" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/customer/wishlist/add/{productId}": { - "post": { - "tags": [ - "Wishlist" - ], - "summary": "Add a product to a wishlist", - "description": "Adds a product to a customers wishlist.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * The wishlist feature has to be activated.", - "operationId": "addProductOnWishlist", - "parameters": [ - { - "name": "productId", - "in": "path", - "description": "Identifier of the product to be added.", - "required": true, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } - ], - "responses": { - "200": { - "description": "Returns a success response.", + "description": "Entity search result containing countries.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "allOf": [ + { + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CountryState" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] } } } @@ -17118,21 +17081,19 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/customer/wishlist": { + "/payment-method": { "post": { "tags": [ - "Wishlist", + "Payment Method", "Endpoints supporting Criteria " ], - "summary": "Fetch a wishlist", - "description": "Fetch a customer's wishlist. Products on the wishlist can be filtered using a criteria object.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * The wishlist feature has to be activated.", - "operationId": "readCustomerWishlist", + "summary": "Loads all available payment methods", + "operationId": "readPaymentMethod", "parameters": [ { "name": "sw-language-id", @@ -17146,13 +17107,22 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Criteria" + }, + { + "properties": { + "onlyAvailable": { + "description": "List only available", + "type": "boolean" + } + }, + "type": "object" } ] } @@ -17165,7 +17135,23 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WishlistLoadRouteResponse" + "properties": { + "total": { + "description": "Total amount", + "type": "integer" + }, + "aggregations": { + "description": "aggregation result", + "type": "object" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } + } + }, + "type": "object" } } } @@ -17173,48 +17159,64 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/customer/wishlist/merge": { + "/search-suggest": { "post": { "tags": [ - "Wishlist" + "Product" + ], + "summary": "Search for products (suggest)", + "description": "Can be used to implement search previews or suggestion listings, that don’t require any interaction.", + "operationId": "searchSuggest", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Create a wishlist for a customer", - "description": "Create a new wishlist for a logged in customer or extend the existing wishlist given a set of products.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * A customer can only have a single wishlist.\n * The wishlist feature has to be activated.", - "operationId": "mergeProductOnWishlist", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "properties": { - "productIds": { - "description": "List product id", - "type": "array", - "items": { - "description": "product id", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } + "allOf": [ + { + "required": [ + "search" + ], + "properties": { + "search": { + "description": "Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag.", + "type": "string" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/ProductListingFlags" } - }, - "type": "object" + ] } } } }, "responses": { "200": { - "description": "Returns a success response.", + "description": "Returns a product listing containing all products and additional fields.\n\nNote: Aggregations, currentFilters and availableSortings are empty in this response. If you need them to display a listing, use the /search route instead.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "$ref": "#/components/schemas/ProductListingResult" } } } @@ -17222,153 +17224,50 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/customer/wishlist/delete/{productId}": { - "delete": { + "/customer-group-registration/config/{customerGroupId}": { + "get": { "tags": [ - "Wishlist" + "Login & Registration" ], - "summary": "Remove a product from a wishlist", - "description": "Removes a product from a customer's wishlist.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * The wishlist feature has to be activated.", - "operationId": "deleteProductOnWishlist", + "summary": "Fetch registration settings for customer group", + "operationId": "getCustomerGroupRegistrationInfo", "parameters": [ { - "name": "productId", + "name": "customerGroupId", "in": "path", - "description": "The identifier of the product to be removed from the wishlist.", + "description": "Customer group id", "required": true, "schema": { "type": "string", "pattern": "^[0-9a-f]{32}$" } - } - ], - "responses": { - "200": { - "description": "Returns a success response indicating a successful removal.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessResponse" - } - } - } - }, - "404": { - "description": "The removal of the product failed. Probably because the product could not be found on the wishlist.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/failure" - } - } - } - } - }, - "security": [ - { - "ApiKey": [], - "ContextToken": [] - } - ] - } - }, - "/script/{hook}": { - "get": { - "tags": [ - "API", - "Script", - "App" - ], - "summary": "Access point for different api logics which are provided by apps over script hooks", - "operationId": "getScriptStoreApiRoute", - "parameters": [ - { - "name": "hook", - "in": "path", - "description": "Dynamic hook which used to build the hook name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Returns different structures of results based on the called script.", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": true, - "nullable": true - } - }, - "application/vnd.api+json": { - "schema": { - "type": "object", - "additionalProperties": true, - "nullable": true - } - } - } }, - "204": { - "description": "No data by default" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - }, - "post": { - "tags": [ - "API", - "Script", - "App" - ], - "summary": "Access point for different api logics which are provided by apps over script hooks", - "operationId": "postScriptStoreApiRoute", - "parameters": [ { - "name": "hook", - "in": "path", - "description": "Dynamic hook which used to build the hook name", - "required": true, + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, "schema": { - "type": "string" + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } ], "responses": { "200": { - "description": "Returns different structures of results based on the called script.", + "description": "Returns the customer group including registration settings.", "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true, - "nullable": true - } - }, - "application/vnd.api+json": { - "schema": { - "type": "object", - "additionalProperties": true, - "nullable": true + "$ref": "#/components/schemas/CustomerGroup" } } } - }, - "204": { - "description": "No data by default" } }, "security": [ @@ -17378,14 +17277,15 @@ ] } }, - "/order/state/cancel": { + "/country": { "post": { "tags": [ - "Order" + "System & Context", + "Endpoints supporting Criteria " ], - "summary": "Cancel an order", - "description": "Cancels an order. The order state will be set to 'cancelled'.", - "operationId": "cancelOrder", + "summary": "Fetch countries", + "description": "Perform a filtered search for countries", + "operationId": "readCountry", "parameters": [ { "name": "sw-language-id", @@ -17399,20 +17299,14 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { - "properties": { - "orderId": { - "description": "The identifier of the order to be canceled.", - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" } - }, - "type": "object", - "required": [ - "orderId" ] } } @@ -17420,11 +17314,26 @@ }, "responses": { "200": { - "description": "Returns the state of the state machine\n\n example: More information about the state machine can be found in the corresponding guide: [Using the state machine](https://developer.shopware.com/docs/guides/plugins/plugins/checkout/order/using-the-state-machine)", + "description": "Entity search result containing countries.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/StateMachineState" + "allOf": [ + { + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Country" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] } } } @@ -17432,21 +17341,20 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/order": { + "/salutation": { "post": { "tags": [ - "Order", + "System & Context", "Endpoints supporting Criteria " ], - "summary": "Fetch a list of orders", - "description": "List orders of a customer.", - "operationId": "readOrder", + "summary": "Fetch salutations", + "description": "Fetches salutations with a criteria obj.", + "operationId": "readSalutation", "parameters": [ { "name": "sw-language-id", @@ -17460,22 +17368,13 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Criteria" - }, - { - "properties": { - "checkPromotion": { - "description": "Check if the payment method of the order is still changeable.", - "type": "boolean" - } - }, - "type": "object" } ] } @@ -17484,11 +17383,26 @@ }, "responses": { "200": { - "description": "An array of orders and an indicator if the payment of the order can be changed.", + "description": "Entity search result containing salutations.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrderRouteResponse" + "allOf": [ + { + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Salutation" + } + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] } } } @@ -17496,20 +17410,20 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/order/payment": { + "/seo-url": { "post": { "tags": [ - "Order" + "Sitemap & Routes", + "Endpoints supporting Criteria " ], - "summary": "Update the payment method of an order", - "description": "Changes the payment method of a specific order. You can use the /order route to find out if the payment method of an order can be changed - take a look at the `paymentChangeable`- array in the response.", - "operationId": "orderSetPayment", + "summary": "Fetch SEO routes", + "description": "Perform a filtered search for seo urls.", + "operationId": "readSeoUrl", "parameters": [ { "name": "sw-language-id", @@ -17523,62 +17437,71 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { - "required": [ - "paymentMethodId", - "orderId" - ], - "properties": { - "paymentMethodId": { - "description": "The identifier of the paymentMethod to be set", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "orderId": { - "description": "The identifier of the order.", - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" } - }, - "type": "object" + ] } } } }, "responses": { "200": { - "description": "Successfully updated the payment method of the order.", + "description": "Entity search result containing seo urls.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "allOf": [ + { + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SeoUrl" + } + } + }, + "type": "object", + "required": [ + "elements" + ] + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] } } } + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/order/download/{orderId}/{downloadId}": { - "get": { + "/document/download/{documentId}/{deepLinkCode}": { + "post": { "tags": [ - "Order" + "Document", + "Endpoints supporting Criteria " ], - "summary": "Download a purchased file", - "description": "Download a file included in the given order and with the given id. Access must be granted.", - "operationId": "orderDownloadFile", + "summary": "Download generated document", + "description": "Returns blob file of a generated document to download.", + "operationId": "download", "parameters": [ { - "name": "orderId", + "name": "documentId", "in": "path", "required": true, "schema": { @@ -17587,12 +17510,11 @@ } }, { - "name": "downloadId", - "in": "path", + "name": "deepLinkCode", "required": true, + "in": "path", "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "type": "string" } }, { @@ -17600,140 +17522,55 @@ "in": "header", "description": "Instructs Shopware to return the response in the given language.", "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } - ], - "responses": { - "200": { - "description": "An arbitrary binary file.", - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - } - }, - "security": [ - { - "ApiKey": [], - "ContextToken": [] - } - ] - } - }, - "/media": { - "post": { - "tags": [ - "Content" - ], - "summary": "Fetch and resolve Media Entities", - "description": "Fetch one or multiple Media Entities with the corresponding Identifier.", - "operationId": "readMedia", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "ids": { - "description": "Identifier (UUID) of the media entity to be fetched.", - "type": "array", - "items": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } - }, - "type": "object", - "required": [ - "ids" - ] - } - } - } - }, - "responses": { - "200": { - "description": "The loaded MediaCollection containing the requested Media Entities.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Media" - } - } - } - } - }, - "404": { - "$ref": "#/components/responses/404" - } - }, - "security": [ - { - "ApiKey": [] - } - ] - } - }, - "/_info/routes": { - "get": { - "summary": "Get API routes", - "operationId": "getRoutes", - "responses": { - "200": { - "description": "Successful operation", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "endpoints" - ], - "properties": { - "endpoints": { - "type": "array", - "items": { - "type": "object", - "required": [ - "methods", - "path" - ], - "properties": { - "methods": { - "type": "array", - "items": { - "type": "string" - } - }, - "path": { - "type": "string" - } - } - } - } + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Returns the document information and blob to download.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Document" } } } } - } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] } }, - "/contact-form": { + "/category": { "post": { "tags": [ - "Content" + "Category", + "Endpoints supporting Criteria " ], - "summary": "Submit a contact form message", - "description": "Used for submitting contact forms. Be aware that there can be more required fields, depending on the system settings.", - "operationId": "sendContactMail", + "summary": "Fetch a list of categories", + "description": "Perform a filtered search for categories.", + "operationId": "readCategoryList", "parameters": [ { "name": "sw-language-id", @@ -17747,73 +17584,44 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { - "required": [ - "salutationId", - "email", - "subject", - "comment" - ], - "properties": { - "salutationId": { - "description": "Identifier of the salutation. Use `/api/salutation` endpoint to fetch possible values.", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "firstName": { - "description": "Firstname. This field may be required depending on the system settings.", - "type": "string" - }, - "lastName": { - "description": "Lastname. This field may be required depending on the system settings.", - "type": "string" - }, - "email": { - "description": "Email address", - "type": "string" - }, - "phone": { - "description": "Phone. This field may be required depending on the system settings.", - "type": "string" - }, - "subject": { - "description": "The subject of the contact form.", - "type": "string" - }, - "comment": { - "description": "The message of the contact form", - "type": "string" - }, - "navigationId": { - "description": "Identifier of the navigation page. Can be used to override the configuration.\nTake a look at the settings of a category containing a concat form in the administration.", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "slotId": { - "description": "Identifier of the cms element", - "type": "string", - "pattern": "^[0-9a-f]{32}$" - }, - "cmsPageType": { - "description": "Type of the content management page", - "type": "string" - }, - "entityName": { - "description": "Entity name for slot config", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" } - }, - "type": "object" + ] } } } }, "responses": { "200": { - "description": "Message sent successful." + "description": "Entity search result containing categories.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "type": "object", + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Category" + } + } + } + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] + } + } + } } }, "security": [ @@ -17823,15 +17631,25 @@ ] } }, - "/search": { + "/category/{navigationId}": { "post": { "tags": [ - "Product" + "Category", + "Endpoints supporting Criteria " ], - "summary": "Search for products", - "description": "Performs a search for products which can be used to display a product listing.", - "operationId": "searchPage", + "summary": "Fetch a single category", + "description": "This endpoint returns information about the category, as well as a fully resolved (hydrated with mapping values) CMS page, if one is assigned to the category. You can pass slots which should be resolved exclusively.", + "operationId": "readCategory", "parameters": [ + { + "name": "sw-include-seo-urls", + "in": "header", + "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item", + "required": false, + "schema": { + "type": "boolean" + } + }, { "name": "sw-language-id", "in": "header", @@ -17843,12 +17661,21 @@ } }, { - "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item", - "in": "header", - "name": "sw-include-seo-urls", - "required": false, + "name": "navigationId", + "in": "path", + "description": "Identifier of the category to be fetched", + "required": true, "schema": { - "type": "boolean" + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "name": "slots", + "in": "query", + "description": "Resolves only the given slot identifiers. The identifiers have to be seperated by a '|' character", + "schema": { + "type": "string" } } ], @@ -17858,22 +17685,10 @@ "schema": { "allOf": [ { - "required": [ - "search" - ], - "properties": { - "search": { - "description": "Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag.", - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/Criteria" }, { "$ref": "#/components/schemas/ProductListingCriteria" - }, - { - "$ref": "#/components/schemas/ProductListingFlags" } ] } @@ -17882,11 +17697,11 @@ }, "responses": { "200": { - "description": "Returns a product listing containing all products and additional fields to display a listing.", + "description": "The loaded category with cms page", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProductListingResult" + "$ref": "#/components/schemas/Category" } } } @@ -17899,23 +17714,23 @@ ] } }, - "/landing-page/{landingPageId}": { + "/cms/{id}": { "post": { "tags": [ - "Content", - "Endpoints supporting Criteria " + "Content" ], - "summary": "Fetch a landing page with the resolved CMS page", - "description": "Loads a landing page by its identifier and resolves the CMS page.\n\n**Important notice**\n\nThe criteria passed with this route also affects the listing, if there is one within the cms page.", - "operationId": "readLandingPage", + "summary": "Fetch and resolve a CMS page", + "description": "Loads a content management page by its identifier and resolve the slot data. This could be media files, product listing and so on.\n\n**Important notice**\n\nThe criteria passed with this route also affects the listing, if there is one within the cms page.", + "operationId": "readCms", "parameters": [ { - "name": "landingPageId", + "name": "id", "in": "path", - "description": "Identifier of the landing page.", + "description": "Identifier of the CMS page to be resolved", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^[0-9a-f]{32}$" } }, { @@ -17935,42 +17750,98 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/Criteria" + "properties": { + "slots": { + "description": "Resolves only the given slot identifiers. The identifiers have to be seperated by a `|` character.", + "type": "string" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/ProductListingCriteria" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The loaded cms page", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CmsPage" + } + } + } + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "security": [ + { + "ApiKey": [] + } + ] + } + }, + "/handle-payment": { + "post": { + "tags": [ + "Payment & Shipping" + ], + "summary": "Initiate a payment for an order", + "description": "This generic endpoint is should be called to initiate a payment flow after an order has been created. The details of the payment flow can differ depending on the payment integration and might require calling additional operations or the setup of webhooks.\n\nThe endpoint internally calls the payment handler of the payment method currently set for the order.", + "operationId": "handlePaymentMethod", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "orderId" + ], + "properties": { + "orderId": { + "description": "Identifier of an order", + "type": "string", + "pattern": "^[0-9a-f]{32}$" }, - { - "allOf": [ - { - "properties": { - "slots": { - "description": "Resolves only the given slot identifiers. The identifiers have to be seperated by a `|` character.", - "type": "string" - } - }, - "type": "object" - }, - { - "$ref": "#/components/schemas/ProductListingCriteria" - } - ] + "finishUrl": { + "description": "URL to which the client should be redirected after successful payment", + "type": "string" + }, + "errorUrl": { + "description": "URL to which the client should be redirected after erroneous payment", + "type": "string" } - ] + }, + "type": "object" } } } }, "responses": { "200": { - "description": "The loaded landing page with cms page", + "description": "Redirect to external payment provider", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LandingPage" + "type": "object", + "properties": { + "redirectUrl": { + "type": "string" + } + }, + "required": [ + "redirectUrl" + ] } } } - }, - "404": { - "$ref": "#/components/responses/404" } }, "security": [ @@ -18282,31 +18153,274 @@ "application/json": { "schema": { "required": [ - "title", - "content", - "points" + "title", + "content", + "points" + ], + "properties": { + "name": { + "description": "The name of the review author. If not set, the first name of the customer is chosen.", + "type": "string" + }, + "email": { + "description": "The email address of the review author. If not set, the email of the customer is chosen.", + "type": "string" + }, + "title": { + "description": "The title of the review.", + "type": "string" + }, + "content": { + "description": "The content of review.", + "type": "string" + }, + "points": { + "description": "The review rating for the product.", + "type": "number", + "format": "double" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Success response indicating the review was saved successfully." + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/product/{productId}/find-variant": { + "post": { + "tags": [ + "Product" + ], + "summary": "Search for a matching variant by product options.", + "description": "Performs a search for product variants and returns the best matching variant.", + "operationId": "searchProductVariantIds", + "parameters": [ + { + "name": "productId", + "in": "path", + "description": "Product ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "options" + ], + "properties": { + "options": { + "description": "The options parameter for the variant to find.", + "type": "array", + "items": { + "type": "string" + } + }, + "switchedGroup": { + "description": "The id of the option group that has been switched.", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Returns an FoundCombination struct containing the ids matching the search.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FindProductVariantRouteResponse" + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + } + }, + "/language": { + "post": { + "tags": [ + "System & Context", + "Endpoints supporting Criteria " + ], + "summary": "Fetch languages", + "description": "Perform a filtered search for languages.", + "operationId": "readLanguages", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Entity search result containing languages.", + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "properties": { + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Language" + } + } + }, + "required": [ + "elements" + ], + "type": "object" + }, + { + "$ref": "#/components/schemas/EntitySearchResult" + } + ] + } + } + } + } + }, + "security": [ + { + "ApiKey": [] + } + ] + } + }, + "/contact-form": { + "post": { + "tags": [ + "Content" + ], + "summary": "Submit a contact form message", + "description": "Used for submitting contact forms. Be aware that there can be more required fields, depending on the system settings.", + "operationId": "sendContactMail", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "required": [ + "salutationId", + "email", + "subject", + "comment" ], "properties": { - "name": { - "description": "The name of the review author. If not set, the first name of the customer is chosen.", + "salutationId": { + "description": "Identifier of the salutation. Use `/api/salutation` endpoint to fetch possible values.", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "firstName": { + "description": "Firstname. This field may be required depending on the system settings.", + "type": "string" + }, + "lastName": { + "description": "Lastname. This field may be required depending on the system settings.", "type": "string" }, "email": { - "description": "The email address of the review author. If not set, the email of the customer is chosen.", + "description": "Email address", "type": "string" }, - "title": { - "description": "The title of the review.", + "phone": { + "description": "Phone. This field may be required depending on the system settings.", "type": "string" }, - "content": { - "description": "The content of review.", + "subject": { + "description": "The subject of the contact form.", "type": "string" }, - "points": { - "description": "The review rating for the product.", - "type": "number", - "format": "double" + "comment": { + "description": "The message of the contact form", + "type": "string" + }, + "navigationId": { + "description": "Identifier of the navigation page. Can be used to override the configuration.\nTake a look at the settings of a category containing a concat form in the administration.", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "slotId": { + "description": "Identifier of the cms element", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "cmsPageType": { + "description": "Type of the content management page", + "type": "string" + }, + "entityName": { + "description": "Entity name for slot config", + "type": "string" } }, "type": "object" @@ -18316,64 +18430,94 @@ }, "responses": { "200": { - "description": "Success response indicating the review was saved successfully." + "description": "Message sent successful." } }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/product/{productId}/find-variant": { - "post": { + "/context": { + "get": { "tags": [ - "Product" + "System & Context" ], - "summary": "Search for a matching variant by product options.", - "description": "Performs a search for product variants and returns the best matching variant.", - "operationId": "searchProductVariantIds", - "parameters": [ - { - "name": "productId", - "in": "path", - "description": "Product ID", - "required": true, - "schema": { - "type": "string" + "summary": "Fetch the current context", + "description": "Fetches the current context. This includes for example the `customerGroup`, `currency`, `taxRules` and many more.", + "operationId": "readContext", + "responses": { + "200": { + "description": "Returns the current context.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SalesChannelContext" + } + } } - }, + } + }, + "security": [ { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } + "ApiKey": [] } + ] + }, + "patch": { + "tags": [ + "System & Context" ], + "summary": "Modify the current context", + "description": "Used for switching the context. A typical example would be changing the language or changing the currency.", + "operationId": "updateContext", "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "required": [ - "options" - ], "properties": { - "options": { - "description": "The options parameter for the variant to find.", - "type": "array", - "items": { - "type": "string" - } + "currencyId": { + "description": "Currency", + "type": "string", + "pattern": "^[0-9a-f]{32}$" }, - "switchedGroup": { - "description": "The id of the option group that has been switched.", - "type": "string" + "languageId": { + "description": "Language", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "billingAddressId": { + "description": "Billing Address", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "shippingAddressId": { + "description": "Shipping Address", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "paymentMethodId": { + "description": "Payment Method", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "shippingMethodId": { + "description": "Shipping Method", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "countryId": { + "description": "Country", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "countryStateId": { + "description": "Country State", + "type": "string", + "pattern": "^[0-9a-f]{32}$" } }, "type": "object" @@ -18383,14 +18527,7 @@ }, "responses": { "200": { - "description": "Returns an FoundCombination struct containing the ids matching the search.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FindProductVariantRouteResponse" - } - } - } + "$ref": "#/components/responses/ContextTokenResponse" } }, "security": [ @@ -18400,70 +18537,36 @@ ] } }, - "/product-listing/{categoryId}": { - "post": { + "/product-export/{accessKey}/{fileName}": { + "get": { "tags": [ "Product" ], - "summary": "Fetch a product listing by category", - "description": "Fetches a product listing for a specific category. It also provides filters, sortings and property aggregations, analogous to the /search endpoint.", - "operationId": "readProductListing", + "summary": "Export product export", + "operationId": "readProductExport", "parameters": [ { - "name": "categoryId", + "name": "accessKey", "in": "path", - "description": "Identifier of a category.", + "description": "Access Key", "required": true, "schema": { "type": "string" } }, { - "name": "sw-include-seo-urls", - "in": "header", - "description": "Determines if the response must contain a SeoUrl entity for a product entity", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, + "name": "fileName", + "in": "path", + "description": "File Name", + "required": true, "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ProductListingCriteria" - }, - { - "$ref": "#/components/schemas/ProductListingFlags" - } - ] - } - } - } - }, "responses": { "200": { - "description": "Returns a product listing containing all products and additional fields to display a listing.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProductListingResult" - } - } - } + "description": "" } }, "security": [ @@ -18473,16 +18576,25 @@ ] } }, - "/country": { + "/landing-page/{landingPageId}": { "post": { "tags": [ - "System & Context", + "Content", "Endpoints supporting Criteria " ], - "summary": "Fetch countries", - "description": "Perform a filtered search for countries", - "operationId": "readCountry", + "summary": "Fetch a landing page with the resolved CMS page", + "description": "Loads a landing page by its identifier and resolves the CMS page.\n\n**Important notice**\n\nThe criteria passed with this route also affects the listing, if there is one within the cms page.", + "operationId": "readLandingPage", "parameters": [ + { + "name": "landingPageId", + "in": "path", + "description": "Identifier of the landing page.", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "sw-language-id", "in": "header", @@ -18495,13 +18607,28 @@ } ], "requestBody": { - "required": false, "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Criteria" + }, + { + "allOf": [ + { + "properties": { + "slots": { + "description": "Resolves only the given slot identifiers. The identifiers have to be seperated by a `|` character.", + "type": "string" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/ProductListingCriteria" + } + ] } ] } @@ -18510,29 +18637,17 @@ }, "responses": { "200": { - "description": "Entity search result containing countries.", + "description": "The loaded landing page with cms page", "content": { "application/json": { "schema": { - "allOf": [ - { - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Country" - } - } - }, - "type": "object" - }, - { - "$ref": "#/components/schemas/EntitySearchResult" - } - ] + "$ref": "#/components/schemas/LandingPage" } } } + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ @@ -18542,63 +18657,48 @@ ] } }, - "/breadcrumb/{id}": { + "/script/{hook}": { "get": { "tags": [ - "Experimental", - "Breadcrumb" + "API", + "Script", + "App" ], - "summary": "Fetch a breadcrumb", - "description": "Perform search to get category or product breadcrumb. \n\nExperimental API, not part of our backwards compatibility promise, thus this API can introduce breaking changes at any time.", - "operationId": "readBreadcrumb", + "summary": "Access point for different api logics which are provided by apps over script hooks", + "operationId": "getScriptStoreApiRoute", "parameters": [ { - "name": "id", + "name": "hook", "in": "path", - "description": "UUID for product or category", + "description": "Dynamic hook which used to build the hook name", "required": true, "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "type", - "in": "query", - "description": "Type: category or product (optional - default: product)", - "required": false, - "schema": { - "type": "string", - "enum": [ - "product", - "category" - ] - } - }, - { - "name": "referrerCategoryId", - "in": "query", - "description": "UUID for referrer category only used for product breadcrumb", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" + "type": "string" } } ], "responses": { "200": { - "description": "Search result containing SeoUrl\\'s to be used as breadcrumb.", + "description": "Returns different structures of results based on the called script.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BreadcrumbCollection" + "type": "object", + "additionalProperties": true, + "nullable": true + } + }, + "application/vnd.api+json": { + "schema": { + "type": "object", + "additionalProperties": true, + "nullable": true } } } }, - "400": { - "$ref": "#/components/responses/400" + "204": { + "description": "No data by default" } }, "security": [ @@ -18606,160 +18706,84 @@ "ApiKey": [] } ] - } - }, - "/account/newsletter-recipient": { + }, "post": { "tags": [ - "Profile", - "Newsletter", - "Endpoints supporting Criteria" + "API", + "Script", + "App" ], - "summary": "Fetch newsletter recipients", - "description": "Perform a filtered search for newsletter recipients.", - "operationId": "readNewsletterRecipient", - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" - } - ] - } + "summary": "Access point for different api logics which are provided by apps over script hooks", + "operationId": "postScriptStoreApiRoute", + "parameters": [ + { + "name": "hook", + "in": "path", + "description": "Dynamic hook which used to build the hook name", + "required": true, + "schema": { + "type": "string" } } - }, + ], "responses": { "200": { - "description": "", + "description": "Returns different structures of results based on the called script.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AccountNewsletterRecipient" + "type": "object", + "additionalProperties": true, + "nullable": true + } + }, + "application/vnd.api+json": { + "schema": { + "type": "object", + "additionalProperties": true, + "nullable": true } } } + }, + "204": { + "description": "No data by default" } }, - "security": [ - { - "ApiKey": [], - "ContextToken": [] - } - ] - } - }, - "/account/change-profile": { - "post": { - "tags": [ - "Profile" - ], - "summary": "Change the customer's information", - "description": "Make changes to a customer's account, like changing their name, salutation or title.", - "operationId": "changeProfile", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "salutationId", - "firstName", - "lastName" - ], - "properties": { - "salutationId": { - "description": "Id of the salutation for the customer account. Fetch options using `salutation` endpoint.", - "type": "string" - }, - "title": { - "description": "(Academic) title of the customer", - "type": "string" - }, - "firstName": { - "description": "Customer first name. Value will be reused for shipping and billing address if not provided explicitly.", - "type": "string" - }, - "lastName": { - "description": "Customer last name. Value will be reused for shipping and billing address if not provided explicitly.", - "type": "string" - }, - "birthdayDay": { - "description": "Birthday day", - "type": "integer" - }, - "birthdayMonth": { - "description": "Birthday month", - "type": "integer" - }, - "birthdayYear": { - "description": "Birthday year", - "type": "integer" - } - }, - "oneOf": [ - { - "properties": { - "accountType": { - "description": "Type of the customer account. Default value is 'private'.", - "type": "string", - "enum": [ - "private" - ], - "default": "private" - }, - "company": { - "type": "null" - }, - "vatIds": { - "type": "null" - } - } - }, - { - "required": [ - "accountType", - "company", - "vatIds" - ], - "properties": { - "accountType": { - "description": "Type of the customer account. Can be `private` or `business`.", - "type": "string", - "enum": [ - "business" - ] - }, - "company": { - "description": "Company of the customer. Only required when `accountType` is `business`.", - "type": "string" - }, - "vatIds": { - "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - } - } - ] - } + "security": [ + { + "ApiKey": [] + } + ] + } + }, + "/checkout/cart": { + "get": { + "tags": [ + "Cart" + ], + "summary": "Fetch or create a cart", + "description": "Used to fetch the current cart or for creating a new one.", + "operationId": "readCart", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } - }, + ], "responses": { "200": { - "description": "Returns a success response indicating a successful update", + "description": "Cart", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "$ref": "#/components/schemas/Cart" } } } @@ -18767,52 +18791,20 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] - } - }, - "/account/change-email": { - "post": { + }, + "delete": { "tags": [ - "Profile" + "Cart" ], - "summary": "Change the customer's email address", - "description": "Changes a customer's email address to a new email address, using their current password as a validation.", - "operationId": "changeEmail", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "emailConfirmation", - "password" - ], - "properties": { - "email": { - "description": "New email address. Has to be unique amongst all customers", - "type": "string" - }, - "emailConfirmation": { - "description": "Confirmation of the new email address.", - "type": "string" - }, - "password": { - "description": "Customer's current password", - "type": "string" - } - }, - "type": "object" - } - } - } - }, + "summary": "Delete a cart", + "description": "This route deletes the cart of the customer.", + "operationId": "deleteCart", "responses": { - "200": { - "description": "Returns a success response indicating a successful update", + "204": { + "description": "Successfully deleted the cart", "content": { "application/json": { "schema": { @@ -18824,46 +18816,47 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/account/change-language": { + "/checkout/cart/line-item": { "post": { "tags": [ - "Profile" + "Cart" + ], + "summary": "Add items to the cart", + "description": "This route adds items to the cart. An item can be a product or promotion for example. They are referenced by the `referencedId`-parameter.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#adding-new-items-to-the-cart)", + "operationId": "addLineItem", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Change the customer's language.", - "description": "Changes the language of the logged in customer", - "operationId": "changeLanguage", "requestBody": { - "required": true, "content": { "application/json": { "schema": { - "required": [ - "languageId" - ], - "properties": { - "language": { - "description": "New languageId", - "type": "string" - } - }, - "type": "object" + "$ref": "#/components/schemas/CartItems" } } } }, "responses": { "200": { - "description": "Returns a success response indicating a successful update", + "description": "The updated cart.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "$ref": "#/components/schemas/Cart" } } } @@ -18871,56 +18864,50 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] - } - }, - "/account/change-password": { - "post": { + }, + "delete": { "tags": [ - "Profile" + "Cart" ], - "summary": "Change the customer's password", - "description": "Changes a customer's password using their current password as a validation.", - "operationId": "changePassword", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "password", - "newPassword", - "newPasswordConfirm" - ], - "properties": { - "password": { - "description": "Current password of the customer", - "type": "string" - }, - "newPassword": { - "description": "New Password for the customer", - "type": "string" - }, - "newPasswordConfirm": { - "description": "Confirmation of the new password", - "type": "string" - } - }, - "type": "object" + "summary": "Remove items from the cart", + "description": "DEPRECATED: use removeLineItem instead. This route removes items from the cart and recalculates it.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#deleting-items-in-the-cart)", + "operationId": "removeLineItemDeprecated", + "deprecated": true, + "parameters": [ + { + "name": "ids", + "in": "query", + "description": "A list of product identifiers.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } + }, + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } } - }, + ], "responses": { "200": { - "description": "Returns a success response indicating a successful update.", + "description": "The updated cart.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "$ref": "#/components/schemas/Cart" } } } @@ -18928,38 +18915,45 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] - } - }, - "/account/change-payment-method/{paymentMethodId}": { - "post": { + }, + "patch": { "tags": [ - "Profile" + "Cart" ], - "summary": "Change the customer's default payment method", - "description": "Changes a customer's default (preselected) payment method.", - "operationId": "changePaymentMethod", + "summary": "Update items in the cart", + "description": "This route updates items in the cart. A typical example is updating the quantity of an item.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#updating-items-in-the-cart)", + "operationId": "updateLineItem", "parameters": [ { - "name": "paymentMethodId", - "in": "path", - "description": "Identifier of the desired default payment method", - "required": true, + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, "schema": { - "type": "string" + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CartItems" + } + } + } + }, "responses": { "200": { - "description": "Returns a success response indicating a successful update.", + "description": "The updated cart.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "$ref": "#/components/schemas/Cart" } } } @@ -18967,32 +18961,48 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/account/customer-recovery-is-expired": { + "/checkout/cart/line-item/delete": { "post": { "tags": [ - "Profile" + "Cart" + ], + "summary": "Remove items from the cart", + "description": "This route removes items from the cart and recalculates it.\n\nExample: [Working with the cart - Guide](https://developer.shopware.com/docs/guides/integrations-api/store-api-guide/work-with-the-cart#deleting-items-in-the-cart)", + "operationId": "removeLineItem", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Checks if the customer recovery entry for a given hash is expired.", - "description": "This can be used to validate a provided hash has a valid and not expired customer recovery hash.", - "operationId": "getCustomerRecoveryIsExpired", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "hash" + "ids" ], "properties": { - "hash": { - "description": "Parameter from the link in the confirmation mail sent in Step 1", - "type": "string" + "ids": { + "description": "A list of product identifiers.", + "type": "array", + "minItems": 1, + "items": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } } }, "type": "object" @@ -19002,33 +19012,11 @@ }, "responses": { "200": { - "description": "Returns a CustomerRecoveryIsExpiredResponse that indicates if the hash is expired or not.", + "description": "The updated cart.", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "isExpired": { - "type": "boolean" - } - }, - "required": [ - "isExpired" - ] - } - }, - "apiAlias": { - "enum": [ - "array_struct" - ], - "type": "string" - } - } + "$ref": "#/components/schemas/Cart" } } } @@ -19041,36 +19029,57 @@ ] } }, - "/account/customer": { + "/checkout/order": { "post": { "tags": [ - "Profile", - "Endpoints supporting Criteria " + "Order" + ], + "summary": "Create an order from a cart", + "description": "Creates a new order from the current cart and deletes the cart.\n\nIf you are using the [prepared payment flow](https://developer.shopware.com/docs/concepts/commerce/checkout-concept/payments#2.1-prepare-payment-optional), this endpoint also receives additional transaction details. The exact name of the parameters depends on the implementation of the corresponding *payment handler*.", + "operationId": "createOrder", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Get information about current customer", - "description": "Returns information about the current customer.", - "operationId": "readCustomer", "requestBody": { - "required": false, + "description": "Contains additional metadata which is stored together with the order. It can also contain payment transaction details.", "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" + "properties": { + "customerComment": { + "description": "Adds a comment from the customer to the order.", + "type": "string" + }, + "affiliateCode": { + "description": "The affiliate code can be used to track which referrer the customer came through. An example could be `Price-comparison-company-XY`.", + "type": "string" + }, + "campaignCode": { + "description": "The campaign code is used to track which action the customer came from. An example could be `Summer-Deals`", + "type": "string" } - ] + }, + "type": "object" } } } }, "responses": { "200": { - "description": "Returns the logged in customer, also for guest sessions. Check for the value of `guest` field to see whether the customer is a guest.", + "description": "Order", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/Order" } } } @@ -19082,102 +19091,140 @@ "ContextToken": [] } ] - }, - "delete": { - "tags": [ - "Profile" - ], - "summary": "Delete the customer's profile", - "description": "Deletes a customer profile along with their addresses, wishlists and associated data. Created orders and their payment/shipping information (addresses) and reviews are not deleted.", - "operationId": "deleteCustomer", - "responses": { - "204": { - "description": "Returns a no content response indicating a successful removal of the customer profile" - } - }, - "security": [ - { - "ApiKey": [], - "ContextToken": [] - } - ] } }, - "/account/address/{addressId}": { - "delete": { + "/checkout/gateway": { + "get": { "tags": [ - "Address" - ], - "summary": "Delete an address of a customer", - "description": "Delete an address of customer.\n\n Only addresses which are not set as default addresses for shipping or billing can be deleted. You can check the current default addresses of your customer using the profile information endpoint and change them using the default address endpoint.\n\n **A customer must have at least one address (which can be used for shipping and billing).**\n\n An automatic fallback is not applied.", - "operationId": "deleteCustomerAddress", - "parameters": [ - { - "name": "addressId", - "in": "path", - "description": "ID of the address to be deleted.", - "required": true, - "schema": { - "type": "string" - } - } + "Gateway" ], + "summary": "Call the checkout gateway", + "description": "Call the checkout gateway, which is used to manipulate certain aspects of the checkout process (e.g. available payment methods).", + "operationId": "checkoutGateway", "responses": { - "204": { - "description": "No Content response, when the address has been deleted" - }, - "400": { - "description": "Response containing a list of errors, most likely due to the address being in use" + "200": { + "description": "Checkout gateway response", + "content": { + "application/json": { + "schema": { + "properties": { + "paymentMethods": { + "properties": { + "total": { + "description": "Total amount", + "type": "integer" + }, + "aggregations": { + "description": "aggregation result", + "type": "object" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } + } + }, + "type": "object" + }, + "shippingMethods": { + "properties": { + "total": { + "description": "Total amount", + "type": "integer" + }, + "aggregations": { + "description": "aggregation result", + "type": "object" + }, + "elements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ShippingMethod" + } + } + }, + "type": "object" + }, + "errors": { + "type": "array", + "items": { + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "detail": { + "description": "Error detail", + "type": "string" + }, + "blocking": { + "description": "If the error is blocking", + "type": "boolean" + } + } + } + } + } + } + } + } } }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] - }, - "patch": { + } + }, + "/order/state/cancel": { + "post": { "tags": [ - "Address" + "Order" ], - "summary": "Modify an address of a customer", - "description": "Modifies an existing address of a customer.", - "operationId": "updateCustomerAddress", + "summary": "Cancel an order", + "description": "Cancels an order. The order state will be set to 'cancelled'.", + "operationId": "cancelOrder", "parameters": [ { - "name": "addressId", - "in": "path", - "description": "Address ID", - "required": true, + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, "schema": { - "type": "string" + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerAddressBody" + "properties": { + "orderId": { + "description": "The identifier of the order to be canceled.", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + "type": "object", + "required": [ + "orderId" + ] } } } }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CustomerAddress" - }, - { - "$ref": "#/components/schemas/CustomerAddressRead" - } - ] + "responses": { + "200": { + "description": "Returns the state of the state machine\n\n example: More information about the state machine can be found in the corresponding guide: [Using the state machine](https://developer.shopware.com/docs/guides/plugins/plugins/checkout/order/using-the-state-machine)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/StateMachineState" } } } @@ -19191,23 +19238,44 @@ ] } }, - "/account/list-address": { + "/order": { "post": { "tags": [ - "Address", + "Order", "Endpoints supporting Criteria " ], - "summary": "Fetch addresses of a customer", - "description": "Lists all addresses of the current customer and allows filtering them based on a criteria.", - "operationId": "listAddress", + "summary": "Fetch a list of orders", + "description": "List orders of a customer.", + "operationId": "readOrder", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/Criteria" + }, + { + "properties": { + "checkPromotion": { + "description": "Check if the payment method of the order is still changeable.", + "type": "boolean" + } + }, + "type": "object" } ] } @@ -19216,14 +19284,11 @@ }, "responses": { "200": { - "description": "", + "description": "An array of orders and an indicator if the payment of the order can be changed.", "content": { "application/json": { "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CustomerAddress" - } + "$ref": "#/components/schemas/OrderRouteResponse" } } } @@ -19237,31 +19302,45 @@ ] } }, - "/account/login": { + "/order/payment": { "post": { "tags": [ - "Login & Registration" + "Order" + ], + "summary": "Update the payment method of an order", + "description": "Changes the payment method of a specific order. You can use the /order route to find out if the payment method of an order can be changed - take a look at the `paymentChangeable`- array in the response.", + "operationId": "orderSetPayment", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Log in a customer", - "description": "Logs in customers given their credentials.", - "operationId": "loginCustomer", "requestBody": { "required": true, "content": { "application/json": { "schema": { "required": [ - "username", - "password" + "paymentMethodId", + "orderId" ], "properties": { - "username": { - "description": "Email", - "type": "string" + "paymentMethodId": { + "description": "The identifier of the paymentMethod to be set", + "type": "string", + "pattern": "^[0-9a-f]{32}$" }, - "password": { - "description": "Password", - "type": "string" + "orderId": { + "description": "The identifier of the order.", + "type": "string", + "pattern": "^[0-9a-f]{32}$" } }, "type": "object" @@ -19271,14 +19350,11 @@ }, "responses": { "200": { - "$ref": "#/components/responses/ContextTokenResponse" - }, - "401": { - "description": "If credentials are incorrect an error is returned", + "description": "Successfully updated the payment method of the order.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/failure" + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -19286,58 +19362,176 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/account/login/imitate-customer": { + "/order/download/{orderId}/{downloadId}": { + "get": { + "tags": [ + "Order" + ], + "summary": "Download a purchased file", + "description": "Download a file included in the given order and with the given id. Access must be granted.", + "operationId": "orderDownloadFile", + "parameters": [ + { + "name": "orderId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "name": "downloadId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "An arbitrary binary file.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "security": [ + { + "ApiKey": [], + "ContextToken": [] + } + ] + } + }, + "/_info/routes": { + "get": { + "summary": "Get API routes", + "operationId": "getRoutes", + "responses": { + "200": { + "description": "Successful operation", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "endpoints" + ], + "properties": { + "endpoints": { + "type": "array", + "items": { + "type": "object", + "required": [ + "methods", + "path" + ], + "properties": { + "methods": { + "type": "array", + "items": { + "type": "string" + } + }, + "path": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + }, + "/product-listing/{categoryId}": { "post": { "tags": [ - "Login & Registration" + "Product" + ], + "summary": "Fetch a product listing by category", + "description": "Fetches a product listing for a specific category. It also provides filters, sortings and property aggregations, analogous to the /search endpoint.", + "operationId": "readProductListing", + "parameters": [ + { + "name": "categoryId", + "in": "path", + "description": "Identifier of a category.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sw-include-seo-urls", + "in": "header", + "description": "Determines if the response must contain a SeoUrl entity for a product entity", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Imitate the log in as a customer", - "description": "Imitate the log in as a customer given a generated token.", - "operationId": "imitateCustomerLogin", "requestBody": { - "required": true, "content": { - "application/json": { - "schema": { - "required": [ - "token", - "customerId", - "userId" - ], - "properties": { - "token": { - "description": "Generated customer impersonation token", - "type": "string" - }, - "customerId": { - "description": "ID of the customer", - "type": "string" + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/ProductListingCriteria" }, - "userId": { - "description": "ID of the user who generated the token", - "type": "string" + { + "$ref": "#/components/schemas/ProductListingFlags" } - }, - "type": "object" + ] } } } }, "responses": { "200": { - "$ref": "#/components/responses/ContextTokenResponse" - }, - "400": { - "description": "If the token is incorrect an error is returned", + "description": "Returns a product listing containing all products and additional fields to display a listing.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/failure" + "$ref": "#/components/schemas/ProductListingResult" } } } @@ -19350,228 +19544,62 @@ ] } }, - "/account/logout": { - "post": { + "/_info/openapi3.json": { + "get": { "tags": [ - "Login & Registration" + "System Info & Health Check" ], - "summary": "Log out a customer", - "description": "Logs out a customer.", - "operationId": "logoutCustomer", - "responses": { - "200": { - "$ref": "#/components/responses/ContextTokenResponse" - }, - "403": { - "$ref": "#/components/responses/403" - } - }, - "security": [ + "summary": "Get OpenAPI Specification", + "description": "Get information about the store API in OpenAPI format.", + "operationId": "api-info", + "parameters": [ { - "ApiKey": [], - "ContextToken": [] - } - ] - } - }, - "/account/register-confirm": { - "post": { - "tags": [ - "Login & Registration" - ], - "summary": "Confirm a customer registration", - "description": "Confirms a customer registration when double opt-in is activated.\n\nLearn more about double opt-in registration in our guide \"Register a customer\".", - "operationId": "registerConfirm", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "required": [ - "hash", - "em" - ], - "properties": { - "hash": { - "description": "Hash from the email received", - "type": "string" - }, - "em": { - "description": "Email hash from the email received", - "type": "string" - } - }, - "type": "object" - } + "name": "type", + "in": "query", + "description": "Type of the api", + "schema": { + "type": "string", + "enum": [ + "jsonapi", + "json" + ] } } - }, + ], "responses": { "200": { - "description": "Returns the logged in customer. The customer is automatically logged in with the `sw-context-token` header provided, which can be reused for subsequent requests." - }, - "404": { - "description": "No hash provided" - }, - "412": { - "description": "The customer has already been confirmed" - } - }, - "security": [ - { - "ApiKey": [] + "$ref": "#/components/responses/OpenApi3" } - ] + } } }, - "/account/register": { + "/customer/wishlist/add/{productId}": { "post": { "tags": [ - "Login & Registration" + "Wishlist" ], - "summary": "Register a customer", - "description": "Registers a customer. Used both for normal customers and guest customers.See the Guide \"Register a customer\" for more information on customer registration.", - "operationId": "register", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "properties": { - "email": { - "description": "Email of the customer. Has to be unique, unless `guest` is `true`", - "type": "string" - }, - "password": { - "description": "Password for the customer. Required, unless `guest` is `true`", - "type": "string" - }, - "salutationId": { - "description": "Id of the salutation for the customer account. Fetch options using `salutation` endpoint.", - "type": "string" - }, - "firstName": { - "description": "Customer first name. Value will be reused for shipping and billing address if not provided explicitly.", - "type": "string" - }, - "lastName": { - "description": "Customer last name. Value will be reused for shipping and billing address if not provided explicitly.", - "type": "string" - }, - "acceptedDataProtection": { - "description": "Flag indicating accepted data protection", - "type": "boolean" - }, - "storefrontUrl": { - "description": "URL of the storefront for that registration. Used in confirmation emails. Has to be one of the configured domains of the sales channel.", - "type": "string" - }, - "billingAddress": { - "$ref": "#/components/schemas/CustomerAddress" - }, - "shippingAddress": { - "$ref": "#/components/schemas/CustomerAddress" - }, - "guest": { - "description": "If set, will create a guest customer. Guest customers can re-use an email address and don't need a password.", - "type": "boolean", - "default": false - }, - "birthdayDay": { - "description": "Birthday day", - "type": "integer" - }, - "birthdayMonth": { - "description": "Birthday month", - "type": "integer" - }, - "birthdayYear": { - "description": "Birthday year", - "type": "integer" - }, - "title": { - "description": "(Academic) title of the customer", - "type": "string" - }, - "affiliateCode": { - "description": "Field can be used to store an affiliate tracking code", - "type": "string" - }, - "campaignCode": { - "description": "Field can be used to store a campaign tracking code", - "type": "string" - } - }, - "required": [ - "email", - "password", - "salutationId", - "firstName", - "lastName", - "acceptedDataProtection", - "storefrontUrl", - "billingAddress" - ], - "oneOf": [ - { - "properties": { - "accountType": { - "description": "Type of the customer account. Default value is 'private'.", - "type": "string", - "enum": [ - "private" - ], - "default": "private" - }, - "company": { - "type": "null" - }, - "vatIds": { - "type": "null" - } - } - }, - { - "required": [ - "accountType", - "company", - "vatIds" - ], - "properties": { - "accountType": { - "description": "Type of the customer account. Can be `private` or `business`.", - "type": "string", - "enum": [ - "business" - ] - }, - "company": { - "description": "Company of the customer. Only required when `accountType` is `business`.", - "type": "string" - }, - "vatIds": { - "description": "VAT IDs of the customer's company. Only valid when `accountType` is `business`.", - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - } - } - } - ], - "type": "object" - } + "summary": "Add a product to a wishlist", + "description": "Adds a product to a customers wishlist.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * The wishlist feature has to be activated.", + "operationId": "addProductOnWishlist", + "parameters": [ + { + "name": "productId", + "in": "path", + "description": "Identifier of the product to be added.", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } - }, + ], "responses": { "200": { - "description": "Success", + "description": "Returns a success response.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/SuccessResponse" } } } @@ -19579,55 +19607,54 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/account/recovery-password-confirm": { + "/customer/wishlist": { "post": { "tags": [ - "Profile" + "Wishlist", + "Endpoints supporting Criteria " + ], + "summary": "Fetch a wishlist", + "description": "Fetch a customer's wishlist. Products on the wishlist can be filtered using a criteria object.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * The wishlist feature has to be activated.", + "operationId": "readCustomerWishlist", + "parameters": [ + { + "name": "sw-language-id", + "in": "header", + "description": "Instructs Shopware to return the response in the given language.", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } ], - "summary": "Reset a password with recovery credentials", - "description": "This operation is Step 2 of the password reset flow. It is required to conduct Step 1 \"Send a password recovery mail\" in order to obtain the required credentials for this step.Resets a customer's password using credentials from a password recovery mail as a validation.", - "operationId": "recoveryPassword", "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { - "required": [ - "hash", - "newPassword", - "newPasswordConfirm" - ], - "properties": { - "hash": { - "description": "Parameter from the link in the confirmation mail sent in Step 1", - "type": "string" - }, - "newPassword": { - "description": "New password for the customer", - "type": "string" - }, - "newPasswordConfirm": { - "description": "Confirmation of the new password", - "type": "string" + "allOf": [ + { + "$ref": "#/components/schemas/Criteria" } - }, - "type": "object" + ] } } } }, "responses": { "200": { - "description": "Returns a success response indicating a successful update.", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessResponse" + "$ref": "#/components/schemas/WishlistLoadRouteResponse" } } } @@ -19635,36 +19662,34 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/account/recovery-password": { + "/customer/wishlist/merge": { "post": { "tags": [ - "Profile" + "Wishlist" ], - "summary": "Send a password recovery mail", - "description": "This operation is Step 1 of the password reset flow. Make sure to implement Step 2 \"Reset password with recovery credentials\" in order to allow for the complete flow in your application. Sends a recovery mail containing a link with credentials that allows a customer to reset their password.", - "operationId": "sendRecoveryMail", + "summary": "Create a wishlist for a customer", + "description": "Create a new wishlist for a logged in customer or extend the existing wishlist given a set of products.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * A customer can only have a single wishlist.\n * The wishlist feature has to be activated.", + "operationId": "mergeProductOnWishlist", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "required": [ - "email", - "storefrontUrl" - ], "properties": { - "email": { - "description": "E-Mail address to identify the customer", - "type": "string" - }, - "storefrontUrl": { - "description": "URL of the storefront to use for the generated reset link. It has to be a domain that is configured in the sales channel domain settings.", - "type": "string" + "productIds": { + "description": "List product id", + "type": "array", + "items": { + "description": "product id", + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } } }, "type": "object" @@ -19674,7 +19699,7 @@ }, "responses": { "200": { - "description": "If email corresponds to an existing customer, a mail will be sent out to that customer containing a link assembled using the following schema:\n\nReturns a success indicating a successful initialisation of the reset flow.", + "description": "Returns a success response.", "content": { "application/json": { "schema": { @@ -19686,33 +19711,52 @@ }, "security": [ { - "ApiKey": [] + "ApiKey": [], + "ContextToken": [] } ] } }, - "/account/address/default-shipping/{addressId}": { - "patch": { + "/customer/wishlist/delete/{productId}": { + "delete": { "tags": [ - "Address" + "Wishlist" ], - "summary": "Change a customer's default shipping address", - "description": "Updates the default (preselected) shipping addresses of a customer.", - "operationId": "defaultShippingAddress", + "summary": "Remove a product from a wishlist", + "description": "Removes a product from a customer's wishlist.\n\n **Important constraints**\n\n * Anonymous (not logged-in) customers can not have wishlists.\n * The wishlist feature has to be activated.", + "operationId": "deleteProductOnWishlist", "parameters": [ { - "name": "addressId", + "name": "productId", "in": "path", - "description": "Address ID", + "description": "The identifier of the product to be removed from the wishlist.", "required": true, "schema": { - "type": "string" + "type": "string", + "pattern": "^[0-9a-f]{32}$" } } ], "responses": { "200": { - "description": "" + "description": "Returns a success response indicating a successful removal.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "404": { + "description": "The removal of the product failed. Probably because the product could not be found on the wishlist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/failure" + } + } + } } }, "security": [ @@ -19723,51 +19767,31 @@ ] } }, - "/account/address/default-billing/{addressId}": { - "patch": { + "/app-system/{name}/generate-token": { + "post": { "tags": [ - "Address" + "App system" ], - "summary": "Change a customer's default billing address", - "description": "Updates the default (preselected) billing addresses of a customer.", - "operationId": "defaultBillingAddress", + "summary": "Generate JWT token for app system backend", + "description": "Generate JWT token for authenticated communication with the app server", + "operationId": "generateJWTAppSystemAppServer", "parameters": [ { - "name": "addressId", "in": "path", - "description": "Address ID", + "name": "name", "required": true, + "description": "Name of the app", "schema": { "type": "string" } } ], - "responses": { - "200": { - "description": "" - } - }, - "security": [ - { - "ApiKey": [], - "ContextToken": [] - } - ] - } - }, - "/account/address": { - "post": { - "tags": [ - "Address" - ], - "summary": "Create a new address for a customer", - "description": "Creates a new address for a customer.", - "operationId": "createCustomerAddress", "requestBody": { + "required": false, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerAddress" + "type": "object" } } } @@ -19778,14 +19802,19 @@ "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CustomerAddress" + "type": "object", + "properties": { + "token": { + "type": "string" }, - { - "$ref": "#/components/schemas/CustomerAddressRead" + "expires": { + "type": "string", + "format": "date-time" + }, + "shopId": { + "type": "string" } - ] + } } } } @@ -19793,59 +19822,36 @@ }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/document/download/{documentId}/{deepLinkCode}": { + "/media": { "post": { "tags": [ - "Document", - "Endpoints supporting Criteria " - ], - "summary": "Download generated document", - "description": "Returns blob file of a generated document to download.", - "operationId": "download", - "parameters": [ - { - "name": "documentId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "deepLinkCode", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "sw-language-id", - "in": "header", - "description": "Instructs Shopware to return the response in the given language.", - "required": false, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - } + "Content" ], + "summary": "Fetch and resolve Media Entities", + "description": "Fetch one or multiple Media Entities with the corresponding Identifier.", + "operationId": "readMedia", "requestBody": { - "required": false, "content": { "application/json": { "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" + "properties": { + "ids": { + "description": "Identifier (UUID) of the media entity to be fetched.", + "type": "array", + "items": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } } + }, + "type": "object", + "required": [ + "ids" ] } } @@ -19853,33 +19859,37 @@ }, "responses": { "200": { - "description": "Returns the document information and blob to download.", + "description": "The loaded MediaCollection containing the requested Media Entities.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Document" + "type": "array", + "items": { + "$ref": "#/components/schemas/Media" + } } } } + }, + "404": { + "$ref": "#/components/responses/404" } }, "security": [ { - "ApiKey": [], - "ContextToken": [] + "ApiKey": [] } ] } }, - "/category": { + "/search": { "post": { "tags": [ - "Category", - "Endpoints supporting Criteria " + "Product" ], - "summary": "Fetch a list of categories", - "description": "Perform a filtered search for categories.", - "operationId": "readCategoryList", + "summary": "Search for products", + "description": "Performs a search for products which can be used to display a product listing.", + "operationId": "searchPage", "parameters": [ { "name": "sw-language-id", @@ -19890,16 +19900,39 @@ "type": "string", "pattern": "^[0-9a-f]{32}$" } + }, + { + "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item", + "in": "header", + "name": "sw-include-seo-urls", + "required": false, + "schema": { + "type": "boolean" + } } ], "requestBody": { - "required": false, "content": { "application/json": { "schema": { "allOf": [ { - "$ref": "#/components/schemas/Criteria" + "required": [ + "search" + ], + "properties": { + "search": { + "description": "Using the search parameter, the server performs a text search on all records based on their data model and weighting as defined in the entity definition using the SearchRanking flag.", + "type": "string" + } + }, + "type": "object" + }, + { + "$ref": "#/components/schemas/ProductListingCriteria" + }, + { + "$ref": "#/components/schemas/ProductListingFlags" } ] } @@ -19908,26 +19941,11 @@ }, "responses": { "200": { - "description": "Entity search result containing categories.", + "description": "Returns a product listing containing all products and additional fields to display a listing.", "content": { "application/json": { "schema": { - "allOf": [ - { - "type": "object", - "properties": { - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Category" - } - } - } - }, - { - "$ref": "#/components/schemas/EntitySearchResult" - } - ] + "$ref": "#/components/schemas/ProductListingResult" } } } @@ -19940,25 +19958,15 @@ ] } }, - "/category/{navigationId}": { - "post": { + "/sitemap": { + "get": { "tags": [ - "Category", - "Endpoints supporting Criteria " + "Sitemap & Routes" ], - "summary": "Fetch a single category", - "description": "This endpoint returns information about the category, as well as a fully resolved (hydrated with mapping values) CMS page, if one is assigned to the category. You can pass slots which should be resolved exclusively.", - "operationId": "readCategory", + "summary": "Fetch sitemaps", + "description": "Fetches a list of compressed sitemap files, which are often used by search engines.", + "operationId": "readSitemap", "parameters": [ - { - "name": "sw-include-seo-urls", - "in": "header", - "description": "Instructs Shopware to try and resolve SEO URLs for the given navigation item", - "required": false, - "schema": { - "type": "boolean" - } - }, { "name": "sw-language-id", "in": "header", @@ -19968,49 +19976,18 @@ "type": "string", "pattern": "^[0-9a-f]{32}$" } - }, - { - "name": "navigationId", - "in": "path", - "description": "Identifier of the category to be fetched", - "required": true, - "schema": { - "type": "string", - "pattern": "^[0-9a-f]{32}$" - } - }, - { - "name": "slots", - "in": "query", - "description": "Resolves only the given slot identifiers. The identifiers have to be seperated by a '|' character", - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" - }, - { - "$ref": "#/components/schemas/ProductListingCriteria" - } - ] - } - } - } - }, "responses": { "200": { - "description": "The loaded category with cms page", + "description": "Returns a list of available sitemaps.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Category" + "type": "array", + "items": { + "$ref": "#/components/schemas/Sitemap" + } } } } @@ -20023,15 +20000,25 @@ ] } }, - "/payment-method": { - "post": { + "/sitemap/{filePath}": { + "get": { "tags": [ - "Payment Method", - "Endpoints supporting Criteria " + "Sitemap & Routes" ], - "summary": "Loads all available payment methods", - "operationId": "readPaymentMethod", + "summary": "Download sitemap file", + "description": "Downloads the sitemap file from the configured sitemap storage.", + "operationId": "getSitemapFile", "parameters": [ + { + "name": "filePath", + "in": "path", + "description": "The path to the sitemap file", + "required": true, + "schema": { + "type": "string", + "pattern": ".*\\.(xml|gz)$" + } + }, { "name": "sw-language-id", "in": "header", @@ -20043,52 +20030,20 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/Criteria" - }, - { - "properties": { - "onlyAvailable": { - "description": "List only available", - "type": "boolean" - } - }, - "type": "object" - } - ] - } - } - } - }, "responses": { "200": { - "description": "", + "description": "Returns the blob to download.", "content": { - "application/json": { + "application/xml": { "schema": { - "properties": { - "total": { - "description": "Total amount", - "type": "integer" - }, - "aggregations": { - "description": "aggregation result", - "type": "object" - }, - "elements": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethod" - } - } - }, - "type": "object" + "type": "string", + "format": "binary" + } + }, + "application/gzip": { + "schema": { + "type": "string", + "format": "binary" } } } @@ -20101,33 +20056,70 @@ ] } }, - "/_info/openapi3.json": { + "/breadcrumb/{id}": { "get": { "tags": [ - "System Info & Health Check" + "Experimental", + "Breadcrumb" ], - "summary": "Get OpenAPI Specification", - "description": "Get information about the store API in OpenAPI format.", - "operationId": "api-info", + "summary": "Fetch a breadcrumb", + "description": "Perform search to get category or product breadcrumb. \n\nExperimental API, not part of our backwards compatibility promise, thus this API can introduce breaking changes at any time.", + "operationId": "readBreadcrumb", "parameters": [ + { + "name": "id", + "in": "path", + "description": "UUID for product or category", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, { "name": "type", "in": "query", - "description": "Type of the api", + "description": "Type: category or product (optional - default: product)", + "required": false, "schema": { "type": "string", "enum": [ - "jsonapi", - "json" + "product", + "category" ] } + }, + { + "name": "referrerCategoryId", + "in": "query", + "description": "UUID for referrer category only used for product breadcrumb", + "required": false, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } } ], "responses": { "200": { - "$ref": "#/components/responses/OpenApi3" + "description": "Search result containing SeoUrl\\'s to be used as breadcrumb.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BreadcrumbCollection" + } + } + } + }, + "400": { + "$ref": "#/components/responses/400" } - } + }, + "security": [ + { + "ApiKey": [] + } + ] } } },