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 09:02:35 +02: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
@@ -0,0 +1,4 @@
type: object
description: SUMMARY
x-schemaName: AdminDeletePricingRuleTypesRuleTypeReq
properties: {}
@@ -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.
@@ -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.
@@ -0,0 +1,20 @@
type: object
description: SUMMARY
x-schemaName: AdminPostCustomerGroupsGroupCustomersBatchReq
required:
- customer_ids
properties:
customer_ids:
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:
type: string
title: id
description: The customer id's ID.
@@ -0,0 +1,34 @@
type: object
description: SUMMARY
x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchAddReq
required:
- rules
properties:
rules:
type: array
description: The fulfillment's rules.
items:
type: object
description: The rule's rules.
x-schemaName: FulfillmentRuleCreate
required:
- operator
- attribute
- value
properties:
operator: {}
attribute:
type: string
title: attribute
description: The rule's attribute.
value:
oneOf:
- type: string
title: value
description: The rule's value.
- type: array
description: The rule's value.
items:
type: string
title: value
description: The value's details.
@@ -0,0 +1,13 @@
type: object
description: SUMMARY
x-schemaName: AdminPostFulfillmentShippingOptionsRulesBatchRemoveReq
required:
- rule_ids
properties:
rule_ids:
type: array
description: The fulfillment's rule ids.
items:
type: string
title: rule_ids
description: The rule id's rule ids.
@@ -0,0 +1,56 @@
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsInventoryItemReq
properties:
sku:
type: string
title: sku
description: The inventory item's sku.
origin_country:
type: string
title: origin_country
description: The inventory item's origin country.
hs_code:
type: string
title: hs_code
description: The inventory item's hs code.
mid_code:
type: string
title: mid_code
description: The inventory item's mid code.
material:
type: string
title: material
description: The inventory item's material.
weight:
type: number
title: weight
description: The inventory item's weight.
height:
type: number
title: height
description: The inventory item's height.
length:
type: number
title: length
description: The inventory item's length.
width:
type: number
title: width
description: The inventory item's width.
title:
type: string
title: title
description: The inventory item's title.
description:
type: string
title: description
description: The inventory item's description.
thumbnail:
type: string
title: thumbnail
description: The inventory item's thumbnail.
requires_shipping:
type: boolean
title: requires_shipping
description: The inventory item's requires shipping.
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsItemLocationLevelsLevelReq
properties:
incoming_quantity:
type: number
title: incoming_quantity
description: The inventory item's incoming quantity.
stocked_quantity:
type: number
title: stocked_quantity
description: The inventory item's stocked quantity.
@@ -0,0 +1,19 @@
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsItemLocationLevelsReq
required:
- location_id
- stocked_quantity
properties:
location_id:
type: string
title: location_id
description: The inventory item's location id.
stocked_quantity:
type: number
title: stocked_quantity
description: The inventory item's stocked quantity.
incoming_quantity:
type: number
title: incoming_quantity
description: The inventory item's incoming quantity.
@@ -0,0 +1,56 @@
type: object
description: SUMMARY
x-schemaName: AdminPostInventoryItemsReq
properties:
sku:
type: string
title: sku
description: The inventory item's sku.
hs_code:
type: string
title: hs_code
description: The inventory item's hs code.
weight:
type: number
title: weight
description: The inventory item's weight.
length:
type: number
title: length
description: The inventory item's length.
height:
type: number
title: height
description: The inventory item's height.
width:
type: number
title: width
description: The inventory item's width.
origin_country:
type: string
title: origin_country
description: The inventory item's origin country.
mid_code:
type: string
title: mid_code
description: The inventory item's mid code.
material:
type: string
title: material
description: The inventory item's material.
title:
type: string
title: title
description: The inventory item's title.
description:
type: string
title: description
description: The inventory item's description.
thumbnail:
type: string
title: thumbnail
description: The inventory item's thumbnail.
metadata:
type: object
description: The inventory item's metadata.
properties: {}
@@ -0,0 +1,15 @@
type: object
description: SUMMARY
x-schemaName: AdminPostInvitesInviteAcceptReq
required:
- first_name
- last_name
properties:
first_name:
type: string
title: first_name
description: The invite's first name.
last_name:
type: string
title: last_name
description: The invite's last name.
@@ -0,0 +1,8 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPaymentsCapturesReq
properties:
amount:
type: number
title: amount
description: The payment's amount.
@@ -0,0 +1,8 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPaymentsRefundsReq
properties:
amount:
type: number
title: amount
description: The payment's amount.
@@ -0,0 +1,42 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsPriceListPricesBatchAddReq
required:
- prices
properties:
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
x-schemaName: AdminPriceListPricesCreateReq
required:
- currency_code
- amount
- variant_id
properties:
currency_code:
type: string
title: currency_code
description: The price's currency code.
amount:
type: number
title: amount
description: The price's amount.
variant_id:
type: string
title: variant_id
description: The price's variant id.
min_quantity:
type: number
title: min_quantity
description: The price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
rules:
type: object
description: The price's rules.
properties: {}
@@ -0,0 +1,13 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsPriceListPricesBatchRemoveReq
required:
- ids
properties:
ids:
type: array
description: The price list's ids.
items:
type: string
title: ids
description: The id's ids.
@@ -0,0 +1,64 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsPriceListReq
required:
- prices
properties:
title:
type: string
title: title
description: The price list's title.
description:
type: string
title: description
description: The price list's description.
starts_at:
type: string
title: starts_at
description: The price list's starts at.
ends_at:
type: string
title: ends_at
description: The price list's ends at.
status: {}
type: {}
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
x-schemaName: AdminPriceListPricesCreateReq
required:
- currency_code
- amount
- variant_id
properties:
currency_code:
type: string
title: currency_code
description: The price's currency code.
amount:
type: number
title: amount
description: The price's amount.
variant_id:
type: string
title: variant_id
description: The price's variant id.
min_quantity:
type: number
title: min_quantity
description: The price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
rules:
type: object
description: The price's rules.
properties: {}
rules:
type: object
description: The price list's rules.
properties: {}
@@ -0,0 +1,67 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPriceListsReq
required:
- title
- description
- type
- prices
properties:
title:
type: string
title: title
description: The price list's title.
description:
type: string
title: description
description: The price list's description.
starts_at:
type: string
title: starts_at
description: The price list's starts at.
ends_at:
type: string
title: ends_at
description: The price list's ends at.
status: {}
type: {}
prices:
type: array
description: The price list's prices.
items:
type: object
description: The price's prices.
x-schemaName: AdminPriceListPricesCreateReq
required:
- currency_code
- amount
- variant_id
properties:
currency_code:
type: string
title: currency_code
description: The price's currency code.
amount:
type: number
title: amount
description: The price's amount.
variant_id:
type: string
title: variant_id
description: The price's variant id.
min_quantity:
type: number
title: min_quantity
description: The price's min quantity.
max_quantity:
type: number
title: max_quantity
description: The price's max quantity.
rules:
type: object
description: The price's rules.
properties: {}
rules:
type: object
description: The price list's rules.
properties: {}
@@ -0,0 +1,20 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPricingRuleTypesReq
required:
- name
- rule_attribute
- default_priority
properties:
name:
type: string
title: name
description: The pricing's name.
rule_attribute:
type: string
title: rule_attribute
description: The pricing's rule attribute.
default_priority:
type: number
title: default_priority
description: The pricing's default priority.
@@ -0,0 +1,16 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPricingRuleTypesRuleTypeReq
properties:
name:
type: string
title: name
description: The pricing's name.
rule_attribute:
type: string
title: rule_attribute
description: The pricing's rule attribute.
default_priority:
type: number
title: default_priority
description: The pricing's default priority.
@@ -0,0 +1,49 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionReq
properties:
code:
type: string
title: code
description: The promotion's code.
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
type: {}
campaign_id:
type: string
title: campaign_id
description: The promotion's campaign id.
campaign:
$ref: ./AdminPostCampaignsReq.yaml
application_method:
$ref: ./ApplicationMethodsMethodPostReq.yaml
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
@@ -0,0 +1,34 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionRulesBatchAddReq
required:
- rules
properties:
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
@@ -0,0 +1,13 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionRulesBatchRemoveReq
required:
- rule_ids
properties:
rule_ids:
type: array
description: The promotion's rule ids.
items:
type: string
title: rule_ids
description: The rule id's rule ids.
@@ -0,0 +1,38 @@
type: object
description: SUMMARY
x-schemaName: AdminPostPromotionsPromotionRulesBatchUpdateReq
required:
- rules
properties:
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: UpdatePromotionRule
required:
- id
- attribute
- values
properties:
id:
type: string
title: id
description: The rule's ID.
operator: {}
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
values:
type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
@@ -0,0 +1,20 @@
type: object
description: SUMMARY
x-schemaName: AdminPostStockLocationsReq
required:
- name
properties:
name:
type: string
title: name
description: The stock location's name.
address:
$ref: ./StockLocationAddress.yaml
address_id:
type: string
title: address_id
description: The stock location's address id.
metadata:
type: object
description: The stock location's metadata.
properties: {}
@@ -0,0 +1,54 @@
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRatesReq
required:
- name
- tax_region_id
properties:
rate:
type: number
title: rate
description: The tax rate's rate.
code:
type: string
title: code
description: The tax rate's code.
rules:
type: array
description: The tax rate's rules.
items:
type: object
description: The rule's rules.
x-schemaName: CreateTaxRateRule
required:
- reference
- reference_id
properties:
reference:
type: string
title: reference
description: The rule's reference.
reference_id:
type: string
title: reference_id
description: The rule's reference id.
name:
type: string
title: name
description: The tax rate's name.
is_default:
type: boolean
title: is_default
description: The tax rate's is default.
is_combinable:
type: boolean
title: is_combinable
description: The tax rate's is combinable.
tax_region_id:
type: string
title: tax_region_id
description: The tax rate's tax region id.
metadata:
type: object
description: The tax rate's metadata.
properties: {}
@@ -0,0 +1,41 @@
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRatesTaxRateReq
properties:
code:
type: string
title: code
description: The tax rate's code.
name:
type: string
title: name
description: The tax rate's name.
region_id:
type: string
title: region_id
description: The tax rate's region id.
rate:
type: number
title: rate
description: The tax rate's rate.
products:
type: array
description: The tax rate's products.
items:
type: string
title: products
description: The product's products.
shipping_options:
type: array
description: The tax rate's shipping options.
items:
type: string
title: shipping_options
description: The shipping option's shipping options.
product_types:
type: array
description: The tax rate's product types.
items:
type: string
title: product_types
description: The product type's product types.
@@ -0,0 +1,15 @@
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRatesTaxRateRulesReq
required:
- reference
- reference_id
properties:
reference:
type: string
title: reference
description: The tax rate's reference.
reference_id:
type: string
title: reference_id
description: The tax rate's reference id.
@@ -0,0 +1,24 @@
type: object
description: SUMMARY
x-schemaName: AdminPostTaxRegionsReq
required:
- country_code
properties:
country_code:
type: string
title: country_code
description: The tax region's country code.
province_code:
type: string
title: province_code
description: The tax region's province code.
parent_id:
type: string
title: parent_id
description: The tax region's parent id.
default_tax_rate:
$ref: ./CreateDefaultTaxRate.yaml
metadata:
type: object
description: The tax region's metadata.
properties: {}
@@ -0,0 +1,18 @@
type: object
description: SUMMARY
x-schemaName: AdminPostWorkflowsAsyncResponseReq
required:
- transaction_id
- step_id
properties:
transaction_id:
type: string
title: transaction_id
description: The workflows execution's transaction id.
step_id:
type: string
title: step_id
description: The workflows execution's step id.
response: {}
compensate_input: {}
action: {}
@@ -0,0 +1,9 @@
type: object
description: SUMMARY
x-schemaName: AdminPostWorkflowsRunReq
properties:
input: {}
transaction_id:
type: string
title: transaction_id
description: The workflows execution's transaction id.
@@ -0,0 +1,18 @@
type: object
description: SUMMARY
x-schemaName: AdminUpdateUserRequest
required:
- avatar_url
properties:
first_name:
type: string
title: first_name
description: The user's first name.
last_name:
type: string
title: last_name
description: The user's last name.
avatar_url:
type: string
title: avatar_url
description: The user's avatar url.
@@ -0,0 +1,4 @@
type: object
description: The promotion's application method.
x-schemaName: ApplicationMethod
properties: {}
@@ -0,0 +1,83 @@
type: object
description: The promotion's application method.
x-schemaName: ApplicationMethodsMethodPostReq
properties:
description:
type: string
title: description
description: The application method's description.
value:
type: string
title: value
description: The application method's value.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
type: {}
target_type: {}
allocation: {}
target_rules:
type: array
description: The application method's target rules.
items:
type: object
description: The target rule's target rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The target rule's description.
attribute:
type: string
title: attribute
description: The target rule's attribute.
values:
type: array
description: The target rule's values.
items:
type: string
title: values
description: The value's values.
buy_rules:
type: array
description: The application method's buy rules.
items:
type: object
description: The buy rule's buy rules.
x-schemaName: PromotionRule
required:
- operator
- attribute
- values
properties:
operator: {}
description:
type: string
title: description
description: The buy rule's description.
attribute:
type: string
title: attribute
description: The buy rule's attribute.
values:
type: array
description: The buy rule's values.
items:
type: string
title: values
description: The value's values.
apply_to_quantity:
type: number
title: apply_to_quantity
description: The application method's apply to quantity.
buy_rules_min_quantity:
type: number
title: buy_rules_min_quantity
description: The application method's buy rules min quantity.
@@ -1,171 +0,0 @@
title: Batch Job
description: >-
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its
status determines whether it has been executed or not.
type: object
required:
- canceled_at
- completed_at
- confirmed_at
- context
- created_at
- created_by
- deleted_at
- dry_run
- failed_at
- id
- pre_processed_at
- processing_at
- result
- status
- type
- updated_at
properties:
id:
description: The unique identifier for the batch job.
type: string
example: batch_01G8T782965PYFG0751G0Z38B4
type:
description: The type of batch job.
type: string
enum:
- product-import
- product-export
status:
description: The status of the batch job.
type: string
enum:
- created
- pre_processed
- confirmed
- processing
- completed
- canceled
- failed
default: created
created_by:
description: The unique identifier of the user that created the batch job.
nullable: true
type: string
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
created_by_user:
description: The details of the user that created the batch job.
x-expandable: created_by_user
nullable: true
$ref: ./User.yaml
context:
description: >-
The context of the batch job, the type of the batch job determines what
the context should contain.
nullable: true
type: object
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:
description: Specify if the job must apply the modifications or not.
type: boolean
default: false
result:
description: The result of the batch job.
nullable: true
allOf:
- type: object
example: {}
- type: object
properties:
count:
type: number
advancement_count:
type: number
progress:
type: number
errors:
type: object
properties:
message:
type: string
code:
oneOf:
- type: string
- type: number
err:
type: array
stat_descriptors:
type: object
properties:
key:
type: string
name:
type: string
message:
type: string
file_key:
type: string
file_size:
type: number
example:
errors:
- err: []
code: unknown
message: Method not implemented.
stat_descriptors:
- key: product-export-count
name: Product count to export
message: There will be 8 products exported by this action
pre_processed_at:
description: The date from which the job has been pre-processed.
nullable: true
type: string
format: date-time
processing_at:
description: The date the job is processing at.
nullable: true
type: string
format: date-time
confirmed_at:
description: The date when the confirmation has been done.
nullable: true
type: string
format: date-time
completed_at:
description: The date of the completion.
nullable: true
type: string
format: date-time
canceled_at:
description: The date of the concellation.
nullable: true
type: string
format: date-time
failed_at:
description: The date when the job failed.
nullable: true
type: string
format: date-time
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was last updated.
type: string
format: date-time
deleted_at:
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
@@ -0,0 +1,4 @@
type: object
description: The promotion's campaign.
x-schemaName: Campaign
properties: {}
@@ -0,0 +1,9 @@
type: object
description: The campaign's budget.
x-schemaName: CampaignBudget
properties:
type: {}
limit:
type: number
title: limit
description: The budget's limit.
@@ -1,243 +0,0 @@
title: Cart
description: >-
A cart represents a virtual shopping bag. It can be used to complete an order,
a swap, or a claim.
type: object
required:
- billing_address_id
- completed_at
- context
- created_at
- customer_id
- deleted_at
- email
- id
- idempotency_key
- metadata
- payment_authorized_at
- payment_id
- payment_session
- region_id
- shipping_address_id
- type
- updated_at
properties:
id:
description: The cart's ID
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
email:
description: The email associated with the cart
nullable: true
type: string
format: email
billing_address_id:
description: The billing address's ID
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
billing_address:
description: The details of the billing address associated with the cart.
x-expandable: billing_address
nullable: true
$ref: ./Address.yaml
shipping_address_id:
description: The shipping address's ID
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
shipping_address:
description: The details of the shipping address associated with the cart.
x-expandable: shipping_address
nullable: true
$ref: ./Address.yaml
items:
description: The line items added to the cart.
type: array
x-expandable: items
items:
$ref: ./LineItem.yaml
region_id:
description: The region's ID
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: The details of the region associated with the cart.
x-expandable: region
nullable: true
$ref: ./Region.yaml
discounts:
description: An array of details of all discounts applied to the cart.
type: array
x-expandable: discounts
items:
$ref: ./Discount.yaml
gift_cards:
description: An array of details of all gift cards applied to the cart.
type: array
x-expandable: gift_cards
items:
$ref: ./GiftCard.yaml
customer_id:
description: The customer's ID
nullable: true
type: string
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
customer:
description: The details of the customer the cart belongs to.
x-expandable: customer
nullable: true
type: object
payment_session:
description: The details of the selected payment session in the cart.
x-expandable: payment_session
nullable: true
type: object
payment_sessions:
description: The details of all payment sessions created on the cart.
type: array
x-expandable: payment_sessions
items:
type: object
payment_id:
description: The payment's ID if available
nullable: true
type: string
example: pay_01G8ZCC5W42ZNY842124G7P5R9
payment:
description: The details of the payment associated with the cart.
nullable: true
x-expandable: payment
type: object
shipping_methods:
description: The details of the shipping methods added to the cart.
type: array
x-expandable: shipping_methods
items:
$ref: ./ShippingMethod.yaml
type:
description: The cart's type.
type: string
enum:
- default
- swap
- draft_order
- payment_link
- claim
default: default
completed_at:
description: The date with timezone at which the cart was completed.
nullable: true
type: string
format: date-time
payment_authorized_at:
description: The date with timezone at which the payment was authorized.
nullable: true
type: string
format: date-time
idempotency_key:
description: >-
Randomly generated key used to continue the completion of a cart in case
of failure.
nullable: true
type: string
externalDocs:
url: https://docs.medusajs.com/development/idempotency-key/overview.md
description: Learn more how to use the idempotency key.
context:
description: The context of the cart which can include info like IP or user agent.
nullable: true
type: object
example:
ip: '::1'
user_agent: PostmanRuntime/7.29.2
sales_channel_id:
description: The sales channel ID the cart is associated with.
nullable: true
type: string
example: null
sales_channel:
description: The details of the sales channel associated with the cart.
nullable: true
x-expandable: sales_channel
$ref: ./SalesChannel.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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
shipping_total:
description: The total of shipping
type: integer
example: 1000
discount_total:
description: The total of discount rounded
type: integer
example: 800
raw_discount_total:
description: The total of discount
type: integer
example: 800
item_tax_total:
description: The total of items with taxes
type: integer
example: 8000
shipping_tax_total:
description: The total of shipping with taxes
type: integer
example: 1000
tax_total:
description: The total of tax
type: integer
example: 0
refunded_total:
description: >-
The total amount refunded if the order associated with this cart is
returned.
type: integer
example: 0
total:
description: The total amount of the cart
type: integer
example: 8200
subtotal:
description: The subtotal of the cart
type: integer
example: 8000
refundable_amount:
description: The amount that can be refunded
type: integer
example: 8200
gift_card_total:
description: The total of gift cards
type: integer
example: 0
gift_card_tax_total:
description: The total of gift cards with taxes
type: integer
example: 0
sales_channels:
description: The associated sales channels.
type: array
nullable: true
x-expandable: sales_channels
items:
$ref: ./SalesChannel.yaml
@@ -1,51 +0,0 @@
title: Claim Image
description: The details of an image attached to a claim.
type: object
required:
- claim_item_id
- created_at
- deleted_at
- id
- metadata
- updated_at
- url
properties:
id:
description: The claim image's ID
type: string
example: cimg_01G8ZH853Y6TFXWPG5EYE81X63
claim_item_id:
description: The ID of the claim item associated with the image
type: string
claim_item:
description: The details of the claim item this image is associated with.
nullable: true
x-expandable: claim_item
type: object
url:
description: The URL of the image
type: string
format: uri
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,106 +0,0 @@
title: Claim Item
description: >-
A claim item is an item created as part of a claim. It references an item in
the order that should be exchanged or refunded.
type: object
required:
- claim_order_id
- created_at
- deleted_at
- id
- item_id
- metadata
- note
- quantity
- reason
- updated_at
- variant_id
properties:
id:
description: The claim item's ID
type: string
example: citm_01G8ZH853Y6TFXWPG5EYE81X63
images:
description: The claim images that are attached to the claim item.
type: array
x-expandable: images
items:
$ref: ./ClaimImage.yaml
claim_order_id:
description: The ID of the claim this item is associated with.
type: string
claim_order:
description: The details of the claim this item belongs to.
x-expandable: claim_order
nullable: true
type: object
item_id:
description: The ID of the line item that the claim item refers to.
type: string
example: item_01G8ZM25TN49YV9EQBE2NC27KC
item:
description: >-
The details of the line item in the original order that this claim item
refers to.
x-expandable: item
nullable: true
$ref: ./LineItem.yaml
variant_id:
description: The ID of the product variant that is claimed.
type: string
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
variant:
description: >-
The details of the product variant to potentially replace the item in the
original order.
x-expandable: variant
nullable: true
$ref: ./ProductVariant.yaml
reason:
description: The reason for the claim
type: string
enum:
- missing_item
- wrong_item
- production_failure
- other
note:
description: An optional note about the claim, for additional information
nullable: true
type: string
example: I don't like it.
quantity:
description: >-
The quantity of the item that is being claimed; must be less than or equal
to the amount purchased in the original order.
type: integer
example: 1
tags:
description: User defined tags for easy filtering and grouping.
type: array
x-expandable: tags
items:
$ref: ./ClaimTag.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,157 +0,0 @@
title: Claim
description: >-
A Claim represents a group of faulty or missing items. It consists of claim
items that refer to items in the original order that should be replaced or
refunded. It also includes details related to shipping and fulfillment.
type: object
required:
- canceled_at
- created_at
- deleted_at
- fulfillment_status
- id
- idempotency_key
- metadata
- no_notification
- order_id
- payment_status
- refund_amount
- shipping_address_id
- type
- updated_at
properties:
id:
description: The claim's ID
type: string
example: claim_01G8ZH853Y6TFXWPG5EYE81X63
type:
description: The claim's type
type: string
enum:
- refund
- replace
payment_status:
description: The status of the claim's payment
type: string
enum:
- na
- not_refunded
- refunded
default: na
fulfillment_status:
description: The claim's fulfillment status
type: string
enum:
- not_fulfilled
- partially_fulfilled
- fulfilled
- partially_shipped
- shipped
- partially_returned
- returned
- canceled
- requires_action
default: not_fulfilled
claim_items:
description: The details of the items that should be replaced or refunded.
type: array
x-expandable: claim_items
items:
$ref: ./ClaimItem.yaml
additional_items:
description: >-
The details of the new items to be shipped when the claim's type is
`replace`
type: array
x-expandable: additional_items
items:
$ref: ./LineItem.yaml
order_id:
description: The ID of the order that the claim comes from.
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: The details of the order that this claim was created for.
x-expandable: order
nullable: true
type: object
return_order:
description: >-
The details of the return associated with the claim if the claim's type is
`replace`.
x-expandable: return_order
nullable: true
type: object
shipping_address_id:
description: The ID of the address that the new items should be shipped to
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
shipping_address:
description: The details of the address that new items should be shipped to.
x-expandable: shipping_address
nullable: true
$ref: ./Address.yaml
shipping_methods:
description: >-
The details of the shipping methods that the claim order will be shipped
with.
type: array
x-expandable: shipping_methods
items:
$ref: ./ShippingMethod.yaml
fulfillments:
description: The fulfillments of the new items to be shipped
type: array
x-expandable: fulfillments
items:
type: object
refund_amount:
description: The amount that will be refunded in conjunction with the claim
nullable: true
type: integer
example: 1000
canceled_at:
description: The date with timezone at which the claim was canceled.
nullable: true
type: string
format: date-time
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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
no_notification:
description: >-
Flag for describing whether or not notifications related to this should be
send.
nullable: true
type: boolean
example: false
idempotency_key:
description: >-
Randomly generated key used to continue the completion of the cart
associated with the claim in case of failure.
nullable: true
type: string
externalDocs:
url: https://docs.medusajs.com/development/idempotency-key/overview.md
description: Learn more how to use the idempotency key.
@@ -1,44 +0,0 @@
title: Claim Tag
description: >-
Claim Tags are user defined tags that can be assigned to claim items for easy
filtering and grouping.
type: object
required:
- created_at
- deleted_at
- id
- metadata
- updated_at
- value
properties:
id:
description: The claim tag's ID
type: string
example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4
value:
description: The value that the claim tag holds
type: string
example: Damaged
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,58 +0,0 @@
title: Country
description: Country details
type: object
required:
- display_name
- id
- iso_2
- iso_3
- name
- num_code
- region_id
properties:
id:
description: The country's ID
type: string
example: 109
iso_2:
description: The 2 character ISO code of the country in lower case
type: string
example: it
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.
iso_3:
description: The 2 character ISO code of the country in lower case
type: string
example: ita
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements
description: See a list of codes.
num_code:
description: The numerical ISO code for the country.
type: string
example: 380
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements
description: See a list of codes.
name:
description: The normalized country name in upper case.
type: string
example: ITALY
display_name:
description: The country name appropriate for display.
type: string
example: Italy
region_id:
description: The region ID this country is associated with.
nullable: true
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: The details of the region the country is associated with.
x-expandable: region
nullable: true
type: object
@@ -0,0 +1,52 @@
type: object
description: The cart's shipping address.
x-schemaName: CreateAddress
properties:
customer_id:
type: string
title: customer_id
description: The shipping address's customer id.
company:
type: string
title: company
description: The shipping address's company.
first_name:
type: string
title: first_name
description: The shipping address's first name.
last_name:
type: string
title: last_name
description: The shipping address's last name.
address_1:
type: string
title: address_1
description: The shipping address's address 1.
address_2:
type: string
title: address_2
description: The shipping address's address 2.
city:
type: string
title: city
description: The shipping address's city.
country_code:
type: string
title: country_code
description: The shipping address's country code.
province:
type: string
title: province
description: The shipping address's province.
postal_code:
type: string
title: postal_code
description: The shipping address's postal code.
phone:
type: string
title: phone
description: The shipping address's phone.
metadata:
type: object
description: The shipping address's metadata.
properties: {}
@@ -0,0 +1,16 @@
type: object
description: SUMMARY
x-schemaName: CreateApiKey
required:
- title
- type
properties:
title:
type: string
title: title
description: The api key's title.
type:
type: string
enum:
- secret
- publishable
@@ -0,0 +1,161 @@
type: object
description: The promotion's application method.
x-schemaName: CreateApplicationMethod
required:
- type
- target_type
properties:
type:
type: string
enum:
- fixed
- percentage
target_type:
type: string
enum:
- order
- shipping_methods
- items
allocation:
type: string
enum:
- each
- across
value:
type: number
title: value
description: The application method's value.
max_quantity:
type: number
title: max_quantity
description: The application method's max quantity.
buy_rules_min_quantity:
type: number
title: buy_rules_min_quantity
description: The application method's buy rules min quantity.
apply_to_quantity:
type: number
title: apply_to_quantity
description: The application method's apply to quantity.
promotion:
oneOf:
- type: string
title: promotion
description: The application method's promotion.
- type: object
description: The application method's promotion.
x-schemaName: Promotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
code:
type: string
title: code
description: The promotion's code.
type:
type: string
enum:
- standard
- buyget
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
$ref: ./ApplicationMethod.yaml
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: PromotionRule
properties: {}
campaign:
$ref: ./Campaign.yaml
target_rules:
type: array
description: The application method's target rules.
items:
type: object
description: The target rule's target rules.
x-schemaName: CreatePromotionRule
required:
- attribute
- operator
- values
properties:
description:
type: string
title: description
description: The target rule's description.
attribute:
type: string
title: attribute
description: The target rule's attribute.
operator:
type: string
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
values:
oneOf:
- type: string
title: values
description: The target rule's values.
- type: array
description: The target rule's values.
items:
type: string
title: values
description: The value's values.
buy_rules:
type: array
description: The application method's buy rules.
items:
type: object
description: The buy rule's buy rules.
x-schemaName: CreatePromotionRule
required:
- attribute
- operator
- values
properties:
description:
type: string
title: description
description: The buy rule's description.
attribute:
type: string
title: attribute
description: The buy rule's attribute.
operator:
type: string
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
values:
oneOf:
- type: string
title: values
description: The buy rule's values.
- type: array
description: The buy rule's values.
items:
type: string
title: values
description: The value's values.
@@ -0,0 +1,51 @@
type: object
description: The promotion's campaign.
x-schemaName: CreateCampaign
required:
- name
- campaign_identifier
- starts_at
- ends_at
properties:
name:
type: string
title: name
description: The campaign's name.
description:
type: string
title: description
description: The campaign's description.
currency:
type: string
title: currency
description: The campaign's currency.
campaign_identifier:
type: string
title: campaign_identifier
description: The campaign's campaign identifier.
starts_at:
type: string
title: starts_at
description: The campaign's starts at.
format: date-time
ends_at:
type: string
title: ends_at
description: The campaign's ends at.
format: date-time
budget:
$ref: ./CreateCampaignBudget.yaml
promotions:
type: array
description: The campaign's promotions.
items:
type: object
description: The promotion's promotions.
x-schemaName: Promotion
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
@@ -0,0 +1,20 @@
type: object
description: The campaign's budget.
x-schemaName: CreateCampaignBudget
required:
- type
- limit
properties:
type:
type: string
enum:
- spend
- usage
limit:
type: number
title: limit
description: The budget's limit.
used:
type: number
title: used
description: The budget's used.
@@ -0,0 +1,48 @@
type: object
description: The cart's billing address.
x-schemaName: CreateCartAddress
properties:
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
properties: {}
@@ -0,0 +1,103 @@
type: object
description: The item's items.
x-schemaName: CreateCartCreateLineItem
required:
- quantity
- variant_id
properties:
quantity:
type: number
title: quantity
description: The item's quantity.
variant_id:
type: string
title: variant_id
description: The item's variant id.
title:
type: string
title: title
description: The item's title.
subtitle:
type: string
title: subtitle
description: The item's subtitle.
thumbnail:
type: string
title: thumbnail
description: The item's thumbnail.
product_id:
type: string
title: product_id
description: The item's product id.
product_title:
type: string
title: product_title
description: The item's product title.
product_description:
type: string
title: product_description
description: The item's product description.
product_subtitle:
type: string
title: product_subtitle
description: The item's product subtitle.
product_type:
type: string
title: product_type
description: The item's product type.
product_collection:
type: string
title: product_collection
description: The item's product collection.
product_handle:
type: string
title: product_handle
description: The item's product handle.
variant_sku:
type: string
title: variant_sku
description: The item's variant sku.
variant_barcode:
type: string
title: variant_barcode
description: The item's variant barcode.
variant_title:
type: string
title: variant_title
description: The item's variant title.
variant_option_values:
type: object
description: The item's variant option values.
properties: {}
requires_shipping:
type: boolean
title: requires_shipping
description: The item's requires shipping.
is_discountable:
type: boolean
title: is_discountable
description: The item's is discountable.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The item's is tax inclusive.
is_giftcard:
type: boolean
title: is_giftcard
description: The item's is giftcard.
compare_at_unit_price:
type: number
title: compare_at_unit_price
description: The item's compare at unit price.
unit_price:
oneOf:
- type: string
title: unit_price
description: The item's unit price.
- type: number
title: unit_price
description: The item's unit price.
metadata:
type: object
description: The item's metadata.
properties: {}
@@ -0,0 +1,257 @@
type: object
description: SUMMARY
x-schemaName: CreateCartWorkflowInput
properties:
region_id:
type: string
title: region_id
description: The cart's region id.
customer_id:
type: string
title: customer_id
description: The cart's customer id.
sales_channel_id:
type: string
title: sales_channel_id
description: The cart's sales channel id.
email:
type: string
title: email
description: The cart's email.
format: email
currency_code:
type: string
title: currency_code
description: The cart's currency code.
shipping_address_id:
type: string
title: shipping_address_id
description: The cart's shipping address id.
billing_address_id:
type: string
title: billing_address_id
description: The cart's billing address id.
shipping_address:
oneOf:
- type: string
title: shipping_address
description: The cart's shipping address.
- type: object
description: The cart's shipping address.
x-schemaName: CreateCartAddress
properties:
first_name:
type: string
title: first_name
description: The shipping address's first name.
last_name:
type: string
title: last_name
description: The shipping address's last name.
phone:
type: string
title: phone
description: The shipping address's phone.
company:
type: string
title: company
description: The shipping address's company.
address_1:
type: string
title: address_1
description: The shipping address's address 1.
address_2:
type: string
title: address_2
description: The shipping address's address 2.
city:
type: string
title: city
description: The shipping address's city.
country_code:
type: string
title: country_code
description: The shipping address's country code.
province:
type: string
title: province
description: The shipping address's province.
postal_code:
type: string
title: postal_code
description: The shipping address's postal code.
metadata:
type: object
description: The shipping address's metadata.
properties: {}
billing_address:
oneOf:
- type: string
title: billing_address
description: The cart's billing address.
- type: object
description: The cart's billing address.
x-schemaName: CreateCartAddress
properties:
first_name:
type: string
title: first_name
description: The billing address's first name.
last_name:
type: string
title: last_name
description: The billing address's last name.
phone:
type: string
title: phone
description: The billing address's phone.
company:
type: string
title: company
description: The billing address's company.
address_1:
type: string
title: address_1
description: The billing address's address 1.
address_2:
type: string
title: address_2
description: The billing address's address 2.
city:
type: string
title: city
description: The billing address's city.
country_code:
type: string
title: country_code
description: The billing address's country code.
province:
type: string
title: province
description: The billing address's province.
postal_code:
type: string
title: postal_code
description: The billing address's postal code.
metadata:
type: object
description: The billing address's metadata.
properties: {}
metadata:
type: object
description: The cart's metadata.
properties: {}
items:
type: array
description: The cart's items.
items:
type: object
description: The item's items.
x-schemaName: CreateCartCreateLineItem
required:
- quantity
- variant_id
properties:
quantity:
type: number
title: quantity
description: The item's quantity.
variant_id:
type: string
title: variant_id
description: The item's variant id.
title:
type: string
title: title
description: The item's title.
subtitle:
type: string
title: subtitle
description: The item's subtitle.
thumbnail:
type: string
title: thumbnail
description: The item's thumbnail.
product_id:
type: string
title: product_id
description: The item's product id.
product_title:
type: string
title: product_title
description: The item's product title.
product_description:
type: string
title: product_description
description: The item's product description.
product_subtitle:
type: string
title: product_subtitle
description: The item's product subtitle.
product_type:
type: string
title: product_type
description: The item's product type.
product_collection:
type: string
title: product_collection
description: The item's product collection.
product_handle:
type: string
title: product_handle
description: The item's product handle.
variant_sku:
type: string
title: variant_sku
description: The item's variant sku.
variant_barcode:
type: string
title: variant_barcode
description: The item's variant barcode.
variant_title:
type: string
title: variant_title
description: The item's variant title.
variant_option_values:
type: object
description: The item's variant option values.
properties: {}
requires_shipping:
type: boolean
title: requires_shipping
description: The item's requires shipping.
is_discountable:
type: boolean
title: is_discountable
description: The item's is discountable.
is_tax_inclusive:
type: boolean
title: is_tax_inclusive
description: The item's is tax inclusive.
is_giftcard:
type: boolean
title: is_giftcard
description: The item's is giftcard.
compare_at_unit_price:
type: number
title: compare_at_unit_price
description: The item's compare at unit price.
unit_price:
oneOf:
- type: string
title: unit_price
description: The item's unit price.
- type: number
title: unit_price
description: The item's unit price.
metadata:
type: object
description: The item's metadata.
properties: {}
promo_codes:
type: array
description: The cart's promo codes.
items:
type: string
title: promo_codes
description: The promo code's promo codes.
@@ -0,0 +1,97 @@
type: object
description: SUMMARY
x-schemaName: CreateCustomer
properties:
company_name:
type: string
title: company_name
description: The customer's company name.
first_name:
type: string
title: first_name
description: The customer's first name.
last_name:
type: string
title: last_name
description: The customer's last name.
email:
type: string
title: email
description: The customer's email.
format: email
phone:
type: string
title: phone
description: The customer's phone.
created_by:
type: string
title: created_by
description: The customer's created by.
addresses:
type: array
description: The customer's addresses.
items:
type: object
description: The address's addresses.
x-schemaName: CreateCustomerAddress
properties:
address_name:
type: string
title: address_name
description: The address's address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The address's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The address's is default billing.
company:
type: string
title: company
description: The address's company.
first_name:
type: string
title: first_name
description: The address's first name.
last_name:
type: string
title: last_name
description: The address's last name.
address_1:
type: string
title: address_1
description: The address's address 1.
address_2:
type: string
title: address_2
description: The address's address 2.
city:
type: string
title: city
description: The address's city.
country_code:
type: string
title: country_code
description: The address's country code.
province:
type: string
title: province
description: The address's province.
postal_code:
type: string
title: postal_code
description: The address's postal code.
phone:
type: string
title: phone
description: The address's phone.
metadata:
type: object
description: The address's metadata.
properties: {}
metadata:
type: object
description: The customer's metadata.
properties: {}
@@ -0,0 +1,66 @@
type: object
description: SUMMARY
x-schemaName: CreateCustomerAddress
required:
- customer_id
properties:
address_name:
type: string
title: address_name
description: The customer's address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The customer's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The customer's is default billing.
customer_id:
type: string
title: customer_id
description: The customer's customer id.
company:
type: string
title: company
description: The customer's company.
first_name:
type: string
title: first_name
description: The customer's first name.
last_name:
type: string
title: last_name
description: The customer's last name.
address_1:
type: string
title: address_1
description: The customer's address 1.
address_2:
type: string
title: address_2
description: The customer's address 2.
city:
type: string
title: city
description: The customer's city.
country_code:
type: string
title: country_code
description: The customer's country code.
province:
type: string
title: province
description: The customer's province.
postal_code:
type: string
title: postal_code
description: The customer's postal code.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
properties: {}
@@ -0,0 +1,18 @@
type: object
description: SUMMARY
x-schemaName: CreateCustomerGroup
required:
- name
properties:
name:
type: string
title: name
description: The customer group's name.
metadata:
type: object
description: The customer group's metadata.
properties: {}
created_by:
type: string
title: created_by
description: The customer group's created by.
@@ -0,0 +1,22 @@
type: object
description: The tax region's default tax rate.
x-schemaName: CreateDefaultTaxRate
required:
- name
properties:
rate:
type: number
title: rate
description: The default tax rate's rate.
code:
type: string
title: code
description: The default tax rate's code.
name:
type: string
title: name
description: The default tax rate's name.
metadata:
type: object
description: The default tax rate's metadata.
properties: {}
@@ -0,0 +1,19 @@
type: object
description: SUMMARY
x-schemaName: CreateInvite
required:
- email
properties:
email:
type: string
title: email
description: The invite's email.
format: email
accepted:
type: boolean
title: accepted
description: The invite's accepted.
metadata:
type: object
description: The invite's metadata.
properties: {}
@@ -0,0 +1,256 @@
type: object
description: SUMMARY
x-schemaName: CreateProduct
required:
- title
properties:
title:
type: string
title: title
description: The product's title.
subtitle:
type: string
title: subtitle
description: The product's subtitle.
description:
type: string
title: description
description: The product's description.
is_giftcard:
type: boolean
title: is_giftcard
description: The product's is giftcard.
discountable:
type: boolean
title: discountable
description: The product's discountable.
images:
oneOf:
- type: array
description: The product's images.
items:
type: string
title: images
description: The image's images.
- type: array
description: The product's images.
items:
type: object
description: The image's images.
required:
- url
properties:
id:
type: string
title: id
description: The image's ID.
url:
type: string
title: url
description: The image's url.
thumbnail:
type: string
title: thumbnail
description: The product's thumbnail.
handle:
type: string
title: handle
description: The product's handle.
status:
type: string
enum:
- draft
- proposed
- published
- rejected
type:
$ref: ./CreateProductType.yaml
type_id:
type: string
title: type_id
description: The product's type id.
collection_id:
type: string
title: collection_id
description: The product's collection id.
tags:
type: array
description: The product's tags.
items:
type: object
description: The tag's tags.
x-schemaName: CreateProductTag
required:
- value
properties:
value:
type: string
title: value
description: The tag's value.
categories:
type: array
description: The product's categories.
items:
type: object
description: The category's categories.
required:
- id
properties:
id:
type: string
title: id
description: The category's ID.
options:
type: array
description: The product's options.
items:
type: object
description: The option's options.
x-schemaName: CreateProductOption
required:
- title
properties:
title:
type: string
title: title
description: The option's title.
product_id:
type: string
title: product_id
description: The option's product id.
variants:
type: array
description: The product's variants.
items:
type: object
description: The variant's variants.
x-schemaName: CreateProductVariant
required:
- title
properties:
product_id:
type: string
title: product_id
description: The variant's product id.
title:
type: string
title: title
description: The variant's title.
sku:
type: string
title: sku
description: The variant's sku.
barcode:
type: string
title: barcode
description: The variant's barcode.
ean:
type: string
title: ean
description: The variant's ean.
upc:
type: string
title: upc
description: The variant's upc.
allow_backorder:
type: boolean
title: allow_backorder
description: The variant's allow backorder.
inventory_quantity:
type: number
title: inventory_quantity
description: The variant's inventory quantity.
manage_inventory:
type: boolean
title: manage_inventory
description: The variant's manage inventory.
hs_code:
type: string
title: hs_code
description: The variant's hs code.
origin_country:
type: string
title: origin_country
description: The variant's origin country.
mid_code:
type: string
title: mid_code
description: The variant's mid code.
material:
type: string
title: material
description: The variant's material.
weight:
type: number
title: weight
description: The variant's weight.
length:
type: number
title: length
description: The variant's length.
height:
type: number
title: height
description: The variant's height.
width:
type: number
title: width
description: The variant's width.
options:
type: array
description: The variant's options.
items:
type: object
description: The option's options.
x-schemaName: CreateProductVariantOption
required:
- value
properties:
value:
type: string
title: value
description: The option's value.
option_id:
type: string
title: option_id
description: The option's option id.
metadata:
type: object
description: The variant's metadata.
properties: {}
width:
type: number
title: width
description: The product's width.
height:
type: number
title: height
description: The product's height.
length:
type: number
title: length
description: The product's length.
weight:
type: number
title: weight
description: The product's weight.
origin_country:
type: string
title: origin_country
description: The product's origin country.
hs_code:
type: string
title: hs_code
description: The product's hs code.
material:
type: string
title: material
description: The product's material.
mid_code:
type: string
title: mid_code
description: The product's mid code.
metadata:
type: object
description: The product's metadata.
properties: {}
@@ -0,0 +1,25 @@
type: object
description: SUMMARY
x-schemaName: CreateProductCollection
required:
- title
properties:
title:
type: string
title: title
description: The collection's title.
handle:
type: string
title: handle
description: The collection's handle.
product_ids:
type: array
description: The collection's product ids.
items:
type: string
title: product_ids
description: The product id's product ids.
metadata:
type: object
description: The collection's metadata.
properties: {}
@@ -0,0 +1,14 @@
type: object
description: SUMMARY
x-schemaName: CreateProductOption
required:
- title
properties:
title:
type: string
title: title
description: The product's title.
product_id:
type: string
title: product_id
description: The product's product id.
@@ -0,0 +1,10 @@
type: object
description: The tag's tags.
x-schemaName: CreateProductTag
required:
- value
properties:
value:
type: string
title: value
description: The tag's value.
@@ -0,0 +1,18 @@
type: object
description: The product's type.
x-schemaName: CreateProductType
required:
- value
properties:
id:
type: string
title: id
description: The type's ID.
value:
type: string
title: value
description: The type's value.
metadata:
type: object
description: The type's metadata.
properties: {}
@@ -0,0 +1,96 @@
type: object
description: SUMMARY
x-schemaName: CreateProductVariant
required:
- title
properties:
product_id:
type: string
title: product_id
description: The product's product id.
title:
type: string
title: title
description: The product's title.
sku:
type: string
title: sku
description: The product's sku.
barcode:
type: string
title: barcode
description: The product's barcode.
ean:
type: string
title: ean
description: The product's ean.
upc:
type: string
title: upc
description: The product's upc.
allow_backorder:
type: boolean
title: allow_backorder
description: The product's allow backorder.
inventory_quantity:
type: number
title: inventory_quantity
description: The product's inventory quantity.
manage_inventory:
type: boolean
title: manage_inventory
description: The product's manage inventory.
hs_code:
type: string
title: hs_code
description: The product's hs code.
origin_country:
type: string
title: origin_country
description: The product's origin country.
mid_code:
type: string
title: mid_code
description: The product's mid code.
material:
type: string
title: material
description: The product's material.
weight:
type: number
title: weight
description: The product's weight.
length:
type: number
title: length
description: The product's length.
height:
type: number
title: height
description: The product's height.
width:
type: number
title: width
description: The product's width.
options:
type: array
description: The product's options.
items:
type: object
description: The option's options.
x-schemaName: CreateProductVariantOption
required:
- value
properties:
value:
type: string
title: value
description: The option's value.
option_id:
type: string
title: option_id
description: The option's option id.
metadata:
type: object
description: The product's metadata.
properties: {}
@@ -0,0 +1,14 @@
type: object
description: The option's options.
x-schemaName: CreateProductVariantOption
required:
- value
properties:
value:
type: string
title: value
description: The option's value.
option_id:
type: string
title: option_id
description: The option's option id.
@@ -0,0 +1,69 @@
type: object
description: SUMMARY
x-schemaName: CreatePromotion
required:
- code
- type
properties:
code:
type: string
title: code
description: The promotion's code.
type:
type: string
enum:
- standard
- buyget
is_automatic:
type: boolean
title: is_automatic
description: The promotion's is automatic.
application_method:
$ref: ./CreateApplicationMethod.yaml
rules:
type: array
description: The promotion's rules.
items:
type: object
description: The rule's rules.
x-schemaName: CreatePromotionRule
required:
- attribute
- operator
- values
properties:
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
values:
oneOf:
- type: string
title: values
description: The rule's values.
- type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
campaign:
$ref: ./CreateCampaign.yaml
campaign_id:
type: string
title: campaign_id
description: The promotion's campaign id.
@@ -0,0 +1,37 @@
type: object
description: The rule's rules.
x-schemaName: CreatePromotionRule
required:
- attribute
- operator
- values
properties:
description:
type: string
title: description
description: The rule's description.
attribute:
type: string
title: attribute
description: The rule's attribute.
operator:
type: string
enum:
- gt
- lt
- eq
- ne
- in
- lte
- gte
values:
oneOf:
- type: string
title: values
description: The rule's values.
- type: array
description: The rule's values.
items:
type: string
title: values
description: The value's values.
@@ -0,0 +1,26 @@
type: object
description: SUMMARY
x-schemaName: CreateRegion
required:
- name
- currency_code
properties:
name:
type: string
title: name
description: The region's name.
currency_code:
type: string
title: currency_code
description: The region's currency code.
countries:
type: array
description: The region's countries.
items:
type: string
title: countries
description: The country's countries.
metadata:
type: object
description: The region's metadata.
properties: {}
@@ -1,22 +0,0 @@
title: Create Stock Location Input
description: Represents the Input to create a Stock Location
type: object
required:
- name
properties:
name:
type: string
description: The stock location name
address_id:
type: string
description: The Stock location address ID
address:
description: Stock location address object
allOf:
- $ref: ./StockLocationAddressInput.yaml
- type: object
metadata:
type: object
description: An optional key-value map with additional details
example:
car: white
@@ -0,0 +1,15 @@
type: object
description: The rule's rules.
x-schemaName: CreateTaxRateRule
required:
- reference
- reference_id
properties:
reference:
type: string
title: reference
description: The rule's reference.
reference_id:
type: string
title: reference_id
description: The rule's reference id.
@@ -0,0 +1,27 @@
type: object
description: SUMMARY
x-schemaName: CreateUser
required:
- email
properties:
email:
type: string
title: email
description: The user's email.
format: email
first_name:
type: string
title: first_name
description: The user's first name.
last_name:
type: string
title: last_name
description: The user's last name.
avatar_url:
type: string
title: avatar_url
description: The user's avatar url.
metadata:
type: object
description: The user's metadata.
properties: {}
@@ -1,33 +0,0 @@
title: Currency
description: Currency
type: object
required:
- code
- name
- symbol
- symbol_native
properties:
code:
description: The 3 character ISO code for the currency.
type: string
example: usd
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
symbol:
description: The symbol used to indicate the currency.
type: string
example: $
symbol_native:
description: The native symbol used to indicate the currency.
type: string
example: $
name:
description: The written name of the currency
type: string
example: US Dollar
includes_tax:
description: Whether the currency prices include tax
type: boolean
x-featureFlag: tax_inclusive_pricing
default: false
@@ -1,68 +0,0 @@
title: Custom Shipping Option
description: >-
Custom Shipping Options are overridden Shipping Options. Admins can attach a
Custom Shipping Option to a cart in order to set a custom price for a
particular Shipping Option.
type: object
required:
- cart_id
- created_at
- deleted_at
- id
- metadata
- price
- shipping_option_id
- updated_at
properties:
id:
description: The custom shipping option's ID
type: string
example: cso_01G8X99XNB77DMFBJFWX6DN9V9
price:
description: >-
The custom price set that will override the shipping option's original
price
type: integer
example: 1000
shipping_option_id:
description: The ID of the Shipping Option that the custom shipping option overrides
type: string
example: so_01G1G5V27GYX4QXNARRQCW1N8T
shipping_option:
description: The details of the overridden shipping options.
x-expandable: shipping_option
nullable: true
$ref: ./ShippingOption.yaml
cart_id:
description: The ID of the Cart that the custom shipping option is attached to
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: The details of the cart this shipping option belongs to.
x-expandable: cart
nullable: true
$ref: ./Cart.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,94 +1,87 @@
title: Customer
description: A customer can make purchases in your store and manage their profile.
type: object
required:
- billing_address_id
- created_at
- deleted_at
- email
- first_name
- has_account
- id
- last_name
- metadata
- phone
- updated_at
description: The context's customer.
x-schemaName: Customer
properties:
id:
description: The customer's ID
type: string
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
title: id
description: The customer's ID.
email:
description: The customer's email
type: string
title: email
description: The customer's email.
format: email
default_billing_address_id:
type: string
title: default_billing_address_id
description: The customer's default billing address id.
default_shipping_address_id:
type: string
title: default_shipping_address_id
description: The customer's default shipping address id.
company_name:
type: string
title: company_name
description: The customer's company name.
first_name:
description: The customer's first name
nullable: true
type: string
example: Arno
title: first_name
description: The customer's first name.
last_name:
description: The customer's last name
nullable: true
type: string
example: Willms
billing_address_id:
description: The customer's billing address ID
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
billing_address:
description: The details of the billing address associated with the customer.
x-expandable: billing_address
nullable: true
$ref: ./Address.yaml
shipping_addresses:
description: The details of the shipping addresses associated with the customer.
title: last_name
description: The customer's last name.
addresses:
type: array
x-expandable: shipping_addresses
items:
$ref: ./Address.yaml
phone:
description: The customer's phone number
nullable: true
type: string
example: 16128234334802
has_account:
description: Whether the customer has an account or not
type: boolean
default: false
orders:
description: The details of the orders this customer placed.
type: array
x-expandable: orders
description: The customer's addresses.
items:
type: object
description: The address's addresses.
x-schemaName: CustomerAddress
properties: {}
phone:
type: string
title: phone
description: The customer's phone.
groups:
description: The customer groups the customer belongs to.
type: array
x-expandable: groups
description: The customer's groups.
items:
$ref: ./CustomerGroup.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
type: object
description: The group's groups.
properties: {}
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
description: The customer's metadata.
properties: {}
created_by:
type: string
title: created_by
description: The customer's created by.
deleted_at:
oneOf:
- type: string
title: deleted_at
description: The customer's deleted at.
- type: string
title: deleted_at
description: The customer's deleted at.
format: date-time
created_at:
oneOf:
- type: string
title: created_at
description: The customer's created at.
- type: string
title: created_at
description: The customer's created at.
format: date-time
updated_at:
oneOf:
- type: string
title: updated_at
description: The customer's updated at.
- type: string
title: updated_at
description: The customer's updated at.
format: date-time
@@ -0,0 +1,76 @@
type: object
description: SUMMARY
x-schemaName: CustomerAddress
properties:
id:
type: string
title: id
description: The customer's ID.
address_name:
type: string
title: address_name
description: The customer's address name.
is_default_shipping:
type: boolean
title: is_default_shipping
description: The customer's is default shipping.
is_default_billing:
type: boolean
title: is_default_billing
description: The customer's is default billing.
customer_id:
type: string
title: customer_id
description: The customer's customer id.
company:
type: string
title: company
description: The customer's company.
first_name:
type: string
title: first_name
description: The customer's first name.
last_name:
type: string
title: last_name
description: The customer's last name.
address_1:
type: string
title: address_1
description: The customer's address 1.
address_2:
type: string
title: address_2
description: The customer's address 2.
city:
type: string
title: city
description: The customer's city.
country_code:
type: string
title: country_code
description: The customer's country code.
province:
type: string
title: province
description: The customer's province.
postal_code:
type: string
title: postal_code
description: The customer's postal code.
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
properties: {}
created_at:
type: string
title: created_at
description: The customer's created at.
updated_at:
type: string
title: updated_at
description: The customer's updated at.
@@ -1,56 +0,0 @@
title: Customer Group
description: >-
A customer group that can be used to organize customers into groups of similar
traits.
type: object
required:
- created_at
- deleted_at
- id
- metadata
- name
- updated_at
properties:
id:
description: The customer group's ID
type: string
example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63
name:
description: The name of the customer group
type: string
example: VIP
customers:
description: The details of the customers that belong to the customer group.
type: array
x-expandable: customers
items:
type: object
price_lists:
description: The price lists that are associated with the customer group.
type: array
x-expandable: price_lists
items:
type: object
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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
@@ -0,0 +1,12 @@
type: object
description: SUMMARY
x-schemaName: CustomerGroupUpdatableFields
properties:
name:
type: string
title: name
description: The customer group's name.
metadata:
type: object
description: The customer group's metadata.
properties: {}
@@ -0,0 +1,10 @@
type: object
description: The customer id's customer ids.
x-schemaName: CustomerGroupsBatchCustomer
required:
- id
properties:
id:
type: string
title: id
description: The customer id's ID.
@@ -0,0 +1,29 @@
type: object
description: SUMMARY
x-schemaName: CustomerUpdatableFields
properties:
company_name:
type: string
title: company_name
description: The customer's company name.
first_name:
type: string
title: first_name
description: The customer's first name.
last_name:
type: string
title: last_name
description: The customer's last name.
email:
type: string
title: email
description: The customer's email.
format: email
phone:
type: string
title: phone
description: The customer's phone.
metadata:
type: object
description: The customer's metadata.
properties: {}
@@ -1,121 +0,0 @@
title: Discount
description: A discount can be applied to a cart for promotional purposes.
type: object
required:
- code
- created_at
- deleted_at
- ends_at
- id
- is_disabled
- is_dynamic
- metadata
- parent_discount_id
- rule_id
- starts_at
- updated_at
- usage_count
- usage_limit
- valid_duration
properties:
id:
description: The discount's ID
type: string
example: disc_01F0YESMW10MGHWJKZSDDMN0VN
code:
description: >-
A unique code for the discount - this will be used by the customer to
apply the discount
type: string
example: 10DISC
is_dynamic:
description: >-
A flag to indicate if multiple instances of the discount can be generated.
I.e. for newsletter discounts
type: boolean
example: false
rule_id:
description: >-
The ID of the discount rule that defines how the discount will be applied
to a cart.
nullable: true
type: string
example: dru_01F0YESMVK96HVX7N419E3CJ7C
rule:
description: >-
The details of the discount rule that defines how the discount will be
applied to a cart..
x-expandable: rule
nullable: true
$ref: ./DiscountRule.yaml
is_disabled:
description: >-
Whether the Discount has been disabled. Disabled discounts cannot be
applied to carts
type: boolean
example: false
parent_discount_id:
description: >-
The Discount that the discount was created from. This will always be a
dynamic discount
nullable: true
type: string
example: disc_01G8ZH853YPY9B94857DY91YGW
parent_discount:
description: The details of the parent discount that this discount was created from.
x-expandable: parent_discount
nullable: true
type: object
starts_at:
description: The time at which the discount can be used.
type: string
format: date-time
ends_at:
description: The time at which the discount can no longer be used.
nullable: true
type: string
format: date-time
valid_duration:
description: Duration the discount runs between
nullable: true
type: string
example: P3Y6M4DT12H30M5S
regions:
description: The details of the regions in which the Discount can be used.
type: array
x-expandable: regions
items:
$ref: ./Region.yaml
usage_limit:
description: The maximum number of times that a discount can be used.
nullable: true
type: integer
example: 100
usage_count:
description: The number of times a discount has been used.
type: integer
example: 50
default: 0
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,105 +0,0 @@
title: Discount Condition
description: Holds rule conditions for when a discount is applicable
type: object
required:
- created_at
- deleted_at
- discount_rule_id
- id
- metadata
- operator
- type
- updated_at
properties:
id:
description: The discount condition's ID
type: string
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
type:
description: >-
The type of the condition. The type affects the available resources
associated with the condition. For example, if the type is `products`,
that means the `products` relation will hold the products associated with
this condition and other relations will be empty.
type: string
enum:
- products
- product_types
- product_collections
- product_tags
- customer_groups
operator:
description: >-
The 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
discount_rule_id:
description: The ID of the discount rule associated with the condition
type: string
example: dru_01F0YESMVK96HVX7N419E3CJ7C
discount_rule:
description: The details of the discount rule associated with the condition.
x-expandable: discount_rule
nullable: true
$ref: ./DiscountRule.yaml
products:
description: products associated with this condition if `type` is `products`.
type: array
x-expandable: products
items:
$ref: ./Product.yaml
product_types:
description: Product types associated with this condition if `type` is `product_types`.
type: array
x-expandable: product_types
items:
$ref: ./ProductType.yaml
product_tags:
description: Product tags associated with this condition if `type` is `product_tags`.
type: array
x-expandable: product_tags
items:
$ref: ./ProductTag.yaml
product_collections:
description: >-
Product collections associated with this condition if `type` is
`product_collections`.
type: array
x-expandable: product_collections
items:
$ref: ./ProductCollection.yaml
customer_groups:
description: >-
Customer groups associated with this condition if `type` is
`customer_groups`.
type: array
x-expandable: customer_groups
items:
$ref: ./CustomerGroup.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,44 +0,0 @@
title: Product Tag Discount Condition
description: Associates a discount condition with a customer group
type: object
required:
- condition_id
- created_at
- customer_group_id
- metadata
- updated_at
properties:
customer_group_id:
description: The ID of the Product Tag
type: string
example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63
condition_id:
description: The ID of the Discount Condition
type: string
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
customer_group:
description: Available if the relation `customer_group` is expanded.
nullable: true
$ref: ./CustomerGroup.yaml
discount_condition:
description: Available if the relation `discount_condition` is expanded.
nullable: true
$ref: ./DiscountCondition.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,46 +0,0 @@
title: Product Discount Condition
description: This represents the association between a discount condition and a product
type: object
required:
- condition_id
- created_at
- metadata
- product_id
- updated_at
properties:
product_id:
description: The ID of the Product Tag
type: string
example: prod_01G1G5V2MBA328390B5AXJ610F
condition_id:
description: The ID of the Discount Condition
type: string
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
product:
description: The details of the product.
x-expandable: product
nullable: true
$ref: ./Product.yaml
discount_condition:
description: The details of the discount condition.
x-expandable: discount_condition
nullable: true
$ref: ./DiscountCondition.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,48 +0,0 @@
title: Product Collection Discount Condition
description: >-
This represents the association between a discount condition and a product
collection
type: object
required:
- condition_id
- created_at
- metadata
- product_collection_id
- updated_at
properties:
product_collection_id:
description: The ID of the Product Collection
type: string
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
condition_id:
description: The ID of the Discount Condition
type: string
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
product_collection:
description: The details of the product collection.
x-expandable: product_collection
nullable: true
$ref: ./ProductCollection.yaml
discount_condition:
description: The details of the discount condition.
x-expandable: discount_condition
nullable: true
$ref: ./DiscountCondition.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,46 +0,0 @@
title: Product Tag Discount Condition
description: This represents the association between a discount condition and a product tag
type: object
required:
- condition_id
- created_at
- metadata
- product_tag_id
- updated_at
properties:
product_tag_id:
description: The ID of the Product Tag
type: string
example: ptag_01F0YESHPZYY3H4SJ3A5918SBN
condition_id:
description: The ID of the Discount Condition
type: string
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
product_tag:
description: The details of the product tag.
x-expandable: product_tag
nullable: true
$ref: ./ProductTag.yaml
discount_condition:
description: The details of the discount condition.
x-expandable: discount_condition
nullable: true
$ref: ./DiscountCondition.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,48 +0,0 @@
title: Product Type Discount Condition
description: >-
This represents the association between a discount condition and a product
type
type: object
required:
- condition_id
- created_at
- metadata
- product_type_id
- updated_at
properties:
product_type_id:
description: The ID of the Product Tag
type: string
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
condition_id:
description: The ID of the Discount Condition
type: string
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
product_type:
description: The details of the product type.
x-expandable: product_type
nullable: true
$ref: ./ProductType.yaml
discount_condition:
description: The details of the discount condition.
x-expandable: discount_condition
nullable: true
$ref: ./DiscountCondition.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,79 +0,0 @@
title: Discount Rule
description: A discount rule defines how a Discount is calculated when applied to a Cart.
type: object
required:
- allocation
- created_at
- deleted_at
- description
- id
- metadata
- type
- updated_at
- value
properties:
id:
description: The discount rule's ID
type: string
example: dru_01F0YESMVK96HVX7N419E3CJ7C
type:
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.
type: string
enum:
- fixed
- percentage
- free_shipping
example: percentage
description:
description: A short description of the discount
nullable: true
type: string
example: 10 Percent
value:
description: >-
The value that the discount represents; this will depend on the type of
the discount
type: integer
example: 10
allocation:
description: The scope that the discount should apply to.
nullable: true
type: string
enum:
- total
- item
example: total
conditions:
description: >-
The details of the discount conditions associated with the rule. They can
be used to limit when the discount can be used.
type: array
x-expandable: conditions
items:
type: object
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,103 +0,0 @@
title: DraftOrder
description: >-
A draft order is created by an admin without direct involvement of the
customer. Once its payment is marked as captured, it is transformed into an
order.
type: object
required:
- canceled_at
- cart_id
- completed_at
- created_at
- display_id
- id
- idempotency_key
- metadata
- no_notification_order
- order_id
- status
- updated_at
properties:
id:
description: The draft order's ID
type: string
example: dorder_01G8TJFKBG38YYFQ035MSVG03C
status:
description: >-
The status of the draft order. It's changed to `completed` when it's
transformed to an order.
type: string
enum:
- open
- completed
default: open
display_id:
description: The draft order's display ID
type: string
example: 2
cart_id:
description: The ID of the cart associated with the draft order.
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: The details of the cart associated with the draft order.
x-expandable: cart
nullable: true
type: object
order_id:
description: >-
The ID of the order created from the draft order when its payment is
captured.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: >-
The details of the order created from the draft order when its payment is
captured.
x-expandable: order
nullable: true
type: object
canceled_at:
description: The date the draft order was canceled at.
nullable: true
type: string
format: date-time
completed_at:
description: The date the draft order was completed at.
nullable: true
type: string
format: date-time
no_notification_order:
description: Whether to send the customer notifications regarding order updates.
nullable: true
type: boolean
example: false
idempotency_key:
description: >-
Randomly generated key used to continue the completion of the cart
associated with the draft order in case of failure.
nullable: true
type: string
externalDocs:
url: https://docs.medusajs.com/development/idempotency-key/overview.md
description: Learn more how to use the idempotency key.
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,21 +0,0 @@
allOf:
- $ref: ./Store.yaml
- type: object
required:
- payment_providers
- fulfillment_providers
- feature_flags
- modules
properties:
payment_providers:
description: The store's payment providers.
$ref: ./PaymentProvider.yaml
fulfillment_providers:
description: The store's fulfillment providers.
$ref: ./FulfillmentProvider.yaml
feature_flags:
description: The feature flags enabled in the store's backend.
$ref: ./FeatureFlagsResponse.yaml
modules:
description: The modules installed in the store's backend.
$ref: ./ModulesResponse.yaml
@@ -1,13 +0,0 @@
type: array
items:
type: object
required:
- key
- value
properties:
key:
description: The key of the feature flag.
type: string
value:
description: The value of the feature flag.
type: boolean
@@ -1,151 +0,0 @@
title: Fulfillment
description: >-
A Fulfillment is created once an admin can prepare the purchased goods.
Fulfillments will eventually be shipped and hold information about how to
track shipments. Fulfillments are created through a fulfillment provider,
which typically integrates a third-party shipping service. Fulfillments can be
associated with orders, claims, swaps, and returns.
type: object
required:
- canceled_at
- claim_order_id
- created_at
- data
- id
- idempotency_key
- location_id
- metadata
- no_notification
- order_id
- provider_id
- shipped_at
- swap_id
- tracking_numbers
- updated_at
properties:
id:
description: The fulfillment's ID
type: string
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
claim_order_id:
description: The ID of the Claim that the Fulfillment belongs to.
nullable: true
type: string
example: null
claim_order:
description: The details of the claim that the fulfillment may belong to.
x-expandable: claim_order
nullable: true
type: object
swap_id:
description: The ID of the Swap that the Fulfillment belongs to.
nullable: true
type: string
example: null
swap:
description: The details of the swap that the fulfillment may belong to.
x-expandable: swap
nullable: true
type: object
order_id:
description: The ID of the Order that the Fulfillment belongs to.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: The details of the order that the fulfillment may belong to.
x-expandable: order
nullable: true
type: object
provider_id:
description: >-
The ID of the Fulfillment Provider responsible for handling the
fulfillment.
type: string
example: manual
provider:
description: >-
The details of the fulfillment provider responsible for handling the
fulfillment.
x-expandable: provider
nullable: true
$ref: ./FulfillmentProvider.yaml
location_id:
description: The ID of the stock location the fulfillment will be shipped from
nullable: true
type: string
example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK
items:
description: >-
The Fulfillment Items in the Fulfillment. These hold information about how
many of each Line Item has been fulfilled.
type: array
x-expandable: items
items:
$ref: ./FulfillmentItem.yaml
tracking_links:
description: >-
The Tracking Links that can be used to track the status of the
Fulfillment. These will usually be provided by the Fulfillment Provider.
type: array
x-expandable: tracking_links
items:
$ref: ./TrackingLink.yaml
tracking_numbers:
description: >-
The tracking numbers that can be used to track the status of the
fulfillment.
deprecated: true
type: array
items:
type: string
data:
description: >-
This contains all the data necessary for the Fulfillment provider to
handle the fulfillment.
type: object
example: {}
shipped_at:
description: The date with timezone at which the Fulfillment was shipped.
nullable: true
type: string
format: date-time
no_notification:
description: >-
Flag for describing whether or not notifications related to this should be
sent.
nullable: true
type: boolean
example: false
canceled_at:
description: The date with timezone at which the Fulfillment was canceled.
nullable: true
type: string
format: date-time
idempotency_key:
description: >-
Randomly generated key used to continue the completion of the fulfillment
in case of failure.
nullable: true
type: string
externalDocs:
url: https://docs.medusajs.com/development/idempotency-key/overview.md
description: Learn more how to use the idempotency key.
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
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,30 +0,0 @@
title: Fulfillment Item
description: This represents the association between a Line Item and a Fulfillment.
type: object
required:
- fulfillment_id
- item_id
- quantity
properties:
fulfillment_id:
description: The ID of the Fulfillment that the Fulfillment Item belongs to.
type: string
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
item_id:
description: The ID of the Line Item that the Fulfillment Item references.
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
fulfillment:
description: The details of the fulfillment.
x-expandable: fulfillment
nullable: true
type: object
item:
description: The details of the line item.
x-expandable: item
nullable: true
$ref: ./LineItem.yaml
quantity:
description: The quantity of the Line Item that is included in the Fulfillment.
type: integer
example: 1
@@ -1,21 +0,0 @@
title: Fulfillment Provider
description: >-
A fulfillment provider represents a fulfillment service installed in the
Medusa backend, either through a plugin or backend customizations. It holds
the fulfillment service's installation status.
type: object
required:
- id
- is_installed
properties:
id:
description: The ID of the fulfillment provider as given by the fulfillment service.
type: string
example: manual
is_installed:
description: >-
Whether the fulfillment service is installed in the current version. If a
fulfillment service is no longer installed, the `is_installed` attribute
is set to `false`.
type: boolean
default: true
@@ -1,96 +0,0 @@
title: Gift Card
description: >-
Gift Cards are redeemable and represent a value that can be used towards the
payment of an Order.
type: object
required:
- balance
- code
- created_at
- deleted_at
- ends_at
- id
- is_disabled
- metadata
- order_id
- region_id
- tax_rate
- updated_at
- value
properties:
id:
description: The gift card's ID
type: string
example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ
code:
description: >-
The unique code that identifies the Gift Card. This is used by the
Customer to redeem the value of the Gift Card.
type: string
example: 3RFT-MH2C-Y4YZ-XMN4
value:
description: The value that the Gift Card represents.
type: integer
example: 10
balance:
description: The remaining value on the Gift Card.
type: integer
example: 10
region_id:
description: The ID of the region this gift card is available in.
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: The details of the region this gift card is available in.
x-expandable: region
nullable: true
$ref: ./Region.yaml
order_id:
description: The ID of the order that the gift card was purchased in.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: The details of the order that the gift card was purchased in.
x-expandable: region
nullable: true
type: object
is_disabled:
description: >-
Whether the Gift Card has been disabled. Disabled Gift Cards cannot be
applied to carts.
type: boolean
default: false
ends_at:
description: The time at which the Gift Card can no longer be used.
nullable: true
type: string
format: date-time
tax_rate:
description: The gift card's tax rate that will be applied on calculating totals
nullable: true
type: number
example: 0
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
description: The date with timezone at which the resource was updated.
type: string
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,54 +0,0 @@
title: Gift Card Transaction
description: >-
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
their Order.
type: object
required:
- amount
- created_at
- gift_card_id
- id
- is_taxable
- order_id
- tax_rate
properties:
id:
description: The gift card transaction's ID
type: string
example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A
gift_card_id:
description: The ID of the Gift Card that was used in the transaction.
type: string
example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ
gift_card:
description: The details of the gift card associated used in this transaction.
x-expandable: gift_card
nullable: true
type: object
order_id:
description: The ID of the order that the gift card was used for payment.
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: The details of the order that the gift card was used for payment.
x-expandable: order
nullable: true
type: object
amount:
description: The amount that was used from the Gift Card.
type: integer
example: 10
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
is_taxable:
description: Whether the transaction is taxable or not.
nullable: true
type: boolean
example: false
tax_rate:
description: The tax rate of the transaction
nullable: true
type: number
example: 0
@@ -0,0 +1,10 @@
type: object
description: The promotion's promotions.
x-schemaName: IdObject
required:
- id
properties:
id:
type: string
title: id
description: The promotion's ID.
@@ -1,69 +0,0 @@
title: Idempotency Key
description: >-
Idempotency Key is used to continue a process in case of any failure that
might occur.
type: object
required:
- created_at
- id
- idempotency_key
- locked_at
- recovery_point
- response_code
- response_body
- request_method
- request_params
- request_path
properties:
id:
description: The idempotency key's ID
type: string
example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A
idempotency_key:
description: >-
The unique randomly generated key used to determine the state of a
process.
type: string
externalDocs:
url: https://docs.medusajs.com/development/idempotency-key/overview.md
description: Learn more how to use the idempotency key.
created_at:
description: Date which the idempotency key was locked.
type: string
format: date-time
locked_at:
description: Date which the idempotency key was locked.
nullable: true
type: string
format: date-time
request_method:
description: The method of the request
nullable: true
type: string
example: POST
request_params:
description: The parameters passed to the request
nullable: true
type: object
example:
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
request_path:
description: The request's path
nullable: true
type: string
example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete
response_code:
description: The response's code.
nullable: true
type: string
example: 200
response_body:
description: The response's body
nullable: true
type: object
example:
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
recovery_point:
description: Where to continue from.
type: string
default: started

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