docs: create docs workspace (#5174)

* docs: migrate ui docs to docs universe

* created yarn workspace

* added eslint and tsconfig configurations

* fix eslint configurations

* fixed eslint configurations

* shared tailwind configurations

* added shared ui package

* added more shared components

* migrating more components

* made details components shared

* move InlineCode component

* moved InputText

* moved Loading component

* Moved Modal component

* moved Select components

* Moved Tooltip component

* moved Search components

* moved ColorMode provider

* Moved Notification components and providers

* used icons package

* use UI colors in api-reference

* moved Navbar component

* used Navbar and Search in UI docs

* added Feedback to UI docs

* general enhancements

* fix color mode

* added copy colors file from ui-preset

* added features and enhancements to UI docs

* move Sidebar component and provider

* general fixes and preparations for deployment

* update docusaurus version

* adjusted versions

* fix output directory

* remove rootDirectory property

* fix yarn.lock

* moved code component

* added vale for all docs MD and MDX

* fix tests

* fix vale error

* fix deployment errors

* change ignore commands

* add output directory

* fix docs test

* general fixes

* content fixes

* fix announcement script

* added changeset

* fix vale checks

* added nofilter option

* fix vale error
This commit is contained in:
Shahed Nasser
2023-09-21 20:57:15 +03:00
committed by GitHub
parent 19c5d5ba36
commit fa7c94b4cc
3209 changed files with 32188 additions and 31018 deletions

View File

@@ -0,0 +1,119 @@
title: Address
description: >-
An address is used across the Medusa backend within other schemas and object
types. For example, a customer's billing and shipping addresses both use the
Address entity.
type: object
required:
- address_1
- address_2
- city
- company
- country_code
- created_at
- customer_id
- deleted_at
- first_name
- id
- last_name
- metadata
- phone
- postal_code
- province
- updated_at
properties:
id:
type: string
description: ID of the address
example: addr_01G8ZC9VS1XVE149MGH2J7QSSH
customer_id:
description: ID of the customer this address belongs to
nullable: true
type: string
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
customer:
description: Available if the relation `customer` is expanded.
nullable: true
type: object
company:
description: Company name
nullable: true
type: string
example: Acme
first_name:
description: First name
nullable: true
type: string
example: Arno
last_name:
description: Last name
nullable: true
type: string
example: Willms
address_1:
description: Address line 1
nullable: true
type: string
example: 14433 Kemmer Court
address_2:
description: Address line 2
nullable: true
type: string
example: Suite 369
city:
description: City
nullable: true
type: string
example: South Geoffreyview
country_code:
description: The 2 character ISO code of the country in lower case
nullable: true
type: string
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.
example: st
country:
description: A country object.
x-expandable: country
nullable: true
$ref: ./Country.yaml
province:
description: Province
nullable: true
type: string
example: Kentucky
postal_code:
description: Postal Code
nullable: true
type: string
example: 72093
phone:
description: Phone Number
nullable: true
type: string
example: 16128234334802
created_at:
type: string
description: The date with timezone at which the resource was created.
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
format: date-time
deleted_at:
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,57 @@
type: object
description: Address fields used when creating an address.
required:
- first_name
- last_name
- address_1
- city
- country_code
- postal_code
properties:
first_name:
description: First name
type: string
example: Arno
last_name:
description: Last name
type: string
example: Willms
phone:
type: string
description: Phone Number
example: 16128234334802
company:
type: string
address_1:
description: Address line 1
type: string
example: 14433 Kemmer Court
address_2:
description: Address line 2
type: string
example: Suite 369
city:
description: City
type: string
example: South Geoffreyview
country_code:
description: The 2 character ISO code of the country in lower case
type: string
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.
example: st
province:
description: Province
type: string
example: Kentucky
postal_code:
description: Postal Code
type: string
example: 72093
metadata:
type: object
example:
car: white
description: An optional key-value map with additional details

View File

@@ -0,0 +1,50 @@
type: object
description: Address fields used when creating/updating an address.
properties:
first_name:
description: First name
type: string
example: Arno
last_name:
description: Last name
type: string
example: Willms
phone:
type: string
description: Phone Number
example: 16128234334802
company:
type: string
address_1:
description: Address line 1
type: string
example: 14433 Kemmer Court
address_2:
description: Address line 2
type: string
example: Suite 369
city:
description: City
type: string
example: South Geoffreyview
country_code:
description: The 2 character ISO code of the country in lower case
type: string
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.
example: st
province:
description: Province
type: string
example: Kentucky
postal_code:
description: Postal Code
type: string
example: 72093
metadata:
type: object
example:
car: white
description: An optional key-value map with additional details

View File

@@ -0,0 +1,9 @@
type: object
required:
- apps
properties:
apps:
type: array
description: An array of app details.
items:
$ref: ./OAuth.yaml

View File

@@ -0,0 +1,7 @@
type: object
required:
- apps
properties:
apps:
description: App details.
$ref: ./OAuth.yaml

View File

@@ -0,0 +1,7 @@
type: object
required:
- user
properties:
user:
description: User details.
$ref: ./User.yaml

View File

@@ -0,0 +1,21 @@
type: object
required:
- batch_jobs
- count
- offset
- limit
properties:
batch_jobs:
type: array
description: An array of batch job details.
items:
$ref: ./BatchJob.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of batch jobs skipped when retrieving the batch jobs.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,7 @@
type: object
required:
- batch_job
properties:
batch_job:
description: Batch job details.
$ref: ./BatchJob.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Collection
object:
type: string
description: The type of the object that was deleted.
default: product-collection
deleted:
type: boolean
description: Whether the collection was deleted successfully or not.
default: true

View File

@@ -0,0 +1,23 @@
type: object
required:
- collections
- count
- offset
- limit
properties:
collections:
type: array
description: an array of collection details
items:
$ref: ./ProductCollection.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: >-
The number of product collections skipped when retrieving the product
collections.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,11 @@
type: object
x-expanded-relations:
field: collection
relations:
- products
required:
- collection
properties:
collection:
type: Product Collection details.
$ref: ./ProductCollection.yaml

View File

@@ -0,0 +1,28 @@
type: object
required:
- email
- password
properties:
email:
description: The User's email.
type: string
format: email
first_name:
description: The first name of the User.
type: string
last_name:
description: The last name of the User.
type: string
role:
description: >-
The role assigned to the user. These roles don't provide any different
privileges.
type: string
enum:
- admin
- member
- developer
password:
description: The User's password.
type: string
format: password

View File

@@ -0,0 +1,21 @@
type: object
required:
- currencies
- count
- offset
- limit
properties:
currencies:
type: array
description: An array of currency details.
items:
$ref: ./Currency.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of currencies skipped when retrieving the currencies.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,7 @@
type: object
required:
- currency
properties:
currency:
description: Currency details.
$ref: ./Currency.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted customer group.
object:
type: string
description: The type of the object that was deleted.
default: customer_group
deleted:
type: boolean
description: Whether the customer group was deleted successfully or not.
default: true

View File

@@ -0,0 +1,21 @@
type: object
required:
- customer_groups
- count
- offset
- limit
properties:
customer_groups:
type: array
description: An array of customer group details.
items:
$ref: ./CustomerGroup.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of customer groups skipped when retrieving the customer groups.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,7 @@
type: object
required:
- customer_group
properties:
customer_group:
description: Customer group details.
$ref: ./CustomerGroup.yaml

View File

@@ -0,0 +1,21 @@
type: object
required:
- customers
- count
- offset
- limit
properties:
customers:
type: array
description: An array of customer details.
items:
$ref: ./Customer.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of customers skipped when retrieving the customers.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,12 @@
type: object
x-expanded-relations:
field: customer
relations:
- orders
- shipping_addresses
required:
- customer
properties:
customer:
description: Customer details.
$ref: ./Customer.yaml

View File

@@ -0,0 +1,15 @@
type: object
required:
- customer_ids
properties:
customer_ids:
description: The ids of the customers to remove
type: array
items:
type: object
required:
- id
properties:
id:
description: ID of the customer
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- resources
properties:
resources:
description: The resources to be removed from the discount condition
type: array
items:
type: object
required:
- id
properties:
id:
description: The id of the item
type: string

View File

@@ -0,0 +1,7 @@
type: object
properties:
price_ids:
description: The price IDs of the Money Amounts to delete.
type: array
items:
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- product_ids
properties:
product_ids:
description: The IDs of the products to delete from the Product Category.
type: array
items:
type: object
required:
- id
properties:
id:
description: The ID of a product
type: string

View File

@@ -0,0 +1,10 @@
type: object
required:
- product_ids
properties:
product_ids:
description: An array of Product IDs to remove from the Product Collection.
type: array
items:
description: The ID of a Product to add to the Product Collection.
type: string

View File

@@ -0,0 +1,19 @@
type: object
required:
- id
- object
- removed_products
properties:
id:
type: string
description: The ID of the collection
object:
type: string
description: The type of object the removal was executed on
default: product-collection
removed_products:
description: The IDs of the products removed from the collection
type: array
items:
description: The ID of the Product removed from the Product Collection.
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- sales_channel_ids
properties:
sales_channel_ids:
description: The IDs of the sales channels to remove from the publishable API key
type: array
items:
type: object
required:
- id
properties:
id:
type: string
description: The ID of the sales channel

View File

@@ -0,0 +1,15 @@
type: object
required:
- product_ids
properties:
product_ids:
description: The IDs of the products to remove from the Sales Channel.
type: array
items:
type: object
required:
- id
properties:
id:
description: The ID of a product
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- location_id
properties:
location_id:
description: The ID of the stock location
type: string

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Shipping Profile.
object:
type: string
description: The type of the object that was deleted.
default: shipping_profile
deleted:
type: boolean
description: Whether or not the items were deleted.
default: true

View File

@@ -0,0 +1,11 @@
type: object
required:
- product_types
properties:
product_types:
type: array
description: >-
The IDs of the product types to remove their association with this tax
rate.
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- products
properties:
products:
type: array
description: The IDs of the products to remove their association with this tax rate.
items:
type: string

View File

@@ -0,0 +1,11 @@
type: object
required:
- shipping_options
properties:
shipping_options:
type: array
description: >-
The IDs of the shipping options to remove their association with this tax
rate.
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- file_key
properties:
file_key:
description: >-
key of the file to delete. This is obtained when you first uploaded the
file, or by the file service if you used it directly.
type: string

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The file key of the upload deleted
object:
type: string
description: The type of the object that was deleted.
default: file
deleted:
type: boolean
description: Whether or not the items were deleted.
default: true

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted user.
object:
type: string
description: The type of the object that was deleted.
default: user
deleted:
type: boolean
description: Whether or not the items were deleted.
default: true

View File

@@ -0,0 +1,21 @@
type: object
required:
- id
- object
- deleted
- discount
properties:
id:
type: string
description: The ID of the deleted Discount Condition
object:
type: string
description: The type of the object that was deleted.
default: discount-condition
deleted:
type: boolean
description: Whether the discount condition was deleted successfully.
default: true
discount:
description: The Discount to which the condition used to belong to.
$ref: ./Discount.yaml

View File

@@ -0,0 +1,11 @@
type: object
x-expanded-relations:
field: discount_condition
relations:
- discount_rule
required:
- discount_condition
properties:
discount_condition:
description: Discount condition details.
$ref: ./DiscountCondition.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Discount
object:
type: string
description: The type of the object that was deleted.
default: discount
deleted:
type: boolean
description: Whether the discount was deleted successfully.
default: true

View File

@@ -0,0 +1,27 @@
type: object
x-expanded-relations:
field: discounts
relations:
- parent_discount
- regions
- rule
- rule.conditions
required:
- discounts
- count
- offset
- limit
properties:
discounts:
type: array
items:
$ref: ./Discount.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of discounts skipped when retrieving the discounts.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,17 @@
type: object
x-expanded-relations:
field: discount
relations:
- parent_discount
- regions
- rule
- rule.conditions
eager:
- regions.fulfillment_providers
- regions.payment_providers
required:
- discount
properties:
discount:
description: Discount details.
$ref: ./Discount.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Draft Order.
object:
type: string
description: The type of the object that was deleted.
default: draft-order
deleted:
type: boolean
description: Whether the draft order was deleted successfully.
default: true

View File

@@ -0,0 +1,28 @@
type: object
x-expanded-relations:
field: draft_orders
relations:
- order
- cart
- cart.items
- cart.items.adjustments
required:
- draft_orders
- count
- offset
- limit
properties:
draft_orders:
type: array
description: An array of draft order's details.
items:
$ref: ./DraftOrder.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of draft orders skipped when retrieving the draft orders.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,66 @@
type: object
x-expanded-relations:
field: draft_order
relations:
- order
- cart
- cart.items
- cart.items.adjustments
- cart.billing_address
- cart.customer
- cart.discounts
- cart.discounts.rule
- cart.items
- cart.items.adjustments
- cart.payment
- cart.payment_sessions
- cart.region
- cart.region.payment_providers
- cart.shipping_address
- cart.shipping_methods
- cart.shipping_methods.shipping_option
eager:
- cart.region.fulfillment_providers
- cart.region.payment_providers
- cart.shipping_methods.shipping_option
implicit:
- cart.discounts
- cart.discounts.rule
- cart.gift_cards
- cart.items
- cart.items.adjustments
- cart.items.tax_lines
- cart.items.variant
- cart.items.variant.product
- cart.items.variant.product.profiles
- cart.region
- cart.region.tax_rates
- cart.shipping_address
- cart.shipping_methods
- cart.shipping_methods.tax_lines
totals:
- cart.discount_total
- cart.gift_card_tax_total
- cart.gift_card_total
- cart.item_tax_total
- cart.refundable_amount
- cart.refunded_total
- cart.shipping_tax_total
- cart.shipping_total
- cart.subtotal
- cart.tax_total
- cart.total
- cart.items.discount_total
- cart.items.gift_card_total
- cart.items.original_tax_total
- cart.items.original_total
- cart.items.refundable
- cart.items.subtotal
- cart.items.tax_total
- cart.items.total
required:
- draft_order
properties:
draft_order:
description: Draft order's details.
$ref: ./DraftOrder.yaml

View File

@@ -0,0 +1,12 @@
type: object
x-expanded-relations:
field: store
relations:
- currencies
- default_currency
required:
- store
properties:
store:
description: Store details.
$ref: ./ExtendedStoreDTO.yaml

View File

@@ -0,0 +1,25 @@
type: object
required:
- fulfillment_options
properties:
fulfillment_options:
type: array
description: Fulfillment providers details.
items:
type: object
required:
- provider_id
- options
properties:
provider_id:
description: ID of the fulfillment provider
type: string
options:
description: fulfillment provider options
type: array
items:
type: object
example:
- id: manual-fulfillment
- id: manual-fulfillment-return
is_return: true

View File

@@ -0,0 +1,6 @@
type: object
properties:
variant:
type: object
description: The product variant's.
$ref: ./VariantInventory.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Gift Card
object:
type: string
description: The type of the object that was deleted.
default: gift-card
deleted:
type: boolean
description: Whether the gift card was deleted successfully.
default: true

View File

@@ -0,0 +1,28 @@
type: object
x-expanded-relations:
field: gift_cards
relations:
- order
- region
eager:
- region.fulfillment_providers
- region.payment_providers
required:
- gift_cards
- count
- offset
- limit
properties:
gift_cards:
type: array
items:
$ref: ./GiftCard.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of gift cards skipped when retrieving the gift cards.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,15 @@
type: object
x-expanded-relations:
field: gift_card
relations:
- order
- region
eager:
- region.fulfillment_providers
- region.payment_providers
required:
- gift_card
properties:
gift_card:
description: A gift card's details.
$ref: ./GiftCard.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Inventory Item.
object:
type: string
description: The type of the object that was deleted.
format: inventory_item
deleted:
type: boolean
description: Whether or not the Inventory Item was deleted.
default: true

View File

@@ -0,0 +1,21 @@
type: object
required:
- inventory_items
- count
- offset
- limit
properties:
inventory_items:
type: array
description: an array of Inventory Item details
items:
$ref: ./InventoryItemDTO.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of inventory items skipped when retrieving the inventory items.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,21 @@
type: object
required:
- inventory_items
- count
- offset
- limit
properties:
inventory_items:
type: array
description: an array of Inventory Item details
items:
$ref: ./DecoratedInventoryItemDTO.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of inventory items skipped when retrieving the inventory items.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,17 @@
type: object
required:
- inventory_item
properties:
inventory_item:
type: object
required:
- id
- location_levels
properties:
id:
description: The id of the location
location_levels:
description: List of stock levels at a given location
type: array
items:
$ref: ./InventoryLevelDTO.yaml

View File

@@ -0,0 +1,7 @@
type: object
required:
- inventory_item
properties:
inventory_item:
description: Inventory Item details
$ref: ./InventoryItemDTO.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Invite.
object:
type: string
description: The type of the object that was deleted.
default: invite
deleted:
type: boolean
description: Whether or not the invite was deleted.
default: true

View File

@@ -0,0 +1,9 @@
type: object
required:
- invites
properties:
invites:
type: array
description: An array of invites
items:
$ref: ./Invite.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Note.
object:
type: string
description: The type of the object that was deleted.
default: note
deleted:
type: boolean
description: Whether or not the Note was deleted.
default: true

View File

@@ -0,0 +1,21 @@
type: object
required:
- notes
- count
- offset
- limit
properties:
notes:
type: array
description: An array of notes
items:
$ref: ./Note.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of notes skipped when retrieving the notes.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,7 @@
type: object
required:
- note
properties:
note:
description: Note details.
$ref: ./Note.yaml

View File

@@ -0,0 +1,22 @@
type: object
x-expanded-relations:
field: notifications
relations:
- resends
required:
- notifications
properties:
notifications:
type: array
description: an array of notifications
items:
$ref: ./Notification.yaml
count:
type: integer
description: The total number of notifications
offset:
type: integer
description: The number of notifications skipped when retrieving the notifications.
limit:
type: integer
description: The number of notifications per page

View File

@@ -0,0 +1,11 @@
type: object
x-expanded-relations:
field: notification
relations:
- resends
required:
- notification
properties:
notification:
description: Notification details
$ref: ./Notification.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Order Edit.
object:
type: string
description: The type of the object that was deleted.
default: order_edit
deleted:
type: boolean
description: Whether or not the Order Edit was deleted.
default: true

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Order Edit Item Change.
object:
type: string
description: The type of the object that was deleted.
default: item_change
deleted:
type: boolean
description: Whether or not the Order Edit Item Change was deleted.
default: true

View File

@@ -0,0 +1,56 @@
type: object
x-expanded-relations:
field: order_edits
relations:
- changes
- changes.line_item
- changes.line_item.variant
- changes.original_line_item
- changes.original_line_item.variant
- items
- items.adjustments
- items.tax_lines
- items.variant
- payment_collection
implicit:
- items
- items.tax_lines
- items.adjustments
- items.variant
totals:
- difference_due
- discount_total
- gift_card_tax_total
- gift_card_total
- shipping_total
- subtotal
- tax_total
- total
- items.discount_total
- items.gift_card_total
- items.original_tax_total
- items.original_total
- items.refundable
- items.subtotal
- items.tax_total
- items.total
required:
- order_edits
- count
- offset
- limit
properties:
order_edits:
type: array
description: An array of order edit details
items:
$ref: ./OrderEdit.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of order edits skipped when retrieving the order edits.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,42 @@
type: object
x-expanded-relations:
field: order_edit
relations:
- changes
- changes.line_item
- changes.line_item.variant
- changes.original_line_item
- changes.original_line_item.variant
- items
- items.adjustments
- items.tax_lines
- items.variant
- payment_collection
implicit:
- items
- items.tax_lines
- items.adjustments
- items.variant
totals:
- difference_due
- discount_total
- gift_card_tax_total
- gift_card_total
- shipping_total
- subtotal
- tax_total
- total
- items.discount_total
- items.gift_card_total
- items.original_tax_total
- items.original_total
- items.refundable
- items.subtotal
- items.tax_total
- items.total
required:
- order_edit
properties:
order_edit:
description: Order edit details
$ref: ./OrderEdit.yaml

View File

@@ -0,0 +1,125 @@
type: object
x-expanded-relations:
field: orders
relations:
- billing_address
- claims
- claims.additional_items
- claims.additional_items.variant
- claims.claim_items
- claims.claim_items.images
- claims.claim_items.item
- claims.fulfillments
- claims.fulfillments.tracking_links
- claims.return_order
- claims.return_order.shipping_method
- claims.return_order.shipping_method.tax_lines
- claims.shipping_address
- claims.shipping_methods
- customer
- discounts
- discounts.rule
- fulfillments
- fulfillments.items
- fulfillments.tracking_links
- gift_card_transactions
- gift_cards
- items
- payments
- refunds
- region
- returns
- returns.items
- returns.items.reason
- returns.shipping_method
- returns.shipping_method.tax_lines
- shipping_address
- shipping_methods
eager:
- fulfillments.items
- region.fulfillment_providers
- region.payment_providers
- returns.items
- shipping_methods.shipping_option
implicit:
- claims
- claims.additional_items
- claims.additional_items.adjustments
- claims.additional_items.refundable
- claims.additional_items.tax_lines
- discounts
- discounts.rule
- gift_card_transactions
- gift_card_transactions.gift_card
- gift_cards
- items
- items.adjustments
- items.refundable
- items.tax_lines
- items.variant
- items.variant.product
- items.variant.product.profiles
- refunds
- region
- shipping_methods
- shipping_methods.tax_lines
- swaps
- swaps.additional_items
- swaps.additional_items.adjustments
- swaps.additional_items.refundable
- swaps.additional_items.tax_lines
totals:
- discount_total
- gift_card_tax_total
- gift_card_total
- paid_total
- refundable_amount
- refunded_total
- shipping_total
- subtotal
- tax_total
- total
- claims.additional_items.discount_total
- claims.additional_items.gift_card_total
- claims.additional_items.original_tax_total
- claims.additional_items.original_total
- claims.additional_items.refundable
- claims.additional_items.subtotal
- claims.additional_items.tax_total
- claims.additional_items.total
- items.discount_total
- items.gift_card_total
- items.original_tax_total
- items.original_total
- items.refundable
- items.subtotal
- items.tax_total
- items.total
- swaps.additional_items.discount_total
- swaps.additional_items.gift_card_total
- swaps.additional_items.original_tax_total
- swaps.additional_items.original_total
- swaps.additional_items.refundable
- swaps.additional_items.subtotal
- swaps.additional_items.tax_total
- swaps.additional_items.total
required:
- orders
- count
- offset
- limit
properties:
orders:
type: array
description: An array of order details.
items:
$ref: ./Order.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of orders skipped when retrieving the orders.
limit:
type: integer
description: The number of items per page

View File

@@ -0,0 +1,10 @@
type: object
required:
- location_id
properties:
location_id:
description: The ID of the location of the reservation
type: string
quantity:
description: The quantity to reserve
type: number

View File

@@ -0,0 +1,111 @@
type: object
x-expanded-relations:
field: order
relations:
- billing_address
- claims
- claims.additional_items
- claims.additional_items.variant
- claims.claim_items
- claims.claim_items.images
- claims.claim_items.item
- claims.fulfillments
- claims.fulfillments.tracking_links
- claims.return_order
- claims.return_order.shipping_method
- claims.return_order.shipping_method.tax_lines
- claims.shipping_address
- claims.shipping_methods
- customer
- discounts
- discounts.rule
- fulfillments
- fulfillments.items
- fulfillments.tracking_links
- gift_card_transactions
- gift_cards
- items
- payments
- refunds
- region
- returns
- returns.items
- returns.items.reason
- returns.shipping_method
- returns.shipping_method.tax_lines
- shipping_address
- shipping_methods
eager:
- fulfillments.items
- region.fulfillment_providers
- region.payment_providers
- returns.items
- shipping_methods.shipping_option
implicit:
- claims
- claims.additional_items
- claims.additional_items.adjustments
- claims.additional_items.refundable
- claims.additional_items.tax_lines
- discounts
- discounts.rule
- gift_card_transactions
- gift_card_transactions.gift_card
- gift_cards
- items
- items.adjustments
- items.refundable
- items.tax_lines
- items.variant
- items.variant.product
- items.variant.product.profiles
- refunds
- region
- shipping_methods
- shipping_methods.tax_lines
- swaps
- swaps.additional_items
- swaps.additional_items.adjustments
- swaps.additional_items.refundable
- swaps.additional_items.tax_lines
totals:
- discount_total
- gift_card_tax_total
- gift_card_total
- paid_total
- refundable_amount
- refunded_total
- shipping_total
- subtotal
- tax_total
- total
- claims.additional_items.discount_total
- claims.additional_items.gift_card_total
- claims.additional_items.original_tax_total
- claims.additional_items.original_total
- claims.additional_items.refundable
- claims.additional_items.subtotal
- claims.additional_items.tax_total
- claims.additional_items.total
- items.discount_total
- items.gift_card_total
- items.original_tax_total
- items.original_total
- items.refundable
- items.subtotal
- items.tax_total
- items.total
- swaps.additional_items.discount_total
- swaps.additional_items.gift_card_total
- swaps.additional_items.original_tax_total
- swaps.additional_items.original_total
- swaps.additional_items.refundable
- swaps.additional_items.subtotal
- swaps.additional_items.tax_total
- swaps.additional_items.total
required:
- order
properties:
order:
description: Order details.
$ref: ./Order.yaml

View File

@@ -0,0 +1,17 @@
type: object
required:
- id
- object
- deleted
properties:
id:
type: string
description: The ID of the deleted Payment Collection.
object:
type: string
description: The type of the object that was deleted.
default: payment_collection
deleted:
type: boolean
description: Whether or not the Payment Collection was deleted.
default: true

View File

@@ -0,0 +1,16 @@
type: object
x-expanded-relations:
field: payment_collection
relations:
- payment_sessions
- payments
- region
eager:
- region.fulfillment_providers
- region.payment_providers
required:
- payment_collection
properties:
payment_collection:
description: Payment Collection details.
$ref: ./PaymentCollection.yaml

View File

@@ -0,0 +1,9 @@
type: object
required:
- payment_providers
properties:
payment_providers:
type: array
description: An array of payment providers details.
items:
$ref: ./PaymentProvider.yaml

View File

@@ -0,0 +1,7 @@
type: object
required:
- payment
properties:
payment:
description: Payment details
$ref: ./Payment.yaml

View File

@@ -0,0 +1,15 @@
type: object
required:
- application_name
- state
- code
properties:
application_name:
type: string
description: Name of the application for to generate the token for.
state:
type: string
description: State of the application.
code:
type: string
description: The code for the generated token.

View File

@@ -0,0 +1,13 @@
type: object
required:
- email
- password
properties:
email:
type: string
description: The user's email.
format: email
password:
type: string
description: The user's password.
format: password

View File

@@ -0,0 +1,36 @@
type: object
required:
- type
- context
properties:
type:
type: string
description: >-
The type of batch job to start, which is defined by the `batchType`
property of the associated batch job strategy.
example: product-export
context:
type: object
description: Additional infomration regarding the batch to be used for processing.
example:
shape:
prices:
- region: null
currency_code: eur
dynamicImageColumnCount: 4
dynamicOptionColumnCount: 2
list_config:
skip: 0
take: 50
order:
created_at: DESC
relations:
- variants
- variant.prices
- images
dry_run:
type: boolean
description: >-
Set a batch job in dry_run mode, which would delay executing the batch job
until it's confirmed.
default: false

View File

@@ -0,0 +1,17 @@
type: object
properties:
title:
type: string
description: The title of the collection.
handle:
type: string
description: >-
An optional handle to be used in slugs. If none is provided, the
kebab-case version of the title will be used.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,19 @@
type: object
required:
- title
properties:
title:
type: string
description: The title of the collection.
handle:
type: string
description: >-
An optional handle to be used in slugs. If none is provided, the
kebab-case version of the title will be used.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,6 @@
type: object
properties:
includes_tax:
type: boolean
x-featureFlag: tax_inclusive_pricing
description: Tax included in prices of currency.

View File

@@ -0,0 +1,15 @@
type: object
required:
- customer_ids
properties:
customer_ids:
description: The ids of the customers to add
type: array
items:
type: object
required:
- id
properties:
id:
description: ID of the customer
type: string

View File

@@ -0,0 +1,12 @@
type: object
properties:
name:
description: Name of the customer group
type: string
metadata:
description: Metadata of the customer group.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,14 @@
type: object
required:
- name
properties:
name:
type: string
description: Name of the customer group
metadata:
type: object
description: Metadata of the customer group.
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,37 @@
type: object
properties:
email:
type: string
description: The Customer's email. You can't update the email of a registered customer.
format: email
first_name:
type: string
description: The Customer's first name.
last_name:
type: string
description: The Customer's last name.
phone:
type: string
description: The Customer's phone number.
password:
type: string
description: The Customer's password.
format: password
groups:
type: array
description: A list of customer groups to which the customer belongs.
items:
type: object
required:
- id
properties:
id:
description: The ID of a customer group
type: string
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,31 @@
type: object
required:
- email
- first_name
- last_name
- password
properties:
email:
type: string
description: The customer's email.
format: email
first_name:
type: string
description: The customer's first name.
last_name:
type: string
description: The customer's last name.
password:
type: string
description: The customer's password.
format: password
phone:
type: string
description: The customer's phone number.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,40 @@
type: object
required:
- operator
properties:
operator:
description: >-
Operator of the condition. `in` indicates that discountable resources are
within the specified resources. `not_in` indicates that discountable
resources are everything but the specified resources.
type: string
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition's type is `products`.
items:
type: string
product_types:
type: array
description: list of product type IDs if the condition's type is `product_types`.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition's type is
`product_collections`.
items:
type: string
product_tags:
type: array
description: list of product tag IDs if the condition's type is `product_tags`.
items:
type: string
customer_groups:
type: array
description: list of customer group IDs if the condition's type is `customer_groups`.
items:
type: string

View File

@@ -0,0 +1,29 @@
type: object
properties:
products:
type: array
description: list of product IDs if the condition's type is `products`.
items:
type: string
product_types:
type: array
description: list of product type IDs if the condition's type is `product_types`.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition's type is
`product_collections`.
items:
type: string
product_tags:
type: array
description: list of product tag IDs if the condition's type is `product_tags`
items:
type: string
customer_groups:
type: array
description: list of customer group IDs if the condition's type is `customer_groups`.
items:
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- resources
properties:
resources:
description: The resources to be added to the discount condition
type: array
items:
type: object
required:
- id
properties:
id:
description: The id of the item
type: string

View File

@@ -0,0 +1,18 @@
type: object
required:
- code
properties:
code:
type: string
description: A unique code that will be used to redeem the Discount
usage_limit:
type: number
description: Maximum number of times the discount code can be used
default: 1
metadata:
type: object
description: An optional set of key-value pairs to hold additional information.
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,124 @@
type: object
properties:
code:
type: string
description: A unique code that will be used to redeem the discount
rule:
description: The discount rule that defines how discounts are calculated
type: object
required:
- id
properties:
id:
type: string
description: The ID of the Rule
description:
type: string
description: A short description of the discount
value:
type: number
description: >-
The value that the discount represents. This will depend on the type
of the discount.
allocation:
type: string
description: >-
The scope that the discount should apply to. `total` indicates that
the discount should be applied on the cart total, and `item` indicates
that the discount should be applied to each discountable item in the
cart.
enum:
- total
- item
conditions:
type: array
description: >-
A set of conditions that can be used to limit when the discount can be
used. Only one of `products`, `product_types`, `product_collections`,
`product_tags`, and `customer_groups` should be provided based on the
discount condition's type.
items:
type: object
required:
- operator
properties:
id:
type: string
description: The ID of the condition
operator:
type: string
description: >-
Operator of the condition. `in` indicates that discountable
resources are within the specified resources. `not_in` indicates
that discountable resources are everything but the specified
resources.
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition's type is `products`.
items:
type: string
product_types:
type: array
description: >-
list of product type IDs if the condition's type is
`product_types`.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition's type is
`product_collections`.
items:
type: string
product_tags:
type: array
description: >-
list of product tag IDs if the condition's type is
`product_tags`.
items:
type: string
customer_groups:
type: array
description: >-
list of customer group IDs if the condition's type is
`customer_groups`.
items:
type: string
is_disabled:
type: boolean
description: >-
Whether the discount code is disabled on creation. If set to `true`, it
will not be available for customers.
starts_at:
type: string
format: date-time
description: The date and time at which the discount should be available.
ends_at:
type: string
format: date-time
description: The date and time at which the discount should no longer be available.
valid_duration:
type: string
description: The duration the discount runs between
example: P3Y6M4DT12H30M5S
usage_limit:
type: number
description: Maximum number of times the discount can be used
regions:
description: >-
A list of region IDs representing the Regions in which the Discount can be
used.
type: array
items:
type: string
metadata:
description: An object containing metadata of the discount
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,142 @@
type: object
required:
- code
- rule
- regions
properties:
code:
type: string
description: A unique code that will be used to redeem the discount
is_dynamic:
type: boolean
description: >-
Whether the discount should have multiple instances of itself, each with a
different code. This can be useful for automatically generated discount
codes that all have to follow a common set of rules.
default: false
rule:
description: The discount rule that defines how discounts are calculated
type: object
required:
- type
- value
- allocation
properties:
description:
type: string
description: A short description of the discount
type:
type: string
description: >-
The type of the discount, can be `fixed` for discounts that reduce the
price by a fixed amount, `percentage` for percentage reductions or
`free_shipping` for shipping vouchers.
enum:
- fixed
- percentage
- free_shipping
value:
type: number
description: >-
The value that the discount represents. This will depend on the type
of the discount.
allocation:
type: string
description: >-
The scope that the discount should apply to. `total` indicates that
the discount should be applied on the cart total, and `item` indicates
that the discount should be applied to each discountable item in the
cart.
enum:
- total
- item
conditions:
type: array
description: >-
A set of conditions that can be used to limit when the discount can be
used. Only one of `products`, `product_types`, `product_collections`,
`product_tags`, and `customer_groups` should be provided based on the
discount condition's type.
items:
type: object
required:
- operator
properties:
operator:
type: string
description: >-
Operator of the condition. `in` indicates that discountable
resources are within the specified resources. `not_in` indicates
that discountable resources are everything but the specified
resources.
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition's type is `products`.
items:
type: string
product_types:
type: array
description: >-
list of product type IDs if the condition's type is
`product_types`.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition's type is
`product_collections`.
items:
type: string
product_tags:
type: array
description: >-
list of product tag IDs if the condition's type is
`product_tags`.
items:
type: string
customer_groups:
type: array
description: >-
list of customer group IDs if the condition's type is
`customer_groups`.
items:
type: string
is_disabled:
type: boolean
description: >-
Whether the discount code is disabled on creation. If set to `true`, it
will not be available for customers.
default: false
starts_at:
type: string
format: date-time
description: The date and time at which the discount should be available.
ends_at:
type: string
format: date-time
description: The date and time at which the discount should no longer be available.
valid_duration:
type: string
description: The duration the discount runs between
example: P3Y6M4DT12H30M5S
regions:
description: >-
A list of region IDs representing the Regions in which the Discount can be
used.
type: array
items:
type: string
usage_limit:
type: number
description: Maximum number of times the discount can be used
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,20 @@
type: object
properties:
unit_price:
description: >-
The custom price of the line item. If a `variant_id` is supplied, the
price provided here will override the variant's price.
type: integer
title:
description: The title of the line item if `variant_id` is not provided.
type: string
quantity:
description: The quantity of the line item.
type: integer
metadata:
description: The optional key-value map with additional details about the Line Item.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,28 @@
type: object
required:
- quantity
properties:
variant_id:
description: >-
The ID of the Product Variant associated with the line item. If the line
item is custom, the `variant_id` should be omitted.
type: string
unit_price:
description: >-
The custom price of the line item. If a `variant_id` is supplied, the
price provided here will override the variant's price.
type: integer
title:
description: The title of the line item if `variant_id` is not provided.
type: string
default: Custom item
quantity:
description: The quantity of the line item.
type: integer
metadata:
description: The optional key-value map with additional details about the Line Item.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,7 @@
type: object
required:
- order
properties:
order:
description: Order's details.
$ref: ./Order.yaml

View File

@@ -0,0 +1,45 @@
type: object
properties:
region_id:
type: string
description: The ID of the Region to create the Draft Order in.
country_code:
type: string
description: The 2 character ISO code for the Country.
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.
email:
type: string
description: An email to be used in the Draft Order.
format: email
billing_address:
description: The Address to be used for billing purposes.
anyOf:
- $ref: ./AddressPayload.yaml
- type: string
shipping_address:
description: The Address to be used for shipping purposes.
anyOf:
- $ref: ./AddressPayload.yaml
- type: string
discounts:
description: An array of Discount codes to add to the Draft Order.
type: array
items:
type: object
required:
- code
properties:
code:
description: The code that a Discount is identifed by.
type: string
no_notification_order:
description: >-
An optional flag passed to the resulting order that indicates whether the
customer should receive notifications about order updates.
type: boolean
customer_id:
description: The ID of the customer this draft order is associated with.
type: string

View File

@@ -0,0 +1,109 @@
type: object
required:
- email
- region_id
- shipping_methods
properties:
status:
description: >-
The status of the draft order. The draft order's default status is `open`.
It's changed to `completed` when its payment is marked as paid.
type: string
enum:
- open
- completed
email:
description: The email of the customer of the draft order
type: string
format: email
billing_address:
description: The Address to be used for billing purposes.
anyOf:
- $ref: ./AddressPayload.yaml
- type: string
shipping_address:
description: The Address to be used for shipping purposes.
anyOf:
- $ref: ./AddressPayload.yaml
- type: string
items:
description: The draft order's line items.
type: array
items:
type: object
required:
- quantity
properties:
variant_id:
description: >-
The ID of the Product Variant associated with the line item. If the
line item is custom, the `variant_id` should be omitted.
type: string
unit_price:
description: >-
The custom price of the line item. If a `variant_id` is supplied,
the price provided here will override the variant's price.
type: integer
title:
description: The title of the line item if `variant_id` is not provided.
type: string
quantity:
description: The quantity of the line item.
type: integer
metadata:
description: >-
The optional key-value map with additional details about the line
item.
type: object
externalDocs:
description: >-
Learn about the metadata attribute, and how to delete and update
it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute
region_id:
description: The ID of the region for the draft order
type: string
discounts:
description: The discounts to add to the draft order
type: array
items:
type: object
required:
- code
properties:
code:
description: The code of the discount to apply
type: string
customer_id:
description: The ID of the customer this draft order is associated with.
type: string
no_notification_order:
description: >-
An optional flag passed to the resulting order that indicates whether the
customer should receive notifications about order updates.
type: boolean
shipping_methods:
description: The shipping methods for the draft order
type: array
items:
type: object
required:
- option_id
properties:
option_id:
description: The ID of the shipping option in use
type: string
data:
description: The optional additional data needed for the shipping method
type: object
price:
description: The price of the shipping method.
type: integer
metadata:
description: The optional key-value map with additional details about the Draft Order.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,24 @@
type: object
properties:
balance:
type: integer
description: The value (excluding VAT) that the Gift Card should represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. If set to `true`, the gift
card will not be available for customers.
ends_at:
type: string
format: date-time
description: The date and time at which the Gift Card should no longer be available.
region_id:
description: The ID of the Region in which the Gift Card can be used.
type: string
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,26 @@
type: object
required:
- region_id
properties:
value:
type: integer
description: The value (excluding VAT) that the Gift Card should represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. If set to `true`, the gift
card will not be available for customers.
ends_at:
type: string
format: date-time
description: The date and time at which the Gift Card should no longer be available.
region_id:
description: The ID of the Region in which the Gift Card can be used.
type: string
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

View File

@@ -0,0 +1,47 @@
type: object
properties:
hs_code:
description: >-
The Harmonized System code of the Inventory Item. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
type: string
origin_country:
description: >-
The country in which the Inventory Item was produced. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
type: string
mid_code:
description: >-
The Manufacturers Identification code that identifies the manufacturer of
the Inventory Item. May be used by Fulfillment Providers to pass customs
information to shipping carriers.
type: string
material:
description: >-
The material and composition that the Inventory Item is made of, May be
used by Fulfillment Providers to pass customs information to shipping
carriers.
type: string
weight:
description: >-
The weight of the Inventory Item. May be used in shipping rate
calculations.
type: number
height:
description: >-
The height of the Inventory Item. May be used in shipping rate
calculations.
type: number
width:
description: >-
The width of the Inventory Item. May be used in shipping rate
calculations.
type: number
length:
description: >-
The length of the Inventory Item. May be used in shipping rate
calculations.
type: number
requires_shipping:
description: Whether the item requires shipping.
type: boolean

View File

@@ -0,0 +1,8 @@
type: object
properties:
stocked_quantity:
description: the total stock quantity of an inventory item at the given location ID
type: number
incoming_quantity:
description: the incoming stock quantity of an inventory item at the given location ID
type: number

View File

@@ -0,0 +1,14 @@
type: object
required:
- location_id
- stocked_quantity
properties:
location_id:
description: the ID of the stock location
type: string
stocked_quantity:
description: the stock quantity of the inventory item at this location
type: number
incoming_quantity:
description: the incoming stock quantity of the inventory item at this location
type: number

View File

@@ -0,0 +1,81 @@
type: object
required:
- variant_id
properties:
variant_id:
description: The ID of the variant to create the inventory item for.
type: string
sku:
description: The unique SKU of the associated Product Variant.
type: string
ean:
description: The EAN number of the item.
type: string
upc:
description: The UPC number of the item.
type: string
barcode:
description: A generic GTIN field for the Product Variant.
type: string
hs_code:
description: >-
The Harmonized System code of the Inventory Item. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
type: string
inventory_quantity:
description: The amount of stock kept of the associated Product Variant.
type: integer
default: 0
allow_backorder:
description: Whether the associated Product Variant can be purchased when out of stock.
type: boolean
manage_inventory:
description: >-
Whether Medusa should keep track of the inventory for the associated
Product Variant.
type: boolean
default: true
weight:
description: >-
The weight of the Inventory Item. May be used in shipping rate
calculations.
type: number
length:
description: >-
The length of the Inventory Item. May be used in shipping rate
calculations.
type: number
height:
description: >-
The height of the Inventory Item. May be used in shipping rate
calculations.
type: number
width:
description: >-
The width of the Inventory Item. May be used in shipping rate
calculations.
type: number
origin_country:
description: >-
The country in which the Inventory Item was produced. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
type: string
mid_code:
description: >-
The Manufacturers Identification code that identifies the manufacturer of
the Inventory Item. May be used by Fulfillment Providers to pass customs
information to shipping carriers.
type: string
material:
description: >-
The material and composition that the Inventory Item is made of, May be
used by Fulfillment Providers to pass customs information to shipping
carriers.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute

Some files were not shown because too many files have changed in this diff Show More