docs: create docs workspace (#5174)
* docs: migrate ui docs to docs universe * created yarn workspace * added eslint and tsconfig configurations * fix eslint configurations * fixed eslint configurations * shared tailwind configurations * added shared ui package * added more shared components * migrating more components * made details components shared * move InlineCode component * moved InputText * moved Loading component * Moved Modal component * moved Select components * Moved Tooltip component * moved Search components * moved ColorMode provider * Moved Notification components and providers * used icons package * use UI colors in api-reference * moved Navbar component * used Navbar and Search in UI docs * added Feedback to UI docs * general enhancements * fix color mode * added copy colors file from ui-preset * added features and enhancements to UI docs * move Sidebar component and provider * general fixes and preparations for deployment * update docusaurus version * adjusted versions * fix output directory * remove rootDirectory property * fix yarn.lock * moved code component * added vale for all docs MD and MDX * fix tests * fix vale error * fix deployment errors * change ignore commands * add output directory * fix docs test * general fixes * content fixes * fix announcement script * added changeset * fix vale checks * added nofilter option * fix vale error
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
summary: Database Error
|
||||
value:
|
||||
code: api_error
|
||||
message: An error occured while hashing password
|
||||
type: database_error
|
||||
@@ -0,0 +1,5 @@
|
||||
summary: Default Error
|
||||
value:
|
||||
code: unknown_error
|
||||
message: An unknown error occurred.
|
||||
type: unknown_error
|
||||
@@ -0,0 +1,4 @@
|
||||
summary: Invalid Argument Error
|
||||
value:
|
||||
message: cart.total must be defined
|
||||
type: unexpected_state
|
||||
@@ -0,0 +1,4 @@
|
||||
summary: Invalid Data Error
|
||||
value:
|
||||
message: first_name must be a string
|
||||
type: invalid_data
|
||||
@@ -0,0 +1,10 @@
|
||||
summary: Multiple Errors
|
||||
value:
|
||||
message: >-
|
||||
Provided request body contains errors. Please check the data and retry the
|
||||
request
|
||||
errors:
|
||||
- message: first_name must be a string
|
||||
type: invalid_data
|
||||
- message: Discount must be set to dynamic
|
||||
type: not_allowed
|
||||
@@ -0,0 +1,4 @@
|
||||
summary: Not Allowed Error
|
||||
value:
|
||||
message: Discount must be set to dynamic
|
||||
type: not_allowed
|
||||
@@ -0,0 +1,4 @@
|
||||
summary: Unexpected State Error
|
||||
value:
|
||||
message: cart.total must be defined
|
||||
type: unexpected_state
|
||||
@@ -0,0 +1,14 @@
|
||||
description: Client Error or Multiple Errors
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: ../schemas/Error.yaml
|
||||
- $ref: ../schemas/MultipleErrors.yaml
|
||||
examples:
|
||||
not_allowed:
|
||||
$ref: ../examples/not_allowed_error.yaml
|
||||
invalid_data:
|
||||
$ref: ../examples/invalid_data_error.yaml
|
||||
MultipleErrors:
|
||||
$ref: ../examples/multiple_errors.yaml
|
||||
@@ -0,0 +1,14 @@
|
||||
description: Server Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../schemas/Error.yaml
|
||||
examples:
|
||||
database:
|
||||
$ref: ../examples/database_error.yaml
|
||||
unexpected_state:
|
||||
$ref: ../examples/unexpected_state_error.yaml
|
||||
invalid_argument:
|
||||
$ref: ../examples/invalid_argument_error.yaml
|
||||
default_error:
|
||||
$ref: ../examples/default_error.yaml
|
||||
@@ -0,0 +1,9 @@
|
||||
description: Default Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../schemas/Error.yaml
|
||||
example:
|
||||
code: unknown_error
|
||||
message: An unknown error occurred.
|
||||
type: unknown_error
|
||||
@@ -0,0 +1,7 @@
|
||||
description: User does not exist or incorrect credentials
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
default: Unauthorized
|
||||
example: Unauthorized
|
||||
@@ -0,0 +1,9 @@
|
||||
description: Invalid Request Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../schemas/Error.yaml
|
||||
example:
|
||||
code: invalid_request_error
|
||||
message: Discount with code TEST already exists.
|
||||
type: duplicate_error
|
||||
@@ -0,0 +1,11 @@
|
||||
description: Invalid State Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../schemas/Error.yaml
|
||||
example:
|
||||
code: unknown_error
|
||||
message: >-
|
||||
The request conflicted with another request. You may retry the request
|
||||
with the provided Idempotency-Key.
|
||||
type: QueryRunnerAlreadyReleasedError
|
||||
@@ -0,0 +1,8 @@
|
||||
description: Not Found Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../schemas/Error.yaml
|
||||
example:
|
||||
message: Entity with id 1 was not found
|
||||
type: not_found
|
||||
@@ -0,0 +1,7 @@
|
||||
description: User is not authorized. Must log in first
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
default: Unauthorized
|
||||
example: Unauthorized
|
||||
@@ -0,0 +1,119 @@
|
||||
title: Address
|
||||
description: >-
|
||||
An address is used across the Medusa backend within other schemas and object
|
||||
types. For example, a customer's billing and shipping addresses both use the
|
||||
Address entity.
|
||||
type: object
|
||||
required:
|
||||
- address_1
|
||||
- address_2
|
||||
- city
|
||||
- company
|
||||
- country_code
|
||||
- created_at
|
||||
- customer_id
|
||||
- deleted_at
|
||||
- first_name
|
||||
- id
|
||||
- last_name
|
||||
- metadata
|
||||
- phone
|
||||
- postal_code
|
||||
- province
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: ID of the address
|
||||
example: addr_01G8ZC9VS1XVE149MGH2J7QSSH
|
||||
customer_id:
|
||||
description: ID of the customer this address belongs to
|
||||
nullable: true
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: Available if the relation `customer` is expanded.
|
||||
nullable: true
|
||||
type: object
|
||||
company:
|
||||
description: Company name
|
||||
nullable: true
|
||||
type: string
|
||||
example: Acme
|
||||
first_name:
|
||||
description: First name
|
||||
nullable: true
|
||||
type: string
|
||||
example: Arno
|
||||
last_name:
|
||||
description: Last name
|
||||
nullable: true
|
||||
type: string
|
||||
example: Willms
|
||||
address_1:
|
||||
description: Address line 1
|
||||
nullable: true
|
||||
type: string
|
||||
example: 14433 Kemmer Court
|
||||
address_2:
|
||||
description: Address line 2
|
||||
nullable: true
|
||||
type: string
|
||||
example: Suite 369
|
||||
city:
|
||||
description: City
|
||||
nullable: true
|
||||
type: string
|
||||
example: South Geoffreyview
|
||||
country_code:
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
nullable: true
|
||||
type: string
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
example: st
|
||||
country:
|
||||
description: A country object.
|
||||
x-expandable: country
|
||||
nullable: true
|
||||
$ref: ./Country.yaml
|
||||
province:
|
||||
description: Province
|
||||
nullable: true
|
||||
type: string
|
||||
example: Kentucky
|
||||
postal_code:
|
||||
description: Postal Code
|
||||
nullable: true
|
||||
type: string
|
||||
example: 72093
|
||||
phone:
|
||||
description: Phone Number
|
||||
nullable: true
|
||||
type: string
|
||||
example: 16128234334802
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,57 @@
|
||||
type: object
|
||||
description: Address fields used when creating an address.
|
||||
required:
|
||||
- first_name
|
||||
- last_name
|
||||
- address_1
|
||||
- city
|
||||
- country_code
|
||||
- postal_code
|
||||
properties:
|
||||
first_name:
|
||||
description: First name
|
||||
type: string
|
||||
example: Arno
|
||||
last_name:
|
||||
description: Last name
|
||||
type: string
|
||||
example: Willms
|
||||
phone:
|
||||
type: string
|
||||
description: Phone Number
|
||||
example: 16128234334802
|
||||
company:
|
||||
type: string
|
||||
address_1:
|
||||
description: Address line 1
|
||||
type: string
|
||||
example: 14433 Kemmer Court
|
||||
address_2:
|
||||
description: Address line 2
|
||||
type: string
|
||||
example: Suite 369
|
||||
city:
|
||||
description: City
|
||||
type: string
|
||||
example: South Geoffreyview
|
||||
country_code:
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
type: string
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
example: st
|
||||
province:
|
||||
description: Province
|
||||
type: string
|
||||
example: Kentucky
|
||||
postal_code:
|
||||
description: Postal Code
|
||||
type: string
|
||||
example: 72093
|
||||
metadata:
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
description: An optional key-value map with additional details
|
||||
@@ -0,0 +1,50 @@
|
||||
type: object
|
||||
description: Address fields used when creating/updating an address.
|
||||
properties:
|
||||
first_name:
|
||||
description: First name
|
||||
type: string
|
||||
example: Arno
|
||||
last_name:
|
||||
description: Last name
|
||||
type: string
|
||||
example: Willms
|
||||
phone:
|
||||
type: string
|
||||
description: Phone Number
|
||||
example: 16128234334802
|
||||
company:
|
||||
type: string
|
||||
address_1:
|
||||
description: Address line 1
|
||||
type: string
|
||||
example: 14433 Kemmer Court
|
||||
address_2:
|
||||
description: Address line 2
|
||||
type: string
|
||||
example: Suite 369
|
||||
city:
|
||||
description: City
|
||||
type: string
|
||||
example: South Geoffreyview
|
||||
country_code:
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
type: string
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
example: st
|
||||
province:
|
||||
description: Province
|
||||
type: string
|
||||
example: Kentucky
|
||||
postal_code:
|
||||
description: Postal Code
|
||||
type: string
|
||||
example: 72093
|
||||
metadata:
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
description: An optional key-value map with additional details
|
||||
@@ -0,0 +1,171 @@
|
||||
title: Batch Job
|
||||
description: >-
|
||||
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its
|
||||
status determines whether it has been executed or not.
|
||||
type: object
|
||||
required:
|
||||
- canceled_at
|
||||
- completed_at
|
||||
- confirmed_at
|
||||
- context
|
||||
- created_at
|
||||
- created_by
|
||||
- deleted_at
|
||||
- dry_run
|
||||
- failed_at
|
||||
- id
|
||||
- pre_processed_at
|
||||
- processing_at
|
||||
- result
|
||||
- status
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The unique identifier for the batch job.
|
||||
type: string
|
||||
example: batch_01G8T782965PYFG0751G0Z38B4
|
||||
type:
|
||||
description: The type of batch job.
|
||||
type: string
|
||||
enum:
|
||||
- product-import
|
||||
- product-export
|
||||
status:
|
||||
description: The status of the batch job.
|
||||
type: string
|
||||
enum:
|
||||
- created
|
||||
- pre_processed
|
||||
- confirmed
|
||||
- processing
|
||||
- completed
|
||||
- canceled
|
||||
- failed
|
||||
default: created
|
||||
created_by:
|
||||
description: The unique identifier of the user that created the batch job.
|
||||
nullable: true
|
||||
type: string
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
created_by_user:
|
||||
description: The details of the user that created the batch job.
|
||||
x-expandable: created_by_user
|
||||
nullable: true
|
||||
$ref: ./User.yaml
|
||||
context:
|
||||
description: >-
|
||||
The context of the batch job, the type of the batch job determines what
|
||||
the context should contain.
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
shape:
|
||||
prices:
|
||||
- region: null
|
||||
currency_code: eur
|
||||
dynamicImageColumnCount: 4
|
||||
dynamicOptionColumnCount: 2
|
||||
list_config:
|
||||
skip: 0
|
||||
take: 50
|
||||
order:
|
||||
created_at: DESC
|
||||
relations:
|
||||
- variants
|
||||
- variant.prices
|
||||
- images
|
||||
dry_run:
|
||||
description: Specify if the job must apply the modifications or not.
|
||||
type: boolean
|
||||
default: false
|
||||
result:
|
||||
description: The result of the batch job.
|
||||
nullable: true
|
||||
allOf:
|
||||
- type: object
|
||||
example: {}
|
||||
- type: object
|
||||
properties:
|
||||
count:
|
||||
type: number
|
||||
advancement_count:
|
||||
type: number
|
||||
progress:
|
||||
type: number
|
||||
errors:
|
||||
type: object
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
code:
|
||||
oneOf:
|
||||
- type: string
|
||||
- type: number
|
||||
err:
|
||||
type: array
|
||||
stat_descriptors:
|
||||
type: object
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
file_key:
|
||||
type: string
|
||||
file_size:
|
||||
type: number
|
||||
example:
|
||||
errors:
|
||||
- err: []
|
||||
code: unknown
|
||||
message: Method not implemented.
|
||||
stat_descriptors:
|
||||
- key: product-export-count
|
||||
name: Product count to export
|
||||
message: There will be 8 products exported by this action
|
||||
pre_processed_at:
|
||||
description: The date from which the job has been pre-processed.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
processing_at:
|
||||
description: The date the job is processing at.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
confirmed_at:
|
||||
description: The date when the confirmation has been done.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
completed_at:
|
||||
description: The date of the completion.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
canceled_at:
|
||||
description: The date of the concellation.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
failed_at:
|
||||
description: The date when the job failed.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was last updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
236
www/apps/api-reference/specs/store/components/schemas/Cart.yaml
Normal file
236
www/apps/api-reference/specs/store/components/schemas/Cart.yaml
Normal file
@@ -0,0 +1,236 @@
|
||||
title: Cart
|
||||
description: >-
|
||||
A cart represents a virtual shopping bag. It can be used to complete an order,
|
||||
a swap, or a claim.
|
||||
type: object
|
||||
required:
|
||||
- billing_address_id
|
||||
- completed_at
|
||||
- context
|
||||
- created_at
|
||||
- customer_id
|
||||
- deleted_at
|
||||
- email
|
||||
- id
|
||||
- idempotency_key
|
||||
- metadata
|
||||
- payment_authorized_at
|
||||
- payment_id
|
||||
- payment_session
|
||||
- region_id
|
||||
- shipping_address_id
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The cart's ID
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
email:
|
||||
description: The email associated with the cart
|
||||
nullable: true
|
||||
type: string
|
||||
format: email
|
||||
billing_address_id:
|
||||
description: The billing address's ID
|
||||
nullable: true
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
billing_address:
|
||||
description: The details of the billing address associated with the cart.
|
||||
x-expandable: billing_address
|
||||
nullable: true
|
||||
$ref: ./Address.yaml
|
||||
shipping_address_id:
|
||||
description: The shipping address's ID
|
||||
nullable: true
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: The details of the shipping address associated with the cart.
|
||||
x-expandable: shipping_address
|
||||
nullable: true
|
||||
$ref: ./Address.yaml
|
||||
items:
|
||||
description: The line items added to the cart.
|
||||
type: array
|
||||
x-expandable: items
|
||||
items:
|
||||
$ref: ./LineItem.yaml
|
||||
region_id:
|
||||
description: The region's ID
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region associated with the cart.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
$ref: ./Region.yaml
|
||||
discounts:
|
||||
description: An array of details of all discounts applied to the cart.
|
||||
type: array
|
||||
x-expandable: discounts
|
||||
items:
|
||||
$ref: ./Discount.yaml
|
||||
gift_cards:
|
||||
description: An array of details of all gift cards applied to the cart.
|
||||
type: array
|
||||
x-expandable: gift_cards
|
||||
items:
|
||||
$ref: ./GiftCard.yaml
|
||||
customer_id:
|
||||
description: The customer's ID
|
||||
nullable: true
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: The details of the customer the cart belongs to.
|
||||
x-expandable: customer
|
||||
nullable: true
|
||||
type: object
|
||||
payment_session:
|
||||
description: The details of the selected payment session in the cart.
|
||||
x-expandable: payment_session
|
||||
nullable: true
|
||||
type: object
|
||||
payment_sessions:
|
||||
description: The details of all payment sessions created on the cart.
|
||||
type: array
|
||||
x-expandable: payment_sessions
|
||||
items:
|
||||
type: object
|
||||
payment_id:
|
||||
description: The payment's ID if available
|
||||
nullable: true
|
||||
type: string
|
||||
example: pay_01G8ZCC5W42ZNY842124G7P5R9
|
||||
payment:
|
||||
description: The details of the payment associated with the cart.
|
||||
nullable: true
|
||||
x-expandable: payment
|
||||
type: object
|
||||
shipping_methods:
|
||||
description: The details of the shipping methods added to the cart.
|
||||
type: array
|
||||
x-expandable: shipping_methods
|
||||
items:
|
||||
$ref: ./ShippingMethod.yaml
|
||||
type:
|
||||
description: The cart's type.
|
||||
type: string
|
||||
enum:
|
||||
- default
|
||||
- swap
|
||||
- draft_order
|
||||
- payment_link
|
||||
- claim
|
||||
default: default
|
||||
completed_at:
|
||||
description: The date with timezone at which the cart was completed.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
payment_authorized_at:
|
||||
description: The date with timezone at which the payment was authorized.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
idempotency_key:
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of a cart in case
|
||||
of failure.
|
||||
nullable: true
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
context:
|
||||
description: The context of the cart which can include info like IP or user agent.
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
ip: '::1'
|
||||
user_agent: PostmanRuntime/7.29.2
|
||||
sales_channel_id:
|
||||
description: The sales channel ID the cart is associated with.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
sales_channel:
|
||||
description: The details of the sales channel associated with the cart.
|
||||
nullable: true
|
||||
x-expandable: sales_channel
|
||||
$ref: ./SalesChannel.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
shipping_total:
|
||||
description: The total of shipping
|
||||
type: integer
|
||||
example: 1000
|
||||
discount_total:
|
||||
description: The total of discount rounded
|
||||
type: integer
|
||||
example: 800
|
||||
raw_discount_total:
|
||||
description: The total of discount
|
||||
type: integer
|
||||
example: 800
|
||||
item_tax_total:
|
||||
description: The total of items with taxes
|
||||
type: integer
|
||||
example: 8000
|
||||
shipping_tax_total:
|
||||
description: The total of shipping with taxes
|
||||
type: integer
|
||||
example: 1000
|
||||
tax_total:
|
||||
description: The total of tax
|
||||
type: integer
|
||||
example: 0
|
||||
refunded_total:
|
||||
description: >-
|
||||
The total amount refunded if the order associated with this cart is
|
||||
returned.
|
||||
type: integer
|
||||
example: 0
|
||||
total:
|
||||
description: The total amount of the cart
|
||||
type: integer
|
||||
example: 8200
|
||||
subtotal:
|
||||
description: The subtotal of the cart
|
||||
type: integer
|
||||
example: 8000
|
||||
refundable_amount:
|
||||
description: The amount that can be refunded
|
||||
type: integer
|
||||
example: 8200
|
||||
gift_card_total:
|
||||
description: The total of gift cards
|
||||
type: integer
|
||||
example: 0
|
||||
gift_card_tax_total:
|
||||
description: The total of gift cards with taxes
|
||||
type: integer
|
||||
example: 0
|
||||
@@ -0,0 +1,51 @@
|
||||
title: Claim Image
|
||||
description: The details of an image attached to a claim.
|
||||
type: object
|
||||
required:
|
||||
- claim_item_id
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- updated_at
|
||||
- url
|
||||
properties:
|
||||
id:
|
||||
description: The claim image's ID
|
||||
type: string
|
||||
example: cimg_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
claim_item_id:
|
||||
description: The ID of the claim item associated with the image
|
||||
type: string
|
||||
claim_item:
|
||||
description: The details of the claim item this image is associated with.
|
||||
nullable: true
|
||||
x-expandable: claim_item
|
||||
type: object
|
||||
url:
|
||||
description: The URL of the image
|
||||
type: string
|
||||
format: uri
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,106 @@
|
||||
title: Claim Item
|
||||
description: >-
|
||||
A claim item is an item created as part of a claim. It references an item in
|
||||
the order that should be exchanged or refunded.
|
||||
type: object
|
||||
required:
|
||||
- claim_order_id
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- item_id
|
||||
- metadata
|
||||
- note
|
||||
- quantity
|
||||
- reason
|
||||
- updated_at
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
description: The claim item's ID
|
||||
type: string
|
||||
example: citm_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
images:
|
||||
description: The claim images that are attached to the claim item.
|
||||
type: array
|
||||
x-expandable: images
|
||||
items:
|
||||
$ref: ./ClaimImage.yaml
|
||||
claim_order_id:
|
||||
description: The ID of the claim this item is associated with.
|
||||
type: string
|
||||
claim_order:
|
||||
description: The details of the claim this item belongs to.
|
||||
x-expandable: claim_order
|
||||
nullable: true
|
||||
type: object
|
||||
item_id:
|
||||
description: The ID of the line item that the claim item refers to.
|
||||
type: string
|
||||
example: item_01G8ZM25TN49YV9EQBE2NC27KC
|
||||
item:
|
||||
description: >-
|
||||
The details of the line item in the original order that this claim item
|
||||
refers to.
|
||||
x-expandable: item
|
||||
nullable: true
|
||||
$ref: ./LineItem.yaml
|
||||
variant_id:
|
||||
description: The ID of the product variant that is claimed.
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: >-
|
||||
The details of the product variant to potentially replace the item in the
|
||||
original order.
|
||||
x-expandable: variant
|
||||
nullable: true
|
||||
$ref: ./ProductVariant.yaml
|
||||
reason:
|
||||
description: The reason for the claim
|
||||
type: string
|
||||
enum:
|
||||
- missing_item
|
||||
- wrong_item
|
||||
- production_failure
|
||||
- other
|
||||
note:
|
||||
description: An optional note about the claim, for additional information
|
||||
nullable: true
|
||||
type: string
|
||||
example: I don't like it.
|
||||
quantity:
|
||||
description: >-
|
||||
The quantity of the item that is being claimed; must be less than or equal
|
||||
to the amount purchased in the original order.
|
||||
type: integer
|
||||
example: 1
|
||||
tags:
|
||||
description: User defined tags for easy filtering and grouping.
|
||||
type: array
|
||||
x-expandable: tags
|
||||
items:
|
||||
$ref: ./ClaimTag.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,157 @@
|
||||
title: Claim
|
||||
description: >-
|
||||
A Claim represents a group of faulty or missing items. It consists of claim
|
||||
items that refer to items in the original order that should be replaced or
|
||||
refunded. It also includes details related to shipping and fulfillment.
|
||||
type: object
|
||||
required:
|
||||
- canceled_at
|
||||
- created_at
|
||||
- deleted_at
|
||||
- fulfillment_status
|
||||
- id
|
||||
- idempotency_key
|
||||
- metadata
|
||||
- no_notification
|
||||
- order_id
|
||||
- payment_status
|
||||
- refund_amount
|
||||
- shipping_address_id
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The claim's ID
|
||||
type: string
|
||||
example: claim_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
type:
|
||||
description: The claim's type
|
||||
type: string
|
||||
enum:
|
||||
- refund
|
||||
- replace
|
||||
payment_status:
|
||||
description: The status of the claim's payment
|
||||
type: string
|
||||
enum:
|
||||
- na
|
||||
- not_refunded
|
||||
- refunded
|
||||
default: na
|
||||
fulfillment_status:
|
||||
description: The claim's fulfillment status
|
||||
type: string
|
||||
enum:
|
||||
- not_fulfilled
|
||||
- partially_fulfilled
|
||||
- fulfilled
|
||||
- partially_shipped
|
||||
- shipped
|
||||
- partially_returned
|
||||
- returned
|
||||
- canceled
|
||||
- requires_action
|
||||
default: not_fulfilled
|
||||
claim_items:
|
||||
description: The details of the items that should be replaced or refunded.
|
||||
type: array
|
||||
x-expandable: claim_items
|
||||
items:
|
||||
$ref: ./ClaimItem.yaml
|
||||
additional_items:
|
||||
description: >-
|
||||
The details of the new items to be shipped when the claim's type is
|
||||
`replace`
|
||||
type: array
|
||||
x-expandable: additional_items
|
||||
items:
|
||||
$ref: ./LineItem.yaml
|
||||
order_id:
|
||||
description: The ID of the order that the claim comes from.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that this claim was created for.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
return_order:
|
||||
description: >-
|
||||
The details of the return associated with the claim if the claim's type is
|
||||
`replace`.
|
||||
x-expandable: return_order
|
||||
nullable: true
|
||||
type: object
|
||||
shipping_address_id:
|
||||
description: The ID of the address that the new items should be shipped to
|
||||
nullable: true
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: The details of the address that new items should be shipped to.
|
||||
x-expandable: shipping_address
|
||||
nullable: true
|
||||
$ref: ./Address.yaml
|
||||
shipping_methods:
|
||||
description: >-
|
||||
The details of the shipping methods that the claim order will be shipped
|
||||
with.
|
||||
type: array
|
||||
x-expandable: shipping_methods
|
||||
items:
|
||||
$ref: ./ShippingMethod.yaml
|
||||
fulfillments:
|
||||
description: The fulfillments of the new items to be shipped
|
||||
type: array
|
||||
x-expandable: fulfillments
|
||||
items:
|
||||
type: object
|
||||
refund_amount:
|
||||
description: The amount that will be refunded in conjunction with the claim
|
||||
nullable: true
|
||||
type: integer
|
||||
example: 1000
|
||||
canceled_at:
|
||||
description: The date with timezone at which the claim was canceled.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
no_notification:
|
||||
description: >-
|
||||
Flag for describing whether or not notifications related to this should be
|
||||
send.
|
||||
nullable: true
|
||||
type: boolean
|
||||
example: false
|
||||
idempotency_key:
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the cart
|
||||
associated with the claim in case of failure.
|
||||
nullable: true
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
@@ -0,0 +1,44 @@
|
||||
title: Claim Tag
|
||||
description: >-
|
||||
Claim Tags are user defined tags that can be assigned to claim items for easy
|
||||
filtering and grouping.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- updated_at
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The claim tag's ID
|
||||
type: string
|
||||
example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4
|
||||
value:
|
||||
description: The value that the claim tag holds
|
||||
type: string
|
||||
example: Damaged
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,58 @@
|
||||
title: Country
|
||||
description: Country details
|
||||
type: object
|
||||
required:
|
||||
- display_name
|
||||
- id
|
||||
- iso_2
|
||||
- iso_3
|
||||
- name
|
||||
- num_code
|
||||
- region_id
|
||||
properties:
|
||||
id:
|
||||
description: The country's ID
|
||||
type: string
|
||||
example: 109
|
||||
iso_2:
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
type: string
|
||||
example: it
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
iso_3:
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
type: string
|
||||
example: ita
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
num_code:
|
||||
description: The numerical ISO code for the country.
|
||||
type: string
|
||||
example: 380
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_numeric#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
name:
|
||||
description: The normalized country name in upper case.
|
||||
type: string
|
||||
example: ITALY
|
||||
display_name:
|
||||
description: The country name appropriate for display.
|
||||
type: string
|
||||
example: Italy
|
||||
region_id:
|
||||
description: The region ID this country is associated with.
|
||||
nullable: true
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region the country is associated with.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
type: object
|
||||
@@ -0,0 +1,22 @@
|
||||
title: Create Stock Location Input
|
||||
description: Represents the Input to create a Stock Location
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The stock location name
|
||||
address_id:
|
||||
type: string
|
||||
description: The Stock location address ID
|
||||
address:
|
||||
description: Stock location address object
|
||||
allOf:
|
||||
- $ref: ./StockLocationAddressInput.yaml
|
||||
- type: object
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,33 @@
|
||||
title: Currency
|
||||
description: Currency
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- name
|
||||
- symbol
|
||||
- symbol_native
|
||||
properties:
|
||||
code:
|
||||
description: The 3 character ISO code for the currency.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
symbol:
|
||||
description: The symbol used to indicate the currency.
|
||||
type: string
|
||||
example: $
|
||||
symbol_native:
|
||||
description: The native symbol used to indicate the currency.
|
||||
type: string
|
||||
example: $
|
||||
name:
|
||||
description: The written name of the currency
|
||||
type: string
|
||||
example: US Dollar
|
||||
includes_tax:
|
||||
description: Whether the currency prices include tax
|
||||
type: boolean
|
||||
x-featureFlag: tax_inclusive_pricing
|
||||
default: false
|
||||
@@ -0,0 +1,68 @@
|
||||
title: Custom Shipping Option
|
||||
description: >-
|
||||
Custom Shipping Options are overridden Shipping Options. Admins can attach a
|
||||
Custom Shipping Option to a cart in order to set a custom price for a
|
||||
particular Shipping Option.
|
||||
type: object
|
||||
required:
|
||||
- cart_id
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- price
|
||||
- shipping_option_id
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The custom shipping option's ID
|
||||
type: string
|
||||
example: cso_01G8X99XNB77DMFBJFWX6DN9V9
|
||||
price:
|
||||
description: >-
|
||||
The custom price set that will override the shipping option's original
|
||||
price
|
||||
type: integer
|
||||
example: 1000
|
||||
shipping_option_id:
|
||||
description: The ID of the Shipping Option that the custom shipping option overrides
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
shipping_option:
|
||||
description: The details of the overridden shipping options.
|
||||
x-expandable: shipping_option
|
||||
nullable: true
|
||||
$ref: ./ShippingOption.yaml
|
||||
cart_id:
|
||||
description: The ID of the Cart that the custom shipping option is attached to
|
||||
nullable: true
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: The details of the cart this shipping option belongs to.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
$ref: ./Cart.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,94 @@
|
||||
title: Customer
|
||||
description: A customer can make purchases in your store and manage their profile.
|
||||
type: object
|
||||
required:
|
||||
- billing_address_id
|
||||
- created_at
|
||||
- deleted_at
|
||||
- email
|
||||
- first_name
|
||||
- has_account
|
||||
- id
|
||||
- last_name
|
||||
- metadata
|
||||
- phone
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The customer's ID
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
email:
|
||||
description: The customer's email
|
||||
type: string
|
||||
format: email
|
||||
first_name:
|
||||
description: The customer's first name
|
||||
nullable: true
|
||||
type: string
|
||||
example: Arno
|
||||
last_name:
|
||||
description: The customer's last name
|
||||
nullable: true
|
||||
type: string
|
||||
example: Willms
|
||||
billing_address_id:
|
||||
description: The customer's billing address ID
|
||||
nullable: true
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
billing_address:
|
||||
description: The details of the billing address associated with the customer.
|
||||
x-expandable: billing_address
|
||||
nullable: true
|
||||
$ref: ./Address.yaml
|
||||
shipping_addresses:
|
||||
description: The details of the shipping addresses associated with the customer.
|
||||
type: array
|
||||
x-expandable: shipping_addresses
|
||||
items:
|
||||
$ref: ./Address.yaml
|
||||
phone:
|
||||
description: The customer's phone number
|
||||
nullable: true
|
||||
type: string
|
||||
example: 16128234334802
|
||||
has_account:
|
||||
description: Whether the customer has an account or not
|
||||
type: boolean
|
||||
default: false
|
||||
orders:
|
||||
description: The details of the orders this customer placed.
|
||||
type: array
|
||||
x-expandable: orders
|
||||
items:
|
||||
type: object
|
||||
groups:
|
||||
description: The customer groups the customer belongs to.
|
||||
type: array
|
||||
x-expandable: groups
|
||||
items:
|
||||
$ref: ./CustomerGroup.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,56 @@
|
||||
title: Customer Group
|
||||
description: >-
|
||||
A customer group that can be used to organize customers into groups of similar
|
||||
traits.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- name
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The customer group's ID
|
||||
type: string
|
||||
example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
name:
|
||||
description: The name of the customer group
|
||||
type: string
|
||||
example: VIP
|
||||
customers:
|
||||
description: The details of the customers that belong to the customer group.
|
||||
type: array
|
||||
x-expandable: customers
|
||||
items:
|
||||
type: object
|
||||
price_lists:
|
||||
description: The price lists that are associated with the customer group.
|
||||
type: array
|
||||
x-expandable: price_lists
|
||||
items:
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,121 @@
|
||||
title: Discount
|
||||
description: A discount can be applied to a cart for promotional purposes.
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- created_at
|
||||
- deleted_at
|
||||
- ends_at
|
||||
- id
|
||||
- is_disabled
|
||||
- is_dynamic
|
||||
- metadata
|
||||
- parent_discount_id
|
||||
- rule_id
|
||||
- starts_at
|
||||
- updated_at
|
||||
- usage_count
|
||||
- usage_limit
|
||||
- valid_duration
|
||||
properties:
|
||||
id:
|
||||
description: The discount's ID
|
||||
type: string
|
||||
example: disc_01F0YESMW10MGHWJKZSDDMN0VN
|
||||
code:
|
||||
description: >-
|
||||
A unique code for the discount - this will be used by the customer to
|
||||
apply the discount
|
||||
type: string
|
||||
example: 10DISC
|
||||
is_dynamic:
|
||||
description: >-
|
||||
A flag to indicate if multiple instances of the discount can be generated.
|
||||
I.e. for newsletter discounts
|
||||
type: boolean
|
||||
example: false
|
||||
rule_id:
|
||||
description: >-
|
||||
The ID of the discount rule that defines how the discount will be applied
|
||||
to a cart.
|
||||
nullable: true
|
||||
type: string
|
||||
example: dru_01F0YESMVK96HVX7N419E3CJ7C
|
||||
rule:
|
||||
description: >-
|
||||
The details of the discount rule that defines how the discount will be
|
||||
applied to a cart..
|
||||
x-expandable: rule
|
||||
nullable: true
|
||||
$ref: ./DiscountRule.yaml
|
||||
is_disabled:
|
||||
description: >-
|
||||
Whether the Discount has been disabled. Disabled discounts cannot be
|
||||
applied to carts
|
||||
type: boolean
|
||||
example: false
|
||||
parent_discount_id:
|
||||
description: >-
|
||||
The Discount that the discount was created from. This will always be a
|
||||
dynamic discount
|
||||
nullable: true
|
||||
type: string
|
||||
example: disc_01G8ZH853YPY9B94857DY91YGW
|
||||
parent_discount:
|
||||
description: The details of the parent discount that this discount was created from.
|
||||
x-expandable: parent_discount
|
||||
nullable: true
|
||||
type: object
|
||||
starts_at:
|
||||
description: The time at which the discount can be used.
|
||||
type: string
|
||||
format: date-time
|
||||
ends_at:
|
||||
description: The time at which the discount can no longer be used.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
valid_duration:
|
||||
description: Duration the discount runs between
|
||||
nullable: true
|
||||
type: string
|
||||
example: P3Y6M4DT12H30M5S
|
||||
regions:
|
||||
description: The details of the regions in which the Discount can be used.
|
||||
type: array
|
||||
x-expandable: regions
|
||||
items:
|
||||
$ref: ./Region.yaml
|
||||
usage_limit:
|
||||
description: The maximum number of times that a discount can be used.
|
||||
nullable: true
|
||||
type: integer
|
||||
example: 100
|
||||
usage_count:
|
||||
description: The number of times a discount has been used.
|
||||
type: integer
|
||||
example: 50
|
||||
default: 0
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,105 @@
|
||||
title: Discount Condition
|
||||
description: Holds rule conditions for when a discount is applicable
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- discount_rule_id
|
||||
- id
|
||||
- metadata
|
||||
- operator
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The discount condition's ID
|
||||
type: string
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
type:
|
||||
description: >-
|
||||
The type of the condition. The type affects the available resources
|
||||
associated with the condition. For example, if the type is `products`,
|
||||
that means the `products` relation will hold the products associated with
|
||||
this condition and other relations will be empty.
|
||||
type: string
|
||||
enum:
|
||||
- products
|
||||
- product_types
|
||||
- product_collections
|
||||
- product_tags
|
||||
- customer_groups
|
||||
operator:
|
||||
description: >-
|
||||
The operator of the condition. `in` indicates that discountable resources
|
||||
are within the specified resources. `not_in` indicates that discountable
|
||||
resources are everything but the specified resources.
|
||||
type: string
|
||||
enum:
|
||||
- in
|
||||
- not_in
|
||||
discount_rule_id:
|
||||
description: The ID of the discount rule associated with the condition
|
||||
type: string
|
||||
example: dru_01F0YESMVK96HVX7N419E3CJ7C
|
||||
discount_rule:
|
||||
description: The details of the discount rule associated with the condition.
|
||||
x-expandable: discount_rule
|
||||
nullable: true
|
||||
$ref: ./DiscountRule.yaml
|
||||
products:
|
||||
description: products associated with this condition if `type` is `products`.
|
||||
type: array
|
||||
x-expandable: products
|
||||
items:
|
||||
$ref: ./Product.yaml
|
||||
product_types:
|
||||
description: Product types associated with this condition if `type` is `product_types`.
|
||||
type: array
|
||||
x-expandable: product_types
|
||||
items:
|
||||
$ref: ./ProductType.yaml
|
||||
product_tags:
|
||||
description: Product tags associated with this condition if `type` is `product_tags`.
|
||||
type: array
|
||||
x-expandable: product_tags
|
||||
items:
|
||||
$ref: ./ProductTag.yaml
|
||||
product_collections:
|
||||
description: >-
|
||||
Product collections associated with this condition if `type` is
|
||||
`product_collections`.
|
||||
type: array
|
||||
x-expandable: product_collections
|
||||
items:
|
||||
$ref: ./ProductCollection.yaml
|
||||
customer_groups:
|
||||
description: >-
|
||||
Customer groups associated with this condition if `type` is
|
||||
`customer_groups`.
|
||||
type: array
|
||||
x-expandable: customer_groups
|
||||
items:
|
||||
$ref: ./CustomerGroup.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,44 @@
|
||||
title: Product Tag Discount Condition
|
||||
description: Associates a discount condition with a customer group
|
||||
type: object
|
||||
required:
|
||||
- condition_id
|
||||
- created_at
|
||||
- customer_group_id
|
||||
- metadata
|
||||
- updated_at
|
||||
properties:
|
||||
customer_group_id:
|
||||
description: The ID of the Product Tag
|
||||
type: string
|
||||
example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
condition_id:
|
||||
description: The ID of the Discount Condition
|
||||
type: string
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
customer_group:
|
||||
description: Available if the relation `customer_group` is expanded.
|
||||
nullable: true
|
||||
$ref: ./CustomerGroup.yaml
|
||||
discount_condition:
|
||||
description: Available if the relation `discount_condition` is expanded.
|
||||
nullable: true
|
||||
$ref: ./DiscountCondition.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,46 @@
|
||||
title: Product Discount Condition
|
||||
description: This represents the association between a discount condition and a product
|
||||
type: object
|
||||
required:
|
||||
- condition_id
|
||||
- created_at
|
||||
- metadata
|
||||
- product_id
|
||||
- updated_at
|
||||
properties:
|
||||
product_id:
|
||||
description: The ID of the Product Tag
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
condition_id:
|
||||
description: The ID of the Discount Condition
|
||||
type: string
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
product:
|
||||
description: The details of the product.
|
||||
x-expandable: product
|
||||
nullable: true
|
||||
$ref: ./Product.yaml
|
||||
discount_condition:
|
||||
description: The details of the discount condition.
|
||||
x-expandable: discount_condition
|
||||
nullable: true
|
||||
$ref: ./DiscountCondition.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,48 @@
|
||||
title: Product Collection Discount Condition
|
||||
description: >-
|
||||
This represents the association between a discount condition and a product
|
||||
collection
|
||||
type: object
|
||||
required:
|
||||
- condition_id
|
||||
- created_at
|
||||
- metadata
|
||||
- product_collection_id
|
||||
- updated_at
|
||||
properties:
|
||||
product_collection_id:
|
||||
description: The ID of the Product Collection
|
||||
type: string
|
||||
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
|
||||
condition_id:
|
||||
description: The ID of the Discount Condition
|
||||
type: string
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
product_collection:
|
||||
description: The details of the product collection.
|
||||
x-expandable: product_collection
|
||||
nullable: true
|
||||
$ref: ./ProductCollection.yaml
|
||||
discount_condition:
|
||||
description: The details of the discount condition.
|
||||
x-expandable: discount_condition
|
||||
nullable: true
|
||||
$ref: ./DiscountCondition.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,46 @@
|
||||
title: Product Tag Discount Condition
|
||||
description: This represents the association between a discount condition and a product tag
|
||||
type: object
|
||||
required:
|
||||
- condition_id
|
||||
- created_at
|
||||
- metadata
|
||||
- product_tag_id
|
||||
- updated_at
|
||||
properties:
|
||||
product_tag_id:
|
||||
description: The ID of the Product Tag
|
||||
type: string
|
||||
example: ptag_01F0YESHPZYY3H4SJ3A5918SBN
|
||||
condition_id:
|
||||
description: The ID of the Discount Condition
|
||||
type: string
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
product_tag:
|
||||
description: The details of the product tag.
|
||||
x-expandable: product_tag
|
||||
nullable: true
|
||||
$ref: ./ProductTag.yaml
|
||||
discount_condition:
|
||||
description: The details of the discount condition.
|
||||
x-expandable: discount_condition
|
||||
nullable: true
|
||||
$ref: ./DiscountCondition.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,48 @@
|
||||
title: Product Type Discount Condition
|
||||
description: >-
|
||||
This represents the association between a discount condition and a product
|
||||
type
|
||||
type: object
|
||||
required:
|
||||
- condition_id
|
||||
- created_at
|
||||
- metadata
|
||||
- product_type_id
|
||||
- updated_at
|
||||
properties:
|
||||
product_type_id:
|
||||
description: The ID of the Product Tag
|
||||
type: string
|
||||
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
condition_id:
|
||||
description: The ID of the Discount Condition
|
||||
type: string
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
product_type:
|
||||
description: The details of the product type.
|
||||
x-expandable: product_type
|
||||
nullable: true
|
||||
$ref: ./ProductType.yaml
|
||||
discount_condition:
|
||||
description: The details of the discount condition.
|
||||
x-expandable: discount_condition
|
||||
nullable: true
|
||||
$ref: ./DiscountCondition.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,79 @@
|
||||
title: Discount Rule
|
||||
description: A discount rule defines how a Discount is calculated when applied to a Cart.
|
||||
type: object
|
||||
required:
|
||||
- allocation
|
||||
- created_at
|
||||
- deleted_at
|
||||
- description
|
||||
- id
|
||||
- metadata
|
||||
- type
|
||||
- updated_at
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The discount rule's ID
|
||||
type: string
|
||||
example: dru_01F0YESMVK96HVX7N419E3CJ7C
|
||||
type:
|
||||
description: >-
|
||||
The type of the Discount, can be `fixed` for discounts that reduce the
|
||||
price by a fixed amount, `percentage` for percentage reductions or
|
||||
`free_shipping` for shipping vouchers.
|
||||
type: string
|
||||
enum:
|
||||
- fixed
|
||||
- percentage
|
||||
- free_shipping
|
||||
example: percentage
|
||||
description:
|
||||
description: A short description of the discount
|
||||
nullable: true
|
||||
type: string
|
||||
example: 10 Percent
|
||||
value:
|
||||
description: >-
|
||||
The value that the discount represents; this will depend on the type of
|
||||
the discount
|
||||
type: integer
|
||||
example: 10
|
||||
allocation:
|
||||
description: The scope that the discount should apply to.
|
||||
nullable: true
|
||||
type: string
|
||||
enum:
|
||||
- total
|
||||
- item
|
||||
example: total
|
||||
conditions:
|
||||
description: >-
|
||||
The details of the discount conditions associated with the rule. They can
|
||||
be used to limit when the discount can be used.
|
||||
type: array
|
||||
x-expandable: conditions
|
||||
items:
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,103 @@
|
||||
title: DraftOrder
|
||||
description: >-
|
||||
A draft order is created by an admin without direct involvement of the
|
||||
customer. Once its payment is marked as captured, it is transformed into an
|
||||
order.
|
||||
type: object
|
||||
required:
|
||||
- canceled_at
|
||||
- cart_id
|
||||
- completed_at
|
||||
- created_at
|
||||
- display_id
|
||||
- id
|
||||
- idempotency_key
|
||||
- metadata
|
||||
- no_notification_order
|
||||
- order_id
|
||||
- status
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The draft order's ID
|
||||
type: string
|
||||
example: dorder_01G8TJFKBG38YYFQ035MSVG03C
|
||||
status:
|
||||
description: >-
|
||||
The status of the draft order. It's changed to `completed` when it's
|
||||
transformed to an order.
|
||||
type: string
|
||||
enum:
|
||||
- open
|
||||
- completed
|
||||
default: open
|
||||
display_id:
|
||||
description: The draft order's display ID
|
||||
type: string
|
||||
example: 2
|
||||
cart_id:
|
||||
description: The ID of the cart associated with the draft order.
|
||||
nullable: true
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: The details of the cart associated with the draft order.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
type: object
|
||||
order_id:
|
||||
description: >-
|
||||
The ID of the order created from the draft order when its payment is
|
||||
captured.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: >-
|
||||
The details of the order created from the draft order when its payment is
|
||||
captured.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
canceled_at:
|
||||
description: The date the draft order was canceled at.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
completed_at:
|
||||
description: The date the draft order was completed at.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
no_notification_order:
|
||||
description: Whether to send the customer notifications regarding order updates.
|
||||
nullable: true
|
||||
type: boolean
|
||||
example: false
|
||||
idempotency_key:
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the cart
|
||||
associated with the draft order in case of failure.
|
||||
nullable: true
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,33 @@
|
||||
title: Response Error
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
description: A slug code to indicate the type of the error.
|
||||
enum:
|
||||
- invalid_state_error
|
||||
- invalid_request_error
|
||||
- api_error
|
||||
- unknown_error
|
||||
message:
|
||||
type: string
|
||||
description: Description of the error that occurred.
|
||||
example: first_name must be a string
|
||||
type:
|
||||
type: string
|
||||
description: A slug indicating the type of the error.
|
||||
enum:
|
||||
- QueryRunnerAlreadyReleasedError
|
||||
- TransactionAlreadyStartedError
|
||||
- TransactionNotStartedError
|
||||
- conflict
|
||||
- unauthorized
|
||||
- payment_authorization_error
|
||||
- duplicate_error
|
||||
- not_allowed
|
||||
- invalid_data
|
||||
- not_found
|
||||
- database_error
|
||||
- unexpected_state
|
||||
- invalid_argument
|
||||
- unknown_error
|
||||
@@ -0,0 +1,17 @@
|
||||
allOf:
|
||||
- $ref: ./Store.yaml
|
||||
- type: object
|
||||
required:
|
||||
- payment_providers
|
||||
- fulfillment_providers
|
||||
- feature_flags
|
||||
- modules
|
||||
properties:
|
||||
payment_providers:
|
||||
$ref: ./PaymentProvider.yaml
|
||||
fulfillment_providers:
|
||||
$ref: ./FulfillmentProvider.yaml
|
||||
feature_flags:
|
||||
$ref: ./FeatureFlagsResponse.yaml
|
||||
modules:
|
||||
$ref: ./ModulesResponse.yaml
|
||||
@@ -0,0 +1,13 @@
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- key
|
||||
- value
|
||||
properties:
|
||||
key:
|
||||
description: The key of the feature flag.
|
||||
type: string
|
||||
value:
|
||||
description: The value of the feature flag.
|
||||
type: boolean
|
||||
@@ -0,0 +1,151 @@
|
||||
title: Fulfillment
|
||||
description: >-
|
||||
A Fulfillment is created once an admin can prepare the purchased goods.
|
||||
Fulfillments will eventually be shipped and hold information about how to
|
||||
track shipments. Fulfillments are created through a fulfillment provider,
|
||||
which typically integrates a third-party shipping service. Fulfillments can be
|
||||
associated with orders, claims, swaps, and returns.
|
||||
type: object
|
||||
required:
|
||||
- canceled_at
|
||||
- claim_order_id
|
||||
- created_at
|
||||
- data
|
||||
- id
|
||||
- idempotency_key
|
||||
- location_id
|
||||
- metadata
|
||||
- no_notification
|
||||
- order_id
|
||||
- provider_id
|
||||
- shipped_at
|
||||
- swap_id
|
||||
- tracking_numbers
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The fulfillment's ID
|
||||
type: string
|
||||
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
|
||||
claim_order_id:
|
||||
description: The ID of the Claim that the Fulfillment belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: The details of the claim that the fulfillment may belong to.
|
||||
x-expandable: claim_order
|
||||
nullable: true
|
||||
type: object
|
||||
swap_id:
|
||||
description: The ID of the Swap that the Fulfillment belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: The details of the swap that the fulfillment may belong to.
|
||||
x-expandable: swap
|
||||
nullable: true
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the Order that the Fulfillment belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that the fulfillment may belong to.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
provider_id:
|
||||
description: >-
|
||||
The ID of the Fulfillment Provider responsible for handling the
|
||||
fulfillment.
|
||||
type: string
|
||||
example: manual
|
||||
provider:
|
||||
description: >-
|
||||
The details of the fulfillment provider responsible for handling the
|
||||
fulfillment.
|
||||
x-expandable: provider
|
||||
nullable: true
|
||||
$ref: ./FulfillmentProvider.yaml
|
||||
location_id:
|
||||
description: The ID of the stock location the fulfillment will be shipped from
|
||||
nullable: true
|
||||
type: string
|
||||
example: sloc_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
items:
|
||||
description: >-
|
||||
The Fulfillment Items in the Fulfillment. These hold information about how
|
||||
many of each Line Item has been fulfilled.
|
||||
type: array
|
||||
x-expandable: items
|
||||
items:
|
||||
$ref: ./FulfillmentItem.yaml
|
||||
tracking_links:
|
||||
description: >-
|
||||
The Tracking Links that can be used to track the status of the
|
||||
Fulfillment. These will usually be provided by the Fulfillment Provider.
|
||||
type: array
|
||||
x-expandable: tracking_links
|
||||
items:
|
||||
$ref: ./TrackingLink.yaml
|
||||
tracking_numbers:
|
||||
description: >-
|
||||
The tracking numbers that can be used to track the status of the
|
||||
fulfillment.
|
||||
deprecated: true
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
data:
|
||||
description: >-
|
||||
This contains all the data necessary for the Fulfillment provider to
|
||||
handle the fulfillment.
|
||||
type: object
|
||||
example: {}
|
||||
shipped_at:
|
||||
description: The date with timezone at which the Fulfillment was shipped.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
no_notification:
|
||||
description: >-
|
||||
Flag for describing whether or not notifications related to this should be
|
||||
sent.
|
||||
nullable: true
|
||||
type: boolean
|
||||
example: false
|
||||
canceled_at:
|
||||
description: The date with timezone at which the Fulfillment was canceled.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
idempotency_key:
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the fulfillment
|
||||
in case of failure.
|
||||
nullable: true
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,30 @@
|
||||
title: Fulfillment Item
|
||||
description: This represents the association between a Line Item and a Fulfillment.
|
||||
type: object
|
||||
required:
|
||||
- fulfillment_id
|
||||
- item_id
|
||||
- quantity
|
||||
properties:
|
||||
fulfillment_id:
|
||||
description: The ID of the Fulfillment that the Fulfillment Item belongs to.
|
||||
type: string
|
||||
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
|
||||
item_id:
|
||||
description: The ID of the Line Item that the Fulfillment Item references.
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
fulfillment:
|
||||
description: The details of the fulfillment.
|
||||
x-expandable: fulfillment
|
||||
nullable: true
|
||||
type: object
|
||||
item:
|
||||
description: The details of the line item.
|
||||
x-expandable: item
|
||||
nullable: true
|
||||
$ref: ./LineItem.yaml
|
||||
quantity:
|
||||
description: The quantity of the Line Item that is included in the Fulfillment.
|
||||
type: integer
|
||||
example: 1
|
||||
@@ -0,0 +1,21 @@
|
||||
title: Fulfillment Provider
|
||||
description: >-
|
||||
A fulfillment provider represents a fulfillment service installed in the
|
||||
Medusa backend, either through a plugin or backend customizations. It holds
|
||||
the fulfillment service's installation status.
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- is_installed
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the fulfillment provider as given by the fulfillment service.
|
||||
type: string
|
||||
example: manual
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the fulfillment service is installed in the current version. If a
|
||||
fulfillment service is no longer installed, the `is_installed` attribute
|
||||
is set to `false`.
|
||||
type: boolean
|
||||
default: true
|
||||
@@ -0,0 +1,96 @@
|
||||
title: Gift Card
|
||||
description: >-
|
||||
Gift Cards are redeemable and represent a value that can be used towards the
|
||||
payment of an Order.
|
||||
type: object
|
||||
required:
|
||||
- balance
|
||||
- code
|
||||
- created_at
|
||||
- deleted_at
|
||||
- ends_at
|
||||
- id
|
||||
- is_disabled
|
||||
- metadata
|
||||
- order_id
|
||||
- region_id
|
||||
- tax_rate
|
||||
- updated_at
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The gift card's ID
|
||||
type: string
|
||||
example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ
|
||||
code:
|
||||
description: >-
|
||||
The unique code that identifies the Gift Card. This is used by the
|
||||
Customer to redeem the value of the Gift Card.
|
||||
type: string
|
||||
example: 3RFT-MH2C-Y4YZ-XMN4
|
||||
value:
|
||||
description: The value that the Gift Card represents.
|
||||
type: integer
|
||||
example: 10
|
||||
balance:
|
||||
description: The remaining value on the Gift Card.
|
||||
type: integer
|
||||
example: 10
|
||||
region_id:
|
||||
description: The ID of the region this gift card is available in.
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region this gift card is available in.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
$ref: ./Region.yaml
|
||||
order_id:
|
||||
description: The ID of the order that the gift card was purchased in.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that the gift card was purchased in.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
type: object
|
||||
is_disabled:
|
||||
description: >-
|
||||
Whether the Gift Card has been disabled. Disabled Gift Cards cannot be
|
||||
applied to carts.
|
||||
type: boolean
|
||||
default: false
|
||||
ends_at:
|
||||
description: The time at which the Gift Card can no longer be used.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
tax_rate:
|
||||
description: The gift card's tax rate that will be applied on calculating totals
|
||||
nullable: true
|
||||
type: number
|
||||
example: 0
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,54 @@
|
||||
title: Gift Card Transaction
|
||||
description: >-
|
||||
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
|
||||
their Order.
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- created_at
|
||||
- gift_card_id
|
||||
- id
|
||||
- is_taxable
|
||||
- order_id
|
||||
- tax_rate
|
||||
properties:
|
||||
id:
|
||||
description: The gift card transaction's ID
|
||||
type: string
|
||||
example: gct_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
gift_card_id:
|
||||
description: The ID of the Gift Card that was used in the transaction.
|
||||
type: string
|
||||
example: gift_01G8XKBPBQY2R7RBET4J7E0XQZ
|
||||
gift_card:
|
||||
description: The details of the gift card associated used in this transaction.
|
||||
x-expandable: gift_card
|
||||
nullable: true
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the order that the gift card was used for payment.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that the gift card was used for payment.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
amount:
|
||||
description: The amount that was used from the Gift Card.
|
||||
type: integer
|
||||
example: 10
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
is_taxable:
|
||||
description: Whether the transaction is taxable or not.
|
||||
nullable: true
|
||||
type: boolean
|
||||
example: false
|
||||
tax_rate:
|
||||
description: The tax rate of the transaction
|
||||
nullable: true
|
||||
type: number
|
||||
example: 0
|
||||
@@ -0,0 +1,69 @@
|
||||
title: Idempotency Key
|
||||
description: >-
|
||||
Idempotency Key is used to continue a process in case of any failure that
|
||||
might occur.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- id
|
||||
- idempotency_key
|
||||
- locked_at
|
||||
- recovery_point
|
||||
- response_code
|
||||
- response_body
|
||||
- request_method
|
||||
- request_params
|
||||
- request_path
|
||||
properties:
|
||||
id:
|
||||
description: The idempotency key's ID
|
||||
type: string
|
||||
example: ikey_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
idempotency_key:
|
||||
description: >-
|
||||
The unique randomly generated key used to determine the state of a
|
||||
process.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
description: Date which the idempotency key was locked.
|
||||
type: string
|
||||
format: date-time
|
||||
locked_at:
|
||||
description: Date which the idempotency key was locked.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
request_method:
|
||||
description: The method of the request
|
||||
nullable: true
|
||||
type: string
|
||||
example: POST
|
||||
request_params:
|
||||
description: The parameters passed to the request
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
request_path:
|
||||
description: The request's path
|
||||
nullable: true
|
||||
type: string
|
||||
example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete
|
||||
response_code:
|
||||
description: The response's code.
|
||||
nullable: true
|
||||
type: string
|
||||
example: 200
|
||||
response_body:
|
||||
description: The response's body
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
recovery_point:
|
||||
description: Where to continue from.
|
||||
type: string
|
||||
default: started
|
||||
@@ -0,0 +1,44 @@
|
||||
title: Image
|
||||
description: >-
|
||||
An Image is used to store details about uploaded images. Images are uploaded
|
||||
by the File Service, and the URL is provided by the File Service.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- updated_at
|
||||
- url
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The image's ID
|
||||
example: img_01G749BFYR6T8JTVW6SGW3K3E6
|
||||
url:
|
||||
description: The URL at which the image file can be found.
|
||||
type: string
|
||||
format: uri
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,78 @@
|
||||
type: object
|
||||
required:
|
||||
- sku
|
||||
properties:
|
||||
sku:
|
||||
description: The Stock Keeping Unit (SKU) code of the Inventory Item.
|
||||
type: string
|
||||
hs_code:
|
||||
description: >-
|
||||
The Harmonized System code of the Inventory Item. May be used by
|
||||
Fulfillment Providers to pass customs information to shipping carriers.
|
||||
type: string
|
||||
origin_country:
|
||||
description: >-
|
||||
The country in which the Inventory Item was produced. May be used by
|
||||
Fulfillment Providers to pass customs information to shipping carriers.
|
||||
type: string
|
||||
mid_code:
|
||||
description: >-
|
||||
The Manufacturers Identification code that identifies the manufacturer of
|
||||
the Inventory Item. May be used by Fulfillment Providers to pass customs
|
||||
information to shipping carriers.
|
||||
type: string
|
||||
title:
|
||||
description: Title of the inventory item
|
||||
type: string
|
||||
description:
|
||||
description: Description of the inventory item
|
||||
type: string
|
||||
thumbnail:
|
||||
description: Thumbnail for the inventory item
|
||||
type: string
|
||||
material:
|
||||
description: >-
|
||||
The material and composition that the Inventory Item is made of, May be
|
||||
used by Fulfillment Providers to pass customs information to shipping
|
||||
carriers.
|
||||
type: string
|
||||
weight:
|
||||
description: >-
|
||||
The weight of the Inventory Item. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
height:
|
||||
description: >-
|
||||
The height of the Inventory Item. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
width:
|
||||
description: >-
|
||||
The width of the Inventory Item. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
length:
|
||||
description: >-
|
||||
The length of the Inventory Item. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
requires_shipping:
|
||||
description: Whether the item requires shipping.
|
||||
type: boolean
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
@@ -0,0 +1,37 @@
|
||||
type: object
|
||||
required:
|
||||
- inventory_item_id
|
||||
- location_id
|
||||
- stocked_quantity
|
||||
- reserved_quantity
|
||||
- incoming_quantity
|
||||
properties:
|
||||
location_id:
|
||||
description: the item location ID
|
||||
type: string
|
||||
stocked_quantity:
|
||||
description: the total stock quantity of an inventory item at the given location ID
|
||||
type: number
|
||||
reserved_quantity:
|
||||
description: the reserved stock quantity of an inventory item at the given location ID
|
||||
type: number
|
||||
incoming_quantity:
|
||||
description: the incoming stock quantity of an inventory item at the given location ID
|
||||
type: number
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
@@ -0,0 +1,68 @@
|
||||
title: Invite
|
||||
description: >-
|
||||
An invite is created when an admin user invites a new user to join the store's
|
||||
team. Once the invite is accepted, it's deleted.
|
||||
type: object
|
||||
required:
|
||||
- accepted
|
||||
- created_at
|
||||
- deleted_at
|
||||
- expires_at
|
||||
- id
|
||||
- metadata
|
||||
- role
|
||||
- token
|
||||
- updated_at
|
||||
- user_email
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The invite's ID
|
||||
example: invite_01G8TKE4XYCTHSCK2GDEP47RE1
|
||||
user_email:
|
||||
description: The email of the user being invited.
|
||||
type: string
|
||||
format: email
|
||||
role:
|
||||
description: The user's role. These roles don't change the privileges of the user.
|
||||
nullable: true
|
||||
type: string
|
||||
enum:
|
||||
- admin
|
||||
- member
|
||||
- developer
|
||||
default: member
|
||||
accepted:
|
||||
description: Whether the invite was accepted or not.
|
||||
type: boolean
|
||||
default: false
|
||||
token:
|
||||
description: The token used to accept the invite.
|
||||
type: string
|
||||
expires_at:
|
||||
description: The date the invite expires at.
|
||||
type: string
|
||||
format: date-time
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,243 @@
|
||||
title: Line Item
|
||||
description: >-
|
||||
Line Items are created when a product is added to a Cart. When Line Items are
|
||||
purchased they will get copied to the resulting order, swap, or claim, and can
|
||||
eventually be referenced in Fulfillments and Returns. Line items may also be
|
||||
used for order edits.
|
||||
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
|
||||
- updated_at
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
description: The line item's ID
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
cart_id:
|
||||
description: The ID of the cart that the line item may belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: The details of the cart that the line item may belongs to.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the order that the line item may belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that the line item may belongs to.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
swap_id:
|
||||
description: The ID of the swap that the line item may belong to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: The details of the swap that the line item may belong to.
|
||||
x-expandable: swap
|
||||
nullable: true
|
||||
type: object
|
||||
claim_order_id:
|
||||
description: The ID of the claim that the line item may belong to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: The details of the claim that the line item may belong to.
|
||||
x-expandable: claim_order
|
||||
nullable: true
|
||||
type: object
|
||||
tax_lines:
|
||||
description: The details of the item's tax lines.
|
||||
x-expandable: tax_lines
|
||||
type: array
|
||||
items:
|
||||
$ref: ./LineItemTaxLine.yaml
|
||||
adjustments:
|
||||
description: >-
|
||||
The details of the item's adjustments, which are available when a discount
|
||||
is applied on the item.
|
||||
x-expandable: adjustments
|
||||
type: array
|
||||
items:
|
||||
$ref: ./LineItemAdjustment.yaml
|
||||
original_item_id:
|
||||
description: >-
|
||||
The ID of the original line item. This is useful if the line item belongs
|
||||
to a resource that references an order, such as a return or an order edit.
|
||||
nullable: true
|
||||
type: string
|
||||
order_edit_id:
|
||||
description: The ID of the order edit that the item may belong to.
|
||||
nullable: true
|
||||
type: string
|
||||
order_edit:
|
||||
description: The details of the order edit.
|
||||
x-expandable: order_edit
|
||||
nullable: true
|
||||
type: object
|
||||
title:
|
||||
description: The title of the Line Item.
|
||||
type: string
|
||||
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
|
||||
default: false
|
||||
is_giftcard:
|
||||
description: Flag to indicate if the Line Item is a Gift Card.
|
||||
type: boolean
|
||||
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
|
||||
default: true
|
||||
allow_discounts:
|
||||
description: >-
|
||||
Flag to indicate if the Line Item should be included when doing discount
|
||||
calculations.
|
||||
type: boolean
|
||||
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:
|
||||
description: >-
|
||||
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: 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: The details of the product variant that this item was created from.
|
||||
x-expandable: variant
|
||||
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:
|
||||
description: >-
|
||||
The amount that can be refunded from the given Line Item. Takes taxes and
|
||||
discounts into consideration.
|
||||
type: integer
|
||||
example: 0
|
||||
subtotal:
|
||||
description: The subtotal of the line item
|
||||
type: integer
|
||||
example: 8000
|
||||
tax_total:
|
||||
description: The total of tax of the line item
|
||||
type: integer
|
||||
example: 0
|
||||
total:
|
||||
description: The total amount of the line item
|
||||
type: integer
|
||||
example: 8000
|
||||
original_total:
|
||||
description: The original total amount of the line item
|
||||
type: integer
|
||||
example: 8000
|
||||
original_tax_total:
|
||||
description: The original tax total amount of the line item
|
||||
type: integer
|
||||
example: 0
|
||||
discount_total:
|
||||
description: The total of discount of the line item rounded
|
||||
type: integer
|
||||
example: 0
|
||||
raw_discount_total:
|
||||
description: The total of discount of the line item
|
||||
type: integer
|
||||
example: 0
|
||||
gift_card_total:
|
||||
description: The total of the gift card of the line item
|
||||
type: integer
|
||||
example: 0
|
||||
includes_tax:
|
||||
description: Indicates if the line item unit_price include tax
|
||||
x-featureFlag: tax_inclusive_pricing
|
||||
type: boolean
|
||||
default: false
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,52 @@
|
||||
title: Line Item Adjustment
|
||||
description: A Line Item Adjustment includes details on discounts applied on a line item.
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- description
|
||||
- discount_id
|
||||
- id
|
||||
- item_id
|
||||
- metadata
|
||||
properties:
|
||||
id:
|
||||
description: The Line Item Adjustment's ID
|
||||
type: string
|
||||
example: lia_01G8TKE4XYCTHSCK2GDEP47RE1
|
||||
item_id:
|
||||
description: The ID of the line item
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
item:
|
||||
description: The details of the line item.
|
||||
x-expandable: item
|
||||
nullable: true
|
||||
type: object
|
||||
description:
|
||||
description: The line item's adjustment description
|
||||
type: string
|
||||
example: Adjusted item's price.
|
||||
discount_id:
|
||||
description: The ID of the discount associated with the adjustment
|
||||
nullable: true
|
||||
type: string
|
||||
example: disc_01F0YESMW10MGHWJKZSDDMN0VN
|
||||
discount:
|
||||
description: The details of the discount associated with the adjustment.
|
||||
x-expandable: discount
|
||||
nullable: true
|
||||
$ref: ./Discount.yaml
|
||||
amount:
|
||||
description: The adjustment amount
|
||||
type: number
|
||||
example: 1000
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,57 @@
|
||||
title: Line Item Tax Line
|
||||
description: A Line Item Tax Line represents the taxes applied on a line item.
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- created_at
|
||||
- id
|
||||
- item_id
|
||||
- metadata
|
||||
- name
|
||||
- rate
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The line item tax line's ID
|
||||
type: string
|
||||
example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
|
||||
code:
|
||||
description: A code to identify the tax type by
|
||||
nullable: true
|
||||
type: string
|
||||
example: tax01
|
||||
name:
|
||||
description: A human friendly name for the tax
|
||||
type: string
|
||||
example: Tax Example
|
||||
rate:
|
||||
description: The numeric rate to charge tax by
|
||||
type: number
|
||||
example: 10
|
||||
item_id:
|
||||
description: The ID of the line item
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
item:
|
||||
description: The details of the line item.
|
||||
x-expandable: item
|
||||
nullable: true
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,13 @@
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- module
|
||||
- resolution
|
||||
properties:
|
||||
module:
|
||||
description: The key of the module.
|
||||
type: string
|
||||
resolution:
|
||||
description: The resolution path of the module or false if module is not installed.
|
||||
type: string
|
||||
@@ -0,0 +1,101 @@
|
||||
title: Money Amount
|
||||
description: >-
|
||||
A Money Amount represent a price amount, for example, a product variant's
|
||||
price or a price in a price list. Each Money Amount either has a Currency or
|
||||
Region associated with it to indicate the pricing in a given Currency or, for
|
||||
fully region-based pricing, the given price in a specific Region. If
|
||||
region-based pricing is used, the amount will be in the currency defined for
|
||||
the Region.
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- created_at
|
||||
- currency_code
|
||||
- deleted_at
|
||||
- id
|
||||
- max_quantity
|
||||
- min_quantity
|
||||
- price_list_id
|
||||
- region_id
|
||||
- updated_at
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
description: The money amount's ID
|
||||
type: string
|
||||
example: ma_01F0YESHRFQNH5S8Q0PK84YYZN
|
||||
currency_code:
|
||||
description: The 3 character currency code that the money amount may belong to.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: The details of the currency that the money amount may belong to.
|
||||
x-expandable: currency
|
||||
nullable: true
|
||||
$ref: ./Currency.yaml
|
||||
amount:
|
||||
description: >-
|
||||
The amount in the smallest currecny unit (e.g. cents 100 cents to charge
|
||||
$1) that the Product Variant will cost.
|
||||
type: integer
|
||||
example: 100
|
||||
min_quantity:
|
||||
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:
|
||||
description: The ID of the price list that the money amount may belong to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: pl_01G8X3CKJXCG5VXVZ87H9KC09W
|
||||
price_list:
|
||||
description: The details of the price list that the money amount may belong to.
|
||||
x-expandable: price_list
|
||||
nullable: true
|
||||
type: object
|
||||
variant_id:
|
||||
description: The ID of the Product Variant contained in the Line Item.
|
||||
nullable: true
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: The details of the product variant that the money amount may belong to.
|
||||
x-expandable: variant
|
||||
nullable: true
|
||||
type: object
|
||||
region_id:
|
||||
description: The region's ID
|
||||
nullable: true
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region that the money amount may belong to.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -0,0 +1,13 @@
|
||||
title: Multiple Errors
|
||||
type: object
|
||||
properties:
|
||||
errors:
|
||||
type: array
|
||||
description: Array of errors
|
||||
items:
|
||||
$ref: ./Error.yaml
|
||||
message:
|
||||
type: string
|
||||
default: >-
|
||||
Provided request body contains errors. Please check the data and retry the
|
||||
request
|
||||
@@ -0,0 +1,62 @@
|
||||
title: Note
|
||||
description: >-
|
||||
A Note is an element that can be used in association with different resources
|
||||
to allow admin users to describe additional information. For example, they can
|
||||
be used to add additional information about orders.
|
||||
type: object
|
||||
required:
|
||||
- author_id
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- resource_id
|
||||
- resource_type
|
||||
- updated_at
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The note's ID
|
||||
type: string
|
||||
example: note_01G8TM8ENBMC7R90XRR1G6H26Q
|
||||
resource_type:
|
||||
description: The type of resource that the Note refers to.
|
||||
type: string
|
||||
example: order
|
||||
resource_id:
|
||||
description: The ID of the resource that the Note refers to.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
value:
|
||||
description: The contents of the note.
|
||||
type: string
|
||||
example: This order must be fulfilled on Monday
|
||||
author_id:
|
||||
description: The ID of the user that created the note.
|
||||
nullable: true
|
||||
type: string
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
author:
|
||||
description: The details of the user that created the note.
|
||||
x-expandable: author
|
||||
nullable: true
|
||||
$ref: ./User.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,93 @@
|
||||
title: Notification
|
||||
description: >-
|
||||
A notification is an alert sent, typically to customers, using the installed
|
||||
Notification Provider as a reaction to internal events such as `order.placed`.
|
||||
Notifications can be resent.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- customer_id
|
||||
- data
|
||||
- event_name
|
||||
- id
|
||||
- parent_id
|
||||
- provider_id
|
||||
- resource_type
|
||||
- resource_id
|
||||
- to
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
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:
|
||||
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 this notification was sent to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: The details of the customer that this notification was sent to.
|
||||
x-expandable: customer
|
||||
nullable: true
|
||||
$ref: ./Customer.yaml
|
||||
to:
|
||||
description: >-
|
||||
The address that the Notification was sent to. This will usually be an
|
||||
email address, but can 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 notification's parent ID
|
||||
nullable: true
|
||||
type: string
|
||||
example: noti_01G53V9Y6CKMCGBM1P0X7C28RX
|
||||
parent_notification:
|
||||
description: The details of the parent notification.
|
||||
x-expandable: parent_notification
|
||||
nullable: true
|
||||
type: object
|
||||
resends:
|
||||
description: The details of all resends of the notification.
|
||||
type: array
|
||||
x-expandable: resends
|
||||
items:
|
||||
type: object
|
||||
provider_id:
|
||||
description: The ID of the notification provider used to send the notification.
|
||||
nullable: true
|
||||
type: string
|
||||
example: sengrid
|
||||
provider:
|
||||
description: The notification provider used to send the notification.
|
||||
x-expandable: provider
|
||||
nullable: true
|
||||
$ref: ./NotificationProvider.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
|
||||
@@ -0,0 +1,21 @@
|
||||
title: Notification Provider
|
||||
description: >-
|
||||
A notification provider represents a notification service installed in the
|
||||
Medusa backend, either through a plugin or backend customizations. It holds
|
||||
the notification service's installation status.
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- is_installed
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the notification provider as given by the notification service.
|
||||
type: string
|
||||
example: sendgrid
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the notification service is installed in the current version. If a
|
||||
notification service is no longer installed, the `is_installed` attribute
|
||||
is set to `false`.
|
||||
type: boolean
|
||||
default: true
|
||||
@@ -0,0 +1,40 @@
|
||||
title: OAuth
|
||||
description: >-
|
||||
An Oauth app is typically created by a plugin to handle authentication to
|
||||
third-party services.
|
||||
type: object
|
||||
required:
|
||||
- application_name
|
||||
- data
|
||||
- display_name
|
||||
- id
|
||||
- install_url
|
||||
- uninstall_url
|
||||
properties:
|
||||
id:
|
||||
description: The app's ID
|
||||
type: string
|
||||
example: example_app
|
||||
display_name:
|
||||
description: The app's display name
|
||||
type: string
|
||||
example: Example app
|
||||
application_name:
|
||||
description: The app's name
|
||||
type: string
|
||||
example: example
|
||||
install_url:
|
||||
description: The URL to install the app
|
||||
nullable: true
|
||||
type: string
|
||||
format: uri
|
||||
uninstall_url:
|
||||
description: The URL to uninstall the app
|
||||
nullable: true
|
||||
type: string
|
||||
format: uri
|
||||
data:
|
||||
description: Any data necessary to the app.
|
||||
nullable: true
|
||||
type: object
|
||||
example: {}
|
||||
331
www/apps/api-reference/specs/store/components/schemas/Order.yaml
Normal file
331
www/apps/api-reference/specs/store/components/schemas/Order.yaml
Normal file
@@ -0,0 +1,331 @@
|
||||
title: Order
|
||||
description: >-
|
||||
An order is a purchase made by a customer. It holds details about payment and
|
||||
fulfillment of the order. An order may also be created from a draft order,
|
||||
which is created by an admin user.
|
||||
type: object
|
||||
required:
|
||||
- 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:
|
||||
description: The order's ID
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
status:
|
||||
description: The order's status
|
||||
type: string
|
||||
enum:
|
||||
- pending
|
||||
- completed
|
||||
- archived
|
||||
- canceled
|
||||
- requires_action
|
||||
default: pending
|
||||
fulfillment_status:
|
||||
description: The order's fulfillment status
|
||||
type: string
|
||||
enum:
|
||||
- not_fulfilled
|
||||
- partially_fulfilled
|
||||
- fulfilled
|
||||
- partially_shipped
|
||||
- shipped
|
||||
- partially_returned
|
||||
- returned
|
||||
- canceled
|
||||
- requires_action
|
||||
default: not_fulfilled
|
||||
payment_status:
|
||||
description: The order's payment status
|
||||
type: string
|
||||
enum:
|
||||
- not_paid
|
||||
- awaiting
|
||||
- captured
|
||||
- partially_refunded
|
||||
- refunded
|
||||
- canceled
|
||||
- requires_action
|
||||
default: not_paid
|
||||
display_id:
|
||||
description: The order's display ID
|
||||
type: integer
|
||||
example: 2
|
||||
cart_id:
|
||||
description: The ID of the cart associated with the order
|
||||
nullable: true
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: The details of the cart associated with the order.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
type: object
|
||||
customer_id:
|
||||
description: The ID of the customer associated with the order
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: The details of the customer associated with the order.
|
||||
x-expandable: customer
|
||||
nullable: true
|
||||
type: object
|
||||
email:
|
||||
description: The email associated with the order
|
||||
type: string
|
||||
format: email
|
||||
billing_address_id:
|
||||
description: The ID of the billing address associated with the order
|
||||
nullable: true
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
billing_address:
|
||||
description: The details of the billing address associated with the order.
|
||||
x-expandable: billing_address
|
||||
nullable: true
|
||||
$ref: ./Address.yaml
|
||||
shipping_address_id:
|
||||
description: The ID of the shipping address associated with the order
|
||||
nullable: true
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: The details of the shipping address associated with the order.
|
||||
x-expandable: shipping_address
|
||||
nullable: true
|
||||
$ref: ./Address.yaml
|
||||
region_id:
|
||||
description: The ID of the region this order was created in.
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region this order was created in.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
$ref: ./Region.yaml
|
||||
currency_code:
|
||||
description: The 3 character currency code that is used in the order
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: The details of the currency used in the order.
|
||||
x-expandable: currency
|
||||
nullable: true
|
||||
$ref: ./Currency.yaml
|
||||
tax_rate:
|
||||
description: The order's tax rate
|
||||
nullable: true
|
||||
type: number
|
||||
example: 0
|
||||
discounts:
|
||||
description: The details of the discounts applied on the order.
|
||||
type: array
|
||||
x-expandable: discounts
|
||||
items:
|
||||
$ref: ./Discount.yaml
|
||||
gift_cards:
|
||||
description: The details of the gift card used in the order.
|
||||
type: array
|
||||
x-expandable: gift_cards
|
||||
items:
|
||||
$ref: ./GiftCard.yaml
|
||||
shipping_methods:
|
||||
description: The details of the shipping methods used in the order.
|
||||
type: array
|
||||
x-expandable: shipping_methods
|
||||
items:
|
||||
$ref: ./ShippingMethod.yaml
|
||||
payments:
|
||||
description: The details of the payments used in the order.
|
||||
type: array
|
||||
x-expandable: payments
|
||||
items:
|
||||
type: object
|
||||
fulfillments:
|
||||
description: The details of the fulfillments created for the order.
|
||||
type: array
|
||||
x-expandable: fulfillments
|
||||
items:
|
||||
type: object
|
||||
returns:
|
||||
description: The details of the returns created for the order.
|
||||
type: array
|
||||
x-expandable: returns
|
||||
items:
|
||||
type: object
|
||||
claims:
|
||||
description: The details of the claims created for the order.
|
||||
type: array
|
||||
x-expandable: claims
|
||||
items:
|
||||
type: object
|
||||
refunds:
|
||||
description: The details of the refunds created for the order.
|
||||
type: array
|
||||
x-expandable: refunds
|
||||
items:
|
||||
type: object
|
||||
swaps:
|
||||
description: The details of the swaps created for the order.
|
||||
type: array
|
||||
x-expandable: swaps
|
||||
items:
|
||||
type: object
|
||||
draft_order_id:
|
||||
description: The ID of the draft order this order was created from.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
draft_order:
|
||||
description: The details of the draft order this order was created from.
|
||||
x-expandable: draft_order
|
||||
nullable: true
|
||||
type: object
|
||||
items:
|
||||
description: The details of the line items that belong to the order.
|
||||
x-expandable: items
|
||||
type: array
|
||||
items:
|
||||
$ref: ./LineItem.yaml
|
||||
edits:
|
||||
description: The details of the order edits done on the order.
|
||||
type: array
|
||||
x-expandable: edits
|
||||
items:
|
||||
type: object
|
||||
gift_card_transactions:
|
||||
description: The gift card transactions made in the order.
|
||||
type: array
|
||||
x-expandable: gift_card_transactions
|
||||
items:
|
||||
$ref: ./GiftCardTransaction.yaml
|
||||
canceled_at:
|
||||
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:
|
||||
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/development/idempotency-key/overview.md
|
||||
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:
|
||||
description: The ID of the sales channel this order belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
sales_channel:
|
||||
description: The details of the sales channel this order belongs to.
|
||||
x-expandable: sales_channel
|
||||
nullable: true
|
||||
$ref: ./SalesChannel.yaml
|
||||
shipping_total:
|
||||
type: integer
|
||||
description: The total of shipping
|
||||
example: 1000
|
||||
raw_discount_total:
|
||||
description: The total of discount
|
||||
type: integer
|
||||
example: 800
|
||||
discount_total:
|
||||
description: The total of discount rounded
|
||||
type: integer
|
||||
example: 800
|
||||
tax_total:
|
||||
description: The total of tax
|
||||
type: integer
|
||||
example: 0
|
||||
refunded_total:
|
||||
description: The total amount refunded if the order is returned.
|
||||
type: integer
|
||||
example: 0
|
||||
total:
|
||||
description: The total amount of the order
|
||||
type: integer
|
||||
example: 8200
|
||||
subtotal:
|
||||
description: The subtotal of the order
|
||||
type: integer
|
||||
example: 8000
|
||||
paid_total:
|
||||
description: The total amount paid
|
||||
type: integer
|
||||
example: 8000
|
||||
refundable_amount:
|
||||
description: The amount that can be refunded
|
||||
type: integer
|
||||
example: 8200
|
||||
gift_card_total:
|
||||
description: The total of gift cards
|
||||
type: integer
|
||||
example: 0
|
||||
gift_card_tax_total:
|
||||
description: The total of gift cards with taxes
|
||||
type: integer
|
||||
example: 0
|
||||
returnable_items:
|
||||
description: >-
|
||||
The details of the line items that are returnable as part of the order,
|
||||
swaps, or claims
|
||||
type: array
|
||||
x-expandable: returnable_items
|
||||
items:
|
||||
$ref: ./LineItem.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,170 @@
|
||||
title: Order Edit
|
||||
description: >-
|
||||
Order edit allows modifying items in an order, such as adding, updating, or
|
||||
deleting items from the original order. Once the order edit is confirmed, the
|
||||
changes are reflected on the original order.
|
||||
type: object
|
||||
required:
|
||||
- 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:
|
||||
description: The order edit's ID
|
||||
type: string
|
||||
example: oe_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order_id:
|
||||
description: The ID of the order that is edited
|
||||
type: string
|
||||
example: order_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
order:
|
||||
description: The details of the order that this order edit was created for.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
changes:
|
||||
description: The details of all the changes on the original order's line items.
|
||||
x-expandable: changes
|
||||
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:
|
||||
description: The unique identifier of the user or customer who created the order edit.
|
||||
type: string
|
||||
requested_by:
|
||||
description: >-
|
||||
The unique identifier of the user or customer who requested the order
|
||||
edit.
|
||||
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:
|
||||
description: >-
|
||||
The unique identifier of the user or customer who confirmed the order
|
||||
edit.
|
||||
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:
|
||||
description: The unique identifier of the user or customer who declined the order edit.
|
||||
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:
|
||||
description: The total of subtotal
|
||||
type: integer
|
||||
example: 8000
|
||||
discount_total:
|
||||
description: The total of discount
|
||||
type: integer
|
||||
example: 800
|
||||
shipping_total:
|
||||
description: The total of the shipping amount
|
||||
type: integer
|
||||
example: 800
|
||||
gift_card_total:
|
||||
description: The total of the gift card amount
|
||||
type: integer
|
||||
example: 800
|
||||
gift_card_tax_total:
|
||||
description: The total of the gift card tax amount
|
||||
type: integer
|
||||
example: 800
|
||||
tax_total:
|
||||
description: The total of tax
|
||||
type: integer
|
||||
example: 0
|
||||
total:
|
||||
description: The total amount of the edited order.
|
||||
type: integer
|
||||
example: 8200
|
||||
difference_due:
|
||||
description: >-
|
||||
The difference between the total amount of the order and total amount of
|
||||
edited order.
|
||||
type: integer
|
||||
example: 8200
|
||||
status:
|
||||
description: The status of the order edit.
|
||||
type: string
|
||||
enum:
|
||||
- confirmed
|
||||
- declined
|
||||
- requested
|
||||
- created
|
||||
- canceled
|
||||
items:
|
||||
description: >-
|
||||
The details of the cloned items from the original order with the new
|
||||
changes. Once the order edit is confirmed, these line items are associated
|
||||
with the original order.
|
||||
type: array
|
||||
x-expandable: items
|
||||
items:
|
||||
$ref: ./LineItem.yaml
|
||||
payment_collection_id:
|
||||
description: The ID of the payment collection
|
||||
nullable: true
|
||||
type: string
|
||||
example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
payment_collection:
|
||||
description: >-
|
||||
The details of the payment collection used to authorize additional payment
|
||||
if necessary.
|
||||
x-expandable: payment_collection
|
||||
nullable: true
|
||||
$ref: ./PaymentCollection.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
|
||||
@@ -0,0 +1,73 @@
|
||||
title: Order Item Change
|
||||
description: >-
|
||||
An order item change is a change made within an order edit to an order's
|
||||
items. These changes are not reflected on the original order until the order
|
||||
edit is confirmed.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- line_item_id
|
||||
- order_edit_id
|
||||
- original_line_item_id
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The order item change's ID
|
||||
type: string
|
||||
example: oic_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
type:
|
||||
description: The order item change's status
|
||||
type: string
|
||||
enum:
|
||||
- item_add
|
||||
- item_remove
|
||||
- item_update
|
||||
order_edit_id:
|
||||
description: The ID of the order edit
|
||||
type: string
|
||||
example: oe_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
order_edit:
|
||||
description: The details of the order edit the item change is associated with.
|
||||
x-expandable: order_edit
|
||||
nullable: true
|
||||
type: object
|
||||
original_line_item_id:
|
||||
description: The ID of the original line item in the order
|
||||
nullable: true
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
original_line_item:
|
||||
description: >-
|
||||
The details of the original line item this item change references. This is
|
||||
used if the item change updates or deletes the original item.
|
||||
x-expandable: original_line_item
|
||||
nullable: true
|
||||
$ref: ./LineItem.yaml
|
||||
line_item_id:
|
||||
description: The ID of the cloned line item.
|
||||
nullable: true
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
line_item:
|
||||
description: >-
|
||||
The details of the resulting line item after the item change. This line
|
||||
item is then used in the original order once the order edit is confirmed.
|
||||
x-expandable: line_item
|
||||
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:
|
||||
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
|
||||
@@ -0,0 +1,133 @@
|
||||
title: Payment
|
||||
description: >-
|
||||
A payment is originally created from a payment session. Once a payment session
|
||||
is authorized, the payment is created to represent the authorized amount with
|
||||
a given payment method. Payments can be captured, canceled or refunded.
|
||||
Payments can be made towards orders, swaps, order edits, or other resources.
|
||||
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:
|
||||
description: The payment's ID
|
||||
type: string
|
||||
example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE
|
||||
swap_id:
|
||||
description: The ID of the swap that this payment was potentially created for.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: The details of the swap that this payment was potentially created for.
|
||||
x-expandable: swap
|
||||
nullable: true
|
||||
type: object
|
||||
cart_id:
|
||||
description: The ID of the cart that the payment session was potentially created for.
|
||||
nullable: true
|
||||
type: string
|
||||
cart:
|
||||
description: >-
|
||||
The details of the cart that the payment session was potentially created
|
||||
for.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the order that the payment session was potentially created for.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: >-
|
||||
The details of the order that the payment session was potentially created
|
||||
for.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
amount:
|
||||
description: The amount that the Payment has been authorized for.
|
||||
type: integer
|
||||
example: 100
|
||||
currency_code:
|
||||
description: The 3 character ISO currency code of the payment.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: The details of the currency of the payment.
|
||||
x-expandable: currency
|
||||
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
|
||||
type: string
|
||||
example: manual
|
||||
data:
|
||||
description: >-
|
||||
The data required for the Payment Provider to identify, modify and process
|
||||
the Payment. Typically this will be an object that holds an id to the
|
||||
external payment session, but can be an empty object if the Payment
|
||||
Provider doesn't hold any state.
|
||||
type: object
|
||||
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:
|
||||
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/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,113 @@
|
||||
title: Payment Collection
|
||||
description: >-
|
||||
A payment collection allows grouping and managing a list of payments at one.
|
||||
This can be helpful when making additional payment for order edits or
|
||||
integrating installment payments.
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- authorized_amount
|
||||
- created_at
|
||||
- created_by
|
||||
- currency_code
|
||||
- deleted_at
|
||||
- description
|
||||
- id
|
||||
- metadata
|
||||
- region_id
|
||||
- status
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The payment collection's ID
|
||||
type: string
|
||||
example: paycol_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
type:
|
||||
description: The type of the payment collection
|
||||
type: string
|
||||
enum:
|
||||
- order_edit
|
||||
status:
|
||||
description: The type of the payment collection
|
||||
type: string
|
||||
enum:
|
||||
- not_paid
|
||||
- awaiting
|
||||
- authorized
|
||||
- partially_authorized
|
||||
- canceled
|
||||
description:
|
||||
description: Description of the payment collection
|
||||
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 ID of the region this payment collection is associated with.
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region this payment collection is associated with.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
$ref: ./Region.yaml
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO code for the currency this payment collection is
|
||||
associated with.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: The details of the currency this payment collection is associated with.
|
||||
x-expandable: currency
|
||||
nullable: true
|
||||
$ref: ./Currency.yaml
|
||||
payment_sessions:
|
||||
description: >-
|
||||
The details of the payment sessions created as part of the payment
|
||||
collection.
|
||||
type: array
|
||||
x-expandable: payment_sessions
|
||||
items:
|
||||
$ref: ./PaymentSession.yaml
|
||||
payments:
|
||||
description: The details of the payments created as part of the payment collection.
|
||||
type: array
|
||||
x-expandable: payments
|
||||
items:
|
||||
$ref: ./Payment.yaml
|
||||
created_by:
|
||||
description: The ID of the user that created the payment collection.
|
||||
type: string
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,21 @@
|
||||
title: Payment Provider
|
||||
description: >-
|
||||
A payment provider represents a payment service installed in the Medusa
|
||||
backend, either through a plugin or backend customizations. It holds the
|
||||
payment service's installation status.
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- is_installed
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the payment provider as given by the payment service.
|
||||
type: string
|
||||
example: manual
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the payment service is installed in the current version. If a
|
||||
payment service is no longer installed, the `is_installed` attribute is
|
||||
set to `false`.
|
||||
type: boolean
|
||||
default: true
|
||||
@@ -0,0 +1,105 @@
|
||||
title: Payment Session
|
||||
description: >-
|
||||
A Payment Session is created when a Customer initilizes the checkout flow, and
|
||||
can be used to hold the state of a payment flow. Each Payment Session is
|
||||
controlled by a Payment Provider, which is responsible for the communication
|
||||
with external payment services. Authorized Payment Sessions will eventually
|
||||
get promoted to Payments to indicate that they are authorized for payment
|
||||
processing such as capture or refund. Payment sessions can also be used as
|
||||
part of payment collections.
|
||||
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:
|
||||
description: The payment session's ID
|
||||
type: string
|
||||
example: ps_01G901XNSRM2YS3ASN9H5KG3FZ
|
||||
cart_id:
|
||||
description: The ID of the cart that the payment session was created for.
|
||||
nullable: true
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: The details of the cart that the payment session was created for.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
$ref: ./Cart.yaml
|
||||
provider_id:
|
||||
description: The ID of the Payment Provider that is responsible for the Payment Session
|
||||
type: string
|
||||
example: manual
|
||||
is_selected:
|
||||
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:
|
||||
description: >-
|
||||
A flag to indicate if a communication with the third party provider has
|
||||
been initiated.
|
||||
type: boolean
|
||||
default: false
|
||||
example: true
|
||||
status:
|
||||
description: >-
|
||||
Indicates the status of the Payment Session. Will default to `pending`,
|
||||
and will eventually become `authorized`. Payment Sessions may have the
|
||||
status of `requires_more` to indicate that further actions are to be
|
||||
completed by the Customer.
|
||||
type: string
|
||||
enum:
|
||||
- authorized
|
||||
- pending
|
||||
- requires_more
|
||||
- error
|
||||
- canceled
|
||||
example: pending
|
||||
data:
|
||||
description: >-
|
||||
The data required for the Payment Provider to identify, modify and process
|
||||
the Payment Session. Typically this will be an object that holds an id to
|
||||
the external payment session, but can be an empty object if the Payment
|
||||
Provider doesn't hold any state.
|
||||
type: object
|
||||
example: {}
|
||||
idempotency_key:
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of a cart in case
|
||||
of failure.
|
||||
nullable: true
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
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:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -0,0 +1,83 @@
|
||||
title: Price List
|
||||
description: >-
|
||||
A Price List represents a set of prices that override the default price for
|
||||
one or more product variants.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- description
|
||||
- ends_at
|
||||
- id
|
||||
- name
|
||||
- starts_at
|
||||
- status
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The price list's ID
|
||||
type: string
|
||||
example: pl_01G8X3CKJXCG5VXVZ87H9KC09W
|
||||
name:
|
||||
description: The price list's name
|
||||
type: string
|
||||
example: VIP Prices
|
||||
description:
|
||||
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`.
|
||||
type: string
|
||||
enum:
|
||||
- sale
|
||||
- override
|
||||
default: sale
|
||||
status:
|
||||
description: The status of the Price List
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- draft
|
||||
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:
|
||||
description: The details of the customer groups that the Price List can apply to.
|
||||
type: array
|
||||
x-expandable: customer_groups
|
||||
items:
|
||||
$ref: ./CustomerGroup.yaml
|
||||
prices:
|
||||
description: The prices that belong to the price list, represented as a Money Amount.
|
||||
type: array
|
||||
x-expandable: prices
|
||||
items:
|
||||
$ref: ./MoneyAmount.yaml
|
||||
includes_tax:
|
||||
description: Whether the price list prices include tax
|
||||
type: boolean
|
||||
x-featureFlag: tax_inclusive_pricing
|
||||
default: false
|
||||
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
|
||||
@@ -0,0 +1,10 @@
|
||||
title: Priced Product
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./Product.yaml
|
||||
- type: object
|
||||
properties:
|
||||
variants:
|
||||
type: array
|
||||
items:
|
||||
$ref: ./PricedVariant.yaml
|
||||
@@ -0,0 +1,27 @@
|
||||
title: Priced Shipping Option
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./ShippingOption.yaml
|
||||
- type: object
|
||||
properties:
|
||||
price_incl_tax:
|
||||
type: number
|
||||
description: Price including taxes
|
||||
tax_rates:
|
||||
type: array
|
||||
description: An array of applied tax rates
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
rate:
|
||||
type: number
|
||||
description: The tax rate value
|
||||
name:
|
||||
type: string
|
||||
description: The name of the tax rate
|
||||
code:
|
||||
type: string
|
||||
description: The code of the tax rate
|
||||
tax_amount:
|
||||
type: number
|
||||
description: The taxes applied.
|
||||
@@ -0,0 +1,41 @@
|
||||
title: Priced Product Variant
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: ./ProductVariant.yaml
|
||||
- type: object
|
||||
properties:
|
||||
original_price:
|
||||
type: number
|
||||
description: >-
|
||||
The original price of the variant without any discounted prices
|
||||
applied.
|
||||
calculated_price:
|
||||
type: number
|
||||
description: The calculated price of the variant. Can be a discounted price.
|
||||
original_price_incl_tax:
|
||||
type: number
|
||||
description: The original price of the variant including taxes.
|
||||
calculated_price_incl_tax:
|
||||
type: number
|
||||
description: The calculated price of the variant including taxes.
|
||||
original_tax:
|
||||
type: number
|
||||
description: The taxes applied on the original price.
|
||||
calculated_tax:
|
||||
type: number
|
||||
description: The taxes applied on the calculated price.
|
||||
tax_rates:
|
||||
type: array
|
||||
description: An array of applied tax rates
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
rate:
|
||||
type: number
|
||||
description: The tax rate value
|
||||
name:
|
||||
type: string
|
||||
description: The name of the tax rate
|
||||
code:
|
||||
type: string
|
||||
description: The code of the tax rate
|
||||
@@ -0,0 +1,253 @@
|
||||
title: Product
|
||||
description: >-
|
||||
A product is a saleable item that holds general information such as name or
|
||||
description. It must include at least one Product Variant, where each product
|
||||
variant defines different options to purchase the product with (for example,
|
||||
different sizes or colors). The prices and inventory of the product are
|
||||
defined on the variant level.
|
||||
type: object
|
||||
required:
|
||||
- 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:
|
||||
description: The product's ID
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
title:
|
||||
description: A title that can be displayed for easy identification of the Product.
|
||||
type: string
|
||||
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:
|
||||
description: >-
|
||||
Whether the Product represents a Gift Card. Products that represent Gift
|
||||
Cards will automatically generate a redeemable Gift Card code once they
|
||||
are purchased.
|
||||
type: boolean
|
||||
default: false
|
||||
status:
|
||||
description: The status of the product
|
||||
type: string
|
||||
enum:
|
||||
- draft
|
||||
- proposed
|
||||
- published
|
||||
- rejected
|
||||
default: draft
|
||||
images:
|
||||
description: The details of the product's images.
|
||||
type: array
|
||||
x-expandable: images
|
||||
items:
|
||||
$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:
|
||||
description: >-
|
||||
The details of the Product Options that are defined for the Product. The
|
||||
product's variants will have a unique combination of values of the
|
||||
product's options.
|
||||
type: array
|
||||
x-expandable: options
|
||||
items:
|
||||
$ref: ./ProductOption.yaml
|
||||
variants:
|
||||
description: >-
|
||||
The details of the Product Variants that belong to the Product. Each will
|
||||
have a unique combination of values of the product's options.
|
||||
type: array
|
||||
x-expandable: variants
|
||||
items:
|
||||
$ref: ./ProductVariant.yaml
|
||||
categories:
|
||||
description: The details of the product categories that this product belongs to.
|
||||
type: array
|
||||
x-expandable: categories
|
||||
x-featureFlag: product_categories
|
||||
items:
|
||||
$ref: ./ProductCategory.yaml
|
||||
profile_id:
|
||||
description: >-
|
||||
The ID of the shipping profile that the product belongs to. The shipping
|
||||
profile has a set of defined shipping options that can be used to fulfill
|
||||
the product.
|
||||
type: string
|
||||
example: sp_01G1G5V239ENSZ5MV4JAR737BM
|
||||
profile:
|
||||
description: >-
|
||||
The details of the shipping profile that the product belongs to. The
|
||||
shipping profile has a set of defined shipping options that can be used to
|
||||
fulfill the product.
|
||||
x-expandable: profile
|
||||
nullable: true
|
||||
$ref: ./ShippingProfile.yaml
|
||||
profiles:
|
||||
description: Available if the relation `profiles` is expanded.
|
||||
nullable: true
|
||||
type: array
|
||||
items:
|
||||
$ref: ./ShippingProfile.yaml
|
||||
weight:
|
||||
description: >-
|
||||
The weight 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:
|
||||
description: >-
|
||||
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:
|
||||
description: >-
|
||||
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:
|
||||
description: The ID of the product collection that the product belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
|
||||
collection:
|
||||
description: The details of the product collection that the product belongs to.
|
||||
x-expandable: collection
|
||||
nullable: true
|
||||
$ref: ./ProductCollection.yaml
|
||||
type_id:
|
||||
description: The ID of the product type that the product belongs to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
type:
|
||||
description: The details of the product type that the product belongs to.
|
||||
x-expandable: type
|
||||
nullable: true
|
||||
$ref: ./ProductType.yaml
|
||||
tags:
|
||||
description: The details of the product tags used in this product.
|
||||
type: array
|
||||
x-expandable: type
|
||||
items:
|
||||
$ref: ./ProductTag.yaml
|
||||
discountable:
|
||||
description: >-
|
||||
Whether the Product can be discounted. Discounts will not apply to Line
|
||||
Items of this Product when this flag is set to `false`.
|
||||
type: boolean
|
||||
default: true
|
||||
external_id:
|
||||
description: The external ID of the product
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
sales_channels:
|
||||
description: The details of the sales channels this product is available in.
|
||||
type: array
|
||||
x-expandable: sales_channels
|
||||
items:
|
||||
$ref: ./SalesChannel.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,82 @@
|
||||
title: Product Category
|
||||
description: >-
|
||||
A product category can be used to categorize products into a hierarchy of
|
||||
categories.
|
||||
x-resourceId: ProductCategory
|
||||
x-featureFlag: product_categories
|
||||
type: object
|
||||
required:
|
||||
- category_children
|
||||
- created_at
|
||||
- handle
|
||||
- id
|
||||
- is_active
|
||||
- is_internal
|
||||
- mpath
|
||||
- name
|
||||
- parent_category_id
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The product category's ID
|
||||
type: string
|
||||
example: pcat_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
name:
|
||||
description: The product category's name
|
||||
type: string
|
||||
example: Regular Fit
|
||||
handle:
|
||||
description: >-
|
||||
A unique string that identifies the Product Category - can for example be
|
||||
used in slug structures.
|
||||
type: string
|
||||
example: regular-fit
|
||||
mpath:
|
||||
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
|
||||
description: A flag to make product category an internal category for admins
|
||||
default: false
|
||||
is_active:
|
||||
type: boolean
|
||||
description: A flag to make product category visible/hidden in the store front
|
||||
default: false
|
||||
rank:
|
||||
type: integer
|
||||
description: An integer that depicts the rank of category in a tree node
|
||||
default: 0
|
||||
category_children:
|
||||
description: The details of the category's children.
|
||||
type: array
|
||||
x-expandable: category_children
|
||||
items:
|
||||
type: object
|
||||
parent_category_id:
|
||||
description: The ID of the parent category.
|
||||
nullable: true
|
||||
type: string
|
||||
default: null
|
||||
parent_category:
|
||||
description: The details of the parent of this category.
|
||||
x-expandable: parent_category
|
||||
nullable: true
|
||||
type: object
|
||||
products:
|
||||
description: The details of the products that belong to this category.
|
||||
type: array
|
||||
x-expandable: products
|
||||
items:
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -0,0 +1,59 @@
|
||||
title: Product Collection
|
||||
description: >-
|
||||
A Product Collection allows grouping together products for promotional
|
||||
purposes. For example, an admin can create a Summer collection, add products
|
||||
to it, and showcase it on the storefront.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- handle
|
||||
- id
|
||||
- metadata
|
||||
- title
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The product collection's ID
|
||||
type: string
|
||||
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
|
||||
title:
|
||||
description: The title that the Product Collection is identified by.
|
||||
type: string
|
||||
example: Summer Collection
|
||||
handle:
|
||||
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:
|
||||
description: The details of the products that belong to this product collection.
|
||||
type: array
|
||||
x-expandable: products
|
||||
items:
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,61 @@
|
||||
title: Product Option
|
||||
description: >-
|
||||
A Product Option defines properties that may vary between different variants
|
||||
of a Product. Common Product Options are "Size" and "Color". Admins are free
|
||||
to create any product options.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- product_id
|
||||
- title
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
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`).
|
||||
type: string
|
||||
example: Size
|
||||
values:
|
||||
description: The details of the values of the product option.
|
||||
type: array
|
||||
x-expandable: values
|
||||
items:
|
||||
$ref: ./ProductOptionValue.yaml
|
||||
product_id:
|
||||
description: The ID of the product that this product option belongs to.
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
product:
|
||||
description: The details of the product that this product option belongs to.
|
||||
x-expandable: product
|
||||
nullable: true
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,69 @@
|
||||
title: Product Option Value
|
||||
description: >-
|
||||
An option value is one of the possible values of a Product Option. Product
|
||||
Variants specify a unique combination of product option values.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- option_id
|
||||
- updated_at
|
||||
- value
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
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`).
|
||||
type: string
|
||||
example: large
|
||||
option_id:
|
||||
description: The ID of the Product Option that the Product Option Value belongs to.
|
||||
type: string
|
||||
example: opt_01F0YESHQBZVKCEXJ24BS6PCX3
|
||||
option:
|
||||
description: >-
|
||||
The details of the product option that the Product Option Value belongs
|
||||
to.
|
||||
x-expandable: option
|
||||
nullable: true
|
||||
type: object
|
||||
variant_id:
|
||||
description: The ID of the product variant that uses this product option value.
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: The details of the product variant that uses this product option value.
|
||||
x-expandable: variant
|
||||
nullable: true
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,42 @@
|
||||
title: Product Tag
|
||||
description: A Product Tag can be added to Products for easy filtering and grouping.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- updated_at
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
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:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,48 @@
|
||||
title: Product Tax Rate
|
||||
description: >-
|
||||
This represents the association between a tax rate and a product to indicate
|
||||
that the product is taxed in a way different than the default.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- metadata
|
||||
- product_id
|
||||
- rate_id
|
||||
- updated_at
|
||||
properties:
|
||||
product_id:
|
||||
description: The ID of the Product
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
product:
|
||||
description: The details of the product.
|
||||
x-expandable: product
|
||||
nullable: true
|
||||
$ref: ./Product.yaml
|
||||
rate_id:
|
||||
description: The ID of the Tax Rate
|
||||
type: string
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
tax_rate:
|
||||
description: The details of the tax rate.
|
||||
x-expandable: tax_rate
|
||||
nullable: true
|
||||
$ref: ./TaxRate.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,42 @@
|
||||
title: Product Type
|
||||
description: A 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:
|
||||
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:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,48 @@
|
||||
title: Product Type Tax Rate
|
||||
description: >-
|
||||
This represents the association between a tax rate and a product type to
|
||||
indicate that the product type is taxed in a different way than the default.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- metadata
|
||||
- product_type_id
|
||||
- rate_id
|
||||
- updated_at
|
||||
properties:
|
||||
product_type_id:
|
||||
description: The ID of the Product type
|
||||
type: string
|
||||
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
product_type:
|
||||
description: The details of the product type.
|
||||
x-expandable: product_type
|
||||
nullable: true
|
||||
$ref: ./ProductType.yaml
|
||||
rate_id:
|
||||
description: The id of the Tax Rate
|
||||
type: string
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
tax_rate:
|
||||
description: The details of the tax rate.
|
||||
x-expandable: tax_rate
|
||||
nullable: true
|
||||
$ref: ./TaxRate.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,208 @@
|
||||
title: Product Variant
|
||||
description: >-
|
||||
A Product Variant represents a Product with a specific set of Product Option
|
||||
configurations. The maximum number of Product Variants that a Product can have
|
||||
is given by the number of available Product Option combinations. A product
|
||||
must at least have one product variant.
|
||||
type: object
|
||||
required:
|
||||
- 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:
|
||||
description: The product variant's ID
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
title:
|
||||
description: >-
|
||||
A title that can be displayed for easy identification of the Product
|
||||
Variant.
|
||||
type: string
|
||||
example: Small
|
||||
product_id:
|
||||
description: The ID of the product that the product variant belongs to.
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
product:
|
||||
description: The details of the product that the product variant belongs to.
|
||||
x-expandable: product
|
||||
nullable: true
|
||||
type: object
|
||||
prices:
|
||||
description: >-
|
||||
The details of the prices of the Product Variant, each represented as a
|
||||
Money Amount. Each Money Amount represents a price in a given currency or
|
||||
a specific Region.
|
||||
type: array
|
||||
x-expandable: prices
|
||||
items:
|
||||
$ref: ./MoneyAmount.yaml
|
||||
sku:
|
||||
description: >-
|
||||
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:
|
||||
description: The current quantity of the item that is stocked.
|
||||
type: integer
|
||||
example: 100
|
||||
allow_backorder:
|
||||
description: >-
|
||||
Whether the Product Variant should be purchasable when
|
||||
`inventory_quantity` is 0.
|
||||
type: boolean
|
||||
default: false
|
||||
manage_inventory:
|
||||
description: Whether Medusa should manage inventory for the Product Variant.
|
||||
type: boolean
|
||||
default: true
|
||||
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:
|
||||
description: >-
|
||||
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:
|
||||
description: >-
|
||||
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.
|
||||
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:
|
||||
description: >-
|
||||
The details of the product options that this product variant defines
|
||||
values for.
|
||||
type: array
|
||||
x-expandable: options
|
||||
items:
|
||||
$ref: ./ProductOptionValue.yaml
|
||||
inventory_items:
|
||||
description: The details inventory items of the product variant.
|
||||
type: array
|
||||
x-expandable: inventory_items
|
||||
items:
|
||||
$ref: ./ProductVariantInventoryItem.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
purchasable:
|
||||
description: |
|
||||
Only used with the inventory modules.
|
||||
A boolean value indicating whether the Product Variant is purchasable.
|
||||
A variant is purchasable if:
|
||||
- inventory is not managed
|
||||
- it has no inventory items
|
||||
- it is in stock
|
||||
- it is backorderable.
|
||||
type: boolean
|
||||
@@ -0,0 +1,46 @@
|
||||
title: Product Variant Inventory Item
|
||||
description: >-
|
||||
A Product Variant Inventory Item links variants with inventory items and
|
||||
denotes the required quantity of the variant.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- inventory_item_id
|
||||
- required_quantity
|
||||
- updated_at
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
description: The product variant inventory item's ID
|
||||
type: string
|
||||
example: pvitem_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
inventory_item_id:
|
||||
description: The id of the inventory item
|
||||
type: string
|
||||
variant_id:
|
||||
description: The id of the variant.
|
||||
type: string
|
||||
variant:
|
||||
description: The details of the product variant.
|
||||
x-expandable: variant
|
||||
nullable: true
|
||||
type: object
|
||||
required_quantity:
|
||||
description: The quantity of an inventory item required for the variant.
|
||||
type: integer
|
||||
default: 1
|
||||
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
|
||||
@@ -0,0 +1,49 @@
|
||||
title: Publishable API key
|
||||
description: >-
|
||||
A Publishable API key defines scopes that resources are available in. Then, it
|
||||
can be used in request to infer the resources without having to directly pass
|
||||
them. For example, a publishable API key can be associated with one or more
|
||||
sales channels. Then, when the publishable API key is passed in the header of
|
||||
a request, it is inferred what sales channel is being used without having to
|
||||
pass the sales channel as a query or body parameter of the request.
|
||||
Publishable API keys can only be used with sales channels, at the moment.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- created_by
|
||||
- id
|
||||
- revoked_by
|
||||
- revoked_at
|
||||
- title
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The key's ID
|
||||
type: string
|
||||
example: pk_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
created_by:
|
||||
description: The unique identifier of the user that created the key.
|
||||
nullable: true
|
||||
type: string
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
revoked_by:
|
||||
description: The unique identifier of the user that revoked the key.
|
||||
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:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -0,0 +1,17 @@
|
||||
title: Publishable API Key Sales Channel
|
||||
description: >-
|
||||
This represents the association between the Publishable API keys and Sales
|
||||
Channels
|
||||
type: object
|
||||
required:
|
||||
- publishable_key_id
|
||||
- sales_channel_id
|
||||
properties:
|
||||
sales_channel_id:
|
||||
description: The sales channel's ID
|
||||
type: string
|
||||
example: sc_01G1G5V21KADXNGH29BJMAJ4B4
|
||||
publishable_key_id:
|
||||
description: The publishable API key's ID
|
||||
type: string
|
||||
example: pak_01G1G5V21KADXNGH29BJMAJ4B4
|
||||
@@ -0,0 +1,90 @@
|
||||
title: Refund
|
||||
description: >-
|
||||
A refund represents an amount of money transfered back to the customer for a
|
||||
given reason. Refunds may occur in relation to Returns, Swaps and Claims, but
|
||||
can also be initiated by an admin for an order.
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- created_at
|
||||
- id
|
||||
- idempotency_key
|
||||
- metadata
|
||||
- note
|
||||
- order_id
|
||||
- payment_id
|
||||
- reason
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The refund's ID
|
||||
type: string
|
||||
example: ref_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
order_id:
|
||||
description: The ID of the order this refund was created for.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order this refund was created for.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
payment_id:
|
||||
description: The payment's ID, if available.
|
||||
nullable: true
|
||||
type: string
|
||||
example: pay_01G8ZCC5W42ZNY842124G7P5R9
|
||||
payment:
|
||||
description: The details of the payment associated with the refund.
|
||||
x-expandable: payment
|
||||
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:
|
||||
description: >-
|
||||
The reason given for the Refund, will automatically be set when processed
|
||||
as part of a Swap, Claim or Return.
|
||||
type: string
|
||||
enum:
|
||||
- discount
|
||||
- return
|
||||
- swap
|
||||
- claim
|
||||
- other
|
||||
example: return
|
||||
idempotency_key:
|
||||
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/development/idempotency-key/overview.md
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,130 @@
|
||||
title: Region
|
||||
description: >-
|
||||
A region holds settings specific to a geographical location, including the
|
||||
currency, tax rates, and fulfillment and payment providers. A Region can
|
||||
consist of multiple countries to accomodate common shopping settings across
|
||||
countries.
|
||||
type: object
|
||||
required:
|
||||
- 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:
|
||||
description: The region's ID
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
name:
|
||||
description: >-
|
||||
The name of the region as displayed to the customer. If the Region only
|
||||
has one country it is recommended to write the country name.
|
||||
type: string
|
||||
example: EU
|
||||
currency_code:
|
||||
description: The 3 character currency code used in the region.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: The details of the currency used in the region.
|
||||
x-expandable: currency
|
||||
nullable: true
|
||||
$ref: ./Currency.yaml
|
||||
tax_rate:
|
||||
description: The tax rate that should be charged on purchases in the Region.
|
||||
type: number
|
||||
example: 0
|
||||
tax_rates:
|
||||
description: >-
|
||||
The details of the tax rates used in the region, aside from the default
|
||||
rate.
|
||||
type: array
|
||||
x-expandable: tax_rates
|
||||
items:
|
||||
$ref: ./TaxRate.yaml
|
||||
tax_code:
|
||||
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:
|
||||
description: Whether the gift cards are taxable or not in this region.
|
||||
type: boolean
|
||||
default: true
|
||||
automatic_taxes:
|
||||
description: Whether taxes should be automated in this region.
|
||||
type: boolean
|
||||
default: true
|
||||
countries:
|
||||
description: The details of the countries included in this region.
|
||||
type: array
|
||||
x-expandable: countries
|
||||
items:
|
||||
$ref: ./Country.yaml
|
||||
tax_provider_id:
|
||||
description: The ID of the tax provider used in this region
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
tax_provider:
|
||||
description: The details of the tax provider used in the region.
|
||||
x-expandable: tax_provider
|
||||
nullable: true
|
||||
$ref: ./TaxProvider.yaml
|
||||
payment_providers:
|
||||
description: >-
|
||||
The details of the payment providers that can be used to process payments
|
||||
in the region.
|
||||
type: array
|
||||
x-expandable: payment_providers
|
||||
items:
|
||||
$ref: ./PaymentProvider.yaml
|
||||
fulfillment_providers:
|
||||
description: >-
|
||||
The details of the fulfillment providers that can be used to fulfill items
|
||||
of orders and similar resources in the region.
|
||||
type: array
|
||||
x-expandable: fulfillment_providers
|
||||
items:
|
||||
$ref: ./FulfillmentProvider.yaml
|
||||
includes_tax:
|
||||
description: Whether the prices for the region include tax
|
||||
type: boolean
|
||||
x-featureFlag: tax_inclusive_pricing
|
||||
default: false
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,44 @@
|
||||
title: Reservation item
|
||||
description: Represents a reservation of an inventory item at a stock location
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- location_id
|
||||
- inventory_item_id
|
||||
- quantity
|
||||
properties:
|
||||
id:
|
||||
description: The id of the reservation item
|
||||
type: string
|
||||
location_id:
|
||||
description: The id of the location of the reservation
|
||||
type: string
|
||||
inventory_item_id:
|
||||
description: The id of the inventory item the reservation relates to
|
||||
type: string
|
||||
description:
|
||||
description: Description of the reservation item
|
||||
type: string
|
||||
created_by:
|
||||
description: UserId of user who created the reservation item
|
||||
type: string
|
||||
quantity:
|
||||
description: The id of the reservation item
|
||||
type: number
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
@@ -0,0 +1,132 @@
|
||||
title: Return
|
||||
description: >-
|
||||
A Return holds information about Line Items that a Customer wishes to send
|
||||
back, along with how the items will be returned. Returns can also be used as
|
||||
part of a Swap or a Claim.
|
||||
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:
|
||||
description: The return's ID
|
||||
type: string
|
||||
example: ret_01F0YET7XPCMF8RZ0Y151NZV2V
|
||||
status:
|
||||
description: Status of the Return.
|
||||
type: string
|
||||
enum:
|
||||
- requested
|
||||
- received
|
||||
- requires_action
|
||||
- canceled
|
||||
default: requested
|
||||
items:
|
||||
description: The details of the items that the customer is returning.
|
||||
type: array
|
||||
x-expandable: items
|
||||
items:
|
||||
$ref: ./ReturnItem.yaml
|
||||
swap_id:
|
||||
description: The ID of the swap that the return may belong to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: The details of the swap that the return may belong to.
|
||||
x-expandable: swap
|
||||
nullable: true
|
||||
type: object
|
||||
claim_order_id:
|
||||
description: The ID of the claim that the return may belong to.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: The details of the claim that the return may belong to.
|
||||
x-expandable: claim_order
|
||||
nullable: true
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the order that the return was created for.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that the return was created for.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
shipping_method:
|
||||
description: >-
|
||||
The details of the Shipping Method that will be used to send the Return
|
||||
back. Can be null if the Customer will handle the return shipment
|
||||
themselves.
|
||||
x-expandable: shipping_method
|
||||
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:
|
||||
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/development/idempotency-key/overview.md
|
||||
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:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,79 @@
|
||||
title: Return Item
|
||||
description: >-
|
||||
A return item represents a line item in an order that is to be returned. It
|
||||
includes details related to the return and the reason behind it.
|
||||
type: object
|
||||
required:
|
||||
- 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
|
||||
item_id:
|
||||
description: The ID of the Line Item that the Return Item references.
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
return_order:
|
||||
description: Details of the Return that the Return Item belongs to.
|
||||
x-expandable: return_order
|
||||
nullable: true
|
||||
type: object
|
||||
item:
|
||||
description: The details of the line item in the original order to be returned.
|
||||
x-expandable: item
|
||||
nullable: true
|
||||
$ref: ./LineItem.yaml
|
||||
quantity:
|
||||
description: The quantity of the Line Item to be returned.
|
||||
type: integer
|
||||
example: 1
|
||||
is_requested:
|
||||
description: >-
|
||||
Whether the Return Item was requested initially or received unexpectedly
|
||||
in the warehouse.
|
||||
type: boolean
|
||||
default: true
|
||||
requested_quantity:
|
||||
description: The quantity that was originally requested to be returned.
|
||||
nullable: true
|
||||
type: integer
|
||||
example: 1
|
||||
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: The details of the reason for returning the item.
|
||||
x-expandable: reason
|
||||
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:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,70 @@
|
||||
title: Return Reason
|
||||
description: >-
|
||||
A Return Reason is a value defined by an admin. It can be used on Return Items
|
||||
in order to indicate why a Line Item was returned.
|
||||
type: object
|
||||
required:
|
||||
- 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
|
||||
example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ
|
||||
value:
|
||||
description: The value to identify the reason by.
|
||||
type: string
|
||||
example: damaged
|
||||
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: The details of the parent reason.
|
||||
x-expandable: parent_return_reason
|
||||
nullable: true
|
||||
type: object
|
||||
return_reason_children:
|
||||
description: The details of the child reasons.
|
||||
x-expandable: return_reason_children
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,61 @@
|
||||
title: Sales Channel
|
||||
description: >-
|
||||
A Sales Channel is a method a business offers its products for purchase for
|
||||
the customers. For example, a Webshop can be a sales channel, and a mobile app
|
||||
can be another.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- description
|
||||
- id
|
||||
- is_disabled
|
||||
- name
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The sales channel's ID
|
||||
type: string
|
||||
example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
name:
|
||||
description: The name of the sales channel.
|
||||
type: string
|
||||
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 details of the stock locations related to the sales channel.
|
||||
type: array
|
||||
x-expandable: locations
|
||||
items:
|
||||
$ref: ./SalesChannelLocation.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,40 @@
|
||||
title: Sales Channel Stock Location
|
||||
description: This represents the association between a sales channel and a 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 details of the sales channel the location is associated with.
|
||||
x-expandable: sales_channel
|
||||
nullable: true
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -0,0 +1,119 @@
|
||||
title: Shipping Method
|
||||
description: >-
|
||||
A Shipping Method represents a way in which an Order or Return can be shipped.
|
||||
Shipping Methods are created from a Shipping Option, but may contain
|
||||
additional details that can be necessary for the Fulfillment Provider to
|
||||
handle the shipment. If the shipping method is created for a return, it may be
|
||||
associated with a claim or a swap that the return is part of.
|
||||
type: object
|
||||
required:
|
||||
- cart_id
|
||||
- claim_order_id
|
||||
- data
|
||||
- id
|
||||
- order_id
|
||||
- price
|
||||
- return_id
|
||||
- shipping_option_id
|
||||
- swap_id
|
||||
properties:
|
||||
id:
|
||||
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
|
||||
order_id:
|
||||
description: The ID of the order that the shipping method is used in.
|
||||
nullable: true
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: The details of the order that the shipping method is used in.
|
||||
x-expandable: order
|
||||
nullable: true
|
||||
type: object
|
||||
claim_order_id:
|
||||
description: The ID of the claim that the shipping method is used in.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: The details of the claim that the shipping method is used in.
|
||||
x-expandable: claim_order
|
||||
nullable: true
|
||||
type: object
|
||||
cart_id:
|
||||
description: The ID of the cart that the shipping method is used in.
|
||||
nullable: true
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: The details of the cart that the shipping method is used in.
|
||||
x-expandable: cart
|
||||
nullable: true
|
||||
type: object
|
||||
swap_id:
|
||||
description: The ID of the swap that the shipping method is used in.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: The details of the swap that the shipping method is used in.
|
||||
x-expandable: swap
|
||||
nullable: true
|
||||
type: object
|
||||
return_id:
|
||||
description: The ID of the return that the shipping method is used in.
|
||||
nullable: true
|
||||
type: string
|
||||
example: null
|
||||
return_order:
|
||||
description: The details of the return that the shipping method is used in.
|
||||
x-expandable: return_order
|
||||
nullable: true
|
||||
type: object
|
||||
shipping_option:
|
||||
description: The details of the shipping option the method was created from.
|
||||
x-expandable: shipping_option
|
||||
nullable: true
|
||||
$ref: ./ShippingOption.yaml
|
||||
tax_lines:
|
||||
description: The details of the tax lines applied on the shipping method.
|
||||
type: array
|
||||
x-expandable: tax_lines
|
||||
items:
|
||||
$ref: ./ShippingMethodTaxLine.yaml
|
||||
price:
|
||||
description: >-
|
||||
The amount to charge for the Shipping Method. The currency of the price is
|
||||
defined by the Region that the Order that the Shipping Method belongs to
|
||||
is a part of.
|
||||
type: integer
|
||||
example: 200
|
||||
data:
|
||||
description: >-
|
||||
Additional data that the Fulfillment Provider needs to fulfill the
|
||||
shipment. This is used in combination with the Shipping Options data, and
|
||||
may contain information such as a drop point id.
|
||||
type: object
|
||||
example: {}
|
||||
includes_tax:
|
||||
description: Whether the shipping method price include tax
|
||||
type: boolean
|
||||
x-featureFlag: tax_inclusive_pricing
|
||||
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
|
||||
@@ -0,0 +1,59 @@
|
||||
title: Shipping Method Tax Line
|
||||
description: >-
|
||||
A Shipping Method Tax Line represents the taxes applied on a shipping method
|
||||
in a cart.
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
- created_at
|
||||
- id
|
||||
- shipping_method_id
|
||||
- metadata
|
||||
- name
|
||||
- rate
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The line item tax line's ID
|
||||
type: string
|
||||
example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
|
||||
code:
|
||||
description: A code to identify the tax type by
|
||||
nullable: true
|
||||
type: string
|
||||
example: tax01
|
||||
name:
|
||||
description: A human friendly name for the tax
|
||||
type: string
|
||||
example: Tax Example
|
||||
rate:
|
||||
description: The numeric rate to charge tax by
|
||||
type: number
|
||||
example: 10
|
||||
shipping_method_id:
|
||||
description: The ID of the line item
|
||||
type: string
|
||||
example: sm_01F0YET7DR2E7CYVSDHM593QG2
|
||||
shipping_method:
|
||||
description: The details of the associated shipping method.
|
||||
x-expandable: shipping_method
|
||||
nullable: true
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,137 @@
|
||||
title: Shipping Option
|
||||
description: >-
|
||||
A Shipping Option represents a way in which an Order or Return can be shipped.
|
||||
Shipping Options have an associated Fulfillment Provider that will be used
|
||||
when the fulfillment of an Order is initiated. Shipping Options themselves
|
||||
cannot be added to Carts, but serve as a template for Shipping Methods. This
|
||||
distinction makes it possible to customize individual Shipping Methods with
|
||||
additional information.
|
||||
type: object
|
||||
required:
|
||||
- admin_only
|
||||
- amount
|
||||
- created_at
|
||||
- data
|
||||
- deleted_at
|
||||
- id
|
||||
- is_return
|
||||
- metadata
|
||||
- name
|
||||
- price_type
|
||||
- profile_id
|
||||
- provider_id
|
||||
- region_id
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The shipping option's ID
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
name:
|
||||
description: >-
|
||||
The name given to the Shipping Option - this may be displayed to the
|
||||
Customer.
|
||||
type: string
|
||||
example: PostFake Standard
|
||||
region_id:
|
||||
description: The ID of the region this shipping option can be used in.
|
||||
type: string
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: The details of the region this shipping option can be used in.
|
||||
x-expandable: region
|
||||
nullable: true
|
||||
type: object
|
||||
profile_id:
|
||||
description: The ID of the Shipping Profile that the shipping option belongs to.
|
||||
type: string
|
||||
example: sp_01G1G5V239ENSZ5MV4JAR737BM
|
||||
profile:
|
||||
description: The details of the shipping profile that the shipping option belongs to.
|
||||
x-expandable: profile
|
||||
nullable: true
|
||||
$ref: ./ShippingProfile.yaml
|
||||
provider_id:
|
||||
description: >-
|
||||
The ID of the fulfillment provider that will be used to later to process
|
||||
the shipping method created from this shipping option and its
|
||||
fulfillments.
|
||||
type: string
|
||||
example: manual
|
||||
provider:
|
||||
description: >-
|
||||
The details of the fulfillment provider that will be used to later to
|
||||
process the shipping method created from this shipping option and its
|
||||
fulfillments.
|
||||
x-expandable: provider
|
||||
nullable: true
|
||||
$ref: ./FulfillmentProvider.yaml
|
||||
price_type:
|
||||
description: >-
|
||||
The type of pricing calculation that is used when creatin Shipping Methods
|
||||
from the Shipping Option. Can be `flat_rate` for fixed prices or
|
||||
`calculated` if the Fulfillment Provider can provide price calulations.
|
||||
type: string
|
||||
enum:
|
||||
- flat_rate
|
||||
- calculated
|
||||
example: flat_rate
|
||||
amount:
|
||||
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 details of the requirements that must be satisfied for the Shipping
|
||||
Option to be available for usage in a Cart.
|
||||
type: array
|
||||
x-expandable: requirements
|
||||
items:
|
||||
$ref: ./ShippingOptionRequirement.yaml
|
||||
data:
|
||||
description: >-
|
||||
The data needed for the Fulfillment Provider to identify the Shipping
|
||||
Option.
|
||||
type: object
|
||||
example: {}
|
||||
includes_tax:
|
||||
description: Whether the shipping option price include tax
|
||||
type: boolean
|
||||
x-featureFlag: tax_inclusive_pricing
|
||||
default: false
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,46 @@
|
||||
title: Shipping Option Requirement
|
||||
description: >-
|
||||
A shipping option requirement defines conditions that a Cart must satisfy for
|
||||
the Shipping Option to be available for usage in the Cart.
|
||||
type: object
|
||||
required:
|
||||
- amount
|
||||
- deleted_at
|
||||
- id
|
||||
- shipping_option_id
|
||||
- type
|
||||
properties:
|
||||
id:
|
||||
description: The shipping option requirement's ID
|
||||
type: string
|
||||
example: sor_01G1G5V29AB4CTNDRFSRWSRKWD
|
||||
shipping_option_id:
|
||||
description: The ID of the shipping option that the requirements belong to.
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
shipping_option:
|
||||
description: The details of the shipping option that the requirements belong to.
|
||||
x-expandable: shipping_option
|
||||
nullable: true
|
||||
type: object
|
||||
type:
|
||||
description: >-
|
||||
The type of the requirement, this defines how the value will be compared
|
||||
to the Cart's total. `min_subtotal` requirements define the minimum
|
||||
subtotal that is needed for the Shipping Option to be available, while the
|
||||
`max_subtotal` defines the maximum subtotal that the Cart can have for the
|
||||
Shipping Option to be available.
|
||||
type: string
|
||||
enum:
|
||||
- min_subtotal
|
||||
- max_subtotal
|
||||
example: min_subtotal
|
||||
amount:
|
||||
description: The amount to compare the Cart subtotal to.
|
||||
type: integer
|
||||
example: 100
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
@@ -0,0 +1,76 @@
|
||||
title: Shipping Profile
|
||||
description: >-
|
||||
A Shipping Profile has a set of defined Shipping Options that can be used to
|
||||
fulfill a given set of Products. For example, gift cards are shipped
|
||||
differently than physical products, so a shipping profile with the type
|
||||
`gift_card` groups together the shipping options that can only be used for
|
||||
gift cards.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- deleted_at
|
||||
- id
|
||||
- metadata
|
||||
- name
|
||||
- type
|
||||
- updated_at
|
||||
properties:
|
||||
id:
|
||||
description: The shipping profile's ID
|
||||
type: string
|
||||
example: sp_01G1G5V239ENSZ5MV4JAR737BM
|
||||
name:
|
||||
description: >-
|
||||
The name given to the Shipping profile - this may be displayed to the
|
||||
Customer.
|
||||
type: string
|
||||
example: Default Shipping Profile
|
||||
type:
|
||||
description: >-
|
||||
The type of the Shipping Profile, may be `default`, `gift_card` or
|
||||
`custom`.
|
||||
type: string
|
||||
enum:
|
||||
- default
|
||||
- gift_card
|
||||
- custom
|
||||
example: default
|
||||
products:
|
||||
description: >-
|
||||
The details of the products that the Shipping Profile defines Shipping
|
||||
Options for. Available if the relation `products` is expanded.
|
||||
type: array
|
||||
x-expandable: products
|
||||
items:
|
||||
type: object
|
||||
shipping_options:
|
||||
description: >-
|
||||
The details of the shipping options that can be used to create shipping
|
||||
methods for the Products in the Shipping Profile.
|
||||
type: array
|
||||
x-expandable: shipping_options
|
||||
items:
|
||||
type: object
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
deleted_at:
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
nullable: true
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
@@ -0,0 +1,46 @@
|
||||
title: Shipping Tax Rate
|
||||
description: This represents the tax rates applied on a shipping option.
|
||||
type: object
|
||||
required:
|
||||
- created_at
|
||||
- metadata
|
||||
- rate_id
|
||||
- shipping_option_id
|
||||
- updated_at
|
||||
properties:
|
||||
shipping_option_id:
|
||||
description: The ID of the shipping option.
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
shipping_option:
|
||||
description: The details of the shipping option.
|
||||
x-expandable: shipping_option
|
||||
nullable: true
|
||||
$ref: ./ShippingOption.yaml
|
||||
rate_id:
|
||||
description: The ID of the associated tax rate.
|
||||
type: string
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
tax_rate:
|
||||
description: The details of the associated tax rate.
|
||||
x-expandable: tax_rate
|
||||
nullable: true
|
||||
$ref: ./TaxRate.yaml
|
||||
created_at:
|
||||
description: The date with timezone at which the resource was created.
|
||||
type: string
|
||||
format: date-time
|
||||
updated_at:
|
||||
description: The date with timezone at which the resource was updated.
|
||||
type: string
|
||||
format: date-time
|
||||
metadata:
|
||||
description: An optional key-value map with additional details
|
||||
nullable: true
|
||||
type: object
|
||||
example:
|
||||
car: white
|
||||
externalDocs:
|
||||
description: Learn about the metadata attribute, and how to delete and update it.
|
||||
url: >-
|
||||
https://docs.medusajs.com/development/entities/overview#metadata-attribute
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user