chore(docs): Generated API Reference (#2218)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
7c6521101e
commit
9ead8aedd1
@@ -1,4 +1,5 @@
|
||||
curl --location --request POST 'https://medusa-url.com/admin/uploads' \
|
||||
--header 'Authorization: Bearer {api_token}' \
|
||||
--header 'Content-Type: image/jpeg' \
|
||||
--data-binary '{file_path}'
|
||||
--form 'files=@"<FILE_PATH_1>"' \
|
||||
--form 'files=@"<FILE_PATH_1>"'
|
||||
|
||||
@@ -26,3 +26,6 @@ properties:
|
||||
description: The written name of the currency
|
||||
type: string
|
||||
example: US Dollar
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Does the currency prices include tax'
|
||||
type: boolean
|
||||
|
||||
@@ -51,3 +51,6 @@ properties:
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Indicates if the custom shipping option price include tax'
|
||||
type: boolean
|
||||
|
||||
@@ -157,6 +157,9 @@ properties:
|
||||
type: integer
|
||||
description: The total of the gift card of the line item
|
||||
example: 0
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||
type: boolean
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
|
||||
@@ -187,6 +187,13 @@ properties:
|
||||
is expanded.
|
||||
items:
|
||||
$ref: ./line_item.yaml
|
||||
edits:
|
||||
type: array
|
||||
description: >-
|
||||
[EXPERIMENTAL] Order edits done on the order. Available if the relation
|
||||
`edits` is expanded.
|
||||
items:
|
||||
$ref: ./order_edit.yaml
|
||||
gift_card_transactions:
|
||||
type: array
|
||||
description: >-
|
||||
|
||||
87
docs/api/admin/components/schemas/order_edit.yaml
Normal file
87
docs/api/admin/components/schemas/order_edit.yaml
Normal file
@@ -0,0 +1,87 @@
|
||||
title: Order Edit
|
||||
description: Order edit keeps track of order items changes.
|
||||
x-resourceId: order_edit
|
||||
required:
|
||||
- order_id
|
||||
- order
|
||||
- changes
|
||||
- created_by
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The order edit's ID
|
||||
example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order_id:
|
||||
type: string
|
||||
description: The ID of the order that is edited
|
||||
example: order_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
order:
|
||||
description: Order object
|
||||
$ref: ./order.yaml
|
||||
changes:
|
||||
type: array
|
||||
description: Line item changes array.
|
||||
items:
|
||||
$ref: ./order_item_change.yaml
|
||||
internal_note:
|
||||
description: An optional note with additional details about the order edit.
|
||||
type: string
|
||||
example: Included two more items B to the order.
|
||||
created_by:
|
||||
type: string
|
||||
description: The unique identifier of the user or customer who created the order edit.
|
||||
requested_by:
|
||||
type: string
|
||||
description: >-
|
||||
The unique identifier of the user or customer who requested the order
|
||||
edit.
|
||||
requested_at:
|
||||
type: string
|
||||
description: The date with timezone at which the edit was requested.
|
||||
format: date-time
|
||||
confirmed_by:
|
||||
type: string
|
||||
description: >-
|
||||
The unique identifier of the user or customer who confirmed the order
|
||||
edit.
|
||||
confirmed_at:
|
||||
type: string
|
||||
description: The date with timezone at which the edit was confirmed.
|
||||
format: date-time
|
||||
declined_by:
|
||||
type: string
|
||||
description: The unique identifier of the user or customer who declined the order edit.
|
||||
declined_at:
|
||||
type: string
|
||||
description: The date with timezone at which the edit was declined.
|
||||
format: date-time
|
||||
declined_reason:
|
||||
description: An optional note why the order edit is declined.
|
||||
type: string
|
||||
subtotal:
|
||||
type: integer
|
||||
description: The subtotal for line items computed from changes.
|
||||
example: 8000
|
||||
discount_total:
|
||||
type: integer
|
||||
description: The total of discount
|
||||
example: 800
|
||||
tax_total:
|
||||
type: integer
|
||||
description: The total of tax
|
||||
example: 0
|
||||
total:
|
||||
type: integer
|
||||
description: The total amount of the edited order.
|
||||
example: 8200
|
||||
difference_due:
|
||||
type: integer
|
||||
description: >-
|
||||
The difference between the total amount of the order and total amount of
|
||||
edited order.
|
||||
example: 8200
|
||||
items:
|
||||
type: array
|
||||
description: Computed line items from the changes.
|
||||
items:
|
||||
$ref: ./line_item.yaml
|
||||
39
docs/api/admin/components/schemas/order_item_change.yaml
Normal file
39
docs/api/admin/components/schemas/order_item_change.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
title: Order Item Change
|
||||
description: Represents an order edit item change
|
||||
x-resourceId: order_item_change
|
||||
required:
|
||||
- type
|
||||
- order_edit_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The order item change's ID
|
||||
example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
type:
|
||||
type: string
|
||||
description: The order's status
|
||||
enum:
|
||||
- item_add
|
||||
- item_remove
|
||||
- item_update
|
||||
order_edit_id:
|
||||
type: string
|
||||
description: The ID of the order edit
|
||||
example: oe_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
order_edit:
|
||||
description: Order edit object
|
||||
$ref: ./order_edit.yaml
|
||||
original_line_item_id:
|
||||
type: string
|
||||
description: The ID of the original line item in the order
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
original_line_item:
|
||||
description: Original line item object.
|
||||
$ref: ./line_item.yaml
|
||||
line_item_id:
|
||||
type: string
|
||||
description: The ID of the cloned line item.
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
line_item:
|
||||
description: Line item object.
|
||||
$ref: ./line_item.yaml
|
||||
@@ -55,7 +55,12 @@ properties:
|
||||
the relation `prices` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./money_amount.yaml
|
||||
oneOf:
|
||||
- $ref: ./money_amount.yaml
|
||||
- $ref: ./customer_group.yaml
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Does the price list prices include tax'
|
||||
type: boolean
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
|
||||
@@ -83,6 +83,9 @@ properties:
|
||||
type: array
|
||||
items:
|
||||
$ref: ./fulfillment_provider.yaml
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Does the prices for the region include tax'
|
||||
type: boolean
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
|
||||
@@ -74,3 +74,6 @@ properties:
|
||||
may contain information such as a drop point id.
|
||||
type: object
|
||||
example: {}
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Indicates if the shipping method price include tax'
|
||||
type: boolean
|
||||
|
||||
@@ -84,6 +84,9 @@ properties:
|
||||
Option.
|
||||
type: object
|
||||
example: {}
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Does the shipping option price include tax'
|
||||
type: boolean
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
|
||||
@@ -139,6 +139,10 @@ paths:
|
||||
$ref: paths/collections.yaml
|
||||
/collections/{id}:
|
||||
$ref: paths/collections_{id}.yaml
|
||||
/currencies:
|
||||
$ref: paths/currencies.yaml
|
||||
/currencies/{code}:
|
||||
$ref: paths/currencies_{code}.yaml
|
||||
/customer-groups/{id}/customers/batch:
|
||||
$ref: paths/customer-groups_{id}_customers_batch.yaml
|
||||
/customer-groups:
|
||||
|
||||
53
docs/api/admin/paths/currencies.yaml
Normal file
53
docs/api/admin/paths/currencies.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
get:
|
||||
operationId: GetCurrencies
|
||||
summary: List Currency
|
||||
description: Retrieves a list of Currency
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: code
|
||||
description: Code of the currency to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: includes_tax
|
||||
description: Search for tax inclusive currencies.
|
||||
schema:
|
||||
type: boolean
|
||||
- in: query
|
||||
name: order
|
||||
description: to retrieve products in.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many products to skip in the result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of products returned.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Currency
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
count:
|
||||
description: The number of Currency.
|
||||
type: integer
|
||||
offset:
|
||||
description: The offset of the Currency query.
|
||||
type: integer
|
||||
limit:
|
||||
description: The limit of the currency query.
|
||||
type: integer
|
||||
currencies:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/currency.yaml
|
||||
31
docs/api/admin/paths/currencies_{code}.yaml
Normal file
31
docs/api/admin/paths/currencies_{code}.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
post:
|
||||
operationId: PostCurrenciesCurrency
|
||||
summary: Update a Currency
|
||||
description: Update a Currency
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: code
|
||||
required: true
|
||||
description: The code of the Currency.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
includes_tax:
|
||||
type: boolean
|
||||
description: '[EXPERIMENTAL] Tax included in prices of currency.'
|
||||
tags:
|
||||
- Currency
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
currency:
|
||||
$ref: ../components/schemas/currency.yaml
|
||||
@@ -82,6 +82,9 @@ post:
|
||||
id:
|
||||
description: The ID of a customer group
|
||||
type: string
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Tax included in prices of price list'
|
||||
type: boolean
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
|
||||
@@ -190,6 +190,9 @@ post:
|
||||
id:
|
||||
description: The ID of a customer group
|
||||
type: string
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Tax included in prices of price list'
|
||||
type: boolean
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
|
||||
@@ -53,6 +53,9 @@ post:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Tax included in prices of region'
|
||||
type: boolean
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
|
||||
@@ -149,6 +149,9 @@ post:
|
||||
tax_rate:
|
||||
description: The tax rate to use on Orders in the Region.
|
||||
type: number
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Tax included in prices of region'
|
||||
type: boolean
|
||||
payment_providers:
|
||||
description: >-
|
||||
A list of Payment Provider IDs that should be enabled for the
|
||||
|
||||
@@ -74,6 +74,9 @@ post:
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Tax included in prices of shipping option'
|
||||
type: boolean
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
|
||||
@@ -154,6 +154,9 @@ post:
|
||||
amount:
|
||||
description: The amount to compare with.
|
||||
type: integer
|
||||
includes_tax:
|
||||
description: '[EXPERIMENTAL] Tax included in prices of shipping option'
|
||||
type: boolean
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
post:
|
||||
operationId: PostUploads
|
||||
summary: Upload a file
|
||||
description: Uploads a file to the specific fileservice that is installed in Medusa.
|
||||
summary: Upload files
|
||||
description: >-
|
||||
Uploads at least one file to the specific fileservice that is installed in
|
||||
Medusa.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
|
||||
@@ -23,7 +23,7 @@ delete:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
tags:
|
||||
- Users
|
||||
- User
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
|
||||
Reference in New Issue
Block a user