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
@@ -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.
*
*/