dos: add docs on overriding allowed fields in routes (#12233)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2025-04-18 11:38:36 +03:00
1 parent 28958b2e26
commit a3aa5d7a66
45 files changed
+17018 -16584

No files matched your search

+29
View File
@@ -639,6 +639,35 @@ This returns the variants of each product, but the variants only have their `id`
</DividedMarkdownLayout> </DividedMarkdownLayout>
<DividedMarkdownLayout>
<DividedMarkdownContent>
### Select Custom Linked Data Models
Most of the API routes that accept a `fields` query parameter allow you to specify custom linked data models. For example, if you linked a `Brand` to a `Product`, you can pass `brand` in the `fields` query parameter to retrieve the brand of each product.
However, some API routes restrict the fields and relations you can retrieve. To learn about those API routes and how to override the allowed fields and relations, refer to the [Retrieve Custom Linked Data Models from Medusa's API routes](!docs!/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
</DividedMarkdownContent>
</DividedMarkdownLayout>
<DividedMarkdownLayout>
<Feedback
event="survey_api-ref"
extraData={{
area: "admin",
section: "select-fields"
}}
pathName="/api/admin"
question="Was this section helpful?"
vertical={true}
/>
</DividedMarkdownLayout>
</SectionContainer> </SectionContainer>
<SectionContainer noTopPadding={true}> <SectionContainer noTopPadding={true}>
+14
View File
@@ -597,6 +597,20 @@ This returns the variants of each product, but the variants only have their `id`
<DividedMarkdownLayout> <DividedMarkdownLayout>
<DividedMarkdownContent>
### Select Custom Linked Data Models
Most of the API routes that accept a `fields` query parameter allow you to specify custom linked data models. For example, if you linked a `Brand` to a `Product`, you can pass `brand` in the `fields` query parameter to retrieve the brand of each product.
However, some API routes restrict the fields and relations you can retrieve. To learn about those API routes and how to override the allowed fields and relations, refer to the [Retrieve Custom Linked Data Models from Medusa's API routes](!docs!/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
</DividedMarkdownContent>
</DividedMarkdownLayout>
<DividedMarkdownLayout>
<Feedback <Feedback
event="survey_api-ref" event="survey_api-ref"
extraData={{ extraData={{
@@ -8002,12 +8002,12 @@ paths:
parameters: parameters:
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -11404,12 +11404,12 @@ paths:
parameters: parameters:
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -11533,12 +11533,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -11603,12 +11603,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -11811,12 +11811,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -12037,12 +12037,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -12218,12 +12218,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -12295,12 +12295,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -12475,12 +12475,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -12572,14 +12572,15 @@ paths:
- name: fields - name: fields
in: query in: query
description: |- description: |-
"Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. Without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -27190,12 +27191,12 @@ paths:
parameters: parameters:
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -27767,12 +27768,12 @@ paths:
parameters: parameters:
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -27852,12 +27853,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: include_ancestors_tree - name: include_ancestors_tree
@@ -27938,12 +27939,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -28117,12 +28118,12 @@ paths:
type: string type: string
- name: fields - name: fields
in: query in: query
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: 'Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. NOTE: This route doesn''t allow expanding custom relations.' description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -63188,7 +63189,11 @@ components:
continueOnPermanentFailure: continueOnPermanentFailure:
type: boolean type: boolean
title: continueOnPermanentFailure title: continueOnPermanentFailure
description: Whether the step continues executing even if its status is changed to failed. description: Whether the workflow should continue executing even if its status is changed to failed.
skipOnPermanentFailure:
type: boolean
title: skipOnPermanentFailure
description: Whether the workflow should skip subsequent steps in case of a permanent failure.
maxRetries: maxRetries:
type: number type: number
title: maxRetries title: maxRetries
@@ -12,8 +12,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -22,8 +25,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -4227,8 +4233,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -4237,8 +4246,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -18,8 +18,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -28,8 +31,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -84,8 +90,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -94,8 +103,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -18,8 +18,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -28,8 +31,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -255,8 +261,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -265,8 +274,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -24,8 +24,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -34,8 +37,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -99,8 +105,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -109,8 +118,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -264,8 +276,11 @@ delete:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -274,8 +289,11 @@ delete:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -16,13 +16,18 @@ post:
- name: fields - name: fields
in: query in: query
description: >- description: >-
"Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default fields, if a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. using `-` will remove it from the default fields.
without prefix it will replace the entire default fields. NOTE: This without prefix it will replace the entire default fields. This API route
route doesn't allow expanding custom relations." restricts the fields that can be selected. Learn how to override the
retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -31,8 +36,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
If a field is prefixed with `+` it will be added to the default If a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. Without fields, using `-` will remove it from the default fields. Without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -13,8 +13,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -23,8 +26,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -683,8 +689,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -693,8 +702,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -18,8 +18,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -28,8 +31,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: include_ancestors_tree - name: include_ancestors_tree
@@ -124,8 +130,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -134,8 +143,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -17,8 +17,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. NOTE: This route doesn't allow replace the entire default fields. This API route restricts the fields
expanding custom relations. that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -27,8 +30,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. NOTE: This route prefix it will replace the entire default fields. This API route
doesn't allow expanding custom relations. restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -2842,7 +2842,7 @@ paths:
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
requestBody: requestBody:
@@ -2945,12 +2945,12 @@ paths:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -3029,7 +3029,7 @@ paths:
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -3120,12 +3120,12 @@ paths:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -3281,12 +3281,12 @@ paths:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -3445,12 +3445,12 @@ paths:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -3533,12 +3533,12 @@ paths:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -3691,12 +3691,12 @@ paths:
url: https://docs.medusajs.com/api/store#publishable-api-key url: https://docs.medusajs.com/api/store#publishable-api-key
- name: fields - name: fields
in: query in: query
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
required: false required: false
schema: schema:
type: string type: string
title: fields title: fields
description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -21335,7 +21335,11 @@ components:
continueOnPermanentFailure: continueOnPermanentFailure:
type: boolean type: boolean
title: continueOnPermanentFailure title: continueOnPermanentFailure
description: Whether the step continues executing even if its status is changed to failed. description: Whether the workflow should continue executing even if its status is changed to failed.
skipOnPermanentFailure:
type: boolean
title: skipOnPermanentFailure
description: Whether the workflow should skip subsequent steps in case of a permanent failure.
maxRetries: maxRetries:
type: number type: number
title: maxRetries title: maxRetries
@@ -34,7 +34,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
requestBody: requestBody:
@@ -25,7 +25,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -34,7 +38,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -103,7 +111,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -26,7 +26,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -35,7 +39,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
- name: offset - name: offset
@@ -182,7 +190,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -191,7 +203,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -27,7 +27,11 @@ get:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -36,7 +40,11 @@ get:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -104,7 +112,11 @@ post:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -113,7 +125,11 @@ post:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -249,7 +265,11 @@ delete:
Comma-separated fields that should be included in the returned data. if Comma-separated fields that should be included in the returned data. if
a field is prefixed with `+` it will be added to the default fields, a field is prefixed with `+` it will be added to the default fields,
using `-` will remove it from the default fields. without prefix it will using `-` will remove it from the default fields. without prefix it will
replace the entire default fields. replace the entire default fields. This API route restricts the fields
that can be selected. Learn how to override the retrievable fields in
the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
required: false required: false
schema: schema:
type: string type: string
@@ -258,7 +278,11 @@ delete:
Comma-separated fields that should be included in the returned data. Comma-separated fields that should be included in the returned data.
if a field is prefixed with `+` it will be added to the default if a field is prefixed with `+` it will be added to the default
fields, using `-` will remove it from the default fields. without fields, using `-` will remove it from the default fields. without
prefix it will replace the entire default fields. prefix it will replace the entire default fields. This API route
restricts the fields that can be selected. Learn how to override the
retrievable fields in the [Retrieve Custom
Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links)
documentation.
externalDocs: externalDocs:
url: '#select-fields-and-relations' url: '#select-fields-and-relations'
security: security:
@@ -31,7 +31,7 @@ Medusa's existing API routes accept a `fields` query parameter that allows you t
<Note> <Note>
Learn more about selecting fields and relations in the [API Reference](!api!/admin#select-fields-and-relations). Learn more about using the `fields` query parameter to retrieve custom linked data models in the [Retrieve Custom Linked Data Models from Medusa's API Routes](../../../fundamentals/api-routes/retrieve-custom-links/page.mdx) chapter.
</Note> </Note>
@@ -0,0 +1,92 @@
export const metadata = {
title: `${pageNumber} Retrieve Custom Links from Medusa's API Route`,
}
# {metadata.title}
In this chapter, you'll learn how to retrieve custom data models linked to existing Medusa data models from Medusa's API routes.
## Why Retrieve Custom Linked Data Models?
Often, you'll link custom data models to existing Medusa data models to implement custom features or expand on existing ones.
For example, to add brands for products, you can create a `Brand` data model in a Brand Module, then [define a link](../../module-links/page.mdx) to the [Product Module](!resources!/commerce-modules/product)'s `Product` data model.
When you implement this customization, you might need to retrieve the brand of a product using the existing [Get Product API Route](!api!/admin#products_getproductsid). You can do this by passing the linked data model's name in the `fields` query parameter of the API route.
---
## How to Retrieve Custom Linked Data Models Using `fields`?
Most of Medusa's API routes accept a `fields` query parameter that allows you to specify the fields and relations to retrieve in the resource, such as a product.
For example, to retrieve the brand of a product, you can pass the `brand` field in the `fields` query parameter of the [Get Product API Route](!api!/admin#products_getproductsid):
```bash
curl 'http://localhost:9000/admin/products/{id}?fields=*brand' \
-H 'Authorization: Bearer {access_token}'
```
The `fields` query parameter accepts a comma-separated list of fields and relations to retrieve. To learn more about using the `fields` query parameter, refer to the [API Reference](!api!/store#select-fields-and-relations).
By prefixing `brand` with an asterisk (`*`), you retrieve all the default fields of the product, including the `brand` field. If you don't include the `*` prefix, the response will only include the product's brand.
---
## API Routes that Restrict Retrievable Fields
Some of Medusa's API routes restrict the fields and relations you can retrieve, which means you can't pass your custom linked data models in the `fields` query parameter. Medusa makes this restriction to ensure the API routes are performant and secure.
The API routes that restrict the fields and relations you can retrieve are:
- [Customer Store API Routes](!api!/store#customers)
- [Customer Admin API Routes](!api!/admin#customers)
- [Product Category Admin API Routes](!api!/admin#product-categories)
### How to Override Allowed Fields and Relations
For these routes, you need to override the allowed fields and relations to be retrieved. You can do this by adding a [middleware](../middlewares/page.mdx) to those routes.
For example, to allow retrieving the `b2b_company` of a customer using the [Get Customer Admin API Route](!api!/admin#customers_getcustomersid), create the file `src/api/middlewares.ts` with the following content:
<Note>
Learn how to create a middleware in the [Middlewares](../middlewares/page.mdx) chapter.
</Note>
export const highlights = [
["10", "req.allowed", "Modify the allowed fields and relations to be retrieved"],
]
```ts title="src/api/middlewares.ts" highlights={highlights}
import { defineMiddlewares } from "@medusajs/medusa";
export default defineMiddlewares({
routes: [
{
matcher: "/store/customers/me",
method: "GET",
middlewares: [
(req, res, next) => {
req.allowed?.push("b2b_company");
next();
},
],
},
],
});
```
In this example, you apply a middleware to the [Get Customer Admin API Route](!api!/admin#customers_getcustomersid).
The request object passed to middlewares has an `allowed` property that contains the fields and relations that can be retrieved. So, you modify the `allowed` array to include the `b2b_company` field.
You can now retrieve the `b2b_company` field using the `fields` query parameter of the [Get Customer Admin API Route](!api!/admin#customers_getcustomersid):
```bash
curl 'http://localhost:9000/admin/customers/{id}?fields=*b2b_company' \
-H 'Authorization: Bearer {access_token}'
```
In this example, you retrieve the `b2b_company` relation of the customer using the `fields` query parameter.
+3 -2
View File
@@ -85,7 +85,7 @@ export const generatedEditDates = {
"app/learn/customization/customize-admin/widget/page.mdx": "2025-02-05T09:10:18.163Z", "app/learn/customization/customize-admin/widget/page.mdx": "2025-02-05T09:10:18.163Z",
"app/learn/customization/extend-features/define-link/page.mdx": "2025-04-17T08:50:17.036Z", "app/learn/customization/extend-features/define-link/page.mdx": "2025-04-17T08:50:17.036Z",
"app/learn/customization/extend-features/page.mdx": "2024-12-09T11:02:39.244Z", "app/learn/customization/extend-features/page.mdx": "2024-12-09T11:02:39.244Z",
"app/learn/customization/extend-features/query-linked-records/page.mdx": "2025-03-25T13:48:49.973Z", "app/learn/customization/extend-features/query-linked-records/page.mdx": "2025-04-18T07:41:05.912Z",
"app/learn/customization/integrate-systems/handle-event/page.mdx": "2024-12-24T15:09:24.653Z", "app/learn/customization/integrate-systems/handle-event/page.mdx": "2024-12-24T15:09:24.653Z",
"app/learn/customization/integrate-systems/page.mdx": "2024-12-09T10:40:08.528Z", "app/learn/customization/integrate-systems/page.mdx": "2024-12-09T10:40:08.528Z",
"app/learn/customization/integrate-systems/schedule-task/page.mdx": "2025-01-28T16:42:42.071Z", "app/learn/customization/integrate-systems/schedule-task/page.mdx": "2025-01-28T16:42:42.071Z",
@@ -119,5 +119,6 @@ export const generatedEditDates = {
"app/learn/production/worker-mode/page.mdx": "2025-03-11T15:21:50.906Z", "app/learn/production/worker-mode/page.mdx": "2025-03-11T15:21:50.906Z",
"app/learn/fundamentals/module-links/read-only/page.mdx": "2025-03-21T09:14:54.944Z", "app/learn/fundamentals/module-links/read-only/page.mdx": "2025-03-21T09:14:54.944Z",
"app/learn/fundamentals/data-models/properties/page.mdx": "2025-03-18T07:57:17.826Z", "app/learn/fundamentals/data-models/properties/page.mdx": "2025-03-18T07:57:17.826Z",
"app/learn/fundamentals/framework/page.mdx": "2025-04-17T16:07:19.090Z" "app/learn/fundamentals/framework/page.mdx": "2025-04-17T16:07:19.090Z",
"app/learn/fundamentals/api-routes/retrieve-custom-links/page.mdx": "2025-04-18T07:38:56.729Z"
} }
+12 -2
View File
@@ -628,10 +628,20 @@ export const generatedSidebars = [
"isPathHref": true, "isPathHref": true,
"type": "link", "type": "link",
"path": "/learn/fundamentals/api-routes/additional-data", "path": "/learn/fundamentals/api-routes/additional-data",
"title": "Additional Data", "title": "Pass Additional Data",
"children": [], "children": [],
"chapterTitle": "3.6.10. Additional Data", "chapterTitle": "3.6.10. Pass Additional Data",
"number": "3.6.10." "number": "3.6.10."
},
{
"loaded": true,
"isPathHref": true,
"type": "link",
"path": "/learn/fundamentals/api-routes/retrieve-custom-links",
"title": "Retrieve Custom Links",
"children": [],
"chapterTitle": "3.6.11. Retrieve Custom Links",
"number": "3.6.11."
} }
], ],
"chapterTitle": "3.6. API Routes", "chapterTitle": "3.6. API Routes",
File diff suppressed because it is too large. Load diff
+6 -1
View File
@@ -332,7 +332,12 @@ export const sidebars = [
{ {
type: "link", type: "link",
path: "/learn/fundamentals/api-routes/additional-data", path: "/learn/fundamentals/api-routes/additional-data",
title: "Additional Data", title: "Pass Additional Data",
},
{
type: "link",
path: "/learn/fundamentals/api-routes/retrieve-custom-links",
title: "Retrieve Custom Links",
}, },
], ],
}, },
@@ -19,14 +19,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -7,14 +7,16 @@
* parameters: * parameters:
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* - name: offset * - name: offset
@@ -13,14 +13,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -13,14 +13,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* - name: offset * - name: offset
@@ -19,14 +19,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -7,14 +7,16 @@
* parameters: * parameters:
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* - name: offset * - name: offset
@@ -13,14 +13,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* - name: include_ancestors_tree * - name: include_ancestors_tree
@@ -7,14 +7,16 @@
* parameters: * parameters:
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -13,14 +13,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -14,14 +14,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -20,14 +20,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -15,15 +15,17 @@
* - name: fields * - name: fields
* in: query * in: query
* description: |- * description: |-
* "Comma-separated fields that should be included in the returned data. * Comma-separated fields that should be included in the returned data.
* if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields. * if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
* without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. Without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. Without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -7,14 +7,16 @@
* parameters: * parameters:
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -13,14 +13,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -14,14 +14,16 @@
* type: string * type: string
* - name: fields * - name: fields
* in: query * in: query
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: "Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. NOTE: This route doesn't allow expanding custom relations." * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -26,13 +26,15 @@
* - name: fields * - name: fields
* in: query * in: query
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -20,13 +20,15 @@
* - name: fields * - name: fields
* in: query * in: query
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -20,13 +20,15 @@
* - name: fields * - name: fields
* in: query * in: query
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* - name: offset * - name: offset
@@ -23,13 +23,15 @@
* - name: fields * - name: fields
* in: query * in: query
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -25,7 +25,8 @@
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* requestBody: * requestBody:
@@ -25,7 +25,8 @@
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -20,13 +20,15 @@
* - name: fields * - name: fields
* in: query * in: query
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security:
@@ -26,13 +26,15 @@
* - name: fields * - name: fields
* in: query * in: query
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* required: false * required: false
* schema: * schema:
* type: string * type: string
* title: fields * title: fields
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default * description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * url: "#select-fields-and-relations"
* security: * security: