Git Product home page Git Product logo

shopware-v6-store-api-client's Introduction

OpenAPIClient-php

This endpoint reference contains an overview of all endpoints comprising the Shopware Store API

Installation & Usage

Requirements

PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.

Composer

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

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

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;
}

API Endpoints

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

Models

Authorization

ApiKey

  • Type: API key
  • API key parameter name: sw-access-key
  • Location: HTTP header

ContextToken

  • Type: API key
  • API key parameter name: sw-context-token
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 6.4.9999999.9999999-dev
    • Package version: 1.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

shopware-v6-store-api-client's People

Watchers

Tim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.