chore(docs): Updated API Reference (v2) (#8208)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
This commit is contained in:
github-actions[bot]
2024-07-22 07:10:08 +00:00
committed by GitHub
parent 9173dd4f5d
commit c99cb5c0ca
60 changed files with 3835 additions and 196 deletions
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/notifications' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl '{backend_url}/admin/notifications/{id}' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/products/export' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/returns/{id}/dismiss-items' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X DELETE '{backend_url}/admin/returns/{id}/dismiss-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/returns/{id}/dismiss-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/returns/{id}/receive-items' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X DELETE '{backend_url}/admin/returns/{id}/receive-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/returns/{id}/receive-items/{action_id}' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X DELETE '{backend_url}/admin/returns/{id}/receive' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,2 @@
curl -X POST '{backend_url}/admin/returns/{id}/receive/confirm' \
-H 'x-medusa-access-token: {api_token}'
@@ -0,0 +1,3 @@
type: object
description: SUMMARY
x-schemaName: AdminExportProductRequest
@@ -0,0 +1,10 @@
type: object
description: SUMMARY
x-schemaName: AdminExportProductResponse
required:
- workflow_id
properties:
workflow_id:
type: string
title: workflow_id
description: The product's workflow id.
@@ -0,0 +1,18 @@
type: object
required:
- return_id
- internal_note
x-schemaName: AdminPostCancelReturnReqSchema
properties:
return_id:
type: string
title: return_id
description: The return's return id.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
internal_note:
type: string
title: internal_note
description: The return's internal note.
@@ -2,42 +2,16 @@ type: object
description: SUMMARY
x-schemaName: AdminPostReceiveReturnsReqSchema
required:
- return_id
- items
- internal_note
- metadata
properties:
return_id:
type: string
title: return_id
description: The return's return id.
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
- reason_id
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
reason_id:
type: string
title: reason_id
description: The item's reason id.
note:
type: string
title: note
description: The item's note.
internal_note:
type: string
title: internal_note
description: The return's internal note.
description:
type: string
title: description
description: The return's description.
metadata:
type: object
description: The return's metadata.
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsDismissItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
@@ -0,0 +1,30 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsReqSchema
properties:
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
description:
type: string
title: description
description: The item's description.
internal_note:
type: string
title: internal_note
description: The item's internal note.
File diff suppressed because it is too large Load Diff
@@ -53,6 +53,7 @@ tags:
externalDocs:
description: How to manage invites
url: https://docs.medusajs.com/modules/users/admin/manage-invites
- name: Notifications
- name: Orders
- name: Payments
- name: Price Lists
@@ -180,6 +181,10 @@ paths:
$ref: paths/admin_invites_{id}.yaml
/admin/invites/{id}/resend:
$ref: paths/admin_invites_{id}_resend.yaml
/admin/notifications:
$ref: paths/admin_notifications.yaml
/admin/notifications/{id}:
$ref: paths/admin_notifications_{id}.yaml
/admin/orders:
$ref: paths/admin_orders.yaml
/admin/orders/{id}:
@@ -238,6 +243,8 @@ paths:
$ref: paths/admin_products.yaml
/admin/products/batch:
$ref: paths/admin_products_batch.yaml
/admin/products/export:
$ref: paths/admin_products_export.yaml
/admin/products/{id}:
$ref: paths/admin_products_{id}.yaml
/admin/products/{id}/options:
@@ -292,8 +299,18 @@ paths:
$ref: paths/admin_returns_{id}.yaml
/admin/returns/{id}/cancel:
$ref: paths/admin_returns_{id}_cancel.yaml
/admin/returns/{id}/dismiss-items:
$ref: paths/admin_returns_{id}_dismiss-items.yaml
/admin/returns/{id}/dismiss-items/{action_id}:
$ref: paths/admin_returns_{id}_dismiss-items_{action_id}.yaml
/admin/returns/{id}/receive:
$ref: paths/admin_returns_{id}_receive.yaml
/admin/returns/{id}/receive-items:
$ref: paths/admin_returns_{id}_receive-items.yaml
/admin/returns/{id}/receive-items/{action_id}:
$ref: paths/admin_returns_{id}_receive-items_{action_id}.yaml
/admin/returns/{id}/receive/confirm:
$ref: paths/admin_returns_{id}_receive_confirm.yaml
/admin/returns/{id}/request:
$ref: paths/admin_returns_{id}_request.yaml
/admin/returns/{id}/request-items:
@@ -0,0 +1,131 @@
get:
operationId: GetNotifications
summary: List Notifications
description: >-
Retrieve a list of notifications. The notifications can be filtered by
fields such as `id`. The notifications can also be sorted or paginated.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
- name: q
in: query
description: The notification's q.
required: false
schema:
type: string
title: q
description: The notification's q.
- name: id
in: query
required: false
schema:
oneOf:
- type: string
title: id
description: The notification's ID.
- type: array
description: The notification's ID.
items:
type: string
title: id
description: The id's ID.
- name: channel
in: query
required: false
schema:
oneOf:
- type: string
title: channel
description: The notification's channel.
- type: array
description: The notification's channel.
items:
type: string
title: channel
description: The channel's details.
- name: $and
in: query
required: false
schema: {}
- name: $or
in: query
required: false
schema: {}
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_notifications/get.sh
tags:
- Notifications
responses:
'200':
description: OK
'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
@@ -0,0 +1,93 @@
get:
operationId: GetNotificationsId
summary: Get a Notification
description: >-
Retrieve a notification by its ID. You can expand the notification's
relations or select the fields that should be returned.
x-authenticated: true
parameters:
- name: id
in: path
description: The notification's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_notifications_{id}/get.sh
tags:
- Notifications
responses:
'200':
description: OK
'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
@@ -0,0 +1,94 @@
post:
operationId: PostProductsExport
summary: Create Product
description: Create a product.
x-authenticated: true
parameters:
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminExportProductRequest.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_products_export/post.sh
tags:
- Products
responses:
'202':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminExportProductResponse.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
@@ -92,4 +92,5 @@ post:
requestBody:
content:
application/json:
schema: {}
schema:
$ref: ../components/schemas/AdminPostCancelReturnReqSchema.yaml
@@ -0,0 +1,96 @@
post:
operationId: PostReturnsIdDismissItems
summary: Add Dismiss Items to Return
description: Add a list of dismiss items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminPostReturnsReceiveItemsReqSchema.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_returns_{id}_dismiss-items/post.sh
tags:
- Returns
responses:
'200':
description: OK
'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
@@ -0,0 +1,204 @@
post:
operationId: PostReturnsIdDismissItemsAction_id
summary: Add Dismiss Items to Return
description: Add a list of dismiss items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: >-
../components/schemas/AdminPostReturnsDismissItemsActionReqSchema.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: >-
../code_samples/Shell/admin_returns_{id}_dismiss-items_{action_id}/post.sh
tags:
- Returns
responses:
'200':
description: OK
'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
delete:
operationId: DeleteReturnsIdDismissItemsAction_id
summary: Remove Dismiss Items from Return
description: >-
Remove a list of dismiss items from a return. This doesn't delete the
Dismiss Item, only the association between the Dismiss Item and the return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: >-
../code_samples/Shell/admin_returns_{id}_dismiss-items_{action_id}/delete.sh
tags:
- Returns
responses:
'200':
description: OK
'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
@@ -0,0 +1,96 @@
post:
operationId: PostReturnsIdReceiveItems
summary: Add Receive Items to Return
description: Add a list of receive items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminPostReturnsReceiveItemsReqSchema.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_returns_{id}_receive-items/post.sh
tags:
- Returns
responses:
'200':
description: OK
'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
@@ -0,0 +1,204 @@
post:
operationId: PostReturnsIdReceiveItemsAction_id
summary: Add Receive Items to Return
description: Add a list of receive items to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: >-
../components/schemas/AdminPostReturnsReceiveItemsActionReqSchema.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: >-
../code_samples/Shell/admin_returns_{id}_receive-items_{action_id}/post.sh
tags:
- Returns
responses:
'200':
description: OK
'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
delete:
operationId: DeleteReturnsIdReceiveItemsAction_id
summary: Remove Receive Items from Return
description: >-
Remove a list of receive items from a return. This doesn't delete the
Receive Item, only the association between the Receive Item and the return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: action_id
in: path
description: The return's action id.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: >-
../code_samples/Shell/admin_returns_{id}_receive-items_{action_id}/delete.sh
tags:
- Returns
responses:
'200':
description: OK
'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
@@ -94,3 +94,96 @@ post:
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml
delete:
operationId: DeleteReturnsIdReceive
summary: Remove Receives from Return
description: >-
Remove a list of receives from a return. This doesn't delete the Receive,
only the association between the Receive and the return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_returns_{id}_receive/delete.sh
tags:
- Returns
responses:
'200':
description: OK
'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
@@ -0,0 +1,96 @@
post:
operationId: PostReturnsIdReceiveConfirm
summary: Add Confirms to Return
description: Add a list of confirms to a return.
x-authenticated: true
parameters:
- name: id
in: path
description: The return's ID.
required: true
schema:
type: string
- name: expand
in: query
description: Comma-separated relations that should be expanded in the returned data.
required: false
schema:
type: string
title: expand
description: >-
Comma-separated relations that should be expanded in the returned
data.
- 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.
- 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.
- 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.
- 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 `-`.
security:
- api_token: []
- cookie_auth: []
- jwt_token: []
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminPostReturnsConfirmRequestReqSchema.yaml
x-codeSamples:
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/admin_returns_{id}_receive_confirm/post.sh
tags:
- Returns
responses:
'200':
description: OK
'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
@@ -120,18 +120,20 @@ delete:
data.
- 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.
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: |-
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.
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.
- name: offset
in: query
description: The number of items to skip when retrieving a list.
@@ -173,8 +175,6 @@ delete:
tags:
- Returns
responses:
'200':
description: OK
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -0,0 +1,3 @@
type: object
description: SUMMARY
x-schemaName: AdminExportProductRequest
@@ -0,0 +1,10 @@
type: object
description: SUMMARY
x-schemaName: AdminExportProductResponse
required:
- workflow_id
properties:
workflow_id:
type: string
title: workflow_id
description: The product's workflow id.
@@ -0,0 +1,18 @@
type: object
required:
- return_id
- internal_note
x-schemaName: AdminPostCancelReturnReqSchema
properties:
return_id:
type: string
title: return_id
description: The return's return id.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
internal_note:
type: string
title: internal_note
description: The return's internal note.
@@ -2,42 +2,16 @@ type: object
description: SUMMARY
x-schemaName: AdminPostReceiveReturnsReqSchema
required:
- return_id
- items
- internal_note
- metadata
properties:
return_id:
type: string
title: return_id
description: The return's return id.
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
- reason_id
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
reason_id:
type: string
title: reason_id
description: The item's reason id.
note:
type: string
title: note
description: The item's note.
internal_note:
type: string
title: internal_note
description: The return's internal note.
description:
type: string
title: description
description: The return's description.
metadata:
type: object
description: The return's metadata.
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsDismissItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
@@ -0,0 +1,30 @@
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsReqSchema
properties:
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
description:
type: string
title: description
description: The item's description.
internal_note:
type: string
title: internal_note
description: The item's internal note.
@@ -5366,6 +5366,21 @@ components:
format: date-time
title: updated_at
description: The group's updated at.
AdminExportProductRequest:
type: object
description: SUMMARY
x-schemaName: AdminExportProductRequest
AdminExportProductResponse:
type: object
description: SUMMARY
x-schemaName: AdminExportProductResponse
required:
- workflow_id
properties:
workflow_id:
type: string
title: workflow_id
description: The product's workflow id.
AdminFulfillmentProvider:
type: object
description: The shipping option's provider.
@@ -5565,50 +5580,43 @@ components:
metadata:
type: object
description: The order's metadata.
AdminPostReceiveReturnsReqSchema:
AdminPostCancelReturnReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReceiveReturnsReqSchema
required:
- return_id
- items
- internal_note
x-schemaName: AdminPostCancelReturnReqSchema
properties:
return_id:
type: string
title: return_id
description: The return's return id.
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
- reason_id
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
reason_id:
type: string
title: reason_id
description: The item's reason id.
note:
type: string
title: note
description: The item's note.
no_notification:
type: boolean
title: no_notification
description: The return's no notification.
internal_note:
type: string
title: internal_note
description: The return's internal note.
AdminPostReceiveReturnsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReceiveReturnsReqSchema
required:
- metadata
properties:
internal_note:
type: string
title: internal_note
description: The return's internal note.
description:
type: string
title: description
description: The return's description.
metadata:
type: object
description: The return's metadata.
AdminPostReturnsConfirmRequestReqSchema:
type: object
description: SUMMARY
@@ -5618,6 +5626,63 @@ components:
type: boolean
title: no_notification
description: The return's no notification.
AdminPostReturnsDismissItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsDismissItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
AdminPostReturnsReceiveItemsActionReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsActionReqSchema
properties:
quantity:
type: number
title: quantity
description: The return's quantity.
internal_note:
type: string
title: internal_note
description: The return's internal note.
AdminPostReturnsReceiveItemsReqSchema:
type: object
description: SUMMARY
x-schemaName: AdminPostReturnsReceiveItemsReqSchema
properties:
items:
type: array
description: The return's items.
items:
type: object
description: The item's items.
required:
- id
- quantity
properties:
id:
type: string
title: id
description: The item's ID.
quantity:
type: number
title: quantity
description: The item's quantity.
description:
type: string
title: description
description: The item's description.
internal_note:
type: string
title: internal_note
description: The item's internal note.
AdminPostReturnsReqSchema:
type: object
description: SUMMARY
@@ -48,6 +48,7 @@ tags:
externalDocs:
description: How to manage invites
url: https://docs.medusajs.com/modules/users/admin/manage-invites
- name: Notifications
- name: Orders
- name: Payments
- name: Price Lists
@@ -0,0 +1,103 @@
/**
* @oas [delete] /admin/returns/{id}/dismiss-items/{action_id}
* operationId: DeleteReturnsIdDismissItemsAction_id
* summary: Remove Dismiss Items from Return
* description: Remove a list of dismiss items from a return. This doesn't delete
* the Dismiss Item, only the association between the Dismiss Item and the
* return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: >-
* curl -X DELETE
* '{backend_url}/admin/returns/{id}/dismiss-items/{action_id}' \
*
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,103 @@
/**
* @oas [delete] /admin/returns/{id}/receive-items/{action_id}
* operationId: DeleteReturnsIdReceiveItemsAction_id
* summary: Remove Receive Items from Return
* description: Remove a list of receive items from a return. This doesn't delete
* the Receive Item, only the association between the Receive Item and the
* return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: >-
* curl -X DELETE
* '{backend_url}/admin/returns/{id}/receive-items/{action_id}' \
*
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,94 @@
/**
* @oas [delete] /admin/returns/{id}/receive
* operationId: DeleteReturnsIdReceive
* summary: Remove Receives from Return
* description: Remove a list of receives from a return. This doesn't delete the
* Receive, only the association between the Receive and the return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X DELETE '{backend_url}/admin/returns/{id}/receive' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -22,18 +22,18 @@
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* 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.
* 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.
* - name: offset
* in: query
* description: The number of items to skip when retrieving a list.
@@ -75,8 +75,6 @@
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -0,0 +1,132 @@
/**
* @oas [get] /admin/notifications
* operationId: GetNotifications
* summary: List Notifications
* description: Retrieve a list of notifications. The notifications can be filtered
* by fields such as `id`. The notifications can also be sorted or paginated.
* x-authenticated: true
* parameters:
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* - name: q
* in: query
* description: The notification's q.
* required: false
* schema:
* type: string
* title: q
* description: The notification's q.
* - name: id
* in: query
* required: false
* schema:
* oneOf:
* - type: string
* title: id
* description: The notification's ID.
* - type: array
* description: The notification's ID.
* items:
* type: string
* title: id
* description: The id's ID.
* - name: channel
* in: query
* required: false
* schema:
* oneOf:
* - type: string
* title: channel
* description: The notification's channel.
* - type: array
* description: The notification's channel.
* items:
* type: string
* title: channel
* description: The channel's details.
* - name: $and
* in: query
* required: false
* schema: {}
* - name: $or
* in: query
* required: false
* schema: {}
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl '{backend_url}/admin/notifications' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Notifications
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,94 @@
/**
* @oas [get] /admin/notifications/{id}
* operationId: GetNotificationsId
* summary: Get a Notification
* description: Retrieve a notification by its ID. You can expand the
* notification's relations or select the fields that should be returned.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The notification's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl '{backend_url}/admin/notifications/{id}' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Notifications
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,96 @@
/**
* @oas [post] /admin/products/export
* operationId: PostProductsExport
* summary: Create Product
* description: Create a product.
* x-authenticated: true
* parameters:
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminExportProductRequest"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/products/export' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Products
* responses:
* "202":
* description: OK
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminExportProductResponse"
* "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"
*
*/
@@ -89,7 +89,8 @@
* requestBody:
* content:
* application/json:
* schema: {}
* schema:
* $ref: "#/components/schemas/AdminPostCancelReturnReqSchema"
*
*/
@@ -0,0 +1,98 @@
/**
* @oas [post] /admin/returns/{id}/dismiss-items
* operationId: PostReturnsIdDismissItems
* summary: Add Dismiss Items to Return
* description: Add a list of dismiss items to a return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostReturnsReceiveItemsReqSchema"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/returns/{id}/dismiss-items' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,106 @@
/**
* @oas [post] /admin/returns/{id}/dismiss-items/{action_id}
* operationId: PostReturnsIdDismissItemsAction_id
* summary: Add Dismiss Items to Return
* description: Add a list of dismiss items to a return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostReturnsDismissItemsActionReqSchema"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: >-
* curl -X POST '{backend_url}/admin/returns/{id}/dismiss-items/{action_id}'
* \
*
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,98 @@
/**
* @oas [post] /admin/returns/{id}/receive-items
* operationId: PostReturnsIdReceiveItems
* summary: Add Receive Items to Return
* description: Add a list of receive items to a return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostReturnsReceiveItemsReqSchema"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/returns/{id}/receive-items' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,106 @@
/**
* @oas [post] /admin/returns/{id}/receive-items/{action_id}
* operationId: PostReturnsIdReceiveItemsAction_id
* summary: Add Receive Items to Return
* description: Add a list of receive items to a return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: action_id
* in: path
* description: The return's action id.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostReturnsReceiveItemsActionReqSchema"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: >-
* curl -X POST '{backend_url}/admin/returns/{id}/receive-items/{action_id}'
* \
*
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,98 @@
/**
* @oas [post] /admin/returns/{id}/receive/confirm
* operationId: PostReturnsIdReceiveConfirm
* summary: Add Confirms to Return
* description: Add a list of confirms to a return.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The return's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - 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.
* - 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.
* - 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
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostReturnsConfirmRequestReqSchema"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/returns/{id}/receive/confirm' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Returns
* responses:
* "200":
* description: OK
* "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"
*
*/
@@ -0,0 +1,8 @@
/**
* @schema AdminExportProductRequest
* type: object
* description: SUMMARY
* x-schemaName: AdminExportProductRequest
*
*/
@@ -0,0 +1,15 @@
/**
* @schema AdminExportProductResponse
* type: object
* description: SUMMARY
* x-schemaName: AdminExportProductResponse
* required:
* - workflow_id
* properties:
* workflow_id:
* type: string
* title: workflow_id
* description: The product's workflow id.
*
*/
@@ -0,0 +1,23 @@
/**
* @schema AdminPostCancelReturnReqSchema
* type: object
* required:
* - return_id
* - internal_note
* x-schemaName: AdminPostCancelReturnReqSchema
* properties:
* return_id:
* type: string
* title: return_id
* description: The return's return id.
* no_notification:
* type: boolean
* title: no_notification
* description: The return's no notification.
* internal_note:
* type: string
* title: internal_note
* description: The return's internal note.
*
*/
@@ -4,45 +4,19 @@
* description: SUMMARY
* x-schemaName: AdminPostReceiveReturnsReqSchema
* required:
* - return_id
* - items
* - internal_note
* - metadata
* properties:
* return_id:
* type: string
* title: return_id
* description: The return's return id.
* items:
* type: array
* description: The return's items.
* items:
* type: object
* description: The item's items.
* required:
* - id
* - quantity
* - reason_id
* properties:
* id:
* type: string
* title: id
* description: The item's ID.
* quantity:
* type: number
* title: quantity
* description: The item's quantity.
* reason_id:
* type: string
* title: reason_id
* description: The item's reason id.
* note:
* type: string
* title: note
* description: The item's note.
* internal_note:
* type: string
* title: internal_note
* description: The return's internal note.
* description:
* type: string
* title: description
* description: The return's description.
* metadata:
* type: object
* description: The return's metadata.
*
*/
@@ -0,0 +1,17 @@
/**
* @schema AdminPostReturnsDismissItemsActionReqSchema
* type: object
* description: SUMMARY
* x-schemaName: AdminPostReturnsDismissItemsActionReqSchema
* properties:
* quantity:
* type: number
* title: quantity
* description: The return's quantity.
* internal_note:
* type: string
* title: internal_note
* description: The return's internal note.
*
*/
@@ -0,0 +1,17 @@
/**
* @schema AdminPostReturnsReceiveItemsActionReqSchema
* type: object
* description: SUMMARY
* x-schemaName: AdminPostReturnsReceiveItemsActionReqSchema
* properties:
* quantity:
* type: number
* title: quantity
* description: The return's quantity.
* internal_note:
* type: string
* title: internal_note
* description: The return's internal note.
*
*/
@@ -0,0 +1,35 @@
/**
* @schema AdminPostReturnsReceiveItemsReqSchema
* type: object
* description: SUMMARY
* x-schemaName: AdminPostReturnsReceiveItemsReqSchema
* properties:
* items:
* type: array
* description: The return's items.
* items:
* type: object
* description: The item's items.
* required:
* - id
* - quantity
* properties:
* id:
* type: string
* title: id
* description: The item's ID.
* quantity:
* type: number
* title: quantity
* description: The item's quantity.
* description:
* type: string
* title: description
* description: The item's description.
* internal_note:
* type: string
* title: internal_note
* description: The item's internal note.
*
*/