fix: build openapi (#338)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -478,6 +478,9 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
usage_limit:
|
||||||
|
type: number
|
||||||
|
description: Maximum times the discount can be used
|
||||||
metadata:
|
metadata:
|
||||||
description: >-
|
description: >-
|
||||||
An optional set of key-value pairs to hold additional
|
An optional set of key-value pairs to hold additional
|
||||||
@@ -695,6 +698,421 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
discount:
|
discount:
|
||||||
$ref: '#/components/schemas/discount'
|
$ref: '#/components/schemas/discount'
|
||||||
|
'/discounts/code/{code}':
|
||||||
|
get:
|
||||||
|
operationId: GetDiscountsDiscountCode
|
||||||
|
summary: Retrieve a Discount by code
|
||||||
|
description: Retrieves a Discount by its discount code
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: code
|
||||||
|
required: true
|
||||||
|
description: The code of the Discount
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Discount
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
discount:
|
||||||
|
$ref: '#/components/schemas/discount'
|
||||||
|
/draft-orders:
|
||||||
|
post:
|
||||||
|
operationId: PostDraftOrders
|
||||||
|
summary: Create a Draft Order
|
||||||
|
description: Creates a Draft Order
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
status:
|
||||||
|
description: The status of the draft order
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
description: The email of the customer of the draft order
|
||||||
|
type: string
|
||||||
|
billing_address:
|
||||||
|
description: The Address to be used for billing purposes.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
shipping_address:
|
||||||
|
description: The Address to be used for shipping.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
items:
|
||||||
|
description: The Line Items that have been received.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
variant_id:
|
||||||
|
description: >-
|
||||||
|
The id of the Product Variant to generate the Line
|
||||||
|
Item from.
|
||||||
|
type: string
|
||||||
|
unit_price:
|
||||||
|
description: The potential custom price of the item.
|
||||||
|
type: integer
|
||||||
|
title:
|
||||||
|
description: The potential custom title of the item.
|
||||||
|
type: string
|
||||||
|
quantity:
|
||||||
|
description: The quantity of the Line Item.
|
||||||
|
type: integer
|
||||||
|
metadata:
|
||||||
|
description: >-
|
||||||
|
The optional key-value map with additional details
|
||||||
|
about the Line Item.
|
||||||
|
type: object
|
||||||
|
region_id:
|
||||||
|
description: The id of the region for the draft order
|
||||||
|
type: string
|
||||||
|
discounts:
|
||||||
|
description: The discounts to add on the draft order
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
description: The code of the discount to apply
|
||||||
|
type: string
|
||||||
|
customer_id:
|
||||||
|
description: The id of the customer to add on the draft order
|
||||||
|
type: string
|
||||||
|
no_notification_order:
|
||||||
|
description: >-
|
||||||
|
An optional flag passed to the resulting order to determine
|
||||||
|
use of notifications.
|
||||||
|
type: boolean
|
||||||
|
shipping_methods:
|
||||||
|
description: The shipping methods for the draft order
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
option_id:
|
||||||
|
description: The id of the shipping option in use
|
||||||
|
type: string
|
||||||
|
data:
|
||||||
|
description: >-
|
||||||
|
The optional additional data needed for the shipping
|
||||||
|
method
|
||||||
|
type: object
|
||||||
|
price:
|
||||||
|
description: The potential custom price of the shipping
|
||||||
|
type: integer
|
||||||
|
metadata:
|
||||||
|
description: >-
|
||||||
|
The optional key-value map with additional details about the
|
||||||
|
Draft Order.
|
||||||
|
type: object
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
get:
|
||||||
|
operationId: GetDraftOrders
|
||||||
|
summary: List Draft Orders
|
||||||
|
description: Retrieves an list of Draft Orders
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
'/draft-orders/{id}/line-items':
|
||||||
|
post:
|
||||||
|
operationId: PostDraftOrdersDraftOrderLineItems
|
||||||
|
summary: Create a Line Item for Draft Order
|
||||||
|
description: Creates a Line Item for the Draft Order
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
variant_id:
|
||||||
|
description: >-
|
||||||
|
The id of the Product Variant to generate the Line Item
|
||||||
|
from.
|
||||||
|
type: string
|
||||||
|
unit_price:
|
||||||
|
description: The potential custom price of the item.
|
||||||
|
type: integer
|
||||||
|
title:
|
||||||
|
description: The potential custom title of the item.
|
||||||
|
type: string
|
||||||
|
quantity:
|
||||||
|
description: The quantity of the Line Item.
|
||||||
|
type: integer
|
||||||
|
metadata:
|
||||||
|
description: >-
|
||||||
|
The optional key-value map with additional details about the
|
||||||
|
Line Item.
|
||||||
|
type: object
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
'/draft-orders/{id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteDraftOrdersDraftOrder
|
||||||
|
summary: Delete a Draft Order
|
||||||
|
description: Deletes a Draft Order
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Draft Order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The id of the deleted Draft Order.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
get:
|
||||||
|
operationId: GetDraftOrdersDraftOrder
|
||||||
|
summary: Retrieve a Draft Order
|
||||||
|
description: Retrieves a Draft Order.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Draft Order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
'/draft-orders/{id}/line-items/{line_id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteDraftOrdersDraftOrderLineItemsItem
|
||||||
|
summary: Delete a Line Item
|
||||||
|
description: Removes a Line Item from a Draft Order.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Draft Order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: line_id
|
||||||
|
required: true
|
||||||
|
description: The id of the Draft Order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
post:
|
||||||
|
operationId: PostDraftOrdersDraftOrderLineItemsItem
|
||||||
|
summary: Update a Line Item for a Draft Order
|
||||||
|
description: Updates a Line Item for a Draft Order
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
unit_price:
|
||||||
|
description: The potential custom price of the item.
|
||||||
|
type: integer
|
||||||
|
title:
|
||||||
|
description: The potential custom title of the item.
|
||||||
|
type: string
|
||||||
|
quantity:
|
||||||
|
description: The quantity of the Line Item.
|
||||||
|
type: integer
|
||||||
|
metadata:
|
||||||
|
description: >-
|
||||||
|
The optional key-value map with additional details about the
|
||||||
|
Line Item.
|
||||||
|
type: object
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
'/draft-orders/{id}/register-payment':
|
||||||
|
post:
|
||||||
|
summary: Registers a payment for a Draft Order
|
||||||
|
operationId: PostDraftOrdersDraftOrderRegisterPayment
|
||||||
|
description: Registers a payment for a Draft Order.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The Draft Order id.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
'/admin/draft-orders/{id}':
|
||||||
|
post:
|
||||||
|
operationId: PostDraftOrdersDraftOrder
|
||||||
|
summary: Update a Draft Order"
|
||||||
|
description: Updates a Draft Order.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Draft Order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
region_id:
|
||||||
|
type: string
|
||||||
|
description: The id of the Region to create the Draft Order in.
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
description: An email to be used on the Draft Order.
|
||||||
|
billing_address:
|
||||||
|
description: The Address to be used for billing purposes.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
shipping_address:
|
||||||
|
description: The Address to be used for shipping.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
discounts:
|
||||||
|
description: An array of Discount codes to add to the Draft Order.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
description: The code that a Discount is identifed by.
|
||||||
|
type: string
|
||||||
|
no_notification_order:
|
||||||
|
description: >-
|
||||||
|
An optional flag passed to the resulting order to determine
|
||||||
|
use of notifications.
|
||||||
|
type: boolean
|
||||||
|
customer_id:
|
||||||
|
description: The id of the Customer to associate the Draft Order with.
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Draft Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
draft_order:
|
||||||
|
$ref: '#/components/schemas/draft-order'
|
||||||
|
/notifications:
|
||||||
|
get:
|
||||||
|
operationId: GetNotifications
|
||||||
|
summary: List Notifications
|
||||||
|
description: Retrieves a list of Notifications.
|
||||||
|
tags:
|
||||||
|
- Notification
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
notifications:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/notification'
|
||||||
|
'/notifications/{id}/resend':
|
||||||
|
post:
|
||||||
|
operationId: PostNotificationsNotificationResend
|
||||||
|
summary: Resend Notification
|
||||||
|
description: >-
|
||||||
|
Resends a previously sent notifications, with the same data but
|
||||||
|
optionally to a different address
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Notification
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Notification
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
notification:
|
||||||
|
$ref: '#/components/schemas/notification'
|
||||||
/gift-cards:
|
/gift-cards:
|
||||||
post:
|
post:
|
||||||
operationId: PostGiftCards
|
operationId: PostGiftCards
|
||||||
@@ -867,49 +1285,6 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
gift_card:
|
gift_card:
|
||||||
$ref: '#/components/schemas/gift_card'
|
$ref: '#/components/schemas/gift_card'
|
||||||
/notifications:
|
|
||||||
get:
|
|
||||||
operationId: GetNotifications
|
|
||||||
summary: List Notifications
|
|
||||||
description: Retrieves a list of Notifications.
|
|
||||||
tags:
|
|
||||||
- Notification
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
notifications:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/notification'
|
|
||||||
'/notifications/{id}/resend':
|
|
||||||
post:
|
|
||||||
operationId: PostNotificationsNotificationResend
|
|
||||||
summary: Resend Notification
|
|
||||||
description: >-
|
|
||||||
Resends a previously sent notifications, with the same data but
|
|
||||||
optionally to a different address
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The id of the Notification
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Notification
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
notification:
|
|
||||||
$ref: '#/components/schemas/notification'
|
|
||||||
'/orders/{id}/shipping-methods':
|
'/orders/{id}/shipping-methods':
|
||||||
post:
|
post:
|
||||||
operationId: PostOrdersOrderShippingMethods
|
operationId: PostOrdersOrderShippingMethods
|
||||||
@@ -1158,11 +1533,21 @@ paths:
|
|||||||
price:
|
price:
|
||||||
description: The price to charge for the Shipping Method
|
description: The price to charge for the Shipping Method
|
||||||
type: integer
|
type: integer
|
||||||
|
shipping_address:
|
||||||
|
type: object
|
||||||
|
description: >-
|
||||||
|
An optional shipping address to send the claim to. Defaults
|
||||||
|
to the parent order's shipping address
|
||||||
refund_amount:
|
refund_amount:
|
||||||
description: >-
|
description: >-
|
||||||
The amount to refund the Customer when the Claim type is
|
The amount to refund the Customer when the Claim type is
|
||||||
`refund`.
|
`refund`.
|
||||||
type: integer
|
type: integer
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Claim.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: >-
|
description: >-
|
||||||
An optional set of key-value pairs to hold additional
|
An optional set of key-value pairs to hold additional
|
||||||
@@ -1209,6 +1594,11 @@ paths:
|
|||||||
quantity:
|
quantity:
|
||||||
description: The quantity of the Line Item to fulfill.
|
description: The quantity of the Line Item to fulfill.
|
||||||
type: integer
|
type: integer
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Swap.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: >-
|
description: >-
|
||||||
An optional set of key-value pairs to hold additional
|
An optional set of key-value pairs to hold additional
|
||||||
@@ -1250,6 +1640,11 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Shipment.
|
||||||
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Order
|
- Order
|
||||||
responses:
|
responses:
|
||||||
@@ -1292,6 +1687,11 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Claim.
|
||||||
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Order
|
- Order
|
||||||
responses:
|
responses:
|
||||||
@@ -1356,6 +1756,11 @@ paths:
|
|||||||
quantity:
|
quantity:
|
||||||
description: The quantity of the Product Variant to ship.
|
description: The quantity of the Product Variant to ship.
|
||||||
type: integer
|
type: integer
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Swap.
|
||||||
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Order
|
- Order
|
||||||
responses:
|
responses:
|
||||||
@@ -1424,6 +1829,11 @@ paths:
|
|||||||
An optional set of key-value pairs to hold additional
|
An optional set of key-value pairs to hold additional
|
||||||
information.
|
information.
|
||||||
type: object
|
type: object
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Claim.
|
||||||
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Order
|
- Order
|
||||||
responses:
|
responses:
|
||||||
@@ -1463,6 +1873,11 @@ paths:
|
|||||||
An optional set of key-value pairs to hold additional
|
An optional set of key-value pairs to hold additional
|
||||||
information.
|
information.
|
||||||
type: object
|
type: object
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Claim.
|
||||||
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Order
|
- Order
|
||||||
responses:
|
responses:
|
||||||
@@ -1547,54 +1962,6 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
order:
|
order:
|
||||||
$ref: '#/components/schemas/order'
|
$ref: '#/components/schemas/order'
|
||||||
'/orders/{id}/returns/{return_id}/receive':
|
|
||||||
post:
|
|
||||||
operationId: PostOrdersOrderReturnsReturnReceive
|
|
||||||
summary: Receive a Return
|
|
||||||
description: Registers a Return as received.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The id of the Order.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: path
|
|
||||||
name: return_id
|
|
||||||
required: true
|
|
||||||
description: The id of the Return.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
items:
|
|
||||||
description: The Line Items that have been received.
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
item_id:
|
|
||||||
description: The id of the Line Item.
|
|
||||||
type: string
|
|
||||||
quantity:
|
|
||||||
description: The quantity of the Line Item.
|
|
||||||
type: integer
|
|
||||||
refund:
|
|
||||||
description: The amount to refund.
|
|
||||||
type: integer
|
|
||||||
tags:
|
|
||||||
- Order
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
order:
|
|
||||||
$ref: '#/components/schemas/order'
|
|
||||||
'/orders/{id}/swaps/{swap_id}/receive':
|
'/orders/{id}/swaps/{swap_id}/receive':
|
||||||
post:
|
post:
|
||||||
operationId: PostOrdersOrderSwapsSwapReceive
|
operationId: PostOrdersOrderSwapsSwapReceive
|
||||||
@@ -1669,6 +2036,11 @@ paths:
|
|||||||
note:
|
note:
|
||||||
description: A not with additional details about the Refund.
|
description: A not with additional details about the Refund.
|
||||||
type: string
|
type: string
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Refund.
|
||||||
|
type: boolean
|
||||||
tags:
|
tags:
|
||||||
- Order
|
- Order
|
||||||
responses:
|
responses:
|
||||||
@@ -1735,6 +2107,11 @@ paths:
|
|||||||
A flag to indicate if the Return should be registerd as
|
A flag to indicate if the Return should be registerd as
|
||||||
received immediately.
|
received immediately.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
A flag to indicate if no notifications should be emitted
|
||||||
|
related to the requested Return.
|
||||||
|
type: boolean
|
||||||
refund:
|
refund:
|
||||||
description: The amount to refund.
|
description: The amount to refund.
|
||||||
type: integer
|
type: integer
|
||||||
@@ -1826,6 +2203,11 @@ paths:
|
|||||||
price:
|
price:
|
||||||
description: The price to charge for the Shipping Method
|
description: The price to charge for the Shipping Method
|
||||||
type: integer
|
type: integer
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
If set to true no notification will be send related to this
|
||||||
|
Swap.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: >-
|
description: >-
|
||||||
An optional set of key-value pairs to hold additional
|
An optional set of key-value pairs to hold additional
|
||||||
@@ -1900,6 +2282,11 @@ paths:
|
|||||||
Purchasing Products with this flag set to `true` will result
|
Purchasing Products with this flag set to `true` will result
|
||||||
in a Gift Card being created.
|
in a Gift Card being created.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
discountable:
|
||||||
|
description: >-
|
||||||
|
A flag to indicate if discounts can be applied to the
|
||||||
|
LineItems generated from this Product
|
||||||
|
type: boolean
|
||||||
images:
|
images:
|
||||||
description: Images of the Product.
|
description: Images of the Product.
|
||||||
type: array
|
type: array
|
||||||
@@ -2400,6 +2787,11 @@ paths:
|
|||||||
Purchasing Products with this flag set to `true` will result
|
Purchasing Products with this flag set to `true` will result
|
||||||
in a Gift Card being created.
|
in a Gift Card being created.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
discountable:
|
||||||
|
description: >-
|
||||||
|
A flag to indicate if discounts can be applied to the
|
||||||
|
LineItems generated from this Product
|
||||||
|
type: boolean
|
||||||
images:
|
images:
|
||||||
description: Images of the Product.
|
description: Images of the Product.
|
||||||
type: array
|
type: array
|
||||||
@@ -3297,6 +3689,50 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/return'
|
$ref: '#/components/schemas/return'
|
||||||
|
'/returns/{id}receive':
|
||||||
|
post:
|
||||||
|
operationId: PostReturnsReturnReceive
|
||||||
|
summary: Receive a Return
|
||||||
|
description: >-
|
||||||
|
Registers a Return as received. Updates statuses on Orders and Swaps
|
||||||
|
accordingly.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Return.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
items:
|
||||||
|
description: The Line Items that have been received.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
item_id:
|
||||||
|
description: The id of the Line Item.
|
||||||
|
type: string
|
||||||
|
quantity:
|
||||||
|
description: The quantity of the Line Item.
|
||||||
|
type: integer
|
||||||
|
refund:
|
||||||
|
description: The amount to refund.
|
||||||
|
type: integer
|
||||||
|
tags:
|
||||||
|
- Return
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
return:
|
||||||
|
$ref: '#/components/schemas/return'
|
||||||
/shipping-options:
|
/shipping-options:
|
||||||
post:
|
post:
|
||||||
operationId: PostShippingOptions
|
operationId: PostShippingOptions
|
||||||
@@ -3718,6 +4154,29 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/store'
|
$ref: '#/components/schemas/store'
|
||||||
|
'/swaps/{id}':
|
||||||
|
get:
|
||||||
|
operationId: GetSwapsSwap
|
||||||
|
summary: Retrieve a Swap
|
||||||
|
description: Retrieves a Swap.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Swap.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Swap
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
swap:
|
||||||
|
$ref: '#/components/schemas/swap'
|
||||||
/swaps:
|
/swaps:
|
||||||
get:
|
get:
|
||||||
operationId: GetSwaps
|
operationId: GetSwaps
|
||||||
@@ -4020,6 +4479,11 @@ components:
|
|||||||
deleted_at:
|
deleted_at:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
Flag for describing whether or not notifications related to this
|
||||||
|
should be send.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
claim_tag:
|
claim_tag:
|
||||||
@@ -4167,9 +4631,6 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product'
|
$ref: '#/components/schemas/product'
|
||||||
usage_limit:
|
|
||||||
description: The maximum number of times that a discount can be used.
|
|
||||||
type: integer
|
|
||||||
created_at:
|
created_at:
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
type: string
|
type: string
|
||||||
@@ -4232,6 +4693,12 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/region'
|
$ref: '#/components/schemas/region'
|
||||||
|
usage_limit:
|
||||||
|
description: The maximum number of times that a discount can be used.
|
||||||
|
type: integer
|
||||||
|
usage_count:
|
||||||
|
description: The number of times a discount has been used.
|
||||||
|
type: integer
|
||||||
created_at:
|
created_at:
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
type: string
|
type: string
|
||||||
@@ -4247,6 +4714,51 @@ components:
|
|||||||
metadata:
|
metadata:
|
||||||
description: An optional key-value map with additional information.
|
description: An optional key-value map with additional information.
|
||||||
type: object
|
type: object
|
||||||
|
draft-order:
|
||||||
|
title: DraftOrder
|
||||||
|
description: Represents a draft order
|
||||||
|
x-resourceId: draft-order
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- open
|
||||||
|
- completed
|
||||||
|
display_id:
|
||||||
|
type: string
|
||||||
|
cart_id:
|
||||||
|
type: string
|
||||||
|
cart:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/cart'
|
||||||
|
order_id:
|
||||||
|
type: string
|
||||||
|
order:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/order'
|
||||||
|
canceled_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
update_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
deleted_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
completed_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
no_notification_order:
|
||||||
|
type: boolean
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
idempotency_key:
|
||||||
|
type: string
|
||||||
fulfillment_item:
|
fulfillment_item:
|
||||||
title: Fulfillment Item
|
title: Fulfillment Item
|
||||||
description: >-
|
description: >-
|
||||||
@@ -4339,6 +4851,11 @@ components:
|
|||||||
description: The date with timezone at which the Fulfillment was shipped.
|
description: The date with timezone at which the Fulfillment was shipped.
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
Flag for describing whether or not notifications related to this
|
||||||
|
should be send.
|
||||||
|
type: boolean
|
||||||
canceled_at:
|
canceled_at:
|
||||||
description: The date with timezone at which the Fulfillment was canceled.
|
description: The date with timezone at which the Fulfillment was canceled.
|
||||||
type: string
|
type: string
|
||||||
@@ -4865,6 +5382,13 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
gift_card_total:
|
gift_card_total:
|
||||||
type: integer
|
type: integer
|
||||||
|
paid_total:
|
||||||
|
type: integer
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
Flag for describing whether or not notifications related to this
|
||||||
|
should be send.
|
||||||
|
type: boolean
|
||||||
payment_provider:
|
payment_provider:
|
||||||
title: Payment Provider
|
title: Payment Provider
|
||||||
description: Represents a Payment Provider plugin and holds its installation status.
|
description: Represents a Payment Provider plugin and holds its installation status.
|
||||||
@@ -5331,6 +5855,11 @@ components:
|
|||||||
Gift Cards will automatically generate a redeemable Gift Card code
|
Gift Cards will automatically generate a redeemable Gift Card code
|
||||||
once they are purchased.
|
once they are purchased.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
discountable:
|
||||||
|
description: >-
|
||||||
|
Whether the Product can be discounted. Discounts will not apply to
|
||||||
|
Line Items of this Product when this flag is set to `false`.
|
||||||
|
type: boolean
|
||||||
images:
|
images:
|
||||||
description: Images of the Product
|
description: Images of the Product
|
||||||
type: array
|
type: array
|
||||||
@@ -5670,6 +6199,11 @@ components:
|
|||||||
description: The date with timezone at which the resource was last updated.
|
description: The date with timezone at which the resource was last updated.
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
When set to true, no notification will be sent related to this
|
||||||
|
return.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: An optional key-value map with additional information.
|
description: An optional key-value map with additional information.
|
||||||
type: object
|
type: object
|
||||||
@@ -6030,6 +6564,9 @@ components:
|
|||||||
description: The date with timezone at which the resource was last updated.
|
description: The date with timezone at which the resource was last updated.
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: 'If set to true, no notification will be sent related to this swap'
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: An optional key-value map with additional information.
|
description: An optional key-value map with additional information.
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -40,87 +40,6 @@ tags:
|
|||||||
servers:
|
servers:
|
||||||
- url: 'https://api.medusa-commerce.com/store'
|
- url: 'https://api.medusa-commerce.com/store'
|
||||||
paths:
|
paths:
|
||||||
/auth:
|
|
||||||
post:
|
|
||||||
operationId: PostAuth
|
|
||||||
summary: Authenticate Customer
|
|
||||||
description: >-
|
|
||||||
Logs a Customer in and authorizes them to view their details. Successful
|
|
||||||
authentication will set a session cookie in the Customer's browser.
|
|
||||||
parameters: []
|
|
||||||
tags:
|
|
||||||
- Auth
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- email
|
|
||||||
- password
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
type: string
|
|
||||||
description: The Customer's email.
|
|
||||||
password:
|
|
||||||
type: string
|
|
||||||
description: The Customer's password.
|
|
||||||
delete:
|
|
||||||
operationId: DeleteAuth
|
|
||||||
summary: Log out
|
|
||||||
description: Destroys a Customer's authenticated session.
|
|
||||||
tags:
|
|
||||||
- Auth
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
get:
|
|
||||||
operationId: GetAuth
|
|
||||||
summary: Get Session
|
|
||||||
description: Gets the currently logged in Customer.
|
|
||||||
tags:
|
|
||||||
- Auth
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
'/auth/{email}':
|
|
||||||
get:
|
|
||||||
operationId: GetAuthEmail
|
|
||||||
summary: Check if email has account
|
|
||||||
description: Checks if a Customer with the given email has signed up.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: email
|
|
||||||
required: true
|
|
||||||
description: The Customer's email.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Auth
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
exists:
|
|
||||||
type: boolean
|
|
||||||
'/carts/{id}/shipping-methods':
|
'/carts/{id}/shipping-methods':
|
||||||
post:
|
post:
|
||||||
operationId: PostCartsCartShippingMethod
|
operationId: PostCartsCartShippingMethod
|
||||||
@@ -162,7 +81,7 @@ paths:
|
|||||||
process the fulfillment of the order. Look at the
|
process the fulfillment of the order. Look at the
|
||||||
documentation for your installed fulfillment providers to
|
documentation for your installed fulfillment providers to
|
||||||
find out what to send.
|
find out what to send.
|
||||||
'/carts/{id}/complete-cart':
|
'/carts/{id}/complete':
|
||||||
post:
|
post:
|
||||||
summary: Complete a Cart
|
summary: Complete a Cart
|
||||||
operationId: PostCartsCartComplete
|
operationId: PostCartsCartComplete
|
||||||
@@ -457,11 +376,9 @@ paths:
|
|||||||
cart:
|
cart:
|
||||||
$ref: '#/components/schemas/cart'
|
$ref: '#/components/schemas/cart'
|
||||||
post:
|
post:
|
||||||
operationId: PostCartsCartPaymentSessionsSession
|
operationId: PostCartsCartPaymentSessionUpdate
|
||||||
summary: Refresh a Payment Session
|
summary: Update a Payment Session
|
||||||
description: >-
|
description: Updates a Payment Session with additional data.
|
||||||
Refreshes a Payment Session to ensure that it is in sync with the Cart -
|
|
||||||
this is usually not necessary.
|
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: id
|
name: id
|
||||||
@@ -472,9 +389,7 @@ paths:
|
|||||||
- in: path
|
- in: path
|
||||||
name: provider_id
|
name: provider_id
|
||||||
required: true
|
required: true
|
||||||
description: >-
|
description: The id of the payment provider.
|
||||||
The id of the Payment Provider that created the Payment Session to
|
|
||||||
be refreshed.
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
tags:
|
tags:
|
||||||
@@ -488,6 +403,23 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
cart:
|
cart:
|
||||||
$ref: '#/components/schemas/cart'
|
$ref: '#/components/schemas/cart'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- provider_id
|
||||||
|
- data
|
||||||
|
properties:
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
description: >-
|
||||||
|
The id of the Payment Provider responsible for the Payment
|
||||||
|
Session to update.
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
description: The data to update the payment session with.
|
||||||
'/carts/{id}':
|
'/carts/{id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetCartsCart
|
operationId: GetCartsCart
|
||||||
@@ -614,46 +546,6 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
cart:
|
cart:
|
||||||
$ref: '#/components/schemas/cart'
|
$ref: '#/components/schemas/cart'
|
||||||
'/carts/{id}/payment-session/update':
|
|
||||||
post:
|
|
||||||
operationId: PostCartsCartPaymentSessionUpdate
|
|
||||||
summary: Update a Payment Session
|
|
||||||
description: Updates a Payment Session with additional data.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The id of the Cart.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Cart
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
cart:
|
|
||||||
$ref: '#/components/schemas/cart'
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
required:
|
|
||||||
- provider_id
|
|
||||||
- data
|
|
||||||
properties:
|
|
||||||
provider_id:
|
|
||||||
type: string
|
|
||||||
description: >-
|
|
||||||
The id of the Payment Provider responsible for the Payment
|
|
||||||
Session to update.
|
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
description: The data to update the payment session with.
|
|
||||||
'/customers/{id}/addresses':
|
'/customers/{id}/addresses':
|
||||||
post:
|
post:
|
||||||
operationId: PostCustomersCustomerAddresses
|
operationId: PostCustomersCustomerAddresses
|
||||||
@@ -842,12 +734,19 @@ paths:
|
|||||||
last_name:
|
last_name:
|
||||||
description: The Customer's last name.
|
description: The Customer's last name.
|
||||||
type: string
|
type: string
|
||||||
|
billing_address:
|
||||||
|
description: The Address to be used for billing purposes.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
password:
|
password:
|
||||||
description: The Customer's password.
|
description: The Customer's password.
|
||||||
type: string
|
type: string
|
||||||
phone:
|
phone:
|
||||||
description: The Customer's phone number.
|
description: The Customer's phone number.
|
||||||
type: string
|
type: string
|
||||||
|
metadata:
|
||||||
|
description: Metadata about the customer.
|
||||||
|
type: object
|
||||||
tags:
|
tags:
|
||||||
- Customer
|
- Customer
|
||||||
responses:
|
responses:
|
||||||
@@ -986,6 +885,87 @@ paths:
|
|||||||
password:
|
password:
|
||||||
type: string
|
type: string
|
||||||
description: The new password to set for the Customer.
|
description: The new password to set for the Customer.
|
||||||
|
/auth:
|
||||||
|
post:
|
||||||
|
operationId: PostAuth
|
||||||
|
summary: Authenticate Customer
|
||||||
|
description: >-
|
||||||
|
Logs a Customer in and authorizes them to view their details. Successful
|
||||||
|
authentication will set a session cookie in the Customer's browser.
|
||||||
|
parameters: []
|
||||||
|
tags:
|
||||||
|
- Auth
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- email
|
||||||
|
- password
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
description: The Customer's email.
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
description: The Customer's password.
|
||||||
|
delete:
|
||||||
|
operationId: DeleteAuth
|
||||||
|
summary: Log out
|
||||||
|
description: Destroys a Customer's authenticated session.
|
||||||
|
tags:
|
||||||
|
- Auth
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
get:
|
||||||
|
operationId: GetAuth
|
||||||
|
summary: Get Session
|
||||||
|
description: Gets the currently logged in Customer.
|
||||||
|
tags:
|
||||||
|
- Auth
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
'/auth/{email}':
|
||||||
|
get:
|
||||||
|
operationId: GetAuthEmail
|
||||||
|
summary: Check if email has account
|
||||||
|
description: Checks if a Customer with the given email has signed up.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: email
|
||||||
|
required: true
|
||||||
|
description: The Customer's email.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Auth
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
exists:
|
||||||
|
type: boolean
|
||||||
'/gift-cards/{code}':
|
'/gift-cards/{code}':
|
||||||
get:
|
get:
|
||||||
operationId: GetGiftCardsCode
|
operationId: GetGiftCardsCode
|
||||||
@@ -1147,47 +1127,6 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product'
|
$ref: '#/components/schemas/product'
|
||||||
'/return-reasons/{id}':
|
|
||||||
get:
|
|
||||||
operationId: GetReturnReasonsReason
|
|
||||||
summary: Retrieve a Return Reason
|
|
||||||
description: Retrieves a Return Reason.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The id of the Return Reason.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Return Reason
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
return_reason:
|
|
||||||
$ref: '#/components/schemas/return_reason'
|
|
||||||
/return-reasons:
|
|
||||||
get:
|
|
||||||
operationId: GetReturnReasons
|
|
||||||
summary: List Return Reasons
|
|
||||||
description: Retrieves a list of Return Reasons.
|
|
||||||
tags:
|
|
||||||
- Return Reason
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
return_reasons:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/return_reason'
|
|
||||||
'/regions/{id}':
|
'/regions/{id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetRegionsRegion
|
operationId: GetRegionsRegion
|
||||||
@@ -1238,6 +1177,47 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/region'
|
$ref: '#/components/schemas/region'
|
||||||
|
'/return-reasons/{id}':
|
||||||
|
get:
|
||||||
|
operationId: GetReturnReasonsReason
|
||||||
|
summary: Retrieve a Return Reason
|
||||||
|
description: Retrieves a Return Reason.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Return Reason.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Return Reason
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
return_reason:
|
||||||
|
$ref: '#/components/schemas/return_reason'
|
||||||
|
/return-reasons:
|
||||||
|
get:
|
||||||
|
operationId: GetReturnReasons
|
||||||
|
summary: List Return Reasons
|
||||||
|
description: Retrieves a list of Return Reasons.
|
||||||
|
tags:
|
||||||
|
- Return Reason
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
return_reasons:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/return_reason'
|
||||||
/returns:
|
/returns:
|
||||||
post:
|
post:
|
||||||
operationId: PostReturns
|
operationId: PostReturns
|
||||||
@@ -1682,6 +1662,11 @@ components:
|
|||||||
deleted_at:
|
deleted_at:
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
Flag for describing whether or not notifications related to this
|
||||||
|
should be send.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
claim_tag:
|
claim_tag:
|
||||||
@@ -1829,9 +1814,6 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product'
|
$ref: '#/components/schemas/product'
|
||||||
usage_limit:
|
|
||||||
description: The maximum number of times that a discount can be used.
|
|
||||||
type: integer
|
|
||||||
created_at:
|
created_at:
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
type: string
|
type: string
|
||||||
@@ -1894,6 +1876,12 @@ components:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/region'
|
$ref: '#/components/schemas/region'
|
||||||
|
usage_limit:
|
||||||
|
description: The maximum number of times that a discount can be used.
|
||||||
|
type: integer
|
||||||
|
usage_count:
|
||||||
|
description: The number of times a discount has been used.
|
||||||
|
type: integer
|
||||||
created_at:
|
created_at:
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
type: string
|
type: string
|
||||||
@@ -1909,6 +1897,51 @@ components:
|
|||||||
metadata:
|
metadata:
|
||||||
description: An optional key-value map with additional information.
|
description: An optional key-value map with additional information.
|
||||||
type: object
|
type: object
|
||||||
|
draft-order:
|
||||||
|
title: DraftOrder
|
||||||
|
description: Represents a draft order
|
||||||
|
x-resourceId: draft-order
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- open
|
||||||
|
- completed
|
||||||
|
display_id:
|
||||||
|
type: string
|
||||||
|
cart_id:
|
||||||
|
type: string
|
||||||
|
cart:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/cart'
|
||||||
|
order_id:
|
||||||
|
type: string
|
||||||
|
order:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/order'
|
||||||
|
canceled_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
created_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
update_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
deleted_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
completed_at:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
no_notification_order:
|
||||||
|
type: boolean
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
idempotency_key:
|
||||||
|
type: string
|
||||||
fulfillment_item:
|
fulfillment_item:
|
||||||
title: Fulfillment Item
|
title: Fulfillment Item
|
||||||
description: >-
|
description: >-
|
||||||
@@ -2001,6 +2034,11 @@ components:
|
|||||||
description: The date with timezone at which the Fulfillment was shipped.
|
description: The date with timezone at which the Fulfillment was shipped.
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
Flag for describing whether or not notifications related to this
|
||||||
|
should be send.
|
||||||
|
type: boolean
|
||||||
canceled_at:
|
canceled_at:
|
||||||
description: The date with timezone at which the Fulfillment was canceled.
|
description: The date with timezone at which the Fulfillment was canceled.
|
||||||
type: string
|
type: string
|
||||||
@@ -2527,6 +2565,13 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
gift_card_total:
|
gift_card_total:
|
||||||
type: integer
|
type: integer
|
||||||
|
paid_total:
|
||||||
|
type: integer
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
Flag for describing whether or not notifications related to this
|
||||||
|
should be send.
|
||||||
|
type: boolean
|
||||||
payment_provider:
|
payment_provider:
|
||||||
title: Payment Provider
|
title: Payment Provider
|
||||||
description: Represents a Payment Provider plugin and holds its installation status.
|
description: Represents a Payment Provider plugin and holds its installation status.
|
||||||
@@ -2993,6 +3038,11 @@ components:
|
|||||||
Gift Cards will automatically generate a redeemable Gift Card code
|
Gift Cards will automatically generate a redeemable Gift Card code
|
||||||
once they are purchased.
|
once they are purchased.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
discountable:
|
||||||
|
description: >-
|
||||||
|
Whether the Product can be discounted. Discounts will not apply to
|
||||||
|
Line Items of this Product when this flag is set to `false`.
|
||||||
|
type: boolean
|
||||||
images:
|
images:
|
||||||
description: Images of the Product
|
description: Images of the Product
|
||||||
type: array
|
type: array
|
||||||
@@ -3332,6 +3382,11 @@ components:
|
|||||||
description: The date with timezone at which the resource was last updated.
|
description: The date with timezone at which the resource was last updated.
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: >-
|
||||||
|
When set to true, no notification will be sent related to this
|
||||||
|
return.
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: An optional key-value map with additional information.
|
description: An optional key-value map with additional information.
|
||||||
type: object
|
type: object
|
||||||
@@ -3692,6 +3747,9 @@ components:
|
|||||||
description: The date with timezone at which the resource was last updated.
|
description: The date with timezone at which the resource was last updated.
|
||||||
type: string
|
type: string
|
||||||
format: date-time
|
format: date-time
|
||||||
|
no_notification:
|
||||||
|
description: 'If set to true, no notification will be sent related to this swap'
|
||||||
|
type: boolean
|
||||||
metadata:
|
metadata:
|
||||||
description: An optional key-value map with additional information.
|
description: An optional key-value map with additional information.
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { defaultFields, defaultRelations } from "./"
|
import { defaultFields, defaultRelations } from "./"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [get] /discounts/code/{id}
|
* @oas [get] /discounts/code/{code}
|
||||||
* operationId: "GetDiscountsDiscountCode"
|
* operationId: "GetDiscountsDiscountCode"
|
||||||
* summary: "Retrieve a Discount by code"
|
* summary: "Retrieve a Discount by code"
|
||||||
* description: "Retrieves a Discount by its discount code"
|
* description: "Retrieves a Discount by its discount code"
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ export class Product {
|
|||||||
* description: "Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased."
|
* description: "Whether the Product represents a Gift Card. Products that represent Gift Cards will automatically generate a redeemable Gift Card code once they are purchased."
|
||||||
* type: boolean
|
* type: boolean
|
||||||
* discountable:
|
* discountable:
|
||||||
* description: "Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`.
|
* description: "Whether the Product can be discounted. Discounts will not apply to Line Items of this Product when this flag is set to `false`."
|
||||||
* type: boolean
|
* type: boolean
|
||||||
* images:
|
* images:
|
||||||
* description: "Images of the Product"
|
* description: "Images of the Product"
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ swaggerInline(
|
|||||||
const oas = new OAS(gen);
|
const oas = new OAS(gen);
|
||||||
oas.validate((err, genObj) => {
|
oas.validate((err, genObj) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
console.log("Error in store");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -41,6 +42,7 @@ swaggerInline(
|
|||||||
const oas = new OAS(gen);
|
const oas = new OAS(gen);
|
||||||
oas.validate((err, genObj) => {
|
oas.validate((err, genObj) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
console.log("Error in admin");
|
||||||
console.error(err);
|
console.error(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user