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

@@ -14,51 +14,7 @@ post:
content:
application/json:
schema:
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: ../components/schemas/address_fields.yaml
- type: string
shipping_address:
description: The Address to be used for shipping.
anyOf:
- $ref: ../components/schemas/address_fields.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
$ref: ../components/schemas/AdminPostDraftOrdersDraftOrderReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -82,7 +38,7 @@ post:
type: object
properties:
draft_order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,21 +7,7 @@ post:
content:
application/json:
schema:
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.
$ref: ../components/schemas/AdminPostAppsReq.yaml
x-codeSamples:
- lang: Shell
label: cURL

View File

@@ -39,7 +39,7 @@ post:
type: object
properties:
user:
$ref: ../components/schemas/user.yaml
$ref: ../components/schemas/User.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -114,7 +114,7 @@ get:
type: object
properties:
user:
$ref: ../components/schemas/user.yaml
$ref: ../components/schemas/User.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,42 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostBatchesReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -66,7 +31,7 @@ post:
type: object
properties:
batch_job:
$ref: ../components/schemas/batch_job.yaml
$ref: ../components/schemas/BatchJob.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -345,7 +310,7 @@ get:
batch_jobs:
type: array
items:
$ref: ../components/schemas/batch_job.yaml
$ref: ../components/schemas/BatchJob.yaml
count:
type: integer
description: The total number of items available

View File

@@ -33,7 +33,7 @@ get:
type: object
properties:
batch_job:
$ref: ../components/schemas/batch_job.yaml
$ref: ../components/schemas/BatchJob.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
batch_job:
$ref: ../components/schemas/batch_job.yaml
$ref: ../components/schemas/BatchJob.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
batch_job:
$ref: ../components/schemas/batch_job.yaml
$ref: ../components/schemas/BatchJob.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,23 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostCollectionsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -47,7 +31,7 @@ post:
type: object
properties:
collection:
$ref: ../components/schemas/product_collection.yaml
$ref: ../components/schemas/ProductCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -189,7 +173,7 @@ get:
collections:
type: array
items:
$ref: ../components/schemas/product_collection.yaml
$ref: ../components/schemas/ProductCollection.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
collection:
$ref: ../components/schemas/product_collection.yaml
$ref: ../components/schemas/ProductCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -119,21 +119,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostCollectionsCollectionReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -157,7 +143,7 @@ post:
type: object
properties:
collection:
$ref: ../components/schemas/product_collection.yaml
$ref: ../components/schemas/ProductCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,16 +14,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostProductsToCollectionReq.yaml
x-codeSamples:
- lang: Shell
label: cURL
@@ -43,7 +34,7 @@ post:
type: object
properties:
collection:
$ref: ../components/schemas/product_collection.yaml
$ref: ../components/schemas/ProductCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -72,16 +63,7 @@ delete:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminDeleteProductsFromCollectionReq.yaml
x-codeSamples:
- lang: Shell
label: cURL

View File

@@ -53,7 +53,7 @@ get:
currencies:
type: array
items:
$ref: ../components/schemas/currency.yaml
$ref: ../components/schemas/Currency.yaml
count:
type: integer
description: The total number of items available

View File

@@ -14,11 +14,7 @@ post:
content:
application/json:
schema:
type: object
properties:
includes_tax:
type: boolean
description: '[EXPERIMENTAL] Tax included in prices of currency.'
$ref: ../components/schemas/AdminPostCurrenciesCurrencyReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -39,4 +35,4 @@ post:
type: object
properties:
currency:
$ref: ../components/schemas/currency.yaml
$ref: ../components/schemas/Currency.yaml

View File

@@ -27,7 +27,7 @@ post:
type: object
properties:
customer_group:
$ref: ../components/schemas/customer_group.yaml
$ref: ../components/schemas/CustomerGroup.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -201,7 +201,7 @@ get:
customer_groups:
type: array
items:
$ref: ../components/schemas/customer_group.yaml
$ref: ../components/schemas/CustomerGroup.yaml
count:
type: integer
description: The total number of items available

View File

@@ -100,7 +100,7 @@ get:
type: object
properties:
customer_group:
$ref: ../components/schemas/customer_group.yaml
$ref: ../components/schemas/CustomerGroup.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -129,14 +129,7 @@ post:
content:
application/json:
schema:
type: object
properties:
name:
description: Name of the customer group
type: string
metadata:
description: Metadata for the customer.
type: object
$ref: ../components/schemas/AdminPostCustomerGroupsGroupReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -160,7 +153,7 @@ post:
type: object
properties:
customer_group:
$ref: ../components/schemas/customer_group.yaml
$ref: ../components/schemas/CustomerGroup.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -35,7 +35,7 @@ get:
customers:
type: array
items:
$ref: ../components/schemas/customer.yaml
$ref: ../components/schemas/Customer.yaml
count:
type: integer
description: The total number of items available

View File

@@ -14,20 +14,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostCustomerGroupsGroupCustomersBatchReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -53,7 +41,7 @@ post:
type: object
properties:
customer_group:
$ref: ../components/schemas/customer_group.yaml
$ref: ../components/schemas/CustomerGroup.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -82,20 +70,8 @@ delete:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminDeleteCustomerGroupsGroupCustomerBatchReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -121,7 +97,7 @@ delete:
type: object
properties:
customer_group:
$ref: ../components/schemas/customer_group.yaml
$ref: ../components/schemas/CustomerGroup.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,35 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostCustomersReq.yaml
tags:
- Customer
x-codeSamples:
@@ -59,7 +31,7 @@ post:
type: object
properties:
customer:
$ref: ../components/schemas/customer.yaml
$ref: ../components/schemas/Customer.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -125,7 +97,7 @@ get:
customers:
type: array
items:
$ref: ../components/schemas/customer.yaml
$ref: ../components/schemas/Customer.yaml
count:
type: integer
description: The total number of items available

View File

@@ -43,7 +43,7 @@ get:
type: object
properties:
customer:
$ref: ../components/schemas/customer.yaml
$ref: ../components/schemas/Customer.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -82,40 +82,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostCustomersCustomerReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -139,7 +106,7 @@ post:
type: object
properties:
customer:
$ref: ../components/schemas/customer.yaml
$ref: ../components/schemas/Customer.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -20,141 +20,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostDiscountsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -178,7 +44,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -278,7 +144,7 @@ get:
discounts:
type: array
items:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
count:
type: integer
description: The total number of items available

View File

@@ -43,7 +43,7 @@ get:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -31,49 +31,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostDiscountsDiscountConditions.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -98,7 +56,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -65,7 +65,7 @@ delete:
default: true
discount:
description: The Discount to which the condition used to belong
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -131,7 +131,7 @@ get:
type: object
properties:
discount_condition:
$ref: ../components/schemas/discount_condition.yaml
$ref: ../components/schemas/DiscountCondition.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -183,41 +183,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostDiscountsDiscountConditionsCondition.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -243,7 +210,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -34,20 +34,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostDiscountsDiscountConditionsConditionBatchReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -73,7 +61,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -122,20 +110,8 @@ delete:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminDeleteDiscountsDiscountConditionsConditionBatchReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -161,7 +137,7 @@ delete:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -100,7 +100,7 @@ get:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -145,120 +145,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostDiscountsDiscountReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -282,7 +169,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -35,7 +35,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -41,7 +41,7 @@ delete:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -40,7 +40,7 @@ post:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -96,7 +96,7 @@ delete:
type: object
properties:
discount:
$ref: ../components/schemas/discount.yaml
$ref: ../components/schemas/Discount.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,106 +7,7 @@ post:
content:
application/json:
schema:
type: object
required:
- email
- items
- 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: ../components/schemas/address_fields.yaml
- type: string
shipping_address:
description: The Address to be used for shipping.
anyOf:
- $ref: ../components/schemas/address_fields.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
$ref: ../components/schemas/AdminPostDraftOrdersReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -130,7 +31,7 @@ post:
type: object
properties:
draft_order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -193,7 +94,7 @@ get:
draft_orders:
type: array
items:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
draft_order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,28 +14,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostDraftOrdersDraftOrderLineItemsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -59,7 +39,7 @@ post:
type: object
properties:
draft_order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -41,7 +41,7 @@ delete:
type: object
properties:
draft_order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -76,22 +76,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostDraftOrdersDraftOrderLineItemsItemReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -117,7 +103,7 @@ post:
type: object
properties:
draft_order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/draft-order.yaml
$ref: ../components/schemas/DraftOrder.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -9,30 +9,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostGiftCardsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -56,7 +33,7 @@ post:
type: object
properties:
gift_card:
$ref: ../components/schemas/gift_card.yaml
$ref: ../components/schemas/GiftCard.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -117,7 +94,7 @@ get:
gift_cards:
type: array
items:
$ref: ../components/schemas/gift_card.yaml
$ref: ../components/schemas/GiftCard.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
gift_card:
$ref: ../components/schemas/gift_card.yaml
$ref: ../components/schemas/GiftCard.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -121,28 +121,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostGiftCardsGiftCardReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -166,7 +145,7 @@ post:
type: object
properties:
gift_card:
$ref: ../components/schemas/gift_card.yaml
$ref: ../components/schemas/GiftCard.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,22 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostInvitesReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -82,7 +67,7 @@ get:
invites:
type: array
items:
$ref: ../components/schemas/invite.yaml
$ref: ../components/schemas/Invite.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -6,32 +6,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostInvitesInviteAcceptReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client

View File

@@ -7,21 +7,7 @@ post:
content:
application/json:
schema:
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.
$ref: ../components/schemas/AdminPostNotesReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -45,7 +31,7 @@ post:
type: object
properties:
note:
$ref: ../components/schemas/note.yaml
$ref: ../components/schemas/Note.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -106,7 +92,7 @@ get:
notes:
type: array
items:
$ref: ../components/schemas/note.yaml
$ref: ../components/schemas/Note.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
note:
$ref: ../components/schemas/note.yaml
$ref: ../components/schemas/Note.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -119,13 +119,7 @@ post:
content:
application/json:
schema:
type: object
required:
- value
properties:
value:
type: string
description: The updated description of the Note.
$ref: ../components/schemas/AdminPostNotesNoteReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -149,7 +143,7 @@ post:
type: object
properties:
note:
$ref: ../components/schemas/note.yaml
$ref: ../components/schemas/Note.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -82,7 +82,7 @@ get:
notifications:
type: array
items:
$ref: ../components/schemas/notification.yaml
$ref: ../components/schemas/Notification.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -16,13 +16,8 @@ post:
content:
application/json:
schema:
type: object
properties:
to:
description: >-
A new address or user identifier that the Notification should be
sent to
type: string
$ref: >-
../components/schemas/AdminPostNotificationsNotificationResendReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -46,7 +41,7 @@ post:
type: object
properties:
notification:
$ref: ../components/schemas/notification.yaml
$ref: ../components/schemas/Notification.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -6,16 +6,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrderEditsReq.yaml
x-authenticated: true
x-codeSamples:
- lang: JavaScript
@@ -40,7 +31,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -115,7 +106,7 @@ get:
properties:
order_edits:
type: array
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -119,11 +119,7 @@ post:
content:
application/json:
schema:
type: object
properties:
internal_note:
description: An optional note to create or update for the order edit.
type: string
$ref: ../components/schemas/AdminPostOrderEditsOrderEditReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -147,7 +143,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -13,22 +13,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrderEditsEditLineItemsReq.yaml
x-authenticated: true
x-codeSamples:
- lang: JavaScript
@@ -53,7 +38,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -40,7 +40,7 @@ delete:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -75,13 +75,8 @@ post:
content:
application/json:
schema:
type: object
required:
- quantity
properties:
quantity:
description: The quantity to update
type: number
$ref: >-
../components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -106,7 +101,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order_edit:
$ref: ../components/schemas/order_edit.yaml
$ref: ../components/schemas/OrderEdit.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,124 +14,7 @@ post:
content:
application/json:
schema:
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: ../components/schemas/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
$ref: ../components/schemas/AdminPostOrdersOrderClaimsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -155,7 +38,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -20,94 +20,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderClaimsClaimReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -131,7 +44,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -16,85 +16,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderSwapsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -118,7 +40,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -242,7 +242,7 @@ get:
orders:
type: array
items:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
count:
type: integer
description: The total number of items available

View File

@@ -33,7 +33,7 @@ get:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -62,71 +62,7 @@ post:
content:
application/json:
schema:
type: object
properties:
email:
description: the email for the order
type: string
billing_address:
description: Billing address
anyOf:
- $ref: ../components/schemas/address_fields.yaml
shipping_address:
description: Shipping address
anyOf:
- $ref: ../components/schemas/address_fields.yaml
items:
description: The Line Items for the order
type: array
items:
$ref: ../components/schemas/line_item.yaml
region:
description: ID of the region where the order belongs
type: string
discounts:
description: Discounts applied to the order
type: array
items:
$ref: ../components/schemas/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: ../components/schemas/line_item.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
$ref: ../components/schemas/AdminPostOrdersOrderReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -150,7 +86,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -36,7 +36,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -41,7 +41,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -20,18 +20,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostOrdersOrderClaimsClaimFulfillmentsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -57,7 +47,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -47,7 +47,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -20,18 +20,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostOrdersOrderClaimsClaimShipmentsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -57,7 +47,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -16,34 +16,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderFulfillmentsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -67,7 +40,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -41,7 +41,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,25 +14,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderRefundsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -56,7 +38,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -16,59 +16,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderReturnsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -93,7 +41,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,23 +14,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderShipmentReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -54,7 +38,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -35,7 +35,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -40,7 +40,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -20,18 +20,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostOrdersOrderSwapsSwapFulfillmentsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -57,7 +47,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -47,7 +47,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -44,7 +44,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -20,23 +20,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostOrdersOrderSwapsSwapShipmentsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -62,7 +46,7 @@ post:
type: object
properties:
order:
$ref: ../components/schemas/order.yaml
$ref: ../components/schemas/Order.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -92,7 +92,7 @@ get:
type: object
properties:
payment_collection:
$ref: ../components/schemas/payment_collection.yaml
$ref: ../components/schemas/PaymentCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -121,18 +121,7 @@ post:
content:
application/json:
schema:
type: object
properties:
description:
description: >-
An optional description to create or update the payment
collection.
type: string
metadata:
description: >-
An optional set of key-value pairs to hold additional
information.
type: object
$ref: ../components/schemas/AdminUpdatePaymentCollectionsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -156,7 +145,7 @@ post:
type: object
properties:
payment_collection:
$ref: ../components/schemas/payment_collection.yaml
$ref: ../components/schemas/PaymentCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -34,7 +34,7 @@ post:
type: object
properties:
payment_collection:
$ref: ../components/schemas/payment_collection.yaml
$ref: ../components/schemas/PaymentCollection.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ get:
type: object
properties:
payment:
$ref: ../components/schemas/payment.yaml
$ref: ../components/schemas/Payment.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -33,7 +33,7 @@ post:
type: object
properties:
payment:
$ref: ../components/schemas/payment.yaml
$ref: ../components/schemas/Payment.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,20 +14,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostPaymentRefundsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -51,7 +38,7 @@ post:
type: object
properties:
refund:
$ref: ../components/schemas/refund.yaml
$ref: ../components/schemas/Refund.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,85 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostPriceListsPriceListReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -109,7 +31,7 @@ post:
type: object
properties:
price_list:
$ref: ../components/schemas/price_list.yaml
$ref: ../components/schemas/PriceList.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -293,7 +215,7 @@ get:
price_lists:
type: array
items:
$ref: ../components/schemas/price_list.yaml
$ref: ../components/schemas/PriceList.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
price_list:
$ref: ../components/schemas/price_list.yaml
$ref: ../components/schemas/PriceList.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -119,83 +119,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostPriceListsPriceListPriceListReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -219,7 +143,7 @@ post:
type: object
properties:
price_list:
$ref: ../components/schemas/price_list.yaml
$ref: ../components/schemas/PriceList.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,49 +14,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostPriceListPricesPricesReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -80,7 +38,7 @@ post:
type: object
properties:
price_list:
$ref: ../components/schemas/price_list.yaml
$ref: ../components/schemas/PriceList.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -111,13 +69,7 @@ delete:
content:
application/json:
schema:
type: object
properties:
price_ids:
description: The price id's of the Money Amounts to delete.
type: array
items:
type: string
$ref: ../components/schemas/AdminDeletePriceListPricesPricesReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client

View File

@@ -201,7 +201,7 @@ get:
products:
type: array
items:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
count:
type: integer
description: The total number of items available

View File

@@ -116,7 +116,7 @@ get:
type: object
properties:
product_tags:
$ref: ../components/schemas/product_tag.yaml
$ref: ../components/schemas/ProductTag.yaml
count:
type: integer
description: The total number of items available

View File

@@ -116,7 +116,7 @@ get:
type: object
properties:
product_types:
$ref: ../components/schemas/product_type.yaml
$ref: ../components/schemas/ProductType.yaml
count:
type: integer
description: The total number of items available

View File

@@ -7,241 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostProductsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -265,7 +31,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -480,6 +246,11 @@ get:
result.
schema:
type: string
- in: query
name: order
description: the field used to order the products.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -505,7 +276,7 @@ get:
products:
type: array
items:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
count:
type: integer
description: The total number of items available

View File

@@ -29,7 +29,7 @@ get:
types:
type: array
items:
$ref: ../components/schemas/product_type.yaml
$ref: ../components/schemas/ProductType.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -119,222 +119,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostProductsProductReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -358,7 +143,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,17 +14,7 @@ post:
content:
application/json:
schema:
type: object
required:
- key
- value
properties:
key:
description: The metadata key
type: string
value:
description: The metadata value
type: string
$ref: ../components/schemas/AdminPostProductsProductMetadataReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -48,7 +38,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,13 +14,7 @@ post:
content:
application/json:
schema:
type: object
required:
- title
properties:
title:
description: The title the Product Option will be identified by i.e. "Size"
type: string
$ref: ../components/schemas/AdminPostProductsProductOptionsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -44,7 +38,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -55,7 +55,7 @@ delete:
description: Whether or not the items were deleted.
default: true
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -90,13 +90,7 @@ post:
content:
application/json:
schema:
type: object
required:
- title
properties:
title:
description: The title of the Product Option
type: string
$ref: ../components/schemas/AdminPostProductsProductOptionsOption.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -121,7 +115,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -16,110 +16,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostProductsProductVariantsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -143,7 +40,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -211,7 +108,7 @@ get:
variants:
type: array
items:
$ref: ../components/schemas/product_variant.yaml
$ref: ../components/schemas/ProductVariant.yaml
count:
type: integer
description: The total number of items available

View File

@@ -52,7 +52,7 @@ delete:
description: Whether or not the items were deleted.
default: true
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -87,107 +87,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostProductsProductVariantsVariantReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -213,7 +114,7 @@ post:
type: object
properties:
product:
$ref: ../components/schemas/product.yaml
$ref: ../components/schemas/Product.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,11 +14,8 @@ post:
content:
application/json:
schema:
type: object
properties:
title:
description: A title to update for the key.
type: string
$ref: >-
../components/schemas/AdminPostPublishableApiKeysPublishableApiKeyReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -42,7 +39,7 @@ post:
type: object
properties:
publishable_api_key:
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -6,13 +6,7 @@ post:
content:
application/json:
schema:
type: object
required:
- title
properties:
title:
description: A title for the publishable api key
type: string
$ref: ../components/schemas/AdminPostPublishableApiKeysReq.yaml
x-authenticated: true
x-codeSamples:
- lang: JavaScript
@@ -37,7 +31,7 @@ post:
type: object
properties:
publishable_api_key:
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -107,7 +101,7 @@ get:
properties:
publishable_api_keys:
type: array
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -80,7 +80,7 @@ get:
type: object
properties:
publishable_api_key:
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -34,7 +34,7 @@ post:
type: object
properties:
publishable_api_key:
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -10,6 +10,11 @@ get:
description: The ID of the Publishable Api Key.
schema:
type: string
- in: query
name: q
description: Query used for searching sales channels' names and descriptions.
schema:
type: string
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -36,7 +41,7 @@ get:
sales_channels:
type: array
items:
$ref: ../components/schemas/sales_channel.yaml
$ref: ../components/schemas/SalesChannel.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,20 +14,8 @@ post:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminPostPublishableApiKeySalesChannelsBatchReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -52,7 +40,7 @@ post:
schema:
properties:
publishable_api_key:
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -81,22 +69,8 @@ delete:
content:
application/json:
schema:
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
$ref: >-
../components/schemas/AdminDeletePublishableApiKeySalesChannelsBatchReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -121,7 +95,7 @@ delete:
schema:
properties:
publishable_api_key:
$ref: ../components/schemas/publishable_api_key.yaml
$ref: ../components/schemas/PublishableApiKey.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -7,56 +7,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostRegionsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -80,7 +31,7 @@ post:
type: object
properties:
region:
$ref: ../components/schemas/region.yaml
$ref: ../components/schemas/Region.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -162,7 +113,7 @@ get:
regions:
type: array
items:
$ref: ../components/schemas/region.yaml
$ref: ../components/schemas/Region.yaml
count:
type: integer
description: The total number of items available

View File

@@ -90,7 +90,7 @@ get:
type: object
properties:
region:
$ref: ../components/schemas/region.yaml
$ref: ../components/schemas/Region.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
@@ -119,63 +119,7 @@ post:
content:
application/json:
schema:
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
$ref: ../components/schemas/AdminPostRegionsRegionReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -199,7 +143,7 @@ post:
type: object
properties:
region:
$ref: ../components/schemas/region.yaml
$ref: ../components/schemas/Region.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -14,17 +14,7 @@ post:
content:
application/json:
schema:
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.
$ref: ../components/schemas/AdminPostRegionsRegionCountriesReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
@@ -48,7 +38,7 @@ post:
type: object
properties:
region:
$ref: ../components/schemas/region.yaml
$ref: ../components/schemas/Region.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

View File

@@ -44,7 +44,7 @@ delete:
type: object
properties:
region:
$ref: ../components/schemas/region.yaml
$ref: ../components/schemas/Region.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':

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