---
title: RESTful API | Shopware Community Hub
description: >-
  Explore Shopware’s API-first architecture, learning how to leverage RESTful
  APIs for seamless integration, customization, and extension of ecommerce…
canonical_url: 'https://hub.shopware.com/learn/unit/solutions-architect-restful-api'
---

# RESTful API

<LearningObjectives>

- Understand how Shopware's **RESTful APIs** are structured and categorized.
- Recognize the **key concepts and principles** underlying Shopware's API-first approach.
- Identify how the RESTful APIs can be **leveraged to extend** and integrate Shopware functionalities.

</LearningObjectives>

# RESTful API

Shopware is built with an API-first philosophy, meaning that all functionalities available within the platform can be accessed and managed via its RESTful APIs. This approach ensures developers can seamlessly integrate Shopware with other systems and create custom applications without limitations. This unit will provide an overview of how the APIs are structured and categorized, along with key concepts that guide their usage.

## Key Concepts of Shopware RESTful APIs

Shopware's API-first approach ensures that every feature within the platform is accessible via APIs. This design philosophy emphasizes consistency and completeness, providing developers with a powerful toolset to interact with the platform programmatically. By making all functionalities available through APIs, Shopware offers a flexible and scalable way to integrate with other systems and develop custom applications. This approach allows developers to create seamless integrations and extend the platform's capabilities without limitations.

### Authorization

Access to the APIs requires proper authentication and authorization to ensure security and data integrity. Shopware employs OAuth2 for secure token-based authentication, which provides robust security and allows for fine-grained access control. Additionally, API keys can be used for simpler use cases, offering a straightforward method for authenticating requests. OAuth2's benefits include enhanced security, better access control, and the ability to integrate with various identity providers.

### Endpoints

Shopware's APIs are designed around resources, such as products, orders, and customers. Each resource is represented by a set of endpoints that perform CRUD operations. These endpoints use standard HTTP methods (GET, POST, PUT, DELETE) to interact with resources, ensuring a consistent and intuitive API design. The responses are formatted in JSON, providing a uniform and readable structure for data exchange. This resource-oriented design simplifies the process of interacting with the platform's data.

### Customization

The highly extensible APIs allow developers to create custom endpoints and integrate additional functionalities. Shopware supports the creation of webhooks for real-time notifications when certain events occur within the platform. Developers can also add new API endpoints using the app system, which enables the extension of Shopware's capabilities without modifying the core code. Detailed information on adding API endpoints can be found in the [Shopware Developer Documentation](https://developer.shopware.com/docs/guides/plugins/apps/starter/add-api-endpoint.html).

### API Standard

The APIs use standard data formats and naming conventions to ensure compatibility and ease of use. JSON is the chosen format for all API responses and requests, while CamelCase is used for naming fields and attributes. This standardization enhances the developer experience by providing clear and predictable data structures. Additionally, the APIs support pagination and filtering mechanisms to handle large data sets efficiently. Pagination allows developers to retrieve data in manageable chunks, while filtering enables refined queries to fetch specific subsets of data based on certain criteria.

## Structure and Categorization of Shopware APIs

The Shopware RESTful APIs are organized into several categories, each serving specific purposes within the platform. These categories are designed to cover all aspects of ecommerce operations, providing comprehensive and flexible interfaces for developers.

### Admin API

The Admin API is used for managing the backend aspects of the Shopware platform. It supports CRUD (Create, Read, Update, Delete) operations for administrative data such as products, orders, and customers.  This API allows integrations to maintain the backend data and settings programmatically. Admin API authentication is done with a token, which is connected either to an Admin user, inheriting its permissions, or to an integration with specific permissions.

**Key Endpoints**:

- Product Management: Endpoints for creating and managing products, including details, prices, and stock. Read more: [Product Management via API](https://shopware.stoplight.io/docs/admin-api/e51cf55ab14a4-product-management).

- Order Management: Endpoints for handling customer orders, including creation, updates, and status changes. Read more: [Order Management via API](https://shopware.stoplight.io/docs/admin-api/fdd24cc76f22d-order-management).

- Customer Management: Endpoints for managing customer data, including account information and order history. Read more: [Customer API](https://shopware.stoplight.io/docs/admin-api/9a2bfcaac4cf6-list-with-basic-information-of-customer-resources).

- Configuration: Endpoints for setting and retrieving configuration settings within the admin panel. Read more: [System config API](https://shopware.stoplight.io/docs/admin-api/b5f7b877ad7d1-list-with-basic-information-of-system-config-resources).

Read more about Admin API: [Quick Start Guide](https://shopware.stoplight.io/docs/admin-api/twpxvnspkg3yu-quick-start-guide).

### Store API

The Store API is designed for interactions with the storefront, enabling front-end operations. Customers can register, log in, and manage their accounts through this API using OAuth2 authentication. For efficient development, an API client can be generated using the npm package [@shopware/api-gen](https://www.npmjs.com/package/@shopware/api-gen), streamlining the integration process for developers.

Key Endpoints:

- Product Retrieval: Endpoints for fetching product information, categories, and listings.

- Shopping Cart: Endpoints for managing the shopping cart, including adding, updating, and removing items.

- Checkout Process: Endpoints for handling the checkout process, including payment and shipping options.

- Customer Accounts: Endpoints for customer registration, login, and account management.

*Why OAuth2 for customer data*

OAuth2 is a widely used authentication framework that provides several benefits for securing API access. It allows applications to access user data without exposing user credentials. OAuth2 supports token-based authentication, which enables fine-grained access control and reduces the risk of credential leakage. OAuth2's implementation in Shopware ensures that API interactions are secure, scalable, and compliant with modern security standards.

### Using the Shopware RESTful APIs

To effectively use the Shopware RESTful APIs, developers should familiarize themselves with the following:

1\. API Documentation

The [Shopware API Documentation](https://shopware.stoplight.io/) provides comprehensive details on all available endpoints, including usage examples and response formats. It serves as the primary reference for understanding and implementing API interactions.

2\. Authentication Setup

To set up authentication, developers need to obtain API credentials from the Shopware admin panel and implement OAuth2 or API key authentication in their application.

3\. Making API Requests

Developers can use tools like Postman, cURL, or custom scripts to test and interact with the APIs. For example, to retrieve a list of products, a GET request can be sent to `/api/product`.

For more detailed information, refer to the [Shopware API Documentation](https://shopware.stoplight.io/) and the [Shopware Developer Concepts](https://developer.shopware.com/docs/concepts/api/).
