chore(docs): Updated API Reference (automated) (#13794)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-10-21 09:14:39 +00:00
committed by GitHub
parent 1d63ed8ce9
commit 3d0f4086b4
67 changed files with 2475 additions and 525 deletions

View File

@@ -0,0 +1,17 @@
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.create({
value: "refund",
label: "Refund",
})
.then(({ refund_reason }) => {
console.log(refund_reason)
})

View File

@@ -0,0 +1,14 @@
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.delete("ret_123")
.then(({ deleted }) => {
console.log(deleted)
})

View File

@@ -0,0 +1,14 @@
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.retrieve("refr_123")
.then(({ refund_reason }) => {
console.log(refund_reason)
})

View File

@@ -0,0 +1,17 @@
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.update("ret_123", {
value: "refund",
label: "Refund",
})
.then(({ refund_reason }) => {
console.log(refund_reason)
})

View File

@@ -51,6 +51,7 @@ properties:
- currency_code
- limit
- used
- attribute
properties:
id:
type: string
@@ -82,6 +83,13 @@ properties:
property holds the total amount discounted so far. If the limit is
`usage`, it holds the number of times the campaign's promotions have
been used so far.
attribute:
type: string
title: attribute
description: The cart attribute to limit the budget by.
externalDocs:
url: >-
https://docs.medusajs.com/resources/commerce-modules/promotion/campaign#attribute-based-budgets
created_at:
type: string
format: date-time

View File

@@ -0,0 +1,55 @@
type: object
description: The calculated shipping option's details.
x-schemaName: AdminCreateCalculatedShippingOption
required:
- price_type
- name
- service_zone_id
- shipping_profile_id
- provider_id
properties:
price_type:
type: string
title: price_type
description: The calculated shipping option's price type.
enum:
- calculated
- flat
name:
type: string
title: name
description: The calculated shipping option's name.
service_zone_id:
type: string
title: service_zone_id
description: The ID of the associated service zone.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The ID of the associated shipping profile.
data:
type: object
description: The calculated shipping option's data.
externalDocs:
url: >-
https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property
provider_id:
type: string
title: provider_id
description: >-
The ID of the fulfillment provider handling this calculated shipping
option.
type:
$ref: ./AdminCreateShippingOptionType.yaml
type_id:
type: string
title: type_id
description: The ID of the shipping option type that this shipping option belongs to.
rules:
type: array
description: The calculated shipping option's rules.
items:
$ref: ./AdminCreateShippingOptionRule.yaml
metadata:
type: object
description: The shipping option's metadata, can hold custom key-value pairs.

View File

@@ -1,18 +1,18 @@
type: object
description: The shipping option's details.
x-schemaName: AdminCreateShippingOption
description: The flat rate shipping option's details.
x-schemaName: AdminCreateFlatRateShippingOption
required:
- price_type
- prices
- name
- service_zone_id
- shipping_profile_id
- price_type
- provider_id
- prices
properties:
name:
type: string
title: name
description: The shipping option's name.
description: The flat-rate shipping option's name.
service_zone_id:
type: string
title: service_zone_id
@@ -24,8 +24,8 @@ properties:
data:
type: object
description: >-
The shipping option's data, useful for the fulfillment provider handling
its processing.
The flat-rate shipping option's data, useful for the fulfillment provider
handling its processing.
externalDocs:
url: >-
https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
@@ -65,6 +65,35 @@ properties:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The price's rules.
items:
type: object
description: The rule's details.
x-schemaName: PriceRule
required:
- attribute
- operator
- value
properties:
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- lte
- gte
value:
type: number
title: value
description: The rule's value.
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithRegion
@@ -80,12 +109,44 @@ properties:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The price's rules.
items:
type: object
description: The rule's details.
x-schemaName: PriceRule
required:
- attribute
- operator
- value
properties:
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- lte
- gte
value:
type: number
title: value
description: The rule's value.
type_id:
type: string
title: type_id
description: The ID of the shipping option type that this shipping option belongs to.
rules:
type: array
description: The shipping option's rules.
items:
$ref: ./AdminCreateShippingOptionRule.yaml
type_id:
type: string
title: type_id
description: The ID of the shipping option type that this shipping option belongs to.
metadata:
type: object
description: The shipping option's metadata.

View File

@@ -3,6 +3,7 @@ description: The refund reason's details.
x-schemaName: AdminCreateRefundReason
required:
- label
- code
properties:
label:
type: string
@@ -12,3 +13,10 @@ properties:
type: string
title: description
description: The refund reason's description.
code:
type: string
title: code
description: The refund reason's code.
metadata:
type: object
description: The refund reason's metadata. Can hold custom key-value pairs.

View File

@@ -35,4 +35,4 @@ properties:
payment:
$ref: ./BasePayment.yaml
refund_reason:
$ref: ./RefundReason.yaml
$ref: ./BaseRefundReason.yaml

View File

@@ -4,7 +4,7 @@ x-schemaName: AdminRefundReason
required:
- id
- label
- metadata
- code
- created_at
- updated_at
properties:
@@ -36,3 +36,7 @@ properties:
format: date-time
title: updated_at
description: The date the refund reason was updated.
code:
type: string
title: code
description: The refund reason's code.

View File

@@ -0,0 +1,21 @@
type: object
description: The deletion's details.
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The refund reason's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: refund_reason
deleted:
type: boolean
title: deleted
description: Whether the refund reason was deleted.
x-schemaName: AdminRefundReasonDeleteResponse

View File

@@ -9,4 +9,8 @@ properties:
type: string
title: description
description: The refund reason's description.
code:
type: string
title: code
description: The refund reason's code.
x-schemaName: AdminUpdatePaymentRefundReason

View File

@@ -11,17 +11,6 @@ required:
- unit_price
- cart
- cart_id
- original_total
- original_subtotal
- original_tax_total
- item_total
- item_subtotal
- item_tax_total
- total
- subtotal
- tax_total
- discount_total
- discount_tax_total
properties:
id:
type: string

View File

@@ -9,14 +9,6 @@ required:
- is_tax_inclusive
- created_at
- updated_at
- original_total
- original_subtotal
- original_tax_total
- total
- subtotal
- tax_total
- discount_total
- discount_tax_total
properties:
id:
type: string

View File

@@ -35,4 +35,4 @@ properties:
payment:
type: object
refund_reason:
$ref: ./RefundReason.yaml
$ref: ./BaseRefundReason.yaml

View File

@@ -1,10 +1,10 @@
type: object
description: The refund reason's details.
x-schemaName: RefundReason
x-schemaName: BaseRefundReason
required:
- id
- label
- metadata
- code
- created_at
- updated_at
properties:
@@ -36,3 +36,7 @@ properties:
format: date-time
title: updated_at
description: The date the refund reason was updated.
code:
type: string
title: code
description: The refund reason's code.

View File

@@ -1,11 +1,137 @@
type: object
description: The shipping option's details.
description: The list of shipping options.
x-schemaName: StoreShippingOptionListResponse
required:
- shipping_options
properties:
shipping_options:
type: array
description: The shipping option's shipping options.
description: The list of shipping options.
items:
$ref: ./StoreCartShippingOption.yaml
allOf:
- $ref: ./StoreCartShippingOption.yaml
- type: object
description: The shipping option's details.
required:
- service_zone
properties:
service_zone:
type: object
description: The shipping option's service zone.
required:
- id
- fulfillment_set_id
- fulfillment_set
properties:
id:
type: string
title: id
description: The service zone's ID.
fulfillment_set_id:
type: string
title: fulfillment_set_id
description: The ID of the service zone's fulfillment set.
fulfillment_set:
type: object
description: The service zone's fulfillment set.
required:
- id
- type
- location
properties:
id:
type: string
title: id
description: The fulfillment set's ID.
type:
type: string
title: type
description: The fulfillment set's type.
location:
type: object
description: The fulfillment set's location details.
required:
- id
- address
properties:
id:
type: string
title: id
description: The location's ID.
address:
type: object
description: The location's address.
x-schemaName: StoreFulfillmentAddress
required:
- id
- company
- address_1
- address_2
- city
- country_code
- province
- postal_code
- phone
- metadata
- created_at
- updated_at
- deleted_at
properties:
id:
type: string
title: id
description: The address's ID.
company:
type: string
title: company
description: The address's company.
address_1:
type: string
title: address_1
description: The first line of the address.
address_2:
type: string
title: address_2
description: The second line of the address.
city:
type: string
title: city
description: The address's city.
country_code:
type: string
title: country_code
description: The address's country code.
example: us
province:
type: string
title: province
description: The address's province.
postal_code:
type: string
title: postal_code
description: The address's postal code.
phone:
type: string
title: phone
description: The address's phone.
metadata:
type: object
description: >-
The address's metadata. Can hold custom
key-value pairs.
created_at:
type: string
format: date-time
title: created_at
description: The date the address was created.
updated_at:
type: string
format: date-time
title: updated_at
description: The date the address was updated.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The date the address was deleted.
description: The shipping option's details.

View File

@@ -29064,6 +29064,44 @@ paths:
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:
url: '#select-fields-and-relations'
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
externalDocs:
url: '#pagination'
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
externalDocs:
url: '#pagination'
- name: order
in: query
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
externalDocs:
url: '#pagination'
- name: with_deleted
in: query
description: Whether to include deleted records in the result.
required: false
schema:
type: boolean
title: with_deleted
description: Whether to include deleted records in the result.
security:
- api_token: []
- cookie_auth: []
@@ -29175,6 +29213,44 @@ paths:
type: boolean
title: include_descendants_tree
description: Whether to retrieve a list of child categories. If you enable this, add to the `fields` query parameter `category_children` to set the children of a category in this field. You can either pass `*category_children` to retreieve the fields of all child categories, or select specific fields to make the response size smaller. For example, `fields=category_children.id,category_children.name`.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
externalDocs:
url: '#pagination'
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
externalDocs:
url: '#pagination'
- name: order
in: query
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
externalDocs:
url: '#pagination'
- name: with_deleted
in: query
description: Whether to include deleted records in the result.
required: false
schema:
type: boolean
title: with_deleted
description: Whether to include deleted records in the result.
security:
- api_token: []
- cookie_auth: []
@@ -29245,6 +29321,44 @@ paths:
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:
url: '#select-fields-and-relations'
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
externalDocs:
url: '#pagination'
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
externalDocs:
url: '#pagination'
- name: order
in: query
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
externalDocs:
url: '#pagination'
- name: with_deleted
in: query
description: Whether to include deleted records in the result.
required: false
schema:
type: boolean
title: with_deleted
description: Whether to include deleted records in the result.
security:
- api_token: []
- cookie_auth: []
@@ -38108,6 +38222,26 @@ paths:
schema:
$ref: '#/components/schemas/AdminCreateRefundReason'
x-codeSamples:
- lang: JavaScript
label: JS SDK
source: |-
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.create({
value: "refund",
label: "Refund",
})
.then(({ refund_reason }) => {
console.log(refund_reason)
})
- lang: Shell
label: cURL
source: |-
@@ -38169,6 +38303,23 @@ paths:
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: JavaScript
label: JS SDK
source: |-
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.retrieve("refr_123")
.then(({ refund_reason }) => {
console.log(refund_reason)
})
- lang: Shell
label: cURL
source: |-
@@ -38227,6 +38378,26 @@ paths:
schema:
$ref: '#/components/schemas/AdminUpdatePaymentRefundReason'
x-codeSamples:
- lang: JavaScript
label: JS SDK
source: |-
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.update("ret_123", {
value: "refund",
label: "Refund",
})
.then(({ refund_reason }) => {
console.log(refund_reason)
})
- lang: Shell
label: cURL
source: |-
@@ -38276,6 +38447,23 @@ paths:
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: JavaScript
label: JS SDK
source: |-
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.refundReason.delete("ret_123")
.then(({ deleted }) => {
console.log(deleted)
})
- lang: Shell
label: cURL
source: |-
@@ -38289,26 +38477,7 @@ paths:
content:
application/json:
schema:
type: object
description: The deletion's details.
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The refund reason's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: refund_reason
deleted:
type: boolean
title: deleted
description: Whether the refund reason was deleted.
$ref: '#/components/schemas/AdminRefundReasonDeleteResponse'
'400':
$ref: '#/components/responses/400_error'
'401':
@@ -45955,7 +46124,10 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateShippingOption'
oneOf:
- $ref: '#/components/schemas/AdminCreateFlatRateShippingOption'
- $ref: '#/components/schemas/AdminCreateCalculatedShippingOption'
description: The shipping option's details.
x-codeSamples:
- lang: JavaScript
label: JS SDK
@@ -57020,6 +57192,7 @@ components:
- currency_code
- limit
- used
- attribute
properties:
id:
type: string
@@ -57045,6 +57218,12 @@ components:
title: used
description: |
How much of the budget has been used. If the limit is `spend`, this property holds the total amount discounted so far. If the limit is `usage`, it holds the number of times the campaign's promotions have been used so far.
attribute:
type: string
title: attribute
description: The cart attribute to limit the budget by.
externalDocs:
url: https://docs.medusajs.com/resources/commerce-modules/promotion/campaign#attribute-based-budgets
created_at:
type: string
format: date-time
@@ -57539,6 +57718,59 @@ components:
enum:
- publishable
- secret
AdminCreateCalculatedShippingOption:
type: object
description: The calculated shipping option's details.
x-schemaName: AdminCreateCalculatedShippingOption
required:
- price_type
- name
- service_zone_id
- shipping_profile_id
- provider_id
properties:
price_type:
type: string
title: price_type
description: The calculated shipping option's price type.
enum:
- calculated
- flat
name:
type: string
title: name
description: The calculated shipping option's name.
service_zone_id:
type: string
title: service_zone_id
description: The ID of the associated service zone.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The ID of the associated shipping profile.
data:
type: object
description: The calculated shipping option's data.
externalDocs:
url: https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property
provider_id:
type: string
title: provider_id
description: The ID of the fulfillment provider handling this calculated shipping option.
type:
$ref: '#/components/schemas/AdminCreateShippingOptionType'
type_id:
type: string
title: type_id
description: The ID of the shipping option type that this shipping option belongs to.
rules:
type: array
description: The calculated shipping option's rules.
items:
$ref: '#/components/schemas/AdminCreateShippingOptionRule'
metadata:
type: object
description: The shipping option's metadata, can hold custom key-value pairs.
AdminCreateCustomerGroup:
type: object
description: The customer group's details.
@@ -57556,6 +57788,153 @@ components:
externalDocs:
url: https://docs.medusajs.com/api/admin#manage-metadata
description: Learn how to manage metadata
AdminCreateFlatRateShippingOption:
type: object
description: The flat rate shipping option's details.
x-schemaName: AdminCreateFlatRateShippingOption
required:
- price_type
- prices
- name
- service_zone_id
- shipping_profile_id
- provider_id
properties:
name:
type: string
title: name
description: The flat-rate shipping option's name.
service_zone_id:
type: string
title: service_zone_id
description: The ID of the associated service zone.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The ID of the associated shipping profile.
data:
type: object
description: The flat-rate shipping option's data, useful for the fulfillment provider handling its processing.
externalDocs:
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
price_type:
type: string
description: The shipping option's price type. If `flat`, the shipping option has a fixed price set in `prices`. Otherwise, the shipping option's price is calculated by the fulfillment provider.
enum:
- flat
- calculated
provider_id:
type: string
title: provider_id
description: The ID of the fulfillment provider handling this shipping option.
type:
$ref: '#/components/schemas/AdminCreateShippingOptionType'
prices:
type: array
description: The shipping option's prices.
items:
oneOf:
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithCurrency
required:
- currency_code
- amount
properties:
currency_code:
type: string
title: currency_code
description: The price's currency code.
example: usd
amount:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The price's rules.
items:
type: object
description: The rule's details.
x-schemaName: PriceRule
required:
- attribute
- operator
- value
properties:
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- lte
- gte
value:
type: number
title: value
description: The rule's value.
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithRegion
required:
- region_id
- amount
properties:
region_id:
type: string
title: region_id
description: The ID of the region this price is used in.
amount:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The price's rules.
items:
type: object
description: The rule's details.
x-schemaName: PriceRule
required:
- attribute
- operator
- value
properties:
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
description: The rule's operator.
enum:
- gt
- lt
- eq
- lte
- gte
value:
type: number
title: value
description: The rule's value.
type_id:
type: string
title: type_id
description: The ID of the shipping option type that this shipping option belongs to.
rules:
type: array
description: The shipping option's rules.
items:
$ref: '#/components/schemas/AdminCreateShippingOptionRule'
metadata:
type: object
description: The shipping option's metadata.
AdminCreateFulfillment:
type: object
description: The filfillment's details.
@@ -58629,6 +59008,7 @@ components:
x-schemaName: AdminCreateRefundReason
required:
- label
- code
properties:
label:
type: string
@@ -58638,6 +59018,13 @@ components:
type: string
title: description
description: The refund reason's description.
code:
type: string
title: code
description: The refund reason's code.
metadata:
type: object
description: The refund reason's metadata. Can hold custom key-value pairs.
AdminCreateRegion:
type: object
description: The region's details.
@@ -58805,92 +59192,6 @@ components:
type: string
title: label_url
description: The label's URL.
AdminCreateShippingOption:
type: object
description: The shipping option's details.
x-schemaName: AdminCreateShippingOption
required:
- name
- service_zone_id
- shipping_profile_id
- price_type
- provider_id
- prices
properties:
name:
type: string
title: name
description: The shipping option's name.
service_zone_id:
type: string
title: service_zone_id
description: The ID of the associated service zone.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The ID of the associated shipping profile.
data:
type: object
description: The shipping option's data, useful for the fulfillment provider handling its processing.
externalDocs:
url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
price_type:
type: string
description: The shipping option's price type. If `flat`, the shipping option has a fixed price set in `prices`. Otherwise, the shipping option's price is calculated by the fulfillment provider.
enum:
- flat
- calculated
provider_id:
type: string
title: provider_id
description: The ID of the fulfillment provider handling this shipping option.
type:
$ref: '#/components/schemas/AdminCreateShippingOptionType'
prices:
type: array
description: The shipping option's prices.
items:
oneOf:
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithCurrency
required:
- currency_code
- amount
properties:
currency_code:
type: string
title: currency_code
description: The price's currency code.
example: usd
amount:
type: number
title: amount
description: The price's amount.
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithRegion
required:
- region_id
- amount
properties:
region_id:
type: string
title: region_id
description: The ID of the region this price is used in.
amount:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The shipping option's rules.
items:
$ref: '#/components/schemas/AdminCreateShippingOptionRule'
type_id:
type: string
title: type_id
description: The ID of the shipping option type that this shipping option belongs to.
AdminCreateShippingOptionRule:
type: object
description: The details of the shipping option rule.
@@ -67052,7 +67353,7 @@ components:
payment:
$ref: '#/components/schemas/BasePayment'
refund_reason:
$ref: '#/components/schemas/RefundReason'
$ref: '#/components/schemas/BaseRefundReason'
AdminRefundReason:
type: object
description: The refund reason's details.
@@ -67060,7 +67361,7 @@ components:
required:
- id
- label
- metadata
- code
- created_at
- updated_at
properties:
@@ -67092,6 +67393,32 @@ components:
format: date-time
title: updated_at
description: The date the refund reason was updated.
code:
type: string
title: code
description: The refund reason's code.
AdminRefundReasonDeleteResponse:
type: object
description: The deletion's details.
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The refund reason's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: refund_reason
deleted:
type: boolean
title: deleted
description: Whether the refund reason was deleted.
x-schemaName: AdminRefundReasonDeleteResponse
AdminRegion:
type: object
description: The region's details.
@@ -69791,6 +70118,10 @@ components:
type: string
title: description
description: The refund reason's description.
code:
type: string
title: code
description: The refund reason's code.
x-schemaName: AdminUpdatePaymentRefundReason
AdminUpdatePriceList:
type: object
@@ -71651,17 +71982,6 @@ components:
- unit_price
- cart
- cart_id
- original_total
- original_subtotal
- original_tax_total
- item_total
- item_subtotal
- item_tax_total
- total
- subtotal
- tax_total
- discount_total
- discount_tax_total
properties:
id:
type: string
@@ -71847,14 +72167,6 @@ components:
- is_tax_inclusive
- created_at
- updated_at
- original_total
- original_subtotal
- original_tax_total
- total
- subtotal
- tax_total
- discount_total
- discount_tax_total
properties:
id:
type: string
@@ -74342,7 +74654,50 @@ components:
payment:
type: object
refund_reason:
$ref: '#/components/schemas/RefundReason'
$ref: '#/components/schemas/BaseRefundReason'
BaseRefundReason:
type: object
description: The refund reason's details.
x-schemaName: BaseRefundReason
required:
- id
- label
- code
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The refund reason's ID.
label:
type: string
title: label
description: The refund reason's label.
description:
type: string
title: description
description: The refund reason's description.
metadata:
type: object
description: The refund reason's metadata, can hold custom key-value pairs.
externalDocs:
url: https://docs.medusajs.com/api/store#manage-metadata
description: Learn how to manage metadata
created_at:
type: string
format: date-time
title: created_at
description: The date the refund reason was created.
updated_at:
type: string
format: date-time
title: updated_at
description: The date the refund reason was updated.
code:
type: string
title: code
description: The refund reason's code.
BaseRegion:
type: object
description: The region's details.
@@ -76847,45 +77202,6 @@ components:
type: number
title: version
description: The order version that the transaction belongs to.
RefundReason:
type: object
description: The refund reason's details.
x-schemaName: RefundReason
required:
- id
- label
- metadata
- created_at
- updated_at
properties:
id:
type: string
title: id
description: The refund reason's ID.
label:
type: string
title: label
description: The refund reason's label.
description:
type: string
title: description
description: The refund reason's description.
metadata:
type: object
description: The refund reason's metadata, can hold custom key-value pairs.
externalDocs:
url: https://docs.medusajs.com/api/store#manage-metadata
description: Learn how to manage metadata
created_at:
type: string
format: date-time
title: created_at
description: The date the refund reason was created.
updated_at:
type: string
format: date-time
title: updated_at
description: The date the refund reason was updated.
RefundReasonResponse:
type: object
description: The refund reason's details.
@@ -86456,16 +86772,140 @@ components:
description: Learn how to manage metadata
StoreShippingOptionListResponse:
type: object
description: The shipping option's details.
description: The list of shipping options.
x-schemaName: StoreShippingOptionListResponse
required:
- shipping_options
properties:
shipping_options:
type: array
description: The shipping option's shipping options.
description: The list of shipping options.
items:
$ref: '#/components/schemas/StoreCartShippingOption'
allOf:
- $ref: '#/components/schemas/StoreCartShippingOption'
- type: object
description: The shipping option's details.
required:
- service_zone
properties:
service_zone:
type: object
description: The shipping option's service zone.
required:
- id
- fulfillment_set_id
- fulfillment_set
properties:
id:
type: string
title: id
description: The service zone's ID.
fulfillment_set_id:
type: string
title: fulfillment_set_id
description: The ID of the service zone's fulfillment set.
fulfillment_set:
type: object
description: The service zone's fulfillment set.
required:
- id
- type
- location
properties:
id:
type: string
title: id
description: The fulfillment set's ID.
type:
type: string
title: type
description: The fulfillment set's type.
location:
type: object
description: The fulfillment set's location details.
required:
- id
- address
properties:
id:
type: string
title: id
description: The location's ID.
address:
type: object
description: The location's address.
x-schemaName: StoreFulfillmentAddress
required:
- id
- company
- address_1
- address_2
- city
- country_code
- province
- postal_code
- phone
- metadata
- created_at
- updated_at
- deleted_at
properties:
id:
type: string
title: id
description: The address's ID.
company:
type: string
title: company
description: The address's company.
address_1:
type: string
title: address_1
description: The first line of the address.
address_2:
type: string
title: address_2
description: The second line of the address.
city:
type: string
title: city
description: The address's city.
country_code:
type: string
title: country_code
description: The address's country code.
example: us
province:
type: string
title: province
description: The address's province.
postal_code:
type: string
title: postal_code
description: The address's postal code.
phone:
type: string
title: phone
description: The address's phone.
metadata:
type: object
description: The address's metadata. Can hold custom key-value pairs.
created_at:
type: string
format: date-time
title: created_at
description: The date the address was created.
updated_at:
type: string
format: date-time
title: updated_at
description: The date the address was updated.
deleted_at:
type: string
format: date-time
title: deleted_at
description: The date the address was deleted.
description: The shipping option's details.
StoreShippingOptionResponse:
type: object
description: The shipping option's details.

View File

@@ -717,6 +717,49 @@ post:
documentation.
externalDocs:
url: '#select-fields-and-relations'
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
externalDocs:
url: '#pagination'
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
externalDocs:
url: '#pagination'
- name: order
in: query
description: >-
The field to sort the data by. By default, the sort order is ascending.
To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: >-
The field to sort the data by. By default, the sort order is
ascending. To change the order to descending, prefix the field name
with `-`.
externalDocs:
url: '#pagination'
- name: with_deleted
in: query
description: Whether to include deleted records in the result.
required: false
schema:
type: boolean
title: with_deleted
description: Whether to include deleted records in the result.
security:
- api_token: []
- cookie_auth: []

View File

@@ -78,6 +78,49 @@ get:
`*category_children` to retreieve the fields of all child categories,
or select specific fields to make the response size smaller. For
example, `fields=category_children.id,category_children.name`.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
externalDocs:
url: '#pagination'
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
externalDocs:
url: '#pagination'
- name: order
in: query
description: >-
The field to sort the data by. By default, the sort order is ascending.
To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: >-
The field to sort the data by. By default, the sort order is
ascending. To change the order to descending, prefix the field name
with `-`.
externalDocs:
url: '#pagination'
- name: with_deleted
in: query
description: Whether to include deleted records in the result.
required: false
schema:
type: boolean
title: with_deleted
description: Whether to include deleted records in the result.
security:
- api_token: []
- cookie_auth: []
@@ -150,6 +193,49 @@ post:
documentation.
externalDocs:
url: '#select-fields-and-relations'
- name: offset
in: query
description: The number of items to skip when retrieving a list.
required: false
schema:
type: number
title: offset
description: The number of items to skip when retrieving a list.
externalDocs:
url: '#pagination'
- name: limit
in: query
description: Limit the number of items returned in the list.
required: false
schema:
type: number
title: limit
description: Limit the number of items returned in the list.
externalDocs:
url: '#pagination'
- name: order
in: query
description: >-
The field to sort the data by. By default, the sort order is ascending.
To change the order to descending, prefix the field name with `-`.
required: false
schema:
type: string
title: order
description: >-
The field to sort the data by. By default, the sort order is
ascending. To change the order to descending, prefix the field name
with `-`.
externalDocs:
url: '#pagination'
- name: with_deleted
in: query
description: Whether to include deleted records in the result.
required: false
schema:
type: boolean
title: with_deleted
description: Whether to include deleted records in the result.
security:
- api_token: []
- cookie_auth: []

View File

@@ -214,6 +214,10 @@ post:
schema:
$ref: ../components/schemas/AdminCreateRefundReason.yaml
x-codeSamples:
- lang: JavaScript
label: JS SDK
source:
$ref: ../code_samples/JavaScript/admin_refund-reasons/post.js
- lang: Shell
label: cURL
source:

View File

@@ -35,6 +35,10 @@ get:
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: JavaScript
label: JS SDK
source:
$ref: ../code_samples/JavaScript/admin_refund-reasons_{id}/get.js
- lang: Shell
label: cURL
source:
@@ -100,6 +104,10 @@ post:
schema:
$ref: ../components/schemas/AdminUpdatePaymentRefundReason.yaml
x-codeSamples:
- lang: JavaScript
label: JS SDK
source:
$ref: ../code_samples/JavaScript/admin_refund-reasons_{id}/post.js
- lang: Shell
label: cURL
source:
@@ -144,6 +152,10 @@ delete:
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: JavaScript
label: JS SDK
source:
$ref: ../code_samples/JavaScript/admin_refund-reasons_{id}/delete.js
- lang: Shell
label: cURL
source:
@@ -156,26 +168,7 @@ delete:
content:
application/json:
schema:
type: object
description: The deletion's details.
required:
- id
- object
- deleted
properties:
id:
type: string
title: id
description: The refund reason's ID.
object:
type: string
title: object
description: The name of the deleted object.
default: refund_reason
deleted:
type: boolean
title: deleted
description: Whether the refund reason was deleted.
$ref: ../components/schemas/AdminRefundReasonDeleteResponse.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -707,7 +707,10 @@ post:
content:
application/json:
schema:
$ref: ../components/schemas/AdminCreateShippingOption.yaml
oneOf:
- $ref: ../components/schemas/AdminCreateFlatRateShippingOption.yaml
- $ref: ../components/schemas/AdminCreateCalculatedShippingOption.yaml
description: The shipping option's details.
x-codeSamples:
- lang: JavaScript
label: JS SDK