docs: update api-reference project for v2 (#7307)

* remove everything v1 and make v2 default

* move main v2 rewrites to book

* move rewrites to book + other fixes
This commit is contained in:
Shahed Nasser
2024-05-16 10:02:35 +03:00
committed by GitHub
parent 9b1998b9b2
commit 22f30f54fd
2148 changed files with 8965 additions and 140283 deletions
@@ -1,119 +0,0 @@
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
@@ -1,57 +0,0 @@
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
@@ -1,51 +0,0 @@
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
description: Company
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
@@ -1,9 +0,0 @@
type: object
required:
- apps
properties:
apps:
type: array
description: An array of app details.
items:
$ref: ./OAuth.yaml
@@ -1,7 +0,0 @@
type: object
required:
- apps
properties:
apps:
description: App details.
$ref: ./OAuth.yaml
@@ -1,8 +0,0 @@
type: object
description: The user's details.
required:
- user
properties:
user:
description: User details.
$ref: ./User.yaml
@@ -1,21 +0,0 @@
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
@@ -1,8 +0,0 @@
type: object
description: The batch job's details.
required:
- batch_job
properties:
batch_job:
description: Batch job details.
$ref: ./BatchJob.yaml
@@ -1,6 +0,0 @@
type: object
description: The access token of the user, if they're authenticated successfully.
properties:
access_token:
description: Access token that can be used to send authenticated requests.
type: string
@@ -1,17 +0,0 @@
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
@@ -1,23 +0,0 @@
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
@@ -1,12 +0,0 @@
type: object
description: The collection's details.
x-expanded-relations:
field: collection
relations:
- products
required:
- collection
properties:
collection:
description: Product Collection details.
$ref: ./ProductCollection.yaml
@@ -1,28 +0,0 @@
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
@@ -1,22 +0,0 @@
type: object
description: List of currencies with pagination fields.
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
@@ -1,8 +0,0 @@
type: object
description: A currency's details.
required:
- currency
properties:
currency:
description: Currency details.
$ref: ./Currency.yaml
@@ -1,17 +0,0 @@
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
@@ -1,21 +0,0 @@
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
@@ -1,8 +0,0 @@
type: object
description: The customer group's details.
required:
- customer_group
properties:
customer_group:
description: Customer group details.
$ref: ./CustomerGroup.yaml
@@ -1,22 +0,0 @@
description: The list of customers with pagination fields.
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
@@ -1,13 +0,0 @@
type: object
description: The customer's details.
x-expanded-relations:
field: customer
relations:
- orders
- shipping_addresses
required:
- customer
properties:
customer:
description: Customer details.
$ref: ./Customer.yaml
@@ -1,16 +0,0 @@
type: object
description: The customers to remove from the customer group.
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
@@ -1,16 +0,0 @@
type: object
description: The resources to remove.
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
@@ -1,8 +0,0 @@
type: object
description: The details of the prices to delete.
properties:
price_ids:
description: The IDs of the prices to delete.
type: array
items:
type: string
@@ -1,8 +0,0 @@
type: object
description: The details of the products' prices to delete.
properties:
product_ids:
description: The IDs of the products to delete their associated prices.
type: array
items:
type: string
@@ -0,0 +1,4 @@
type: object
description: SUMMARY
x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq
properties: {}
@@ -1,16 +0,0 @@
type: object
description: The details of the products to delete from the product category.
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
@@ -1,11 +0,0 @@
type: object
description: The details of the products to remove from the collection.
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
@@ -1,20 +0,0 @@
type: object
description: Deletion operation details
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
@@ -1,16 +0,0 @@
type: object
description: The details of the sales channels to remove from the publishable API key.
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
@@ -1,16 +0,0 @@
type: object
description: The details of the products to delete from the sales channel.
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
@@ -1,7 +0,0 @@
type: object
required:
- location_id
properties:
location_id:
description: The ID of the stock location
type: string
@@ -1,17 +0,0 @@
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
@@ -1,12 +0,0 @@
type: object
description: Product types to remove from the tax rates.
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
@@ -1,10 +0,0 @@
type: object
description: The details of the products to remove their associated with the tax rate.
required:
- products
properties:
products:
type: array
description: The IDs of the products to remove their association with this tax rate.
items:
type: string
@@ -1,14 +0,0 @@
type: object
description: >-
The details of the shipping options to remove their associate with the tax
rate.
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
@@ -1,10 +0,0 @@
type: object
description: The details of the file to delete.
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
@@ -1,17 +0,0 @@
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
@@ -1,17 +0,0 @@
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
@@ -1,21 +0,0 @@
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
@@ -1,11 +0,0 @@
type: object
x-expanded-relations:
field: discount_condition
relations:
- discount_rule
required:
- discount_condition
properties:
discount_condition:
description: Discount condition details.
$ref: ./DiscountCondition.yaml
@@ -1,17 +0,0 @@
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
@@ -1,29 +0,0 @@
type: object
description: The list of discounts with pagination fields.
x-expanded-relations:
field: discounts
relations:
- parent_discount
- regions
- rule
- rule.conditions
required:
- discounts
- count
- offset
- limit
properties:
discounts:
type: array
description: The list of discounts.
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
@@ -1,18 +0,0 @@
type: object
description: The discount's details.
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
@@ -1,17 +0,0 @@
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
@@ -1,29 +0,0 @@
description: The list of draft orders with pagination fields.
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
@@ -1,67 +0,0 @@
type: object
description: The list of draft orders.
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
@@ -1,13 +0,0 @@
type: object
description: The store's details with additional details like payment and tax providers.
x-expanded-relations:
field: store
relations:
- currencies
- default_currency
required:
- store
properties:
store:
description: Store details.
$ref: ./ExtendedStoreDTO.yaml
@@ -0,0 +1,31 @@
type: object
description: SUMMARY
x-schemaName: AdminGetPricingRuleTypesParams
properties:
rule_attribute:
type: array
description: The pricing's rule attribute.
items:
type: string
title: rule_attribute
description: The rule attribute's details.
expand:
type: string
title: expand
description: The pricing's expand.
fields:
type: string
title: fields
description: The pricing's fields.
offset:
type: number
title: offset
description: The pricing's offset.
limit:
type: number
title: limit
description: The pricing's limit.
order:
type: string
title: order
description: The pricing's order.
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminGetPricingRuleTypesRuleTypeParams
properties:
expand:
type: string
title: expand
description: The pricing's expand.
fields:
type: string
title: fields
description: The pricing's fields.
@@ -0,0 +1,767 @@
type: object
description: SUMMARY
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The product's q.
id:
oneOf:
- type: string
title: id
description: The product's ID.
- type: array
description: The product's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The product's status.
items: {}
title:
type: string
title: title
description: The product's title.
handle:
type: string
title: handle
description: The product's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The product's is giftcard.
price_list_id:
type: array
description: The product's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The product's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The product's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The product's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The product's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The product's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The product's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $and's q.
id:
oneOf:
- type: string
title: id
description: The $and's ID.
- type: array
description: The $and's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $and's status.
items: {}
title:
type: string
title: title
description: The $and's title.
handle:
type: string
title: handle
description: The $and's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $and's is giftcard.
price_list_id:
type: array
description: The $and's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $and's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $and's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $and's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $and's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $and's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $and's details.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $and's q.
id:
oneOf:
- type: string
title: id
description: The $and's ID.
- type: array
description: The $and's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $and's status.
items: {}
title:
type: string
title: title
description: The $and's title.
handle:
type: string
title: handle
description: The $and's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $and's is giftcard.
price_list_id:
type: array
description: The $and's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $and's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $and's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $and's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $and's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $and's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $and's details.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $and's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $and's expand.
fields:
type: string
title: fields
description: The $and's fields.
offset:
type: number
title: offset
description: The $and's offset.
limit:
type: number
title: limit
description: The $and's limit.
order:
type: string
title: order
description: The $and's order.
$or:
type: array
description: The $and's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $or's q.
id:
oneOf:
- type: string
title: id
description: The $or's ID.
- type: array
description: The $or's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $or's status.
items: {}
title:
type: string
title: title
description: The $or's title.
handle:
type: string
title: handle
description: The $or's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $or's is giftcard.
price_list_id:
type: array
description: The $or's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $or's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $or's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $or's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $or's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $or's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $or's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $or's details.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $or's expand.
fields:
type: string
title: fields
description: The $or's fields.
offset:
type: number
title: offset
description: The $or's offset.
limit:
type: number
title: limit
description: The $or's limit.
order:
type: string
title: order
description: The $or's order.
expand:
type: string
title: expand
description: The $and's expand.
fields:
type: string
title: fields
description: The $and's fields.
offset:
type: number
title: offset
description: The $and's offset.
limit:
type: number
title: limit
description: The $and's limit.
order:
type: string
title: order
description: The $and's order.
$or:
type: array
description: The product's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $or's q.
id:
oneOf:
- type: string
title: id
description: The $or's ID.
- type: array
description: The $or's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $or's status.
items: {}
title:
type: string
title: title
description: The $or's title.
handle:
type: string
title: handle
description: The $or's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $or's is giftcard.
price_list_id:
type: array
description: The $or's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $or's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $or's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $or's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $or's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $or's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $or's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $and's q.
id:
oneOf:
- type: string
title: id
description: The $and's ID.
- type: array
description: The $and's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $and's status.
items: {}
title:
type: string
title: title
description: The $and's title.
handle:
type: string
title: handle
description: The $and's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $and's is giftcard.
price_list_id:
type: array
description: The $and's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $and's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $and's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $and's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $and's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $and's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $and's details.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $and's $or.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $and's expand.
fields:
type: string
title: fields
description: The $and's fields.
offset:
type: number
title: offset
description: The $and's offset.
limit:
type: number
title: limit
description: The $and's limit.
order:
type: string
title: order
description: The $and's order.
$or:
type: array
description: The $or's details.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties:
q:
type: string
title: q
description: The $or's q.
id:
oneOf:
- type: string
title: id
description: The $or's ID.
- type: array
description: The $or's ID.
items:
type: string
title: id
description: The id's ID.
status:
type: array
description: The $or's status.
items: {}
title:
type: string
title: title
description: The $or's title.
handle:
type: string
title: handle
description: The $or's handle.
is_giftcard:
type: boolean
title: is_giftcard
description: The $or's is giftcard.
price_list_id:
type: array
description: The $or's price list id.
items:
type: string
title: price_list_id
description: The price list id's details.
sales_channel_id:
type: array
description: The $or's sales channel id.
items:
type: string
title: sales_channel_id
description: The sales channel id's details.
collection_id:
type: array
description: The $or's collection id.
items:
type: string
title: collection_id
description: The collection id's details.
tags:
type: array
description: The $or's tags.
items:
type: string
title: tags
description: The tag's tags.
type_id:
type: array
description: The $or's type id.
items:
type: string
title: type_id
description: The type id's details.
variants:
type: object
description: The $or's variants.
properties: {}
created_at: {}
updated_at: {}
deleted_at: {}
$and:
type: array
description: The $or's $and.
items:
type: object
description: The $and's details.
x-schemaName: AdminGetProductsParams
properties: {}
$or:
type: array
description: The $or's details.
items:
type: object
description: The $or's details.
x-schemaName: AdminGetProductsParams
properties: {}
expand:
type: string
title: expand
description: The $or's expand.
fields:
type: string
title: fields
description: The $or's fields.
offset:
type: number
title: offset
description: The $or's offset.
limit:
type: number
title: limit
description: The $or's limit.
order:
type: string
title: order
description: The $or's order.
expand:
type: string
title: expand
description: The $or's expand.
fields:
type: string
title: fields
description: The $or's fields.
offset:
type: number
title: offset
description: The $or's offset.
limit:
type: number
title: limit
description: The $or's limit.
order:
type: string
title: order
description: The $or's order.
expand:
type: string
title: expand
description: The product's expand.
fields:
type: string
title: fields
description: The product's fields.
offset:
type: number
title: offset
description: The product's offset.
limit:
type: number
title: limit
description: The product's limit.
order:
type: string
title: order
description: The product's order.
@@ -0,0 +1,28 @@
type: object
description: SUMMARY
x-schemaName: AdminGetPromotionsParams
properties:
code:
type: string
title: code
description: The promotion's code.
expand:
type: string
title: expand
description: The promotion's expand.
fields:
type: string
title: fields
description: The promotion's fields.
offset:
type: number
title: offset
description: The promotion's offset.
limit:
type: number
title: limit
description: The promotion's limit.
order:
type: string
title: order
description: The promotion's order.
@@ -1,26 +0,0 @@
type: object
description: The list of fulfillment options in a region.
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
@@ -1,7 +0,0 @@
type: object
description: The variant's inventory details.
properties:
variant:
type: object
description: The product variant's inventory details.
$ref: ./VariantInventory.yaml
@@ -1,17 +0,0 @@
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
@@ -1,30 +0,0 @@
type: object
description: The list of gift cards with pagination fields.
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
description: The list of gift cards.
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
@@ -1,16 +0,0 @@
type: object
description: The gift card's details.
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
@@ -1,17 +0,0 @@
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
@@ -1,21 +0,0 @@
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
@@ -1,21 +0,0 @@
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
@@ -1,20 +0,0 @@
type: object
description: Details of inventory items and their associated location levels.
required:
- inventory_item
properties:
inventory_item:
type: object
description: An inventory item's ID and associated location levels.
required:
- id
- location_levels
properties:
id:
description: The id of the location
type: string
location_levels:
description: List of stock levels at a given location
type: array
items:
$ref: ./InventoryLevelDTO.yaml
@@ -1,8 +0,0 @@
type: object
description: The inventory item's details.
required:
- inventory_item
properties:
inventory_item:
description: Inventory Item details
$ref: ./InventoryItemDTO.yaml
@@ -1,17 +0,0 @@
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
@@ -1,10 +0,0 @@
description: The list of invites.
type: object
required:
- invites
properties:
invites:
type: array
description: An array of invites
items:
$ref: ./Invite.yaml
@@ -1,17 +0,0 @@
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
@@ -1,22 +0,0 @@
type: object
description: The list of notes with pagination fields.
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
@@ -1,8 +0,0 @@
type: object
description: The note's details.
required:
- note
properties:
note:
description: Note details.
$ref: ./Note.yaml
@@ -1,22 +0,0 @@
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
@@ -1,12 +0,0 @@
type: object
description: The notification's details.
x-expanded-relations:
field: notification
relations:
- resends
required:
- notification
properties:
notification:
description: Notification details
$ref: ./Notification.yaml
@@ -1,17 +0,0 @@
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
@@ -1,18 +0,0 @@
type: object
description: The details of deleting order edit item changes.
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
@@ -1,57 +0,0 @@
type: object
description: The list of order edits with pagination fields.
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
@@ -1,43 +0,0 @@
type: object
description: The order edit details.
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
@@ -1,126 +0,0 @@
type: object
description: The list of orders with pagination fields.
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
@@ -1,10 +0,0 @@
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
@@ -1,112 +0,0 @@
type: object
description: The order's details.
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
@@ -1,18 +0,0 @@
type: object
description: The details of deleting a payment collection.
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
@@ -1,17 +0,0 @@
type: object
description: The payment collection's details.
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
@@ -1,10 +0,0 @@
type: object
description: The list of payment providers in a store.
required:
- payment_providers
properties:
payment_providers:
type: array
description: An array of payment providers details.
items:
$ref: ./PaymentProvider.yaml
@@ -1,8 +0,0 @@
type: object
description: The payment's details.
required:
- payment
properties:
payment:
description: Payment details
$ref: ./Payment.yaml
@@ -1,15 +0,0 @@
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.
@@ -1,14 +0,0 @@
type: object
description: The admin's credentials used to log in.
required:
- email
- password
properties:
email:
type: string
description: The user's email.
format: email
password:
type: string
description: The user's password.
format: password
@@ -1,37 +0,0 @@
type: object
description: The details of the batch job to create.
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
@@ -0,0 +1,46 @@
type: object
description: The promotion's campaign.
x-schemaName: AdminPostCampaignsReq
required:
- name
properties:
name:
type: string
title: name
description: The campaign's name.
campaign_identifier:
type: string
title: campaign_identifier
description: The campaign's campaign identifier.
description:
type: string
title: description
description: The campaign's description.
currency:
type: string
title: currency
description: The campaign's currency.
budget:
$ref: ./CampaignBudget.yaml
starts_at:
type: string
title: starts_at
description: The campaign's starts at.
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
x-schemaName: IdObject
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
@@ -1,18 +0,0 @@
type: object
description: The product collection's details to update.
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
@@ -1,20 +0,0 @@
type: object
description: The product collection's details.
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
@@ -1,7 +0,0 @@
type: object
description: The details to update in the currency
properties:
includes_tax:
type: boolean
x-featureFlag: tax_inclusive_pricing
description: Tax included in prices of currency.
@@ -1,16 +1,20 @@
type: object
description: The customers to add to the customer group.
description: SUMMARY
x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq
required:
- customer_ids
properties:
customer_ids:
description: The ids of the customers to add
type: array
description: The customer group's customer ids.
items:
type: object
description: The customer id's customer ids.
x-schemaName: CustomerGroupsBatchCustomer
required:
- id
properties:
id:
description: ID of the customer
type: string
title: id
description: The customer id's ID.
@@ -1,13 +0,0 @@
type: object
description: The details to update in the customer group.
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
@@ -1,15 +0,0 @@
type: object
description: The details of the customer group to create.
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
@@ -1,38 +0,0 @@
type: object
description: The details of the customer to update.
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
@@ -1,32 +0,0 @@
type: object
description: The details of the customer to create.
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
@@ -1,40 +0,0 @@
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
@@ -1,29 +0,0 @@
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
@@ -1,16 +0,0 @@
type: object
description: The details of the resources to add.
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
@@ -1,19 +0,0 @@
type: object
description: The details of the dynamic discount to create.
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
@@ -1,125 +0,0 @@
type: object
description: The details of the discount to update.
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
@@ -1,143 +0,0 @@
type: object
description: The details of the discount to create.
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
@@ -1,21 +0,0 @@
type: object
description: The details to update of the line item.
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
@@ -1,29 +0,0 @@
type: object
description: The details of the line item to create.
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
@@ -1,8 +0,0 @@
type: object
description: The order's details.
required:
- order
properties:
order:
description: Order's details.
$ref: ./Order.yaml

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