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:
authored and GitHub committed 2025-05-13 13:43:58 +00:00
1 parent 5c36bafc1d
commit c6c660c4d3
135 files changed
+2201 -544

No files matched your search

@@ -727,6 +727,24 @@ const generatedgeneratedAdminSidebarSidebar = {
"loaded": false, "loaded": false,
"showLoadingIfEmpty": true "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", "type": "category",
"title": "Tax Rates", "title": "Tax Rates",
@@ -278,12 +278,12 @@ const generatedgeneratedStoreSidebarSidebar = {
}, },
{ {
"type": "category", "type": "category",
"title": "Return", "title": "Return Reasons",
"children": [ "children": [
{ {
"type": "link", "type": "link",
"path": "return_return_schema", "path": "return-reasons_returnreason_schema",
"title": "Return Object", "title": "ReturnReason Object",
"loaded": true, "loaded": true,
"badge": { "badge": {
"variant": "neutral", "variant": "neutral",
@@ -296,12 +296,12 @@ const generatedgeneratedStoreSidebarSidebar = {
}, },
{ {
"type": "category", "type": "category",
"title": "Return Reasons", "title": "Returns",
"children": [ "children": [
{ {
"type": "link", "type": "link",
"path": "return-reasons_returnreason_schema", "path": "returns_return_schema",
"title": "ReturnReason Object", "title": "Return Object",
"loaded": true, "loaded": true,
"badge": { "badge": {
"variant": "neutral", "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. description: The list of claims.
items: items:
$ref: ./AdminClaim.yaml $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. description: The list of product collections.
items: items:
$ref: ./AdminCollection.yaml $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: metadata:
type: object type: object
description: The tax region's metadata, used to store custom key-value pairs. 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. description: The list of currencies.
items: items:
$ref: ./AdminCurrency.yaml $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. description: The list of draft orders.
items: items:
$ref: ./AdminDraftOrder.yaml $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. description: The list of fulfillment providers.
items: items:
$ref: ./AdminFulfillmentProvider.yaml $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. description: The list of fulfillment options.
items: items:
$ref: ./AdminFulfillmentProviderOption.yaml $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. description: The list of notifications.
items: items:
$ref: ./AdminNotification.yaml $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. description: The list of price lists.
items: items:
$ref: ./AdminPriceList.yaml $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. description: The list of price preferences.
items: items:
$ref: ./AdminPricePreference.yaml $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. description: The list of product categories.
items: items:
$ref: ./AdminProductCategory.yaml $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. description: The list of product tags.
items: items:
$ref: ./AdminProductTag.yaml $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. description: The list of product types.
items: items:
$ref: ./AdminProductType.yaml $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. description: The list of return reasons.
items: items:
$ref: ./AdminReturnReason.yaml $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. description: The list of stock locations.
items: items:
$ref: ./AdminStockLocation.yaml $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. description: The list of stores.
items: items:
$ref: ./AdminStore.yaml $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: metadata:
type: object type: object
description: The tax region's metadata, can hold custom key-value pairs. 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. description: The list of users.
items: items:
$ref: ./AdminUser.yaml $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 type: string
title: province title: province
description: The address's lower-case ISO 3166-2 province code. description: The address's lower-case ISO 3166-2 province code.
example: US-CA example: us-ca
externalDocs: externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2 url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2 description: Learn more about ISO 3166-2
@@ -24,3 +24,10 @@ properties:
description: The list of currencies. description: The list of currencies.
items: items:
$ref: ./StoreCurrency.yaml $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. description: The list of addresses.
items: items:
$ref: ./StoreCustomerAddress.yaml $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. description: The list of product categories.
items: items:
$ref: ./StoreProductCategory.yaml $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. description: The list of product tags.
items: items:
$ref: ./StoreProductTag.yaml $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. description: The list of product types.
items: items:
$ref: ./StoreProductType.yaml $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 - canceled_at
- received_at - received_at
properties: 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: items:
type: array type: array
description: The return's items. description: The return's items.
items: items:
$ref: ./StoreReturnItem.yaml $ref: ./StoreReturnItem.yaml
received_at: status:
type: string type: string
title: received_at description: The return's status.
description: The date the return was received. 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: created_at:
type: string type: string
format: date-time format: date-time
title: created_at title: created_at
description: The date the return was created. 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: canceled_at:
type: string type: string
title: canceled_at 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 type: object
description: The return item's details. description: The return item's details.
x-schemaName: StoreReturnItem x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties: properties:
id: id:
type: string type: string
@@ -37,10 +44,3 @@ properties:
metadata: metadata:
type: object type: object
description: The item's metadata, can hold custom key-value pairs. 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 url: https://docs.medusajs.com/resources/commerce-modules/store
x-associatedSchema: x-associatedSchema:
$ref: '#/components/schemas/AdminStore' $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 - name: Tax Rates
description: | 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. 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: content:
application/json: application/json:
schema: 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: x-codeSamples:
- lang: JavaScript - lang: JavaScript
label: JS SDK label: JS SDK
@@ -6317,7 +6349,28 @@ paths:
content: content:
application/json: application/json:
schema: 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: x-codeSamples:
- lang: JavaScript - lang: JavaScript
label: JS SDK label: JS SDK
@@ -22062,7 +22115,7 @@ paths:
delete: delete:
operationId: DeleteOrderEditsId operationId: DeleteOrderEditsId
summary: Cancel Order Edit summary: Cancel Order Edit
description: Cancel an order edit. description: Cancel a requested order edit.
x-authenticated: true x-authenticated: true
parameters: parameters:
- name: id - name: id
@@ -22139,6 +22192,18 @@ paths:
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
x-workflow: cancelBeginOrderEditWorkflow 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: /admin/order-edits/{id}/confirm:
post: post:
operationId: PostOrderEditsIdConfirm operationId: PostOrderEditsIdConfirm
@@ -22201,6 +22266,18 @@ paths:
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
x-workflow: confirmOrderEditRequestWorkflow 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: /admin/order-edits/{id}/items:
post: post:
operationId: PostOrderEditsIdItems operationId: PostOrderEditsIdItems
@@ -22583,6 +22660,18 @@ paths:
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
x-workflow: requestOrderEditRequestWorkflow 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: /admin/order-edits/{id}/shipping-method:
post: post:
operationId: PostOrderEditsIdShippingMethod operationId: PostOrderEditsIdShippingMethod
@@ -46729,6 +46818,181 @@ paths:
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
x-workflow: updateStoresWorkflow x-workflow: updateStoresWorkflow
x-events: [] 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: /admin/tax-rates:
get: get:
operationId: GetTaxRates 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. 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: externalDocs:
url: '#select-fields-and-relations' 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: security:
- api_token: [] - api_token: []
- cookie_auth: [] - cookie_auth: []
@@ -50279,6 +50566,14 @@ paths:
type: string type: string
title: workflow_id title: workflow_id
description: A 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: security:
- api_token: [] - api_token: []
- cookie_auth: [] - cookie_auth: []
@@ -52462,6 +52757,11 @@ components:
description: The list of claims. description: The list of claims.
items: items:
$ref: '#/components/schemas/AdminClaim' $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: AdminClaimOrderResponse:
type: object type: object
description: The created claim's details. description: The created claim's details.
@@ -52619,6 +52919,11 @@ components:
description: The list of product collections. description: The list of product collections.
items: items:
$ref: '#/components/schemas/AdminCollection' $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: AdminCollectionResponse:
type: object type: object
description: The collection's details. description: The collection's details.
@@ -52646,24 +52951,6 @@ components:
enum: enum:
- publishable - publishable
- secret - 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: AdminCreateCustomerGroup:
type: object type: object
description: The customer group's details. description: The customer group's details.
@@ -53928,6 +54215,10 @@ components:
metadata: metadata:
type: object type: object
description: The tax region's metadata, used to store custom key-value pairs. 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: AdminCreateVariantInventoryItem:
type: object type: object
description: The details of the variant-inventory item association. description: The details of the variant-inventory item association.
@@ -54065,6 +54356,11 @@ components:
description: The list of currencies. description: The list of currencies.
items: items:
$ref: '#/components/schemas/AdminCurrency' $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: AdminCurrencyResponse:
type: object type: object
description: The currency's details. description: The currency's details.
@@ -55179,6 +55475,11 @@ components:
description: The list of draft orders. description: The list of draft orders.
items: items:
$ref: '#/components/schemas/AdminDraftOrder' $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: AdminDraftOrderPreview:
type: object type: object
description: The draft order preview's details. description: The draft order preview's details.
@@ -56396,6 +56697,11 @@ components:
description: The list of fulfillment providers. description: The list of fulfillment providers.
items: items:
$ref: '#/components/schemas/AdminFulfillmentProvider' $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: AdminFulfillmentProviderOption:
type: object type: object
description: The fulfillment option's details. description: The fulfillment option's details.
@@ -56439,6 +56745,11 @@ components:
description: The list of fulfillment options. description: The list of fulfillment options.
items: items:
$ref: '#/components/schemas/AdminFulfillmentProviderOption' $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: AdminFulfillmentResponse:
type: object type: object
description: A fulfillment's details. description: A fulfillment's details.
@@ -56938,6 +57249,11 @@ components:
description: The list of notifications. description: The list of notifications.
items: items:
$ref: '#/components/schemas/AdminNotification' $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: AdminNotificationResponse:
type: object type: object
description: The notification's details. description: The notification's details.
@@ -59901,6 +60217,11 @@ components:
description: The list of price lists. description: The list of price lists.
items: items:
$ref: '#/components/schemas/AdminPriceList' $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: AdminPriceListPrice:
type: object type: object
description: The details of a price list's price. description: The details of a price list's price.
@@ -60078,6 +60399,11 @@ components:
description: The list of price preferences. description: The list of price preferences.
items: items:
$ref: '#/components/schemas/AdminPricePreference' $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: AdminPricePreferenceResponse:
type: object type: object
description: The price preference's details. description: The price preference's details.
@@ -60388,6 +60714,11 @@ components:
description: The list of product categories. description: The list of product categories.
items: items:
$ref: '#/components/schemas/AdminProductCategory' $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: AdminProductCategoryResponse:
type: object type: object
description: The product category's details. description: The product category's details.
@@ -60670,6 +61001,11 @@ components:
description: The list of product tags. description: The list of product tags.
items: items:
$ref: '#/components/schemas/AdminProductTag' $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: AdminProductTagResponse:
type: object type: object
description: The product tag's details. description: The product tag's details.
@@ -60764,6 +61100,11 @@ components:
description: The list of product types. description: The list of product types.
items: items:
$ref: '#/components/schemas/AdminProductType' $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: AdminProductTypeResponse:
type: object type: object
description: The product type's details. description: The product type's details.
@@ -61722,6 +62063,11 @@ components:
description: The list of return reasons. description: The list of return reasons.
items: items:
$ref: '#/components/schemas/AdminReturnReason' $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: AdminReturnReasonResponse:
type: object type: object
description: The return reason's details. description: The return reason's details.
@@ -62554,6 +62900,11 @@ components:
description: The list of stock locations. description: The list of stock locations.
items: items:
$ref: '#/components/schemas/AdminStockLocation' $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: AdminStockLocationResponse:
type: object type: object
description: The stock location's details. description: The stock location's details.
@@ -62691,6 +63042,11 @@ components:
description: The list of stores. description: The list of stores.
items: items:
$ref: '#/components/schemas/AdminStore' $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: AdminStoreResponse:
type: object type: object
description: The store's details. description: The store's details.
@@ -62700,6 +63056,23 @@ components:
properties: properties:
store: store:
$ref: '#/components/schemas/AdminStore' $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: AdminTaxRate:
type: object type: object
description: The tax rate's details. description: The tax rate's details.
@@ -62963,22 +63336,6 @@ components:
type: string type: string
title: title title: title
description: The API key's 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: AdminUpdateCustomerGroup:
type: object type: object
description: The details to update in a customer group. description: The details to update in a customer group.
@@ -63909,6 +64266,10 @@ components:
metadata: metadata:
type: object type: object
description: The tax region's metadata, can hold custom key-value pairs. 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: AdminUpdateUser:
type: object type: object
description: The properties to update in a user. description: The properties to update in a user.
@@ -64088,6 +64449,11 @@ components:
description: The list of users. description: The list of users.
items: items:
$ref: '#/components/schemas/AdminUser' $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: AdminUserResponse:
type: object type: object
description: The user's details. description: The user's details.
@@ -65584,7 +65950,7 @@ components:
type: string type: string
title: province title: province
description: The address's lower-case ISO 3166-2 province code. description: The address's lower-case ISO 3166-2 province code.
example: US-CA example: us-ca
externalDocs: externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2 url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2 description: Learn more about ISO 3166-2
@@ -71397,6 +71763,11 @@ components:
description: The list of currencies. description: The list of currencies.
items: items:
$ref: '#/components/schemas/StoreCurrency' $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: StoreCurrencyResponse:
type: object type: object
description: The currency's details. description: The currency's details.
@@ -71605,6 +71976,11 @@ components:
description: The list of addresses. description: The list of addresses.
items: items:
$ref: '#/components/schemas/StoreCustomerAddress' $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: StoreCustomerAddressResponse:
type: object type: object
description: The address's details. description: The address's details.
@@ -78266,6 +78642,11 @@ components:
description: The list of product categories. description: The list of product categories.
items: items:
$ref: '#/components/schemas/StoreProductCategory' $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: StoreProductCategoryResponse:
type: object type: object
description: The product category's details. description: The product category's details.
@@ -78471,6 +78852,11 @@ components:
description: The list of product tags. description: The list of product tags.
items: items:
$ref: '#/components/schemas/StoreProductTag' $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: StoreProductTagResponse:
type: object type: object
description: The product tag's details. description: The product tag's details.
@@ -78543,6 +78929,11 @@ components:
description: The list of product types. description: The list of product types.
items: items:
$ref: '#/components/schemas/StoreProductType' $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: StoreProductTypeResponse:
type: object type: object
description: The product type's details. description: The product type's details.
@@ -78792,60 +79183,72 @@ components:
- canceled_at - canceled_at
- received_at - received_at
properties: 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: items:
type: array type: array
description: The return's items. description: The return's items.
items: items:
$ref: '#/components/schemas/StoreReturnItem' $ref: '#/components/schemas/StoreReturnItem'
received_at: status:
type: string type: string
title: received_at description: The return's status.
description: The date the return was received. 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: created_at:
type: string type: string
format: date-time format: date-time
title: created_at title: created_at
description: The date the return was created. 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: canceled_at:
type: string type: string
title: canceled_at 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: StoreReturnItem:
type: object type: object
description: The return item's details. description: The return item's details.
x-schemaName: StoreReturnItem x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties: properties:
id: id:
type: string type: string
@@ -78882,13 +79285,6 @@ components:
metadata: metadata:
type: object type: object
description: The item's metadata, can hold custom key-value pairs. description: The item's metadata, can hold custom key-value pairs.
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
StoreReturnReason: StoreReturnReason:
type: object type: object
description: The return reason's details. description: The return reason's details.
@@ -568,6 +568,18 @@ tags:
url: https://docs.medusajs.com/resources/commerce-modules/store url: https://docs.medusajs.com/resources/commerce-modules/store
x-associatedSchema: x-associatedSchema:
$ref: ./components/schemas/AdminStore.yaml $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 - name: Tax Rates
description: > description: >
A tax rate is a percentage amount used to calculate the tax amount of each 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 $ref: paths/admin_stores.yaml
/admin/stores/{id}: /admin/stores/{id}:
$ref: paths/admin_stores_{id}.yaml $ref: paths/admin_stores_{id}.yaml
/admin/tax-providers:
$ref: paths/admin_tax-providers.yaml
/admin/tax-rates: /admin/tax-rates:
$ref: paths/admin_tax-rates.yaml $ref: paths/admin_tax-rates.yaml
/admin/tax-rates/{id}: /admin/tax-rates/{id}:
@@ -1008,7 +1008,33 @@ post:
content: content:
application/json: application/json:
schema: 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: x-codeSamples:
- lang: JavaScript - lang: JavaScript
label: JS SDK label: JS SDK
@@ -102,7 +102,31 @@ post:
content: content:
application/json: application/json:
schema: 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: x-codeSamples:
- lang: JavaScript - lang: JavaScript
label: JS SDK label: JS SDK
@@ -1,7 +1,7 @@
delete: delete:
operationId: DeleteOrderEditsId operationId: DeleteOrderEditsId
summary: Cancel Order Edit summary: Cancel Order Edit
description: Cancel an order edit. description: Cancel a requested order edit.
x-authenticated: true x-authenticated: true
parameters: parameters:
- name: id - name: id
@@ -64,3 +64,15 @@ delete:
'500': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
x-workflow: cancelBeginOrderEditWorkflow 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': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
x-workflow: confirmOrderEditRequestWorkflow 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': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
x-workflow: requestOrderEditRequestWorkflow 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. prefix it will replace the entire default fields.
externalDocs: externalDocs:
url: '#select-fields-and-relations' 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: security:
- api_token: [] - api_token: []
- cookie_auth: [] - cookie_auth: []
@@ -86,6 +86,14 @@ get:
type: string type: string
title: workflow_id title: workflow_id
description: A 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: security:
- api_token: [] - api_token: []
- cookie_auth: [] - cookie_auth: []
@@ -1,8 +1,8 @@
curl -X POST '{backend_url}/store/return' \ curl -X POST '{backend_url}/store/returns' \
-H 'Content-Type: application/json' \
-H 'x-publishable-api-key: {your_publishable_api_key}' \ -H 'x-publishable-api-key: {your_publishable_api_key}' \
-H 'Content-Type: application/json' \
--data-raw '{ --data-raw '{
"order_id": "{value}", "order_id": "order_123",
"items": [ "items": [
{ {
"id": "id_XbfptxUVo2io9EI", "id": "id_XbfptxUVo2io9EI",
@@ -24,3 +24,10 @@ properties:
description: The list of claims. description: The list of claims.
items: items:
$ref: ./AdminClaim.yaml $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. description: The list of product collections.
items: items:
$ref: ./AdminCollection.yaml $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: metadata:
type: object type: object
description: The tax region's metadata, used to store custom key-value pairs. 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. description: The list of currencies.
items: items:
$ref: ./AdminCurrency.yaml $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. description: The list of draft orders.
items: items:
$ref: ./AdminDraftOrder.yaml $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. description: The list of fulfillment providers.
items: items:
$ref: ./AdminFulfillmentProvider.yaml $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. description: The list of fulfillment options.
items: items:
$ref: ./AdminFulfillmentProviderOption.yaml $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. description: The list of notifications.
items: items:
$ref: ./AdminNotification.yaml $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. description: The list of price lists.
items: items:
$ref: ./AdminPriceList.yaml $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. description: The list of price preferences.
items: items:
$ref: ./AdminPricePreference.yaml $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. description: The list of product categories.
items: items:
$ref: ./AdminProductCategory.yaml $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. description: The list of product tags.
items: items:
$ref: ./AdminProductTag.yaml $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. description: The list of product types.
items: items:
$ref: ./AdminProductType.yaml $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. description: The list of return reasons.
items: items:
$ref: ./AdminReturnReason.yaml $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. description: The list of stock locations.
items: items:
$ref: ./AdminStockLocation.yaml $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. description: The list of stores.
items: items:
$ref: ./AdminStore.yaml $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: metadata:
type: object type: object
description: The tax region's metadata, can hold custom key-value pairs. 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. description: The list of users.
items: items:
$ref: ./AdminUser.yaml $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 type: string
title: province title: province
description: The address's lower-case ISO 3166-2 province code. description: The address's lower-case ISO 3166-2 province code.
example: US-CA example: us-ca
externalDocs: externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2 url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2 description: Learn more about ISO 3166-2
@@ -24,3 +24,10 @@ properties:
description: The list of currencies. description: The list of currencies.
items: items:
$ref: ./StoreCurrency.yaml $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. description: The list of addresses.
items: items:
$ref: ./StoreCustomerAddress.yaml $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. description: The list of product categories.
items: items:
$ref: ./StoreProductCategory.yaml $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. description: The list of product tags.
items: items:
$ref: ./StoreProductTag.yaml $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. description: The list of product types.
items: items:
$ref: ./StoreProductType.yaml $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 - canceled_at
- received_at - received_at
properties: 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: items:
type: array type: array
description: The return's items. description: The return's items.
items: items:
$ref: ./StoreReturnItem.yaml $ref: ./StoreReturnItem.yaml
received_at: status:
type: string type: string
title: received_at description: The return's status.
description: The date the return was received. 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: created_at:
type: string type: string
format: date-time format: date-time
title: created_at title: created_at
description: The date the return was created. 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: canceled_at:
type: string type: string
title: canceled_at 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 type: object
description: The return item's details. description: The return item's details.
x-schemaName: StoreReturnItem x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties: properties:
id: id:
type: string type: string
@@ -37,10 +44,3 @@ properties:
metadata: metadata:
type: object type: object
description: The item's metadata, can hold custom key-value pairs. 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 url: https://docs.medusajs.com/resources/storefront-development/regions
x-associatedSchema: x-associatedSchema:
$ref: '#/components/schemas/StoreRegion' $ref: '#/components/schemas/StoreRegion'
- name: Return - name: Returns
description: | description: |
Customers can request to return items in their order. The admin user then receives and handles the return. Customers can request to return items in their order. The admin user then receives and handles the return.
@@ -1330,7 +1330,18 @@ paths:
'500': '500':
$ref: '#/components/responses/500_error' $ref: '#/components/responses/500_error'
x-workflow: transferCartCustomerWorkflow 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: /store/carts/{id}/line-items:
post: post:
operationId: PostCartsIdLineItems operationId: PostCartsIdLineItems
@@ -8251,72 +8262,6 @@ paths:
$ref: '#/components/responses/invalid_request_error' $ref: '#/components/responses/invalid_request_error'
'500': '500':
$ref: '#/components/responses/500_error' $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: /store/return-reasons:
get: get:
operationId: GetReturnReasons operationId: GetReturnReasons
@@ -8484,6 +8429,94 @@ paths:
$ref: '#/components/responses/invalid_request_error' $ref: '#/components/responses/invalid_request_error'
'500': '500':
$ref: '#/components/responses/500_error' $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: /store/shipping-options:
get: get:
operationId: GetShippingOptions operationId: GetShippingOptions
@@ -9774,6 +9807,11 @@ components:
description: The list of claims. description: The list of claims.
items: items:
$ref: '#/components/schemas/AdminClaim' $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: AdminClaimOrderResponse:
type: object type: object
description: The created claim's details. description: The created claim's details.
@@ -9931,6 +9969,11 @@ components:
description: The list of product collections. description: The list of product collections.
items: items:
$ref: '#/components/schemas/AdminCollection' $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: AdminCollectionResponse:
type: object type: object
description: The collection's details. description: The collection's details.
@@ -9958,24 +10001,6 @@ components:
enum: enum:
- publishable - publishable
- secret - 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: AdminCreateCustomerGroup:
type: object type: object
description: The customer group's details. description: The customer group's details.
@@ -11240,6 +11265,10 @@ components:
metadata: metadata:
type: object type: object
description: The tax region's metadata, used to store custom key-value pairs. 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: AdminCreateVariantInventoryItem:
type: object type: object
description: The details of the variant-inventory item association. description: The details of the variant-inventory item association.
@@ -11377,6 +11406,11 @@ components:
description: The list of currencies. description: The list of currencies.
items: items:
$ref: '#/components/schemas/AdminCurrency' $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: AdminCurrencyResponse:
type: object type: object
description: The currency's details. description: The currency's details.
@@ -12491,6 +12525,11 @@ components:
description: The list of draft orders. description: The list of draft orders.
items: items:
$ref: '#/components/schemas/AdminDraftOrder' $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: AdminDraftOrderPreview:
type: object type: object
description: The draft order preview's details. description: The draft order preview's details.
@@ -13708,6 +13747,11 @@ components:
description: The list of fulfillment providers. description: The list of fulfillment providers.
items: items:
$ref: '#/components/schemas/AdminFulfillmentProvider' $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: AdminFulfillmentProviderOption:
type: object type: object
description: The fulfillment option's details. description: The fulfillment option's details.
@@ -13751,6 +13795,11 @@ components:
description: The list of fulfillment options. description: The list of fulfillment options.
items: items:
$ref: '#/components/schemas/AdminFulfillmentProviderOption' $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: AdminFulfillmentResponse:
type: object type: object
description: A fulfillment's details. description: A fulfillment's details.
@@ -14250,6 +14299,11 @@ components:
description: The list of notifications. description: The list of notifications.
items: items:
$ref: '#/components/schemas/AdminNotification' $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: AdminNotificationResponse:
type: object type: object
description: The notification's details. description: The notification's details.
@@ -17213,6 +17267,11 @@ components:
description: The list of price lists. description: The list of price lists.
items: items:
$ref: '#/components/schemas/AdminPriceList' $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: AdminPriceListPrice:
type: object type: object
description: The details of a price list's price. description: The details of a price list's price.
@@ -17390,6 +17449,11 @@ components:
description: The list of price preferences. description: The list of price preferences.
items: items:
$ref: '#/components/schemas/AdminPricePreference' $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: AdminPricePreferenceResponse:
type: object type: object
description: The price preference's details. description: The price preference's details.
@@ -17700,6 +17764,11 @@ components:
description: The list of product categories. description: The list of product categories.
items: items:
$ref: '#/components/schemas/AdminProductCategory' $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: AdminProductCategoryResponse:
type: object type: object
description: The product category's details. description: The product category's details.
@@ -17982,6 +18051,11 @@ components:
description: The list of product tags. description: The list of product tags.
items: items:
$ref: '#/components/schemas/AdminProductTag' $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: AdminProductTagResponse:
type: object type: object
description: The product tag's details. description: The product tag's details.
@@ -18076,6 +18150,11 @@ components:
description: The list of product types. description: The list of product types.
items: items:
$ref: '#/components/schemas/AdminProductType' $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: AdminProductTypeResponse:
type: object type: object
description: The product type's details. description: The product type's details.
@@ -19034,6 +19113,11 @@ components:
description: The list of return reasons. description: The list of return reasons.
items: items:
$ref: '#/components/schemas/AdminReturnReason' $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: AdminReturnReasonResponse:
type: object type: object
description: The return reason's details. description: The return reason's details.
@@ -19866,6 +19950,11 @@ components:
description: The list of stock locations. description: The list of stock locations.
items: items:
$ref: '#/components/schemas/AdminStockLocation' $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: AdminStockLocationResponse:
type: object type: object
description: The stock location's details. description: The stock location's details.
@@ -20003,6 +20092,11 @@ components:
description: The list of stores. description: The list of stores.
items: items:
$ref: '#/components/schemas/AdminStore' $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: AdminStoreResponse:
type: object type: object
description: The store's details. description: The store's details.
@@ -20012,6 +20106,23 @@ components:
properties: properties:
store: store:
$ref: '#/components/schemas/AdminStore' $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: AdminTaxRate:
type: object type: object
description: The tax rate's details. description: The tax rate's details.
@@ -20275,22 +20386,6 @@ components:
type: string type: string
title: title title: title
description: The API key's 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: AdminUpdateCustomerGroup:
type: object type: object
description: The details to update in a customer group. description: The details to update in a customer group.
@@ -21221,6 +21316,10 @@ components:
metadata: metadata:
type: object type: object
description: The tax region's metadata, can hold custom key-value pairs. 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: AdminUpdateUser:
type: object type: object
description: The properties to update in a user. description: The properties to update in a user.
@@ -21400,6 +21499,11 @@ components:
description: The list of users. description: The list of users.
items: items:
$ref: '#/components/schemas/AdminUser' $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: AdminUserResponse:
type: object type: object
description: The user's details. description: The user's details.
@@ -22896,7 +23000,7 @@ components:
type: string type: string
title: province title: province
description: The address's lower-case ISO 3166-2 province code. description: The address's lower-case ISO 3166-2 province code.
example: US-CA example: us-ca
externalDocs: externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2 url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2 description: Learn more about ISO 3166-2
@@ -28709,6 +28813,11 @@ components:
description: The list of currencies. description: The list of currencies.
items: items:
$ref: '#/components/schemas/StoreCurrency' $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: StoreCurrencyResponse:
type: object type: object
description: The currency's details. description: The currency's details.
@@ -28917,6 +29026,11 @@ components:
description: The list of addresses. description: The list of addresses.
items: items:
$ref: '#/components/schemas/StoreCustomerAddress' $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: StoreCustomerAddressResponse:
type: object type: object
description: The address's details. description: The address's details.
@@ -35578,6 +35692,11 @@ components:
description: The list of product categories. description: The list of product categories.
items: items:
$ref: '#/components/schemas/StoreProductCategory' $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: StoreProductCategoryResponse:
type: object type: object
description: The product category's details. description: The product category's details.
@@ -35783,6 +35902,11 @@ components:
description: The list of product tags. description: The list of product tags.
items: items:
$ref: '#/components/schemas/StoreProductTag' $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: StoreProductTagResponse:
type: object type: object
description: The product tag's details. description: The product tag's details.
@@ -35855,6 +35979,11 @@ components:
description: The list of product types. description: The list of product types.
items: items:
$ref: '#/components/schemas/StoreProductType' $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: StoreProductTypeResponse:
type: object type: object
description: The product type's details. description: The product type's details.
@@ -36104,60 +36233,72 @@ components:
- canceled_at - canceled_at
- received_at - received_at
properties: 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: items:
type: array type: array
description: The return's items. description: The return's items.
items: items:
$ref: '#/components/schemas/StoreReturnItem' $ref: '#/components/schemas/StoreReturnItem'
received_at: status:
type: string type: string
title: received_at description: The return's status.
description: The date the return was received. 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: created_at:
type: string type: string
format: date-time format: date-time
title: created_at title: created_at
description: The date the return was created. 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: canceled_at:
type: string type: string
title: canceled_at 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: StoreReturnItem:
type: object type: object
description: The return item's details. description: The return item's details.
x-schemaName: StoreReturnItem x-schemaName: StoreReturnItem
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
properties: properties:
id: id:
type: string type: string
@@ -36194,13 +36335,6 @@ components:
metadata: metadata:
type: object type: object
description: The item's metadata, can hold custom key-value pairs. description: The item's metadata, can hold custom key-value pairs.
required:
- id
- quantity
- received_quantity
- damaged_quantity
- item_id
- return_id
StoreReturnReason: StoreReturnReason:
type: object type: object
description: The return reason's details. description: The return reason's details.
@@ -159,7 +159,7 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/regions url: https://docs.medusajs.com/resources/storefront-development/regions
x-associatedSchema: x-associatedSchema:
$ref: ./components/schemas/StoreRegion.yaml $ref: ./components/schemas/StoreRegion.yaml
- name: Return - name: Returns
description: > description: >
Customers can request to return items in their order. The admin user then Customers can request to return items in their order. The admin user then
receives and handles the return. receives and handles the return.
@@ -281,12 +281,12 @@ paths:
$ref: paths/store_regions.yaml $ref: paths/store_regions.yaml
/store/regions/{id}: /store/regions/{id}:
$ref: paths/store_regions_{id}.yaml $ref: paths/store_regions_{id}.yaml
/store/return:
$ref: paths/store_return.yaml
/store/return-reasons: /store/return-reasons:
$ref: paths/store_return-reasons.yaml $ref: paths/store_return-reasons.yaml
/store/return-reasons/{id}: /store/return-reasons/{id}:
$ref: paths/store_return-reasons_{id}.yaml $ref: paths/store_return-reasons_{id}.yaml
/store/returns:
$ref: paths/store_returns.yaml
/store/shipping-options: /store/shipping-options:
$ref: paths/store_shipping-options.yaml $ref: paths/store_shipping-options.yaml
/store/shipping-options/{id}/calculate: /store/shipping-options/{id}/calculate:
@@ -76,4 +76,15 @@ post:
'500': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
x-workflow: transferCartCustomerWorkflow 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: post:
operationId: PostReturn operationId: PostReturns
summary: Create Return summary: Create Return
description: >- description: >-
Create a return for an order's items. The admin receives the return and Create a return for an order's items. The admin receives the return and
process it from their side. process it from their side.
x-authenticated: false 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: requestBody:
content: content:
application/json: application/json:
@@ -14,9 +23,9 @@ post:
- lang: Shell - lang: Shell
label: cURL label: cURL
source: source:
$ref: ../code_samples/Shell/store_return/post.sh $ref: ../code_samples/Shell/store_returns/post.sh
tags: tags:
- Return - Returns
responses: responses:
'200': '200':
description: OK description: OK
@@ -37,12 +46,25 @@ post:
'500': '500':
$ref: ../components/responses/500_error.yaml $ref: ../components/responses/500_error.yaml
x-workflow: createAndCompleteReturnOrderWorkflow x-workflow: createAndCompleteReturnOrderWorkflow
parameters: x-events:
- name: x-publishable-api-key - name: order.return_requested
in: header payload: |-
description: Publishable API Key created in the Medusa Admin. ```ts
required: true {
schema: order_id, // The ID of the order
type: string return_id, // The ID of the return
externalDocs: }
url: https://docs.medusajs.com/api/store#publishable-api-key ```
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
@@ -1,5 +1,5 @@
import React from "react" import React from "react"
import { Badge, Link, Tooltip } from "@/components" import { Badge, Tooltip } from "@/components"
export type FeatureFlagNoticeProps = { export type FeatureFlagNoticeProps = {
featureFlag: string featureFlag: string
@@ -22,12 +22,8 @@ export const FeatureFlagNotice = ({
<span className={tooltipTextClassName}> <span className={tooltipTextClassName}>
To use this {type}, make sure to To use this {type}, make sure to
<br /> <br />
<Link {/* TODO add doc link once available */}
href="https://docs.medusajs.com/development/feature-flags/toggle" enable its feature flag: <code>{featureFlag}</code>
target="__blank"
>
enable its feature flag: <code>{featureFlag}</code>
</Link>
</span> </span>
} }
clickable clickable
@@ -253,7 +253,8 @@ tags:
$ref: "#/components/schemas/AdminPayment" $ref: "#/components/schemas/AdminPayment"
- name: Plugins - name: Plugins
description: > description: >
A plugin is a package of reusable Medusa customizations that you can install in any Medusa application. A plugin is a package of reusable Medusa customizations that you can
install in any Medusa application.
Plugins can be used to add new functionality, such as wishlists, or integrate third-party services, such as payment providers. Plugins can be used to add new functionality, such as wishlists, or integrate third-party services, such as payment providers.
@@ -516,6 +517,17 @@ tags:
url: https://docs.medusajs.com/resources/commerce-modules/store url: https://docs.medusajs.com/resources/commerce-modules/store
x-associatedSchema: x-associatedSchema:
$ref: "#/components/schemas/AdminStore" $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 - name: Tax Rates
description: > description: >
A tax rate is a percentage amount used to calculate the tax amount of each A tax rate is a percentage amount used to calculate the tax amount of each
@@ -142,7 +142,7 @@ tags:
url: https://docs.medusajs.com/resources/storefront-development/regions url: https://docs.medusajs.com/resources/storefront-development/regions
x-associatedSchema: x-associatedSchema:
$ref: "#/components/schemas/StoreRegion" $ref: "#/components/schemas/StoreRegion"
- name: Return - name: Returns
description: > description: >
Customers can request to return items in their order. The admin user then Customers can request to return items in their order. The admin user then
receives and handles the return. receives and handles the return.
@@ -2,7 +2,7 @@
* @oas [delete] /admin/order-edits/{id} * @oas [delete] /admin/order-edits/{id}
* operationId: DeleteOrderEditsId * operationId: DeleteOrderEditsId
* summary: Cancel Order Edit * summary: Cancel Order Edit
* description: Cancel an order edit. * description: Cancel a requested order edit.
* x-authenticated: true * x-authenticated: true
* parameters: * parameters:
* - name: id * - name: id
@@ -79,6 +79,18 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-workflow: cancelBeginOrderEditWorkflow * 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
* *
*/ */
@@ -0,0 +1,179 @@
/**
* @oas [get] /admin/tax-providers
* 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
*
*/
@@ -23,6 +23,29 @@
* fields. without prefix it will replace the entire default fields. * fields. without prefix it will replace the entire default fields.
* externalDocs: * externalDocs:
* url: "#select-fields-and-relations" * 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: * security:
* - api_token: [] * - api_token: []
* - cookie_auth: [] * - cookie_auth: []
@@ -73,6 +73,14 @@
* type: string * type: string
* title: workflow_id * title: workflow_id
* description: A 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: * security:
* - api_token: [] * - api_token: []
* - cookie_auth: [] * - cookie_auth: []
@@ -25,7 +25,30 @@
* content: * content:
* application/json: * application/json:
* schema: * 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: * x-codeSamples:
* - lang: JavaScript * - lang: JavaScript
* label: JS SDK * label: JS SDK
@@ -31,7 +31,28 @@
* content: * content:
* application/json: * application/json:
* schema: * 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: * x-codeSamples:
* - lang: JavaScript * - lang: JavaScript
* label: JS SDK * label: JS SDK
@@ -60,6 +60,18 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-workflow: confirmOrderEditRequestWorkflow * 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
* *
*/ */
@@ -60,6 +60,18 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-workflow: requestOrderEditRequestWorkflow * 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
* *
*/ */
@@ -86,7 +86,18 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-workflow: transferCartCustomerWorkflow * 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,9 +1,18 @@
/** /**
* @oas [post] /store/return * @oas [post] /store/returns
* operationId: PostReturn * operationId: PostReturns
* summary: Create Return * summary: Create Return
* description: Create a return for an order's items. The admin receives the return and process it from their side. * description: Create a return for an order's items. The admin receives the return and process it from their side.
* x-authenticated: false * 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: * requestBody:
* content: * content:
* application/json: * application/json:
@@ -13,11 +22,11 @@
* - lang: Shell * - lang: Shell
* label: cURL * label: cURL
* source: |- * source: |-
* curl -X POST '{backend_url}/store/return' \ * curl -X POST '{backend_url}/store/returns' \
* -H 'Content-Type: application/json' \
* -H 'x-publishable-api-key: {your_publishable_api_key}' \ * -H 'x-publishable-api-key: {your_publishable_api_key}' \
* -H 'Content-Type: application/json' \
* --data-raw '{ * --data-raw '{
* "order_id": "{value}", * "order_id": "order_123",
* "items": [ * "items": [
* { * {
* "id": "id_XbfptxUVo2io9EI", * "id": "id_XbfptxUVo2io9EI",
@@ -34,7 +43,7 @@
* "location_id": "{value}" * "location_id": "{value}"
* }' * }'
* tags: * tags:
* - Return * - Returns
* responses: * responses:
* "200": * "200":
* description: OK * description: OK
@@ -55,15 +64,28 @@
* "500": * "500":
* $ref: "#/components/responses/500_error" * $ref: "#/components/responses/500_error"
* x-workflow: createAndCompleteReturnOrderWorkflow * x-workflow: createAndCompleteReturnOrderWorkflow
* parameters: * x-events:
* - name: x-publishable-api-key * - name: order.return_requested
* in: header * payload: |-
* description: Publishable API Key created in the Medusa Admin. * ```ts
* required: true * {
* schema: * order_id, // The ID of the order
* type: string * return_id, // The ID of the return
* externalDocs: * }
* url: https://docs.medusajs.com/api/store#publishable-api-key * ```
* 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
* *
*/ */
@@ -26,6 +26,11 @@
* description: The list of claims. * description: The list of claims.
* items: * items:
* $ref: "#/components/schemas/AdminClaim" * $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
* *
*/ */
@@ -26,6 +26,11 @@
* description: The list of product collections. * description: The list of product collections.
* items: * items:
* $ref: "#/components/schemas/AdminCollection" * $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
* *
*/ */
@@ -1,22 +0,0 @@
/**
* @schema 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.
*
*/
@@ -61,7 +61,7 @@
* type: string * type: string
* title: province * title: province
* description: The delivery address's ISO 3166-2 province code. Must be lower-case. * description: The delivery address's ISO 3166-2 province code. Must be lower-case.
* example: "us-ca" * example: us-ca
* externalDocs: * externalDocs:
* url: https://en.wikipedia.org/wiki/ISO_3166-2 * url: https://en.wikipedia.org/wiki/ISO_3166-2
* description: Learn more about ISO 3166-2 * description: Learn more about ISO 3166-2
@@ -15,7 +15,7 @@
* type: string * type: string
* title: province_code * title: province_code
* description: The tax region's ISO 3166-2 province code. Must be lower-case. * description: The tax region's ISO 3166-2 province code. Must be lower-case.
* example: "us-ca" * example: us-ca
* externalDocs: * externalDocs:
* url: https://en.wikipedia.org/wiki/ISO_3166-2 * url: https://en.wikipedia.org/wiki/ISO_3166-2
* description: Learn more about ISO 3166-2 * description: Learn more about ISO 3166-2
@@ -55,6 +55,10 @@
* metadata: * metadata:
* type: object * type: object
* description: The tax region's metadata, used to store custom key-value pairs. * 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.
* *
*/ */
@@ -26,6 +26,11 @@
* description: The list of currencies. * description: The list of currencies.
* items: * items:
* $ref: "#/components/schemas/AdminCurrency" * $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
* *
*/ */
@@ -76,7 +76,7 @@
* type: string * type: string
* title: province * title: province
* description: The address's lower-case ISO 3166-2 province code. * description: The address's lower-case ISO 3166-2 province code.
* example: "us-ca" * example: us-ca
* externalDocs: * externalDocs:
* url: https://en.wikipedia.org/wiki/ISO_3166-2 * url: https://en.wikipedia.org/wiki/ISO_3166-2
* description: Learn more about ISO 3166-2 * description: Learn more about ISO 3166-2
@@ -26,6 +26,11 @@
* description: The list of draft orders. * description: The list of draft orders.
* items: * items:
* $ref: "#/components/schemas/AdminDraftOrder" * $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
* *
*/ */
@@ -61,7 +61,7 @@
* type: string * type: string
* title: province * title: province
* description: The address's lower-case ISO 3166-2 province code. * description: The address's lower-case ISO 3166-2 province code.
* example: "us-ca" * example: us-ca
* externalDocs: * externalDocs:
* url: https://en.wikipedia.org/wiki/ISO_3166-2 * url: https://en.wikipedia.org/wiki/ISO_3166-2
* description: Learn more about ISO 3166-2 * description: Learn more about ISO 3166-2
@@ -26,6 +26,11 @@
* description: The list of fulfillment providers. * description: The list of fulfillment providers.
* items: * items:
* $ref: "#/components/schemas/AdminFulfillmentProvider" * $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
* *
*/ */
Loaded 100 of 135 files, more files were not shown because too many files have changed in this diff. Show more