chore(docs): Generated API Reference (#3262)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-02-14 20:32:28 +02:00
committed by GitHub
parent 67f9429293
commit 4fb22e8ba5
122 changed files with 8682 additions and 3866 deletions

View File

@@ -9,32 +9,52 @@ description: >-
Fulfillments.
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
description: The cart's ID
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: A claim order object. Available if the relation `claim_order` is expanded.
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: A swap object. Available if the relation `swap` is expanded.
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: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
provider_id:
description: >-
@@ -42,13 +62,15 @@ properties:
fulfillment
type: string
example: manual
location_id:
description: The id of the stock location the fulfillment will be shipped from
type: string
example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK
provider:
description: Available if the relation `provider` is expanded.
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
@@ -66,10 +88,10 @@ properties:
items:
$ref: ./TrackingLink.yaml
tracking_numbers:
deprecated: true
description: >-
The tracking numbers that can be used to track the status of the
fulfillment.
deprecated: true
type: array
items:
type: string
@@ -81,41 +103,42 @@ properties:
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
send.
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:
type: string
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/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -18,9 +18,11 @@ properties:
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
fulfillment:
description: A fulfillment object. Available if the relation `fulfillment` is expanded.
type: object
nullable: true
$ref: ./Fulfillment.yaml
item:
description: Available if the relation `item` is expanded.
nullable: true
$ref: ./LineItem.yaml
quantity:
description: The quantity of the Line Item that is included in the Fulfillment.

View File

@@ -1,6 +1,9 @@
title: Fulfillment Provider
description: Represents a fulfillment provider plugin and holds its installation status.
type: object
required:
- id
- is_installed
properties:
id:
description: The id of the fulfillment provider as given by the plugin.
@@ -12,4 +15,4 @@ properties:
no longer installed are not deleted by will have this field set to
`false`.
type: boolean
example: true
default: true

View File

@@ -4,14 +4,23 @@ description: >-
payment of an Order.
type: object
required:
- code
- value
- 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
description: The cart's ID
example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ
code:
description: >-
@@ -28,47 +37,54 @@ properties:
type: integer
example: 10
region_id:
type: string
description: The id of the Region in which the Gift Card is available.
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: A region object. Available if the relation `region` is expanded.
type: object
nullable: true
$ref: ./Region.yaml
order_id:
type: string
description: The id of the Order that the Gift Card was purchased in.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
is_disabled:
description: >-
Whether the Gift Card has been disabled. Disabled Gift Cards cannot be
applied to carts.
type: boolean
example: false
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 cards's tax rate that will be applied on calculating totals
description: The gift card's tax rate that will be applied on calculating totals
nullable: true
type: number
example: 0
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,12 +4,17 @@ description: >-
their Order
type: object
required:
- gift_card_id
- amount
- created_at
- gift_card_id
- id
- is_taxable
- order_id
- tax_rate
properties:
id:
type: string
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.
@@ -17,6 +22,7 @@ properties:
example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ
gift_card:
description: A gift card object. Available if the relation `gift_card` is expanded.
nullable: true
type: object
order_id:
description: The ID of the Order that the Gift Card was used to pay for.
@@ -24,6 +30,7 @@ properties:
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
amount:
description: The amount that was used from the Gift Card.
@@ -35,9 +42,11 @@ properties:
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

View File

@@ -4,11 +4,20 @@ description: >-
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:
type: string
description: The idempotency key's ID
type: string
example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A
idempotency_key:
description: >-
@@ -25,31 +34,37 @@ properties:
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:
type: object
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:
type: string
description: The response's code.
nullable: true
type: string
example: 200
response_body:
type: object
description: The response's body
nullable: true
type: object
example:
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
recovery_point:
type: string
description: Where to continue from.
type: string
default: started

View File

@@ -2,6 +2,11 @@ title: Image
description: Images holds a reference to a URL at which the image file can be found.
type: object
required:
- created_at
- deleted_at
- id
- metadata
- updated_at
- url
properties:
id:
@@ -13,19 +18,21 @@ properties:
type: string
format: uri
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,6 +2,15 @@ title: Invite
description: Represents an invite
type: object
required:
- accepted
- created_at
- deleted_at
- expires_at
- id
- metadata
- role
- token
- updated_at
- user_email
properties:
id:
@@ -9,42 +18,45 @@ properties:
description: The invite's ID
example: invite_01G8TKE4XYCTHSCK2GDEP47RE1
user_email:
type: string
description: The email of the user being invited.
type: string
format: email
role:
type: string
description: The user's role.
nullable: true
type: string
enum:
- admin
- member
- developer
default: member
accepted:
type: boolean
description: Whether the invite was accepted or not.
example: false
type: boolean
default: false
token:
type: string
description: The token used to accept the invite.
expores_at:
type: string
expires_at:
description: The date the invite expires at.
type: string
format: date-time
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -6,41 +6,70 @@ description: >-
may also be created when processing Swaps and Claims.
type: object
required:
- allow_discounts
- cart_id
- claim_order_id
- created_at
- description
- fulfilled_quantity
- has_shipping
- id
- is_giftcard
- is_return
- metadata
- order_edit_id
- order_id
- original_item_id
- quantity
- returned_quantity
- shipped_quantity
- should_merge
- swap_id
- thumbnail
- title
- unit_price
- quantity
- updated_at
- variant_id
properties:
id:
description: The line item's ID
type: string
description: The cart's ID
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
cart_id:
description: The ID of the Cart that the Line Item belongs to.
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
nullable: true
type: object
order_id:
description: The ID of the Order that the Line Item belongs to.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
swap_id:
description: The id of the Swap that the Line Item belongs to.
nullable: true
type: string
example: null
swap:
description: A swap object. Available if the relation `swap` is expanded.
nullable: true
type: object
claim_order_id:
description: The id of the Claim that the Line Item belongs to.
nullable: true
type: string
example: null
claim_order:
description: A claim order object. Available if the relation `claim_order` is expanded.
nullable: true
type: object
tax_lines:
description: Available if the relation `tax_lines` is expanded.
@@ -52,6 +81,18 @@ properties:
type: array
items:
$ref: ./LineItemAdjustment.yaml
original_item_id:
description: The id of the original line item
nullable: true
type: string
order_edit_id:
description: The ID of the order edit to which a cloned item belongs
nullable: true
type: string
order_edit:
description: The order edit joined. Available if the relation `order_edit` is expanded.
nullable: true
type: object
title:
description: >-
The title of the Line Item, this should be easily identifiable by the
@@ -60,35 +101,38 @@ properties:
example: Medusa Coffee Mug
description:
description: A more detailed description of the contents of the Line Item.
nullable: true
type: string
example: One Size
thumbnail:
description: A URL string to a small image of the contents of the Line Item.
nullable: true
type: string
format: uri
example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png
is_return:
description: Is the item being returned
type: boolean
example: false
default: false
is_giftcard:
description: Flag to indicate if the Line Item is a Gift Card.
type: boolean
example: false
default: false
should_merge:
description: >-
Flag to indicate if new Line Items with the same variant should be merged
or added as an additional Line Item.
type: boolean
example: false
default: true
allow_discounts:
description: >-
Flag to indicate if the Line Item should be included when doing discount
calculations.
type: boolean
example: false
default: true
has_shipping:
description: Flag to indicate if the Line Item has fulfillment associated with it.
nullable: true
type: boolean
example: false
unit_price:
@@ -96,31 +140,36 @@ properties:
The price of one unit of the content in the Line Item. This should be in
the currency defined by the Cart/Order/Swap/Claim that the Line Item
belongs to.
type: boolean
type: integer
example: 8000
variant_id:
description: The id of the Product Variant contained in the Line Item.
nullable: true
type: string
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
variant:
description: >-
A product variant object. The Product Variant contained in the Line Item.
Available if the relation `variant` is expanded.
type: object
nullable: true
$ref: ./ProductVariant.yaml
quantity:
description: The quantity of the content in the Line Item.
type: integer
example: 1
fulfilled_quantity:
description: The quantity of the Line Item that has been fulfilled.
nullable: true
type: integer
example: 0
returned_quantity:
description: The quantity of the Line Item that has been returned.
nullable: true
type: integer
example: 0
shipped_quantity:
description: The quantity of the Line Item that has been shipped.
nullable: true
type: integer
example: 0
refundable:
@@ -130,55 +179,48 @@ properties:
type: integer
example: 0
subtotal:
type: integer
description: The subtotal of the line item
type: integer
example: 8000
tax_total:
type: integer
description: The total of tax of the line item
type: integer
example: 0
total:
type: integer
description: The total amount of the line item
type: integer
example: 8000
original_total:
type: integer
description: The original total amount of the line item
type: integer
example: 8000
original_tax_total:
type: integer
description: The original tax total amount of the line item
type: integer
example: 0
discount_total:
type: integer
description: The total of discount of the line item
type: integer
example: 0
gift_card_total:
type: integer
description: The total of the gift card of the line item
type: integer
example: 0
includes_tax:
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
type: boolean
original_item_id:
description: '[EXPERIMENTAL] The id of the original line item'
type: string
order_edit_id:
description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs'
type: string
order_edit:
description: '[EXPERIMENTAL] The order edit joined'
type: object
default: false
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,38 +2,45 @@ title: Line Item Adjustment
description: Represents a Line Item Adjustment
type: object
required:
- item_id
- description
- amount
- description
- discount_id
- id
- item_id
- metadata
properties:
id:
description: The Line Item Adjustment's ID
type: string
description: The invite's ID
example: lia_01G8TKE4XYCTHSCK2GDEP47RE1
item_id:
type: string
description: The ID of the line item
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
item:
description: Available if the relation `item` is expanded.
nullable: true
$ref: ./LineItem.yaml
description:
type: string
description: The line item's adjustment description
type: string
example: Adjusted item's price.
discount_id:
type: string
description: The ID of the discount associated with the adjustment
nullable: true
type: string
example: disc_01F0YESMW10MGHWJKZSDDMN0VN
discount:
description: Available if the relation `discount` is expanded.
nullable: true
$ref: ./Discount.yaml
amount:
type: number
description: The adjustment amount
type: integer
example: 1000
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,23 +2,22 @@ title: Line Item Tax Line
description: Represents a Line Item Tax Line
type: object
required:
- code
- created_at
- id
- item_id
- rate
- metadata
- name
- rate
- updated_at
properties:
id:
type: string
description: The line item tax line's ID
example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
item_id:
type: string
description: The ID of the line item
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
item:
description: Available if the relation `item` is expanded.
$ref: ./LineItem.yaml
example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
code:
description: A code to identify the tax type by
nullable: true
type: string
example: tax01
name:
@@ -29,16 +28,25 @@ properties:
description: The numeric rate to charge tax by
type: number
example: 10
created_at:
item_id:
description: The ID of the line item
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
item:
description: Available if the relation `item` is expanded.
nullable: true
$ref: ./LineItem.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -7,12 +7,21 @@ description: >-
the amount will be in the currency defined for the Reigon.
type: object
required:
- currency_code
- amount
- created_at
- currency_code
- deleted_at
- id
- max_quantity
- min_quantity
- price_list_id
- region_id
- updated_at
- variant_id
properties:
id:
type: string
description: The money amount's ID
type: string
example: ma_01F0YESHRFQNH5S8Q0PK84YYZN
currency_code:
description: The 3 character currency code that the Money Amount is given in.
@@ -23,6 +32,7 @@ properties:
description: See a list of codes.
currency:
description: Available if the relation `currency` is expanded.
nullable: true
$ref: ./Currency.yaml
amount:
description: >-
@@ -34,51 +44,55 @@ properties:
description: >-
The minimum quantity that the Money Amount applies to. If this value is
not set, the Money Amount applies to all quantities.
nullable: true
type: integer
example: 1
max_quantity:
description: >-
The maximum quantity that the Money Amount applies to. If this value is
not set, the Money Amount applies to all quantities.
nullable: true
type: integer
example: 1
price_list_id:
type: string
description: The ID of the price list associated with the money amount
nullable: true
type: string
example: pl_01G8X3CKJXCG5VXVZ87H9KC09W
price_list:
description: Available if the relation `price_list` is expanded.
nullable: true
$ref: ./PriceList.yaml
variant_id:
description: The id of the Product Variant contained in the Line Item.
nullable: true
type: string
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
variant:
description: >-
The Product Variant contained in the Line Item. Available if the relation
`variant` is expanded.
type: object
nullable: true
$ref: ./ProductVariant.yaml
region_id:
type: string
description: The region's ID
nullable: true
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: A region object. Available if the relation `region` is expanded.
type: object
nullable: true
$ref: ./Region.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
example:
car: white

View File

@@ -4,13 +4,19 @@ description: >-
allow users to describe additional information in relation to these.
type: object
required:
- value
- resource_type
- author_id
- created_at
- deleted_at
- id
- metadata
- resource_id
- resource_type
- updated_at
- value
properties:
id:
type: string
description: The note's ID
type: string
example: note_01G8TM8ENBMC7R90XRR1G6H26Q
resource_type:
description: The type of resource that the Note refers to.
@@ -25,26 +31,30 @@ properties:
type: string
example: This order must be fulfilled on Monday
author_id:
type: string
description: The ID of the author (user)
nullable: true
type: string
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
author:
description: Available if the relation `author` is expanded.
nullable: true
$ref: ./User.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -6,16 +6,25 @@ description: >-
Order, and enables resends.
type: object
required:
- created_at
- customer_id
- data
- event_name
- id
- parent_id
- provider_id
- resource_type
- resource_id
- to
- updated_at
properties:
id:
type: string
description: The notification's ID
type: string
example: noti_01G53V9Y6CKMCGBM1P0X7C28RX
event_name:
description: The name of the event that the notification was sent for.
nullable: true
type: string
example: order.placed
resource_type:
@@ -28,11 +37,13 @@ properties:
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
customer_id:
description: The ID of the Customer that the Notification was sent to.
nullable: true
type: string
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
customer:
description: A customer object. Available if the relation `customer` is expanded.
type: object
nullable: true
$ref: ./Customer.yaml
to:
description: >-
The address that the Notification was sent to. This will usually be an
@@ -45,23 +56,36 @@ properties:
necessary for the Notification Provider to initiate a resend.
type: object
example: {}
parent_id:
description: The notification's parent ID
nullable: true
type: string
example: noti_01G53V9Y6CKMCGBM1P0X7C28RX
parent_notification:
description: Available if the relation `parent_notification` is expanded.
nullable: true
$ref: ./Notification.yaml
resends:
description: The resends that have been completed after the original Notification.
description: >-
The resends that have been completed after the original Notification.
Available if the relation `resends` is expanded.
type: array
items:
$ref: ./NotificationResend.yaml
$ref: ./Notification.yaml
provider_id:
description: The id of the Notification Provider that handles the Notification.
nullable: true
type: string
example: sengrid
provider:
description: Available if the relation `provider` is expanded.
nullable: true
$ref: ./NotificationProvider.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time

View File

@@ -3,6 +3,7 @@ description: Represents a notification provider plugin and holds its installatio
type: object
required:
- id
- is_installed
properties:
id:
description: The id of the notification provider as given by the plugin.

View File

@@ -1,61 +0,0 @@
title: Notification Resend
description: A resend of a Notification.
type: object
properties:
id:
description: The notification resend's ID
type: string
example: noti_01F0YET45G9NHP08Z66CE4QKBS
event_name:
description: The name of the event that the notification was sent for.
type: string
example: order.placed
resource_type:
description: The type of resource that the Notification refers to.
type: string
example: order
resource_id:
description: The ID of the resource that the Notification refers to.
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
customer_id:
description: The ID of the Customer that the Notification was sent to.
type: string
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
customer:
description: A customer object. Available if the relation `customer` is expanded.
type: object
to:
description: >-
The address that the Notification was sent to. This will usually be an
email address, but represent other addresses such as a chat bot user id
type: string
example: user@example.com
data:
description: >-
The data that the Notification was sent with. This contains all the data
necessary for the Notification Provider to initiate a resend.
type: object
example: {}
parent_id:
description: The ID of the Notification that was originally sent.
type: string
example: noti_01G53V9Y6CKMCGBM1P0X7C28RX
parent_notification:
description: Available if the relation `parent_notification` is expanded.
$ref: ./Notification.yaml
provider_id:
description: The ID of the Notification Provider that handles the Notification.
type: string
example: sengrid
provider:
description: Available if the relation `provider` is expanded.
$ref: ./NotificationProvider.yaml
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

View File

@@ -2,31 +2,37 @@ title: OAuth
description: Represent an OAuth app
type: object
required:
- id
- display_name
- application_name
- data
- display_name
- id
- install_url
- uninstall_url
properties:
id:
type: string
description: The app's ID
type: string
example: example_app
display_name:
type: string
description: The app's display name
type: string
example: Example app
application_name:
type: string
description: The app's name
type: string
example: example
install_url:
type: string
description: The URL to install the app
nullable: true
type: string
format: uri
uninstall_url:
type: string
description: The URL to uninstall the app
nullable: true
type: string
format: uri
data:
type: object
description: Any data necessary to the app.
nullable: true
type: object
example: {}

View File

@@ -2,18 +2,36 @@ title: Order
description: Represents an order
type: object
required:
- customer_id
- email
- region_id
- billing_address_id
- canceled_at
- cart_id
- created_at
- currency_code
- customer_id
- draft_order_id
- display_id
- email
- external_id
- fulfillment_status
- id
- idempotency_key
- metadata
- no_notification
- object
- payment_status
- region_id
- shipping_address_id
- status
- tax_rate
- updated_at
properties:
id:
type: string
description: The order's ID
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
status:
type: string
description: The order's status
type: string
enum:
- pending
- completed
@@ -22,8 +40,8 @@ properties:
- requires_action
default: pending
fulfillment_status:
type: string
description: The order's fulfillment status
type: string
enum:
- not_fulfilled
- partially_fulfilled
@@ -36,60 +54,68 @@ properties:
- requires_action
default: not_fulfilled
payment_status:
type: string
description: The order's payment status
type: string
enum:
- not_paid
- awaiting
- captured
- partially_refunded
- refuneded
- refunded
- canceled
- requires_action
default: not_paid
display_id:
type: integer
description: The order's display ID
type: integer
example: 2
cart_id:
type: string
description: The ID of the cart associated with the order
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
nullable: true
type: object
customer_id:
type: string
description: The ID of the customer associated with the order
type: string
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
customer:
description: A customer object. Available if the relation `customer` is expanded.
nullable: true
type: object
email:
description: The email associated with the order
type: string
format: email
billing_address_id:
type: string
description: The ID of the billing address associated with the order
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
billing_address:
description: Available if the relation `billing_address` is expanded.
nullable: true
$ref: ./Address.yaml
shipping_address_id:
type: string
description: The ID of the shipping address associated with the order
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
shipping_address:
description: Available if the relation `shipping_address` is expanded.
nullable: true
$ref: ./Address.yaml
region_id:
type: string
description: The region's ID
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: A region object. Available if the relation `region` is expanded.
type: object
nullable: true
$ref: ./Region.yaml
currency_code:
description: The 3 character currency code that is used in the order
type: string
@@ -99,177 +125,195 @@ properties:
description: See a list of codes.
currency:
description: Available if the relation `currency` is expanded.
nullable: true
$ref: ./Currency.yaml
tax_rate:
description: The order's tax rate
nullable: true
type: number
example: 0
discounts:
type: array
description: >-
The discounts used in the order. Available if the relation `discounts` is
expanded.
items:
type: object
description: A discount object.
gift_cards:
type: array
items:
$ref: ./Discount.yaml
gift_cards:
description: >-
The gift cards used in the order. Available if the relation `gift_cards`
is expanded.
items:
type: object
description: A gift card object.
shipping_methods:
type: array
items:
$ref: ./GiftCard.yaml
shipping_methods:
description: >-
The shipping methods used in the order. Available if the relation
`shipping_methods` is expanded.
type: array
items:
$ref: ./ShippingMethod.yaml
payments:
type: array
description: >-
The payments used in the order. Available if the relation `payments` is
expanded.
type: array
items:
type: object
fulfillments:
type: array
description: >-
The fulfillments used in the order. Available if the relation
`fulfillments` is expanded.
type: array
items:
type: object
returns:
type: array
description: >-
The returns associated with the order. Available if the relation `returns`
is expanded.
type: array
items:
type: object
description: A return object.
claims:
type: array
description: >-
The claims associated with the order. Available if the relation `claims`
is expanded.
type: array
items:
type: object
description: A claim order object.
refunds:
type: array
description: >-
The refunds associated with the order. Available if the relation `refunds`
is expanded.
type: array
items:
type: object
description: A refund object.
swaps:
type: array
description: >-
The swaps associated with the order. Available if the relation `swaps` is
expanded.
type: array
items:
type: object
description: A swap object.
draft_order_id:
type: string
description: The ID of the draft order this order is associated with.
nullable: true
type: string
example: null
draft_order:
description: A draft order object. Available if the relation `draft_order` is expanded.
nullable: true
type: object
items:
type: array
description: >-
The line items that belong to the order. Available if the relation `items`
is expanded.
type: array
items:
$ref: ./LineItem.yaml
edits:
type: array
description: >-
[EXPERIMENTAL] Order edits done on the order. Available if the relation
`edits` is expanded.
Order edits done on the order. Available if the relation `edits` is
expanded.
type: array
items:
type: object
gift_card_transactions:
type: array
description: >-
The gift card transactions used in the order. Available if the relation
`gift_card_transactions` is expanded.
type: array
items:
$ref: ./GiftCardTransaction.yaml
canceled_at:
type: string
description: The date the order was canceled on.
nullable: true
type: string
format: date-time
no_notification:
description: >-
Flag for describing whether or not notifications related to this should be
send.
nullable: true
type: boolean
example: false
idempotency_key:
type: string
description: >-
Randomly generated key used to continue the processing of the order in
case of failure.
nullable: true
type: string
externalDocs:
url: >-
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
external_id:
description: The ID of an external order.
nullable: true
type: string
example: null
sales_channel_id:
type: string
description: The ID of the sales channel this order is associated with.
nullable: true
type: string
example: null
sales_channel:
description: >-
A sales channel object. Available if the relation `sales_channel` is
expanded.
type: object
nullable: true
$ref: ./SalesChannel.yaml
shipping_total:
type: integer
description: The total of shipping
example: 1000
discount_total:
type: integer
description: The total of discount
type: integer
example: 800
tax_total:
type: integer
description: The total of tax
type: integer
example: 0
refunded_total:
type: integer
description: The total amount refunded if the order is returned.
type: integer
example: 0
total:
type: integer
description: The total amount of the order
type: integer
example: 8200
subtotal:
type: integer
description: The subtotal of the order
type: integer
example: 8000
paid_total:
type: integer
description: The total amount paid
type: integer
example: 8000
refundable_amount:
type: integer
description: The amount that can be refunded
type: integer
example: 8200
gift_card_total:
type: integer
description: The total of gift cards
type: integer
example: 0
gift_card_tax_total:
type: integer
description: The total of gift cards with taxes
type: integer
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
metadata:
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,99 +2,132 @@ title: Order Edit
description: Order edit keeps track of order items changes.
type: object
required:
- order_id
- order
- changes
- canceled_at
- canceled_by
- confirmed_by
- confirmed_at
- created_at
- created_by
- declined_at
- declined_by
- declined_reason
- id
- internal_note
- order_id
- payment_collection_id
- requested_at
- requested_by
- status
- updated_at
properties:
id:
type: string
description: The order edit's ID
type: string
example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK
order_id:
type: string
description: The ID of the order that is edited
type: string
example: order_01G2SG30J8C85S4A5CHM2S1NS2
order:
description: Available if the relation `order` is expanded.
nullable: true
type: object
changes:
type: array
description: Available if the relation `changes` is expanded.
type: array
items:
$ref: ./OrderItemChange.yaml
internal_note:
description: An optional note with additional details about the order edit.
nullable: true
type: string
example: Included two more items B to the order.
created_by:
type: string
description: The unique identifier of the user or customer who created the order edit.
requested_by:
type: string
requested_by:
description: >-
The unique identifier of the user or customer who requested the order
edit.
requested_at:
nullable: true
type: string
requested_at:
description: The date with timezone at which the edit was requested.
nullable: true
type: string
format: date-time
confirmed_by:
type: string
description: >-
The unique identifier of the user or customer who confirmed the order
edit.
confirmed_at:
nullable: true
type: string
confirmed_at:
description: The date with timezone at which the edit was confirmed.
nullable: true
type: string
format: date-time
declined_by:
type: string
description: The unique identifier of the user or customer who declined the order edit.
declined_at:
nullable: true
type: string
declined_at:
description: The date with timezone at which the edit was declined.
nullable: true
type: string
format: date-time
declined_reason:
description: An optional note why the order edit is declined.
nullable: true
type: string
canceled_by:
description: >-
The unique identifier of the user or customer who cancelled the order
edit.
nullable: true
type: string
canceled_at:
description: The date with timezone at which the edit was cancelled.
nullable: true
type: string
format: date-time
subtotal:
type: integer
description: The total of subtotal
type: integer
example: 8000
discount_total:
type: integer
description: The total of discount
type: integer
example: 800
shipping_total:
type: integer
description: The total of the shipping amount
type: integer
example: 800
gift_card_total:
type: integer
description: The total of the gift card amount
type: integer
example: 800
gift_card_tax_total:
type: integer
description: The total of the gift card tax amount
type: integer
example: 800
tax_total:
type: integer
description: The total of tax
type: integer
example: 0
total:
type: integer
description: The total amount of the edited order.
type: integer
example: 8200
difference_due:
type: integer
description: >-
The difference between the total amount of the order and total amount of
edited order.
type: integer
example: 8200
status:
type: string
description: The status of the order edit.
type: string
enum:
- confirmed
- declined
@@ -102,22 +135,24 @@ properties:
- created
- canceled
items:
type: array
description: Available if the relation `items` is expanded.
type: array
items:
$ref: ./LineItem.yaml
payment_collection_id:
type: string
description: The ID of the payment collection
nullable: true
type: string
example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
payment_collection:
description: Available if the relation `payment_collection` is expanded.
nullable: true
$ref: ./PaymentCollection.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time

View File

@@ -2,55 +2,62 @@ title: Order Item Change
description: Represents an order edit item change
type: object
required:
- type
- created_at
- deleted_at
- id
- line_item_id
- order_edit_id
- original_line_item_id
- type
- updated_at
properties:
id:
type: string
description: The order item change's ID
type: string
example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK
type:
type: string
description: The order item change's status
type: string
enum:
- item_add
- item_remove
- item_update
order_edit_id:
type: string
description: The ID of the order edit
type: string
example: oe_01G2SG30J8C85S4A5CHM2S1NS2
order_edit:
description: Available if the relation `order_edit` is expanded.
nullable: true
$ref: ./OrderEdit.yaml
original_line_item_id:
type: string
description: The ID of the original line item in the order
nullable: true
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
original_line_item:
description: Available if the relation `original_line_item` is expanded.
nullable: true
$ref: ./LineItem.yaml
line_item_id:
type: string
description: The ID of the cloned line item.
nullable: true
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
line_item:
description: Available if the relation `line_item` is expanded.
nullable: true
$ref: ./LineItem.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
example:
car: white

View File

@@ -5,32 +5,50 @@ description: >-
type: object
required:
- amount
- amount_refunded
- canceled_at
- captured_at
- cart_id
- created_at
- currency_code
- data
- id
- idempotency_key
- metadata
- order_id
- provider_id
- swap_id
- updated_at
properties:
id:
type: string
description: The payment's ID
type: string
example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE
swap_id:
description: The ID of the Swap that the Payment is used for.
nullable: true
type: string
example: null
swap:
description: A swap object. Available if the relation `swap` is expanded.
nullable: true
type: object
cart_id:
description: The id of the Cart that the Payment Session is created for.
nullable: true
type: string
cart:
description: A cart object. Available if the relation `cart` is expanded.
nullable: true
type: object
order_id:
description: The ID of the Order that the Payment is used for.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
amount:
description: The amount that the Payment has been authorized for.
@@ -45,12 +63,14 @@ properties:
description: See a list of codes.
currency:
description: Available if the relation `currency` is expanded.
nullable: true
$ref: ./Currency.yaml
amount_refunded:
description: >-
The amount of the original Payment amount that has been refunded back to
the Customer.
type: integer
default: 0
example: 0
provider_id:
description: The id of the Payment Provider that is responsible for the Payment
@@ -66,31 +86,35 @@ properties:
example: {}
captured_at:
description: The date with timezone at which the Payment was captured.
nullable: true
type: string
format: date-time
canceled_at:
description: The date with timezone at which the Payment was canceled.
nullable: true
type: string
format: date-time
idempotency_key:
type: string
description: >-
Randomly generated key used to continue the completion of a payment in
case of failure.
nullable: true
type: string
externalDocs:
url: >-
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,25 +2,32 @@ title: Payment Collection
description: Payment Collection
type: object
required:
- type
- status
- amount
- region_id
- currency_code
- authorized_amount
- created_at
- created_by
- currency_code
- deleted_at
- description
- id
- metadata
- region_id
- status
- type
- updated_at
properties:
id:
type: string
description: The payment collection's ID
type: string
example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
type:
type: string
description: The type of the payment collection
type: string
enum:
- order_edit
status:
type: string
description: The type of the payment collection
type: string
enum:
- not_paid
- awaiting
@@ -28,20 +35,23 @@ properties:
- partially_authorized
- canceled
description:
type: string
description: Description of the payment collection
amount:
type: number
description: Amount of the payment collection.
authorized_amount:
type: number
description: Authorized amount of the payment collection.
region_id:
nullable: true
type: string
amount:
description: Amount of the payment collection.
type: integer
authorized_amount:
description: Authorized amount of the payment collection.
nullable: true
type: integer
region_id:
description: The region's ID
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: Available if the relation `region` is expanded.
nullable: true
$ref: ./Region.yaml
currency_code:
description: The 3 character ISO code for the currency.
@@ -52,34 +62,37 @@ properties:
description: See a list of codes.
currency:
description: Available if the relation `currency` is expanded.
nullable: true
$ref: ./Currency.yaml
payment_sessions:
type: array
description: Available if the relation `payment_sessions` is expanded.
type: array
items:
$ref: ./PaymentSession.yaml
payments:
type: array
description: Available if the relation `payments` is expanded.
type: array
items:
$ref: ./Payment.yaml
created_by:
type: string
description: The ID of the user that created the payment collection.
created_at:
type: string
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -3,6 +3,7 @@ description: Represents a Payment Provider plugin and holds its installation sta
type: object
required:
- id
- is_installed
properties:
id:
description: The id of the payment provider as given by the plugin.

View File

@@ -8,21 +8,32 @@ description: >-
capture/refunds/etc.
type: object
required:
- amount
- cart_id
- created_at
- data
- id
- is_initiated
- is_selected
- idempotency_key
- payment_authorized_at
- provider_id
- status
- updated_at
properties:
id:
type: string
description: The payment session's ID
type: string
example: ps_01G901XNSRM2YS3ASN9H5KG3FZ
cart_id:
description: The id of the Cart that the Payment Session is created for.
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
type: object
nullable: true
$ref: ./Cart.yaml
provider_id:
description: The id of the Payment Provider that is responsible for the Payment Session
type: string
@@ -31,6 +42,7 @@ properties:
description: >-
A flag to indicate if the Payment Session has been selected as the method
that will be used to complete the purchase.
nullable: true
type: boolean
example: true
is_initiated:
@@ -38,8 +50,8 @@ properties:
A flag to indicate if a communication with the third party provider has
been initiated.
type: boolean
example: true
default: false
example: true
status:
description: >-
Indicates the status of the Payment Session. Will default to `pending`,
@@ -63,19 +75,30 @@ properties:
type: object
example: {}
idempotency_key:
type: string
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/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
created_at:
amount:
description: The amount that the Payment Session has been authorized for.
nullable: true
type: integer
example: 100
payment_authorized_at:
description: The date with timezone at which the Payment Session was authorized.
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:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time

View File

@@ -4,20 +4,28 @@ description: >-
one or more product variants.
type: object
required:
- name
- created_at
- deleted_at
- description
- ends_at
- id
- name
- starts_at
- status
- type
- updated_at
properties:
id:
type: string
description: The price list's ID
type: string
example: pl_01G8X3CKJXCG5VXVZ87H9KC09W
name:
type: string
description: The price list's name
type: string
example: VIP Prices
description:
type: string
description: The price list's description
type: string
example: Prices for VIP customers
type:
description: The type of Price List. This can be one of either `sale` or `override`.
@@ -35,10 +43,12 @@ properties:
default: draft
starts_at:
description: The date with timezone that the Price List starts being valid.
nullable: true
type: string
format: date-time
ends_at:
description: The date with timezone that the Price List stops being valid.
nullable: true
type: string
format: date-time
customer_groups:
@@ -47,29 +57,28 @@ properties:
relation `customer_groups` is expanded.
type: array
items:
type: object
description: A customer group object.
$ref: ./CustomerGroup.yaml
prices:
description: >-
The Money Amounts that are associated with the Price List. Available if
the relation `prices` is expanded.
type: array
items:
oneOf:
- $ref: ./MoneyAmount.yaml
- $ref: ./CustomerGroup.yaml
$ref: ./MoneyAmount.yaml
includes_tax:
description: '[EXPERIMENTAL] Does the price list prices include tax'
type: boolean
default: false
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time

View File

@@ -5,12 +5,35 @@ description: >-
the properties that Product Variants differ by.
type: object
required:
- title
- collection_id
- created_at
- deleted_at
- description
- discountable
- external_id
- handle
- height
- hs_code
- id
- is_giftcard
- length
- material
- metadata
- mid_code
- origin_country
- profile_id
- status
- subtitle
- type_id
- thumbnail
- title
- updated_at
- weight
- width
properties:
id:
type: string
description: The product's ID
type: string
example: prod_01G1G5V2MBA328390B5AXJ610F
title:
description: A title that can be displayed for easy identification of the Product.
@@ -18,13 +41,16 @@ properties:
example: Medusa Coffee Mug
subtitle:
description: An optional subtitle that can be used to further specify the Product.
nullable: true
type: string
description:
description: A short description of the Product.
nullable: true
type: string
example: Every programmer's best friend.
handle:
description: A unique identifier for the Product (e.g. for slug structure).
nullable: true
type: string
example: coffee-mug
is_giftcard:
@@ -50,6 +76,7 @@ properties:
$ref: ./Image.yaml
thumbnail:
description: A URL to an image file that can be used to identify the Product.
nullable: true
type: string
format: uri
options:
@@ -68,6 +95,13 @@ properties:
type: array
items:
$ref: ./ProductVariant.yaml
categories:
description: >-
The product's associated categories. Available if the relation
`categories` are expanded.
type: array
items:
$ref: ./ProductCategory.yaml
profile_id:
description: >-
The ID of the Shipping Profile that the Product belongs to. Shipping
@@ -77,41 +111,48 @@ properties:
example: sp_01G1G5V239ENSZ5MV4JAR737BM
profile:
description: Available if the relation `profile` is expanded.
nullable: true
$ref: ./ShippingProfile.yaml
weight:
description: >-
The weight of the Product Variant. May be used in shipping rate
calculations.
type: number
example: null
height:
description: >-
The height of the Product Variant. May be used in shipping rate
calculations.
type: number
example: null
width:
description: >-
The width of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
length:
description: >-
The length of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
height:
description: >-
The height of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
width:
description: >-
The width of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
hs_code:
description: >-
The Harmonized System code of the Product Variant. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
nullable: true
type: string
example: null
origin_country:
description: >-
The country in which the Product Variant was produced. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
nullable: true
type: string
example: null
mid_code:
@@ -119,6 +160,7 @@ properties:
The Manufacturers Identification code that identifies the manufacturer of
the Product Variant. May be used by Fulfillment Providers to pass customs
information to shipping carriers.
nullable: true
type: string
example: null
material:
@@ -126,23 +168,28 @@ properties:
The material and composition that the Product Variant is made of, May be
used by Fulfillment Providers to pass customs information to shipping
carriers.
nullable: true
type: string
example: null
collection_id:
type: string
description: The Product Collection that the Product belongs to
nullable: true
type: string
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
collection:
description: >-
A product collection object. Available if the relation `collection` is
expanded.
type: object
nullable: true
$ref: ./ProductCollection.yaml
type_id:
type: string
description: The Product type that the Product belongs to
nullable: true
type: string
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
type:
description: Available if the relation `type` is expanded.
nullable: true
$ref: ./ProductType.yaml
tags:
description: >-
@@ -159,6 +206,7 @@ properties:
default: true
external_id:
description: The external ID of the product
nullable: true
type: string
example: null
sales_channels:
@@ -167,30 +215,23 @@ properties:
relation `sales_channels` is expanded.
type: array
items:
type: object
description: A sales channel object.
categories:
description: >-
The product's associated categories. Available if the relation
`categories` is expanded.
type: array
items:
type: object
description: A category object.
$ref: ./SalesChannel.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -3,25 +3,38 @@ description: Represents a product category
x-resourceId: ProductCategory
type: object
required:
- category_children
- created_at
- deleted_at
- handle
- id
- is_active
- is_internal
- mpath
- name
- parent_category_id
- updated_at
properties:
id:
type: string
description: The product category's ID
type: string
example: pcat_01G2SG30J8C85S4A5CHM2S1NS2
name:
type: string
description: The product category's name
type: string
example: Regular Fit
handle:
description: 'A unique string that identifies the Category - example: slug structures.'
description: >-
A unique string that identifies the Product Category - can for example be
used in slug structures.
type: string
example: regular-fit
mpath:
type: string
description: >-
A string for Materialized Paths - used for finding ancestors and
descendents
nullable: true
type: string
example: pcat_id1.pcat_id2.pcat_id3
is_internal:
type: boolean
@@ -35,34 +48,35 @@ properties:
description: Available if the relation `category_children` are expanded.
type: array
items:
type: object
description: A product category object.
$ref: ./ProductCategory.yaml
parent_category_id:
description: The ID of the parent category.
nullable: true
type: string
default: null
parent_category:
description: >-
A product category object. Available if the relation `parent_category` is
expanded.
type: object
nullable: true
$ref: ./ProductCategory.yaml
products:
description: >-
products associated with category. Available if the relation `products` is
Products associated with category. Available if the relation `products` is
expanded.
type: array
items:
type: object
description: A product object.
$ref: ./Product.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time

View File

@@ -2,11 +2,17 @@ title: Product Collection
description: Product Collections represents a group of Products that are related.
type: object
required:
- created_at
- deleted_at
- handle
- id
- metadata
- title
- updated_at
properties:
id:
type: string
description: The product collection's ID
type: string
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
title:
description: The title that the Product Collection is identified by.
@@ -16,6 +22,7 @@ properties:
description: >-
A unique string that identifies the Product Collection - can for example
be used in slug structures.
nullable: true
type: string
example: summer-collection
products:
@@ -24,22 +31,23 @@ properties:
relation `products` is expanded.
type: array
items:
type: object
description: A product collection object.
$ref: ./Product.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -5,15 +5,20 @@ description: >-
limit what Product Options that can be defined.
type: object
required:
- title
- created_at
- deleted_at
- id
- metadata
- product_id
- title
- updated_at
properties:
id:
type: string
description: The product option's ID
type: string
example: opt_01F0YESHQBZVKCEXJ24BS6PCX3
title:
description: The title that the Product Option is defined by (e.g. "Size").
description: The title that the Product Option is defined by (e.g. `Size`).
type: string
example: Size
values:
@@ -29,21 +34,24 @@ properties:
example: prod_01G1G5V2MBA328390B5AXJ610F
product:
description: A product object. Available if the relation `product` is expanded.
type: object
nullable: true
$ref: ./Product.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,19 +4,24 @@ description: >-
Product Option Value for each of the Product Options defined on the Product.
type: object
required:
- value
- created_at
- deleted_at
- id
- metadata
- option_id
- updated_at
- value
- variant_id
properties:
id:
type: string
description: The product option value's ID
type: string
example: optval_01F0YESHR7S6ECD03RF6W12DSJ
value:
description: >-
The value that the Product Variant has defined for the specific Product
Option (e.g. if the Product Option is "Size" this value could be "Small",
"Medium" or "Large").
Option (e.g. if the Product Option is \"Size\" this value could be
`Small`, `Medium` or `Large`).
type: string
example: large
option_id:
@@ -25,6 +30,7 @@ properties:
example: opt_01F0YESHQBZVKCEXJ24BS6PCX3
option:
description: Available if the relation `option` is expanded.
nullable: true
$ref: ./ProductOption.yaml
variant_id:
description: >-
@@ -34,21 +40,24 @@ properties:
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
variant:
description: Available if the relation `variant` is expanded.
nullable: true
$ref: ./ProductVariant.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,30 +2,37 @@ title: Product Tag
description: Product Tags can be added to Products for easy filtering and grouping.
type: object
required:
- created_at
- deleted_at
- id
- metadata
- updated_at
- value
properties:
id:
type: string
description: The product tag's ID
type: string
example: ptag_01G8K2MTMG9168F2B70S1TAVK3
value:
description: The value that the Product Tag represents
type: string
example: Pants
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,8 +4,11 @@ description: >-
a certain way
type: object
required:
- created_at
- metadata
- product_id
- rate_id
- updated_at
properties:
product_id:
description: The ID of the Product
@@ -13,6 +16,7 @@ properties:
example: prod_01G1G5V2MBA328390B5AXJ610F
product:
description: Available if the relation `product` is expanded.
nullable: true
$ref: ./Product.yaml
rate_id:
description: The ID of the Tax Rate
@@ -20,17 +24,19 @@ properties:
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
tax_rate:
description: Available if the relation `tax_rate` is expanded.
nullable: true
$ref: ./TaxRate.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,30 +2,37 @@ title: Product Type
description: Product Type can be added to Products for filtering and reporting purposes.
type: object
required:
- created_at
- deleted_at
- id
- metadata
- updated_at
- value
properties:
id:
type: string
description: The product type's ID
type: string
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
value:
description: The value that the Product Type represents.
type: string
example: Clothing
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,8 +4,11 @@ description: >-
taxed in a certain way
type: object
required:
- created_at
- metadata
- product_type_id
- rate_id
- updated_at
properties:
product_type_id:
description: The ID of the Product type
@@ -13,6 +16,7 @@ properties:
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
product_type:
description: Available if the relation `product_type` is expanded.
nullable: true
$ref: ./ProductType.yaml
rate_id:
description: The id of the Tax Rate
@@ -20,17 +24,19 @@ properties:
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
tax_rate:
description: Available if the relation `tax_rate` is expanded.
nullable: true
$ref: ./TaxRate.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -5,13 +5,32 @@ description: >-
is given by the number of available Product Option combinations.
type: object
required:
- title
- product_id
- allow_backorder
- barcode
- created_at
- deleted_at
- ean
- height
- hs_code
- id
- inventory_quantity
- length
- manage_inventory
- material
- metadata
- mid_code
- origin_country
- product_id
- sku
- title
- upc
- updated_at
- weight
- width
properties:
id:
type: string
description: The product variant's ID
type: string
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
title:
description: >-
@@ -25,7 +44,8 @@ properties:
example: prod_01G1G5V2MBA328390B5AXJ610F
product:
description: A product object. Available if the relation `product` is expanded.
type: object
nullable: true
$ref: ./Product.yaml
prices:
description: >-
The Money Amounts defined for the Product Variant. Each Money Amount
@@ -39,24 +59,29 @@ properties:
The unique stock keeping unit used to identify the Product Variant. This
will usually be a unqiue identifer for the item that is to be shipped, and
can be referenced across multiple systems.
nullable: true
type: string
example: shirt-123
barcode:
description: >-
A generic field for a GTIN number that can be used to identify the Product
Variant.
nullable: true
type: string
example: null
ean:
description: An EAN barcode number that can be used to identify the Product Variant.
nullable: true
type: string
example: null
upc:
description: A UPC barcode number that can be used to identify the Product Variant.
nullable: true
type: string
example: null
variant_rank:
description: The ranking of this variant
nullable: true
type: number
default: 0
inventory_quantity:
@@ -77,12 +102,14 @@ properties:
description: >-
The Harmonized System code of the Product Variant. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
nullable: true
type: string
example: null
origin_country:
description: >-
The country in which the Product Variant was produced. May be used by
Fulfillment Providers to pass customs information to shipping carriers.
nullable: true
type: string
example: null
mid_code:
@@ -90,6 +117,7 @@ properties:
The Manufacturers Identification code that identifies the manufacturer of
the Product Variant. May be used by Fulfillment Providers to pass customs
information to shipping carriers.
nullable: true
type: string
example: null
material:
@@ -97,30 +125,35 @@ properties:
The material and composition that the Product Variant is made of, May be
used by Fulfillment Providers to pass customs information to shipping
carriers.
nullable: true
type: string
example: null
weight:
description: >-
The weight of the Product Variant. May be used in shipping rate
calculations.
type: number
example: null
height:
description: >-
The height of the Product Variant. May be used in shipping rate
calculations.
type: number
example: null
width:
description: >-
The width of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
length:
description: >-
The length of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
height:
description: >-
The height of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
width:
description: >-
The width of the Product Variant. May be used in shipping rate
calculations.
nullable: true
type: number
example: null
options:
@@ -130,20 +163,29 @@ properties:
type: array
items:
$ref: ./ProductOptionValue.yaml
inventory_items:
description: >-
The Inventory Items related to the product variant. Available if the
relation `inventory_items` is expanded.
type: array
items:
$ref: ./ProductVariantInventoryItem.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -3,10 +3,18 @@ description: >-
Product Variant Inventory Items link variants with inventory items and denote
the number of inventory items constituting a variant.
type: object
required:
- created_at
- deleted_at
- id
- inventory_item_id
- required_quantity
- updated_at
- variant_id
properties:
id:
type: string
description: The product variant inventory item's ID
type: string
example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A
inventory_item_id:
description: The id of the inventory item
@@ -14,6 +22,10 @@ properties:
variant_id:
description: The id of the variant.
type: string
variant:
description: A ProductVariant object. Available if the relation `variant` is expanded.
nullable: true
$ref: ./ProductVariant.yaml
required_quantity:
description: >-
The quantity of an inventory item required for one quantity of the
@@ -21,14 +33,15 @@ properties:
type: integer
default: 1
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time

View File

@@ -3,34 +3,42 @@ description: >-
Publishable API key defines scopes (i.e. resources) that are available within
a request.
type: object
required:
- created_at
- created_by
- id
- revoked_by
- revoked_at
- title
- updated_at
properties:
id:
type: string
description: The key's ID
type: string
example: pk_01G1G5V27GYX4QXNARRQCW1N8T
created_by:
type: string
description: The unique identifier of the user that created the key.
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
created_by_user:
description: A user object. Available if the relation `created_by_user` is expanded.
type: object
created_at:
nullable: true
type: string
description: The date with timezone at which the resource was created.
format: date-time
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
revoked_by:
type: string
description: The unique identifier of the user that revoked the key.
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
revoked_by_user:
description: A user object. Available if the relation `revoked_by_user` is expanded.
type: object
revoked_at:
nullable: true
type: string
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
revoked_at:
description: The date with timezone at which the key was revoked.
nullable: true
type: string
format: date-time
title:
description: The key's title.
type: string
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time

View File

@@ -1,12 +1,15 @@
title: Publishable API key sales channel
description: Holds mapping between Publishable API keys and Sales Channels
type: object
required:
- publishable_key_id
- sales_channel_id
properties:
sales_channel_id:
type: string
description: The sales channel's ID
type: string
example: sc_01G1G5V21KADXNGH29BJMAJ4B4
publishable_key_id:
type: string
description: The publishable API key's ID
type: string
example: pak_01G1G5V21KADXNGH29BJMAJ4B4

View File

@@ -5,23 +5,46 @@ description: >-
can also be initiated by a store operator.
type: object
required:
- order_id
- amount
- created_at
- id
- idempotency_key
- metadata
- note
- order_id
- payment_id
- reason
- updated_at
properties:
id:
type: string
description: The refund's ID
type: string
example: ref_01G1G5V27GYX4QXNARRQCW1N8T
order_id:
description: The id of the Order that the Refund is related to.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
payment_id:
description: The payment's ID if available
nullable: true
type: string
example: pay_01G8ZCC5W42ZNY842124G7P5R9
payment:
description: Available if the relation `payment` is expanded.
nullable: true
type: object
amount:
description: The amount that has be refunded to the Customer.
type: integer
example: 1000
note:
description: An optional note explaining why the amount was refunded.
nullable: true
type: string
example: I didn't like it
reason:
@@ -37,28 +60,26 @@ properties:
- other
example: return
idempotency_key:
type: string
description: >-
Randomly generated key used to continue the completion of the refund in
case of failure.
nullable: true
type: string
externalDocs:
url: >-
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -6,13 +6,22 @@ description: >-
countries.
type: object
required:
- name
- automatic_taxes
- created_at
- currency_code
- deleted_at
- gift_cards_taxable
- id
- metadata
- name
- tax_code
- tax_provider_id
- tax_rate
- updated_at
properties:
id:
type: string
description: The region's ID
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
name:
description: >-
@@ -29,6 +38,7 @@ properties:
description: See a list of codes.
currency:
description: Available if the relation `currency` is expanded.
nullable: true
$ref: ./Currency.yaml
tax_rate:
description: The tax rate that should be charged on purchases in the Region.
@@ -45,6 +55,7 @@ properties:
description: >-
The tax code used on purchases in the Region. This may be used by other
systems for accounting purposes.
nullable: true
type: string
example: null
gift_cards_taxable:
@@ -63,11 +74,13 @@ properties:
items:
$ref: ./Country.yaml
tax_provider_id:
type: string
description: The ID of the tax provider used in this region
nullable: true
type: string
example: null
tax_provider:
description: Available if the relation `tax_provider` is expanded.
nullable: true
$ref: ./TaxProvider.yaml
payment_providers:
description: >-
@@ -79,27 +92,30 @@ properties:
fulfillment_providers:
description: >-
The Fulfillment Providers that can be used to fulfill orders in the
Region. Available if the relation `payment_providers` is expanded.
Region. Available if the relation `fulfillment_providers` is expanded.
type: array
items:
$ref: ./FulfillmentProvider.yaml
includes_tax:
description: '[EXPERIMENTAL] Does the prices for the region include tax'
type: boolean
default: false
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -5,11 +5,24 @@ description: >-
of a Swap.
type: object
required:
- claim_order_id
- created_at
- id
- idempotency_key
- location_id
- metadata
- no_notification
- order_id
- received_at
- refund_amount
- shipping_data
- status
- swap_id
- updated_at
properties:
id:
type: string
description: The return's ID
type: string
example: ret_01F0YET7XPCMF8RZ0Y151NZV2V
status:
description: Status of the Return.
@@ -29,70 +42,85 @@ properties:
$ref: ./ReturnItem.yaml
swap_id:
description: The ID of the Swap that the Return is a part of.
nullable: true
type: string
example: null
swap:
description: A swap object. Available if the relation `swap` is expanded.
type: object
order_id:
description: The ID of the Order that the Return is made from.
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
claim_order_id:
description: The ID of the Claim that the Return is a part of.
nullable: true
type: string
example: null
claim_order:
description: A claim order object. Available if the relation `claim_order` is expanded.
nullable: true
type: object
order_id:
description: The ID of the Order that the Return is made from.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
shipping_method:
description: >-
The Shipping Method that will be used to send the Return back. Can be null
if the Customer facilitates the return shipment themselves. Available if
the relation `shipping_method` is expanded.
type: array
items:
$ref: ./ShippingMethod.yaml
nullable: true
$ref: ./ShippingMethod.yaml
shipping_data:
description: >-
Data about the return shipment as provided by the Fulfilment Provider that
handles the return shipment.
nullable: true
type: object
example: {}
location_id:
description: The id of the stock location the return will be added back.
nullable: true
type: string
example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK
refund_amount:
description: The amount that should be refunded as a result of the return.
type: integer
example: 1000
no_notification:
description: When set to true, no notification will be sent related to this return.
nullable: true
type: boolean
example: false
idempotency_key:
type: string
description: >-
Randomly generated key used to continue the completion of the return in
case of failure.
nullable: true
type: string
externalDocs:
url: >-
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
received_at:
description: The date with timezone at which the return was received.
nullable: true
type: string
format: date-time
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,22 +4,31 @@ description: >-
Line Item that will be returned.
type: object
required:
- return_id
- is_requested
- item_id
- metadata
- note
- quantity
- reason_id
- received_quantity
- requested_quantity
- return_id
properties:
return_id:
description: The id of the Return that the Return Item belongs to.
type: string
example: ret_01F0YET7XPCMF8RZ0Y151NZV2V
return_order:
description: Available if the relation `return_order` is expanded.
$ref: ./Return.yaml
item_id:
description: The id of the Line Item that the Return Item references.
type: string
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
return_order:
description: Available if the relation `return_order` is expanded.
nullable: true
$ref: ./Return.yaml
item:
description: Available if the relation `item` is expanded.
nullable: true
$ref: ./LineItem.yaml
quantity:
description: The quantity of the Line Item that is included in the Return.
@@ -33,25 +42,31 @@ properties:
default: true
requested_quantity:
description: The quantity that was originally requested to be returned.
nullable: true
type: integer
example: 1
recieved_quantity:
received_quantity:
description: The quantity that was received in the warehouse.
nullable: true
type: integer
example: 1
reason_id:
description: The ID of the reason for returning the item.
nullable: true
type: string
example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ
reason:
description: Available if the relation `reason` is expanded.
nullable: true
$ref: ./ReturnReason.yaml
note:
description: An optional note with additional details about the Return.
nullable: true
type: string
example: I didn't like it.
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,49 +4,61 @@ description: >-
Return Items in order to indicate why a Line Item was returned.
type: object
required:
- value
- created_at
- deleted_at
- description
- id
- label
- metadata
- parent_return_reason_id
- updated_at
- value
properties:
id:
description: The return reason's ID
type: string
description: The cart's ID
example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ
description:
description: A description of the Reason.
type: string
example: Items that are damaged
label:
description: A text that can be displayed to the Customer as a reason.
type: string
example: Damaged goods
value:
description: The value to identify the reason by.
type: string
example: damaged
parent_return_reason_id:
label:
description: A text that can be displayed to the Customer as a reason.
type: string
example: Damaged goods
description:
description: A description of the Reason.
nullable: true
type: string
example: Items that are damaged
parent_return_reason_id:
description: The ID of the parent reason.
nullable: true
type: string
example: null
parent_return_reason:
description: Available if the relation `parent_return_reason` is expanded.
nullable: true
$ref: ./ReturnReason.yaml
return_reason_children:
description: Available if the relation `return_reason_children` is expanded.
$ref: ./ReturnReason.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,11 +2,17 @@ title: Sales Channel
description: A Sales Channel
type: object
required:
- created_at
- deleted_at
- description
- id
- is_disabled
- name
- updated_at
properties:
id:
type: string
description: The sales channel's ID
type: string
example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A
name:
description: The name of the sales channel.
@@ -14,21 +20,30 @@ properties:
example: Market
description:
description: The description of the sales channel.
nullable: true
type: string
example: Multi-vendor market
is_disabled:
description: Specify if the sales channel is enabled or disabled.
type: boolean
default: false
locations:
description: >-
The Stock Locations related to the sales channel. Available if the
relation `locations` is expanded.
type: array
items:
$ref: ./SalesChannelLocation.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time

View File

@@ -0,0 +1,41 @@
title: Sales Channel Stock Location
description: Sales Channel Stock Location link sales channels with stock locations.
type: object
required:
- created_at
- deleted_at
- id
- location_id
- sales_channel_id
- updated_at
properties:
id:
description: The Sales Channel Stock Location's ID
type: string
example: scloc_01G8X9A7ESKAJXG2H0E6F1MW7A
sales_channel_id:
description: The id of the Sales Channel
type: string
example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A
location_id:
description: The id of the Location Stock.
type: string
sales_channel:
description: >-
The sales channel the location is associated with. Available if the
relation `sales_channel` is expanded.
nullable: true
$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

View File

@@ -6,58 +6,76 @@ description: >-
shipment.
type: object
required:
- shipping_option_id
- cart_id
- claim_order_id
- data
- id
- order_id
- price
- return_id
- shipping_option_id
- swap_id
properties:
id:
type: string
description: The shipping method's ID
type: string
example: sm_01F0YET7DR2E7CYVSDHM593QG2
shipping_option_id:
description: The id of the Shipping Option that the Shipping Method is built from.
type: string
example: so_01G1G5V27GYX4QXNARRQCW1N8T
shipping_option:
description: Available if the relation `shipping_option` is expanded.
$ref: ./ShippingOption.yaml
order_id:
description: The id of the Order that the Shipping Method is used on.
nullable: true
type: string
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
type: object
return_id:
description: The id of the Return that the Shipping Method is used on.
type: string
example: null
return_order:
description: A return object. Available if the relation `return_order` is expanded.
type: object
swap_id:
description: The id of the Swap that the Shipping Method is used on.
type: string
example: null
swap:
description: A swap object. Available if the relation `swap` is expanded.
type: object
cart_id:
description: The id of the Cart that the Shipping Method is used on.
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
nullable: true
type: object
claim_order_id:
description: The id of the Claim that the Shipping Method is used on.
nullable: true
type: string
example: null
claim_order:
description: A claim order object. Available if the relation `claim_order` is expanded.
nullable: true
type: object
cart_id:
description: The id of the Cart that the Shipping Method is used on.
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
nullable: true
type: object
swap_id:
description: The id of the Swap that the Shipping Method is used on.
nullable: true
type: string
example: null
swap:
description: A swap object. Available if the relation `swap` is expanded.
nullable: true
type: object
return_id:
description: The id of the Return that the Shipping Method is used on.
nullable: true
type: string
example: null
return_order:
description: A return object. Available if the relation `return_order` is expanded.
nullable: true
type: object
shipping_option:
description: Available if the relation `shipping_option` is expanded.
nullable: true
$ref: ./ShippingOption.yaml
tax_lines:
type: array
description: Available if the relation `tax_lines` is expanded.
type: array
items:
$ref: ./ShippingMethodTaxLine.yaml
price:
@@ -77,3 +95,16 @@ properties:
includes_tax:
description: '[EXPERIMENTAL] Indicates if the shipping method price include tax'
type: boolean
default: false
subtotal:
description: The subtotal of the shipping
type: integer
example: 8000
total:
description: The total amount of the shipping
type: integer
example: 8200
tax_total:
description: The total of tax
type: integer
example: 0

View File

@@ -2,23 +2,22 @@ title: Shipping Method Tax Line
description: Shipping Method Tax Line
type: object
required:
- code
- created_at
- id
- shipping_method_id
- rate
- metadata
- name
- rate
- updated_at
properties:
id:
type: string
description: The line item tax line's ID
example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
shipping_method_id:
type: string
description: The ID of the line item
example: sm_01F0YET7DR2E7CYVSDHM593QG2
shipping_method:
description: Available if the relation `shipping_method` is expanded.
$ref: ./ShippingMethod.yaml
example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
code:
description: A code to identify the tax type by
nullable: true
type: string
example: tax01
name:
@@ -29,16 +28,25 @@ properties:
description: The numeric rate to charge tax by
type: number
example: 10
created_at:
shipping_method_id:
description: The ID of the line item
type: string
example: sm_01F0YET7DR2E7CYVSDHM593QG2
shipping_method:
description: Available if the relation `shipping_method` is expanded.
nullable: true
$ref: ./ShippingMethod.yaml
created_at:
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -8,15 +8,24 @@ description: >-
additional information.
type: object
required:
- admin_only
- amount
- created_at
- data
- deleted_at
- id
- is_return
- metadata
- name
- region_id
- price_type
- profile_id
- provider_id
- price_type
- region_id
- updated_at
properties:
id:
type: string
description: The shipping option's ID
type: string
example: so_01G1G5V27GYX4QXNARRQCW1N8T
name:
description: >-
@@ -25,12 +34,13 @@ properties:
type: string
example: PostFake Standard
region_id:
type: string
description: The region's ID
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: A region object. Available if the relation `region` is expanded.
type: object
nullable: true
$ref: ./Region.yaml
profile_id:
description: >-
The ID of the Shipping Profile that the shipping option belongs to.
@@ -40,6 +50,7 @@ properties:
example: sp_01G1G5V239ENSZ5MV4JAR737BM
profile:
description: Available if the relation `profile` is expanded.
nullable: true
$ref: ./ShippingProfile.yaml
provider_id:
description: >-
@@ -49,6 +60,7 @@ properties:
example: manual
provider:
description: Available if the relation `provider` is expanded.
nullable: true
$ref: ./FulfillmentProvider.yaml
price_type:
description: >-
@@ -64,12 +76,19 @@ properties:
description: >-
The amount to charge for shipping when the Shipping Option price type is
`flat_rate`.
nullable: true
type: integer
example: 200
is_return:
description: Flag to indicate if the Shipping Option can be used for Return shipments.
type: boolean
default: false
admin_only:
description: >-
Flag to indicate if the Shipping Option usage is restricted to admin
users.
type: boolean
default: false
requirements:
description: >-
The requirements that must be satisfied for the Shipping Option to be
@@ -87,20 +106,23 @@ properties:
includes_tax:
description: '[EXPERIMENTAL] Does the shipping option price include tax'
type: boolean
default: false
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,13 +4,15 @@ description: >-
to the Cart.
type: object
required:
- amount
- deleted_at
- id
- shipping_option_id
- type
- amount
properties:
id:
type: string
description: The shipping option requirement's ID
type: string
example: sor_01G1G5V29AB4CTNDRFSRWSRKWD
shipping_option_id:
description: >-
@@ -20,6 +22,7 @@ properties:
example: so_01G1G5V27GYX4QXNARRQCW1N8T
shipping_option:
description: Available if the relation `shipping_option` is expanded.
nullable: true
$ref: ./ShippingOption.yaml
type:
description: >-
@@ -38,6 +41,7 @@ properties:
type: integer
example: 100
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time

View File

@@ -4,12 +4,17 @@ description: >-
fulfill a given set of Products.
type: object
required:
- created_at
- deleted_at
- id
- metadata
- name
- type
- updated_at
properties:
id:
type: string
description: The shipping profile's ID
type: string
example: sp_01G1G5V239ENSZ5MV4JAR737BM
name:
description: >-
@@ -33,8 +38,7 @@ properties:
Available if the relation `products` is expanded.
type: array
items:
type: object
description: A product object.
$ref: ./Product.yaml
shipping_options:
description: >-
The Shipping Options that can be used to fulfill the Products in the
@@ -44,19 +48,21 @@ properties:
items:
$ref: ./ShippingOption.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -4,8 +4,11 @@ description: >-
option is taxed in a certain way
type: object
required:
- shipping_option_id
- created_at
- metadata
- rate_id
- shipping_option_id
- updated_at
properties:
shipping_option_id:
description: The ID of the Shipping Option
@@ -13,6 +16,7 @@ properties:
example: so_01G1G5V27GYX4QXNARRQCW1N8T
shipping_option:
description: Available if the relation `shipping_option` is expanded.
nullable: true
$ref: ./ShippingOption.yaml
rate_id:
description: The ID of the Tax Rate
@@ -20,17 +24,19 @@ properties:
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
tax_rate:
description: Available if the relation `tax_rate` is expanded.
nullable: true
$ref: ./TaxRate.yaml
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,11 +2,14 @@ title: Staged Job
description: A staged job resource
type: object
required:
- data
- event_name
- id
- options
properties:
id:
type: string
description: The staged job's ID
type: string
example: job_01F0YET7BZTARY9MKN1SJ7AAXF
event_name:
description: The name of the event
@@ -16,3 +19,7 @@ properties:
description: Data necessary for the job
type: object
example: {}
option:
description: The staged job's option
type: object
example: {}

View File

@@ -1,10 +1,21 @@
title: Store
description: Holds settings for the Store, such as name, currencies, etc.
type: object
required:
- created_at
- default_currency_code
- default_location_id
- id
- invite_link_template
- metadata
- name
- payment_link_template
- swap_link_template
- updated_at
properties:
id:
type: string
description: The store's ID
type: string
example: store_01G1G5V21KADXNGH29BJMAJ4B4
name:
description: The name of the Store - this may be displayed to the Customer.
@@ -19,6 +30,7 @@ properties:
description: See a list of codes.
default_currency:
description: Available if the relation `default_currency` is expanded.
nullable: true
$ref: ./Currency.yaml
currencies:
description: >-
@@ -31,29 +43,48 @@ properties:
description: >-
A template to generate Swap links from. Use {{cart_id}} to include the
Swap's `cart_id` in the link.
nullable: true
type: string
example: null
payment_link_template:
description: >-
A template to generate Payment links from. Use {{cart_id}} to include the
payment's `cart_id` in the link.
nullable: true
type: string
example: null
invite_link_template:
description: A template to generate Invite links from
nullable: true
type: string
example: null
default_location_id:
description: The location ID the store is associated with.
nullable: true
type: string
example: null
default_sales_channel_id:
type: string
description: The sales channel ID the cart is associated with.
nullable: true
type: string
example: null
default_sales_channel:
description: >-
A sales channel object. Available if the relation `default_sales_channel`
is expanded.
type: object
nullable: true
$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
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -9,13 +9,26 @@ description: >-
difference.
type: object
required:
- allow_backorder
- canceled_at
- cart_id
- confirmed_at
- created_at
- deleted_at
- difference_due
- fulfillment_status
- payment_status
- id
- idempotency_key
- metadata
- no_notification
- order_id
- payment_status
- shipping_address_id
- updated_at
properties:
id:
type: string
description: The swap's ID
type: string
example: swap_01F0YET86Y9G92D3YDR9Y6V676
fulfillment_status:
description: The status of the Fulfillment of the Swap.
@@ -24,6 +37,7 @@ properties:
- not_fulfilled
- fulfilled
- shipped
- partially_shipped
- canceled
- requires_action
example: not_fulfilled
@@ -49,6 +63,7 @@ properties:
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
order:
description: An order object. Available if the relation `order` is expanded.
nullable: true
type: object
additional_items:
description: >-
@@ -61,6 +76,7 @@ properties:
description: >-
A return order object. The Return that is issued for the return part of
the Swap. Available if the relation `return_order` is expanded.
nullable: true
type: object
fulfillments:
description: >-
@@ -74,22 +90,26 @@ properties:
The Payment authorized when the Swap requires an additional amount to be
charged from the Customer. Available if the relation `payment` is
expanded.
nullable: true
type: object
difference_due:
description: >-
The difference that is paid or refunded as a result of the Swap. May be
negative when the amount paid for the returned items exceed the total of
the new Products.
nullable: true
type: integer
example: 0
shipping_address_id:
description: >-
The Address to send the new Line Items to - in most cases this will be the
same as the shipping address on the Order.
nullable: true
type: string
example: addr_01G8ZH853YPY9B94857DY91YGW
shipping_address:
description: Available if the relation `shipping_address` is expanded.
nullable: true
$ref: ./Address.yaml
shipping_methods:
description: >-
@@ -100,50 +120,58 @@ properties:
$ref: ./ShippingMethod.yaml
cart_id:
description: The id of the Cart that the Customer will use to confirm the Swap.
nullable: true
type: string
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
cart:
description: A cart object. Available if the relation `cart` is expanded.
nullable: true
type: object
confirmed_at:
description: The date with timezone at which the Swap was confirmed by the Customer.
nullable: true
type: string
format: date-time
canceled_at:
description: The date with timezone at which the Swap was canceled.
nullable: true
type: string
format: date-time
no_notification:
description: If set to true, no notification will be sent related to this swap
nullable: true
type: boolean
example: false
allow_backorder:
description: If true, swaps can be completed with items out of stock
type: boolean
default: false
idempotency_key:
type: string
description: >-
Randomly generated key used to continue the completion of the swap in case
of failure.
nullable: true
type: string
externalDocs:
url: >-
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
confirmed_at:
description: The date with timezone at which the Swap was confirmed by the Customer.
type: string
format: date-time
canceled_at:
description: The date with timezone at which the Swap was canceled.
type: string
format: date-time
no_notification:
description: If set to true, no notification will be sent related to this swap
type: boolean
example: false
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,15 +2,21 @@ title: Tax Line
description: Line item that specifies an amount of tax to add to a line item.
type: object
required:
- rate
- code
- created_at
- id
- metadata
- name
- rate
- updated_at
properties:
id:
type: string
description: The tax line's ID
type: string
example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
code:
description: A code to identify the tax type by
nullable: true
type: string
example: tax01
name:
@@ -22,15 +28,16 @@ properties:
type: number
example: 10
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -1,6 +1,9 @@
title: Tax Provider
description: The tax service used to calculate taxes
type: object
required:
- id
- is_installed
properties:
id:
description: The id of the tax provider as given by the plugin.

View File

@@ -4,19 +4,27 @@ description: >-
within a given Region
type: object
required:
- code
- created_at
- id
- metadata
- name
- rate
- region_id
- updated_at
properties:
id:
type: string
description: The tax rate's ID
type: string
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
rate:
description: The numeric rate to charge
nullable: true
type: number
example: 10
code:
description: A code to identify the tax type by
nullable: true
type: string
example: tax01
name:
@@ -24,58 +32,57 @@ properties:
type: string
example: Tax Example
region_id:
type: string
description: The id of the Region that the rate belongs to
type: string
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
region:
description: A region object. Available if the relation `region` is expanded.
type: object
nullable: true
$ref: ./Region.yaml
products:
type: array
description: >-
The products that belong to this tax rate. Available if the relation
`products` is expanded.
items:
type: object
description: A product object.
product_types:
type: array
items:
$ref: ./Product.yaml
product_types:
description: >-
The product types that belong to this tax rate. Available if the relation
`product_types` is expanded.
type: array
items:
type: object
description: A product type object.
$ref: ./ProductType.yaml
shipping_options:
type: array
description: >-
The shipping options that belong to this tax rate. Available if the
relation `shipping_options` is expanded.
items:
type: object
description: A shipping option object.
$ref: ./ShippingOption.yaml
product_count:
description: The count of products
type: integer
example: null
example: 10
product_type_count:
description: The count of product types
type: integer
example: null
example: 2
shipping_option_count:
description: The count of shipping options
type: integer
example: null
example: 1
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -5,15 +5,23 @@ description: >-
status of the shipment.
type: object
required:
- tracking_number
- created_at
- deleted_at
- fulfillment_id
- id
- idempotency_key
- metadata
- tracking_number
- updated_at
- url
properties:
id:
type: string
description: The tracking link's ID
type: string
example: tlink_01G8ZH853Y6TFXWPG5EYE81X63
url:
description: The URL at which the status of the shipment can be tracked.
nullable: true
type: string
format: uri
tracking_number:
@@ -21,35 +29,39 @@ properties:
type: string
format: RH370168054CN
fulfillment_id:
type: string
description: The id of the Fulfillment that the Tracking Link references.
type: string
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
fulfillment:
description: Available if the relation `fulfillment` is expanded.
nullable: true
$ref: ./Fulfillment.yaml
idempotency_key:
type: string
description: >-
Randomly generated key used to continue the completion of a process in
case of failure.
nullable: true
type: string
externalDocs:
url: >-
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
description: Learn more how to use the idempotency key.
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white

View File

@@ -2,42 +2,64 @@ title: User
description: Represents a User who can manage store settings.
type: object
required:
- api_token
- created_at
- deleted_at
- email
- first_name
- id
- last_name
- metadata
- role
- updated_at
properties:
id:
type: string
description: The user's ID
type: string
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
role:
description: The user's role
type: string
enum:
- admin
- member
- developer
default: member
email:
description: The email of the User
type: string
format: email
first_name:
description: The first name of the User
nullable: true
type: string
example: Levi
last_name:
description: The last name of the User
nullable: true
type: string
example: Bogan
api_token:
description: An API token associated with the user.
nullable: true
type: string
example: null
created_at:
type: string
description: The date with timezone at which the resource was created.
type: string
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
type: string
format: date-time
deleted_at:
type: string
description: The date with timezone at which the resource was deleted.
nullable: true
type: string
format: date-time
metadata:
type: object
description: An optional key-value map with additional details
nullable: true
type: object
example:
car: white