This endpoint reference contains an overview of all endpoints comprising the Shopware Store API
PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/servexs/shopware-v6-store-api-client.git"
}
],
"require": {
"servexs/shopware-v6-store-api-client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = ServeXS\Shopware\v6\Store\Configuration::getDefaultConfiguration()->setApiKey('sw-access-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ServeXS\Shopware\v6\Store\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sw-access-key', 'Bearer');
// Configure API key authorization: ContextToken
$config = ServeXS\Shopware\v6\Store\Configuration::getDefaultConfiguration()->setApiKey('sw-context-token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = ServeXS\Shopware\v6\Store\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sw-context-token', 'Bearer');
$apiInstance = new ServeXS\Shopware\v6\Store\Api\AddressApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$content_type = 'application/json'; // string | Content type of the request
$accept = 'application/json'; // string | Accepted response content types
$customer_address = new \ServeXS\Shopware\v6\Store\Model\CustomerAddress(); // \ServeXS\Shopware\v6\Store\Model\CustomerAddress
try {
$result = $apiInstance->createCustomerAddress($content_type, $accept, $customer_address);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AddressApi->createCustomerAddress: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to http://localhost/store-api
Class | Method | HTTP request | Description |
---|---|---|---|
AddressApi | createCustomerAddress | POST /account/address | Create a new address for a customer |
AddressApi | defaultBillingAddress | PATCH /account/address/default-billing/{addressId} | Change a customer's default billing address |
AddressApi | defaultShippingAddress | PATCH /account/address/default-shipping/{addressId} | Change a customer's default shipping address |
AddressApi | deleteCustomerAddress | DELETE /account/address/{addressId} | Delete an address of a customer |
AddressApi | listAddress | POST /account/list-address | Fetch addresses of a customer |
AddressApi | updateCustomerAddress | PATCH /account/address/{addressId} | Modify an address of a customer |
CartApi | addLineItem | POST /checkout/cart/line-item | Add items to the cart |
CartApi | deleteCart | DELETE /checkout/cart | Delete a cart |
CartApi | readCart | GET /checkout/cart | Fetch or create a cart |
CartApi | removeLineItem | DELETE /checkout/cart/line-item | Remove items from the cart |
CartApi | updateLineItem | PATCH /checkout/cart/line-item | Update items in the cart |
CategoryApi | readCategory | POST /category/{categoryId} | Fetch a single category |
CategoryApi | readCategoryList | POST /category | Fetch a list of categories |
CategoryApi | readNavigation | POST /navigation/{requestActiveId}/{requestRootId} | Fetch a navigation menu |
ContentApi | readCms | POST /cms/{id} | Fetch and resolve a CMS page |
ContentApi | readLandingPage | POST /landing-page/{landingPageId} | Fetch a landing page with the resolved CMS page |
ContentApi | sendContactMail | POST /contact-form | Submit a contact form message |
EndpointsSupportingCriteriaApi | listAddress | POST /account/list-address | Fetch addresses of a customer |
EndpointsSupportingCriteriaApi | readCategory | POST /category/{categoryId} | Fetch a single category |
EndpointsSupportingCriteriaApi | readCategoryList | POST /category | Fetch a list of categories |
EndpointsSupportingCriteriaApi | readCountry | POST /country | Fetch countries |
EndpointsSupportingCriteriaApi | readCurrency | POST /currency | Fetch currencies |
EndpointsSupportingCriteriaApi | readCustomer | POST /account/customer | Get information about current customer |
EndpointsSupportingCriteriaApi | readCustomerWishlist | POST /customer/wishlist | Fetch a wishlist |
EndpointsSupportingCriteriaApi | readLandingPage | POST /landing-page/{landingPageId} | Fetch a landing page with the resolved CMS page |
EndpointsSupportingCriteriaApi | readLanguages | POST /language | Fetch languages |
EndpointsSupportingCriteriaApi | readNavigation | POST /navigation/{requestActiveId}/{requestRootId} | Fetch a navigation menu |
EndpointsSupportingCriteriaApi | readOrder | POST /order | Fetch a list of orders |
EndpointsSupportingCriteriaApi | readPaymentMethod | POST /payment-method | Loads all available payment methods |
EndpointsSupportingCriteriaApi | readProduct | POST /product | Fetch a list of products |
EndpointsSupportingCriteriaApi | readProductReviews | POST /product/{productId}/reviews | Fetch product reviews |
EndpointsSupportingCriteriaApi | readSalutation | POST /salutation | Fetch salutations |
EndpointsSupportingCriteriaApi | readSeoUrl | POST /seo-url | Fetch SEO routes |
EndpointsSupportingCriteriaApi | readShippingMethod | POST /shipping-method | Fetch shipping methods |
LoginRegistrationApi | getCustomerGroupRegistrationInfo | GET /customer-group-registration/config/{customerGroupId} | Fetch registration settings for customer group |
LoginRegistrationApi | loginCustomer | POST /account/login | Log in a customer |
LoginRegistrationApi | logoutCustomer | POST /account/logout | Log out a customer |
LoginRegistrationApi | register | POST /account/register | Register a customer |
LoginRegistrationApi | registerConfirm | POST /account/register-confirm | Confirm a customer registration |
NewsletterApi | confirmNewsletter | POST /newsletter/confirm | Confirm a newsletter registration |
NewsletterApi | subscribeToNewsletter | POST /newsletter/subscribe | Create or remove a newsletter subscription |
NewsletterApi | unsubscribeToNewsletter | POST /newsletter/unsubscribe | Remove a newsletter subscription |
OrderApi | cancelOrder | POST /order/state/cancel | Cancel an order |
OrderApi | createOrder | POST /checkout/order | Create an order from a cart |
OrderApi | orderSetPayment | POST /order/payment | Update the payment method of an order |
OrderApi | readOrder | POST /order | Fetch a list of orders |
PaymentMethodApi | readPaymentMethod | POST /payment-method | Loads all available payment methods |
PaymentShippingApi | handlePaymentMethod | POST /handle-payment | Initiate a payment for an order |
PaymentShippingApi | readShippingMethod | POST /shipping-method | Fetch shipping methods |
ProductApi | readProduct | POST /product | Fetch a list of products |
ProductApi | readProductCrossSellings | POST /product/{productId}/cross-selling | Fetch cross-selling groups of a product |
ProductApi | readProductDetail | POST /product/{productId} | Fetch a single product |
ProductApi | readProductExport | GET /product-export/{accessKey}/{fileName} | Export product export |
ProductApi | readProductListing | POST /product-listing/{categoryId} | Fetch a product listing by category |
ProductApi | readProductReviews | POST /product/{productId}/reviews | Fetch product reviews |
ProductApi | saveProductReview | POST /product/{productId}/review | Save a product review |
ProductApi | searchPage | POST /search | Search for products |
ProductApi | searchSuggest | POST /search-suggest | Search for products (suggest) |
ProfileApi | changeEmail | POST /account/change-email | Change the customer's email address |
ProfileApi | changePassword | POST /account/change-password | Change the customer's password |
ProfileApi | changePaymentMethod | POST /account/change-payment-method/{paymentMethodId} | Change the customer's default payment method |
ProfileApi | changeProfile | POST /account/change-profile | Change the customer's information |
ProfileApi | deleteCustomer | DELETE /account/customer | Delete the customer's profile |
ProfileApi | readCustomer | POST /account/customer | Get information about current customer |
ProfileApi | recoveryPassword | POST /account/recovery-password-confirm | Reset a password with recovery credentials |
ProfileApi | sendRecoveryMail | POST /account/recovery-password | Send a password recovery mail |
SitemapRoutesApi | readSeoUrl | POST /seo-url | Fetch SEO routes |
SitemapRoutesApi | readSitemap | GET /sitemap | Fetch sitemaps |
SystemContextApi | readContext | GET /context | Fetch the current context |
SystemContextApi | readCountry | POST /country | Fetch countries |
SystemContextApi | readCurrency | POST /currency | Fetch currencies |
SystemContextApi | readLanguages | POST /language | Fetch languages |
SystemContextApi | readSalutation | POST /salutation | Fetch salutations |
SystemContextApi | updateContext | PATCH /context | Modify the current context |
WishlistApi | addProductOnWishlist | POST /customer/wishlist/add/{productId} | Add a product to a wishlist |
WishlistApi | deleteProductOnWishlist | DELETE /customer/wishlist/delete/{productId} | Remove a product from a wishlist |
WishlistApi | mergeProductOnWishlist | POST /customer/wishlist/merge | Create a wishlist for a customer |
WishlistApi | readCustomerWishlist | POST /customer/wishlist | Fetch a wishlist |
- AclRole
- App
- AppActionButton
- AppPaymentMethod
- AppTemplate
- ArrayStruct
- Cart
- CartAllOf
- CartAllOfErrors
- CartAllOfPrice
- CartAllOfTransactions
- CartItems
- CartItemsAllOf
- Category
- CategoryJsonApi
- CategoryJsonApiAllOf
- CmsBlock
- CmsPage
- CmsPageConfig
- CmsSection
- CmsSlot
- ContextTokenResponse
- Country
- CountryJsonApi
- CountryJsonApiAllOf
- CountryState
- CountryStateJsonApi
- CountryStateJsonApiAllOf
- Criteria
- CriteriaAggregations
- CriteriaFilter
- CriteriaSort
- Currency
- CurrencyCountryRounding
- CurrencyJsonApi
- CurrencyJsonApiAllOf
- CustomField
- CustomFieldSet
- CustomFieldSetRelation
- Customer
- CustomerAddress
- CustomerGroup
- CustomerRecovery
- CustomerTag
- CustomerWishlist
- CustomerWishlistProduct
- Data
- DeadMessage
- DeliveryTime
- Document
- DocumentBaseConfig
- DocumentBaseConfigSalesChannel
- DocumentType
- EntitySearchResult
- EntitySearchResultAllOf
- Error
- ErrorSource
- EventAction
- Failure
- ImportExportFile
- ImportExportLog
- ImportExportProfile
- Info
- InlineObject
- InlineObject1
- InlineObject10
- InlineObject11
- InlineObject12
- InlineObject13
- InlineObject14
- InlineObject15
- InlineObject16
- InlineObject17
- InlineObject18
- InlineObject2
- InlineObject3
- InlineObject4
- InlineObject5
- InlineObject6
- InlineObject7
- InlineObject8
- InlineObject9
- InlineResponse200
- InlineResponse2001
- Integration
- Jsonapi
- LandingPage
- LandingPageJsonApi
- LandingPageJsonApiAllOf
- Language
- LanguageJsonApi
- LanguageJsonApiAllOf
- LineItem
- Link
- LinkOneOf
- Linkage
- Locale
- LogEntry
- MailHeaderFooter
- MailTemplate
- MailTemplateMedia
- MailTemplateType
- MainCategory
- MainCategoryJsonApi
- MainCategoryJsonApiAllOf
- Media
- MediaDefaultFolder
- MediaFolder
- MediaFolderConfiguration
- MediaTag
- MediaThumbnail
- MediaThumbnailSize
- MessageQueueStats
- NewsletterRecipient
- NumberRange
- NumberRangeSalesChannel
- NumberRangeState
- NumberRangeType
- Order
- OrderAddress
- OrderCustomer
- OrderDelivery
- OrderDeliveryPosition
- OrderLineItem
- OrderPrice
- OrderRouteResponse
- OrderShippingCosts
- OrderShippingCostsListPrice
- OrderTag
- OrderTransaction
- Pagination
- PaymentMethod
- PaymentMethodJsonApi
- PaymentMethodJsonApiAllOf
- Plugin
- Product
- ProductConfiguratorSetting
- ProductCrossSelling
- ProductCrossSellingAssignedProducts
- ProductDetailResponse
- ProductExport
- ProductFeatureSet
- ProductJsonApi
- ProductJsonApiAllOf
- ProductKeywordDictionary
- ProductListingCriteria
- ProductListingCriteriaAllOf
- ProductListingFlags
- ProductListingResult
- ProductListingResultAllOf
- ProductListingResultAllOfCurrentFilters
- ProductListingResultAllOfCurrentFiltersPrice
- ProductManufacturer
- ProductMedia
- ProductPrice
- ProductReview
- ProductSearchConfig
- ProductSearchConfigField
- ProductSearchKeyword
- ProductSorting
- ProductStream
- ProductStreamFilter
- ProductVisibility
- Promotion
- PromotionDiscount
- PromotionDiscountPrices
- PromotionIndividualCode
- PromotionSalesChannel
- PromotionSetgroup
- PropertyGroup
- PropertyGroupOption
- RelationshipLinks
- RelationshipToOne
- Relationships
- RelationshipsAnyOf
- Resource
- Rule
- RuleCondition
- SalesChannel
- SalesChannelAnalytics
- SalesChannelContext
- SalesChannelContextAllOf
- SalesChannelContextAllOfContext
- SalesChannelContextAllOfCurrency
- SalesChannelContextAllOfCurrentCustomerGroup
- SalesChannelContextAllOfCustomer
- SalesChannelContextAllOfFallbackCustomerGroup
- SalesChannelContextAllOfPaymentMethod
- SalesChannelContextAllOfSalesChannel
- SalesChannelContextAllOfShippingMethod
- SalesChannelContextAllOfTaxRules
- SalesChannelDomain
- SalesChannelType
- Salutation
- SalutationJsonApi
- SalutationJsonApiAllOf
- ScheduledTask
- SeoUrl
- SeoUrlJsonApi
- SeoUrlJsonApiAllOf
- SeoUrlTemplate
- ShippingMethod
- ShippingMethodJsonApi
- ShippingMethodJsonApiAllOf
- ShippingMethodPrice
- Sitemap
- SitemapAllOf
- Snippet
- SnippetSet
- StateMachine
- StateMachineHistory
- StateMachineState
- StateMachineTransition
- Success
- SuccessResponse
- SystemConfig
- SystemConfigConfigurationValue
- Tag
- Tax
- TaxRule
- TaxRuleType
- Theme
- Unit
- User
- UserAccessKey
- UserConfig
- UserRecovery
- Webhook
- WebhookEventLog
- WishlistLoadRouteResponse
- WishlistLoadRouteResponseWishlist
- Type: API key
- API key parameter name: sw-access-key
- Location: HTTP header
- Type: API key
- API key parameter name: sw-context-token
- Location: HTTP header
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
6.4.9999999.9999999-dev
- Package version:
1.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen