- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Links between Sales Channel Module and Other Modules
This document showcases the module links defined between the Sales Channel Module and other commerce modules.
Summary#
The Sales Channel Module has the following links to other modules:
ApiKey
data model of the API Key Module <>SalesChannel
data model.SalesChannel
data model <>Cart
data model of the Cart Module. (Read-only)SalesChannel
data model <>Order
data model of the Order Module. (Read-only)Product
data model of the Product Module <>SalesChannel
data model.SalesChannel
data model <>StockLocation
data model of the Stock Location Module.
API Key Module#
A publishable API key allows you to easily specify the sales channel scope in a client request.
Medusa defines a link between the ApiKey
and the SalesChannel
data models.
Retrieve with Query#
To retrieve the API keys associated with a sales channel with Query, pass publishable_api_keys.*
in fields
:
Manage with Link#
To manage the sales channels of an API key, use Link:
Cart Module#
Medusa defines a read-only link between the SalesChannel
data model and the Cart Module's SalesChannel
data model. This means you can retrieve the details of a sales channel's carts, but you don't manage the links in a pivot table in the database. The sales channel of a cart is determined by the sales_channel_id
property of the Cart
data model.
Retrieve with Query#
To retrieve the carts of a sales channel with Query, pass carts.*
in fields
:
Order Module#
Medusa defines a read-only link between the SalesChannel
data model and the Order Module's Order
data model. This means you can retrieve the details of a sales channel's orders, but you don't manage the links in a pivot table in the database. The sales channel of an order is determined by the sales_channel_id
property of the Order
data model.
Retrieve with Query#
To retrieve the orders of a sales channel with Query, pass orders.*
in fields
:
Product Module#
A product has different availability for different sales channels. Medusa defines a link between the Product
and the SalesChannel
data models.
A product can be available in more than one sales channel. You can retrieve only the products of a sales channel.
Retrieve with Query#
To retrieve the products of a sales channel with Query, pass products.*
in fields
:
Manage with Link#
To manage the sales channels of a product, use Link:
Stock Location Module#
A stock location is associated with a sales channel. This scopes inventory quantities associated with that stock location by the associated sales channel.
Medusa defines a link between the SalesChannel
and StockLocation
data models.
Retrieve with Query#
To retrieve the stock locations of a sales channel with Query, pass stock_locations.*
in fields
:
Manage with Link#
To manage the stock locations of a sales channel, use Link: