* docs: migrate ui docs to docs universe * created yarn workspace * added eslint and tsconfig configurations * fix eslint configurations * fixed eslint configurations * shared tailwind configurations * added shared ui package * added more shared components * migrating more components * made details components shared * move InlineCode component * moved InputText * moved Loading component * Moved Modal component * moved Select components * Moved Tooltip component * moved Search components * moved ColorMode provider * Moved Notification components and providers * used icons package * use UI colors in api-reference * moved Navbar component * used Navbar and Search in UI docs * added Feedback to UI docs * general enhancements * fix color mode * added copy colors file from ui-preset * added features and enhancements to UI docs * move Sidebar component and provider * general fixes and preparations for deployment * update docusaurus version * adjusted versions * fix output directory * remove rootDirectory property * fix yarn.lock * moved code component * added vale for all docs MD and MDX * fix tests * fix vale error * fix deployment errors * change ignore commands * add output directory * fix docs test * general fixes * content fixes * fix announcement script * added changeset * fix vale checks * added nofilter option * fix vale error
76 lines
2.9 KiB
Plaintext
76 lines
2.9 KiB
Plaintext
---
|
||
description: "Learn what endpoints are in Medusa. Endpoints are REST APIs that allow a frontend or external system to interact with the Backend."
|
||
---
|
||
|
||
import DocCardList from '@theme/DocCardList';
|
||
import Icons from '@theme/Icon';
|
||
|
||
# Endpoints
|
||
|
||
In this document, you’ll learn what endpoints are in Medusa.
|
||
|
||
## Introduction
|
||
|
||
The Medusa Backend is a web server built on top of [Express](https://expressjs.com/), a Node.js web framework. This provides developers with all the functionalities available within Express during development. One of those are endpoints.
|
||
|
||
Endpoints are REST APIs that allow a frontend or an external system to interact with the Medusa Backend to retrieve and process data, or perform business logic. Endpoints are [Express routes](https://expressjs.com/en/starter/basic-routing.html).
|
||
|
||
Each [commerce module](../../modules/overview.mdx) contains a set of endpoints specific to the functionalities that it provides. Since the core package that powers the Medusa Backend acts as an orchestrator of commerce modules and exposes their endpoints, the endpoints of each of these commerce modules are available within the Medusa Backend.
|
||
|
||
The commerce modules provide two types of endpoints: Store APIs and Admin APIs. The Store APIs are typically accessed from the storefront. For example, you can use the Store APIs to show customers available products or implement a cart and checkout flow.
|
||
|
||
The Admin APIs are typically accessed from an admin dashboard. For example, you can use the Admin APIs to allow admins to manage the store’s data such as products, orders, and so on.
|
||
|
||
<DocCardList colSize={6} items={[
|
||
{
|
||
type: 'link',
|
||
href: 'https://docs.medusajs.com/api/store',
|
||
label: 'Store APIs',
|
||
customProps: {
|
||
icon: Icons['server-solid'],
|
||
description: 'Check out available Store REST APIs.'
|
||
}
|
||
},
|
||
{
|
||
type: 'link',
|
||
href: 'https://docs.medusajs.com/api/admin',
|
||
label: 'Admin APIs',
|
||
customProps: {
|
||
icon: Icons['server-solid'],
|
||
description: 'Check out available Admin REST APIs.'
|
||
}
|
||
},
|
||
]} />
|
||
|
||
---
|
||
|
||
## Custom Development
|
||
|
||
Aside from using the endpoints that commerce modules, developers can create their own REST APIs either directly in the Medusa Backend, in a plugin, or in a custom commerce module.
|
||
|
||
:::tip
|
||
|
||
As the core Medusa package is completely customizable, developers can also extend the functionality even further to implement GraphQL endpoints.
|
||
|
||
:::
|
||
|
||
<DocCardList colSize={6} items={[
|
||
{
|
||
type: 'link',
|
||
href: '/development/endpoints/create',
|
||
label: 'Create an Endpoint',
|
||
customProps: {
|
||
icon: Icons['academic-cap-solid'],
|
||
description: 'Learn how to create an endpoint in Medusa.'
|
||
}
|
||
},
|
||
{
|
||
type: 'link',
|
||
href: '/development/endpoints/add-middleware',
|
||
label: 'Add a Middleware',
|
||
customProps: {
|
||
icon: Icons['academic-cap-solid'],
|
||
description: 'Learn how to add a middleware in Medusa.'
|
||
}
|
||
},
|
||
]} /> |