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

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-05-13 13:43:58 +00:00
committed by GitHub
parent 5c36bafc1d
commit c6c660c4d3
135 changed files with 2202 additions and 545 deletions
@@ -727,6 +727,24 @@ const generatedgeneratedAdminSidebarSidebar = {
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Tax Providers",
"children": [
{
"type": "link",
"path": "tax-providers_taxprovider_schema",
"title": "TaxProvider Object",
"loaded": true,
"badge": {
"variant": "neutral",
"text": "Schema"
}
}
],
"loaded": false,
"showLoadingIfEmpty": true
},
{
"type": "category",
"title": "Tax Rates",
@@ -278,12 +278,12 @@ const generatedgeneratedStoreSidebarSidebar = {
},
{
"type": "category",
"title": "Return",
"title": "Return Reasons",
"children": [
{
"type": "link",
"path": "return_return_schema",
"title": "Return Object",
"path": "return-reasons_returnreason_schema",
"title": "ReturnReason Object",
"loaded": true,
"badge": {
"variant": "neutral",
@@ -296,12 +296,12 @@ const generatedgeneratedStoreSidebarSidebar = {
},
{
"type": "category",
"title": "Return Reasons",
"title": "Returns",
"children": [
{
"type": "link",
"path": "return-reasons_returnreason_schema",
"title": "ReturnReason Object",
"path": "returns_return_schema",
"title": "Return Object",
"loaded": true,
"badge": {
"variant": "neutral",
@@ -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.taxProvider.list()
.then(({ tax_providers, count, limit, offset }) => {
console.log(tax_providers)
})
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/tax-providers' \
-H 'Authorization: Bearer {access_token}'
@@ -24,3 +24,10 @@ properties:
description: The list of claims.
items:
$ref: ./AdminClaim.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product collections.
items:
$ref: ./AdminCollection.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -1,17 +0,0 @@
type: object
description: the product collection's details.
x-schemaName: AdminCreateCollection
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, used to store custom key-value pairs.
@@ -54,3 +54,9 @@ properties:
metadata:
type: object
description: The tax region's metadata, used to store custom key-value pairs.
provider_id:
type: string
title: provider_id
description: >-
The ID of the tax provider used to calculate the tax rate in this tax
region.
@@ -24,3 +24,10 @@ properties:
description: The list of currencies.
items:
$ref: ./AdminCurrency.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of draft orders.
items:
$ref: ./AdminDraftOrder.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of fulfillment providers.
items:
$ref: ./AdminFulfillmentProvider.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of fulfillment options.
items:
$ref: ./AdminFulfillmentProviderOption.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of notifications.
items:
$ref: ./AdminNotification.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of price lists.
items:
$ref: ./AdminPriceList.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of price preferences.
items:
$ref: ./AdminPricePreference.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product categories.
items:
$ref: ./AdminProductCategory.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product tags.
items:
$ref: ./AdminProductTag.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product types.
items:
$ref: ./AdminProductType.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of return reasons.
items:
$ref: ./AdminReturnReason.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of stock locations.
items:
$ref: ./AdminStockLocation.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of stores.
items:
$ref: ./AdminStore.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -0,0 +1,16 @@
type: object
description: The tax provider's details.
x-schemaName: AdminTaxProvider
required:
- id
- is_enabled
properties:
id:
type: string
title: id
description: The tax provider's ID.
example: tp_taxjar_taxjar
is_enabled:
type: boolean
title: is_enabled
description: Whether the tax provider is enabled in the Medusa application.
@@ -1,15 +0,0 @@
type: object
description: The details to update in a collection.
x-schemaName: AdminUpdateCollection
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, can hold custom key-value pairs.
@@ -13,3 +13,9 @@ properties:
metadata:
type: object
description: The tax region's metadata, can hold custom key-value pairs.
provider_id:
type: string
title: provider_id
description: >-
The ID of the tax provider to use when calculating taxes for this tax
region.
@@ -24,3 +24,10 @@ properties:
description: The list of users.
items:
$ref: ./AdminUser.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -52,7 +52,7 @@ properties:
type: string
title: province
description: The address's lower-case ISO 3166-2 province code.
example: US-CA
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
@@ -24,3 +24,10 @@ properties:
description: The list of currencies.
items:
$ref: ./StoreCurrency.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of addresses.
items:
$ref: ./StoreCustomerAddress.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product categories.
items:
$ref: ./StoreProductCategory.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product tags.
items:
$ref: ./StoreProductTag.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product types.
items:
$ref: ./StoreProductType.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -10,53 +10,58 @@ required:
- canceled_at
- received_at
properties:
id:
type: string
title: id
description: The return's ID.
order_id:
type: string
title: order_id
description: The ID of the order this return is created for.
status:
type: string
title: status
description: The return's status.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
location_id:
type: string
title: location_id
description: The ID of the location the items are returned to.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
display_id:
type: number
title: display_id
description: The return's display ID.
refund_amount:
type: number
title: refund_amount
description: The return's refunded amount.
items:
type: array
description: The return's items.
items:
$ref: ./StoreReturnItem.yaml
received_at:
status:
type: string
title: received_at
description: The date the return was received.
description: The return's status.
enum:
- received
- canceled
- requested
- open
- partially_received
id:
type: string
title: id
description: The return's ID.
display_id:
type: number
title: display_id
description: The return's display ID.
created_at:
type: string
format: date-time
title: created_at
description: The date the return was created.
order_id:
type: string
title: order_id
description: The ID of the order this return belongs to.
location_id:
type: string
title: location_id
description: The ID of the location the return items are being returned to.
canceled_at:
type: string
title: canceled_at
description: The date the return was updated.
description: The date the return was canceled.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
refund_amount:
type: number
title: refund_amount
description: The amount to be refunded.
received_at:
type: string
title: received_at
description: The date the return items were received.
@@ -1,6 +1,13 @@
type: object
description: The return item's details.
x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties:
id:
type: string
@@ -37,10 +44,3 @@ properties:
metadata:
type: object
description: The item's metadata, can hold custom key-value pairs.
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
@@ -430,6 +430,15 @@ tags:
url: https://docs.medusajs.com/resources/commerce-modules/store
x-associatedSchema:
$ref: '#/components/schemas/AdminStore'
- name: Tax Providers
description: |
A tax provider is a third-party integration or custom logic used to calculate taxes for a cart or an order.
These API routes allow admin users to manage tax providers installed in their Medusa application.
externalDocs:
description: Learn more about the Tax Module Providers
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider
x-associatedSchema:
$ref: '#/components/schemas/AdminTaxProvider'
- name: Tax Rates
description: |
A tax rate is a percentage amount used to calculate the tax amount of each taxable item's price, such as line items or shipping methods.
@@ -6153,7 +6162,30 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminCreateCollection'
allOf:
- type: object
description: The collection's details.
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata. Can hold custom key-value pairs.
- type: object
description: The collection's details.
properties:
additional_data:
type: object
description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
description: the product collection's details.
x-codeSamples:
- lang: JavaScript
label: JS SDK
@@ -6317,7 +6349,28 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AdminUpdateCollection'
allOf:
- type: object
description: The details to update in a collection.
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata.
- type: object
description: The details to update in a collection.
properties:
additional_data:
type: object
description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
description: The details to update in a collection.
x-codeSamples:
- lang: JavaScript
label: JS SDK
@@ -22062,7 +22115,7 @@ paths:
delete:
operationId: DeleteOrderEditsId
summary: Cancel Order Edit
description: Cancel an order edit.
description: Cancel a requested order edit.
x-authenticated: true
parameters:
- name: id
@@ -22139,6 +22192,18 @@ paths:
'500':
$ref: '#/components/responses/500_error'
x-workflow: cancelBeginOrderEditWorkflow
x-events:
- name: order-edit.canceled
payload: |-
```ts
{
order_id, // The ID of the order
actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}
```
description: Emitted when an order edit request is canceled.
deprecated: false
version: 2.8.0
/admin/order-edits/{id}/confirm:
post:
operationId: PostOrderEditsIdConfirm
@@ -22201,6 +22266,18 @@ paths:
'500':
$ref: '#/components/responses/500_error'
x-workflow: confirmOrderEditRequestWorkflow
x-events:
- name: order-edit.confirmed
payload: |-
```ts
{
order_id, // The ID of the order
actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}
```
description: Emitted when an order edit request is confirmed.
deprecated: false
version: 2.8.0
/admin/order-edits/{id}/items:
post:
operationId: PostOrderEditsIdItems
@@ -22583,6 +22660,18 @@ paths:
'500':
$ref: '#/components/responses/500_error'
x-workflow: requestOrderEditRequestWorkflow
x-events:
- name: order-edit.requested
payload: |-
```ts
{
order_id, // The ID of the order
actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}
```
description: Emitted when an order edit is requested.
deprecated: false
version: 2.8.0
/admin/order-edits/{id}/shipping-method:
post:
operationId: PostOrderEditsIdShippingMethod
@@ -46729,6 +46818,181 @@ paths:
$ref: '#/components/responses/500_error'
x-workflow: updateStoresWorkflow
x-events: []
/admin/tax-providers:
get:
operationId: GetTaxProviders
summary: List Tax Providers
description: Retrieve a list of tax providers installed in the Medusa application through Tax Module Providers. The tax providers can be filtered by fields such as `id`. The tax providers can also be sorted or paginated.
x-authenticated: true
parameters:
- name: fields
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.
required: false
schema:
type: string
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.
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: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a tax provider's ID.
- type: array
description: Filter by tax provider IDs.
items:
type: string
title: id
description: A tax provider's ID.
- name: is_enabled
in: query
description: Filter by whether the tax provider is enabled.
required: false
schema:
type: boolean
title: is_enabled
description: Filter by whether the tax provider is enabled.
- name: $and
in: query
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
required: false
schema:
type: array
description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- 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.taxProvider.list()
.then(({ tax_providers, count, limit, offset }) => {
console.log(tax_providers)
})
- lang: Shell
label: cURL
source: |-
curl '{backend_url}/admin/tax-providers' \
-H 'Authorization: Bearer {access_token}'
tags:
- Tax Providers
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The pagination details.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of items retrieved.
offset:
type: number
title: offset
description: The number of items skipped before retrieving the returned items.
count:
type: number
title: count
description: The total number of items available.
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
- type: object
description: The list of tax providers.
required:
- tax_providers
properties:
tax_providers:
type: array
description: The list of tax providers.
items:
$ref: '#/components/schemas/AdminTaxProvider'
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
x-version: 2.8.0
/admin/tax-rates:
get:
operationId: GetTaxRates
@@ -48964,6 +49228,29 @@ 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.
externalDocs:
url: '#select-fields-and-relations'
- name: province_code
in: query
description: Filter by a tax region's province code.
required: false
schema:
type: string
title: province_code
description: Filter by a tax region's province code.
- name: provider_id
in: query
description: Filter by a tax provider ID to retrieve the tax regions using it.
required: false
schema:
type: string
title: provider_id
description: Filter by a tax provider ID to retrieve the tax regions using it.
- name: metadata
in: query
description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields.
required: false
schema:
type: object
description: Filter by a tax region's metadata. Refer to the [Object Query Parameter](https://docs.medusajs.com/api/admin#object) section to learn how to filter by object fields.
security:
- api_token: []
- cookie_auth: []
@@ -50279,6 +50566,14 @@ paths:
type: string
title: workflow_id
description: A workflow ID.
- name: q
in: query
description: Search query to filter by a workflow execution's searchable fields.
required: false
schema:
type: string
title: q
description: Search query to filter by a workflow execution's searchable fields.
security:
- api_token: []
- cookie_auth: []
@@ -52462,6 +52757,11 @@ components:
description: The list of claims.
items:
$ref: '#/components/schemas/AdminClaim'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminClaimOrderResponse:
type: object
description: The created claim's details.
@@ -52619,6 +52919,11 @@ components:
description: The list of product collections.
items:
$ref: '#/components/schemas/AdminCollection'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminCollectionResponse:
type: object
description: The collection's details.
@@ -52646,24 +52951,6 @@ components:
enum:
- publishable
- secret
AdminCreateCollection:
type: object
description: the product collection's details.
x-schemaName: AdminCreateCollection
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, used to store custom key-value pairs.
AdminCreateCustomerGroup:
type: object
description: The customer group's details.
@@ -53928,6 +54215,10 @@ components:
metadata:
type: object
description: The tax region's metadata, used to store custom key-value pairs.
provider_id:
type: string
title: provider_id
description: The ID of the tax provider used to calculate the tax rate in this tax region.
AdminCreateVariantInventoryItem:
type: object
description: The details of the variant-inventory item association.
@@ -54065,6 +54356,11 @@ components:
description: The list of currencies.
items:
$ref: '#/components/schemas/AdminCurrency'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminCurrencyResponse:
type: object
description: The currency's details.
@@ -55179,6 +55475,11 @@ components:
description: The list of draft orders.
items:
$ref: '#/components/schemas/AdminDraftOrder'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminDraftOrderPreview:
type: object
description: The draft order preview's details.
@@ -56396,6 +56697,11 @@ components:
description: The list of fulfillment providers.
items:
$ref: '#/components/schemas/AdminFulfillmentProvider'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminFulfillmentProviderOption:
type: object
description: The fulfillment option's details.
@@ -56439,6 +56745,11 @@ components:
description: The list of fulfillment options.
items:
$ref: '#/components/schemas/AdminFulfillmentProviderOption'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminFulfillmentResponse:
type: object
description: A fulfillment's details.
@@ -56938,6 +57249,11 @@ components:
description: The list of notifications.
items:
$ref: '#/components/schemas/AdminNotification'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminNotificationResponse:
type: object
description: The notification's details.
@@ -59901,6 +60217,11 @@ components:
description: The list of price lists.
items:
$ref: '#/components/schemas/AdminPriceList'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminPriceListPrice:
type: object
description: The details of a price list's price.
@@ -60078,6 +60399,11 @@ components:
description: The list of price preferences.
items:
$ref: '#/components/schemas/AdminPricePreference'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminPricePreferenceResponse:
type: object
description: The price preference's details.
@@ -60388,6 +60714,11 @@ components:
description: The list of product categories.
items:
$ref: '#/components/schemas/AdminProductCategory'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminProductCategoryResponse:
type: object
description: The product category's details.
@@ -60670,6 +61001,11 @@ components:
description: The list of product tags.
items:
$ref: '#/components/schemas/AdminProductTag'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminProductTagResponse:
type: object
description: The product tag's details.
@@ -60764,6 +61100,11 @@ components:
description: The list of product types.
items:
$ref: '#/components/schemas/AdminProductType'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminProductTypeResponse:
type: object
description: The product type's details.
@@ -61722,6 +62063,11 @@ components:
description: The list of return reasons.
items:
$ref: '#/components/schemas/AdminReturnReason'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminReturnReasonResponse:
type: object
description: The return reason's details.
@@ -62554,6 +62900,11 @@ components:
description: The list of stock locations.
items:
$ref: '#/components/schemas/AdminStockLocation'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminStockLocationResponse:
type: object
description: The stock location's details.
@@ -62691,6 +63042,11 @@ components:
description: The list of stores.
items:
$ref: '#/components/schemas/AdminStore'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminStoreResponse:
type: object
description: The store's details.
@@ -62700,6 +63056,23 @@ components:
properties:
store:
$ref: '#/components/schemas/AdminStore'
AdminTaxProvider:
type: object
description: The tax provider's details.
x-schemaName: AdminTaxProvider
required:
- id
- is_enabled
properties:
id:
type: string
title: id
description: The tax provider's ID.
example: tp_taxjar_taxjar
is_enabled:
type: boolean
title: is_enabled
description: Whether the tax provider is enabled in the Medusa application.
AdminTaxRate:
type: object
description: The tax rate's details.
@@ -62963,22 +63336,6 @@ components:
type: string
title: title
description: The API key's title.
AdminUpdateCollection:
type: object
description: The details to update in a collection.
x-schemaName: AdminUpdateCollection
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, can hold custom key-value pairs.
AdminUpdateCustomerGroup:
type: object
description: The details to update in a customer group.
@@ -63909,6 +64266,10 @@ components:
metadata:
type: object
description: The tax region's metadata, can hold custom key-value pairs.
provider_id:
type: string
title: provider_id
description: The ID of the tax provider to use when calculating taxes for this tax region.
AdminUpdateUser:
type: object
description: The properties to update in a user.
@@ -64088,6 +64449,11 @@ components:
description: The list of users.
items:
$ref: '#/components/schemas/AdminUser'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminUserResponse:
type: object
description: The user's details.
@@ -65584,7 +65950,7 @@ components:
type: string
title: province
description: The address's lower-case ISO 3166-2 province code.
example: US-CA
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
@@ -71397,6 +71763,11 @@ components:
description: The list of currencies.
items:
$ref: '#/components/schemas/StoreCurrency'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreCurrencyResponse:
type: object
description: The currency's details.
@@ -71605,6 +71976,11 @@ components:
description: The list of addresses.
items:
$ref: '#/components/schemas/StoreCustomerAddress'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreCustomerAddressResponse:
type: object
description: The address's details.
@@ -78266,6 +78642,11 @@ components:
description: The list of product categories.
items:
$ref: '#/components/schemas/StoreProductCategory'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreProductCategoryResponse:
type: object
description: The product category's details.
@@ -78471,6 +78852,11 @@ components:
description: The list of product tags.
items:
$ref: '#/components/schemas/StoreProductTag'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreProductTagResponse:
type: object
description: The product tag's details.
@@ -78543,6 +78929,11 @@ components:
description: The list of product types.
items:
$ref: '#/components/schemas/StoreProductType'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreProductTypeResponse:
type: object
description: The product type's details.
@@ -78792,60 +79183,72 @@ components:
- canceled_at
- received_at
properties:
id:
type: string
title: id
description: The return's ID.
order_id:
type: string
title: order_id
description: The ID of the order this return is created for.
status:
type: string
title: status
description: The return's status.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
location_id:
type: string
title: location_id
description: The ID of the location the items are returned to.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
display_id:
type: number
title: display_id
description: The return's display ID.
refund_amount:
type: number
title: refund_amount
description: The return's refunded amount.
items:
type: array
description: The return's items.
items:
$ref: '#/components/schemas/StoreReturnItem'
received_at:
status:
type: string
title: received_at
description: The date the return was received.
description: The return's status.
enum:
- received
- canceled
- requested
- open
- partially_received
id:
type: string
title: id
description: The return's ID.
display_id:
type: number
title: display_id
description: The return's display ID.
created_at:
type: string
format: date-time
title: created_at
description: The date the return was created.
order_id:
type: string
title: order_id
description: The ID of the order this return belongs to.
location_id:
type: string
title: location_id
description: The ID of the location the return items are being returned to.
canceled_at:
type: string
title: canceled_at
description: The date the return was updated.
description: The date the return was canceled.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
refund_amount:
type: number
title: refund_amount
description: The amount to be refunded.
received_at:
type: string
title: received_at
description: The date the return items were received.
StoreReturnItem:
type: object
description: The return item's details.
x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties:
id:
type: string
@@ -78882,13 +79285,6 @@ components:
metadata:
type: object
description: The item's metadata, can hold custom key-value pairs.
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
StoreReturnReason:
type: object
description: The return reason's details.
@@ -568,6 +568,18 @@ tags:
url: https://docs.medusajs.com/resources/commerce-modules/store
x-associatedSchema:
$ref: ./components/schemas/AdminStore.yaml
- name: Tax Providers
description: >
A tax provider is a third-party integration or custom logic used to
calculate taxes for a cart or an order.
These API routes allow admin users to manage tax providers installed in
their Medusa application.
externalDocs:
description: Learn more about the Tax Module Providers
url: https://docs.medusajs.com/resources/commerce-modules/tax/tax-provider
x-associatedSchema:
$ref: ./components/schemas/AdminTaxProvider.yaml
- name: Tax Rates
description: >
A tax rate is a percentage amount used to calculate the tax amount of each
@@ -1014,6 +1026,8 @@ paths:
$ref: paths/admin_stores.yaml
/admin/stores/{id}:
$ref: paths/admin_stores_{id}.yaml
/admin/tax-providers:
$ref: paths/admin_tax-providers.yaml
/admin/tax-rates:
$ref: paths/admin_tax-rates.yaml
/admin/tax-rates/{id}:
@@ -1008,7 +1008,33 @@ post:
content:
application/json:
schema:
$ref: ../components/schemas/AdminCreateCollection.yaml
allOf:
- type: object
description: The collection's details.
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata. Can hold custom key-value pairs.
- type: object
description: The collection's details.
properties:
additional_data:
type: object
description: >-
Pass additional custom data to the API route. This data is
passed to the underlying workflow under the
`additional_data` parameter.
description: the product collection's details.
x-codeSamples:
- lang: JavaScript
label: JS SDK
@@ -102,7 +102,31 @@ post:
content:
application/json:
schema:
$ref: ../components/schemas/AdminUpdateCollection.yaml
allOf:
- type: object
description: The details to update in a collection.
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata.
- type: object
description: The details to update in a collection.
properties:
additional_data:
type: object
description: >-
Pass additional custom data to the API route. This data is
passed to the underlying workflow under the
`additional_data` parameter.
description: The details to update in a collection.
x-codeSamples:
- lang: JavaScript
label: JS SDK
@@ -1,7 +1,7 @@
delete:
operationId: DeleteOrderEditsId
summary: Cancel Order Edit
description: Cancel an order edit.
description: Cancel a requested order edit.
x-authenticated: true
parameters:
- name: id
@@ -64,3 +64,15 @@ delete:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: cancelBeginOrderEditWorkflow
x-events:
- name: order-edit.canceled
payload: |-
```ts
{
order_id, // The ID of the order
actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}
```
description: Emitted when an order edit request is canceled.
deprecated: false
version: 2.8.0
@@ -45,3 +45,15 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: confirmOrderEditRequestWorkflow
x-events:
- name: order-edit.confirmed
payload: |-
```ts
{
order_id, // The ID of the order
actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}
```
description: Emitted when an order edit request is confirmed.
deprecated: false
version: 2.8.0
@@ -45,3 +45,15 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: requestOrderEditRequestWorkflow
x-events:
- name: order-edit.requested
payload: |-
```ts
{
order_id, // The ID of the order
actions, // (array) The [actions](https://docs.medusajs.com/resources/references/fulfillment/interfaces/fulfillment.OrderChangeActionDTO) to edit the order
}
```
description: Emitted when an order edit is requested.
deprecated: false
version: 2.8.0
@@ -0,0 +1,187 @@
get:
operationId: GetTaxProviders
summary: List Tax Providers
description: >-
Retrieve a list of tax providers installed in the Medusa application through
Tax Module Providers. The tax providers can be filtered by fields such as
`id`. The tax providers can also be sorted or paginated.
x-authenticated: true
parameters:
- name: fields
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.
required: false
schema:
type: string
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.
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: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: Filter by a tax provider's ID.
- type: array
description: Filter by tax provider IDs.
items:
type: string
title: id
description: A tax provider's ID.
- name: is_enabled
in: query
description: Filter by whether the tax provider is enabled.
required: false
schema:
type: boolean
title: is_enabled
description: Filter by whether the tax provider is enabled.
- name: $and
in: query
description: >-
Join query parameters with an AND condition. Each object's content is
the same type as the expected query parameters.
required: false
schema:
type: array
description: >-
Join query parameters with an AND condition. Each object's content is
the same type as the expected query parameters.
items:
type: object
title: $and
- name: $or
in: query
description: >-
Join query parameters with an OR condition. Each object's content is the
same type as the expected query parameters.
required: false
schema:
type: array
description: >-
Join query parameters with an OR condition. Each object's content is
the same type as the expected query parameters.
items:
type: object
title: $or
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: JavaScript
label: JS SDK
source:
$ref: ../code_samples/JavaScript/admin_tax-providers/get.js
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_tax-providers/get.sh
tags:
- Tax Providers
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- type: object
description: The pagination details.
required:
- limit
- offset
- count
properties:
limit:
type: number
title: limit
description: The maximum number of items retrieved.
offset:
type: number
title: offset
description: >-
The number of items skipped before retrieving the returned
items.
count:
type: number
title: count
description: The total number of items available.
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query
planner, which may be inaccurate.
x-featureFlag: index_engine
- type: object
description: The list of tax providers.
required:
- tax_providers
properties:
tax_providers:
type: array
description: The list of tax providers.
items:
$ref: ../components/schemas/AdminTaxProvider.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
x-version: 2.8.0
@@ -30,6 +30,35 @@ get:
prefix it will replace the entire default fields.
externalDocs:
url: '#select-fields-and-relations'
- name: province_code
in: query
description: Filter by a tax region's province code.
required: false
schema:
type: string
title: province_code
description: Filter by a tax region's province code.
- name: provider_id
in: query
description: Filter by a tax provider ID to retrieve the tax regions using it.
required: false
schema:
type: string
title: provider_id
description: Filter by a tax provider ID to retrieve the tax regions using it.
- name: metadata
in: query
description: >-
Filter by a tax region's metadata. Refer to the [Object Query
Parameter](https://docs.medusajs.com/api/admin#object) section to learn
how to filter by object fields.
required: false
schema:
type: object
description: >-
Filter by a tax region's metadata. Refer to the [Object Query
Parameter](https://docs.medusajs.com/api/admin#object) section to
learn how to filter by object fields.
security:
- api_token: []
- cookie_auth: []
@@ -86,6 +86,14 @@ get:
type: string
title: workflow_id
description: A workflow ID.
- name: q
in: query
description: Search query to filter by a workflow execution's searchable fields.
required: false
schema:
type: string
title: q
description: Search query to filter by a workflow execution's searchable fields.
security:
- api_token: []
- cookie_auth: []
@@ -1,8 +1,8 @@
curl -X POST '{backend_url}/store/return' \
-H 'Content-Type: application/json' \
curl -X POST '{backend_url}/store/returns' \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "{value}",
"order_id": "order_123",
"items": [
{
"id": "id_XbfptxUVo2io9EI",
@@ -24,3 +24,10 @@ properties:
description: The list of claims.
items:
$ref: ./AdminClaim.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product collections.
items:
$ref: ./AdminCollection.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -1,17 +0,0 @@
type: object
description: the product collection's details.
x-schemaName: AdminCreateCollection
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, used to store custom key-value pairs.
@@ -54,3 +54,9 @@ properties:
metadata:
type: object
description: The tax region's metadata, used to store custom key-value pairs.
provider_id:
type: string
title: provider_id
description: >-
The ID of the tax provider used to calculate the tax rate in this tax
region.
@@ -24,3 +24,10 @@ properties:
description: The list of currencies.
items:
$ref: ./AdminCurrency.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of draft orders.
items:
$ref: ./AdminDraftOrder.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of fulfillment providers.
items:
$ref: ./AdminFulfillmentProvider.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of fulfillment options.
items:
$ref: ./AdminFulfillmentProviderOption.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of notifications.
items:
$ref: ./AdminNotification.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of price lists.
items:
$ref: ./AdminPriceList.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of price preferences.
items:
$ref: ./AdminPricePreference.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product categories.
items:
$ref: ./AdminProductCategory.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product tags.
items:
$ref: ./AdminProductTag.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product types.
items:
$ref: ./AdminProductType.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of return reasons.
items:
$ref: ./AdminReturnReason.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of stock locations.
items:
$ref: ./AdminStockLocation.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of stores.
items:
$ref: ./AdminStore.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -0,0 +1,16 @@
type: object
description: The tax provider's details.
x-schemaName: AdminTaxProvider
required:
- id
- is_enabled
properties:
id:
type: string
title: id
description: The tax provider's ID.
example: tp_taxjar_taxjar
is_enabled:
type: boolean
title: is_enabled
description: Whether the tax provider is enabled in the Medusa application.
@@ -1,15 +0,0 @@
type: object
description: The details to update in a collection.
x-schemaName: AdminUpdateCollection
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, can hold custom key-value pairs.
@@ -13,3 +13,9 @@ properties:
metadata:
type: object
description: The tax region's metadata, can hold custom key-value pairs.
provider_id:
type: string
title: provider_id
description: >-
The ID of the tax provider to use when calculating taxes for this tax
region.
@@ -24,3 +24,10 @@ properties:
description: The list of users.
items:
$ref: ./AdminUser.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -52,7 +52,7 @@ properties:
type: string
title: province
description: The address's lower-case ISO 3166-2 province code.
example: US-CA
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
@@ -24,3 +24,10 @@ properties:
description: The list of currencies.
items:
$ref: ./StoreCurrency.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of addresses.
items:
$ref: ./StoreCustomerAddress.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product categories.
items:
$ref: ./StoreProductCategory.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product tags.
items:
$ref: ./StoreProductTag.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -24,3 +24,10 @@ properties:
description: The list of product types.
items:
$ref: ./StoreProductType.yaml
estimate_count:
type: number
title: estimate_count
description: >-
The estimated count retrieved from the PostgreSQL query planner, which may
be inaccurate.
x-featureFlag: index_engine
@@ -10,53 +10,58 @@ required:
- canceled_at
- received_at
properties:
id:
type: string
title: id
description: The return's ID.
order_id:
type: string
title: order_id
description: The ID of the order this return is created for.
status:
type: string
title: status
description: The return's status.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
location_id:
type: string
title: location_id
description: The ID of the location the items are returned to.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
display_id:
type: number
title: display_id
description: The return's display ID.
refund_amount:
type: number
title: refund_amount
description: The return's refunded amount.
items:
type: array
description: The return's items.
items:
$ref: ./StoreReturnItem.yaml
received_at:
status:
type: string
title: received_at
description: The date the return was received.
description: The return's status.
enum:
- received
- canceled
- requested
- open
- partially_received
id:
type: string
title: id
description: The return's ID.
display_id:
type: number
title: display_id
description: The return's display ID.
created_at:
type: string
format: date-time
title: created_at
description: The date the return was created.
order_id:
type: string
title: order_id
description: The ID of the order this return belongs to.
location_id:
type: string
title: location_id
description: The ID of the location the return items are being returned to.
canceled_at:
type: string
title: canceled_at
description: The date the return was updated.
description: The date the return was canceled.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
refund_amount:
type: number
title: refund_amount
description: The amount to be refunded.
received_at:
type: string
title: received_at
description: The date the return items were received.
@@ -1,6 +1,13 @@
type: object
description: The return item's details.
x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties:
id:
type: string
@@ -37,10 +44,3 @@ properties:
metadata:
type: object
description: The item's metadata, can hold custom key-value pairs.
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
@@ -127,7 +127,7 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/regions
x-associatedSchema:
$ref: '#/components/schemas/StoreRegion'
- name: Return
- name: Returns
description: |
Customers can request to return items in their order. The admin user then receives and handles the return.
@@ -1330,7 +1330,18 @@ paths:
'500':
$ref: '#/components/responses/500_error'
x-workflow: transferCartCustomerWorkflow
x-events: []
x-events:
- name: cart.customer_transferred
payload: |-
```ts
{
id, // The ID of the cart
customer_id, // The ID of the customer
}
```
description: Emitted when the customer in the cart is transferred.
deprecated: false
version: 2.8.0
/store/carts/{id}/line-items:
post:
operationId: PostCartsIdLineItems
@@ -8251,72 +8262,6 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/store/return:
post:
operationId: PostReturn
summary: Create Return
description: Create a return for an order's items. The admin receives the return and process it from their side.
x-authenticated: false
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StoreCreateReturn'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/store/return' \
-H 'Content-Type: application/json' \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
--data-raw '{
"order_id": "{value}",
"items": [
{
"id": "id_XbfptxUVo2io9EI",
"quantity": 7916429753974784,
"reason_id": "{value}",
"note": "{value}"
}
],
"return_shipping": {
"option_id": "{value}",
"price": 1068364080349184
},
"note": "{value}",
"location_id": "{value}"
}'
tags:
- Return
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreReturnResponse'
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
x-workflow: createAndCompleteReturnOrderWorkflow
parameters:
- name: x-publishable-api-key
in: header
description: Publishable API Key created in the Medusa Admin.
required: true
schema:
type: string
externalDocs:
url: https://docs.medusajs.com/api/store#publishable-api-key
/store/return-reasons:
get:
operationId: GetReturnReasons
@@ -8484,6 +8429,94 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/store/returns:
post:
operationId: PostReturns
summary: Create Return
description: Create a return for an order's items. The admin receives the return and process it from their side.
x-authenticated: false
parameters:
- name: x-publishable-api-key
in: header
description: Publishable API Key created in the Medusa Admin.
required: true
schema:
type: string
externalDocs:
url: https://docs.medusajs.com/api/store#publishable-api-key
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StoreCreateReturn'
x-codeSamples:
- lang: Shell
label: cURL
source: |-
curl -X POST '{backend_url}/store/returns' \
-H 'x-publishable-api-key: {your_publishable_api_key}' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "order_123",
"items": [
{
"id": "id_XbfptxUVo2io9EI",
"quantity": 7916429753974784,
"reason_id": "{value}",
"note": "{value}"
}
],
"return_shipping": {
"option_id": "{value}",
"price": 1068364080349184
},
"note": "{value}",
"location_id": "{value}"
}'
tags:
- Returns
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreReturnResponse'
'400':
$ref: '#/components/responses/400_error'
'401':
$ref: '#/components/responses/unauthorized'
'404':
$ref: '#/components/responses/not_found_error'
'409':
$ref: '#/components/responses/invalid_state_error'
'422':
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
x-workflow: createAndCompleteReturnOrderWorkflow
x-events:
- name: order.return_requested
payload: |-
```ts
{
order_id, // The ID of the order
return_id, // The ID of the return
}
```
description: Emitted when a return request is confirmed.
deprecated: false
- name: order.return_received
payload: |-
```ts
{
order_id, // The ID of the order
return_id, // The ID of the return
}
```
description: Emitted when a return is marked as received.
deprecated: false
x-version: 2.8.0
/store/shipping-options:
get:
operationId: GetShippingOptions
@@ -9774,6 +9807,11 @@ components:
description: The list of claims.
items:
$ref: '#/components/schemas/AdminClaim'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminClaimOrderResponse:
type: object
description: The created claim's details.
@@ -9931,6 +9969,11 @@ components:
description: The list of product collections.
items:
$ref: '#/components/schemas/AdminCollection'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminCollectionResponse:
type: object
description: The collection's details.
@@ -9958,24 +10001,6 @@ components:
enum:
- publishable
- secret
AdminCreateCollection:
type: object
description: the product collection's details.
x-schemaName: AdminCreateCollection
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, used to store custom key-value pairs.
AdminCreateCustomerGroup:
type: object
description: The customer group's details.
@@ -11240,6 +11265,10 @@ components:
metadata:
type: object
description: The tax region's metadata, used to store custom key-value pairs.
provider_id:
type: string
title: provider_id
description: The ID of the tax provider used to calculate the tax rate in this tax region.
AdminCreateVariantInventoryItem:
type: object
description: The details of the variant-inventory item association.
@@ -11377,6 +11406,11 @@ components:
description: The list of currencies.
items:
$ref: '#/components/schemas/AdminCurrency'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminCurrencyResponse:
type: object
description: The currency's details.
@@ -12491,6 +12525,11 @@ components:
description: The list of draft orders.
items:
$ref: '#/components/schemas/AdminDraftOrder'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminDraftOrderPreview:
type: object
description: The draft order preview's details.
@@ -13708,6 +13747,11 @@ components:
description: The list of fulfillment providers.
items:
$ref: '#/components/schemas/AdminFulfillmentProvider'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminFulfillmentProviderOption:
type: object
description: The fulfillment option's details.
@@ -13751,6 +13795,11 @@ components:
description: The list of fulfillment options.
items:
$ref: '#/components/schemas/AdminFulfillmentProviderOption'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminFulfillmentResponse:
type: object
description: A fulfillment's details.
@@ -14250,6 +14299,11 @@ components:
description: The list of notifications.
items:
$ref: '#/components/schemas/AdminNotification'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminNotificationResponse:
type: object
description: The notification's details.
@@ -17213,6 +17267,11 @@ components:
description: The list of price lists.
items:
$ref: '#/components/schemas/AdminPriceList'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminPriceListPrice:
type: object
description: The details of a price list's price.
@@ -17390,6 +17449,11 @@ components:
description: The list of price preferences.
items:
$ref: '#/components/schemas/AdminPricePreference'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminPricePreferenceResponse:
type: object
description: The price preference's details.
@@ -17700,6 +17764,11 @@ components:
description: The list of product categories.
items:
$ref: '#/components/schemas/AdminProductCategory'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminProductCategoryResponse:
type: object
description: The product category's details.
@@ -17982,6 +18051,11 @@ components:
description: The list of product tags.
items:
$ref: '#/components/schemas/AdminProductTag'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminProductTagResponse:
type: object
description: The product tag's details.
@@ -18076,6 +18150,11 @@ components:
description: The list of product types.
items:
$ref: '#/components/schemas/AdminProductType'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminProductTypeResponse:
type: object
description: The product type's details.
@@ -19034,6 +19113,11 @@ components:
description: The list of return reasons.
items:
$ref: '#/components/schemas/AdminReturnReason'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminReturnReasonResponse:
type: object
description: The return reason's details.
@@ -19866,6 +19950,11 @@ components:
description: The list of stock locations.
items:
$ref: '#/components/schemas/AdminStockLocation'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminStockLocationResponse:
type: object
description: The stock location's details.
@@ -20003,6 +20092,11 @@ components:
description: The list of stores.
items:
$ref: '#/components/schemas/AdminStore'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminStoreResponse:
type: object
description: The store's details.
@@ -20012,6 +20106,23 @@ components:
properties:
store:
$ref: '#/components/schemas/AdminStore'
AdminTaxProvider:
type: object
description: The tax provider's details.
x-schemaName: AdminTaxProvider
required:
- id
- is_enabled
properties:
id:
type: string
title: id
description: The tax provider's ID.
example: tp_taxjar_taxjar
is_enabled:
type: boolean
title: is_enabled
description: Whether the tax provider is enabled in the Medusa application.
AdminTaxRate:
type: object
description: The tax rate's details.
@@ -20275,22 +20386,6 @@ components:
type: string
title: title
description: The API key's title.
AdminUpdateCollection:
type: object
description: The details to update in a collection.
x-schemaName: AdminUpdateCollection
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
metadata:
type: object
description: The collection's metadata, can hold custom key-value pairs.
AdminUpdateCustomerGroup:
type: object
description: The details to update in a customer group.
@@ -21221,6 +21316,10 @@ components:
metadata:
type: object
description: The tax region's metadata, can hold custom key-value pairs.
provider_id:
type: string
title: provider_id
description: The ID of the tax provider to use when calculating taxes for this tax region.
AdminUpdateUser:
type: object
description: The properties to update in a user.
@@ -21400,6 +21499,11 @@ components:
description: The list of users.
items:
$ref: '#/components/schemas/AdminUser'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
AdminUserResponse:
type: object
description: The user's details.
@@ -22896,7 +23000,7 @@ components:
type: string
title: province
description: The address's lower-case ISO 3166-2 province code.
example: US-CA
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
@@ -28709,6 +28813,11 @@ components:
description: The list of currencies.
items:
$ref: '#/components/schemas/StoreCurrency'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreCurrencyResponse:
type: object
description: The currency's details.
@@ -28917,6 +29026,11 @@ components:
description: The list of addresses.
items:
$ref: '#/components/schemas/StoreCustomerAddress'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreCustomerAddressResponse:
type: object
description: The address's details.
@@ -35578,6 +35692,11 @@ components:
description: The list of product categories.
items:
$ref: '#/components/schemas/StoreProductCategory'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreProductCategoryResponse:
type: object
description: The product category's details.
@@ -35783,6 +35902,11 @@ components:
description: The list of product tags.
items:
$ref: '#/components/schemas/StoreProductTag'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreProductTagResponse:
type: object
description: The product tag's details.
@@ -35855,6 +35979,11 @@ components:
description: The list of product types.
items:
$ref: '#/components/schemas/StoreProductType'
estimate_count:
type: number
title: estimate_count
description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate.
x-featureFlag: index_engine
StoreProductTypeResponse:
type: object
description: The product type's details.
@@ -36104,60 +36233,72 @@ components:
- canceled_at
- received_at
properties:
id:
type: string
title: id
description: The return's ID.
order_id:
type: string
title: order_id
description: The ID of the order this return is created for.
status:
type: string
title: status
description: The return's status.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
location_id:
type: string
title: location_id
description: The ID of the location the items are returned to.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
display_id:
type: number
title: display_id
description: The return's display ID.
refund_amount:
type: number
title: refund_amount
description: The return's refunded amount.
items:
type: array
description: The return's items.
items:
$ref: '#/components/schemas/StoreReturnItem'
received_at:
status:
type: string
title: received_at
description: The date the return was received.
description: The return's status.
enum:
- received
- canceled
- requested
- open
- partially_received
id:
type: string
title: id
description: The return's ID.
display_id:
type: number
title: display_id
description: The return's display ID.
created_at:
type: string
format: date-time
title: created_at
description: The date the return was created.
order_id:
type: string
title: order_id
description: The ID of the order this return belongs to.
location_id:
type: string
title: location_id
description: The ID of the location the return items are being returned to.
canceled_at:
type: string
title: canceled_at
description: The date the return was updated.
description: The date the return was canceled.
exchange_id:
type: string
title: exchange_id
description: The ID of the associated exchange.
claim_id:
type: string
title: claim_id
description: The ID of the associated claim.
refund_amount:
type: number
title: refund_amount
description: The amount to be refunded.
received_at:
type: string
title: received_at
description: The date the return items were received.
StoreReturnItem:
type: object
description: The return item's details.
x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties:
id:
type: string
@@ -36194,13 +36335,6 @@ components:
metadata:
type: object
description: The item's metadata, can hold custom key-value pairs.
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
StoreReturnReason:
type: object
description: The return reason's details.
@@ -159,7 +159,7 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/regions
x-associatedSchema:
$ref: ./components/schemas/StoreRegion.yaml
- name: Return
- name: Returns
description: >
Customers can request to return items in their order. The admin user then
receives and handles the return.
@@ -281,12 +281,12 @@ paths:
$ref: paths/store_regions.yaml
/store/regions/{id}:
$ref: paths/store_regions_{id}.yaml
/store/return:
$ref: paths/store_return.yaml
/store/return-reasons:
$ref: paths/store_return-reasons.yaml
/store/return-reasons/{id}:
$ref: paths/store_return-reasons_{id}.yaml
/store/returns:
$ref: paths/store_returns.yaml
/store/shipping-options:
$ref: paths/store_shipping-options.yaml
/store/shipping-options/{id}/calculate:
@@ -76,4 +76,15 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: transferCartCustomerWorkflow
x-events: []
x-events:
- name: cart.customer_transferred
payload: |-
```ts
{
id, // The ID of the cart
customer_id, // The ID of the customer
}
```
description: Emitted when the customer in the cart is transferred.
deprecated: false
version: 2.8.0
@@ -1,10 +1,19 @@
post:
operationId: PostReturn
operationId: PostReturns
summary: Create Return
description: >-
Create a return for an order's items. The admin receives the return and
process it from their side.
x-authenticated: false
parameters:
- name: x-publishable-api-key
in: header
description: Publishable API Key created in the Medusa Admin.
required: true
schema:
type: string
externalDocs:
url: https://docs.medusajs.com/api/store#publishable-api-key
requestBody:
content:
application/json:
@@ -14,9 +23,9 @@ post:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/store_return/post.sh
$ref: ../code_samples/Shell/store_returns/post.sh
tags:
- Return
- Returns
responses:
'200':
description: OK
@@ -37,12 +46,25 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: createAndCompleteReturnOrderWorkflow
parameters:
- name: x-publishable-api-key
in: header
description: Publishable API Key created in the Medusa Admin.
required: true
schema:
type: string
externalDocs:
url: https://docs.medusajs.com/api/store#publishable-api-key
x-events:
- name: order.return_requested
payload: |-
```ts
{
order_id, // The ID of the order
return_id, // The ID of the return
}
```
description: Emitted when a return request is confirmed.
deprecated: false
- name: order.return_received
payload: |-
```ts
{
order_id, // The ID of the order
return_id, // The ID of the return
}
```
description: Emitted when a return is marked as received.
deprecated: false
x-version: 2.8.0