docs: fix to OAS generator following Zod update + generate API reference (#13030)
This commit is contained in:
1 parent
3921c86e19
commit
9bb4c0306b
126 files changed
+4855
-2689
No files matched your search
+14
@@ -0,0 +1,14 @@
|
|||||||
|
import Medusa from "@medusajs/js-sdk"
|
||||||
|
|
||||||
|
export const sdk = new Medusa({
|
||||||
|
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||||
|
debug: import.meta.env.DEV,
|
||||||
|
auth: {
|
||||||
|
type: "session",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
sdk.admin.order.archive("order_123")
|
||||||
|
.then(({ order }) => {
|
||||||
|
console.log(order)
|
||||||
|
})
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
import Medusa from "@medusajs/js-sdk"
|
||||||
|
|
||||||
|
export const sdk = new Medusa({
|
||||||
|
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||||
|
debug: import.meta.env.DEV,
|
||||||
|
auth: {
|
||||||
|
type: "session",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
sdk.admin.order.complete("order_123")
|
||||||
|
.then(({ order }) => {
|
||||||
|
console.log(order)
|
||||||
|
})
|
||||||
@@ -2,10 +2,10 @@ type: object
|
|||||||
description: The filfillment's details.
|
description: The filfillment's details.
|
||||||
x-schemaName: AdminCreateFulfillment
|
x-schemaName: AdminCreateFulfillment
|
||||||
required:
|
required:
|
||||||
- data
|
|
||||||
- items
|
- items
|
||||||
- metadata
|
- metadata
|
||||||
- order_id
|
- order_id
|
||||||
|
- data
|
||||||
- location_id
|
- location_id
|
||||||
- provider_id
|
- provider_id
|
||||||
- delivery_address
|
- delivery_address
|
||||||
|
|||||||
+132
@@ -0,0 +1,132 @@
|
|||||||
|
type: object
|
||||||
|
description: The service zone's details.
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The service zone's name.
|
||||||
|
geo_zones:
|
||||||
|
type: array
|
||||||
|
description: The service zone's geo zones.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: A country geo zone.
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: country
|
||||||
|
- type: object
|
||||||
|
description: A province geo zone.
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
- province_code
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: province
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
- type: object
|
||||||
|
description: A city geo zone
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
- province_code
|
||||||
|
- city
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: city
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
- type: object
|
||||||
|
description: A ZIP geo zone.
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
- province_code
|
||||||
|
- city
|
||||||
|
- postal_expression
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: zip
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
postal_expression:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's postal expression or ZIP code.
|
||||||
|
x-schemaName: AdminCreateFulfillmentSetServiceZones
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
type: object
|
||||||
|
description: The inventory level's details.
|
||||||
|
required:
|
||||||
|
- location_id
|
||||||
|
properties:
|
||||||
|
location_id:
|
||||||
|
type: string
|
||||||
|
title: location_id
|
||||||
|
description: The ID of the associated location.
|
||||||
|
stocked_quantity:
|
||||||
|
type: number
|
||||||
|
title: stocked_quantity
|
||||||
|
description: The inventory level's stocked quantity.
|
||||||
|
incoming_quantity:
|
||||||
|
type: number
|
||||||
|
title: incoming_quantity
|
||||||
|
description: The inventory level's incoming quantity.
|
||||||
|
x-schemaName: AdminCreateInventoryLocationLevel
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
type: object
|
||||||
|
description: The payment's details.
|
||||||
|
properties:
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The amount to capture.
|
||||||
|
x-schemaName: AdminCreatePaymentCapture
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
type: object
|
||||||
|
description: The payment collection's details.
|
||||||
|
required:
|
||||||
|
- order_id
|
||||||
|
- amount
|
||||||
|
properties:
|
||||||
|
order_id:
|
||||||
|
type: string
|
||||||
|
title: order_id
|
||||||
|
description: The ID of the associated order.
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The amount to be paid.
|
||||||
|
x-schemaName: AdminCreatePaymentCollection
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
type: object
|
||||||
|
description: The refund's details.
|
||||||
|
properties:
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The amount to refund.
|
||||||
|
refund_reason_id:
|
||||||
|
type: string
|
||||||
|
title: refund_reason_id
|
||||||
|
description: The ID of a refund reason.
|
||||||
|
note:
|
||||||
|
type: string
|
||||||
|
title: note
|
||||||
|
description: A note to attach to the refund.
|
||||||
|
x-schemaName: AdminCreatePaymentRefund
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
type: object
|
||||||
|
description: The fulfillment set to create.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The fulfillment set's name.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The fulfillment set's type.
|
||||||
|
x-schemaName: AdminCreateStockLocationFulfillmentSet
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
type: object
|
||||||
|
description: The details of the user to be created.
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
title: email
|
||||||
|
description: The user's email.
|
||||||
|
format: email
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
title: first_name
|
||||||
|
description: The user's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
title: last_name
|
||||||
|
description: The user's last name.
|
||||||
|
x-schemaName: AdminInviteAccept
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
type: object
|
||||||
|
description: The payment details.
|
||||||
|
required:
|
||||||
|
- order_id
|
||||||
|
properties:
|
||||||
|
order_id:
|
||||||
|
type: string
|
||||||
|
title: order_id
|
||||||
|
description: The ID of the order associated with the payment collection.
|
||||||
|
x-schemaName: AdminMarkPaymentCollectionPaid
|
||||||
+146
@@ -0,0 +1,146 @@
|
|||||||
|
type: object
|
||||||
|
description: The service zone's details.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The service zone's name.
|
||||||
|
geo_zones:
|
||||||
|
type: array
|
||||||
|
description: The service zone's associated geo zones.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: A country geo zone.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: country
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
- type: object
|
||||||
|
description: A province geo zone.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- province_code
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: province
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
- type: object
|
||||||
|
description: A city geo zone
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- province_code
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: city
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
- type: object
|
||||||
|
description: A ZIP geo zone.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- province_code
|
||||||
|
- postal_expression
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: zip
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
postal_expression:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's postal expression or ZIP code.
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
x-schemaName: AdminUpdateFulfillmentSetServiceZones
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the inventory item.
|
||||||
|
properties:
|
||||||
|
sku:
|
||||||
|
type: string
|
||||||
|
title: sku
|
||||||
|
description: The inventory item's SKU.
|
||||||
|
hs_code:
|
||||||
|
type: string
|
||||||
|
title: hs_code
|
||||||
|
description: The inventory item's HS code.
|
||||||
|
weight:
|
||||||
|
type: number
|
||||||
|
title: weight
|
||||||
|
description: The inventory item's weight.
|
||||||
|
length:
|
||||||
|
type: number
|
||||||
|
title: length
|
||||||
|
description: The inventory item's length.
|
||||||
|
height:
|
||||||
|
type: number
|
||||||
|
title: height
|
||||||
|
description: The inventory item's height.
|
||||||
|
width:
|
||||||
|
type: number
|
||||||
|
title: width
|
||||||
|
description: The inventory item's width.
|
||||||
|
origin_country:
|
||||||
|
type: string
|
||||||
|
title: origin_country
|
||||||
|
description: The inventory item's origin country.
|
||||||
|
mid_code:
|
||||||
|
type: string
|
||||||
|
title: mid_code
|
||||||
|
description: The inventory item's MID code.
|
||||||
|
material:
|
||||||
|
type: string
|
||||||
|
title: material
|
||||||
|
description: The inventory item's material.
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
title: title
|
||||||
|
description: The inventory item's title.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The inventory item's description.
|
||||||
|
requires_shipping:
|
||||||
|
type: boolean
|
||||||
|
title: requires_shipping
|
||||||
|
description: Whether the inventory item requires shipping.
|
||||||
|
thumbnail:
|
||||||
|
type: string
|
||||||
|
title: thumbnail
|
||||||
|
description: >-
|
||||||
|
The URL of an image to be used as the inventory item's thumbnail. You can
|
||||||
|
use the Upload API routes to upload an image and get its URL.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The inventory item's metadata. Can be custom data in key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateInventoryItem
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the inventory level.
|
||||||
|
properties:
|
||||||
|
stocked_quantity:
|
||||||
|
type: number
|
||||||
|
title: stocked_quantity
|
||||||
|
description: The inventory level's stocked quantity.
|
||||||
|
incoming_quantity:
|
||||||
|
type: number
|
||||||
|
title: incoming_quantity
|
||||||
|
description: The inventory level's incoming quantity.
|
||||||
|
x-schemaName: AdminUpdateInventoryLocationLevel
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the refund reason.
|
||||||
|
properties:
|
||||||
|
label:
|
||||||
|
type: string
|
||||||
|
title: label
|
||||||
|
description: The refund reason's label.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The refund reason's description.
|
||||||
|
x-schemaName: AdminUpdatePaymentRefundReason
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the product category.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The product category's name.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The product category's description.
|
||||||
|
handle:
|
||||||
|
type: string
|
||||||
|
title: handle
|
||||||
|
description: The product category's handle. Must be a unique value.
|
||||||
|
is_internal:
|
||||||
|
type: boolean
|
||||||
|
title: is_internal
|
||||||
|
description: >-
|
||||||
|
Whether the product category is only used for internal purposes and
|
||||||
|
shouldn't be shown the customer.
|
||||||
|
is_active:
|
||||||
|
type: boolean
|
||||||
|
title: is_active
|
||||||
|
description: Whether the product category is active.
|
||||||
|
parent_category_id:
|
||||||
|
type: string
|
||||||
|
title: parent_category_id
|
||||||
|
description: The ID of a parent category.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The product category's metadata. Can hold custom key-value pairs.
|
||||||
|
rank:
|
||||||
|
type: number
|
||||||
|
title: rank
|
||||||
|
description: The product category's rank among other categories.
|
||||||
|
x-schemaName: AdminUpdateProductCategory
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the product tag.
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: The product tag's value.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The product tag's metadata. Can hold custom key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateProductTag
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the product type.
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: The product type's value.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The product type's metadata. Can hold custom key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateProductType
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
type: object
|
||||||
|
description: The propeties to update in the region.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The region's name.
|
||||||
|
currency_code:
|
||||||
|
type: string
|
||||||
|
title: currency_code
|
||||||
|
description: The region's currency code.
|
||||||
|
countries:
|
||||||
|
type: array
|
||||||
|
description: The region's countries.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: countries
|
||||||
|
description: A country code.
|
||||||
|
automatic_taxes:
|
||||||
|
type: boolean
|
||||||
|
title: automatic_taxes
|
||||||
|
description: Whether taxes are calculated automatically for carts in the region.
|
||||||
|
payment_providers:
|
||||||
|
type: array
|
||||||
|
description: The payment providers enabled in the region.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: payment_providers
|
||||||
|
description: A payment provider's ID.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The region's metadata. Can hold custom key-value pairs.
|
||||||
|
is_tax_inclusive:
|
||||||
|
type: boolean
|
||||||
|
title: is_tax_inclusive
|
||||||
|
description: Whether the prices in the region are tax inclusive.
|
||||||
|
x-schemaName: AdminUpdateRegion
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the reservation.
|
||||||
|
properties:
|
||||||
|
location_id:
|
||||||
|
type: string
|
||||||
|
title: location_id
|
||||||
|
description: The ID of the associated location.
|
||||||
|
quantity:
|
||||||
|
type: number
|
||||||
|
title: quantity
|
||||||
|
description: The reserved quantity.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The reservation's description.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The reservation's metadata. Can hold custom key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateReservation
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the shipping option.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The shipping option's name.
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
description: The shipping option's data that is useful for third-party providers.
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
|
||||||
|
price_type:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
The type of the shipping option's price. If `calculated`, its price is
|
||||||
|
retrieved by the associated fulfillment provider during checkout. If
|
||||||
|
`flat`, its price is set in the `prices` property.
|
||||||
|
enum:
|
||||||
|
- calculated
|
||||||
|
- flat
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: provider_id
|
||||||
|
description: >-
|
||||||
|
The ID of the associated fulfillment provider that is used to process the
|
||||||
|
option.
|
||||||
|
shipping_profile_id:
|
||||||
|
type: string
|
||||||
|
title: shipping_profile_id
|
||||||
|
description: The ID of the shipping profile this shipping option belongs to.
|
||||||
|
type:
|
||||||
|
type: object
|
||||||
|
description: The shipping option's type.
|
||||||
|
required:
|
||||||
|
- code
|
||||||
|
- description
|
||||||
|
- label
|
||||||
|
properties:
|
||||||
|
label:
|
||||||
|
type: string
|
||||||
|
title: label
|
||||||
|
description: The type's label.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The type's description.
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
title: code
|
||||||
|
description: The type's code.
|
||||||
|
prices:
|
||||||
|
type: array
|
||||||
|
description: >-
|
||||||
|
The shipping option's prices. If the `price_type` is `calculated`, pass an
|
||||||
|
empty array.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: The shipping option's price for a currency code.
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing price.
|
||||||
|
currency_code:
|
||||||
|
type: string
|
||||||
|
title: currency_code
|
||||||
|
description: The price's currency code.
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The price's amount.
|
||||||
|
- type: object
|
||||||
|
description: The shipping option's price for a region.
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing price.
|
||||||
|
region_id:
|
||||||
|
type: string
|
||||||
|
title: region_id
|
||||||
|
description: The ID of the associated region.
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The price's amount.
|
||||||
|
rules:
|
||||||
|
type: array
|
||||||
|
description: The shipping option's rules.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: The details of a new shipping option rule.
|
||||||
|
required:
|
||||||
|
- operator
|
||||||
|
- attribute
|
||||||
|
- value
|
||||||
|
properties:
|
||||||
|
operator:
|
||||||
|
type: string
|
||||||
|
description: The operator used to check whether a rule applies.
|
||||||
|
enum:
|
||||||
|
- in
|
||||||
|
- eq
|
||||||
|
- ne
|
||||||
|
- gt
|
||||||
|
- gte
|
||||||
|
- lt
|
||||||
|
- lte
|
||||||
|
- nin
|
||||||
|
attribute:
|
||||||
|
type: string
|
||||||
|
title: attribute
|
||||||
|
description: The name of a property or table that the rule applies to.
|
||||||
|
example: customer_group
|
||||||
|
value:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
- type: array
|
||||||
|
description: Values of the attribute that enable this rule.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
- type: object
|
||||||
|
description: Update the properties of an existing rule.
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- operator
|
||||||
|
- attribute
|
||||||
|
- value
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The rule's ID.
|
||||||
|
operator:
|
||||||
|
type: string
|
||||||
|
description: The operator used to check whether a rule applies.
|
||||||
|
enum:
|
||||||
|
- in
|
||||||
|
- eq
|
||||||
|
- ne
|
||||||
|
- gt
|
||||||
|
- gte
|
||||||
|
- lt
|
||||||
|
- lte
|
||||||
|
- nin
|
||||||
|
attribute:
|
||||||
|
type: string
|
||||||
|
title: attribute
|
||||||
|
description: The name of a property or table that the rule applies to.
|
||||||
|
example: customer_group
|
||||||
|
value:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
- type: array
|
||||||
|
description: Values of the attribute that enable this rule.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
x-schemaName: AdminUpdateShippingOption
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the shipping profile.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The shipping profile's name.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The shipping profile's type.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The shipping profile's metadata.
|
||||||
|
x-schemaName: AdminUpdateShippingProfile
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
type: object
|
||||||
|
description: The shipping method's details.
|
||||||
|
required:
|
||||||
|
- option_id
|
||||||
|
properties:
|
||||||
|
option_id:
|
||||||
|
type: string
|
||||||
|
title: option_id
|
||||||
|
description: The ID of the shipping option this method is created from.
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
description: >-
|
||||||
|
Any additional data relevant for the third-party fulfillment provider to
|
||||||
|
process the shipment.
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter
|
||||||
|
description: Learn more about the data parameter.
|
||||||
|
x-schemaName: StoreAddCartShippingMethods
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
type: object
|
||||||
|
description: The address's details.
|
||||||
|
properties:
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
title: first_name
|
||||||
|
description: The customer's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
title: last_name
|
||||||
|
description: The customer's last name.
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
title: phone
|
||||||
|
description: The customer's phone.
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
title: company
|
||||||
|
description: The address's company.
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
title: address_1
|
||||||
|
description: The address's first line.
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
title: address_2
|
||||||
|
description: The address's second line.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The address's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The address's country code.
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
title: province
|
||||||
|
description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
title: postal_code
|
||||||
|
description: The address's postal code.
|
||||||
|
address_name:
|
||||||
|
type: string
|
||||||
|
title: address_name
|
||||||
|
description: The address's name.
|
||||||
|
is_default_shipping:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_shipping
|
||||||
|
description: Whether the address is used by default for shipping during checkout.
|
||||||
|
is_default_billing:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_billing
|
||||||
|
description: Whether the address is used by default for billing during checkout.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: Holds custom key-value pairs.
|
||||||
|
x-schemaName: StoreCreateCustomerAddress
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the address.
|
||||||
|
properties:
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
title: first_name
|
||||||
|
description: The customer's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
title: last_name
|
||||||
|
description: The customer's last name.
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
title: phone
|
||||||
|
description: The customer's phone.
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
title: company
|
||||||
|
description: The address's company.
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
title: address_1
|
||||||
|
description: The address's first line.
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
title: address_2
|
||||||
|
description: The address's second line.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The address's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The address's country code.
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
title: province
|
||||||
|
description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
title: postal_code
|
||||||
|
description: The address's postal code.
|
||||||
|
address_name:
|
||||||
|
type: string
|
||||||
|
title: address_name
|
||||||
|
description: The address's name.
|
||||||
|
is_default_shipping:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_shipping
|
||||||
|
description: Whether the address is used by default for shipping during checkout.
|
||||||
|
is_default_billing:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_billing
|
||||||
|
description: Whether the address is used by default for billing during checkout.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: Holds custom key-value pairs.
|
||||||
|
x-schemaName: StoreUpdateCustomerAddress
|
||||||
File diff suppressed because it is too large.
Load diff
+1
-137
@@ -37,143 +37,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminCreateFulfillmentSetServiceZones.yaml
|
||||||
description: The service zone's details.
|
|
||||||
required:
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The service zone's name.
|
|
||||||
geo_zones:
|
|
||||||
type: array
|
|
||||||
description: The service zone's geo zones.
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- type: object
|
|
||||||
description: A country geo zone.
|
|
||||||
required:
|
|
||||||
- metadata
|
|
||||||
- country_code
|
|
||||||
- type
|
|
||||||
properties:
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: country
|
|
||||||
- type: object
|
|
||||||
description: A province geo zone.
|
|
||||||
required:
|
|
||||||
- metadata
|
|
||||||
- country_code
|
|
||||||
- type
|
|
||||||
- province_code
|
|
||||||
properties:
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: province
|
|
||||||
province_code:
|
|
||||||
type: string
|
|
||||||
title: province_code
|
|
||||||
description: >-
|
|
||||||
The geo zone's ISO 3166-2 province code. Must be
|
|
||||||
lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
- type: object
|
|
||||||
description: A city geo zone
|
|
||||||
required:
|
|
||||||
- metadata
|
|
||||||
- country_code
|
|
||||||
- type
|
|
||||||
- province_code
|
|
||||||
- city
|
|
||||||
properties:
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: city
|
|
||||||
province_code:
|
|
||||||
type: string
|
|
||||||
title: province_code
|
|
||||||
description: >-
|
|
||||||
The geo zone's ISO 3166-2 province code. Must be
|
|
||||||
lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
city:
|
|
||||||
type: string
|
|
||||||
title: city
|
|
||||||
description: The geo zone's city.
|
|
||||||
- type: object
|
|
||||||
description: A ZIP geo zone.
|
|
||||||
required:
|
|
||||||
- metadata
|
|
||||||
- country_code
|
|
||||||
- type
|
|
||||||
- province_code
|
|
||||||
- city
|
|
||||||
- postal_expression
|
|
||||||
properties:
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: zip
|
|
||||||
province_code:
|
|
||||||
type: string
|
|
||||||
title: province_code
|
|
||||||
description: >-
|
|
||||||
The geo zone's ISO 3166-2 province code. Must be
|
|
||||||
lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
city:
|
|
||||||
type: string
|
|
||||||
title: city
|
|
||||||
description: The geo zone's city.
|
|
||||||
postal_expression:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's postal expression or ZIP code.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
+1
-151
@@ -116,157 +116,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateFulfillmentSetServiceZones.yaml
|
||||||
description: The service zone's details.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The service zone's name.
|
|
||||||
geo_zones:
|
|
||||||
type: array
|
|
||||||
description: The service zone's associated geo zones.
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- type: object
|
|
||||||
description: A country geo zone.
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
- metadata
|
|
||||||
- country_code
|
|
||||||
properties:
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: country
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The ID of an existing geo zone.
|
|
||||||
- type: object
|
|
||||||
description: A province geo zone.
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
- metadata
|
|
||||||
- country_code
|
|
||||||
- province_code
|
|
||||||
properties:
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: province
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
province_code:
|
|
||||||
type: string
|
|
||||||
title: province_code
|
|
||||||
description: >-
|
|
||||||
The geo zone's ISO 3166-2 province code. Must be
|
|
||||||
lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The ID of an existing geo zone.
|
|
||||||
- type: object
|
|
||||||
description: A city geo zone
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
- metadata
|
|
||||||
- city
|
|
||||||
- country_code
|
|
||||||
- province_code
|
|
||||||
properties:
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: city
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
city:
|
|
||||||
type: string
|
|
||||||
title: city
|
|
||||||
description: The geo zone's city.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
province_code:
|
|
||||||
type: string
|
|
||||||
title: province_code
|
|
||||||
description: >-
|
|
||||||
The geo zone's ISO 3166-2 province code. Must be
|
|
||||||
lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The ID of an existing geo zone.
|
|
||||||
- type: object
|
|
||||||
description: A ZIP geo zone.
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
- metadata
|
|
||||||
- city
|
|
||||||
- country_code
|
|
||||||
- province_code
|
|
||||||
- postal_expression
|
|
||||||
properties:
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The geo zone's type.
|
|
||||||
default: zip
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's metadata.
|
|
||||||
city:
|
|
||||||
type: string
|
|
||||||
title: city
|
|
||||||
description: The geo zone's city.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The geo zone's country code.
|
|
||||||
province_code:
|
|
||||||
type: string
|
|
||||||
title: province_code
|
|
||||||
description: >-
|
|
||||||
The geo zone's ISO 3166-2 province code. Must be
|
|
||||||
lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
postal_expression:
|
|
||||||
type: object
|
|
||||||
description: The geo zone's postal expression or ZIP code.
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The ID of an existing geo zone.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -102,69 +102,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateInventoryItem.yaml
|
||||||
description: The properties to update in the inventory item.
|
|
||||||
properties:
|
|
||||||
sku:
|
|
||||||
type: string
|
|
||||||
title: sku
|
|
||||||
description: The inventory item's SKU.
|
|
||||||
hs_code:
|
|
||||||
type: string
|
|
||||||
title: hs_code
|
|
||||||
description: The inventory item's HS code.
|
|
||||||
weight:
|
|
||||||
type: number
|
|
||||||
title: weight
|
|
||||||
description: The inventory item's weight.
|
|
||||||
length:
|
|
||||||
type: number
|
|
||||||
title: length
|
|
||||||
description: The inventory item's length.
|
|
||||||
height:
|
|
||||||
type: number
|
|
||||||
title: height
|
|
||||||
description: The inventory item's height.
|
|
||||||
width:
|
|
||||||
type: number
|
|
||||||
title: width
|
|
||||||
description: The inventory item's width.
|
|
||||||
origin_country:
|
|
||||||
type: string
|
|
||||||
title: origin_country
|
|
||||||
description: The inventory item's origin country.
|
|
||||||
mid_code:
|
|
||||||
type: string
|
|
||||||
title: mid_code
|
|
||||||
description: The inventory item's MID code.
|
|
||||||
material:
|
|
||||||
type: string
|
|
||||||
title: material
|
|
||||||
description: The inventory item's material.
|
|
||||||
title:
|
|
||||||
type: string
|
|
||||||
title: title
|
|
||||||
description: The inventory item's title.
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
title: description
|
|
||||||
description: The inventory item's description.
|
|
||||||
requires_shipping:
|
|
||||||
type: boolean
|
|
||||||
title: requires_shipping
|
|
||||||
description: Whether the inventory item requires shipping.
|
|
||||||
thumbnail:
|
|
||||||
type: string
|
|
||||||
title: thumbnail
|
|
||||||
description: >-
|
|
||||||
The URL of an image to be used as the inventory item's
|
|
||||||
thumbnail. You can use the Upload API routes to upload an image
|
|
||||||
and get its URL.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: >-
|
|
||||||
The inventory item's metadata. Can be custom data in key-value
|
|
||||||
pairs.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
+1
-17
@@ -200,23 +200,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminCreateInventoryLocationLevel.yaml
|
||||||
description: The inventory level's details.
|
|
||||||
required:
|
|
||||||
- location_id
|
|
||||||
properties:
|
|
||||||
location_id:
|
|
||||||
type: string
|
|
||||||
title: location_id
|
|
||||||
description: The ID of the associated location.
|
|
||||||
stocked_quantity:
|
|
||||||
type: number
|
|
||||||
title: stocked_quantity
|
|
||||||
description: The inventory level's stocked quantity.
|
|
||||||
incoming_quantity:
|
|
||||||
type: number
|
|
||||||
title: incoming_quantity
|
|
||||||
description: The inventory level's incoming quantity.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
|
|||||||
+1
-11
@@ -45,17 +45,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateInventoryLocationLevel.yaml
|
||||||
description: The properties to update in the inventory level.
|
|
||||||
properties:
|
|
||||||
stocked_quantity:
|
|
||||||
type: number
|
|
||||||
title: stocked_quantity
|
|
||||||
description: The inventory level's stocked quantity.
|
|
||||||
incoming_quantity:
|
|
||||||
type: number
|
|
||||||
title: incoming_quantity
|
|
||||||
description: The inventory level's incoming quantity.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -13,22 +13,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminInviteAccept.yaml
|
||||||
description: The details of the user to be created.
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
type: string
|
|
||||||
title: email
|
|
||||||
description: The user's email.
|
|
||||||
format: email
|
|
||||||
first_name:
|
|
||||||
type: string
|
|
||||||
title: first_name
|
|
||||||
description: The user's first name.
|
|
||||||
last_name:
|
|
||||||
type: string
|
|
||||||
title: last_name
|
|
||||||
description: The user's last name.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ post:
|
|||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
- jwt_token: []
|
- jwt_token: []
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS SDK
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/admin_orders_{id}_archive/post.js
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source:
|
source:
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ post:
|
|||||||
passed to the underlying workflow under the `additional_data`
|
passed to the underlying workflow under the `additional_data`
|
||||||
parameter.
|
parameter.
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS SDK
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/admin_orders_{id}_complete/post.js
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source:
|
source:
|
||||||
|
|||||||
@@ -30,20 +30,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminCreatePaymentCollection.yaml
|
||||||
description: The payment collection's details.
|
|
||||||
required:
|
|
||||||
- order_id
|
|
||||||
- amount
|
|
||||||
properties:
|
|
||||||
order_id:
|
|
||||||
type: string
|
|
||||||
title: order_id
|
|
||||||
description: The ID of the associated order.
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
title: amount
|
|
||||||
description: The amount to be paid.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
+1
-9
@@ -39,15 +39,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminMarkPaymentCollectionPaid.yaml
|
||||||
description: The payment details.
|
|
||||||
required:
|
|
||||||
- order_id
|
|
||||||
properties:
|
|
||||||
order_id:
|
|
||||||
type: string
|
|
||||||
title: order_id
|
|
||||||
description: The ID of the order associated with the payment collection.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -38,13 +38,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminCreatePaymentCapture.yaml
|
||||||
description: The payment's details.
|
|
||||||
properties:
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
title: amount
|
|
||||||
description: The amount to capture.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -38,21 +38,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminCreatePaymentRefund.yaml
|
||||||
description: The refund's details.
|
|
||||||
properties:
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
title: amount
|
|
||||||
description: The amount to refund.
|
|
||||||
refund_reason_id:
|
|
||||||
type: string
|
|
||||||
title: refund_reason_id
|
|
||||||
description: The ID of a refund reason.
|
|
||||||
note:
|
|
||||||
type: string
|
|
||||||
title: note
|
|
||||||
description: A note to attach to the refund.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -158,44 +158,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateProductCategory.yaml
|
||||||
description: The properties to update in the product category.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The product category's name.
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
title: description
|
|
||||||
description: The product category's description.
|
|
||||||
handle:
|
|
||||||
type: string
|
|
||||||
title: handle
|
|
||||||
description: The product category's handle. Must be a unique value.
|
|
||||||
is_internal:
|
|
||||||
type: boolean
|
|
||||||
title: is_internal
|
|
||||||
description: >-
|
|
||||||
Whether the product category is only used for internal purposes
|
|
||||||
and shouldn't be shown the customer.
|
|
||||||
is_active:
|
|
||||||
type: boolean
|
|
||||||
title: is_active
|
|
||||||
description: Whether the product category is active.
|
|
||||||
parent_category_id:
|
|
||||||
type: string
|
|
||||||
title: parent_category_id
|
|
||||||
description: The ID of a parent category.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: >-
|
|
||||||
The product category's metadata. Can hold custom key-value
|
|
||||||
pairs.
|
|
||||||
rank:
|
|
||||||
type: number
|
|
||||||
title: rank
|
|
||||||
description: The product category's rank among other categories.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -102,16 +102,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateProductTag.yaml
|
||||||
description: The properties to update in the product tag.
|
|
||||||
properties:
|
|
||||||
value:
|
|
||||||
type: string
|
|
||||||
title: value
|
|
||||||
description: The product tag's value.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The product tag's metadata. Can hold custom key-value pairs.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -102,16 +102,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateProductType.yaml
|
||||||
description: The properties to update in the product type.
|
|
||||||
properties:
|
|
||||||
value:
|
|
||||||
type: string
|
|
||||||
title: value
|
|
||||||
description: The product type's value.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The product type's metadata. Can hold custom key-value pairs.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -98,17 +98,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdatePaymentRefundReason.yaml
|
||||||
description: The properties to update in the refund reason.
|
|
||||||
properties:
|
|
||||||
label:
|
|
||||||
type: string
|
|
||||||
title: label
|
|
||||||
description: The refund reason's label.
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
title: description
|
|
||||||
description: The refund reason's description.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
|
|||||||
@@ -102,44 +102,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateRegion.yaml
|
||||||
description: The propeties to update in the region.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The region's name.
|
|
||||||
currency_code:
|
|
||||||
type: string
|
|
||||||
title: currency_code
|
|
||||||
description: The region's currency code.
|
|
||||||
countries:
|
|
||||||
type: array
|
|
||||||
description: The region's countries.
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
title: countries
|
|
||||||
description: A country code.
|
|
||||||
automatic_taxes:
|
|
||||||
type: boolean
|
|
||||||
title: automatic_taxes
|
|
||||||
description: >-
|
|
||||||
Whether taxes are calculated automatically for carts in the
|
|
||||||
region.
|
|
||||||
payment_providers:
|
|
||||||
type: array
|
|
||||||
description: The payment providers enabled in the region.
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
title: payment_providers
|
|
||||||
description: A payment provider's ID.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The region's metadata. Can hold custom key-value pairs.
|
|
||||||
is_tax_inclusive:
|
|
||||||
type: boolean
|
|
||||||
title: is_tax_inclusive
|
|
||||||
description: Whether the prices in the region are tax inclusive.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -102,24 +102,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateReservation.yaml
|
||||||
description: The properties to update in the reservation.
|
|
||||||
properties:
|
|
||||||
location_id:
|
|
||||||
type: string
|
|
||||||
title: location_id
|
|
||||||
description: The ID of the associated location.
|
|
||||||
quantity:
|
|
||||||
type: number
|
|
||||||
title: quantity
|
|
||||||
description: The reserved quantity.
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
title: description
|
|
||||||
description: The reservation's description.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The reservation's metadata. Can hold custom key-value pairs.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -104,186 +104,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateShippingOption.yaml
|
||||||
description: The properties to update in the shipping option.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The shipping option's name.
|
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
description: >-
|
|
||||||
The shipping option's data that is useful for third-party
|
|
||||||
providers.
|
|
||||||
externalDocs:
|
|
||||||
url: >-
|
|
||||||
https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
|
|
||||||
price_type:
|
|
||||||
type: string
|
|
||||||
description: >
|
|
||||||
The type of the shipping option's price. If `calculated`, its
|
|
||||||
price is retrieved by the associated fulfillment provider
|
|
||||||
during checkout. If `flat`, its price is set in the `prices`
|
|
||||||
property.
|
|
||||||
enum:
|
|
||||||
- calculated
|
|
||||||
- flat
|
|
||||||
provider_id:
|
|
||||||
type: string
|
|
||||||
title: provider_id
|
|
||||||
description: >-
|
|
||||||
The ID of the associated fulfillment provider that is used to
|
|
||||||
process the option.
|
|
||||||
shipping_profile_id:
|
|
||||||
type: string
|
|
||||||
title: shipping_profile_id
|
|
||||||
description: The ID of the shipping profile this shipping option belongs to.
|
|
||||||
type:
|
|
||||||
type: object
|
|
||||||
description: The shipping option's type.
|
|
||||||
required:
|
|
||||||
- code
|
|
||||||
- description
|
|
||||||
- label
|
|
||||||
properties:
|
|
||||||
label:
|
|
||||||
type: string
|
|
||||||
title: label
|
|
||||||
description: The type's label.
|
|
||||||
description:
|
|
||||||
type: string
|
|
||||||
title: description
|
|
||||||
description: The type's description.
|
|
||||||
code:
|
|
||||||
type: string
|
|
||||||
title: code
|
|
||||||
description: The type's code.
|
|
||||||
prices:
|
|
||||||
type: array
|
|
||||||
description: >-
|
|
||||||
The shipping option's prices. If the `price_type` is
|
|
||||||
`calculated`, pass an empty array.
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- type: object
|
|
||||||
description: The shipping option's price for a currency code.
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The ID of an existing price.
|
|
||||||
currency_code:
|
|
||||||
type: string
|
|
||||||
title: currency_code
|
|
||||||
description: The price's currency code.
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
title: amount
|
|
||||||
description: The price's amount.
|
|
||||||
- type: object
|
|
||||||
description: The shipping option's price for a region.
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The ID of an existing price.
|
|
||||||
region_id:
|
|
||||||
type: string
|
|
||||||
title: region_id
|
|
||||||
description: The ID of the associated region.
|
|
||||||
amount:
|
|
||||||
type: number
|
|
||||||
title: amount
|
|
||||||
description: The price's amount.
|
|
||||||
rules:
|
|
||||||
type: array
|
|
||||||
description: The shipping option's rules.
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- type: object
|
|
||||||
description: The details of a new shipping option rule.
|
|
||||||
required:
|
|
||||||
- operator
|
|
||||||
- attribute
|
|
||||||
- value
|
|
||||||
properties:
|
|
||||||
operator:
|
|
||||||
type: string
|
|
||||||
description: The operator used to check whether a rule applies.
|
|
||||||
enum:
|
|
||||||
- in
|
|
||||||
- eq
|
|
||||||
- ne
|
|
||||||
- gt
|
|
||||||
- gte
|
|
||||||
- lt
|
|
||||||
- lte
|
|
||||||
- nin
|
|
||||||
attribute:
|
|
||||||
type: string
|
|
||||||
title: attribute
|
|
||||||
description: >-
|
|
||||||
The name of a property or table that the rule applies
|
|
||||||
to.
|
|
||||||
example: customer_group
|
|
||||||
value:
|
|
||||||
oneOf:
|
|
||||||
- type: string
|
|
||||||
title: value
|
|
||||||
description: A value of the attribute that enables this rule.
|
|
||||||
example: cusgroup_123
|
|
||||||
- type: array
|
|
||||||
description: Values of the attribute that enable this rule.
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
title: value
|
|
||||||
description: A value of the attribute that enables this rule.
|
|
||||||
example: cusgroup_123
|
|
||||||
- type: object
|
|
||||||
description: Update the properties of an existing rule.
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
- operator
|
|
||||||
- attribute
|
|
||||||
- value
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: string
|
|
||||||
title: id
|
|
||||||
description: The rule's ID.
|
|
||||||
operator:
|
|
||||||
type: string
|
|
||||||
description: The operator used to check whether a rule applies.
|
|
||||||
enum:
|
|
||||||
- in
|
|
||||||
- eq
|
|
||||||
- ne
|
|
||||||
- gt
|
|
||||||
- gte
|
|
||||||
- lt
|
|
||||||
- lte
|
|
||||||
- nin
|
|
||||||
attribute:
|
|
||||||
type: string
|
|
||||||
title: attribute
|
|
||||||
description: >-
|
|
||||||
The name of a property or table that the rule applies
|
|
||||||
to.
|
|
||||||
example: customer_group
|
|
||||||
value:
|
|
||||||
oneOf:
|
|
||||||
- type: string
|
|
||||||
title: value
|
|
||||||
description: A value of the attribute that enables this rule.
|
|
||||||
example: cusgroup_123
|
|
||||||
- type: array
|
|
||||||
description: Values of the attribute that enable this rule.
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
title: value
|
|
||||||
description: A value of the attribute that enables this rule.
|
|
||||||
example: cusgroup_123
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -102,20 +102,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminUpdateShippingProfile.yaml
|
||||||
description: The properties to update in the shipping profile.
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The shipping profile's name.
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The shipping profile's type.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: The shipping profile's metadata.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
+1
-14
@@ -37,20 +37,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/AdminCreateStockLocationFulfillmentSet.yaml
|
||||||
description: The fulfillment set to create.
|
|
||||||
required:
|
|
||||||
- type
|
|
||||||
- name
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
title: name
|
|
||||||
description: The fulfillment set's name.
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
title: type
|
|
||||||
description: The fulfillment set's type.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ type: object
|
|||||||
description: The filfillment's details.
|
description: The filfillment's details.
|
||||||
x-schemaName: AdminCreateFulfillment
|
x-schemaName: AdminCreateFulfillment
|
||||||
required:
|
required:
|
||||||
- data
|
|
||||||
- items
|
- items
|
||||||
- metadata
|
- metadata
|
||||||
- order_id
|
- order_id
|
||||||
|
- data
|
||||||
- location_id
|
- location_id
|
||||||
- provider_id
|
- provider_id
|
||||||
- delivery_address
|
- delivery_address
|
||||||
|
|||||||
+132
@@ -0,0 +1,132 @@
|
|||||||
|
type: object
|
||||||
|
description: The service zone's details.
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The service zone's name.
|
||||||
|
geo_zones:
|
||||||
|
type: array
|
||||||
|
description: The service zone's geo zones.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: A country geo zone.
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: country
|
||||||
|
- type: object
|
||||||
|
description: A province geo zone.
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
- province_code
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: province
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
- type: object
|
||||||
|
description: A city geo zone
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
- province_code
|
||||||
|
- city
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: city
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
- type: object
|
||||||
|
description: A ZIP geo zone.
|
||||||
|
required:
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- type
|
||||||
|
- province_code
|
||||||
|
- city
|
||||||
|
- postal_expression
|
||||||
|
properties:
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: zip
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
postal_expression:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's postal expression or ZIP code.
|
||||||
|
x-schemaName: AdminCreateFulfillmentSetServiceZones
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
type: object
|
||||||
|
description: The inventory level's details.
|
||||||
|
required:
|
||||||
|
- location_id
|
||||||
|
properties:
|
||||||
|
location_id:
|
||||||
|
type: string
|
||||||
|
title: location_id
|
||||||
|
description: The ID of the associated location.
|
||||||
|
stocked_quantity:
|
||||||
|
type: number
|
||||||
|
title: stocked_quantity
|
||||||
|
description: The inventory level's stocked quantity.
|
||||||
|
incoming_quantity:
|
||||||
|
type: number
|
||||||
|
title: incoming_quantity
|
||||||
|
description: The inventory level's incoming quantity.
|
||||||
|
x-schemaName: AdminCreateInventoryLocationLevel
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
type: object
|
||||||
|
description: The payment's details.
|
||||||
|
properties:
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The amount to capture.
|
||||||
|
x-schemaName: AdminCreatePaymentCapture
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
type: object
|
||||||
|
description: The payment collection's details.
|
||||||
|
required:
|
||||||
|
- order_id
|
||||||
|
- amount
|
||||||
|
properties:
|
||||||
|
order_id:
|
||||||
|
type: string
|
||||||
|
title: order_id
|
||||||
|
description: The ID of the associated order.
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The amount to be paid.
|
||||||
|
x-schemaName: AdminCreatePaymentCollection
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
type: object
|
||||||
|
description: The refund's details.
|
||||||
|
properties:
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The amount to refund.
|
||||||
|
refund_reason_id:
|
||||||
|
type: string
|
||||||
|
title: refund_reason_id
|
||||||
|
description: The ID of a refund reason.
|
||||||
|
note:
|
||||||
|
type: string
|
||||||
|
title: note
|
||||||
|
description: A note to attach to the refund.
|
||||||
|
x-schemaName: AdminCreatePaymentRefund
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
type: object
|
||||||
|
description: The fulfillment set to create.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- name
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The fulfillment set's name.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The fulfillment set's type.
|
||||||
|
x-schemaName: AdminCreateStockLocationFulfillmentSet
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
type: object
|
||||||
|
description: The details of the user to be created.
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
title: email
|
||||||
|
description: The user's email.
|
||||||
|
format: email
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
title: first_name
|
||||||
|
description: The user's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
title: last_name
|
||||||
|
description: The user's last name.
|
||||||
|
x-schemaName: AdminInviteAccept
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
type: object
|
||||||
|
description: The payment details.
|
||||||
|
required:
|
||||||
|
- order_id
|
||||||
|
properties:
|
||||||
|
order_id:
|
||||||
|
type: string
|
||||||
|
title: order_id
|
||||||
|
description: The ID of the order associated with the payment collection.
|
||||||
|
x-schemaName: AdminMarkPaymentCollectionPaid
|
||||||
+146
@@ -0,0 +1,146 @@
|
|||||||
|
type: object
|
||||||
|
description: The service zone's details.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The service zone's name.
|
||||||
|
geo_zones:
|
||||||
|
type: array
|
||||||
|
description: The service zone's associated geo zones.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: A country geo zone.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: country
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
- type: object
|
||||||
|
description: A province geo zone.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- country_code
|
||||||
|
- province_code
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: province
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
- type: object
|
||||||
|
description: A city geo zone
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- province_code
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: city
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
- type: object
|
||||||
|
description: A ZIP geo zone.
|
||||||
|
required:
|
||||||
|
- type
|
||||||
|
- metadata
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- province_code
|
||||||
|
- postal_expression
|
||||||
|
properties:
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The geo zone's type.
|
||||||
|
default: zip
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's metadata.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The geo zone's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The geo zone's country code.
|
||||||
|
province_code:
|
||||||
|
type: string
|
||||||
|
title: province_code
|
||||||
|
description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
postal_expression:
|
||||||
|
type: object
|
||||||
|
description: The geo zone's postal expression or ZIP code.
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing geo zone.
|
||||||
|
x-schemaName: AdminUpdateFulfillmentSetServiceZones
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the inventory item.
|
||||||
|
properties:
|
||||||
|
sku:
|
||||||
|
type: string
|
||||||
|
title: sku
|
||||||
|
description: The inventory item's SKU.
|
||||||
|
hs_code:
|
||||||
|
type: string
|
||||||
|
title: hs_code
|
||||||
|
description: The inventory item's HS code.
|
||||||
|
weight:
|
||||||
|
type: number
|
||||||
|
title: weight
|
||||||
|
description: The inventory item's weight.
|
||||||
|
length:
|
||||||
|
type: number
|
||||||
|
title: length
|
||||||
|
description: The inventory item's length.
|
||||||
|
height:
|
||||||
|
type: number
|
||||||
|
title: height
|
||||||
|
description: The inventory item's height.
|
||||||
|
width:
|
||||||
|
type: number
|
||||||
|
title: width
|
||||||
|
description: The inventory item's width.
|
||||||
|
origin_country:
|
||||||
|
type: string
|
||||||
|
title: origin_country
|
||||||
|
description: The inventory item's origin country.
|
||||||
|
mid_code:
|
||||||
|
type: string
|
||||||
|
title: mid_code
|
||||||
|
description: The inventory item's MID code.
|
||||||
|
material:
|
||||||
|
type: string
|
||||||
|
title: material
|
||||||
|
description: The inventory item's material.
|
||||||
|
title:
|
||||||
|
type: string
|
||||||
|
title: title
|
||||||
|
description: The inventory item's title.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The inventory item's description.
|
||||||
|
requires_shipping:
|
||||||
|
type: boolean
|
||||||
|
title: requires_shipping
|
||||||
|
description: Whether the inventory item requires shipping.
|
||||||
|
thumbnail:
|
||||||
|
type: string
|
||||||
|
title: thumbnail
|
||||||
|
description: >-
|
||||||
|
The URL of an image to be used as the inventory item's thumbnail. You can
|
||||||
|
use the Upload API routes to upload an image and get its URL.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The inventory item's metadata. Can be custom data in key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateInventoryItem
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the inventory level.
|
||||||
|
properties:
|
||||||
|
stocked_quantity:
|
||||||
|
type: number
|
||||||
|
title: stocked_quantity
|
||||||
|
description: The inventory level's stocked quantity.
|
||||||
|
incoming_quantity:
|
||||||
|
type: number
|
||||||
|
title: incoming_quantity
|
||||||
|
description: The inventory level's incoming quantity.
|
||||||
|
x-schemaName: AdminUpdateInventoryLocationLevel
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the refund reason.
|
||||||
|
properties:
|
||||||
|
label:
|
||||||
|
type: string
|
||||||
|
title: label
|
||||||
|
description: The refund reason's label.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The refund reason's description.
|
||||||
|
x-schemaName: AdminUpdatePaymentRefundReason
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the product category.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The product category's name.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The product category's description.
|
||||||
|
handle:
|
||||||
|
type: string
|
||||||
|
title: handle
|
||||||
|
description: The product category's handle. Must be a unique value.
|
||||||
|
is_internal:
|
||||||
|
type: boolean
|
||||||
|
title: is_internal
|
||||||
|
description: >-
|
||||||
|
Whether the product category is only used for internal purposes and
|
||||||
|
shouldn't be shown the customer.
|
||||||
|
is_active:
|
||||||
|
type: boolean
|
||||||
|
title: is_active
|
||||||
|
description: Whether the product category is active.
|
||||||
|
parent_category_id:
|
||||||
|
type: string
|
||||||
|
title: parent_category_id
|
||||||
|
description: The ID of a parent category.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The product category's metadata. Can hold custom key-value pairs.
|
||||||
|
rank:
|
||||||
|
type: number
|
||||||
|
title: rank
|
||||||
|
description: The product category's rank among other categories.
|
||||||
|
x-schemaName: AdminUpdateProductCategory
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the product tag.
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: The product tag's value.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The product tag's metadata. Can hold custom key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateProductTag
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the product type.
|
||||||
|
properties:
|
||||||
|
value:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: The product type's value.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The product type's metadata. Can hold custom key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateProductType
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
type: object
|
||||||
|
description: The propeties to update in the region.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The region's name.
|
||||||
|
currency_code:
|
||||||
|
type: string
|
||||||
|
title: currency_code
|
||||||
|
description: The region's currency code.
|
||||||
|
countries:
|
||||||
|
type: array
|
||||||
|
description: The region's countries.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: countries
|
||||||
|
description: A country code.
|
||||||
|
automatic_taxes:
|
||||||
|
type: boolean
|
||||||
|
title: automatic_taxes
|
||||||
|
description: Whether taxes are calculated automatically for carts in the region.
|
||||||
|
payment_providers:
|
||||||
|
type: array
|
||||||
|
description: The payment providers enabled in the region.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: payment_providers
|
||||||
|
description: A payment provider's ID.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The region's metadata. Can hold custom key-value pairs.
|
||||||
|
is_tax_inclusive:
|
||||||
|
type: boolean
|
||||||
|
title: is_tax_inclusive
|
||||||
|
description: Whether the prices in the region are tax inclusive.
|
||||||
|
x-schemaName: AdminUpdateRegion
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the reservation.
|
||||||
|
properties:
|
||||||
|
location_id:
|
||||||
|
type: string
|
||||||
|
title: location_id
|
||||||
|
description: The ID of the associated location.
|
||||||
|
quantity:
|
||||||
|
type: number
|
||||||
|
title: quantity
|
||||||
|
description: The reserved quantity.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The reservation's description.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The reservation's metadata. Can hold custom key-value pairs.
|
||||||
|
x-schemaName: AdminUpdateReservation
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the shipping option.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The shipping option's name.
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
description: The shipping option's data that is useful for third-party providers.
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
|
||||||
|
price_type:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
The type of the shipping option's price. If `calculated`, its price is
|
||||||
|
retrieved by the associated fulfillment provider during checkout. If
|
||||||
|
`flat`, its price is set in the `prices` property.
|
||||||
|
enum:
|
||||||
|
- calculated
|
||||||
|
- flat
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
title: provider_id
|
||||||
|
description: >-
|
||||||
|
The ID of the associated fulfillment provider that is used to process the
|
||||||
|
option.
|
||||||
|
shipping_profile_id:
|
||||||
|
type: string
|
||||||
|
title: shipping_profile_id
|
||||||
|
description: The ID of the shipping profile this shipping option belongs to.
|
||||||
|
type:
|
||||||
|
type: object
|
||||||
|
description: The shipping option's type.
|
||||||
|
required:
|
||||||
|
- code
|
||||||
|
- description
|
||||||
|
- label
|
||||||
|
properties:
|
||||||
|
label:
|
||||||
|
type: string
|
||||||
|
title: label
|
||||||
|
description: The type's label.
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
title: description
|
||||||
|
description: The type's description.
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
title: code
|
||||||
|
description: The type's code.
|
||||||
|
prices:
|
||||||
|
type: array
|
||||||
|
description: >-
|
||||||
|
The shipping option's prices. If the `price_type` is `calculated`, pass an
|
||||||
|
empty array.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: The shipping option's price for a currency code.
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing price.
|
||||||
|
currency_code:
|
||||||
|
type: string
|
||||||
|
title: currency_code
|
||||||
|
description: The price's currency code.
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The price's amount.
|
||||||
|
- type: object
|
||||||
|
description: The shipping option's price for a region.
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The ID of an existing price.
|
||||||
|
region_id:
|
||||||
|
type: string
|
||||||
|
title: region_id
|
||||||
|
description: The ID of the associated region.
|
||||||
|
amount:
|
||||||
|
type: number
|
||||||
|
title: amount
|
||||||
|
description: The price's amount.
|
||||||
|
rules:
|
||||||
|
type: array
|
||||||
|
description: The shipping option's rules.
|
||||||
|
items:
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
description: The details of a new shipping option rule.
|
||||||
|
required:
|
||||||
|
- operator
|
||||||
|
- attribute
|
||||||
|
- value
|
||||||
|
properties:
|
||||||
|
operator:
|
||||||
|
type: string
|
||||||
|
description: The operator used to check whether a rule applies.
|
||||||
|
enum:
|
||||||
|
- in
|
||||||
|
- eq
|
||||||
|
- ne
|
||||||
|
- gt
|
||||||
|
- gte
|
||||||
|
- lt
|
||||||
|
- lte
|
||||||
|
- nin
|
||||||
|
attribute:
|
||||||
|
type: string
|
||||||
|
title: attribute
|
||||||
|
description: The name of a property or table that the rule applies to.
|
||||||
|
example: customer_group
|
||||||
|
value:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
- type: array
|
||||||
|
description: Values of the attribute that enable this rule.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
- type: object
|
||||||
|
description: Update the properties of an existing rule.
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- operator
|
||||||
|
- attribute
|
||||||
|
- value
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
title: id
|
||||||
|
description: The rule's ID.
|
||||||
|
operator:
|
||||||
|
type: string
|
||||||
|
description: The operator used to check whether a rule applies.
|
||||||
|
enum:
|
||||||
|
- in
|
||||||
|
- eq
|
||||||
|
- ne
|
||||||
|
- gt
|
||||||
|
- gte
|
||||||
|
- lt
|
||||||
|
- lte
|
||||||
|
- nin
|
||||||
|
attribute:
|
||||||
|
type: string
|
||||||
|
title: attribute
|
||||||
|
description: The name of a property or table that the rule applies to.
|
||||||
|
example: customer_group
|
||||||
|
value:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
- type: array
|
||||||
|
description: Values of the attribute that enable this rule.
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
title: value
|
||||||
|
description: A value of the attribute that enables this rule.
|
||||||
|
example: cusgroup_123
|
||||||
|
x-schemaName: AdminUpdateShippingOption
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the shipping profile.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
title: name
|
||||||
|
description: The shipping profile's name.
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
title: type
|
||||||
|
description: The shipping profile's type.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: The shipping profile's metadata.
|
||||||
|
x-schemaName: AdminUpdateShippingProfile
|
||||||
+19
@@ -0,0 +1,19 @@
|
|||||||
|
type: object
|
||||||
|
description: The shipping method's details.
|
||||||
|
required:
|
||||||
|
- option_id
|
||||||
|
properties:
|
||||||
|
option_id:
|
||||||
|
type: string
|
||||||
|
title: option_id
|
||||||
|
description: The ID of the shipping option this method is created from.
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
description: >-
|
||||||
|
Any additional data relevant for the third-party fulfillment provider to
|
||||||
|
process the shipment.
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter
|
||||||
|
description: Learn more about the data parameter.
|
||||||
|
x-schemaName: StoreAddCartShippingMethods
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
type: object
|
||||||
|
description: The address's details.
|
||||||
|
properties:
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
title: first_name
|
||||||
|
description: The customer's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
title: last_name
|
||||||
|
description: The customer's last name.
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
title: phone
|
||||||
|
description: The customer's phone.
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
title: company
|
||||||
|
description: The address's company.
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
title: address_1
|
||||||
|
description: The address's first line.
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
title: address_2
|
||||||
|
description: The address's second line.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The address's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The address's country code.
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
title: province
|
||||||
|
description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
title: postal_code
|
||||||
|
description: The address's postal code.
|
||||||
|
address_name:
|
||||||
|
type: string
|
||||||
|
title: address_name
|
||||||
|
description: The address's name.
|
||||||
|
is_default_shipping:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_shipping
|
||||||
|
description: Whether the address is used by default for shipping during checkout.
|
||||||
|
is_default_billing:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_billing
|
||||||
|
description: Whether the address is used by default for billing during checkout.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: Holds custom key-value pairs.
|
||||||
|
x-schemaName: StoreCreateCustomerAddress
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
type: object
|
||||||
|
description: The properties to update in the address.
|
||||||
|
properties:
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
title: first_name
|
||||||
|
description: The customer's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
title: last_name
|
||||||
|
description: The customer's last name.
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
title: phone
|
||||||
|
description: The customer's phone.
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
title: company
|
||||||
|
description: The address's company.
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
title: address_1
|
||||||
|
description: The address's first line.
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
title: address_2
|
||||||
|
description: The address's second line.
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
title: city
|
||||||
|
description: The address's city.
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
title: country_code
|
||||||
|
description: The address's country code.
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
title: province
|
||||||
|
description: The address's ISO 3166-2 province code. Must be lower-case.
|
||||||
|
example: us-ca
|
||||||
|
externalDocs:
|
||||||
|
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
||||||
|
description: Learn more about ISO 3166-2
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
title: postal_code
|
||||||
|
description: The address's postal code.
|
||||||
|
address_name:
|
||||||
|
type: string
|
||||||
|
title: address_name
|
||||||
|
description: The address's name.
|
||||||
|
is_default_shipping:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_shipping
|
||||||
|
description: Whether the address is used by default for shipping during checkout.
|
||||||
|
is_default_billing:
|
||||||
|
type: boolean
|
||||||
|
title: is_default_billing
|
||||||
|
description: Whether the address is used by default for billing during checkout.
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: Holds custom key-value pairs.
|
||||||
|
x-schemaName: StoreUpdateCustomerAddress
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -47,24 +47,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/StoreAddCartShippingMethods.yaml
|
||||||
description: The shipping method's details.
|
|
||||||
required:
|
|
||||||
- option_id
|
|
||||||
properties:
|
|
||||||
option_id:
|
|
||||||
type: string
|
|
||||||
title: option_id
|
|
||||||
description: The ID of the shipping option this method is created from.
|
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
description: >-
|
|
||||||
Any additional data relevant for the third-party fulfillment
|
|
||||||
provider to process the shipment.
|
|
||||||
externalDocs:
|
|
||||||
url: >-
|
|
||||||
https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter
|
|
||||||
description: Learn more about the data parameter.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
@@ -225,72 +225,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/StoreCreateCustomerAddress.yaml
|
||||||
description: The address's details.
|
|
||||||
properties:
|
|
||||||
first_name:
|
|
||||||
type: string
|
|
||||||
title: first_name
|
|
||||||
description: The customer's first name.
|
|
||||||
last_name:
|
|
||||||
type: string
|
|
||||||
title: last_name
|
|
||||||
description: The customer's last name.
|
|
||||||
phone:
|
|
||||||
type: string
|
|
||||||
title: phone
|
|
||||||
description: The customer's phone.
|
|
||||||
company:
|
|
||||||
type: string
|
|
||||||
title: company
|
|
||||||
description: The address's company.
|
|
||||||
address_1:
|
|
||||||
type: string
|
|
||||||
title: address_1
|
|
||||||
description: The address's first line.
|
|
||||||
address_2:
|
|
||||||
type: string
|
|
||||||
title: address_2
|
|
||||||
description: The address's second line.
|
|
||||||
city:
|
|
||||||
type: string
|
|
||||||
title: city
|
|
||||||
description: The address's city.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The address's country code.
|
|
||||||
province:
|
|
||||||
type: string
|
|
||||||
title: province
|
|
||||||
description: The address's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
postal_code:
|
|
||||||
type: string
|
|
||||||
title: postal_code
|
|
||||||
description: The address's postal code.
|
|
||||||
address_name:
|
|
||||||
type: string
|
|
||||||
title: address_name
|
|
||||||
description: The address's name.
|
|
||||||
is_default_shipping:
|
|
||||||
type: boolean
|
|
||||||
title: is_default_shipping
|
|
||||||
description: >-
|
|
||||||
Whether the address is used by default for shipping during
|
|
||||||
checkout.
|
|
||||||
is_default_billing:
|
|
||||||
type: boolean
|
|
||||||
title: is_default_billing
|
|
||||||
description: >-
|
|
||||||
Whether the address is used by default for billing during
|
|
||||||
checkout.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: Holds custom key-value pairs.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
+1
-66
@@ -139,72 +139,7 @@ post:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: ../components/schemas/StoreUpdateCustomerAddress.yaml
|
||||||
description: The properties to update in the address.
|
|
||||||
properties:
|
|
||||||
first_name:
|
|
||||||
type: string
|
|
||||||
title: first_name
|
|
||||||
description: The customer's first name.
|
|
||||||
last_name:
|
|
||||||
type: string
|
|
||||||
title: last_name
|
|
||||||
description: The customer's last name.
|
|
||||||
phone:
|
|
||||||
type: string
|
|
||||||
title: phone
|
|
||||||
description: The customer's phone.
|
|
||||||
company:
|
|
||||||
type: string
|
|
||||||
title: company
|
|
||||||
description: The address's company.
|
|
||||||
address_1:
|
|
||||||
type: string
|
|
||||||
title: address_1
|
|
||||||
description: The address's first line.
|
|
||||||
address_2:
|
|
||||||
type: string
|
|
||||||
title: address_2
|
|
||||||
description: The address's second line.
|
|
||||||
city:
|
|
||||||
type: string
|
|
||||||
title: city
|
|
||||||
description: The address's city.
|
|
||||||
country_code:
|
|
||||||
type: string
|
|
||||||
title: country_code
|
|
||||||
description: The address's country code.
|
|
||||||
province:
|
|
||||||
type: string
|
|
||||||
title: province
|
|
||||||
description: The address's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
example: us-ca
|
|
||||||
externalDocs:
|
|
||||||
url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
description: Learn more about ISO 3166-2
|
|
||||||
postal_code:
|
|
||||||
type: string
|
|
||||||
title: postal_code
|
|
||||||
description: The address's postal code.
|
|
||||||
address_name:
|
|
||||||
type: string
|
|
||||||
title: address_name
|
|
||||||
description: The address's name.
|
|
||||||
is_default_shipping:
|
|
||||||
type: boolean
|
|
||||||
title: is_default_shipping
|
|
||||||
description: >-
|
|
||||||
Whether the address is used by default for shipping during
|
|
||||||
checkout.
|
|
||||||
is_default_billing:
|
|
||||||
type: boolean
|
|
||||||
title: is_default_billing
|
|
||||||
description: >-
|
|
||||||
Whether the address is used by default for billing during
|
|
||||||
checkout.
|
|
||||||
metadata:
|
|
||||||
type: object
|
|
||||||
description: Holds custom key-value pairs.
|
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS SDK
|
label: JS SDK
|
||||||
|
|||||||
+1
-131
@@ -32,137 +32,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminCreateFulfillmentSetServiceZones"
|
||||||
* description: The service zone's details.
|
|
||||||
* required:
|
|
||||||
* - name
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The service zone's name.
|
|
||||||
* geo_zones:
|
|
||||||
* type: array
|
|
||||||
* description: The service zone's geo zones.
|
|
||||||
* items:
|
|
||||||
* oneOf:
|
|
||||||
* - type: object
|
|
||||||
* description: A country geo zone.
|
|
||||||
* required:
|
|
||||||
* - metadata
|
|
||||||
* - country_code
|
|
||||||
* - type
|
|
||||||
* properties:
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: country
|
|
||||||
* - type: object
|
|
||||||
* description: A province geo zone.
|
|
||||||
* required:
|
|
||||||
* - metadata
|
|
||||||
* - country_code
|
|
||||||
* - type
|
|
||||||
* - province_code
|
|
||||||
* properties:
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: province
|
|
||||||
* province_code:
|
|
||||||
* type: string
|
|
||||||
* title: province_code
|
|
||||||
* description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* - type: object
|
|
||||||
* description: A city geo zone
|
|
||||||
* required:
|
|
||||||
* - metadata
|
|
||||||
* - country_code
|
|
||||||
* - type
|
|
||||||
* - province_code
|
|
||||||
* - city
|
|
||||||
* properties:
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: city
|
|
||||||
* province_code:
|
|
||||||
* type: string
|
|
||||||
* title: province_code
|
|
||||||
* description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* city:
|
|
||||||
* type: string
|
|
||||||
* title: city
|
|
||||||
* description: The geo zone's city.
|
|
||||||
* - type: object
|
|
||||||
* description: A ZIP geo zone.
|
|
||||||
* required:
|
|
||||||
* - metadata
|
|
||||||
* - country_code
|
|
||||||
* - type
|
|
||||||
* - province_code
|
|
||||||
* - city
|
|
||||||
* - postal_expression
|
|
||||||
* properties:
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: zip
|
|
||||||
* province_code:
|
|
||||||
* type: string
|
|
||||||
* title: province_code
|
|
||||||
* description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* city:
|
|
||||||
* type: string
|
|
||||||
* title: city
|
|
||||||
* description: The geo zone's city.
|
|
||||||
* postal_expression:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's postal expression or ZIP code.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-145
@@ -38,151 +38,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateFulfillmentSetServiceZones"
|
||||||
* description: The service zone's details.
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The service zone's name.
|
|
||||||
* geo_zones:
|
|
||||||
* type: array
|
|
||||||
* description: The service zone's associated geo zones.
|
|
||||||
* items:
|
|
||||||
* oneOf:
|
|
||||||
* - type: object
|
|
||||||
* description: A country geo zone.
|
|
||||||
* required:
|
|
||||||
* - type
|
|
||||||
* - metadata
|
|
||||||
* - country_code
|
|
||||||
* properties:
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: country
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The ID of an existing geo zone.
|
|
||||||
* - type: object
|
|
||||||
* description: A province geo zone.
|
|
||||||
* required:
|
|
||||||
* - type
|
|
||||||
* - metadata
|
|
||||||
* - country_code
|
|
||||||
* - province_code
|
|
||||||
* properties:
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: province
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* province_code:
|
|
||||||
* type: string
|
|
||||||
* title: province_code
|
|
||||||
* description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The ID of an existing geo zone.
|
|
||||||
* - type: object
|
|
||||||
* description: A city geo zone
|
|
||||||
* required:
|
|
||||||
* - type
|
|
||||||
* - metadata
|
|
||||||
* - city
|
|
||||||
* - country_code
|
|
||||||
* - province_code
|
|
||||||
* properties:
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: city
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* city:
|
|
||||||
* type: string
|
|
||||||
* title: city
|
|
||||||
* description: The geo zone's city.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* province_code:
|
|
||||||
* type: string
|
|
||||||
* title: province_code
|
|
||||||
* description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The ID of an existing geo zone.
|
|
||||||
* - type: object
|
|
||||||
* description: A ZIP geo zone.
|
|
||||||
* required:
|
|
||||||
* - type
|
|
||||||
* - metadata
|
|
||||||
* - city
|
|
||||||
* - country_code
|
|
||||||
* - province_code
|
|
||||||
* - postal_expression
|
|
||||||
* properties:
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The geo zone's type.
|
|
||||||
* default: zip
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's metadata.
|
|
||||||
* city:
|
|
||||||
* type: string
|
|
||||||
* title: city
|
|
||||||
* description: The geo zone's city.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The geo zone's country code.
|
|
||||||
* province_code:
|
|
||||||
* type: string
|
|
||||||
* title: province_code
|
|
||||||
* description: The geo zone's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* postal_expression:
|
|
||||||
* type: object
|
|
||||||
* description: The geo zone's postal expression or ZIP code.
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The ID of an existing geo zone.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,64 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateInventoryItem"
|
||||||
* description: The properties to update in the inventory item.
|
|
||||||
* properties:
|
|
||||||
* sku:
|
|
||||||
* type: string
|
|
||||||
* title: sku
|
|
||||||
* description: The inventory item's SKU.
|
|
||||||
* hs_code:
|
|
||||||
* type: string
|
|
||||||
* title: hs_code
|
|
||||||
* description: The inventory item's HS code.
|
|
||||||
* weight:
|
|
||||||
* type: number
|
|
||||||
* title: weight
|
|
||||||
* description: The inventory item's weight.
|
|
||||||
* length:
|
|
||||||
* type: number
|
|
||||||
* title: length
|
|
||||||
* description: The inventory item's length.
|
|
||||||
* height:
|
|
||||||
* type: number
|
|
||||||
* title: height
|
|
||||||
* description: The inventory item's height.
|
|
||||||
* width:
|
|
||||||
* type: number
|
|
||||||
* title: width
|
|
||||||
* description: The inventory item's width.
|
|
||||||
* origin_country:
|
|
||||||
* type: string
|
|
||||||
* title: origin_country
|
|
||||||
* description: The inventory item's origin country.
|
|
||||||
* mid_code:
|
|
||||||
* type: string
|
|
||||||
* title: mid_code
|
|
||||||
* description: The inventory item's MID code.
|
|
||||||
* material:
|
|
||||||
* type: string
|
|
||||||
* title: material
|
|
||||||
* description: The inventory item's material.
|
|
||||||
* title:
|
|
||||||
* type: string
|
|
||||||
* title: title
|
|
||||||
* description: The inventory item's title.
|
|
||||||
* description:
|
|
||||||
* type: string
|
|
||||||
* title: description
|
|
||||||
* description: The inventory item's description.
|
|
||||||
* requires_shipping:
|
|
||||||
* type: boolean
|
|
||||||
* title: requires_shipping
|
|
||||||
* description: Whether the inventory item requires shipping.
|
|
||||||
* thumbnail:
|
|
||||||
* type: string
|
|
||||||
* title: thumbnail
|
|
||||||
* description: The URL of an image to be used as the inventory item's thumbnail. You can use the Upload API routes to upload an image and get its URL.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The inventory item's metadata. Can be custom data in key-value pairs.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-17
@@ -32,23 +32,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminCreateInventoryLocationLevel"
|
||||||
* description: The inventory level's details.
|
|
||||||
* required:
|
|
||||||
* - location_id
|
|
||||||
* properties:
|
|
||||||
* location_id:
|
|
||||||
* type: string
|
|
||||||
* title: location_id
|
|
||||||
* description: The ID of the associated location.
|
|
||||||
* stocked_quantity:
|
|
||||||
* type: number
|
|
||||||
* title: stocked_quantity
|
|
||||||
* description: The inventory level's stocked quantity.
|
|
||||||
* incoming_quantity:
|
|
||||||
* type: number
|
|
||||||
* title: incoming_quantity
|
|
||||||
* description: The inventory level's incoming quantity.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: Shell
|
* - lang: Shell
|
||||||
* label: cURL
|
* label: cURL
|
||||||
|
|||||||
+1
-11
@@ -38,17 +38,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateInventoryLocationLevel"
|
||||||
* description: The properties to update in the inventory level.
|
|
||||||
* properties:
|
|
||||||
* stocked_quantity:
|
|
||||||
* type: number
|
|
||||||
* title: stocked_quantity
|
|
||||||
* description: The inventory level's stocked quantity.
|
|
||||||
* incoming_quantity:
|
|
||||||
* type: number
|
|
||||||
* title: incoming_quantity
|
|
||||||
* description: The inventory level's incoming quantity.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -11,22 +11,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminInviteAccept"
|
||||||
* description: The details of the user to be created.
|
|
||||||
* properties:
|
|
||||||
* email:
|
|
||||||
* type: string
|
|
||||||
* title: email
|
|
||||||
* description: The user's email.
|
|
||||||
* format: email
|
|
||||||
* first_name:
|
|
||||||
* type: string
|
|
||||||
* title: first_name
|
|
||||||
* description: The user's first name.
|
|
||||||
* last_name:
|
|
||||||
* type: string
|
|
||||||
* title: last_name
|
|
||||||
* description: The user's last name.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-2
@@ -3,9 +3,8 @@
|
|||||||
* operationId: PostOrderEditsIdItemsItemItem_id
|
* operationId: PostOrderEditsIdItemsItemItem_id
|
||||||
* summary: Update Order Item Quantity of Order Edit
|
* summary: Update Order Item Quantity of Order Edit
|
||||||
* x-sidebar-summary: Update Item Quantity
|
* x-sidebar-summary: Update Item Quantity
|
||||||
* description: >
|
* description: |
|
||||||
* Update an existing order item's quantity of an order edit.
|
* Update an existing order item's quantity of an order edit.
|
||||||
*
|
|
||||||
* You can also use this API route to remove an item from an order by setting its quantity to `0`.
|
* You can also use this API route to remove an item from an order by setting its quantity to `0`.
|
||||||
* x-authenticated: true
|
* x-authenticated: true
|
||||||
* parameters:
|
* parameters:
|
||||||
|
|||||||
@@ -28,6 +28,23 @@
|
|||||||
* - cookie_auth: []
|
* - cookie_auth: []
|
||||||
* - jwt_token: []
|
* - jwt_token: []
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
|
* - lang: JavaScript
|
||||||
|
* label: JS SDK
|
||||||
|
* source: |-
|
||||||
|
* import Medusa from "@medusajs/js-sdk"
|
||||||
|
*
|
||||||
|
* export const sdk = new Medusa({
|
||||||
|
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||||
|
* debug: import.meta.env.DEV,
|
||||||
|
* auth: {
|
||||||
|
* type: "session",
|
||||||
|
* },
|
||||||
|
* })
|
||||||
|
*
|
||||||
|
* sdk.admin.order.archive("order_123")
|
||||||
|
* .then(({ order }) => {
|
||||||
|
* console.log(order)
|
||||||
|
* })
|
||||||
* - lang: Shell
|
* - lang: Shell
|
||||||
* label: cURL
|
* label: cURL
|
||||||
* source: |-
|
* source: |-
|
||||||
|
|||||||
@@ -38,6 +38,23 @@
|
|||||||
* type: object
|
* type: object
|
||||||
* description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
|
* description: Pass additional custom data to the API route. This data is passed to the underlying workflow under the `additional_data` parameter.
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
|
* - lang: JavaScript
|
||||||
|
* label: JS SDK
|
||||||
|
* source: |-
|
||||||
|
* import Medusa from "@medusajs/js-sdk"
|
||||||
|
*
|
||||||
|
* export const sdk = new Medusa({
|
||||||
|
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||||
|
* debug: import.meta.env.DEV,
|
||||||
|
* auth: {
|
||||||
|
* type: "session",
|
||||||
|
* },
|
||||||
|
* })
|
||||||
|
*
|
||||||
|
* sdk.admin.order.complete("order_123")
|
||||||
|
* .then(({ order }) => {
|
||||||
|
* console.log(order)
|
||||||
|
* })
|
||||||
* - lang: Shell
|
* - lang: Shell
|
||||||
* label: cURL
|
* label: cURL
|
||||||
* source: |-
|
* source: |-
|
||||||
|
|||||||
@@ -25,20 +25,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminCreatePaymentCollection"
|
||||||
* description: The payment collection's details.
|
|
||||||
* required:
|
|
||||||
* - order_id
|
|
||||||
* - amount
|
|
||||||
* properties:
|
|
||||||
* order_id:
|
|
||||||
* type: string
|
|
||||||
* title: order_id
|
|
||||||
* description: The ID of the associated order.
|
|
||||||
* amount:
|
|
||||||
* type: number
|
|
||||||
* title: amount
|
|
||||||
* description: The amount to be paid.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-9
@@ -32,15 +32,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminMarkPaymentCollectionPaid"
|
||||||
* description: The payment details.
|
|
||||||
* required:
|
|
||||||
* - order_id
|
|
||||||
* properties:
|
|
||||||
* order_id:
|
|
||||||
* type: string
|
|
||||||
* title: order_id
|
|
||||||
* description: The ID of the order associated with the payment collection.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,13 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminCreatePaymentCapture"
|
||||||
* description: The payment's details.
|
|
||||||
* properties:
|
|
||||||
* amount:
|
|
||||||
* type: number
|
|
||||||
* title: amount
|
|
||||||
* description: The amount to capture.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,21 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminCreatePaymentRefund"
|
||||||
* description: The refund's details.
|
|
||||||
* properties:
|
|
||||||
* amount:
|
|
||||||
* type: number
|
|
||||||
* title: amount
|
|
||||||
* description: The amount to refund.
|
|
||||||
* refund_reason_id:
|
|
||||||
* type: string
|
|
||||||
* title: refund_reason_id
|
|
||||||
* description: The ID of a refund reason.
|
|
||||||
* note:
|
|
||||||
* type: string
|
|
||||||
* title: note
|
|
||||||
* description: A note to attach to the refund.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-34
@@ -33,40 +33,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateProductCategory"
|
||||||
* description: The properties to update in the product category.
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The product category's name.
|
|
||||||
* description:
|
|
||||||
* type: string
|
|
||||||
* title: description
|
|
||||||
* description: The product category's description.
|
|
||||||
* handle:
|
|
||||||
* type: string
|
|
||||||
* title: handle
|
|
||||||
* description: The product category's handle. Must be a unique value.
|
|
||||||
* is_internal:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_internal
|
|
||||||
* description: Whether the product category is only used for internal purposes and shouldn't be shown the customer.
|
|
||||||
* is_active:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_active
|
|
||||||
* description: Whether the product category is active.
|
|
||||||
* parent_category_id:
|
|
||||||
* type: string
|
|
||||||
* title: parent_category_id
|
|
||||||
* description: The ID of a parent category.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The product category's metadata. Can hold custom key-value pairs.
|
|
||||||
* rank:
|
|
||||||
* type: number
|
|
||||||
* title: rank
|
|
||||||
* description: The product category's rank among other categories.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,16 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateProductTag"
|
||||||
* description: The properties to update in the product tag.
|
|
||||||
* properties:
|
|
||||||
* value:
|
|
||||||
* type: string
|
|
||||||
* title: value
|
|
||||||
* description: The product tag's value.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The product tag's metadata. Can hold custom key-value pairs.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,16 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateProductType"
|
||||||
* description: The properties to update in the product type.
|
|
||||||
* properties:
|
|
||||||
* value:
|
|
||||||
* type: string
|
|
||||||
* title: value
|
|
||||||
* description: The product type's value.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The product type's metadata. Can hold custom key-value pairs.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,17 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdatePaymentRefundReason"
|
||||||
* description: The properties to update in the refund reason.
|
|
||||||
* properties:
|
|
||||||
* label:
|
|
||||||
* type: string
|
|
||||||
* title: label
|
|
||||||
* description: The refund reason's label.
|
|
||||||
* description:
|
|
||||||
* type: string
|
|
||||||
* title: description
|
|
||||||
* description: The refund reason's description.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: Shell
|
* - lang: Shell
|
||||||
* label: cURL
|
* label: cURL
|
||||||
|
|||||||
@@ -31,42 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateRegion"
|
||||||
* description: The propeties to update in the region.
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The region's name.
|
|
||||||
* currency_code:
|
|
||||||
* type: string
|
|
||||||
* title: currency_code
|
|
||||||
* description: The region's currency code.
|
|
||||||
* countries:
|
|
||||||
* type: array
|
|
||||||
* description: The region's countries.
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* title: countries
|
|
||||||
* description: A country code.
|
|
||||||
* automatic_taxes:
|
|
||||||
* type: boolean
|
|
||||||
* title: automatic_taxes
|
|
||||||
* description: Whether taxes are calculated automatically for carts in the region.
|
|
||||||
* payment_providers:
|
|
||||||
* type: array
|
|
||||||
* description: The payment providers enabled in the region.
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* title: payment_providers
|
|
||||||
* description: A payment provider's ID.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The region's metadata. Can hold custom key-value pairs.
|
|
||||||
* is_tax_inclusive:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_tax_inclusive
|
|
||||||
* description: Whether the prices in the region are tax inclusive.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
@@ -31,24 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateReservation"
|
||||||
* description: The properties to update in the reservation.
|
|
||||||
* properties:
|
|
||||||
* location_id:
|
|
||||||
* type: string
|
|
||||||
* title: location_id
|
|
||||||
* description: The ID of the associated location.
|
|
||||||
* quantity:
|
|
||||||
* type: number
|
|
||||||
* title: quantity
|
|
||||||
* description: The reserved quantity.
|
|
||||||
* description:
|
|
||||||
* type: string
|
|
||||||
* title: description
|
|
||||||
* description: The reservation's description.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The reservation's metadata. Can hold custom key-value pairs.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-167
@@ -31,173 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateShippingOption"
|
||||||
* description: The properties to update in the shipping option.
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The shipping option's name.
|
|
||||||
* data:
|
|
||||||
* type: object
|
|
||||||
* description: The shipping option's data that is useful for third-party providers.
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
|
|
||||||
* price_type:
|
|
||||||
* type: string
|
|
||||||
* description: >
|
|
||||||
* The type of the shipping option's price. If `calculated`, its price is retrieved by the associated fulfillment provider during checkout. If `flat`, its price is set in the `prices`
|
|
||||||
* property.
|
|
||||||
* enum:
|
|
||||||
* - calculated
|
|
||||||
* - flat
|
|
||||||
* provider_id:
|
|
||||||
* type: string
|
|
||||||
* title: provider_id
|
|
||||||
* description: The ID of the associated fulfillment provider that is used to process the option.
|
|
||||||
* shipping_profile_id:
|
|
||||||
* type: string
|
|
||||||
* title: shipping_profile_id
|
|
||||||
* description: The ID of the shipping profile this shipping option belongs to.
|
|
||||||
* type:
|
|
||||||
* type: object
|
|
||||||
* description: The shipping option's type.
|
|
||||||
* required:
|
|
||||||
* - code
|
|
||||||
* - description
|
|
||||||
* - label
|
|
||||||
* properties:
|
|
||||||
* label:
|
|
||||||
* type: string
|
|
||||||
* title: label
|
|
||||||
* description: The type's label.
|
|
||||||
* description:
|
|
||||||
* type: string
|
|
||||||
* title: description
|
|
||||||
* description: The type's description.
|
|
||||||
* code:
|
|
||||||
* type: string
|
|
||||||
* title: code
|
|
||||||
* description: The type's code.
|
|
||||||
* prices:
|
|
||||||
* type: array
|
|
||||||
* description: The shipping option's prices. If the `price_type` is `calculated`, pass an empty array.
|
|
||||||
* items:
|
|
||||||
* oneOf:
|
|
||||||
* - type: object
|
|
||||||
* description: The shipping option's price for a currency code.
|
|
||||||
* properties:
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The ID of an existing price.
|
|
||||||
* currency_code:
|
|
||||||
* type: string
|
|
||||||
* title: currency_code
|
|
||||||
* description: The price's currency code.
|
|
||||||
* amount:
|
|
||||||
* type: number
|
|
||||||
* title: amount
|
|
||||||
* description: The price's amount.
|
|
||||||
* - type: object
|
|
||||||
* description: The shipping option's price for a region.
|
|
||||||
* properties:
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The ID of an existing price.
|
|
||||||
* region_id:
|
|
||||||
* type: string
|
|
||||||
* title: region_id
|
|
||||||
* description: The ID of the associated region.
|
|
||||||
* amount:
|
|
||||||
* type: number
|
|
||||||
* title: amount
|
|
||||||
* description: The price's amount.
|
|
||||||
* rules:
|
|
||||||
* type: array
|
|
||||||
* description: The shipping option's rules.
|
|
||||||
* items:
|
|
||||||
* oneOf:
|
|
||||||
* - type: object
|
|
||||||
* description: The details of a new shipping option rule.
|
|
||||||
* required:
|
|
||||||
* - operator
|
|
||||||
* - attribute
|
|
||||||
* - value
|
|
||||||
* properties:
|
|
||||||
* operator:
|
|
||||||
* type: string
|
|
||||||
* description: The operator used to check whether a rule applies.
|
|
||||||
* enum:
|
|
||||||
* - in
|
|
||||||
* - eq
|
|
||||||
* - ne
|
|
||||||
* - gt
|
|
||||||
* - gte
|
|
||||||
* - lt
|
|
||||||
* - lte
|
|
||||||
* - nin
|
|
||||||
* attribute:
|
|
||||||
* type: string
|
|
||||||
* title: attribute
|
|
||||||
* description: The name of a property or table that the rule applies to.
|
|
||||||
* example: customer_group
|
|
||||||
* value:
|
|
||||||
* oneOf:
|
|
||||||
* - type: string
|
|
||||||
* title: value
|
|
||||||
* description: A value of the attribute that enables this rule.
|
|
||||||
* example: cusgroup_123
|
|
||||||
* - type: array
|
|
||||||
* description: Values of the attribute that enable this rule.
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* title: value
|
|
||||||
* description: A value of the attribute that enables this rule.
|
|
||||||
* example: cusgroup_123
|
|
||||||
* - type: object
|
|
||||||
* description: Update the properties of an existing rule.
|
|
||||||
* required:
|
|
||||||
* - id
|
|
||||||
* - operator
|
|
||||||
* - attribute
|
|
||||||
* - value
|
|
||||||
* properties:
|
|
||||||
* id:
|
|
||||||
* type: string
|
|
||||||
* title: id
|
|
||||||
* description: The rule's ID.
|
|
||||||
* operator:
|
|
||||||
* type: string
|
|
||||||
* description: The operator used to check whether a rule applies.
|
|
||||||
* enum:
|
|
||||||
* - in
|
|
||||||
* - eq
|
|
||||||
* - ne
|
|
||||||
* - gt
|
|
||||||
* - gte
|
|
||||||
* - lt
|
|
||||||
* - lte
|
|
||||||
* - nin
|
|
||||||
* attribute:
|
|
||||||
* type: string
|
|
||||||
* title: attribute
|
|
||||||
* description: The name of a property or table that the rule applies to.
|
|
||||||
* example: customer_group
|
|
||||||
* value:
|
|
||||||
* oneOf:
|
|
||||||
* - type: string
|
|
||||||
* title: value
|
|
||||||
* description: A value of the attribute that enables this rule.
|
|
||||||
* example: cusgroup_123
|
|
||||||
* - type: array
|
|
||||||
* description: Values of the attribute that enable this rule.
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* title: value
|
|
||||||
* description: A value of the attribute that enables this rule.
|
|
||||||
* example: cusgroup_123
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-14
@@ -31,20 +31,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminUpdateShippingProfile"
|
||||||
* description: The properties to update in the shipping profile.
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The shipping profile's name.
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The shipping profile's type.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: The shipping profile's metadata.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-14
@@ -32,20 +32,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/AdminCreateStockLocationFulfillmentSet"
|
||||||
* description: The fulfillment set to create.
|
|
||||||
* required:
|
|
||||||
* - type
|
|
||||||
* - name
|
|
||||||
* properties:
|
|
||||||
* name:
|
|
||||||
* type: string
|
|
||||||
* title: name
|
|
||||||
* description: The fulfillment set's name.
|
|
||||||
* type:
|
|
||||||
* type: string
|
|
||||||
* title: type
|
|
||||||
* description: The fulfillment set's type.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-15
@@ -39,21 +39,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/StoreAddCartShippingMethods"
|
||||||
* description: The shipping method's details.
|
|
||||||
* required:
|
|
||||||
* - option_id
|
|
||||||
* properties:
|
|
||||||
* option_id:
|
|
||||||
* type: string
|
|
||||||
* title: option_id
|
|
||||||
* description: The ID of the shipping option this method is created from.
|
|
||||||
* data:
|
|
||||||
* type: object
|
|
||||||
* description: Any additional data relevant for the third-party fulfillment provider to process the shipment.
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping#data-request-body-parameter
|
|
||||||
* description: Learn more about the data parameter.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-62
@@ -38,68 +38,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/StoreCreateCustomerAddress"
|
||||||
* description: The address's details.
|
|
||||||
* properties:
|
|
||||||
* first_name:
|
|
||||||
* type: string
|
|
||||||
* title: first_name
|
|
||||||
* description: The customer's first name.
|
|
||||||
* last_name:
|
|
||||||
* type: string
|
|
||||||
* title: last_name
|
|
||||||
* description: The customer's last name.
|
|
||||||
* phone:
|
|
||||||
* type: string
|
|
||||||
* title: phone
|
|
||||||
* description: The customer's phone.
|
|
||||||
* company:
|
|
||||||
* type: string
|
|
||||||
* title: company
|
|
||||||
* description: The address's company.
|
|
||||||
* address_1:
|
|
||||||
* type: string
|
|
||||||
* title: address_1
|
|
||||||
* description: The address's first line.
|
|
||||||
* address_2:
|
|
||||||
* type: string
|
|
||||||
* title: address_2
|
|
||||||
* description: The address's second line.
|
|
||||||
* city:
|
|
||||||
* type: string
|
|
||||||
* title: city
|
|
||||||
* description: The address's city.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The address's country code.
|
|
||||||
* province:
|
|
||||||
* type: string
|
|
||||||
* title: province
|
|
||||||
* description: The address's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* postal_code:
|
|
||||||
* type: string
|
|
||||||
* title: postal_code
|
|
||||||
* description: The address's postal code.
|
|
||||||
* address_name:
|
|
||||||
* type: string
|
|
||||||
* title: address_name
|
|
||||||
* description: The address's name.
|
|
||||||
* is_default_shipping:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_default_shipping
|
|
||||||
* description: Whether the address is used by default for shipping during checkout.
|
|
||||||
* is_default_billing:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_default_billing
|
|
||||||
* description: Whether the address is used by default for billing during checkout.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: Holds custom key-value pairs.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+1
-62
@@ -44,68 +44,7 @@
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* type: object
|
* $ref: "#/components/schemas/StoreUpdateCustomerAddress"
|
||||||
* description: The properties to update in the address.
|
|
||||||
* properties:
|
|
||||||
* first_name:
|
|
||||||
* type: string
|
|
||||||
* title: first_name
|
|
||||||
* description: The customer's first name.
|
|
||||||
* last_name:
|
|
||||||
* type: string
|
|
||||||
* title: last_name
|
|
||||||
* description: The customer's last name.
|
|
||||||
* phone:
|
|
||||||
* type: string
|
|
||||||
* title: phone
|
|
||||||
* description: The customer's phone.
|
|
||||||
* company:
|
|
||||||
* type: string
|
|
||||||
* title: company
|
|
||||||
* description: The address's company.
|
|
||||||
* address_1:
|
|
||||||
* type: string
|
|
||||||
* title: address_1
|
|
||||||
* description: The address's first line.
|
|
||||||
* address_2:
|
|
||||||
* type: string
|
|
||||||
* title: address_2
|
|
||||||
* description: The address's second line.
|
|
||||||
* city:
|
|
||||||
* type: string
|
|
||||||
* title: city
|
|
||||||
* description: The address's city.
|
|
||||||
* country_code:
|
|
||||||
* type: string
|
|
||||||
* title: country_code
|
|
||||||
* description: The address's country code.
|
|
||||||
* province:
|
|
||||||
* type: string
|
|
||||||
* title: province
|
|
||||||
* description: The address's ISO 3166-2 province code. Must be lower-case.
|
|
||||||
* example: us-ca
|
|
||||||
* externalDocs:
|
|
||||||
* url: https://en.wikipedia.org/wiki/ISO_3166-2
|
|
||||||
* description: Learn more about ISO 3166-2
|
|
||||||
* postal_code:
|
|
||||||
* type: string
|
|
||||||
* title: postal_code
|
|
||||||
* description: The address's postal code.
|
|
||||||
* address_name:
|
|
||||||
* type: string
|
|
||||||
* title: address_name
|
|
||||||
* description: The address's name.
|
|
||||||
* is_default_shipping:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_default_shipping
|
|
||||||
* description: Whether the address is used by default for shipping during checkout.
|
|
||||||
* is_default_billing:
|
|
||||||
* type: boolean
|
|
||||||
* title: is_default_billing
|
|
||||||
* description: Whether the address is used by default for billing during checkout.
|
|
||||||
* metadata:
|
|
||||||
* type: object
|
|
||||||
* description: Holds custom key-value pairs.
|
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS SDK
|
* label: JS SDK
|
||||||
|
|||||||
+4
-6
@@ -4,14 +4,12 @@
|
|||||||
* summary: Initialize Payment Session of a Payment Collection
|
* summary: Initialize Payment Session of a Payment Collection
|
||||||
* x-sidebar-summary: Initialize Payment Session
|
* x-sidebar-summary: Initialize Payment Session
|
||||||
* description: >
|
* description: >
|
||||||
* Initialize and add a payment session to a payment collection. This is used during checkout, where you create a payment collection for the cart, then initialize a payment session for the
|
* Initialize and add a payment session to a payment collection. This is used during checkout, where you create a payment collection for the cart, then initialize a payment session for the payment
|
||||||
* payment provider that the customer chooses.
|
* provider that the customer chooses.
|
||||||
*
|
*
|
||||||
* It's highly recommended to have an amount greater than `0` in the payment collection, as some payment providers, such as Stripe, require a non-zero amount to create a payment session. Otherwise,
|
* It's highly recommended to have an amount greater than `0` in the payment collection, as some payment providers, such as Stripe, require a non-zero amount to create a payment session. Otherwise, an error will be thrown on the payment provider's side.
|
||||||
* an error will be thrown on the payment provider's side.
|
|
||||||
*
|
*
|
||||||
* In cases where you want to create a payment session for a payment collection with an amount of `0`, you can use the Manual System Payment Provider instead of third-party payment providers.
|
* In cases where you want to create a payment session for a payment collection with an amount of `0`, you can use the Manual System Payment Provider instead of third-party payment providers. The Manual System Payment Provider is built into Medusa and allows you to create payment sessions without interacting with an external payment provider.
|
||||||
* The Manual System Payment Provider is built into Medusa and allows you to create payment sessions without interacting with an external payment provider.
|
|
||||||
*
|
*
|
||||||
* Make sure to configure the Manual System Payment Provider in your store's region. Learn more in the [Manage Region](https://docs.medusajs.com/user-guide/settings/regions#edit-region-details) user guide.
|
* Make sure to configure the Manual System Payment Provider in your store's region. Learn more in the [Manage Region](https://docs.medusajs.com/user-guide/settings/regions#edit-region-details) user guide.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
|
|||||||
Loaded 100 of 126 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user