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

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2022-12-22 17:09:49 +02:00
committed by GitHub
parent 233d6904f8
commit 4814045036
477 changed files with 17312 additions and 17713 deletions

View File

@@ -3,12 +3,12 @@ content:
application/json:
schema:
oneOf:
- $ref: ../schemas/error.yaml
- $ref: ../schemas/multiple_errors.yaml
- $ref: ../schemas/Error.yaml
- $ref: ../schemas/MultipleErrors.yaml
examples:
not_allowed:
$ref: ../examples/not_allowed_error.yaml
invalid_data:
$ref: ../examples/invalid_data_error.yaml
multiple_errors:
MultipleErrors:
$ref: ../examples/multiple_errors.yaml

View File

@@ -2,7 +2,7 @@ description: Server Error
content:
application/json:
schema:
$ref: ../schemas/error.yaml
$ref: ../schemas/Error.yaml
examples:
database:
$ref: ../examples/database_error.yaml

View File

@@ -2,7 +2,7 @@ description: Default Error
content:
application/json:
schema:
$ref: ../schemas/error.yaml
$ref: ../schemas/Error.yaml
example:
code: unknown_error
message: An unknown error occurred.

View File

@@ -2,7 +2,7 @@ description: Invalid Request Error
content:
application/json:
schema:
$ref: ../schemas/error.yaml
$ref: ../schemas/Error.yaml
example:
code: invalid_request_error
message: Discount with code TEST already exists.

View File

@@ -2,7 +2,7 @@ description: Invalid State Error
content:
application/json:
schema:
$ref: ../schemas/error.yaml
$ref: ../schemas/Error.yaml
example:
code: unknown_error
message: >-

View File

@@ -2,7 +2,7 @@ description: Not Found Error
content:
application/json:
schema:
$ref: ../schemas/error.yaml
$ref: ../schemas/Error.yaml
example:
message: Entity with id 1 was not found
type: not_found

View File

@@ -1,6 +1,5 @@
title: Address
description: An address.
x-resourceId: address
type: object
properties:
id:

View File

@@ -1,6 +1,5 @@
title: Address Fields
description: Address fields used when creating/updating an address.
x-resourceId: address
type: object
properties:
company:

View File

@@ -0,0 +1,26 @@
type: object
required:
- email
- password
properties:
email:
description: The Users email.
type: string
format: email
first_name:
description: The name of the User.
type: string
last_name:
description: The name of the User.
type: string
role:
description: Userrole assigned to the user.
type: string
enum:
- admin
- member
- developer
password:
description: The Users password.
type: string
format: password

View File

@@ -0,0 +1,14 @@
type: object
required:
- customer_ids
properties:
customer_ids:
description: The ids of the customers to remove
type: array
items:
required:
- id
properties:
id:
description: ID of the customer
type: string

View File

@@ -0,0 +1,14 @@
type: object
required:
- resources
properties:
resources:
description: The resources to be deleted from the discount condition
type: array
items:
required:
- id
properties:
id:
description: The id of the item
type: string

View File

@@ -0,0 +1,7 @@
type: object
properties:
price_ids:
description: The price id's of the Money Amounts to delete.
type: array
items:
type: string

View File

@@ -0,0 +1,10 @@
type: object
required:
- product_ids
properties:
product_ids:
description: An array of Product IDs to remove from the Product Collection.
type: array
items:
description: The ID of a Product to add to the Product Collection.
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- sales_channel_ids
properties:
sales_channel_ids:
description: The IDs of the sales channels to delete from the publishable api key
type: array
items:
type: object
required:
- id
properties:
id:
type: string
description: The ID of the sales channel

View File

@@ -0,0 +1,15 @@
type: object
required:
- product_ids
properties:
product_ids:
description: The IDs of the products to delete from the Sales Channel.
type: array
items:
type: object
required:
- id
properties:
id:
description: The ID of a product
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- product_types
properties:
product_types:
type: array
description: The IDs of the types of products to remove association with this tax rate
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- products
properties:
products:
type: array
description: The IDs of the products to remove association with this tax rate
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- shipping_options
properties:
shipping_options:
type: array
description: The IDs of the shipping options to remove association with this tax rate
items:
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- file_key
properties:
file_key:
description: key of the file to delete
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- application_name
- state
- code
properties:
application_name:
type: string
description: Name of the application for the token to be generated for.
state:
type: string
description: State of the application.
code:
type: string
description: The code for the generated token.

View File

@@ -0,0 +1,13 @@
type: object
required:
- email
- password
properties:
email:
type: string
description: The User's email.
format: email
password:
type: string
description: The User's password.
format: password

View File

@@ -0,0 +1,34 @@
type: object
required:
- type
- context
properties:
type:
type: string
description: The type of batch job to start.
example: product-export
context:
type: object
description: Additional infomration regarding the batch to be used for processing.
example:
shape:
prices:
- region: null
currency_code: eur
dynamicImageColumnCount: 4
dynamicOptionColumnCount: 2
list_config:
skip: 0
take: 50
order:
created_at: DESC
relations:
- variants
- variant.prices
- images
dry_run:
type: boolean
description: >-
Set a batch job in dry_run mode to get some information on what will be
done without applying any modifications.
default: false

View File

@@ -0,0 +1,13 @@
type: object
properties:
title:
type: string
description: The title to identify the Collection by.
handle:
type: string
description: >-
An optional handle to be used in slugs, if none is provided we will
kebab-case the title.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,15 @@
type: object
required:
- title
properties:
title:
type: string
description: The title to identify the Collection by.
handle:
type: string
description: >-
An optional handle to be used in slugs, if none is provided we will
kebab-case the title.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,5 @@
type: object
properties:
includes_tax:
type: boolean
description: '[EXPERIMENTAL] Tax included in prices of currency.'

View File

@@ -0,0 +1,14 @@
type: object
required:
- customer_ids
properties:
customer_ids:
description: The ids of the customers to add
type: array
items:
required:
- id
properties:
id:
description: ID of the customer
type: string

View File

@@ -0,0 +1,8 @@
type: object
properties:
name:
description: Name of the customer group
type: string
metadata:
description: Metadata for the customer.
type: object

View File

@@ -0,0 +1,32 @@
type: object
properties:
email:
type: string
description: The Customer's email.
format: email
first_name:
type: string
description: The Customer's first name.
last_name:
type: string
description: The Customer's last name.
phone:
type: string
description: The Customer's phone number.
password:
type: string
description: The Customer's password.
format: password
groups:
type: array
items:
required:
- id
properties:
id:
description: The ID of a customer group
type: string
description: A list of customer groups to which the customer belongs.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,27 @@
type: object
required:
- email
- first_name
- last_name
- password
properties:
email:
type: string
description: The customer's email.
format: email
first_name:
type: string
description: The customer's first name.
last_name:
type: string
description: The customer's last name.
password:
type: string
description: The customer's password.
format: password
phone:
type: string
description: The customer's phone number.
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,37 @@
type: object
required:
- operator
properties:
operator:
description: Operator of the condition
type: string
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition is applied on products.
items:
type: string
product_types:
type: array
description: list of product type IDs if the condition is applied on product types.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition is applied on product
collections.
items:
type: string
product_tags:
type: array
description: list of product tag IDs if the condition is applied on product tags.
items:
type: string
customer_groups:
type: array
description: list of customer group IDs if the condition is applied on customer groups.
items:
type: string

View File

@@ -0,0 +1,29 @@
type: object
properties:
products:
type: array
description: list of product IDs if the condition is applied on products.
items:
type: string
product_types:
type: array
description: list of product type IDs if the condition is applied on product types.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition is applied on product
collections.
items:
type: string
product_tags:
type: array
description: list of product tag IDs if the condition is applied on product tags.
items:
type: string
customer_groups:
type: array
description: list of customer group IDs if the condition is applied on customer groups.
items:
type: string

View File

@@ -0,0 +1,14 @@
type: object
required:
- resources
properties:
resources:
description: The resources to be added to the discount condition
type: array
items:
required:
- id
properties:
id:
description: The id of the item
type: string

View File

@@ -0,0 +1,111 @@
type: object
properties:
code:
type: string
description: A unique code that will be used to redeem the Discount
rule:
description: The Discount Rule that defines how Discounts are calculated
type: object
required:
- id
properties:
id:
type: string
description: The ID of the Rule
description:
type: string
description: A short description of the discount
value:
type: number
description: >-
The value that the discount represents; this will depend on the type
of the discount
allocation:
type: string
description: The scope that the discount should apply to.
enum:
- total
- item
conditions:
type: array
description: >-
A set of conditions that can be used to limit when the discount can be
used. Only one of `products`, `product_types`, `product_collections`,
`product_tags`, and `customer_groups` should be provided.
items:
type: object
required:
- operator
properties:
id:
type: string
description: The ID of the Rule
operator:
type: string
description: Operator of the condition
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition is applied on products.
items:
type: string
product_types:
type: array
description: >-
list of product type IDs if the condition is applied on product
types.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition is applied on
product collections.
items:
type: string
product_tags:
type: array
description: >-
list of product tag IDs if the condition is applied on product
tags.
items:
type: string
customer_groups:
type: array
description: >-
list of customer group IDs if the condition is applied on
customer groups.
items:
type: string
is_disabled:
type: boolean
description: >-
Whether the Discount code is disabled on creation. You will have to enable
it later to make it available to Customers.
starts_at:
type: string
format: date-time
description: The time at which the Discount should be available.
ends_at:
type: string
format: date-time
description: The time at which the Discount should no longer be available.
valid_duration:
type: string
description: Duration the discount runs between
example: P3Y6M4DT12H30M5S
usage_limit:
type: number
description: Maximum times the discount can be used
regions:
description: >-
A list of Region ids representing the Regions in which the Discount can be
used.
type: array
items:
type: string
metadata:
description: An object containing metadata of the discount
type: object

View File

@@ -0,0 +1,130 @@
type: object
required:
- code
- rule
- regions
properties:
code:
type: string
description: A unique code that will be used to redeem the Discount
is_dynamic:
type: boolean
description: >-
Whether the Discount should have multiple instances of itself, each with a
different code. This can be useful for automatically generated codes that
all have to follow a common set of rules.
default: false
rule:
description: The Discount Rule that defines how Discounts are calculated
type: object
required:
- type
- value
- allocation
properties:
description:
type: string
description: A short description of the discount
type:
type: string
description: >-
The type of the Discount, can be `fixed` for discounts that reduce the
price by a fixed amount, `percentage` for percentage reductions or
`free_shipping` for shipping vouchers.
enum:
- fixed
- percentage
- free_shipping
value:
type: number
description: >-
The value that the discount represents; this will depend on the type
of the discount
allocation:
type: string
description: The scope that the discount should apply to.
enum:
- total
- item
conditions:
type: array
description: >-
A set of conditions that can be used to limit when the discount can
be used. Only one of `products`, `product_types`,
`product_collections`, `product_tags`, and `customer_groups` should be
provided.
items:
type: object
required:
- operator
properties:
operator:
type: string
description: Operator of the condition
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition is applied on products.
items:
type: string
product_types:
type: array
description: >-
list of product type IDs if the condition is applied on product
types.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition is applied on
product collections.
items:
type: string
product_tags:
type: array
description: >-
list of product tag IDs if the condition is applied on product
tags.
items:
type: string
customer_groups:
type: array
description: >-
list of customer group IDs if the condition is applied on
customer groups.
items:
type: string
is_disabled:
type: boolean
description: >-
Whether the Discount code is disabled on creation. You will have to enable
it later to make it available to Customers.
default: false
starts_at:
type: string
format: date-time
description: The time at which the Discount should be available.
ends_at:
type: string
format: date-time
description: The time at which the Discount should no longer be available.
valid_duration:
type: string
description: Duration the discount runs between
example: P3Y6M4DT12H30M5S
regions:
description: >-
A list of Region ids representing the Regions in which the Discount can be
used.
type: array
items:
type: string
usage_limit:
type: number
description: Maximum times the discount can be used
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,14 @@
type: object
properties:
unit_price:
description: The potential custom price of the item.
type: integer
title:
description: The potential custom title of the item.
type: string
quantity:
description: The quantity of the Line Item.
type: integer
metadata:
description: The optional key-value map with additional details about the Line Item.
type: object

View File

@@ -0,0 +1,20 @@
type: object
required:
- quantity
properties:
variant_id:
description: The ID of the Product Variant to generate the Line Item from.
type: string
unit_price:
description: The potential custom price of the item.
type: integer
title:
description: The potential custom title of the item.
type: string
default: Custom item
quantity:
description: The quantity of the Line Item.
type: integer
metadata:
description: The optional key-value map with additional details about the Line Item.
type: object

View File

@@ -0,0 +1,45 @@
type: object
properties:
region_id:
type: string
description: The ID of the Region to create the Draft Order in.
country_code:
type: string
description: The 2 character ISO code for the Country.
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.
email:
type: string
description: An email to be used on the Draft Order.
format: email
billing_address:
description: The Address to be used for billing purposes.
anyOf:
- $ref: ./AddressFields.yaml
- type: string
shipping_address:
description: The Address to be used for shipping.
anyOf:
- $ref: ./AddressFields.yaml
- type: string
discounts:
description: An array of Discount codes to add to the Draft Order.
type: array
items:
type: object
required:
- code
properties:
code:
description: The code that a Discount is identifed by.
type: string
no_notification_order:
description: >-
An optional flag passed to the resulting order to determine use of
notifications.
type: boolean
customer_id:
description: The ID of the Customer to associate the Draft Order with.
type: string

View File

@@ -0,0 +1,93 @@
type: object
required:
- email
- region_id
- shipping_methods
properties:
status:
description: The status of the draft order
type: string
enum:
- open
- completed
email:
description: The email of the customer of the draft order
type: string
format: email
billing_address:
description: The Address to be used for billing purposes.
anyOf:
- $ref: ./AddressFields.yaml
- type: string
shipping_address:
description: The Address to be used for shipping.
anyOf:
- $ref: ./AddressFields.yaml
- type: string
items:
description: The Line Items that have been received.
type: array
items:
type: object
required:
- quantity
properties:
variant_id:
description: The ID of the Product Variant to generate the Line Item from.
type: string
unit_price:
description: The potential custom price of the item.
type: integer
title:
description: The potential custom title of the item.
type: string
quantity:
description: The quantity of the Line Item.
type: integer
metadata:
description: >-
The optional key-value map with additional details about the Line
Item.
type: object
region_id:
description: The ID of the region for the draft order
type: string
discounts:
description: The discounts to add on the draft order
type: array
items:
type: object
required:
- code
properties:
code:
description: The code of the discount to apply
type: string
customer_id:
description: The ID of the customer to add on the draft order
type: string
no_notification_order:
description: >-
An optional flag passed to the resulting order to determine use of
notifications.
type: boolean
shipping_methods:
description: The shipping methods for the draft order
type: array
items:
type: object
required:
- option_id
properties:
option_id:
description: The ID of the shipping option in use
type: string
data:
description: The optional additional data needed for the shipping method
type: object
price:
description: The potential custom price of the shipping
type: integer
metadata:
description: The optional key-value map with additional details about the Draft Order.
type: object

View File

@@ -0,0 +1,20 @@
type: object
properties:
balance:
type: integer
description: The value (excluding VAT) that the Gift Card should represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. You will have to enable it
later to make it available to Customers.
ends_at:
type: string
format: date-time
description: The time at which the Gift Card should no longer be available.
region_id:
description: The ID of the Region in which the Gift Card can be used.
type: string
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,22 @@
type: object
required:
- region_id
properties:
value:
type: integer
description: The value (excluding VAT) that the Gift Card should represent.
is_disabled:
type: boolean
description: >-
Whether the Gift Card is disabled on creation. You will have to enable it
later to make it available to Customers.
ends_at:
type: string
format: date-time
description: The time at which the Gift Card should no longer be available.
region_id:
description: The ID of the Region in which the Gift Card can be used.
type: string
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,26 @@
type: object
required:
- token
- user
properties:
token:
description: The invite token provided by the admin.
type: string
user:
description: The User to create.
type: object
required:
- first_name
- last_name
- password
properties:
first_name:
type: string
description: the first name of the User
last_name:
type: string
description: the last name of the User
password:
description: The desired password for the User
type: string
format: password

View File

@@ -0,0 +1,16 @@
type: object
required:
- user
- role
properties:
user:
description: The email for the user to be created.
type: string
format: email
role:
description: The role of the user to be created.
type: string
enum:
- admin
- member
- developer

View File

@@ -0,0 +1,7 @@
type: object
required:
- value
properties:
value:
type: string
description: The updated description of the Note.

View File

@@ -0,0 +1,15 @@
type: object
required:
- resource_id
- resource_type
- value
properties:
resource_id:
type: string
description: The ID of the resource which the Note relates to.
resource_type:
type: string
description: The type of resource which the Note relates to.
value:
type: string
description: The content of the Note to create.

View File

@@ -0,0 +1,5 @@
type: object
properties:
to:
description: A new address or user identifier that the Notification should be sent to
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- quantity
properties:
quantity:
description: The quantity to update
type: number

View File

@@ -0,0 +1,14 @@
type: object
required:
- variant_id
- quantity
properties:
variant_id:
description: The ID of the variant ID to add
type: string
quantity:
description: The quantity to add
type: number
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,5 @@
type: object
properties:
internal_note:
description: An optional note to create or update for the order edit.
type: string

View File

@@ -0,0 +1,10 @@
type: object
required:
- order_id
properties:
order_id:
description: The ID of the order to create the edit for.
type: string
internal_note:
description: An optional note to create for the order edit.
type: string

View File

@@ -0,0 +1,8 @@
type: object
properties:
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
no_notification:
description: If set to true no notification will be send related to this Claim.
type: boolean

View File

@@ -0,0 +1,78 @@
type: object
properties:
claim_items:
description: The Claim Items that the Claim will consist of.
type: array
items:
required:
- id
- images
- tags
properties:
id:
description: The ID of the Claim Item.
type: string
item_id:
description: The ID of the Line Item that will be claimed.
type: string
quantity:
description: The number of items that will be returned
type: integer
note:
description: Short text describing the Claim Item in further detail.
type: string
reason:
description: The reason for the Claim
type: string
enum:
- missing_item
- wrong_item
- production_failure
- other
tags:
description: A list o tags to add to the Claim Item
type: array
items:
type: object
properties:
id:
type: string
description: Tag ID
value:
type: string
description: Tag value
images:
description: A list of image URL's that will be associated with the Claim
type: array
items:
type: object
properties:
id:
type: string
description: Image ID
url:
type: string
description: Image URL
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
shipping_methods:
description: The Shipping Methods to send the additional Line Items with.
type: array
items:
properties:
id:
description: The ID of an existing Shipping Method
type: string
option_id:
description: The ID of the Shipping Option to create a Shipping Method from
type: string
price:
description: The price to charge for the Shipping Method
type: integer
no_notification:
description: If set to true no notification will be send related to this Swap.
type: boolean
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,12 @@
type: object
required:
- fulfillment_id
properties:
fulfillment_id:
description: The ID of the Fulfillment.
type: string
tracking_numbers:
description: The tracking numbers for the shipment.
type: array
items:
type: string

View File

@@ -0,0 +1,104 @@
type: object
required:
- type
- claim_items
properties:
type:
description: >-
The type of the Claim. This will determine how the Claim is treated:
`replace` Claims will result in a Fulfillment with new items being
created, while a `refund` Claim will refund the amount paid for the
claimed items.
type: string
enum:
- replace
- refund
claim_items:
description: The Claim Items that the Claim will consist of.
type: array
items:
required:
- item_id
- quantity
properties:
item_id:
description: The ID of the Line Item that will be claimed.
type: string
quantity:
description: The number of items that will be returned
type: integer
note:
description: Short text describing the Claim Item in further detail.
type: string
reason:
description: The reason for the Claim
type: string
enum:
- missing_item
- wrong_item
- production_failure
- other
tags:
description: A list o tags to add to the Claim Item
type: array
items:
type: string
images:
description: A list of image URL's that will be associated with the Claim
items:
type: string
return_shipping:
description: >-
Optional details for the Return Shipping Method, if the items are to be
sent back.
type: object
properties:
option_id:
type: string
description: The ID of the Shipping Option to create the Shipping Method from.
price:
type: integer
description: The price to charge for the Shipping Method.
additional_items:
description: The new items to send to the Customer when the Claim type is Replace.
type: array
items:
required:
- variant_id
- quantity
properties:
variant_id:
description: The ID of the Product Variant to ship.
type: string
quantity:
description: The quantity of the Product Variant to ship.
type: integer
shipping_methods:
description: The Shipping Methods to send the additional Line Items with.
type: array
items:
properties:
id:
description: The ID of an existing Shipping Method
type: string
option_id:
description: The ID of the Shipping Option to create a Shipping Method from
type: string
price:
description: The price to charge for the Shipping Method
type: integer
shipping_address:
type: object
description: >-
An optional shipping address to send the claim to. Defaults to the parent
order's shipping address
$ref: ./Address.yaml
refund_amount:
description: The amount to refund the Customer when the Claim type is `refund`.
type: integer
no_notification:
description: If set to true no notification will be send related to this Claim.
type: boolean
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,24 @@
type: object
required:
- items
properties:
items:
description: The Line Items to include in the Fulfillment.
type: array
items:
required:
- item_id
- quantity
properties:
item_id:
description: The ID of Line Item to fulfill.
type: string
quantity:
description: The quantity of the Line Item to fulfill.
type: integer
no_notification:
description: If set to true no notification will be send related to this Swap.
type: boolean
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object

View File

@@ -0,0 +1,17 @@
type: object
required:
- amount
- reason
properties:
amount:
description: The amount to refund.
type: integer
reason:
description: The reason for the Refund.
type: string
note:
description: A note with additional details about the Refund.
type: string
no_notification:
description: If set to true no notification will be send related to this Refund.
type: boolean

View File

@@ -0,0 +1,65 @@
type: object
properties:
email:
description: the email for the order
type: string
billing_address:
description: Billing address
anyOf:
- $ref: ./AddressFields.yaml
shipping_address:
description: Shipping address
anyOf:
- $ref: ./AddressFields.yaml
items:
description: The Line Items for the order
type: array
items:
$ref: ./LineItem.yaml
region:
description: ID of the region where the order belongs
type: string
discounts:
description: Discounts applied to the order
type: array
items:
$ref: ./Discount.yaml
customer_id:
description: ID of the customer
type: string
payment_method:
description: payment method chosen for the order
type: object
properties:
provider_id:
type: string
description: ID of the payment provider
data:
description: Data relevant for the given payment method
type: object
shipping_method:
description: The Shipping Method used for shipping the order.
type: object
properties:
provider_id:
type: string
description: The ID of the shipping provider.
profile_id:
type: string
description: The ID of the shipping profile.
price:
type: integer
description: The price of the shipping.
data:
type: object
description: Data relevant to the specific shipping method.
items:
type: array
items:
$ref: ./LineItem.yaml
description: Items to ship
no_notification:
description: >-
A flag to indicate if no notifications should be emitted related to the
updated order.
type: boolean

View File

@@ -0,0 +1,51 @@
type: object
required:
- items
properties:
items:
description: The Line Items that will be returned.
type: array
items:
required:
- item_id
- quantity
properties:
item_id:
description: The ID of the Line Item.
type: string
reason_id:
description: The ID of the Return Reason to use.
type: string
note:
description: An optional note with information about the Return.
type: string
quantity:
description: The quantity of the Line Item.
type: integer
return_shipping:
description: The Shipping Method to be used to handle the return shipment.
type: object
properties:
option_id:
type: string
description: The ID of the Shipping Option to create the Shipping Method from.
price:
type: integer
description: The price to charge for the Shipping Method.
note:
description: An optional note with information about the Return.
type: string
receive_now:
description: >-
A flag to indicate if the Return should be registerd as received
immediately.
type: boolean
default: false
no_notification:
description: >-
A flag to indicate if no notifications should be emitted related to the
requested Return.
type: boolean
refund:
description: The amount to refund.
type: integer

View File

@@ -0,0 +1,15 @@
type: object
required:
- fulfillment_id
properties:
fulfillment_id:
description: The ID of the Fulfillment.
type: string
tracking_numbers:
description: The tracking numbers for the shipment.
type: array
items:
type: string
no_notification:
description: If set to true no notification will be send related to this Shipment.
type: boolean

View File

@@ -0,0 +1,71 @@
type: object
required:
- return_items
properties:
return_items:
description: The Line Items to return as part of the Swap.
type: array
items:
required:
- item_id
- quantity
properties:
item_id:
description: The ID of the Line Item that will be claimed.
type: string
quantity:
description: The number of items that will be returned
type: integer
reason_id:
description: The ID of the Return Reason to use.
type: string
note:
description: An optional note with information about the Return.
type: string
return_shipping:
description: How the Swap will be returned.
type: object
required:
- option_id
properties:
option_id:
type: string
description: The ID of the Shipping Option to create the Shipping Method from.
price:
type: integer
description: The price to charge for the Shipping Method.
additional_items:
description: The new items to send to the Customer.
type: array
items:
required:
- variant_id
- quantity
properties:
variant_id:
description: The ID of the Product Variant to ship.
type: string
quantity:
description: The quantity of the Product Variant to ship.
type: integer
custom_shipping_options:
description: The custom shipping options to potentially create a Shipping Method from.
type: array
items:
required:
- option_id
- price
properties:
option_id:
description: The ID of the Shipping Option to override with a custom price.
type: string
price:
description: The custom price of the Shipping Option.
type: integer
no_notification:
description: If set to true no notification will be send related to this Swap.
type: boolean
allow_backorder:
description: If true, swaps can be completed with items out of stock
type: boolean
default: true

View File

@@ -0,0 +1,8 @@
type: object
properties:
metadata:
description: An optional set of key-value pairs to hold additional information.
type: object
no_notification:
description: If set to true no notification will be send related to this Claim.
type: boolean

View File

@@ -0,0 +1,15 @@
type: object
required:
- fulfillment_id
properties:
fulfillment_id:
description: The ID of the Fulfillment.
type: string
tracking_numbers:
description: The tracking numbers for the shipment.
type: array
items:
type: string
no_notification:
description: If set to true no notification will be sent related to this Claim.
type: boolean

View File

@@ -0,0 +1,14 @@
type: object
required:
- amount
- reason
properties:
amount:
description: The amount to refund.
type: integer
reason:
description: The reason for the Refund.
type: string
note:
description: A note with additional details about the Refund.
type: string

View File

@@ -0,0 +1,43 @@
type: object
properties:
prices:
description: The prices to update or add.
type: array
items:
required:
- amount
- variant_id
properties:
id:
description: The ID of the price.
type: string
region_id:
description: >-
The ID of the Region for which the price is used. Only required if
currecny_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be used.
Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
variant_id:
description: The ID of the Variant for which the price is used.
type: string
amount:
description: The amount to charge for the Product Variant.
type: integer
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
override:
description: >-
If true the prices will replace all existing prices associated with the
Price List.
type: boolean

View File

@@ -0,0 +1,77 @@
type: object
properties:
name:
description: The name of the Price List
type: string
description:
description: A description of the Price List.
type: string
starts_at:
description: The date with timezone that the Price List starts being valid.
type: string
format: date
ends_at:
description: The date with timezone that the Price List ends being valid.
type: string
format: date
type:
description: The type of the Price List.
type: string
enum:
- sale
- override
status:
description: The status of the Price List.
type: string
enum:
- active
- draft
prices:
description: The prices of the Price List.
type: array
items:
required:
- amount
- variant_id
properties:
id:
description: The ID of the price.
type: string
region_id:
description: >-
The ID of the Region for which the price is used. Only required if
currecny_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be used.
Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
variant_id:
description: The ID of the Variant for which the price is used.
type: string
amount:
description: The amount to charge for the Product Variant.
type: integer
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
customer_groups:
type: array
description: A list of customer groups that the Price List applies to.
items:
required:
- id
properties:
id:
description: The ID of a customer group
type: string
includes_tax:
description: '[EXPERIMENTAL] Tax included in prices of price list'
type: boolean

View File

@@ -0,0 +1,79 @@
type: object
required:
- name
- description
- type
- prices
properties:
name:
description: The name of the Price List
type: string
description:
description: A description of the Price List.
type: string
starts_at:
description: The date with timezone that the Price List starts being valid.
type: string
format: date
ends_at:
description: The date with timezone that the Price List ends being valid.
type: string
format: date
type:
description: The type of the Price List.
type: string
enum:
- sale
- override
status:
description: The status of the Price List.
type: string
enum:
- active
- draft
prices:
description: The prices of the Price List.
type: array
items:
required:
- amount
- variant_id
properties:
region_id:
description: >-
The ID of the Region for which the price is used. Only required if
currecny_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be used.
Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
amount:
description: The amount to charge for the Product Variant.
type: integer
variant_id:
description: The ID of the Variant for which the price is used.
type: string
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
customer_groups:
type: array
description: A list of customer groups that the Price List applies to.
items:
required:
- id
properties:
id:
description: The ID of a customer group
type: string
includes_tax:
description: '[EXPERIMENTAL] Tax included in prices of price list'
type: boolean

View File

@@ -0,0 +1,11 @@
type: object
required:
- key
- value
properties:
key:
description: The metadata key
type: string
value:
description: The metadata value
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- title
properties:
title:
description: The title of the Product Option
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- title
properties:
title:
description: The title the Product Option will be identified by i.e. "Size"
type: string

View File

@@ -0,0 +1,204 @@
type: object
properties:
title:
description: The title of the Product
type: string
subtitle:
description: The subtitle of the Product
type: string
description:
description: A description of the Product.
type: string
discountable:
description: >-
A flag to indicate if discounts can be applied to the LineItems generated
from this Product
type: boolean
images:
description: Images of the Product.
type: array
items:
type: string
thumbnail:
description: The thumbnail to use for the Product.
type: string
handle:
description: A unique handle to identify the Product by.
type: string
status:
description: The status of the product.
type: string
enum:
- draft
- proposed
- published
- rejected
type:
description: The Product Type to associate the Product with.
type: object
required:
- value
properties:
id:
description: The ID of the Product Type.
type: string
value:
description: The value of the Product Type.
type: string
collection_id:
description: The ID of the Collection the Product should belong to.
type: string
tags:
description: Tags to associate the Product with.
type: array
items:
required:
- value
properties:
id:
description: The ID of an existing Tag.
type: string
value:
description: The value of the Tag, these will be upserted.
type: string
sales_channels:
description: '[EXPERIMENTAL] Sales channels to associate the Product with.'
type: array
items:
required:
- id
properties:
id:
description: The ID of an existing Sales channel.
type: string
variants:
description: A list of Product Variants to create with the Product.
type: array
items:
properties:
id:
description: The ID of the Product Variant.
type: string
title:
description: The title to identify the Product Variant by.
type: string
sku:
description: The unique SKU for the Product Variant.
type: string
ean:
description: The EAN number of the item.
type: string
upc:
description: The UPC number of the item.
type: string
barcode:
description: A generic GTIN field for the Product Variant.
type: string
hs_code:
description: The Harmonized System code for the Product Variant.
type: string
inventory_quantity:
description: The amount of stock kept for the Product Variant.
type: integer
allow_backorder:
description: Whether the Product Variant can be purchased when out of stock.
type: boolean
manage_inventory:
description: >-
Whether Medusa should keep track of the inventory for this Product
Variant.
type: boolean
weight:
description: The wieght of the Product Variant.
type: number
length:
description: The length of the Product Variant.
type: number
height:
description: The height of the Product Variant.
type: number
width:
description: The width of the Product Variant.
type: number
origin_country:
description: The country of origin of the Product Variant.
type: string
mid_code:
description: The Manufacturer Identification code for the Product Variant.
type: string
material:
description: The material composition of the Product Variant.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object
prices:
type: array
items:
required:
- amount
properties:
id:
description: The ID of the Price.
type: string
region_id:
description: >-
The ID of the Region for which the price is used. Only
required if currency_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be
used. Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
amount:
description: The amount to charge for the Product Variant.
type: integer
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
options:
type: array
items:
required:
- option_id
- value
properties:
option_id:
description: The ID of the Option.
type: string
value:
description: >-
The value to give for the Product Option at the same index in
the Product's `options` field.
type: string
weight:
description: The wieght of the Product.
type: number
length:
description: The length of the Product.
type: number
height:
description: The height of the Product.
type: number
width:
description: The width of the Product.
type: number
origin_country:
description: The country of origin of the Product.
type: string
mid_code:
description: The Manufacturer Identification code for the Product.
type: string
material:
description: The material composition of the Product.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object

View File

@@ -0,0 +1,104 @@
type: object
required:
- title
- prices
- options
properties:
title:
description: The title to identify the Product Variant by.
type: string
sku:
description: The unique SKU for the Product Variant.
type: string
ean:
description: The EAN number of the item.
type: string
upc:
description: The UPC number of the item.
type: string
barcode:
description: A generic GTIN field for the Product Variant.
type: string
hs_code:
description: The Harmonized System code for the Product Variant.
type: string
inventory_quantity:
description: The amount of stock kept for the Product Variant.
type: integer
default: 0
allow_backorder:
description: Whether the Product Variant can be purchased when out of stock.
type: boolean
manage_inventory:
description: >-
Whether Medusa should keep track of the inventory for this Product
Variant.
type: boolean
weight:
description: The wieght of the Product Variant.
type: number
length:
description: The length of the Product Variant.
type: number
height:
description: The height of the Product Variant.
type: number
width:
description: The width of the Product Variant.
type: number
origin_country:
description: The country of origin of the Product Variant.
type: string
mid_code:
description: The Manufacturer Identification code for the Product Variant.
type: string
material:
description: The material composition of the Product Variant.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object
prices:
type: array
items:
required:
- amount
properties:
id:
description: The ID of the price.
type: string
region_id:
description: >-
The ID of the Region for which the price is used. Only required if
currency_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be used.
Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
amount:
description: The amount to charge for the Product Variant.
type: integer
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
options:
type: array
items:
required:
- option_id
- value
properties:
option_id:
description: The ID of the Product Option to set the value for.
type: string
value:
description: The value to give for the Product Option.
type: string

View File

@@ -0,0 +1,101 @@
type: object
required:
- prices
properties:
title:
description: The title to identify the Product Variant by.
type: string
sku:
description: The unique SKU for the Product Variant.
type: string
ean:
description: The EAN number of the item.
type: string
upc:
description: The UPC number of the item.
type: string
barcode:
description: A generic GTIN field for the Product Variant.
type: string
hs_code:
description: The Harmonized System code for the Product Variant.
type: string
inventory_quantity:
description: The amount of stock kept for the Product Variant.
type: integer
allow_backorder:
description: Whether the Product Variant can be purchased when out of stock.
type: boolean
manage_inventory:
description: >-
Whether Medusa should keep track of the inventory for this Product
Variant.
type: boolean
weight:
description: The weight of the Product Variant.
type: number
length:
description: The length of the Product Variant.
type: number
height:
description: The height of the Product Variant.
type: number
width:
description: The width of the Product Variant.
type: number
origin_country:
description: The country of origin of the Product Variant.
type: string
mid_code:
description: The Manufacturer Identification code for the Product Variant.
type: string
material:
description: The material composition of the Product Variant.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object
prices:
type: array
items:
required:
- amount
properties:
id:
description: The ID of the price.
type: string
region_id:
description: >-
The ID of the Region for which the price is used. Only required if
currency_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be used.
Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
amount:
description: The amount to charge for the Product Variant.
type: integer
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
options:
type: array
items:
required:
- option_id
- value
properties:
option_id:
description: The ID of the Product Option to set the value for.
type: string
value:
description: The value to give for the Product Option.
type: string

View File

@@ -0,0 +1,223 @@
type: object
required:
- title
properties:
title:
description: The title of the Product
type: string
subtitle:
description: The subtitle of the Product
type: string
description:
description: A description of the Product.
type: string
is_giftcard:
description: >-
A flag to indicate if the Product represents a Gift Card. Purchasing
Products with this flag set to `true` will result in a Gift Card being
created.
type: boolean
default: false
discountable:
description: >-
A flag to indicate if discounts can be applied to the LineItems generated
from this Product
type: boolean
default: true
images:
description: Images of the Product.
type: array
items:
type: string
thumbnail:
description: The thumbnail to use for the Product.
type: string
handle:
description: A unique handle to identify the Product by.
type: string
status:
description: The status of the product.
type: string
enum:
- draft
- proposed
- published
- rejected
default: draft
type:
description: The Product Type to associate the Product with.
type: object
required:
- value
properties:
id:
description: The ID of the Product Type.
type: string
value:
description: The value of the Product Type.
type: string
collection_id:
description: The ID of the Collection the Product should belong to.
type: string
tags:
description: Tags to associate the Product with.
type: array
items:
required:
- value
properties:
id:
description: The ID of an existing Tag.
type: string
value:
description: The value of the Tag, these will be upserted.
type: string
sales_channels:
description: '[EXPERIMENTAL] Sales channels to associate the Product with.'
type: array
items:
required:
- id
properties:
id:
description: The ID of an existing Sales channel.
type: string
options:
description: >-
The Options that the Product should have. These define on which properties
the Product's Product Variants will differ.
type: array
items:
required:
- title
properties:
title:
description: The title to identify the Product Option by.
type: string
variants:
description: A list of Product Variants to create with the Product.
type: array
items:
required:
- title
properties:
title:
description: The title to identify the Product Variant by.
type: string
sku:
description: The unique SKU for the Product Variant.
type: string
ean:
description: The EAN number of the item.
type: string
upc:
description: The UPC number of the item.
type: string
barcode:
description: A generic GTIN field for the Product Variant.
type: string
hs_code:
description: The Harmonized System code for the Product Variant.
type: string
inventory_quantity:
description: The amount of stock kept for the Product Variant.
type: integer
default: 0
allow_backorder:
description: Whether the Product Variant can be purchased when out of stock.
type: boolean
manage_inventory:
description: >-
Whether Medusa should keep track of the inventory for this Product
Variant.
type: boolean
weight:
description: The wieght of the Product Variant.
type: number
length:
description: The length of the Product Variant.
type: number
height:
description: The height of the Product Variant.
type: number
width:
description: The width of the Product Variant.
type: number
origin_country:
description: The country of origin of the Product Variant.
type: string
mid_code:
description: The Manufacturer Identification code for the Product Variant.
type: string
material:
description: The material composition of the Product Variant.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object
prices:
type: array
items:
required:
- amount
properties:
region_id:
description: >-
The ID of the Region for which the price is used. Only
required if currency_code is not provided.
type: string
currency_code:
description: >-
The 3 character ISO currency code for which the price will be
used. Only required if region_id is not provided.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
amount:
description: The amount to charge for the Product Variant.
type: integer
min_quantity:
description: The minimum quantity for which the price will be used.
type: integer
max_quantity:
description: The maximum quantity for which the price will be used.
type: integer
options:
type: array
items:
required:
- value
properties:
value:
description: >-
The value to give for the Product Option at the same index in
the Product's `options` field.
type: string
weight:
description: The weight of the Product.
type: number
length:
description: The length of the Product.
type: number
height:
description: The height of the Product.
type: number
width:
description: The width of the Product.
type: number
hs_code:
description: The Harmonized System code for the Product Variant.
type: string
origin_country:
description: The country of origin of the Product.
type: string
mid_code:
description: The Manufacturer Identification code for the Product.
type: string
material:
description: The material composition of the Product.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object

View File

@@ -0,0 +1,10 @@
type: object
required:
- product_ids
properties:
product_ids:
description: An array of Product IDs to add to the Product Collection.
type: array
items:
description: The ID of a Product to add to the Product Collection.
type: string

View File

@@ -0,0 +1,15 @@
type: object
required:
- sales_channel_ids
properties:
sales_channel_ids:
description: The IDs of the sales channels to add to the publishable api key
type: array
items:
type: object
required:
- id
properties:
id:
type: string
description: The ID of the sales channel

View File

@@ -0,0 +1,5 @@
type: object
properties:
title:
description: A title to update for the key.
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- title
properties:
title:
description: A title for the publishable api key
type: string

View File

@@ -0,0 +1,11 @@
type: object
required:
- country_code
properties:
country_code:
description: The 2 character ISO code for the Country.
type: string
externalDocs:
url: >-
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
description: See a list of codes.

View File

@@ -0,0 +1,7 @@
type: object
required:
- provider_id
properties:
provider_id:
description: The ID of the Fulfillment Provider to add.
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- provider_id
properties:
provider_id:
description: The ID of the Payment Provider to add.
type: string

View File

@@ -0,0 +1,50 @@
type: object
properties:
name:
description: The name of the Region
type: string
currency_code:
description: The 3 character ISO currency code to use for the Region.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
automatic_taxes:
description: >-
If true Medusa will automatically calculate taxes for carts in this
region. If false you have to manually call POST /carts/:id/taxes.
type: boolean
gift_cards_taxable:
description: >-
Whether gift cards in this region should be applied sales tax when
purchasing a gift card
type: boolean
tax_provider_id:
description: The ID of the tax provider to use; if null the system tax provider is used
type: string
tax_code:
description: An optional tax code the Region.
type: string
tax_rate:
description: The tax rate to use on Orders in the Region.
type: number
includes_tax:
description: '[EXPERIMENTAL] Tax included in prices of region'
type: boolean
payment_providers:
description: A list of Payment Provider IDs that should be enabled for the Region
type: array
items:
type: string
fulfillment_providers:
description: A list of Fulfillment Provider IDs that should be enabled for the Region
type: array
items:
type: string
countries:
description: >-
A list of countries' 2 ISO Characters that should be included in the
Region.
type: array
items:
type: string

View File

@@ -0,0 +1,46 @@
type: object
required:
- name
- currency_code
- tax_rate
- payment_providers
- fulfillment_providers
- countries
properties:
name:
description: The name of the Region
type: string
currency_code:
description: The 3 character ISO currency code to use for the Region.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
tax_code:
description: An optional tax code the Region.
type: string
tax_rate:
description: The tax rate to use on Orders in the Region.
type: number
payment_providers:
description: A list of Payment Provider IDs that should be enabled for the Region
type: array
items:
type: string
fulfillment_providers:
description: A list of Fulfillment Provider IDs that should be enabled for the Region
type: array
items:
type: string
countries:
description: >-
A list of countries' 2 ISO Characters that should be included in the
Region.
example:
- US
type: array
items:
type: string
includes_tax:
description: '[EXPERIMENTAL] Tax included in prices of region'
type: boolean

View File

@@ -0,0 +1,14 @@
type: object
properties:
label:
description: The label to display to the Customer.
type: string
value:
description: The value that the Return Reason will be identified by. Must be unique.
type: string
description:
description: An optional description to for the Reason.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object

View File

@@ -0,0 +1,20 @@
type: object
required:
- label
- value
properties:
label:
description: The label to display to the Customer.
type: string
value:
description: The value that the Return Reason will be identified by. Must be unique.
type: string
parent_return_reason_id:
description: The ID of the parent return reason.
type: string
description:
description: An optional description to for the Reason.
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object

View File

@@ -0,0 +1,21 @@
type: object
required:
- items
properties:
items:
description: The Line Items that have been received.
type: array
items:
required:
- item_id
- quantity
properties:
item_id:
description: The ID of the Line Item.
type: string
quantity:
description: The quantity of the Line Item.
type: integer
refund:
description: The amount to refund.
type: number

View File

@@ -0,0 +1,15 @@
type: object
required:
- product_ids
properties:
product_ids:
description: The IDs of the products to add to the Sales Channel
type: array
items:
type: object
required:
- id
properties:
id:
type: string
description: The ID of the product

View File

@@ -0,0 +1,13 @@
type: object
required:
- name
properties:
name:
description: The name of the Sales Channel
type: string
description:
description: The description of the Sales Channel
type: string
is_disabled:
description: Whether the Sales Channel is disabled or not.
type: boolean

View File

@@ -0,0 +1,11 @@
type: object
properties:
name:
type: string
description: Name of the sales channel.
description:
type: string
description: Sales Channel description.
is_disabled:
type: boolean
description: Indication of if the sales channel is active.

View File

@@ -0,0 +1,41 @@
type: object
required:
- requirements
properties:
name:
description: The name of the Shipping Option
type: string
amount:
description: The amount to charge for the Shipping Option.
type: integer
admin_only:
description: If true, the option can be used for draft orders
type: boolean
metadata:
description: An optional set of key-value pairs with additional information.
type: object
requirements:
description: >-
The requirements that must be satisfied for the Shipping Option to be
available.
type: array
items:
required:
- type
- amount
properties:
id:
description: The ID of the requirement
type: string
type:
description: The type of the requirement
type: string
enum:
- max_subtotal
- min_subtotal
amount:
description: The amount to compare with.
type: integer
includes_tax:
description: '[EXPERIMENTAL] Tax included in prices of shipping option'
type: boolean

View File

@@ -0,0 +1,67 @@
type: object
required:
- name
- region_id
- provider_id
- data
- price_type
properties:
name:
description: The name of the Shipping Option
type: string
region_id:
description: The ID of the Region in which the Shipping Option will be available.
type: string
provider_id:
description: The ID of the Fulfillment Provider that handles the Shipping Option.
type: string
profile_id:
description: The ID of the Shipping Profile to add the Shipping Option to.
type: number
data:
description: >-
The data needed for the Fulfillment Provider to handle shipping with this
Shipping Option.
type: object
price_type:
description: The type of the Shipping Option price.
type: string
enum:
- flat_rate
- calculated
amount:
description: The amount to charge for the Shipping Option.
type: integer
requirements:
description: >-
The requirements that must be satisfied for the Shipping Option to be
available.
type: array
items:
required:
- type
- amount
properties:
type:
description: The type of the requirement
type: string
enum:
- max_subtotal
- min_subtotal
amount:
description: The amount to compare with.
type: integer
is_return:
description: Whether the Shipping Option defines a return shipment.
type: boolean
default: false
admin_only:
description: If true, the option can be used for draft orders
type: boolean
default: false
metadata:
description: An optional set of key-value pairs with additional information.
type: object
includes_tax:
description: '[EXPERIMENTAL] Tax included in prices of shipping option'
type: boolean

View File

@@ -0,0 +1,5 @@
type: object
properties:
name:
description: The name of the Shipping Profile
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- name
properties:
name:
description: The name of the Shipping Profile
type: string

View File

@@ -0,0 +1,32 @@
type: object
properties:
name:
description: The name of the Store
type: string
swap_link_template:
description: A template for Swap links - use `{{cart_id}}` to insert the Swap Cart id
type: string
payment_link_template:
description: >-
A template for payment links links - use `{{cart_id}}` to insert the Cart
id
type: string
invite_link_template:
description: >-
A template for invite links - use `{{invite_token}}` to insert the invite
token
type: string
default_currency_code:
description: The default currency code for the Store.
type: string
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
description: See a list of codes.
currencies:
description: Array of currencies in 2 character ISO code format.
type: array
items:
type: string
metadata:
description: An optional set of key-value pairs with additional information.
type: object

View File

@@ -0,0 +1,33 @@
type: object
required:
- code
- name
- region_id
properties:
code:
type: string
description: A code to identify the tax type by
name:
type: string
description: A human friendly name for the tax
region_id:
type: string
description: The ID of the Region that the rate belongs to
rate:
type: number
description: The numeric rate to charge
products:
type: array
description: The IDs of the products associated with this tax rate
items:
type: string
shipping_options:
type: array
description: The IDs of the shipping options associated with this tax rate
items:
type: string
product_types:
type: array
description: The IDs of the types of products associated with this tax rate
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- product_types
properties:
product_types:
type: array
description: The IDs of the types of products to associate with this tax rate
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- products
properties:
products:
type: array
description: The IDs of the products to associate with this tax rate
items:
type: string

View File

@@ -0,0 +1,29 @@
type: object
properties:
code:
type: string
description: A code to identify the tax type by
name:
type: string
description: A human friendly name for the tax
region_id:
type: string
description: The ID of the Region that the rate belongs to
rate:
type: number
description: The numeric rate to charge
products:
type: array
description: The IDs of the products associated with this tax rate
items:
type: string
shipping_options:
type: array
description: The IDs of the shipping options associated with this tax rate
items:
type: string
product_types:
type: array
description: The IDs of the types of products associated with this tax rate
items:
type: string

View File

@@ -0,0 +1,9 @@
type: object
required:
- shipping_options
properties:
shipping_options:
type: array
description: The IDs of the shipping options to associate with this tax rate
items:
type: string

View File

@@ -0,0 +1,7 @@
type: object
required:
- file_key
properties:
file_key:
description: key of the file to obtain the download link for
type: string

View File

@@ -0,0 +1,16 @@
type: object
required:
- token
- password
properties:
email:
description: The Users email.
type: string
format: email
token:
description: The token generated from the 'password-token' endpoint.
type: string
password:
description: The Users new password.
type: string
format: password

View File

@@ -0,0 +1,8 @@
type: object
required:
- email
properties:
email:
description: The Users email.
type: string
format: email

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