chore(docs): Refactor API Reference (#1883)
This commit is contained in:
32
docs/api/admin/components/schemas/OAuth.yaml
Normal file
32
docs/api/admin/components/schemas/OAuth.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
title: OAuth
|
||||
description: Represent an OAuth app
|
||||
x-resourceId: OAuth
|
||||
required:
|
||||
- id
|
||||
- display_name
|
||||
- application_name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The app's ID
|
||||
example: example_app
|
||||
display_name:
|
||||
type: string
|
||||
description: The app's display name
|
||||
example: Example app
|
||||
application_name:
|
||||
type: string
|
||||
description: The app's name
|
||||
example: example
|
||||
install_url:
|
||||
type: string
|
||||
description: The URL to install the app
|
||||
format: uri
|
||||
uninstall_url:
|
||||
type: string
|
||||
description: The URL to uninstall the app
|
||||
format: uri
|
||||
data:
|
||||
type: object
|
||||
description: Any data necessary to the app.
|
||||
example: {}
|
||||
82
docs/api/admin/components/schemas/address.yaml
Normal file
82
docs/api/admin/components/schemas/address.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
title: Address
|
||||
description: An address.
|
||||
x-resourceId: address
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: ID of the address
|
||||
example: addr_01G8ZC9VS1XVE149MGH2J7QSSH
|
||||
customer_id:
|
||||
type: string
|
||||
description: ID of the customer this address belongs to
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: Available if the relation `customer` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A customer object.
|
||||
company:
|
||||
type: string
|
||||
description: Company name
|
||||
example: Acme
|
||||
first_name:
|
||||
type: string
|
||||
description: First name
|
||||
example: Arno
|
||||
last_name:
|
||||
type: string
|
||||
description: Last name
|
||||
example: Willms
|
||||
address_1:
|
||||
type: string
|
||||
description: Address line 1
|
||||
example: 14433 Kemmer Court
|
||||
address_2:
|
||||
type: string
|
||||
description: Address line 2
|
||||
example: Suite 369
|
||||
city:
|
||||
type: string
|
||||
description: City
|
||||
example: South Geoffreyview
|
||||
country_code:
|
||||
type: string
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
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. Available if the relation `country` is expanded.
|
||||
type: object
|
||||
province:
|
||||
type: string
|
||||
description: Province
|
||||
example: Kentucky
|
||||
postal_code:
|
||||
type: string
|
||||
description: Postal Code
|
||||
example: 72093
|
||||
phone:
|
||||
type: string
|
||||
description: Phone Number
|
||||
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:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
139
docs/api/admin/components/schemas/batch_job.yaml
Normal file
139
docs/api/admin/components/schemas/batch_job.yaml
Normal file
@@ -0,0 +1,139 @@
|
||||
title: Batch Job
|
||||
description: A Batch Job.
|
||||
x-resourceId: batch_job
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The unique identifier for the batch job.
|
||||
example: batch_01G8T782965PYFG0751G0Z38B4
|
||||
type:
|
||||
type: string
|
||||
description: The type of batch job.
|
||||
enum:
|
||||
- product-import
|
||||
- product-export
|
||||
status:
|
||||
type: string
|
||||
description: The status of the batch job.
|
||||
enum:
|
||||
- created
|
||||
- pre_processed
|
||||
- confirmed
|
||||
- processing
|
||||
- completed
|
||||
- canceled
|
||||
- failed
|
||||
default: created
|
||||
created_by:
|
||||
type: string
|
||||
description: The unique identifier of the user that created the batch job.
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
created_by_user:
|
||||
description: A user object. Available if the relation `created_by_user` is expanded.
|
||||
type: object
|
||||
context:
|
||||
type: object
|
||||
description: >-
|
||||
The context of the batch job, the type of the batch job determines what
|
||||
the context should contain.
|
||||
example:
|
||||
shape:
|
||||
prices:
|
||||
- region: null
|
||||
currency_code: eur
|
||||
dynamicImageColumnCount: 4
|
||||
dynamicOptionColumnCount: 2
|
||||
list_config:
|
||||
skip: 0
|
||||
take: 50
|
||||
order:
|
||||
created_at: DESC
|
||||
relations:
|
||||
- variants
|
||||
- variant.prices
|
||||
- images
|
||||
dry_run:
|
||||
type: boolean
|
||||
description: Specify if the job must apply the modifications or not.
|
||||
default: false
|
||||
result:
|
||||
type: object
|
||||
description: The result of the batch job.
|
||||
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:
|
||||
type: string
|
||||
description: The date from which the job has been pre processed.
|
||||
format: date-time
|
||||
processing_at:
|
||||
type: string
|
||||
description: The date the job is processing at.
|
||||
format: date-time
|
||||
confirmed_at:
|
||||
type: string
|
||||
description: The date when the confirmation has been done.
|
||||
format: date-time
|
||||
completed_at:
|
||||
type: string
|
||||
description: The date of the completion.
|
||||
format: date-time
|
||||
canceled_at:
|
||||
type: string
|
||||
description: The date of the concellation.
|
||||
format: date-time
|
||||
failed_at:
|
||||
type: string
|
||||
description: The date when the job failed.
|
||||
format: date-time
|
||||
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 last updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
174
docs/api/admin/components/schemas/cart.yaml
Normal file
174
docs/api/admin/components/schemas/cart.yaml
Normal file
@@ -0,0 +1,174 @@
|
||||
title: Cart
|
||||
description: Represents a user cart
|
||||
x-resourceId: cart
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cart's ID
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
email:
|
||||
type: string
|
||||
description: The email associated with the cart
|
||||
format: email
|
||||
billing_address_id:
|
||||
type: string
|
||||
description: The billing address's ID
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
billing_address:
|
||||
description: Available if the relation `billing_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
shipping_address_id:
|
||||
type: string
|
||||
description: The shipping address's ID
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: Available if the relation `shipping_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
items:
|
||||
description: Available if the relation `items` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./line_item.yaml
|
||||
region_id:
|
||||
type: string
|
||||
description: The region's ID
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
discounts:
|
||||
type: array
|
||||
description: Available if the relation `discounts` is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A discount object.
|
||||
gift_cards:
|
||||
type: array
|
||||
description: Available if the relation `gift_cards` is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A gift card object.
|
||||
customer_id:
|
||||
type: string
|
||||
description: The customer's ID
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: A customer object. Available if the relation `customer` is expanded.
|
||||
type: object
|
||||
payment_session:
|
||||
description: The selected payment session in the cart.
|
||||
$ref: ./payment_session.yaml
|
||||
payment_sessions:
|
||||
type: array
|
||||
description: The payment sessions created on the cart.
|
||||
items:
|
||||
$ref: ./payment_session.yaml
|
||||
payment_id:
|
||||
type: string
|
||||
description: The payment's ID if available
|
||||
example: pay_01G8ZCC5W42ZNY842124G7P5R9
|
||||
payment:
|
||||
description: Available if the relation `payment` is expanded.
|
||||
$ref: ./payment.yaml
|
||||
shipping_methods:
|
||||
type: array
|
||||
description: The shipping methods added to the cart.
|
||||
items:
|
||||
$ref: ./shipping_method.yaml
|
||||
type:
|
||||
type: string
|
||||
description: The cart's type.
|
||||
enum:
|
||||
- default
|
||||
- swap
|
||||
- draft_order
|
||||
- payment_link
|
||||
- claim
|
||||
default: default
|
||||
completed_at:
|
||||
type: string
|
||||
description: The date with timezone at which the cart was completed.
|
||||
format: date-time
|
||||
payment_authorized_at:
|
||||
type: string
|
||||
description: The date with timezone at which the payment was authorized.
|
||||
format: date-time
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of a cart in case
|
||||
of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
context:
|
||||
type: object
|
||||
description: The context of the cart which can include info like IP or user agent.
|
||||
example:
|
||||
ip: '::1'
|
||||
user_agent: PostmanRuntime/7.29.2
|
||||
sales_channel_id:
|
||||
type: string
|
||||
description: The sales channel ID the cart is associated with.
|
||||
example: null
|
||||
sales_channel:
|
||||
description: >-
|
||||
A sales channel object. Available if the relation `sales_channel` is
|
||||
expanded.
|
||||
type: object
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
shipping_total:
|
||||
type: integer
|
||||
description: The total of shipping
|
||||
example: 1000
|
||||
discount_total:
|
||||
type: integer
|
||||
description: The total of discount
|
||||
example: 800
|
||||
tax_total:
|
||||
type: integer
|
||||
description: The total of tax
|
||||
example: 0
|
||||
refunded_total:
|
||||
type: integer
|
||||
description: >-
|
||||
The total amount refunded if the order associated with this cart is
|
||||
returned.
|
||||
example: 0
|
||||
total:
|
||||
type: integer
|
||||
description: The total amount of the cart
|
||||
example: 8200
|
||||
subtotal:
|
||||
type: integer
|
||||
description: The subtotal of the cart
|
||||
example: 8000
|
||||
refundable_amount:
|
||||
type: integer
|
||||
description: The amount that can be refunded
|
||||
example: 8200
|
||||
gift_card_total:
|
||||
type: integer
|
||||
description: The total of gift cards
|
||||
example: 0
|
||||
gift_card_tax_total:
|
||||
type: integer
|
||||
description: The total of gift cards with taxes
|
||||
example: 0
|
||||
38
docs/api/admin/components/schemas/claim_image.yaml
Normal file
38
docs/api/admin/components/schemas/claim_image.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
title: Claim Image
|
||||
description: Represents photo documentation of a claim.
|
||||
x-resourceId: claim_image
|
||||
required:
|
||||
- claim_item_id
|
||||
- url
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The claim image's ID
|
||||
example: cimg_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
claim_item_id:
|
||||
type: string
|
||||
description: The ID of the claim item associated with the image
|
||||
claim_item:
|
||||
description: A claim item object. Available if the relation `claim_item` is expanded.
|
||||
type: object
|
||||
url:
|
||||
type: string
|
||||
description: The URL of the image
|
||||
format: uri
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
83
docs/api/admin/components/schemas/claim_item.yaml
Normal file
83
docs/api/admin/components/schemas/claim_item.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
title: Claim Item
|
||||
description: >-
|
||||
Represents a claimed item along with information about the reasons for the
|
||||
claim.
|
||||
x-resourceId: claim_item
|
||||
required:
|
||||
- claim_order_id
|
||||
- item_id
|
||||
- variant_id
|
||||
- reason
|
||||
- quantity
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The claim item's ID
|
||||
example: citm_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
images:
|
||||
type: array
|
||||
description: Available if the relation `images` is expanded.
|
||||
items:
|
||||
$ref: ./claim_image.yaml
|
||||
claim_order_id:
|
||||
description: The ID of the claim this item is associated with.
|
||||
type: string
|
||||
claim_order:
|
||||
description: A claim order object. Available if the relation `claim_order` is expanded.
|
||||
type: object
|
||||
item_id:
|
||||
description: The ID of the line item that the claim item refers to.
|
||||
type: string
|
||||
example: item_01G8ZM25TN49YV9EQBE2NC27KC
|
||||
item:
|
||||
description: Available if the relation `item` is expanded.
|
||||
$ref: ./line_item.yaml
|
||||
variant_id:
|
||||
description: The ID of the product variant that is claimed.
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: A variant object. Available if the relation `variant` is expanded.
|
||||
type: object
|
||||
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
|
||||
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. Available if the
|
||||
relation 'tags' is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./claim_tag.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
121
docs/api/admin/components/schemas/claim_order.yaml
Normal file
121
docs/api/admin/components/schemas/claim_order.yaml
Normal file
@@ -0,0 +1,121 @@
|
||||
title: Claim Order
|
||||
description: >-
|
||||
Claim Orders represent a group of faulty or missing items. Each claim order
|
||||
consists of a subset of items associated with an original order, and can
|
||||
contain additional information about fulfillments and returns.
|
||||
x-resourceId: claim_order
|
||||
required:
|
||||
- type
|
||||
- order_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The claim's ID
|
||||
example: claim_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- refund
|
||||
- replace
|
||||
payment_status:
|
||||
type: string
|
||||
description: The status of the claim's payment
|
||||
enum:
|
||||
- na
|
||||
- not_refunded
|
||||
- refunded
|
||||
default: na
|
||||
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 items that have been claimed
|
||||
type: array
|
||||
items:
|
||||
$ref: ./claim_item.yaml
|
||||
additional_items:
|
||||
description: >-
|
||||
Refers to the new items to be shipped when the claim order has the type
|
||||
`replace`
|
||||
type: array
|
||||
items:
|
||||
$ref: ./line_item.yaml
|
||||
order_id:
|
||||
description: The ID of the order that the claim comes from.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
return_order:
|
||||
description: >-
|
||||
A return object. Holds information about the return if the claim is to be
|
||||
returned. Available if the relation 'return_order' is expanded
|
||||
type: object
|
||||
shipping_address_id:
|
||||
description: The ID of the address that the new items should be shipped to
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: Available if the relation `shipping_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
shipping_methods:
|
||||
description: The shipping methods that the claim order will be shipped with.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./shipping_method.yaml
|
||||
fulfillments:
|
||||
description: The fulfillments of the new items to be shipped
|
||||
type: array
|
||||
items:
|
||||
$ref: ./fulfillment.yaml
|
||||
refund_amount:
|
||||
description: The amount that will be refunded in conjunction with the claim
|
||||
type: integer
|
||||
example: 1000
|
||||
canceled_at:
|
||||
description: The date with timezone at which the claim was canceled.
|
||||
type: string
|
||||
format: date-time
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
no_notification:
|
||||
description: >-
|
||||
Flag for describing whether or not notifications related to this should be
|
||||
send.
|
||||
type: boolean
|
||||
example: false
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the cart
|
||||
associated with the claim in case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
33
docs/api/admin/components/schemas/claim_tag.yaml
Normal file
33
docs/api/admin/components/schemas/claim_tag.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
title: Claim Tag
|
||||
description: >-
|
||||
Claim Tags are user defined tags that can be assigned to claim items for easy
|
||||
filtering and grouping.
|
||||
x-resourceId: claim_tag
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The claim tag's ID
|
||||
example: ctag_01G8ZCC5Y63B95V6B5SHBZ91S4
|
||||
value:
|
||||
description: The value that the claim tag holds
|
||||
type: string
|
||||
example: Damaged
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
53
docs/api/admin/components/schemas/country.yaml
Normal file
53
docs/api/admin/components/schemas/country.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
title: Country
|
||||
description: Country details
|
||||
x-resourceId: country
|
||||
required:
|
||||
- iso_2
|
||||
- iso_3
|
||||
- num_code
|
||||
- name
|
||||
- display_name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The country's ID
|
||||
example: 109
|
||||
iso_2:
|
||||
type: string
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
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:
|
||||
type: string
|
||||
description: The 2 character ISO code of the country in lower case
|
||||
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:
|
||||
type: string
|
||||
description: The region ID this country is associated with.
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
28
docs/api/admin/components/schemas/currency.yaml
Normal file
28
docs/api/admin/components/schemas/currency.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
title: Currency
|
||||
description: Currency
|
||||
x-resourceId: currency
|
||||
required:
|
||||
- code
|
||||
- symbol
|
||||
- symbol_native
|
||||
- name
|
||||
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
|
||||
@@ -0,0 +1,53 @@
|
||||
title: Custom Shipping Option
|
||||
description: >-
|
||||
Custom Shipping Options are 'overriden' Shipping Options. Store managers can
|
||||
attach a Custom Shipping Option to a cart in order to set a custom price for a
|
||||
particular Shipping Option
|
||||
x-resourceId: custom_shipping_option
|
||||
required:
|
||||
- price
|
||||
- shipping_option_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The custom shipping option's ID
|
||||
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: >-
|
||||
A shipping option object. Available if the relation `shipping_option` is
|
||||
expanded.
|
||||
type: object
|
||||
cart_id:
|
||||
description: The ID of the Cart that the custom shipping option is attached to
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
72
docs/api/admin/components/schemas/customer.yaml
Normal file
72
docs/api/admin/components/schemas/customer.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
title: Customer
|
||||
description: Represents a customer
|
||||
x-resourceId: customer
|
||||
required:
|
||||
- email
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The customer's ID
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
email:
|
||||
type: string
|
||||
description: The customer's email
|
||||
format: email
|
||||
first_name:
|
||||
type: string
|
||||
description: The customer's first name
|
||||
example: Arno
|
||||
last_name:
|
||||
type: string
|
||||
description: The customer's first name
|
||||
example: Willms
|
||||
billing_address_id:
|
||||
type: string
|
||||
description: The customer's billing address ID
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
billing_address:
|
||||
description: Available if the relation `billing_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
shipping_addresses:
|
||||
description: Available if the relation `shipping_addresses` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./address.yaml
|
||||
phone:
|
||||
type: string
|
||||
description: The customer's phone number
|
||||
example: 16128234334802
|
||||
has_account:
|
||||
type: boolean
|
||||
description: Whether the customer has an account or not
|
||||
default: false
|
||||
orders:
|
||||
description: Available if the relation `orders` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: An order object.
|
||||
groups:
|
||||
description: >-
|
||||
The customer groups the customer belongs to. Available if the relation
|
||||
`groups` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./customer_group.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
46
docs/api/admin/components/schemas/customer_group.yaml
Normal file
46
docs/api/admin/components/schemas/customer_group.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
title: Customer Group
|
||||
description: Represents a customer group
|
||||
x-resourceId: customer_group
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The customer group's ID
|
||||
example: cgrp_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
name:
|
||||
type: string
|
||||
description: The name of the customer group
|
||||
example: VIP
|
||||
customers:
|
||||
type: array
|
||||
description: >-
|
||||
The customers that belong to the customer group. Available if the relation
|
||||
`customers` is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A customer object.
|
||||
price_lists:
|
||||
type: array
|
||||
description: >-
|
||||
The price lists that are associated with the customer group. Available if
|
||||
the relation `price_lists` is expanded.
|
||||
items:
|
||||
$ref: ./price_list.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
91
docs/api/admin/components/schemas/discount.yaml
Normal file
91
docs/api/admin/components/schemas/discount.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
title: Discount
|
||||
description: Represents a discount that can be applied to a cart for promotional purposes.
|
||||
x-resourceId: discount
|
||||
required:
|
||||
- code
|
||||
- is_dynamic
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The discount's ID
|
||||
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:
|
||||
type: string
|
||||
description: The Discount Rule that governs the behaviour of the Discount
|
||||
example: dru_01F0YESMVK96HVX7N419E3CJ7C
|
||||
rule:
|
||||
description: Available if the relation `rule` is expanded.
|
||||
$ref: ./discount_rule.yaml
|
||||
is_disabled:
|
||||
description: >-
|
||||
Whether the Discount has been disabled. Disabled discounts cannot be
|
||||
applied to carts
|
||||
type: boolean
|
||||
example: false
|
||||
parent_discount_id:
|
||||
type: string
|
||||
description: >-
|
||||
The Discount that the discount was created from. This will always be a
|
||||
dynamic discount
|
||||
example: disc_01G8ZH853YPY9B94857DY91YGW
|
||||
parent_discount:
|
||||
description: Available if the relation `parent_discount` is expanded.
|
||||
$ref: ./discount.yaml
|
||||
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.
|
||||
type: string
|
||||
format: date-time
|
||||
valid_duration:
|
||||
type: string
|
||||
description: Duration the discount runs between
|
||||
example: P3Y6M4DT12H30M5S
|
||||
regions:
|
||||
description: >-
|
||||
The Regions in which the Discount can be used. Available if the relation
|
||||
`regions` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A region object.
|
||||
usage_limit:
|
||||
description: The maximum number of times that a discount can be used.
|
||||
type: integer
|
||||
example: 100
|
||||
usage_count:
|
||||
description: The number of times a discount has been used.
|
||||
type: integer
|
||||
example: 50
|
||||
default: 0
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
92
docs/api/admin/components/schemas/discount_condition.yaml
Normal file
92
docs/api/admin/components/schemas/discount_condition.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
title: Discount Condition
|
||||
description: Holds rule conditions for when a discount is applicable
|
||||
x-resourceId: discount_condition
|
||||
required:
|
||||
- type
|
||||
- operator
|
||||
- discount_rule_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The discount condition's ID
|
||||
example: discon_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
type:
|
||||
description: The type of the Condition
|
||||
type: string
|
||||
enum:
|
||||
- products
|
||||
- product_types
|
||||
- product_collections
|
||||
- product_tags
|
||||
- customer_groups
|
||||
operator:
|
||||
description: The operator of the Condition
|
||||
type: string
|
||||
enum:
|
||||
- in
|
||||
- not_in
|
||||
discount_rule_id:
|
||||
type: string
|
||||
description: The ID of the discount rule associated with the condition
|
||||
example: dru_01F0YESMVK96HVX7N419E3CJ7C
|
||||
discount_rule:
|
||||
description: Available if the relation `discount_rule` is expanded.
|
||||
$ref: ./discount_rule.yaml
|
||||
products:
|
||||
description: >-
|
||||
products associated with this condition if type = products. Available if
|
||||
the relation `products` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A product object.
|
||||
product_types:
|
||||
description: >-
|
||||
product types associated with this condition if type = product_types.
|
||||
Available if the relation `product_types` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A product type object.
|
||||
product_tags:
|
||||
description: >-
|
||||
product tags associated with this condition if type = product_tags.
|
||||
Available if the relation `product_tags` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A product tag object.
|
||||
product_collections:
|
||||
description: >-
|
||||
product collections associated with this condition if type =
|
||||
product_collections. Available if the relation `product_collections` is
|
||||
expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A product collection object.
|
||||
customer_groups:
|
||||
description: >-
|
||||
customer groups associated with this condition if type = customer_groups.
|
||||
Available if the relation `customer_groups` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A customer group object.
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Product Tag Discount Condition
|
||||
description: Associates a discount condition with a customer group
|
||||
x-resourceId: discount_condition_customer_group
|
||||
required:
|
||||
- customer_group_id
|
||||
- condition_id
|
||||
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.
|
||||
$ref: ./customer_group.yaml
|
||||
discount_condition:
|
||||
description: Available if the relation `discount_condition` is expanded.
|
||||
$ref: ./discount_condition.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Product Discount Condition
|
||||
description: Associates a discount condition with a product
|
||||
x-resourceId: discount_condition_product
|
||||
required:
|
||||
- product_id
|
||||
- condition_id
|
||||
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: Available if the relation `product` is expanded.
|
||||
$ref: ./product.yaml
|
||||
discount_condition:
|
||||
description: Available if the relation `discount_condition` is expanded.
|
||||
$ref: ./discount_condition.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Product Collection Discount Condition
|
||||
description: Associates a discount condition with a product collection
|
||||
x-resourceId: discount_condition_product_collection
|
||||
required:
|
||||
- product_collection_id
|
||||
- condition_id
|
||||
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: Available if the relation `product_collection` is expanded.
|
||||
$ref: ./product_collection.yaml
|
||||
discount_condition:
|
||||
description: Available if the relation `discount_condition` is expanded.
|
||||
$ref: ./discount_condition.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Product Tag Discount Condition
|
||||
description: Associates a discount condition with a product tag
|
||||
x-resourceId: discount_condition_product_tag
|
||||
required:
|
||||
- product_tag_id
|
||||
- condition_id
|
||||
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: Available if the relation `product_tag` is expanded.
|
||||
$ref: ./product_tag.yaml
|
||||
discount_condition:
|
||||
description: Available if the relation `discount_condition` is expanded.
|
||||
$ref: ./discount_condition.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,34 @@
|
||||
title: Product Type Discount Condition
|
||||
description: Associates a discount condition with a product type
|
||||
x-resourceId: discount_condition_product
|
||||
required:
|
||||
- product_type_id
|
||||
- condition_id
|
||||
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: Available if the relation `product_type` is expanded.
|
||||
$ref: ./product_type.yaml
|
||||
discount_condition:
|
||||
description: Available if the relation `discount_condition` is expanded.
|
||||
$ref: ./discount_condition.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
66
docs/api/admin/components/schemas/discount_rule.yaml
Normal file
66
docs/api/admin/components/schemas/discount_rule.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
title: Discount Rule
|
||||
description: >-
|
||||
Holds the rules that governs how a Discount is calculated when applied to a
|
||||
Cart.
|
||||
x-resourceId: discount_rule
|
||||
required:
|
||||
- type
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The discount rule's ID
|
||||
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
|
||||
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.
|
||||
type: string
|
||||
enum:
|
||||
- total
|
||||
- item
|
||||
example: total
|
||||
conditions:
|
||||
description: >-
|
||||
A set of conditions that can be used to limit when the discount can be
|
||||
used. Available if the relation `conditions` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A discount condition object.
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
71
docs/api/admin/components/schemas/draft-order.yaml
Normal file
71
docs/api/admin/components/schemas/draft-order.yaml
Normal file
@@ -0,0 +1,71 @@
|
||||
title: DraftOrder
|
||||
description: Represents a draft order
|
||||
x-resourceId: draft-order
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The draft order's ID
|
||||
example: dorder_01G8TJFKBG38YYFQ035MSVG03C
|
||||
status:
|
||||
type: string
|
||||
description: The status of the draft order
|
||||
enum:
|
||||
- open
|
||||
- completed
|
||||
default: open
|
||||
display_id:
|
||||
type: string
|
||||
description: The draft order's display ID
|
||||
example: 2
|
||||
cart_id:
|
||||
type: string
|
||||
description: The ID of the cart associated with the draft order.
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
type: string
|
||||
description: The ID of the order associated with the draft order.
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
canceled_at:
|
||||
type: string
|
||||
description: The date the draft order was canceled at.
|
||||
format: date-time
|
||||
completed_at:
|
||||
type: string
|
||||
description: The date the draft order was completed at.
|
||||
format: date-time
|
||||
no_notification_order:
|
||||
type: boolean
|
||||
description: Whether to send the customer notifications regarding order updates.
|
||||
example: false
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the cart
|
||||
associated with the draft order in case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
117
docs/api/admin/components/schemas/fulfillment.yaml
Normal file
117
docs/api/admin/components/schemas/fulfillment.yaml
Normal file
@@ -0,0 +1,117 @@
|
||||
title: Fulfillment
|
||||
description: >-
|
||||
Fulfillments are created once store operators can prepare the purchased goods.
|
||||
Fulfillments will eventually be shipped and hold information about how to
|
||||
track shipments. Fulfillments are created through a provider, which is
|
||||
typically an external shipping aggregator, shipping partner og 3PL, most
|
||||
plugins will have asynchronous communications with these providers through
|
||||
webhooks in order to automatically update and synchronize the state of
|
||||
Fulfillments.
|
||||
x-resourceId: fulfillment
|
||||
required:
|
||||
- provider_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cart's ID
|
||||
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
|
||||
claim_order_id:
|
||||
description: The id of the Claim that the Fulfillment belongs to.
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: A claim order object. Available if the relation `claim_order` is expanded.
|
||||
type: object
|
||||
swap_id:
|
||||
description: The id of the Swap that the Fulfillment belongs to.
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: A swap object. Available if the relation `swap` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
description: The id of the Order that the Fulfillment belongs to.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
provider_id:
|
||||
description: >-
|
||||
The id of the Fulfillment Provider responsible for handling the
|
||||
fulfillment
|
||||
type: string
|
||||
example: manual
|
||||
provider:
|
||||
description: Available if the relation `provider` is expanded.
|
||||
$ref: ./fulfillment_provider.yaml
|
||||
items:
|
||||
description: >-
|
||||
The Fulfillment Items in the Fulfillment - these hold information about
|
||||
how many of each Line Item has been fulfilled. Available if the relation
|
||||
`items` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./fulfillment_item.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.
|
||||
Available if the relation `tracking_links` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./tracking_link.yaml
|
||||
tracking_numbers:
|
||||
deprecated: true
|
||||
description: >-
|
||||
The tracking numbers that can be used to track the status of the
|
||||
fulfillment.
|
||||
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.
|
||||
type: string
|
||||
format: date-time
|
||||
no_notification:
|
||||
description: >-
|
||||
Flag for describing whether or not notifications related to this should be
|
||||
send.
|
||||
type: boolean
|
||||
example: false
|
||||
canceled_at:
|
||||
description: The date with timezone at which the Fulfillment was canceled.
|
||||
type: string
|
||||
format: date-time
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the fulfillment
|
||||
in case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
28
docs/api/admin/components/schemas/fulfillment_item.yaml
Normal file
28
docs/api/admin/components/schemas/fulfillment_item.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
title: Fulfillment Item
|
||||
description: >-
|
||||
Correlates a Line Item with a Fulfillment, keeping track of the quantity of
|
||||
the Line Item.
|
||||
x-resourceId: fulfillment_item
|
||||
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: A fulfillment object. Available if the relation `fulfillment` is expanded.
|
||||
type: object
|
||||
item:
|
||||
description: Available if the relation `item` is expanded.
|
||||
$ref: ./line_item.yaml
|
||||
quantity:
|
||||
description: The quantity of the Line Item that is included in the Fulfillment.
|
||||
type: integer
|
||||
example: 1
|
||||
15
docs/api/admin/components/schemas/fulfillment_provider.yaml
Normal file
15
docs/api/admin/components/schemas/fulfillment_provider.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
title: Fulfillment Provider
|
||||
description: Represents a fulfillment provider plugin and holds its installation status.
|
||||
x-resourceId: fulfillment_provider
|
||||
properties:
|
||||
id:
|
||||
description: The id of the fulfillment provider as given by the plugin.
|
||||
type: string
|
||||
example: manual
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the plugin is installed in the current version. Plugins that are
|
||||
no longer installed are not deleted by will have this field set to
|
||||
`false`.
|
||||
type: boolean
|
||||
example: true
|
||||
70
docs/api/admin/components/schemas/gift_card.yaml
Normal file
70
docs/api/admin/components/schemas/gift_card.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
title: Gift Card
|
||||
description: >-
|
||||
Gift Cards are redeemable and represent a value that can be used towards the
|
||||
payment of an Order.
|
||||
x-resourceId: gift_card
|
||||
required:
|
||||
- code
|
||||
- value
|
||||
- balance
|
||||
- region_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cart's ID
|
||||
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:
|
||||
type: string
|
||||
description: The id of the Region in which the Gift Card is available.
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
type: string
|
||||
description: The id of the Order that the Gift Card was purchased in.
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
is_disabled:
|
||||
description: >-
|
||||
Whether the Gift Card has been disabled. Disabled Gift Cards cannot be
|
||||
applied to carts.
|
||||
type: boolean
|
||||
example: false
|
||||
ends_at:
|
||||
description: The time at which the Gift Card can no longer be used.
|
||||
type: string
|
||||
format: date-time
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
43
docs/api/admin/components/schemas/gift_card_transaction.yaml
Normal file
43
docs/api/admin/components/schemas/gift_card_transaction.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
title: Gift Card Transaction
|
||||
description: >-
|
||||
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
|
||||
their Order
|
||||
x-resourceId: gift_card_transaction
|
||||
required:
|
||||
- gift_card_id
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The gift card transaction's ID
|
||||
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: A gift card object. Available if the relation `gift_card` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the Order that the Gift Card was used to pay for.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
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.
|
||||
type: boolean
|
||||
example: false
|
||||
tax_rate:
|
||||
description: The tax rate of the transaction
|
||||
type: number
|
||||
example: 0
|
||||
55
docs/api/admin/components/schemas/idempotency_key.yaml
Normal file
55
docs/api/admin/components/schemas/idempotency_key.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
title: Idempotency Key
|
||||
description: >-
|
||||
Idempotency Key is used to continue a process in case of any failure that
|
||||
might occur.
|
||||
x-resourceId: idempotency_key
|
||||
required:
|
||||
- idempotency_key
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The idempotency key's ID
|
||||
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/advanced/backend/payment/overview#idempotency-key
|
||||
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.
|
||||
type: string
|
||||
format: date-time
|
||||
request_method:
|
||||
description: The method of the request
|
||||
type: string
|
||||
example: POST
|
||||
request_params:
|
||||
type: object
|
||||
description: The parameters passed to the request
|
||||
example:
|
||||
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
request_path:
|
||||
description: The request's path
|
||||
type: string
|
||||
example: /store/carts/cart_01G8ZH853Y6TFXWPG5EYE81X63/complete
|
||||
response_code:
|
||||
type: string
|
||||
description: The response's code.
|
||||
example: 200
|
||||
response_body:
|
||||
type: object
|
||||
description: The response's body
|
||||
example:
|
||||
id: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
recovery_point:
|
||||
type: string
|
||||
description: Where to continue from.
|
||||
default: started
|
||||
31
docs/api/admin/components/schemas/image.yaml
Normal file
31
docs/api/admin/components/schemas/image.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
title: Image
|
||||
description: Images holds a reference to a URL at which the image file can be found.
|
||||
x-resourceId: image
|
||||
required:
|
||||
- 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:
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
50
docs/api/admin/components/schemas/invite.yaml
Normal file
50
docs/api/admin/components/schemas/invite.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
title: Invite
|
||||
description: Represents an invite
|
||||
x-resourceId: invite
|
||||
required:
|
||||
- user_email
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The invite's ID
|
||||
example: invite_01G8TKE4XYCTHSCK2GDEP47RE1
|
||||
user_email:
|
||||
type: string
|
||||
description: The email of the user being invited.
|
||||
format: email
|
||||
role:
|
||||
type: string
|
||||
description: The user's role.
|
||||
enum:
|
||||
- admin
|
||||
- member
|
||||
- developer
|
||||
default: member
|
||||
accepted:
|
||||
type: boolean
|
||||
description: Whether the invite was accepted or not.
|
||||
example: false
|
||||
token:
|
||||
type: string
|
||||
description: The token used to accept the invite.
|
||||
expores_at:
|
||||
type: string
|
||||
description: The date the invite expires at.
|
||||
format: date-time
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
172
docs/api/admin/components/schemas/line_item.yaml
Normal file
172
docs/api/admin/components/schemas/line_item.yaml
Normal file
@@ -0,0 +1,172 @@
|
||||
title: Line Item
|
||||
description: >-
|
||||
Line Items represent purchasable units that can be added to a Cart for
|
||||
checkout. When Line Items are purchased they will get copied to the resulting
|
||||
order and can eventually be referenced in Fulfillments and Returns. Line Items
|
||||
may also be created when processing Swaps and Claims.
|
||||
x-resourceId: line_item
|
||||
required:
|
||||
- title
|
||||
- unit_price
|
||||
- quantity
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cart's ID
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
cart_id:
|
||||
description: The ID of the Cart that the Line Item belongs to.
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the Order that the Line Item belongs to.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
swap_id:
|
||||
description: The id of the Swap that the Line Item belongs to.
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: A swap object. Available if the relation `swap` is expanded.
|
||||
type: object
|
||||
claim_order_id:
|
||||
description: The id of the Claim that the Line Item belongs to.
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: A claim order object. Available if the relation `claim_order` is expanded.
|
||||
type: object
|
||||
tax_lines:
|
||||
description: Available if the relation `tax_lines` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./line_item_tax_line.yaml
|
||||
adjustments:
|
||||
description: Available if the relation `adjustments` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./line_item_adjustment.yaml
|
||||
title:
|
||||
description: >-
|
||||
The title of the Line Item, this should be easily identifiable by the
|
||||
Customer.
|
||||
type: string
|
||||
example: Medusa Coffee Mug
|
||||
description:
|
||||
description: A more detailed description of the contents of the Line Item.
|
||||
type: string
|
||||
example: One Size
|
||||
thumbnail:
|
||||
description: A URL string to a small image of the contents of the Line Item.
|
||||
type: string
|
||||
format: uri
|
||||
example: https://medusa-public-images.s3.eu-west-1.amazonaws.com/coffee-mug.png
|
||||
is_return:
|
||||
description: Is the item being returned
|
||||
type: boolean
|
||||
example: false
|
||||
is_giftcard:
|
||||
description: Flag to indicate if the Line Item is a Gift Card.
|
||||
type: boolean
|
||||
example: false
|
||||
should_merge:
|
||||
description: >-
|
||||
Flag to indicate if new Line Items with the same variant should be merged
|
||||
or added as an additional Line Item.
|
||||
type: boolean
|
||||
example: false
|
||||
allow_discounts:
|
||||
description: >-
|
||||
Flag to indicate if the Line Item should be included when doing discount
|
||||
calculations.
|
||||
type: boolean
|
||||
example: false
|
||||
has_shipping:
|
||||
description: Flag to indicate if the Line Item has fulfillment associated with it.
|
||||
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: boolean
|
||||
example: 8000
|
||||
variant_id:
|
||||
description: The id of the Product Variant contained in the Line Item.
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: >-
|
||||
A product variant object. The Product Variant contained in the Line Item.
|
||||
Available if the relation `variant` is expanded.
|
||||
type: object
|
||||
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.
|
||||
type: integer
|
||||
example: 0
|
||||
returned_quantity:
|
||||
description: The quantity of the Line Item that has been returned.
|
||||
type: integer
|
||||
example: 0
|
||||
shipped_quantity:
|
||||
description: The quantity of the Line Item that has been shipped.
|
||||
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:
|
||||
type: integer
|
||||
description: The subtotal of the line item
|
||||
example: 8000
|
||||
tax_total:
|
||||
type: integer
|
||||
description: The total of tax of the line item
|
||||
example: 0
|
||||
total:
|
||||
type: integer
|
||||
description: The total amount of the line item
|
||||
example: 8000
|
||||
original_total:
|
||||
type: integer
|
||||
description: The original total amount of the line item
|
||||
example: 8000
|
||||
original_tax_total:
|
||||
type: integer
|
||||
description: The original tax total amount of the line item
|
||||
example: 0
|
||||
discount_total:
|
||||
type: integer
|
||||
description: The total of discount of the line item
|
||||
example: 0
|
||||
gift_card_total:
|
||||
type: integer
|
||||
description: The total of the gift card of the line item
|
||||
example: 0
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
39
docs/api/admin/components/schemas/line_item_adjustment.yaml
Normal file
39
docs/api/admin/components/schemas/line_item_adjustment.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
title: Line Item Adjustment
|
||||
description: Represents an Line Item Adjustment
|
||||
x-resourceId: line_item_adjustment
|
||||
required:
|
||||
- item_id
|
||||
- description
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The invite's ID
|
||||
example: lia_01G8TKE4XYCTHSCK2GDEP47RE1
|
||||
item_id:
|
||||
type: string
|
||||
description: The ID of the line item
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
item:
|
||||
description: Available if the relation `item` is expanded.
|
||||
$ref: ./line_item.yaml
|
||||
description:
|
||||
type: string
|
||||
description: The line item's adjustment description
|
||||
example: Adjusted item's price.
|
||||
discount_id:
|
||||
type: string
|
||||
description: The ID of the discount associated with the adjustment
|
||||
example: disc_01F0YESMW10MGHWJKZSDDMN0VN
|
||||
discount:
|
||||
description: Available if the relation `discount` is expanded.
|
||||
$ref: ./discount.yaml
|
||||
amount:
|
||||
type: number
|
||||
description: The adjustment amount
|
||||
example: 1000
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
44
docs/api/admin/components/schemas/line_item_tax_line.yaml
Normal file
44
docs/api/admin/components/schemas/line_item_tax_line.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
title: Line Item Tax Line
|
||||
description: Represents an Line Item Tax Line
|
||||
x-resourceId: line_item_tax_line
|
||||
required:
|
||||
- item_id
|
||||
- rate
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The line item tax line's ID
|
||||
example: litl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
|
||||
item_id:
|
||||
type: string
|
||||
description: The ID of the line item
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
item:
|
||||
description: Available if the relation `item` is expanded.
|
||||
$ref: ./line_item.yaml
|
||||
code:
|
||||
description: A code to identify the tax type by
|
||||
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
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
84
docs/api/admin/components/schemas/money_amount.yaml
Normal file
84
docs/api/admin/components/schemas/money_amount.yaml
Normal file
@@ -0,0 +1,84 @@
|
||||
title: Money Amount
|
||||
description: >-
|
||||
Money Amounts represents an amount that a given Product Variant can be
|
||||
purcased for. 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 Reigon.
|
||||
x-resourceId: money_amount
|
||||
required:
|
||||
- currency_code
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The money amount's ID
|
||||
example: ma_01F0YESHRFQNH5S8Q0PK84YYZN
|
||||
currency_code:
|
||||
description: The 3 character currency code that the Money Amount is given in.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: Available if the relation `currency` is expanded.
|
||||
$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.
|
||||
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.
|
||||
type: integer
|
||||
example: 1
|
||||
price_list_id:
|
||||
type: string
|
||||
description: The ID of the price list associated with the money amount
|
||||
example: pl_01G8X3CKJXCG5VXVZ87H9KC09W
|
||||
price_list:
|
||||
description: Available if the relation `price_list` is expanded.
|
||||
$ref: ./price_list.yaml
|
||||
variant_id:
|
||||
description: The id of the Product Variant contained in the Line Item.
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: >-
|
||||
The Product Variant contained in the Line Item. Available if the relation
|
||||
`variant` is expanded.
|
||||
type: object
|
||||
region_id:
|
||||
type: string
|
||||
description: The region's ID
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
50
docs/api/admin/components/schemas/note.yaml
Normal file
50
docs/api/admin/components/schemas/note.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
title: Note
|
||||
description: >-
|
||||
Notes are elements which we can use in association with different resources to
|
||||
allow users to describe additional information in relation to these.
|
||||
x-resourceId: note
|
||||
required:
|
||||
- value
|
||||
- resource_type
|
||||
- resource_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The note's ID
|
||||
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:
|
||||
type: string
|
||||
description: The ID of the author (user)
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
author:
|
||||
description: Available if the relation `author` is expanded.
|
||||
$ref: ./user.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
67
docs/api/admin/components/schemas/notification.yaml
Normal file
67
docs/api/admin/components/schemas/notification.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
title: Notification
|
||||
description: >-
|
||||
Notifications a communications sent via Notification Providers as a reaction
|
||||
to internal events such as `order.placed`. Notifications can be used to show a
|
||||
chronological timeline for communications sent to a Customer regarding an
|
||||
Order, and enables resends.
|
||||
x-resourceId: notification
|
||||
required:
|
||||
- resource_type
|
||||
- resource_id
|
||||
- to
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The notification's ID
|
||||
example: noti_01G53V9Y6CKMCGBM1P0X7C28RX
|
||||
event_name:
|
||||
description: The name of the event that the notification was sent for.
|
||||
type: string
|
||||
example: order.placed
|
||||
resource_type:
|
||||
description: The type of resource that the Notification refers to.
|
||||
type: string
|
||||
example: order
|
||||
resource_id:
|
||||
description: The ID of the resource that the Notification refers to.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
customer_id:
|
||||
description: The ID of the Customer that the Notification was sent to.
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: A customer object. Available if the relation `customer` is expanded.
|
||||
type: object
|
||||
to:
|
||||
description: >-
|
||||
The address that the Notification was sent to. This will usually be an
|
||||
email address, but represent other addresses such as a chat bot user id
|
||||
type: string
|
||||
example: user@example.com
|
||||
data:
|
||||
description: >-
|
||||
The data that the Notification was sent with. This contains all the data
|
||||
necessary for the Notification Provider to initiate a resend.
|
||||
type: object
|
||||
example: {}
|
||||
resends:
|
||||
description: The resends that have been completed after the original Notification.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./notification_resend.yaml
|
||||
provider_id:
|
||||
description: The id of the Notification Provider that handles the Notification.
|
||||
type: string
|
||||
example: sengrid
|
||||
provider:
|
||||
description: Available if the relation `provider` is expanded.
|
||||
$ref: ./notification_provider.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
17
docs/api/admin/components/schemas/notification_provider.yaml
Normal file
17
docs/api/admin/components/schemas/notification_provider.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
title: Notification Provider
|
||||
description: Represents a notification provider plugin and holds its installation status.
|
||||
x-resourceId: notification_provider
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The id of the notification provider as given by the plugin.
|
||||
type: string
|
||||
example: sendgrid
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the plugin is installed in the current version. Plugins that are
|
||||
no longer installed are not deleted by will have this field set to
|
||||
`false`.
|
||||
type: boolean
|
||||
default: true
|
||||
61
docs/api/admin/components/schemas/notification_resend.yaml
Normal file
61
docs/api/admin/components/schemas/notification_resend.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
title: Notification Resend
|
||||
description: A resend of a Notification.
|
||||
x-resourceId: notification_resend
|
||||
properties:
|
||||
id:
|
||||
description: The notification resend's ID
|
||||
type: string
|
||||
example: noti_01F0YET45G9NHP08Z66CE4QKBS
|
||||
event_name:
|
||||
description: The name of the event that the notification was sent for.
|
||||
type: string
|
||||
example: order.placed
|
||||
resource_type:
|
||||
description: The type of resource that the Notification refers to.
|
||||
type: string
|
||||
example: order
|
||||
resource_id:
|
||||
description: The ID of the resource that the Notification refers to.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
customer_id:
|
||||
description: The ID of the Customer that the Notification was sent to.
|
||||
type: string
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: A customer object. Available if the relation `customer` is expanded.
|
||||
type: object
|
||||
to:
|
||||
description: >-
|
||||
The address that the Notification was sent to. This will usually be an
|
||||
email address, but represent other addresses such as a chat bot user id
|
||||
type: string
|
||||
example: user@example.com
|
||||
data:
|
||||
description: >-
|
||||
The data that the Notification was sent with. This contains all the data
|
||||
necessary for the Notification Provider to initiate a resend.
|
||||
type: object
|
||||
example: {}
|
||||
parent_id:
|
||||
description: The ID of the Notification that was originally sent.
|
||||
type: string
|
||||
example: noti_01G53V9Y6CKMCGBM1P0X7C28RX
|
||||
parent_notification:
|
||||
description: Available if the relation `parent_notification` is expanded.
|
||||
$ref: ./notification.yaml
|
||||
provider_id:
|
||||
description: The ID of the Notification Provider that handles the Notification.
|
||||
type: string
|
||||
example: sengrid
|
||||
provider:
|
||||
description: Available if the relation `provider` is expanded.
|
||||
$ref: ./notification_provider.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
268
docs/api/admin/components/schemas/order.yaml
Normal file
268
docs/api/admin/components/schemas/order.yaml
Normal file
@@ -0,0 +1,268 @@
|
||||
title: Order
|
||||
description: Represents an order
|
||||
x-resourceId: order
|
||||
required:
|
||||
- customer_id
|
||||
- email
|
||||
- region_id
|
||||
- currency_code
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The order's ID
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
status:
|
||||
type: string
|
||||
description: The order's status
|
||||
enum:
|
||||
- pending
|
||||
- completed
|
||||
- archived
|
||||
- canceled
|
||||
- requires_action
|
||||
default: pending
|
||||
fulfillment_status:
|
||||
type: string
|
||||
description: The order's fulfillment status
|
||||
enum:
|
||||
- not_fulfilled
|
||||
- partially_fulfilled
|
||||
- fulfilled
|
||||
- partially_shipped
|
||||
- shipped
|
||||
- partially_returned
|
||||
- returned
|
||||
- canceled
|
||||
- requires_action
|
||||
default: not_fulfilled
|
||||
payment_status:
|
||||
type: string
|
||||
description: The order's payment status
|
||||
enum:
|
||||
- not_paid
|
||||
- awaiting
|
||||
- captured
|
||||
- partially_refunded
|
||||
- refuneded
|
||||
- canceled
|
||||
- requires_action
|
||||
default: not_paid
|
||||
display_id:
|
||||
type: integer
|
||||
description: The order's display ID
|
||||
example: 2
|
||||
cart_id:
|
||||
type: string
|
||||
description: The ID of the cart associated with the order
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
customer_id:
|
||||
type: string
|
||||
description: The ID of the customer associated with the order
|
||||
example: cus_01G2SG30J8C85S4A5CHM2S1NS2
|
||||
customer:
|
||||
description: A customer object. Available if the relation `customer` is expanded.
|
||||
type: object
|
||||
email:
|
||||
description: The email associated with the order
|
||||
type: string
|
||||
format: email
|
||||
billing_address_id:
|
||||
type: string
|
||||
description: The ID of the billing address associated with the order
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
billing_address:
|
||||
description: Available if the relation `billing_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
shipping_address_id:
|
||||
type: string
|
||||
description: The ID of the shipping address associated with the order
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: Available if the relation `shipping_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
region_id:
|
||||
type: string
|
||||
description: The region's ID
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
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: Available if the relation `currency` is expanded.
|
||||
$ref: ./currency.yaml
|
||||
tax_rate:
|
||||
description: The order's tax rate
|
||||
type: number
|
||||
example: 0
|
||||
discounts:
|
||||
type: array
|
||||
description: >-
|
||||
The discounts used in the order. Available if the relation `discounts` is
|
||||
expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A discount object.
|
||||
gift_cards:
|
||||
type: array
|
||||
description: >-
|
||||
The gift cards used in the order. Available if the relation `gift_cards`
|
||||
is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A gift card object.
|
||||
shipping_methods:
|
||||
type: array
|
||||
description: >-
|
||||
The shipping methods used in the order. Available if the relation
|
||||
`shipping_methods` is expanded.
|
||||
items:
|
||||
$ref: ./shipping_method.yaml
|
||||
payments:
|
||||
type: array
|
||||
description: >-
|
||||
The payments used in the order. Available if the relation `payments` is
|
||||
expanded.
|
||||
items:
|
||||
$ref: ./payment.yaml
|
||||
fulfillments:
|
||||
type: array
|
||||
description: >-
|
||||
The fulfillments used in the order. Available if the relation
|
||||
`fulfillments` is expanded.
|
||||
items:
|
||||
$ref: ./fulfillment.yaml
|
||||
returns:
|
||||
type: array
|
||||
description: >-
|
||||
The returns associated with the order. Available if the relation `returns`
|
||||
is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A return object.
|
||||
claims:
|
||||
type: array
|
||||
description: >-
|
||||
The claims associated with the order. Available if the relation `claims`
|
||||
is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A claim order object.
|
||||
refunds:
|
||||
type: array
|
||||
description: >-
|
||||
The refunds associated with the order. Available if the relation `refunds`
|
||||
is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A refund object.
|
||||
swaps:
|
||||
type: array
|
||||
description: >-
|
||||
The swaps associated with the order. Available if the relation `swaps` is
|
||||
expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A swap object.
|
||||
draft_order_id:
|
||||
type: string
|
||||
description: The ID of the draft order this order is associated with.
|
||||
example: null
|
||||
draft_order:
|
||||
description: A draft order object. Available if the relation `draft_order` is expanded.
|
||||
type: object
|
||||
items:
|
||||
type: array
|
||||
description: >-
|
||||
The line items that belong to the order. Available if the relation `items`
|
||||
is expanded.
|
||||
items:
|
||||
$ref: ./line_item.yaml
|
||||
gift_card_transactions:
|
||||
type: array
|
||||
description: >-
|
||||
The gift card transactions used in the order. Available if the relation
|
||||
`gift_card_transactions` is expanded.
|
||||
items:
|
||||
$ref: ./gift_card_transaction.yaml
|
||||
canceled_at:
|
||||
type: string
|
||||
description: The date the order was canceled on.
|
||||
format: date-time
|
||||
no_notification:
|
||||
description: >-
|
||||
Flag for describing whether or not notifications related to this should be
|
||||
send.
|
||||
type: boolean
|
||||
example: false
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the processing of the order in
|
||||
case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
external_id:
|
||||
description: The ID of an external order.
|
||||
type: string
|
||||
example: null
|
||||
sales_channel_id:
|
||||
type: string
|
||||
description: The ID of the sales channel this order is associated with.
|
||||
example: null
|
||||
sales_channel:
|
||||
description: >-
|
||||
A sales channel object. Available if the relation `sales_channel` is
|
||||
expanded.
|
||||
type: object
|
||||
shipping_total:
|
||||
type: integer
|
||||
description: The total of shipping
|
||||
example: 1000
|
||||
discount_total:
|
||||
type: integer
|
||||
description: The total of discount
|
||||
example: 800
|
||||
tax_total:
|
||||
type: integer
|
||||
description: The total of tax
|
||||
example: 0
|
||||
refunded_total:
|
||||
type: integer
|
||||
description: The total amount refunded if the order is returned.
|
||||
example: 0
|
||||
total:
|
||||
type: integer
|
||||
description: The total amount of the order
|
||||
example: 8200
|
||||
subtotal:
|
||||
type: integer
|
||||
description: The subtotal of the order
|
||||
example: 8000
|
||||
paid_total:
|
||||
type: integer
|
||||
description: The total amount paid
|
||||
example: 8000
|
||||
refundable_amount:
|
||||
type: integer
|
||||
description: The amount that can be refunded
|
||||
example: 8200
|
||||
gift_card_total:
|
||||
type: integer
|
||||
description: The total of gift cards
|
||||
example: 0
|
||||
gift_card_tax_total:
|
||||
type: integer
|
||||
description: The total of gift cards with taxes
|
||||
example: 0
|
||||
96
docs/api/admin/components/schemas/payment.yaml
Normal file
96
docs/api/admin/components/schemas/payment.yaml
Normal file
@@ -0,0 +1,96 @@
|
||||
title: Payment
|
||||
description: >-
|
||||
Payments represent an amount authorized with a given payment method, Payments
|
||||
can be captured, canceled or refunded.
|
||||
x-resourceId: payment
|
||||
required:
|
||||
- amount
|
||||
- currency_code
|
||||
- provider_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The payment's ID
|
||||
example: pay_01G2SJNT6DEEWDFNAJ4XWDTHKE
|
||||
swap_id:
|
||||
description: The ID of the Swap that the Payment is used for.
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: A swap object. Available if the relation `swap` is expanded.
|
||||
type: object
|
||||
cart_id:
|
||||
description: The id of the Cart that the Payment Session is created for.
|
||||
type: string
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the Order that the Payment is used for.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
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 that the Payment is completed in.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: Available if the relation `currency` is expanded.
|
||||
$ref: ./currency.yaml
|
||||
amount_refunded:
|
||||
description: >-
|
||||
The amount of the original Payment amount that has been refunded back to
|
||||
the Customer.
|
||||
type: integer
|
||||
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.
|
||||
type: string
|
||||
format: date-time
|
||||
canceled_at:
|
||||
description: The date with timezone at which the Payment was canceled.
|
||||
type: string
|
||||
format: date-time
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of a payment in
|
||||
case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
17
docs/api/admin/components/schemas/payment_provider.yaml
Normal file
17
docs/api/admin/components/schemas/payment_provider.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
title: Payment Provider
|
||||
description: Represents a Payment Provider plugin and holds its installation status.
|
||||
x-resourceId: payment_provider
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The id of the payment provider as given by the plugin.
|
||||
type: string
|
||||
example: manual
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the plugin is installed in the current version. Plugins that are
|
||||
no longer installed are not deleted by will have this field set to
|
||||
`false`.
|
||||
type: boolean
|
||||
default: true
|
||||
74
docs/api/admin/components/schemas/payment_session.yaml
Normal file
74
docs/api/admin/components/schemas/payment_session.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
title: Payment Session
|
||||
description: >-
|
||||
Payment Sessions are 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, who 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
|
||||
capture/refunds/etc.
|
||||
x-resourceId: payment_session
|
||||
required:
|
||||
- cart_id
|
||||
- provider_id
|
||||
- status
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The payment session's ID
|
||||
example: ps_01G901XNSRM2YS3ASN9H5KG3FZ
|
||||
cart_id:
|
||||
description: The id of the Cart that the Payment Session is created for.
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
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.
|
||||
type: boolean
|
||||
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:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of a cart in case
|
||||
of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
70
docs/api/admin/components/schemas/price_list.yaml
Normal file
70
docs/api/admin/components/schemas/price_list.yaml
Normal file
@@ -0,0 +1,70 @@
|
||||
title: Price List
|
||||
description: >-
|
||||
Price Lists represents a set of prices that overrides the default price for
|
||||
one or more product variants.
|
||||
x-resourceId: price_list
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The price list's ID
|
||||
example: pl_01G8X3CKJXCG5VXVZ87H9KC09W
|
||||
name:
|
||||
type: string
|
||||
description: The price list's name
|
||||
example: VIP Prices
|
||||
description:
|
||||
type: string
|
||||
description: The price list's description
|
||||
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.
|
||||
type: string
|
||||
format: date-time
|
||||
ends_at:
|
||||
description: The date with timezone that the Price List stops being valid.
|
||||
type: string
|
||||
format: date-time
|
||||
customer_groups:
|
||||
description: >-
|
||||
The Customer Groups that the Price List applies to. Available if the
|
||||
relation `customer_groups` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A customer group object.
|
||||
prices:
|
||||
description: >-
|
||||
The Money Amounts that are associated with the Price List. Available if
|
||||
the relation `prices` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./money_amount.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
188
docs/api/admin/components/schemas/product.yaml
Normal file
188
docs/api/admin/components/schemas/product.yaml
Normal file
@@ -0,0 +1,188 @@
|
||||
title: Product
|
||||
description: >-
|
||||
Products are a grouping of Product Variants that have common properties such
|
||||
as images and descriptions. Products can have multiple options which define
|
||||
the properties that Product Variants differ by.
|
||||
x-resourceId: product
|
||||
required:
|
||||
- title
|
||||
- profile_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product's ID
|
||||
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.
|
||||
type: string
|
||||
description:
|
||||
description: A short description of the Product.
|
||||
type: string
|
||||
example: Every programmer's best friend.
|
||||
handle:
|
||||
description: A unique identifier for the Product (e.g. for slug structure).
|
||||
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: Images of the Product. Available if the relation `images` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./image.yaml
|
||||
thumbnail:
|
||||
description: A URL to an image file that can be used to identify the Product.
|
||||
type: string
|
||||
format: uri
|
||||
options:
|
||||
description: >-
|
||||
The Product Options that are defined for the Product. Product Variants of
|
||||
the Product will have a unique combination of Product Option Values.
|
||||
Available if the relation `options` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./product_option.yaml
|
||||
variants:
|
||||
description: >-
|
||||
The Product Variants that belong to the Product. Each will have a unique
|
||||
combination of Product Option Values. Available if the relation `variants`
|
||||
is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./product_variant.yaml
|
||||
profile_id:
|
||||
description: >-
|
||||
The ID of the Shipping Profile that the Product belongs to. Shipping
|
||||
Profiles have a set of defined Shipping Options that can be used to
|
||||
Fulfill a given set of Products.
|
||||
type: string
|
||||
example: sp_01G1G5V239ENSZ5MV4JAR737BM
|
||||
profile:
|
||||
description: Available if the relation `profile` is expanded.
|
||||
$ref: ./shipping_profile.yaml
|
||||
weight:
|
||||
description: >-
|
||||
The weight of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
height:
|
||||
description: >-
|
||||
The height of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
width:
|
||||
description: >-
|
||||
The width of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
length:
|
||||
description: >-
|
||||
The length of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
type: string
|
||||
example: null
|
||||
collection_id:
|
||||
type: string
|
||||
description: The Product Collection that the Product belongs to
|
||||
example: pcol_01F0YESBFAZ0DV6V831JXWH0BG
|
||||
collection:
|
||||
description: >-
|
||||
A product collection object. Available if the relation `collection` is
|
||||
expanded.
|
||||
type: object
|
||||
type_id:
|
||||
type: string
|
||||
description: The Product type that the Product belongs to
|
||||
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
type:
|
||||
description: Available if the relation `type` is expanded.
|
||||
$ref: ./product_type.yaml
|
||||
tags:
|
||||
description: >-
|
||||
The Product Tags assigned to the Product. Available if the relation `tags`
|
||||
is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./product_tag.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
|
||||
type: string
|
||||
example: null
|
||||
sales_channels:
|
||||
description: >-
|
||||
The sales channels the product is associated with. Available if the
|
||||
relation `sales_channels` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A sales channel object.
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
45
docs/api/admin/components/schemas/product_collection.yaml
Normal file
45
docs/api/admin/components/schemas/product_collection.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
title: Product Collection
|
||||
description: Product Collections represents a group of Products that are related.
|
||||
x-resourceId: product_collection
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product collection's ID
|
||||
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.
|
||||
type: string
|
||||
example: summer-collection
|
||||
products:
|
||||
description: >-
|
||||
The Products contained in the Product Collection. Available if the
|
||||
relation `products` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A product collection object.
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
49
docs/api/admin/components/schemas/product_option.yaml
Normal file
49
docs/api/admin/components/schemas/product_option.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
title: Product Option
|
||||
description: >-
|
||||
Product Options define properties that may vary between different variants of
|
||||
a Product. Common Product Options are "Size" and "Color", but Medusa doesn't
|
||||
limit what Product Options that can be defined.
|
||||
x-resourceId: product_option
|
||||
required:
|
||||
- title
|
||||
- product_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product option's ID
|
||||
example: opt_01F0YESHQBZVKCEXJ24BS6PCX3
|
||||
title:
|
||||
description: The title that the Product Option is defined by (e.g. "Size").
|
||||
type: string
|
||||
example: Size
|
||||
values:
|
||||
description: >-
|
||||
The Product Option Values that are defined for the Product Option.
|
||||
Available if the relation `values` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./product_option_value.yaml
|
||||
product_id:
|
||||
description: The ID of the Product that the Product Option is defined for.
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
product:
|
||||
description: A product object. Available if the relation `product` is expanded.
|
||||
type: object
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
54
docs/api/admin/components/schemas/product_option_value.yaml
Normal file
54
docs/api/admin/components/schemas/product_option_value.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
title: Product Option Value
|
||||
description: >-
|
||||
A value given to a Product Variant's option set. Product Variant have a
|
||||
Product Option Value for each of the Product Options defined on the Product.
|
||||
x-resourceId: product_option_value
|
||||
required:
|
||||
- value
|
||||
- option_id
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product option value's ID
|
||||
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 is defined for.
|
||||
type: string
|
||||
example: opt_01F0YESHQBZVKCEXJ24BS6PCX3
|
||||
option:
|
||||
description: Available if the relation `option` is expanded.
|
||||
$ref: ./product_option.yaml
|
||||
variant_id:
|
||||
description: >-
|
||||
The ID of the Product Variant that the Product Option Value is defined
|
||||
for.
|
||||
type: string
|
||||
example: variant_01G1G5V2MRX2V3PVSR2WXYPFB6
|
||||
variant:
|
||||
description: Available if the relation `variant` is expanded.
|
||||
$ref: ./product_variant.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
31
docs/api/admin/components/schemas/product_tag.yaml
Normal file
31
docs/api/admin/components/schemas/product_tag.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
title: Product Tag
|
||||
description: Product Tags can be added to Products for easy filtering and grouping.
|
||||
x-resourceId: product_tag
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product tag's ID
|
||||
example: ptag_01G8K2MTMG9168F2B70S1TAVK3
|
||||
value:
|
||||
description: The value that the Product Tag represents
|
||||
type: string
|
||||
example: Pants
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
36
docs/api/admin/components/schemas/product_tax_rate.yaml
Normal file
36
docs/api/admin/components/schemas/product_tax_rate.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
title: Product Tax Rate
|
||||
description: >-
|
||||
Associates a tax rate with a product to indicate that the product is taxed in
|
||||
a certain way
|
||||
x-resourceId: product_tax_rate
|
||||
required:
|
||||
- product_id
|
||||
- rate_id
|
||||
properties:
|
||||
product_id:
|
||||
description: The ID of the Product
|
||||
type: string
|
||||
example: prod_01G1G5V2MBA328390B5AXJ610F
|
||||
product:
|
||||
description: Available if the relation `product` is expanded.
|
||||
$ref: ./product.yaml
|
||||
rate_id:
|
||||
description: The ID of the Tax Rate
|
||||
type: string
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
tax_rate:
|
||||
description: Available if the relation `tax_rate` is expanded.
|
||||
$ref: ./tax_rate.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
31
docs/api/admin/components/schemas/product_type.yaml
Normal file
31
docs/api/admin/components/schemas/product_type.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
title: Product Type
|
||||
description: Product Type can be added to Products for filtering and reporting purposes.
|
||||
x-resourceId: product_type
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product type's ID
|
||||
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
value:
|
||||
description: The value that the Product Type represents.
|
||||
type: string
|
||||
example: Clothing
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
36
docs/api/admin/components/schemas/product_type_tax_rate.yaml
Normal file
36
docs/api/admin/components/schemas/product_type_tax_rate.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
title: Product Type Tax Rate
|
||||
description: >-
|
||||
Associates a tax rate with a product type to indicate that the product type is
|
||||
taxed in a certain way
|
||||
x-resourceId: product_type_tax_rate
|
||||
required:
|
||||
- product_type_id
|
||||
- rate_id
|
||||
properties:
|
||||
product_type_id:
|
||||
description: The ID of the Product type
|
||||
type: string
|
||||
example: ptyp_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
product_type:
|
||||
description: Available if the relation `product_type` is expanded.
|
||||
$ref: ./product_type.yaml
|
||||
rate_id:
|
||||
description: The id of the Tax Rate
|
||||
type: string
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
tax_rate:
|
||||
description: Available if the relation `tax_rate` is expanded.
|
||||
$ref: ./tax_rate.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
149
docs/api/admin/components/schemas/product_variant.yaml
Normal file
149
docs/api/admin/components/schemas/product_variant.yaml
Normal file
@@ -0,0 +1,149 @@
|
||||
title: Product Variant
|
||||
description: >-
|
||||
Product Variants represent 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.
|
||||
x-resourceId: product_variant
|
||||
required:
|
||||
- title
|
||||
- product_id
|
||||
- inventory_quantity
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The product variant's ID
|
||||
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: A product object. Available if the relation `product` is expanded.
|
||||
type: object
|
||||
prices:
|
||||
description: >-
|
||||
The Money Amounts defined for the Product Variant. Each Money Amount
|
||||
represents a price in a given currency or a price in a specific Region.
|
||||
Available if the relation `prices` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./money_amount.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.
|
||||
type: string
|
||||
example: shirt-123
|
||||
barcode:
|
||||
description: >-
|
||||
A generic field for a GTIN number that can be used to identify the Product
|
||||
Variant.
|
||||
type: string
|
||||
example: null
|
||||
ean:
|
||||
description: An EAN barcode number that can be used to identify the Product Variant.
|
||||
type: string
|
||||
example: null
|
||||
upc:
|
||||
description: A UPC barcode number that can be used to identify the Product Variant.
|
||||
type: string
|
||||
example: null
|
||||
variant_rank:
|
||||
description: The ranking of this variant
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
type: string
|
||||
example: null
|
||||
weight:
|
||||
description: >-
|
||||
The weight of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
height:
|
||||
description: >-
|
||||
The height of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
width:
|
||||
description: >-
|
||||
The width of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
length:
|
||||
description: >-
|
||||
The length of the Product Variant. May be used in shipping rate
|
||||
calculations.
|
||||
type: number
|
||||
example: null
|
||||
options:
|
||||
description: >-
|
||||
The Product Option Values specified for the Product Variant. Available if
|
||||
the relation `options` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./product_option_value.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
64
docs/api/admin/components/schemas/refund.yaml
Normal file
64
docs/api/admin/components/schemas/refund.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
title: Refund
|
||||
description: >-
|
||||
Refund represent 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 a store operator.
|
||||
x-resourceId: refund
|
||||
required:
|
||||
- order_id
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The refund's ID
|
||||
example: ref_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
order_id:
|
||||
description: The id of the Order that the Refund is related to.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
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.
|
||||
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:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the refund in
|
||||
case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
102
docs/api/admin/components/schemas/region.yaml
Normal file
102
docs/api/admin/components/schemas/region.yaml
Normal file
@@ -0,0 +1,102 @@
|
||||
title: Region
|
||||
description: >-
|
||||
Regions hold settings for how Customers in a given geographical location shop.
|
||||
The is, for example, where currencies and tax rates are defined. A Region can
|
||||
consist of multiple countries to accomodate common shopping settings across
|
||||
countries.
|
||||
x-resourceId: region
|
||||
required:
|
||||
- name
|
||||
- currency_code
|
||||
- tax_rate
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cart's ID
|
||||
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 that the Region uses.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
currency:
|
||||
description: Available if the relation `currency` is expanded.
|
||||
$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 tax rates that are included in the Region. Available if the relation
|
||||
`tax_rates` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./tax_rate.yaml
|
||||
tax_code:
|
||||
description: >-
|
||||
The tax code used on purchases in the Region. This may be used by other
|
||||
systems for accounting purposes.
|
||||
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 countries that are included in the Region. Available if the relation
|
||||
`countries` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./country.yaml
|
||||
tax_provider_id:
|
||||
type: string
|
||||
description: The ID of the tax provider used in this region
|
||||
example: null
|
||||
tax_provider:
|
||||
description: Available if the relation `tax_provider` is expanded.
|
||||
$ref: ./tax_provider.yaml
|
||||
payment_providers:
|
||||
description: >-
|
||||
The Payment Providers that can be used to process Payments in the Region.
|
||||
Available if the relation `payment_providers` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./payment_provider.yaml
|
||||
fulfillment_providers:
|
||||
description: >-
|
||||
The Fulfillment Providers that can be used to fulfill orders in the
|
||||
Region. Available if the relation `payment_providers` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./fulfillment_provider.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
98
docs/api/admin/components/schemas/return.yaml
Normal file
98
docs/api/admin/components/schemas/return.yaml
Normal file
@@ -0,0 +1,98 @@
|
||||
title: Return
|
||||
description: >-
|
||||
Return orders hold information about Line Items that a Customer wishes to send
|
||||
back, along with how the items will be returned. Returns can be used as part
|
||||
of a Swap.
|
||||
x-resourceId: return
|
||||
required:
|
||||
- refund_amount
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The return's ID
|
||||
example: ret_01F0YET7XPCMF8RZ0Y151NZV2V
|
||||
status:
|
||||
description: Status of the Return.
|
||||
type: string
|
||||
enum:
|
||||
- requested
|
||||
- received
|
||||
- requires_action
|
||||
- canceled
|
||||
default: requested
|
||||
items:
|
||||
description: >-
|
||||
The Return Items that will be shipped back to the warehouse. Available if
|
||||
the relation `items` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./return_item.yaml
|
||||
swap_id:
|
||||
description: The ID of the Swap that the Return is a part of.
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: A swap object. Available if the relation `swap` is expanded.
|
||||
type: object
|
||||
order_id:
|
||||
description: The ID of the Order that the Return is made from.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
claim_order_id:
|
||||
description: The ID of the Claim that the Return is a part of.
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: A claim order object. Available if the relation `claim_order` is expanded.
|
||||
type: object
|
||||
shipping_method:
|
||||
description: >-
|
||||
The Shipping Method that will be used to send the Return back. Can be null
|
||||
if the Customer facilitates the return shipment themselves. Available if
|
||||
the relation `shipping_method` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./shipping_method.yaml
|
||||
shipping_data:
|
||||
description: >-
|
||||
Data about the return shipment as provided by the Fulfilment Provider that
|
||||
handles the return shipment.
|
||||
type: object
|
||||
example: {}
|
||||
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.
|
||||
type: boolean
|
||||
example: false
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the return in
|
||||
case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
received_at:
|
||||
description: The date with timezone at which the return was received.
|
||||
type: string
|
||||
format: date-time
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
57
docs/api/admin/components/schemas/return_item.yaml
Normal file
57
docs/api/admin/components/schemas/return_item.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
title: Return Item
|
||||
description: >-
|
||||
Correlates a Line Item with a Return, keeping track of the quantity of the
|
||||
Line Item that will be returned.
|
||||
x-resourceId: return_item
|
||||
required:
|
||||
- return_id
|
||||
- item_id
|
||||
properties:
|
||||
return_id:
|
||||
description: The id of the Return that the Return Item belongs to.
|
||||
type: string
|
||||
example: ret_01F0YET7XPCMF8RZ0Y151NZV2V
|
||||
return_order:
|
||||
description: Available if the relation `return_order` is expanded.
|
||||
$ref: ./return.yaml
|
||||
item_id:
|
||||
description: The id of the Line Item that the Return Item references.
|
||||
type: string
|
||||
example: item_01G8ZC9GWT6B2GP5FSXRXNFNGN
|
||||
item:
|
||||
description: Available if the relation `item` is expanded.
|
||||
$ref: ./line_item.yaml
|
||||
quantity:
|
||||
description: The quantity of the Line Item that is included in the Return.
|
||||
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.
|
||||
type: integer
|
||||
example: 1
|
||||
recieved_quantity:
|
||||
description: The quantity that was received in the warehouse.
|
||||
type: integer
|
||||
example: 1
|
||||
reason_id:
|
||||
description: The ID of the reason for returning the item.
|
||||
type: string
|
||||
example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ
|
||||
reason:
|
||||
description: Available if the relation `reason` is expanded.
|
||||
$ref: ./return_reason.yaml
|
||||
note:
|
||||
description: An optional note with additional details about the Return.
|
||||
type: string
|
||||
example: I didn't like it.
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
52
docs/api/admin/components/schemas/return_reason.yaml
Normal file
52
docs/api/admin/components/schemas/return_reason.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
title: Return Reason
|
||||
description: >-
|
||||
A Reason for why a given product is returned. A Return Reason can be used on
|
||||
Return Items in order to indicate why a Line Item was returned.
|
||||
x-resourceId: return_reason
|
||||
required:
|
||||
- value
|
||||
- label
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The cart's ID
|
||||
example: rr_01G8X82GCCV2KSQHDBHSSAH5TQ
|
||||
description:
|
||||
description: A description of the Reason.
|
||||
type: string
|
||||
example: Items that are damaged
|
||||
label:
|
||||
description: A text that can be displayed to the Customer as a reason.
|
||||
type: string
|
||||
example: Damaged goods
|
||||
value:
|
||||
description: The value to identify the reason by.
|
||||
type: string
|
||||
example: damaged
|
||||
parent_return_reason_id:
|
||||
type: string
|
||||
description: The ID of the parent reason.
|
||||
example: null
|
||||
parent_return_reason:
|
||||
description: Available if the relation `parent_return_reason` is expanded.
|
||||
$ref: ./return_reason.yaml
|
||||
return_reason_children:
|
||||
description: Available if the relation `return_reason_children` is expanded.
|
||||
$ref: ./return_reason.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
34
docs/api/admin/components/schemas/sales_channel.yaml
Normal file
34
docs/api/admin/components/schemas/sales_channel.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
title: Sales Channel
|
||||
description: A Sales Channel
|
||||
x-resourceId: sales_channel
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The sales channel's ID
|
||||
example: sc_01G8X9A7ESKAJXG2H0E6F1MW7A
|
||||
name:
|
||||
description: The name of the sales channel.
|
||||
type: string
|
||||
example: Market
|
||||
description:
|
||||
description: The description of the sales channel.
|
||||
type: string
|
||||
example: Multi-vendor market
|
||||
is_disabled:
|
||||
description: Specify if the sales channel is enabled or disabled.
|
||||
type: boolean
|
||||
default: false
|
||||
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,44 @@
|
||||
title: Sales Channel
|
||||
description: A Sales Channel
|
||||
x-resourceId: sales_channel_tax_line
|
||||
required:
|
||||
- shipping_method_id
|
||||
- rate
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The line item tax line's ID
|
||||
example: smtl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
|
||||
shipping_method_id:
|
||||
type: string
|
||||
description: The ID of the line item
|
||||
example: sm_01F0YET7DR2E7CYVSDHM593QG2
|
||||
shipping_method:
|
||||
description: Available if the relation `shipping_method` is expanded.
|
||||
$ref: ./shipping_method.yaml
|
||||
code:
|
||||
description: A code to identify the tax type by
|
||||
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
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
76
docs/api/admin/components/schemas/shipping_method.yaml
Normal file
76
docs/api/admin/components/schemas/shipping_method.yaml
Normal file
@@ -0,0 +1,76 @@
|
||||
title: Shipping Method
|
||||
description: >-
|
||||
Shipping Methods represent a way in which an Order or Return can be shipped.
|
||||
Shipping Methods are built from a Shipping Option, but may contain additional
|
||||
details, that can be necessary for the Fulfillment Provider to handle the
|
||||
shipment.
|
||||
x-resourceId: shipping_method
|
||||
required:
|
||||
- shipping_option_id
|
||||
- price
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The shipping method's ID
|
||||
example: sm_01F0YET7DR2E7CYVSDHM593QG2
|
||||
shipping_option_id:
|
||||
description: The id of the Shipping Option that the Shipping Method is built from.
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
shipping_option:
|
||||
description: Available if the relation `shipping_option` is expanded.
|
||||
$ref: ./shipping_option.yaml
|
||||
order_id:
|
||||
description: The id of the Order that the Shipping Method is used on.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
return_id:
|
||||
description: The id of the Return that the Shipping Method is used on.
|
||||
type: string
|
||||
example: null
|
||||
return_order:
|
||||
description: A return object. Available if the relation `return_order` is expanded.
|
||||
type: object
|
||||
swap_id:
|
||||
description: The id of the Swap that the Shipping Method is used on.
|
||||
type: string
|
||||
example: null
|
||||
swap:
|
||||
description: A swap object. Available if the relation `swap` is expanded.
|
||||
type: object
|
||||
cart_id:
|
||||
description: The id of the Cart that the Shipping Method is used on.
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
claim_order_id:
|
||||
description: The id of the Claim that the Shipping Method is used on.
|
||||
type: string
|
||||
example: null
|
||||
claim_order:
|
||||
description: A claim order object. Available if the relation `claim_order` is expanded.
|
||||
type: object
|
||||
tax_lines:
|
||||
type: array
|
||||
description: Available if the relation `tax_lines` is expanded.
|
||||
items:
|
||||
$ref: ./tax_line.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: {}
|
||||
103
docs/api/admin/components/schemas/shipping_option.yaml
Normal file
103
docs/api/admin/components/schemas/shipping_option.yaml
Normal file
@@ -0,0 +1,103 @@
|
||||
title: Shipping Option
|
||||
description: >-
|
||||
Shipping Options represent 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.
|
||||
x-resourceId: shipping_option
|
||||
required:
|
||||
- name
|
||||
- region_id
|
||||
- profile_id
|
||||
- provider_id
|
||||
- price_type
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The shipping option's ID
|
||||
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:
|
||||
type: string
|
||||
description: The region's ID
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
profile_id:
|
||||
description: >-
|
||||
The ID of the Shipping Profile that the shipping option belongs to.
|
||||
Shipping Profiles have a set of defined Shipping Options that can be used
|
||||
to Fulfill a given set of Products.
|
||||
type: string
|
||||
example: sp_01G1G5V239ENSZ5MV4JAR737BM
|
||||
profile:
|
||||
description: Available if the relation `profile` is expanded.
|
||||
$ref: ./shipping_profile.yaml
|
||||
provider_id:
|
||||
description: >-
|
||||
The id of the Fulfillment Provider, that will be used to process
|
||||
Fulfillments from the Shipping Option.
|
||||
type: string
|
||||
example: manual
|
||||
provider:
|
||||
description: Available if the relation `provider` is expanded.
|
||||
$ref: ./fulfillment_provider.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`.
|
||||
type: integer
|
||||
example: 200
|
||||
is_return:
|
||||
description: Flag to indicate if the Shipping Option can be used for Return shipments.
|
||||
type: boolean
|
||||
default: false
|
||||
requirements:
|
||||
description: >-
|
||||
The requirements that must be satisfied for the Shipping Option to be
|
||||
available for a Cart. Available if the relation `requirements` is
|
||||
expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./shipping_option_requirement.yaml
|
||||
data:
|
||||
description: >-
|
||||
The data needed for the Fulfillment Provider to identify the Shipping
|
||||
Option.
|
||||
type: object
|
||||
example: {}
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
@@ -0,0 +1,43 @@
|
||||
title: Shipping Option Requirement
|
||||
description: >-
|
||||
A requirement that a Cart must satisfy for the Shipping Option to be available
|
||||
to the Cart.
|
||||
x-resourceId: shipping_option_requirement
|
||||
required:
|
||||
- shipping_option_id
|
||||
- type
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The shipping option requirement's ID
|
||||
example: sor_01G1G5V29AB4CTNDRFSRWSRKWD
|
||||
shipping_option_id:
|
||||
description: >-
|
||||
The id of the Shipping Option that the hipping option requirement belongs
|
||||
to
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
shipping_option:
|
||||
description: Available if the relation `shipping_option` is expanded.
|
||||
$ref: ./shipping_option.yaml
|
||||
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:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
62
docs/api/admin/components/schemas/shipping_profile.yaml
Normal file
62
docs/api/admin/components/schemas/shipping_profile.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
title: Shipping Profile
|
||||
description: >-
|
||||
Shipping Profiles have a set of defined Shipping Options that can be used to
|
||||
fulfill a given set of Products.
|
||||
x-resourceId: shipping_profile
|
||||
required:
|
||||
- name
|
||||
- type
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The shipping profile's ID
|
||||
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 Products that the Shipping Profile defines Shipping Options for.
|
||||
Available if the relation `products` is expanded.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
description: A product object.
|
||||
shipping_options:
|
||||
description: >-
|
||||
The Shipping Options that can be used to fulfill the Products in the
|
||||
Shipping Profile. Available if the relation `shipping_options` is
|
||||
expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./shipping_option.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
36
docs/api/admin/components/schemas/shipping_tax_rate.yaml
Normal file
36
docs/api/admin/components/schemas/shipping_tax_rate.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
title: Shipping Tax Rate
|
||||
description: >-
|
||||
Associates a tax rate with a shipping option to indicate that the shipping
|
||||
option is taxed in a certain way
|
||||
x-resourceId: shipping_tax_rate
|
||||
required:
|
||||
- shipping_option_id
|
||||
- rate_id
|
||||
properties:
|
||||
shipping_option_id:
|
||||
description: The ID of the Shipping Option
|
||||
type: string
|
||||
example: so_01G1G5V27GYX4QXNARRQCW1N8T
|
||||
shipping_option:
|
||||
description: Available if the relation `shipping_option` is expanded.
|
||||
$ref: ./shipping_option.yaml
|
||||
rate_id:
|
||||
description: The ID of the Tax Rate
|
||||
type: string
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
tax_rate:
|
||||
description: Available if the relation `tax_rate` is expanded.
|
||||
$ref: ./tax_rate.yaml
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
18
docs/api/admin/components/schemas/staged_job.yaml
Normal file
18
docs/api/admin/components/schemas/staged_job.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
title: Staged Job
|
||||
description: A staged job resource
|
||||
x-resourceId: staged_job
|
||||
required:
|
||||
- event_name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The staged job's ID
|
||||
example: job_01F0YET7BZTARY9MKN1SJ7AAXF
|
||||
event_name:
|
||||
description: The name of the event
|
||||
type: string
|
||||
example: order.placed
|
||||
data:
|
||||
description: Data necessary for the job
|
||||
type: object
|
||||
example: {}
|
||||
59
docs/api/admin/components/schemas/store.yaml
Normal file
59
docs/api/admin/components/schemas/store.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
title: Store
|
||||
description: Holds settings for the Store, such as name, currencies, etc.
|
||||
x-resourceId: store
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The store's ID
|
||||
example: store_01G1G5V21KADXNGH29BJMAJ4B4
|
||||
name:
|
||||
description: The name of the Store - this may be displayed to the Customer.
|
||||
type: string
|
||||
example: Medusa Store
|
||||
default_currency_code:
|
||||
description: The 3 character currency code that is the default of the store.
|
||||
type: string
|
||||
example: usd
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
default_currency:
|
||||
description: Available if the relation `default_currency` is expanded.
|
||||
$ref: ./currency.yaml
|
||||
currencies:
|
||||
description: >-
|
||||
The currencies that are enabled for the Store. Available if the relation
|
||||
`currencies` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./currency.yaml
|
||||
swap_link_template:
|
||||
description: >-
|
||||
A template to generate Swap links from. Use {{cart_id}} to include the
|
||||
Swap's `cart_id` in the link.
|
||||
type: string
|
||||
example: null
|
||||
payment_link_template:
|
||||
description: >-
|
||||
A template to generate Payment links from. Use {{cart_id}} to include the
|
||||
payment's `cart_id` in the link.
|
||||
type: string
|
||||
example: null
|
||||
invite_link_template:
|
||||
description: A template to generate Invite links from
|
||||
type: string
|
||||
example: null
|
||||
default_sales_channel_id:
|
||||
type: string
|
||||
description: The sales channel ID the cart is associated with.
|
||||
example: null
|
||||
default_sales_channel:
|
||||
description: >-
|
||||
A sales channel object. Available if the relation `default_sales_channel`
|
||||
is expanded.
|
||||
type: object
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
149
docs/api/admin/components/schemas/swap.yaml
Normal file
149
docs/api/admin/components/schemas/swap.yaml
Normal file
@@ -0,0 +1,149 @@
|
||||
title: Swap
|
||||
description: >-
|
||||
Swaps can be created when a Customer wishes to exchange Products that they
|
||||
have purchased to different Products. Swaps consist of a Return of previously
|
||||
purchased Products and a Fulfillment of new Products, the amount paid for the
|
||||
Products being returned will be used towards payment for the new Products. In
|
||||
the case where the amount paid for the the Products being returned exceed the
|
||||
amount to be paid for the new Products, a Refund will be issued for the
|
||||
difference.
|
||||
x-resourceId: swap
|
||||
required:
|
||||
- fulfillment_status
|
||||
- payment_status
|
||||
- order_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The swap's ID
|
||||
example: swap_01F0YET86Y9G92D3YDR9Y6V676
|
||||
fulfillment_status:
|
||||
description: The status of the Fulfillment of the Swap.
|
||||
type: string
|
||||
enum:
|
||||
- not_fulfilled
|
||||
- fulfilled
|
||||
- shipped
|
||||
- canceled
|
||||
- requires_action
|
||||
example: not_fulfilled
|
||||
payment_status:
|
||||
description: >-
|
||||
The status of the Payment of the Swap. The payment may either refer to the
|
||||
refund of an amount or the authorization of a new amount.
|
||||
type: string
|
||||
enum:
|
||||
- not_paid
|
||||
- awaiting
|
||||
- captured
|
||||
- confirmed
|
||||
- canceled
|
||||
- difference_refunded
|
||||
- partially_refunded
|
||||
- refunded
|
||||
- requires_action
|
||||
example: not_paid
|
||||
order_id:
|
||||
description: The ID of the Order where the Line Items to be returned where purchased.
|
||||
type: string
|
||||
example: order_01G8TJSYT9M6AVS5N4EMNFS1EK
|
||||
order:
|
||||
description: An order object. Available if the relation `order` is expanded.
|
||||
type: object
|
||||
additional_items:
|
||||
description: >-
|
||||
The new Line Items to ship to the Customer. Available if the relation
|
||||
`additional_items` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./line_item.yaml
|
||||
return_order:
|
||||
description: >-
|
||||
A return order object. The Return that is issued for the return part of
|
||||
the Swap. Available if the relation `return_order` is expanded.
|
||||
type: object
|
||||
fulfillments:
|
||||
description: >-
|
||||
The Fulfillments used to send the new Line Items. Available if the
|
||||
relation `fulfillments` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./fulfillment.yaml
|
||||
payment:
|
||||
description: >-
|
||||
The Payment authorized when the Swap requires an additional amount to be
|
||||
charged from the Customer. Available if the relation `payment` is
|
||||
expanded.
|
||||
$ref: ./payment.yaml
|
||||
difference_due:
|
||||
description: >-
|
||||
The difference that is paid or refunded as a result of the Swap. May be
|
||||
negative when the amount paid for the returned items exceed the total of
|
||||
the new Products.
|
||||
type: integer
|
||||
example: 0
|
||||
shipping_address_id:
|
||||
description: >-
|
||||
The Address to send the new Line Items to - in most cases this will be the
|
||||
same as the shipping address on the Order.
|
||||
type: string
|
||||
example: addr_01G8ZH853YPY9B94857DY91YGW
|
||||
shipping_address:
|
||||
description: Available if the relation `shipping_address` is expanded.
|
||||
$ref: ./address.yaml
|
||||
shipping_methods:
|
||||
description: >-
|
||||
The Shipping Methods used to fulfill the addtional items purchased.
|
||||
Available if the relation `shipping_methods` is expanded.
|
||||
type: array
|
||||
items:
|
||||
$ref: ./shipping_method.yaml
|
||||
cart_id:
|
||||
description: The id of the Cart that the Customer will use to confirm the Swap.
|
||||
type: string
|
||||
example: cart_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
cart:
|
||||
description: A cart object. Available if the relation `cart` is expanded.
|
||||
type: object
|
||||
allow_backorder:
|
||||
description: If true, swaps can be completed with items out of stock
|
||||
type: boolean
|
||||
default: false
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of the swap in case
|
||||
of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
confirmed_at:
|
||||
description: The date with timezone at which the Swap was confirmed by the Customer.
|
||||
type: string
|
||||
format: date-time
|
||||
canceled_at:
|
||||
description: The date with timezone at which the Swap was canceled.
|
||||
type: string
|
||||
format: date-time
|
||||
no_notification:
|
||||
description: If set to true, no notification will be sent related to this swap
|
||||
type: boolean
|
||||
example: false
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
36
docs/api/admin/components/schemas/tax_line.yaml
Normal file
36
docs/api/admin/components/schemas/tax_line.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
title: Tax Line
|
||||
description: Line item that specifies an amount of tax to add to a line item.
|
||||
x-resourceId: tax_line
|
||||
required:
|
||||
- rate
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The tax line's ID
|
||||
example: tl_01G1G5V2DRX1SK6NQQ8VVX4HQ8
|
||||
code:
|
||||
description: A code to identify the tax type by
|
||||
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
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
15
docs/api/admin/components/schemas/tax_provider.yaml
Normal file
15
docs/api/admin/components/schemas/tax_provider.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
title: Tax Provider
|
||||
description: The tax service used to calculate taxes
|
||||
x-resourceId: tax_provider
|
||||
properties:
|
||||
id:
|
||||
description: The id of the tax provider as given by the plugin.
|
||||
type: string
|
||||
example: manual
|
||||
is_installed:
|
||||
description: >-
|
||||
Whether the plugin is installed in the current version. Plugins that are
|
||||
no longer installed are not deleted by will have this field set to
|
||||
`false`.
|
||||
type: boolean
|
||||
default: true
|
||||
81
docs/api/admin/components/schemas/tax_rate.yaml
Normal file
81
docs/api/admin/components/schemas/tax_rate.yaml
Normal file
@@ -0,0 +1,81 @@
|
||||
title: Tax Rate
|
||||
description: >-
|
||||
A Tax Rate can be used to associate a certain rate to charge on products
|
||||
within a given Region
|
||||
x-resourceId: line_item
|
||||
required:
|
||||
- name
|
||||
- region_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The tax rate's ID
|
||||
example: txr_01G8XDBAWKBHHJRKH0AV02KXBR
|
||||
rate:
|
||||
description: The numeric rate to charge
|
||||
type: number
|
||||
example: 10
|
||||
code:
|
||||
description: A code to identify the tax type by
|
||||
type: string
|
||||
example: tax01
|
||||
name:
|
||||
description: A human friendly name for the tax
|
||||
type: string
|
||||
example: Tax Example
|
||||
region_id:
|
||||
type: string
|
||||
description: The id of the Region that the rate belongs to
|
||||
example: reg_01G1G5V26T9H8Y0M4JNE3YGA4G
|
||||
region:
|
||||
description: A region object. Available if the relation `region` is expanded.
|
||||
type: object
|
||||
products:
|
||||
type: array
|
||||
description: >-
|
||||
The products that belong to this tax rate. Available if the relation
|
||||
`products` is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A product object.
|
||||
product_types:
|
||||
type: array
|
||||
description: >-
|
||||
The product types that belong to this tax rate. Available if the relation
|
||||
`product_types` is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A product type object.
|
||||
shipping_options:
|
||||
type: array
|
||||
description: >-
|
||||
The shipping options that belong to this tax rate. Available if the
|
||||
relation `shipping_options` is expanded.
|
||||
items:
|
||||
type: object
|
||||
description: A shipping option object.
|
||||
product_count:
|
||||
description: The count of products
|
||||
type: integer
|
||||
example: null
|
||||
product_type_count:
|
||||
description: The count of product types
|
||||
type: integer
|
||||
example: null
|
||||
shipping_option_count:
|
||||
description: The count of shipping options
|
||||
type: integer
|
||||
example: null
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
55
docs/api/admin/components/schemas/tracking_link.yaml
Normal file
55
docs/api/admin/components/schemas/tracking_link.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
title: Tracking Link
|
||||
description: >-
|
||||
Tracking Link holds information about tracking numbers for a Fulfillment.
|
||||
Tracking Links can optionally contain a URL that can be visited to see the
|
||||
status of the shipment.
|
||||
x-resourceId: tracking_link
|
||||
required:
|
||||
- tracking_number
|
||||
- fulfillment_id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The tracking link's ID
|
||||
example: tlink_01G8ZH853Y6TFXWPG5EYE81X63
|
||||
url:
|
||||
description: The URL at which the status of the shipment can be tracked.
|
||||
type: string
|
||||
format: uri
|
||||
tracking_number:
|
||||
description: The tracking number given by the shipping carrier.
|
||||
type: string
|
||||
format: RH370168054CN
|
||||
fulfillment_id:
|
||||
type: string
|
||||
description: The id of the Fulfillment that the Tracking Link references.
|
||||
example: ful_01G8ZRTMQCA76TXNAT81KPJZRF
|
||||
fulfillment:
|
||||
description: Available if the relation `fulfillment` is expanded.
|
||||
$ref: ./fulfillment.yaml
|
||||
idempotency_key:
|
||||
type: string
|
||||
description: >-
|
||||
Randomly generated key used to continue the completion of a process in
|
||||
case of failure.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key
|
||||
description: Learn more how to use the idempotency key.
|
||||
created_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was created.
|
||||
format: date-time
|
||||
updated_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was updated.
|
||||
format: date-time
|
||||
deleted_at:
|
||||
type: string
|
||||
description: The date with timezone at which the resource was deleted.
|
||||
format: date-time
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
43
docs/api/admin/components/schemas/user.yaml
Normal file
43
docs/api/admin/components/schemas/user.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
title: User
|
||||
description: Represents a User who can manage store settings.
|
||||
x-resourceId: user
|
||||
required:
|
||||
- email
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The user's ID
|
||||
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
|
||||
email:
|
||||
description: The email of the User
|
||||
type: string
|
||||
format: email
|
||||
first_name:
|
||||
description: The first name of the User
|
||||
type: string
|
||||
example: Levi
|
||||
last_name:
|
||||
description: The last name of the User
|
||||
type: string
|
||||
example: Bogan
|
||||
api_token:
|
||||
description: An API token associated with the user.
|
||||
type: string
|
||||
example: null
|
||||
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
|
||||
metadata:
|
||||
type: object
|
||||
description: An optional key-value map with additional details
|
||||
example:
|
||||
car: white
|
||||
Reference in New Issue
Block a user