20 lines
1.0 KiB
Plaintext
20 lines
1.0 KiB
Plaintext
export const metadata = {
|
|
title: `Relations between API Key Module and Other Modules`,
|
|
}
|
|
|
|
# {metadata.title}
|
|
|
|
When Commerce Modules are used together in a Medusa application, the Medusa application handles building the relations between these modules.
|
|
|
|
This document showcases the relation between the API Key Module and other Commerce Modules.
|
|
|
|
## Sales Channel Module
|
|
|
|
You can create a publishable API key and associate it with a sales channel. The Medusa application forms a relation between the `ApiKey` and the `SalesChannel` data models.
|
|
|
|

|
|
|
|
This is useful to avoid passing the sales channel's ID as a parameter of every request, and instead pass the publishable API key in the header of any request to the Store API route.
|
|
|
|
Learn more about this in the [Sales Channel Module's documentation](../../sales-channel/publishable-api-keys/page.mdx).
|