docs: Change :id to {id} in OAS comments (#2015)
This commit is contained in:
1 parent
1c6fcb2ede
commit
cef081d2f2
21 files changed
+3163
-2970
No files matched your search
+1023
-944
File diff suppressed because it is too large.
Load diff
+285
-232
@@ -109,6 +109,60 @@ tags:
|
|||||||
servers:
|
servers:
|
||||||
- url: 'https://api.medusa-commerce.com/admin'
|
- url: 'https://api.medusa-commerce.com/admin'
|
||||||
paths:
|
paths:
|
||||||
|
/apps/authorizations:
|
||||||
|
post:
|
||||||
|
operationId: PostApps
|
||||||
|
summary: Generates a token for an application.
|
||||||
|
description: Generates a token for an application.
|
||||||
|
x-authenticated: true
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- application_name
|
||||||
|
- state
|
||||||
|
- code
|
||||||
|
properties:
|
||||||
|
application_name:
|
||||||
|
type: string
|
||||||
|
description: Name of the application for the token to be generated for.
|
||||||
|
state:
|
||||||
|
type: string
|
||||||
|
description: State of the application.
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code for the generated token.
|
||||||
|
tags:
|
||||||
|
- App
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
apps:
|
||||||
|
$ref: '#/components/schemas/OAuth'
|
||||||
|
/apps:
|
||||||
|
get:
|
||||||
|
operationId: GetApps
|
||||||
|
summary: List applications
|
||||||
|
description: Retrieve a list of applications.
|
||||||
|
x-authenticated: true
|
||||||
|
tags:
|
||||||
|
- App
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
apps:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/OAuth'
|
||||||
/auth:
|
/auth:
|
||||||
post:
|
post:
|
||||||
operationId: PostAuth
|
operationId: PostAuth
|
||||||
@@ -1297,209 +1351,6 @@ paths:
|
|||||||
limit:
|
limit:
|
||||||
type: integer
|
type: integer
|
||||||
description: The number of items per page
|
description: The number of items per page
|
||||||
/customers:
|
|
||||||
post:
|
|
||||||
operationId: PostCustomers
|
|
||||||
summary: Create a Customer
|
|
||||||
description: Creates a Customer.
|
|
||||||
x-authenticated: true
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
required:
|
|
||||||
- email
|
|
||||||
- first_name
|
|
||||||
- last_name
|
|
||||||
- password
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
type: string
|
|
||||||
description: The customer's email.
|
|
||||||
format: email
|
|
||||||
first_name:
|
|
||||||
type: string
|
|
||||||
description: The customer's first name.
|
|
||||||
last_name:
|
|
||||||
type: string
|
|
||||||
description: The customer's last name.
|
|
||||||
password:
|
|
||||||
type: string
|
|
||||||
description: The customer's password.
|
|
||||||
format: password
|
|
||||||
phone:
|
|
||||||
type: string
|
|
||||||
description: The customer's phone number.
|
|
||||||
metadata:
|
|
||||||
description: >-
|
|
||||||
An optional set of key-value pairs to hold additional
|
|
||||||
information.
|
|
||||||
type: object
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'201':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
get:
|
|
||||||
operationId: GetCustomers
|
|
||||||
summary: List Customers
|
|
||||||
description: Retrieves a list of Customers.
|
|
||||||
x-authenticated: true
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: limit
|
|
||||||
description: The number of items to return.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
default: 50
|
|
||||||
- in: query
|
|
||||||
name: offset
|
|
||||||
description: The items to skip before result.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
default: 0
|
|
||||||
- in: query
|
|
||||||
name: expand
|
|
||||||
description: (Comma separated) Which fields should be expanded in each customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: q
|
|
||||||
description: 'a search term to search email, first_name, and last_name.'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customers:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
count:
|
|
||||||
type: integer
|
|
||||||
description: The total number of items available
|
|
||||||
offset:
|
|
||||||
type: integer
|
|
||||||
description: The number of items skipped before these items
|
|
||||||
limit:
|
|
||||||
type: integer
|
|
||||||
description: The number of items per page
|
|
||||||
'/customers/{id}':
|
|
||||||
get:
|
|
||||||
operationId: GetCustomersCustomer
|
|
||||||
summary: Retrieve a Customer
|
|
||||||
description: Retrieves a Customer.
|
|
||||||
x-authenticated: true
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The ID of the Customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: expand
|
|
||||||
description: (Comma separated) Which fields should be expanded in the customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: fields
|
|
||||||
description: (Comma separated) Which fields should be included in the customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
post:
|
|
||||||
operationId: PostCustomersCustomer
|
|
||||||
summary: Update a Customer
|
|
||||||
description: Updates a Customer.
|
|
||||||
x-authenticated: true
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The ID of the Customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: expand
|
|
||||||
description: (Comma separated) Which fields should be expanded in each customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: fields
|
|
||||||
description: (Comma separated) Which fields should be retrieved in each customer.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
type: string
|
|
||||||
description: The Customer's email.
|
|
||||||
format: email
|
|
||||||
first_name:
|
|
||||||
type: string
|
|
||||||
description: The Customer's first name.
|
|
||||||
last_name:
|
|
||||||
type: string
|
|
||||||
description: The Customer's last name.
|
|
||||||
phone:
|
|
||||||
type: string
|
|
||||||
description: The Customer's phone number.
|
|
||||||
password:
|
|
||||||
type: string
|
|
||||||
description: The Customer's password.
|
|
||||||
format: password
|
|
||||||
groups:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
required:
|
|
||||||
- id
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
description: The ID of a customer group
|
|
||||||
type: string
|
|
||||||
description: A list of customer groups to which the customer belongs.
|
|
||||||
metadata:
|
|
||||||
description: >-
|
|
||||||
An optional set of key-value pairs to hold additional
|
|
||||||
information.
|
|
||||||
type: object
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
'/discounts/{id}/regions/{region_id}':
|
'/discounts/{id}/regions/{region_id}':
|
||||||
post:
|
post:
|
||||||
operationId: PostDiscountsDiscountRegionsRegion
|
operationId: PostDiscountsDiscountRegionsRegion
|
||||||
@@ -2414,49 +2265,85 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
discount:
|
discount:
|
||||||
$ref: '#/components/schemas/discount'
|
$ref: '#/components/schemas/discount'
|
||||||
/apps/authorizations:
|
/customers:
|
||||||
post:
|
post:
|
||||||
operationId: PostApps
|
operationId: PostCustomers
|
||||||
summary: Generates a token for an application.
|
summary: Create a Customer
|
||||||
description: Generates a token for an application.
|
description: Creates a Customer.
|
||||||
x-authenticated: true
|
x-authenticated: true
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
required:
|
required:
|
||||||
- application_name
|
- email
|
||||||
- state
|
- first_name
|
||||||
- code
|
- last_name
|
||||||
|
- password
|
||||||
properties:
|
properties:
|
||||||
application_name:
|
email:
|
||||||
type: string
|
type: string
|
||||||
description: Name of the application for the token to be generated for.
|
description: The customer's email.
|
||||||
state:
|
format: email
|
||||||
|
first_name:
|
||||||
type: string
|
type: string
|
||||||
description: State of the application.
|
description: The customer's first name.
|
||||||
code:
|
last_name:
|
||||||
type: string
|
type: string
|
||||||
description: The code for the generated token.
|
description: The customer's last name.
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
description: The customer's password.
|
||||||
|
format: password
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: The customer's phone number.
|
||||||
|
metadata:
|
||||||
|
description: >-
|
||||||
|
An optional set of key-value pairs to hold additional
|
||||||
|
information.
|
||||||
|
type: object
|
||||||
tags:
|
tags:
|
||||||
- App
|
- Customer
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'201':
|
||||||
description: OK
|
description: OK
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
apps:
|
customer:
|
||||||
$ref: '#/components/schemas/OAuth'
|
$ref: '#/components/schemas/customer'
|
||||||
/apps:
|
|
||||||
get:
|
get:
|
||||||
operationId: GetApps
|
operationId: GetCustomers
|
||||||
summary: List applications
|
summary: List Customers
|
||||||
description: Retrieve a list of applications.
|
description: Retrieves a list of Customers.
|
||||||
x-authenticated: true
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: limit
|
||||||
|
description: The number of items to return.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 50
|
||||||
|
- in: query
|
||||||
|
name: offset
|
||||||
|
description: The items to skip before result.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
- in: query
|
||||||
|
name: expand
|
||||||
|
description: (Comma separated) Which fields should be expanded in each customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: q
|
||||||
|
description: 'a search term to search email, first_name, and last_name.'
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
tags:
|
tags:
|
||||||
- App
|
- Customer
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -2464,10 +2351,123 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
apps:
|
customers:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/OAuth'
|
$ref: '#/components/schemas/customer'
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
description: The total number of items available
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
description: The number of items skipped before these items
|
||||||
|
limit:
|
||||||
|
type: integer
|
||||||
|
description: The number of items per page
|
||||||
|
'/customers/{id}':
|
||||||
|
get:
|
||||||
|
operationId: GetCustomersCustomer
|
||||||
|
summary: Retrieve a Customer
|
||||||
|
description: Retrieves a Customer.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: expand
|
||||||
|
description: (Comma separated) Which fields should be expanded in the customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: fields
|
||||||
|
description: (Comma separated) Which fields should be included in the customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
post:
|
||||||
|
operationId: PostCustomersCustomer
|
||||||
|
summary: Update a Customer
|
||||||
|
description: Updates a Customer.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: expand
|
||||||
|
description: (Comma separated) Which fields should be expanded in each customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: fields
|
||||||
|
description: (Comma separated) Which fields should be retrieved in each customer.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
type: string
|
||||||
|
description: The Customer's email.
|
||||||
|
format: email
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: The Customer's first name.
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: The Customer's last name.
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: The Customer's phone number.
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
description: The Customer's password.
|
||||||
|
format: password
|
||||||
|
groups:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
description: The ID of a customer group
|
||||||
|
type: string
|
||||||
|
description: A list of customer groups to which the customer belongs.
|
||||||
|
metadata:
|
||||||
|
description: >-
|
||||||
|
An optional set of key-value pairs to hold additional
|
||||||
|
information.
|
||||||
|
type: object
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
/draft-orders:
|
/draft-orders:
|
||||||
post:
|
post:
|
||||||
operationId: PostDraftOrders
|
operationId: PostDraftOrders
|
||||||
@@ -5657,13 +5657,19 @@ paths:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Whether or not the items were deleted.
|
description: Whether or not the items were deleted.
|
||||||
default: true
|
default: true
|
||||||
'/price-lists/:id/products':
|
'/price-lists/{id}/products':
|
||||||
get:
|
get:
|
||||||
operationId: GetPriceListsPriceListProducts
|
operationId: GetPriceListsPriceListProducts
|
||||||
summary: List Product in a Price List
|
summary: List Product in a Price List
|
||||||
description: Retrieves a list of Product that are part of a Price List
|
description: Retrieves a list of Product that are part of a Price List
|
||||||
x-authenticated: true
|
x-authenticated: true
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the price list.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: q
|
name: q
|
||||||
description: >-
|
description: >-
|
||||||
@@ -9170,12 +9176,18 @@ paths:
|
|||||||
limit:
|
limit:
|
||||||
type: integer
|
type: integer
|
||||||
description: The number of items per page
|
description: The number of items per page
|
||||||
'/tax-rates/:id/product-types/batch':
|
'/tax-rates/{id}/product-types/batch':
|
||||||
post:
|
post:
|
||||||
operationId: PostTaxRatesTaxRateProductTypes
|
operationId: PostTaxRatesTaxRateProductTypes
|
||||||
summary: Add Tax Rate to Product Types
|
summary: Add Tax Rate to Product Types
|
||||||
description: Associates a Tax Rate with a list of Product Types
|
description: Associates a Tax Rate with a list of Product Types
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9225,6 +9237,12 @@ paths:
|
|||||||
summary: Remove Tax Rate from Product Types
|
summary: Remove Tax Rate from Product Types
|
||||||
description: Removes a Tax Rate from a list of Product Types
|
description: Removes a Tax Rate from a list of Product Types
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9269,12 +9287,18 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
tax_rate:
|
tax_rate:
|
||||||
$ref: '#/components/schemas/tax_rate'
|
$ref: '#/components/schemas/tax_rate'
|
||||||
'/tax-rates/:id/products/batch':
|
'/tax-rates/{id}/products/batch':
|
||||||
post:
|
post:
|
||||||
operationId: PostTaxRatesTaxRateProducts
|
operationId: PostTaxRatesTaxRateProducts
|
||||||
summary: Add Tax Rate to Products
|
summary: Add Tax Rate to Products
|
||||||
description: Associates a Tax Rate with a list of Products
|
description: Associates a Tax Rate with a list of Products
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9322,6 +9346,12 @@ paths:
|
|||||||
summary: Removes Tax Rate from Products
|
summary: Removes Tax Rate from Products
|
||||||
description: Removes a Tax Rate from a list of Products
|
description: Removes a Tax Rate from a list of Products
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9366,12 +9396,18 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
tax_rate:
|
tax_rate:
|
||||||
$ref: '#/components/schemas/tax_rate'
|
$ref: '#/components/schemas/tax_rate'
|
||||||
'/tax-rates/:id/shipping-options/batch':
|
'/tax-rates/{id}/shipping-options/batch':
|
||||||
post:
|
post:
|
||||||
operationId: PostTaxRatesTaxRateShippingOptions
|
operationId: PostTaxRatesTaxRateShippingOptions
|
||||||
summary: Add Tax Rate to Product Types
|
summary: Add Tax Rate to Product Types
|
||||||
description: Associates a Tax Rate with a list of Shipping Options
|
description: Associates a Tax Rate with a list of Shipping Options
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9421,6 +9457,12 @@ paths:
|
|||||||
summary: Removes a Tax Rate from Product Types
|
summary: Removes a Tax Rate from Product Types
|
||||||
description: Removes a Tax Rate from a list of Product Types
|
description: Removes a Tax Rate from a list of Product Types
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9675,12 +9717,17 @@ paths:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Whether or not the items were deleted.
|
description: Whether or not the items were deleted.
|
||||||
default: true
|
default: true
|
||||||
'/tax-rates/:id':
|
|
||||||
get:
|
get:
|
||||||
operationId: GetTaxRatesTaxRate
|
operationId: GetTaxRatesTaxRate
|
||||||
summary: Get Tax Rate
|
summary: Get Tax Rate
|
||||||
description: Retrieves a TaxRate
|
description: Retrieves a TaxRate
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -9716,6 +9763,12 @@ paths:
|
|||||||
summary: Update a Tax Rate
|
summary: Update a Tax Rate
|
||||||
description: Updates a Tax Rate
|
description: Updates a Tax Rate
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
|
|||||||
+16
-18
@@ -109,6 +109,10 @@ tags:
|
|||||||
servers:
|
servers:
|
||||||
- url: https://api.medusa-commerce.com/admin
|
- url: https://api.medusa-commerce.com/admin
|
||||||
paths:
|
paths:
|
||||||
|
/apps/authorizations:
|
||||||
|
$ref: paths/apps_authorizations.yaml
|
||||||
|
/apps:
|
||||||
|
$ref: paths/apps.yaml
|
||||||
/auth:
|
/auth:
|
||||||
$ref: paths/auth.yaml
|
$ref: paths/auth.yaml
|
||||||
/batch-jobs/{id}/cancel:
|
/batch-jobs/{id}/cancel:
|
||||||
@@ -133,10 +137,6 @@ paths:
|
|||||||
$ref: paths/customer-groups_{id}.yaml
|
$ref: paths/customer-groups_{id}.yaml
|
||||||
/customer-groups/{id}/customers:
|
/customer-groups/{id}/customers:
|
||||||
$ref: paths/customer-groups_{id}_customers.yaml
|
$ref: paths/customer-groups_{id}_customers.yaml
|
||||||
/customers:
|
|
||||||
$ref: paths/customers.yaml
|
|
||||||
/customers/{id}:
|
|
||||||
$ref: paths/customers_{id}.yaml
|
|
||||||
/discounts/{id}/regions/{region_id}:
|
/discounts/{id}/regions/{region_id}:
|
||||||
$ref: paths/discounts_{id}_regions_{region_id}.yaml
|
$ref: paths/discounts_{id}_regions_{region_id}.yaml
|
||||||
/discounts/{discount_id}/conditions:
|
/discounts/{discount_id}/conditions:
|
||||||
@@ -153,10 +153,10 @@ paths:
|
|||||||
$ref: paths/discounts_{id}_dynamic-codes_{code}.yaml
|
$ref: paths/discounts_{id}_dynamic-codes_{code}.yaml
|
||||||
/discounts/code/{code}:
|
/discounts/code/{code}:
|
||||||
$ref: paths/discounts_code_{code}.yaml
|
$ref: paths/discounts_code_{code}.yaml
|
||||||
/apps/authorizations:
|
/customers:
|
||||||
$ref: paths/apps_authorizations.yaml
|
$ref: paths/customers.yaml
|
||||||
/apps:
|
/customers/{id}:
|
||||||
$ref: paths/apps.yaml
|
$ref: paths/customers_{id}.yaml
|
||||||
/draft-orders:
|
/draft-orders:
|
||||||
$ref: paths/draft-orders.yaml
|
$ref: paths/draft-orders.yaml
|
||||||
/draft-orders/{id}/line-items:
|
/draft-orders/{id}/line-items:
|
||||||
@@ -249,8 +249,8 @@ paths:
|
|||||||
$ref: paths/price-lists_{id}_products_{product_id}_prices.yaml
|
$ref: paths/price-lists_{id}_products_{product_id}_prices.yaml
|
||||||
/price-lists/{id}/variants/{variant_id}/prices:
|
/price-lists/{id}/variants/{variant_id}/prices:
|
||||||
$ref: paths/price-lists_{id}_variants_{variant_id}_prices.yaml
|
$ref: paths/price-lists_{id}_variants_{variant_id}_prices.yaml
|
||||||
/price-lists/:id/products:
|
/price-lists/{id}/products:
|
||||||
$ref: paths/price-lists_:id_products.yaml
|
$ref: paths/price-lists_{id}_products.yaml
|
||||||
/product-tags:
|
/product-tags:
|
||||||
$ref: paths/product-tags.yaml
|
$ref: paths/product-tags.yaml
|
||||||
/product-types:
|
/product-types:
|
||||||
@@ -327,18 +327,16 @@ paths:
|
|||||||
$ref: paths/swaps_{id}.yaml
|
$ref: paths/swaps_{id}.yaml
|
||||||
/swaps:
|
/swaps:
|
||||||
$ref: paths/swaps.yaml
|
$ref: paths/swaps.yaml
|
||||||
/tax-rates/:id/product-types/batch:
|
/tax-rates/{id}/product-types/batch:
|
||||||
$ref: paths/tax-rates_:id_product-types_batch.yaml
|
$ref: paths/tax-rates_{id}_product-types_batch.yaml
|
||||||
/tax-rates/:id/products/batch:
|
/tax-rates/{id}/products/batch:
|
||||||
$ref: paths/tax-rates_:id_products_batch.yaml
|
$ref: paths/tax-rates_{id}_products_batch.yaml
|
||||||
/tax-rates/:id/shipping-options/batch:
|
/tax-rates/{id}/shipping-options/batch:
|
||||||
$ref: paths/tax-rates_:id_shipping-options_batch.yaml
|
$ref: paths/tax-rates_{id}_shipping-options_batch.yaml
|
||||||
/tax-rates:
|
/tax-rates:
|
||||||
$ref: paths/tax-rates.yaml
|
$ref: paths/tax-rates.yaml
|
||||||
/tax-rates/{id}:
|
/tax-rates/{id}:
|
||||||
$ref: paths/tax-rates_{id}.yaml
|
$ref: paths/tax-rates_{id}.yaml
|
||||||
/tax-rates/:id:
|
|
||||||
$ref: paths/tax-rates_:id.yaml
|
|
||||||
/uploads:
|
/uploads:
|
||||||
$ref: paths/uploads.yaml
|
$ref: paths/uploads.yaml
|
||||||
/users:
|
/users:
|
||||||
|
|||||||
+6
@@ -4,6 +4,12 @@ get:
|
|||||||
description: Retrieves a list of Product that are part of a Price List
|
description: Retrieves a list of Product that are part of a Price List
|
||||||
x-authenticated: true
|
x-authenticated: true
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the price list.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: q
|
name: q
|
||||||
description: >-
|
description: >-
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
get:
|
|
||||||
operationId: GetTaxRatesTaxRate
|
|
||||||
summary: Get Tax Rate
|
|
||||||
description: Retrieves a TaxRate
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: fields
|
|
||||||
description: Which fields should be included in the result.
|
|
||||||
style: form
|
|
||||||
explode: false
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: expand
|
|
||||||
description: Which fields should be expanded and retrieved in the result.
|
|
||||||
style: form
|
|
||||||
explode: false
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
x-authenticated: true
|
|
||||||
tags:
|
|
||||||
- Tax Rate
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
tax_rate:
|
|
||||||
$ref: ../components/schemas/tax_rate.yaml
|
|
||||||
post:
|
|
||||||
operationId: PostTaxRatesTaxRate
|
|
||||||
summary: Update a Tax Rate
|
|
||||||
description: Updates a Tax Rate
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: fields
|
|
||||||
description: Which fields should be included in the result.
|
|
||||||
style: form
|
|
||||||
explode: false
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: expand
|
|
||||||
description: Which fields should be expanded and retrieved in the result.
|
|
||||||
style: form
|
|
||||||
explode: false
|
|
||||||
schema:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
x-authenticated: true
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
code:
|
|
||||||
type: string
|
|
||||||
description: A code to identify the tax type by
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
description: A human friendly name for the tax
|
|
||||||
region_id:
|
|
||||||
type: string
|
|
||||||
description: The ID of the Region that the rate belongs to
|
|
||||||
rate:
|
|
||||||
type: number
|
|
||||||
description: The numeric rate to charge
|
|
||||||
products:
|
|
||||||
type: array
|
|
||||||
description: The IDs of the products associated with this tax rate
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
shipping_options:
|
|
||||||
type: array
|
|
||||||
description: The IDs of the shipping options associated with this tax rate
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
product_types:
|
|
||||||
type: array
|
|
||||||
description: The IDs of the types of products associated with this tax rate
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Tax Rate
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
tax_rate:
|
|
||||||
$ref: ../components/schemas/tax_rate.yaml
|
|
||||||
@@ -30,3 +30,117 @@ delete:
|
|||||||
type: boolean
|
type: boolean
|
||||||
description: Whether or not the items were deleted.
|
description: Whether or not the items were deleted.
|
||||||
default: true
|
default: true
|
||||||
|
get:
|
||||||
|
operationId: GetTaxRatesTaxRate
|
||||||
|
summary: Get Tax Rate
|
||||||
|
description: Retrieves a TaxRate
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: fields
|
||||||
|
description: Which fields should be included in the result.
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: expand
|
||||||
|
description: Which fields should be expanded and retrieved in the result.
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
x-authenticated: true
|
||||||
|
tags:
|
||||||
|
- Tax Rate
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
tax_rate:
|
||||||
|
$ref: ../components/schemas/tax_rate.yaml
|
||||||
|
post:
|
||||||
|
operationId: PostTaxRatesTaxRate
|
||||||
|
summary: Update a Tax Rate
|
||||||
|
description: Updates a Tax Rate
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: fields
|
||||||
|
description: Which fields should be included in the result.
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: expand
|
||||||
|
description: Which fields should be expanded and retrieved in the result.
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
x-authenticated: true
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: A code to identify the tax type by
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: A human friendly name for the tax
|
||||||
|
region_id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the Region that the rate belongs to
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The numeric rate to charge
|
||||||
|
products:
|
||||||
|
type: array
|
||||||
|
description: The IDs of the products associated with this tax rate
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
shipping_options:
|
||||||
|
type: array
|
||||||
|
description: The IDs of the shipping options associated with this tax rate
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
product_types:
|
||||||
|
type: array
|
||||||
|
description: The IDs of the types of products associated with this tax rate
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Tax Rate
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
tax_rate:
|
||||||
|
$ref: ../components/schemas/tax_rate.yaml
|
||||||
+12
@@ -3,6 +3,12 @@ post:
|
|||||||
summary: Add Tax Rate to Product Types
|
summary: Add Tax Rate to Product Types
|
||||||
description: Associates a Tax Rate with a list of Product Types
|
description: Associates a Tax Rate with a list of Product Types
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -50,6 +56,12 @@ delete:
|
|||||||
summary: Remove Tax Rate from Product Types
|
summary: Remove Tax Rate from Product Types
|
||||||
description: Removes a Tax Rate from a list of Product Types
|
description: Removes a Tax Rate from a list of Product Types
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
+12
@@ -3,6 +3,12 @@ post:
|
|||||||
summary: Add Tax Rate to Products
|
summary: Add Tax Rate to Products
|
||||||
description: Associates a Tax Rate with a list of Products
|
description: Associates a Tax Rate with a list of Products
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -50,6 +56,12 @@ delete:
|
|||||||
summary: Removes Tax Rate from Products
|
summary: Removes Tax Rate from Products
|
||||||
description: Removes a Tax Rate from a list of Products
|
description: Removes a Tax Rate from a list of Products
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
+12
@@ -3,6 +3,12 @@ post:
|
|||||||
summary: Add Tax Rate to Product Types
|
summary: Add Tax Rate to Product Types
|
||||||
description: Associates a Tax Rate with a list of Shipping Options
|
description: Associates a Tax Rate with a list of Shipping Options
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
@@ -50,6 +56,12 @@ delete:
|
|||||||
summary: Removes a Tax Rate from Product Types
|
summary: Removes a Tax Rate from Product Types
|
||||||
description: Removes a Tax Rate from a list of Product Types
|
description: Removes a Tax Rate from a list of Product Types
|
||||||
parameters:
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: ID of the tax rate.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
- in: query
|
- in: query
|
||||||
name: fields
|
name: fields
|
||||||
description: Which fields should be included in the result.
|
description: Which fields should be included in the result.
|
||||||
+1187
-1187
File diff suppressed because it is too large.
Load diff
+450
-450
@@ -270,6 +270,456 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
gift_card:
|
gift_card:
|
||||||
$ref: '#/components/schemas/gift_card'
|
$ref: '#/components/schemas/gift_card'
|
||||||
|
/customers/me/addresses:
|
||||||
|
post:
|
||||||
|
operationId: PostCustomersCustomerAddresses
|
||||||
|
summary: Add a Shipping Address
|
||||||
|
description: Adds a Shipping Address to a Customer's saved addresses.
|
||||||
|
x-authenticated: true
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- address
|
||||||
|
properties:
|
||||||
|
address:
|
||||||
|
description: The Address to add to the Customer.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: A successful response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
/customers:
|
||||||
|
post:
|
||||||
|
operationId: PostCustomers
|
||||||
|
summary: Create a Customer
|
||||||
|
description: Creates a Customer account.
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- first_name
|
||||||
|
- last_name
|
||||||
|
- email
|
||||||
|
- password
|
||||||
|
properties:
|
||||||
|
first_name:
|
||||||
|
description: The Customer's first name.
|
||||||
|
type: string
|
||||||
|
last_name:
|
||||||
|
description: The Customer's last name.
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
description: The email of the customer.
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
password:
|
||||||
|
description: The Customer's password.
|
||||||
|
type: string
|
||||||
|
format: password
|
||||||
|
phone:
|
||||||
|
description: The Customer's phone number.
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
'422':
|
||||||
|
description: A customer with the same email exists
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The error code
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
description: The type of error
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
description: Human-readable message with details about the error
|
||||||
|
example:
|
||||||
|
code: invalid_request_error
|
||||||
|
type: duplicate_error
|
||||||
|
message: >-
|
||||||
|
A customer with the given email already has an account. Log in
|
||||||
|
instead
|
||||||
|
'/customers/me/addresses/{address_id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteCustomersCustomerAddressesAddress
|
||||||
|
summary: Delete an Address
|
||||||
|
description: Removes an Address from the Customer's saved addresses.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: address_id
|
||||||
|
required: true
|
||||||
|
description: The id of the Address to remove.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
post:
|
||||||
|
operationId: PostCustomersCustomerAddressesAddress
|
||||||
|
summary: Update a Shipping Address
|
||||||
|
description: Updates a Customer's saved Shipping Address.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: address_id
|
||||||
|
required: true
|
||||||
|
description: The id of the Address to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
/customers/me:
|
||||||
|
get:
|
||||||
|
operationId: GetCustomersCustomer
|
||||||
|
summary: Retrieves a Customer
|
||||||
|
description: >-
|
||||||
|
Retrieves a Customer - the Customer must be logged in to retrieve their
|
||||||
|
details.
|
||||||
|
x-authenticated: true
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
post:
|
||||||
|
operationId: PostCustomersCustomer
|
||||||
|
summary: Update Customer details
|
||||||
|
description: Updates a Customer's saved details.
|
||||||
|
x-authenticated: true
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
first_name:
|
||||||
|
description: The Customer's first name.
|
||||||
|
type: string
|
||||||
|
last_name:
|
||||||
|
description: The Customer's last name.
|
||||||
|
type: string
|
||||||
|
billing_address:
|
||||||
|
description: The Address to be used for billing purposes.
|
||||||
|
anyOf:
|
||||||
|
- $ref: '#/components/schemas/address'
|
||||||
|
description: The full billing address object
|
||||||
|
- type: string
|
||||||
|
description: The ID of an existing billing address
|
||||||
|
password:
|
||||||
|
description: The Customer's password.
|
||||||
|
type: string
|
||||||
|
phone:
|
||||||
|
description: The Customer's phone number.
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
description: The email of the customer.
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
description: Metadata about the customer.
|
||||||
|
type: object
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
/customers/me/payment-methods:
|
||||||
|
get:
|
||||||
|
operationId: GetCustomersCustomerPaymentMethods
|
||||||
|
summary: Retrieve saved payment methods
|
||||||
|
description: >-
|
||||||
|
Retrieves a list of a Customer's saved payment methods. Payment methods
|
||||||
|
are saved with Payment Providers and it is their responsibility to fetch
|
||||||
|
saved methods.
|
||||||
|
x-authenticated: true
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
payment_methods:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
provider_id:
|
||||||
|
type: string
|
||||||
|
description: >-
|
||||||
|
The id of the Payment Provider where the payment
|
||||||
|
method is saved.
|
||||||
|
data:
|
||||||
|
type: object
|
||||||
|
description: >-
|
||||||
|
The data needed for the Payment Provider to use the
|
||||||
|
saved payment method.
|
||||||
|
/customers/me/orders:
|
||||||
|
get:
|
||||||
|
operationId: GetCustomersCustomerOrders
|
||||||
|
summary: Retrieve Customer Orders
|
||||||
|
description: Retrieves a list of a Customer's Orders.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: limit
|
||||||
|
description: How many orders to return.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 10
|
||||||
|
- in: query
|
||||||
|
name: offset
|
||||||
|
description: The offset in the resulting orders.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
- in: query
|
||||||
|
name: fields
|
||||||
|
description: >-
|
||||||
|
(Comma separated string) Which fields should be included in the
|
||||||
|
resulting orders.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: expand
|
||||||
|
description: >-
|
||||||
|
(Comma separated string) Which relations should be expanded in the
|
||||||
|
resulting orders.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
orders:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/order'
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
description: The total number of items available
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
description: The number of items skipped before these items
|
||||||
|
limit:
|
||||||
|
type: integer
|
||||||
|
description: The number of items per page
|
||||||
|
/customers/password-token:
|
||||||
|
post:
|
||||||
|
operationId: PostCustomersCustomerPasswordToken
|
||||||
|
summary: Creates a reset password token
|
||||||
|
description: >-
|
||||||
|
Creates a reset password token to be used in a subsequent
|
||||||
|
/reset-password request. The password token should be sent out of band
|
||||||
|
e.g. via email and will not be returned.
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- email
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
description: The email of the customer.
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'204':
|
||||||
|
description: OK
|
||||||
|
/customers/password-reset:
|
||||||
|
post:
|
||||||
|
operationId: PostCustomersResetPassword
|
||||||
|
summary: Resets Customer password
|
||||||
|
description: >-
|
||||||
|
Resets a Customer's password using a password token created by a
|
||||||
|
previous /password-token request.
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- email
|
||||||
|
- password
|
||||||
|
- token
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
description: The email of the customer.
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
password:
|
||||||
|
description: The Customer's password.
|
||||||
|
type: string
|
||||||
|
format: password
|
||||||
|
token:
|
||||||
|
description: The reset password token
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Customer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
customer:
|
||||||
|
$ref: '#/components/schemas/customer'
|
||||||
|
'/orders/cart/{cart_id}':
|
||||||
|
get:
|
||||||
|
operationId: GetOrdersOrderCartId
|
||||||
|
summary: Retrieves Order by Cart id
|
||||||
|
description: >-
|
||||||
|
Retrieves an Order by the id of the Cart that was used to create the
|
||||||
|
Order.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: cart_id
|
||||||
|
required: true
|
||||||
|
description: The ID of Cart.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order:
|
||||||
|
$ref: '#/components/schemas/order'
|
||||||
|
'/orders/{id}':
|
||||||
|
get:
|
||||||
|
operationId: GetOrdersOrder
|
||||||
|
summary: Retrieves an Order
|
||||||
|
description: Retrieves an Order
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The id of the Order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
tags:
|
||||||
|
- Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order:
|
||||||
|
$ref: '#/components/schemas/order'
|
||||||
|
/orders:
|
||||||
|
get:
|
||||||
|
operationId: GetOrders
|
||||||
|
summary: Look Up an Order
|
||||||
|
description: Look up an order using filters.
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: display_id
|
||||||
|
required: true
|
||||||
|
description: The display id given to the Order.
|
||||||
|
schema:
|
||||||
|
type: number
|
||||||
|
- in: query
|
||||||
|
name: email
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The email associated with this order.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
- in: query
|
||||||
|
name: shipping_address
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The shipping address associated with this order.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: The postal code of the shipping address
|
||||||
|
tags:
|
||||||
|
- Order
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order:
|
||||||
|
$ref: '#/components/schemas/order'
|
||||||
'/carts/{id}/shipping-methods':
|
'/carts/{id}/shipping-methods':
|
||||||
post:
|
post:
|
||||||
operationId: PostCartsCartShippingMethod
|
operationId: PostCartsCartShippingMethod
|
||||||
@@ -889,456 +1339,6 @@ paths:
|
|||||||
provider_id:
|
provider_id:
|
||||||
type: string
|
type: string
|
||||||
description: The ID of the Payment Provider.
|
description: The ID of the Payment Provider.
|
||||||
/customers/me/addresses:
|
|
||||||
post:
|
|
||||||
operationId: PostCustomersCustomerAddresses
|
|
||||||
summary: Add a Shipping Address
|
|
||||||
description: Adds a Shipping Address to a Customer's saved addresses.
|
|
||||||
x-authenticated: true
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
required:
|
|
||||||
- address
|
|
||||||
properties:
|
|
||||||
address:
|
|
||||||
description: The Address to add to the Customer.
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/address'
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: A successful response
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
/customers:
|
|
||||||
post:
|
|
||||||
operationId: PostCustomers
|
|
||||||
summary: Create a Customer
|
|
||||||
description: Creates a Customer account.
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
required:
|
|
||||||
- first_name
|
|
||||||
- last_name
|
|
||||||
- email
|
|
||||||
- password
|
|
||||||
properties:
|
|
||||||
first_name:
|
|
||||||
description: The Customer's first name.
|
|
||||||
type: string
|
|
||||||
last_name:
|
|
||||||
description: The Customer's last name.
|
|
||||||
type: string
|
|
||||||
email:
|
|
||||||
description: The email of the customer.
|
|
||||||
type: string
|
|
||||||
format: email
|
|
||||||
password:
|
|
||||||
description: The Customer's password.
|
|
||||||
type: string
|
|
||||||
format: password
|
|
||||||
phone:
|
|
||||||
description: The Customer's phone number.
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
'422':
|
|
||||||
description: A customer with the same email exists
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
code:
|
|
||||||
type: string
|
|
||||||
description: The error code
|
|
||||||
type:
|
|
||||||
type: string
|
|
||||||
description: The type of error
|
|
||||||
message:
|
|
||||||
type: string
|
|
||||||
description: Human-readable message with details about the error
|
|
||||||
example:
|
|
||||||
code: invalid_request_error
|
|
||||||
type: duplicate_error
|
|
||||||
message: >-
|
|
||||||
A customer with the given email already has an account. Log in
|
|
||||||
instead
|
|
||||||
'/customers/me/addresses/{address_id}':
|
|
||||||
delete:
|
|
||||||
operationId: DeleteCustomersCustomerAddressesAddress
|
|
||||||
summary: Delete an Address
|
|
||||||
description: Removes an Address from the Customer's saved addresses.
|
|
||||||
x-authenticated: true
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: address_id
|
|
||||||
required: true
|
|
||||||
description: The id of the Address to remove.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
post:
|
|
||||||
operationId: PostCustomersCustomerAddressesAddress
|
|
||||||
summary: Update a Shipping Address
|
|
||||||
description: Updates a Customer's saved Shipping Address.
|
|
||||||
x-authenticated: true
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: address_id
|
|
||||||
required: true
|
|
||||||
description: The id of the Address to update.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/address'
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
/customers/me:
|
|
||||||
get:
|
|
||||||
operationId: GetCustomersCustomer
|
|
||||||
summary: Retrieves a Customer
|
|
||||||
description: >-
|
|
||||||
Retrieves a Customer - the Customer must be logged in to retrieve their
|
|
||||||
details.
|
|
||||||
x-authenticated: true
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
post:
|
|
||||||
operationId: PostCustomersCustomer
|
|
||||||
summary: Update Customer details
|
|
||||||
description: Updates a Customer's saved details.
|
|
||||||
x-authenticated: true
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
first_name:
|
|
||||||
description: The Customer's first name.
|
|
||||||
type: string
|
|
||||||
last_name:
|
|
||||||
description: The Customer's last name.
|
|
||||||
type: string
|
|
||||||
billing_address:
|
|
||||||
description: The Address to be used for billing purposes.
|
|
||||||
anyOf:
|
|
||||||
- $ref: '#/components/schemas/address'
|
|
||||||
description: The full billing address object
|
|
||||||
- type: string
|
|
||||||
description: The ID of an existing billing address
|
|
||||||
password:
|
|
||||||
description: The Customer's password.
|
|
||||||
type: string
|
|
||||||
phone:
|
|
||||||
description: The Customer's phone number.
|
|
||||||
type: string
|
|
||||||
email:
|
|
||||||
description: The email of the customer.
|
|
||||||
type: string
|
|
||||||
metadata:
|
|
||||||
description: Metadata about the customer.
|
|
||||||
type: object
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
/customers/me/payment-methods:
|
|
||||||
get:
|
|
||||||
operationId: GetCustomersCustomerPaymentMethods
|
|
||||||
summary: Retrieve saved payment methods
|
|
||||||
description: >-
|
|
||||||
Retrieves a list of a Customer's saved payment methods. Payment methods
|
|
||||||
are saved with Payment Providers and it is their responsibility to fetch
|
|
||||||
saved methods.
|
|
||||||
x-authenticated: true
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
payment_methods:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
provider_id:
|
|
||||||
type: string
|
|
||||||
description: >-
|
|
||||||
The id of the Payment Provider where the payment
|
|
||||||
method is saved.
|
|
||||||
data:
|
|
||||||
type: object
|
|
||||||
description: >-
|
|
||||||
The data needed for the Payment Provider to use the
|
|
||||||
saved payment method.
|
|
||||||
/customers/me/orders:
|
|
||||||
get:
|
|
||||||
operationId: GetCustomersCustomerOrders
|
|
||||||
summary: Retrieve Customer Orders
|
|
||||||
description: Retrieves a list of a Customer's Orders.
|
|
||||||
x-authenticated: true
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: limit
|
|
||||||
description: How many orders to return.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
default: 10
|
|
||||||
- in: query
|
|
||||||
name: offset
|
|
||||||
description: The offset in the resulting orders.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
default: 0
|
|
||||||
- in: query
|
|
||||||
name: fields
|
|
||||||
description: >-
|
|
||||||
(Comma separated string) Which fields should be included in the
|
|
||||||
resulting orders.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- in: query
|
|
||||||
name: expand
|
|
||||||
description: >-
|
|
||||||
(Comma separated string) Which relations should be expanded in the
|
|
||||||
resulting orders.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
orders:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/order'
|
|
||||||
count:
|
|
||||||
type: integer
|
|
||||||
description: The total number of items available
|
|
||||||
offset:
|
|
||||||
type: integer
|
|
||||||
description: The number of items skipped before these items
|
|
||||||
limit:
|
|
||||||
type: integer
|
|
||||||
description: The number of items per page
|
|
||||||
/customers/password-token:
|
|
||||||
post:
|
|
||||||
operationId: PostCustomersCustomerPasswordToken
|
|
||||||
summary: Creates a reset password token
|
|
||||||
description: >-
|
|
||||||
Creates a reset password token to be used in a subsequent
|
|
||||||
/reset-password request. The password token should be sent out of band
|
|
||||||
e.g. via email and will not be returned.
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
required:
|
|
||||||
- email
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
description: The email of the customer.
|
|
||||||
type: string
|
|
||||||
format: email
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'204':
|
|
||||||
description: OK
|
|
||||||
/customers/password-reset:
|
|
||||||
post:
|
|
||||||
operationId: PostCustomersResetPassword
|
|
||||||
summary: Resets Customer password
|
|
||||||
description: >-
|
|
||||||
Resets a Customer's password using a password token created by a
|
|
||||||
previous /password-token request.
|
|
||||||
requestBody:
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
required:
|
|
||||||
- email
|
|
||||||
- password
|
|
||||||
- token
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
description: The email of the customer.
|
|
||||||
type: string
|
|
||||||
format: email
|
|
||||||
password:
|
|
||||||
description: The Customer's password.
|
|
||||||
type: string
|
|
||||||
format: password
|
|
||||||
token:
|
|
||||||
description: The reset password token
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Customer
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
customer:
|
|
||||||
$ref: '#/components/schemas/customer'
|
|
||||||
'/orders/cart/{cart_id}':
|
|
||||||
get:
|
|
||||||
operationId: GetOrdersOrderCartId
|
|
||||||
summary: Retrieves Order by Cart id
|
|
||||||
description: >-
|
|
||||||
Retrieves an Order by the id of the Cart that was used to create the
|
|
||||||
Order.
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: cart_id
|
|
||||||
required: true
|
|
||||||
description: The ID of Cart.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Order
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
order:
|
|
||||||
$ref: '#/components/schemas/order'
|
|
||||||
'/orders/{id}':
|
|
||||||
get:
|
|
||||||
operationId: GetOrdersOrder
|
|
||||||
summary: Retrieves an Order
|
|
||||||
description: Retrieves an Order
|
|
||||||
parameters:
|
|
||||||
- in: path
|
|
||||||
name: id
|
|
||||||
required: true
|
|
||||||
description: The id of the Order.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
tags:
|
|
||||||
- Order
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
order:
|
|
||||||
$ref: '#/components/schemas/order'
|
|
||||||
/orders:
|
|
||||||
get:
|
|
||||||
operationId: GetOrders
|
|
||||||
summary: Look Up an Order
|
|
||||||
description: Look up an order using filters.
|
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: display_id
|
|
||||||
required: true
|
|
||||||
description: The display id given to the Order.
|
|
||||||
schema:
|
|
||||||
type: number
|
|
||||||
- in: query
|
|
||||||
name: email
|
|
||||||
style: form
|
|
||||||
explode: false
|
|
||||||
description: The email associated with this order.
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: email
|
|
||||||
- in: query
|
|
||||||
name: shipping_address
|
|
||||||
style: form
|
|
||||||
explode: false
|
|
||||||
description: The shipping address associated with this order.
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
postal_code:
|
|
||||||
type: string
|
|
||||||
description: The postal code of the shipping address
|
|
||||||
tags:
|
|
||||||
- Order
|
|
||||||
responses:
|
|
||||||
'200':
|
|
||||||
description: OK
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
properties:
|
|
||||||
order:
|
|
||||||
$ref: '#/components/schemas/order'
|
|
||||||
'/products/{id}':
|
'/products/{id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetProductsProduct
|
operationId: GetProductsProduct
|
||||||
|
|||||||
+22
-22
@@ -62,6 +62,28 @@ paths:
|
|||||||
$ref: paths/collections.yaml
|
$ref: paths/collections.yaml
|
||||||
/gift-cards/{code}:
|
/gift-cards/{code}:
|
||||||
$ref: paths/gift-cards_{code}.yaml
|
$ref: paths/gift-cards_{code}.yaml
|
||||||
|
/customers/me/addresses:
|
||||||
|
$ref: paths/customers_me_addresses.yaml
|
||||||
|
/customers:
|
||||||
|
$ref: paths/customers.yaml
|
||||||
|
/customers/me/addresses/{address_id}:
|
||||||
|
$ref: paths/customers_me_addresses_{address_id}.yaml
|
||||||
|
/customers/me:
|
||||||
|
$ref: paths/customers_me.yaml
|
||||||
|
/customers/me/payment-methods:
|
||||||
|
$ref: paths/customers_me_payment-methods.yaml
|
||||||
|
/customers/me/orders:
|
||||||
|
$ref: paths/customers_me_orders.yaml
|
||||||
|
/customers/password-token:
|
||||||
|
$ref: paths/customers_password-token.yaml
|
||||||
|
/customers/password-reset:
|
||||||
|
$ref: paths/customers_password-reset.yaml
|
||||||
|
/orders/cart/{cart_id}:
|
||||||
|
$ref: paths/orders_cart_{cart_id}.yaml
|
||||||
|
/orders/{id}:
|
||||||
|
$ref: paths/orders_{id}.yaml
|
||||||
|
/orders:
|
||||||
|
$ref: paths/orders.yaml
|
||||||
/carts/{id}/shipping-methods:
|
/carts/{id}/shipping-methods:
|
||||||
$ref: paths/carts_{id}_shipping-methods.yaml
|
$ref: paths/carts_{id}_shipping-methods.yaml
|
||||||
/carts/{id}/taxes:
|
/carts/{id}/taxes:
|
||||||
@@ -86,28 +108,6 @@ paths:
|
|||||||
$ref: paths/carts_{id}_payment-sessions_{provider_id}_refresh.yaml
|
$ref: paths/carts_{id}_payment-sessions_{provider_id}_refresh.yaml
|
||||||
/carts/{id}/payment-session:
|
/carts/{id}/payment-session:
|
||||||
$ref: paths/carts_{id}_payment-session.yaml
|
$ref: paths/carts_{id}_payment-session.yaml
|
||||||
/customers/me/addresses:
|
|
||||||
$ref: paths/customers_me_addresses.yaml
|
|
||||||
/customers:
|
|
||||||
$ref: paths/customers.yaml
|
|
||||||
/customers/me/addresses/{address_id}:
|
|
||||||
$ref: paths/customers_me_addresses_{address_id}.yaml
|
|
||||||
/customers/me:
|
|
||||||
$ref: paths/customers_me.yaml
|
|
||||||
/customers/me/payment-methods:
|
|
||||||
$ref: paths/customers_me_payment-methods.yaml
|
|
||||||
/customers/me/orders:
|
|
||||||
$ref: paths/customers_me_orders.yaml
|
|
||||||
/customers/password-token:
|
|
||||||
$ref: paths/customers_password-token.yaml
|
|
||||||
/customers/password-reset:
|
|
||||||
$ref: paths/customers_password-reset.yaml
|
|
||||||
/orders/cart/{cart_id}:
|
|
||||||
$ref: paths/orders_cart_{cart_id}.yaml
|
|
||||||
/orders/{id}:
|
|
||||||
$ref: paths/orders_{id}.yaml
|
|
||||||
/orders:
|
|
||||||
$ref: paths/orders.yaml
|
|
||||||
/products/{id}:
|
/products/{id}:
|
||||||
$ref: paths/products_{id}.yaml
|
$ref: paths/products_{id}.yaml
|
||||||
/products:
|
/products:
|
||||||
|
|||||||
@@ -19,12 +19,13 @@ import { Type } from "class-transformer"
|
|||||||
import { pickBy } from "lodash"
|
import { pickBy } from "lodash"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [get] /price-lists/:id/products
|
* @oas [get] /price-lists/{id}/products
|
||||||
* operationId: "GetPriceListsPriceListProducts"
|
* operationId: "GetPriceListsPriceListProducts"
|
||||||
* summary: "List Product in a Price List"
|
* summary: "List Product in a Price List"
|
||||||
* description: "Retrieves a list of Product that are part of a Price List"
|
* description: "Retrieves a list of Product that are part of a Price List"
|
||||||
* x-authenticated: true
|
* x-authenticated: true
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the price list.
|
||||||
* - (query) q {string} Query used for searching product title and description, variant title and sku, and collection title.
|
* - (query) q {string} Query used for searching product title and description, variant title and sku, and collection title.
|
||||||
* - (query) id {string} ID of the product to search for.
|
* - (query) id {string} ID of the product to search for.
|
||||||
* - in: query
|
* - in: query
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import { IsArray, IsOptional } from "class-validator"
|
import { IsArray, IsOptional } from "class-validator"
|
||||||
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
||||||
|
|
||||||
|
import { EntityManager } from "typeorm"
|
||||||
import { TaxRate } from "../../../.."
|
import { TaxRate } from "../../../.."
|
||||||
import { TaxRateService } from "../../../../services"
|
import { TaxRateService } from "../../../../services"
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
import { EntityManager } from "typeorm"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [post] /tax-rates/:id/product-types/batch
|
* @oas [post] /tax-rates/{id}/product-types/batch
|
||||||
* operationId: "PostTaxRatesTaxRateProductTypes"
|
* operationId: "PostTaxRatesTaxRateProductTypes"
|
||||||
* summary: "Add Tax Rate to Product Types"
|
* summary: "Add Tax Rate to Product Types"
|
||||||
* description: "Associates a Tax Rate with a list of Product Types"
|
* description: "Associates a Tax Rate with a list of Product Types"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import { IsArray, IsOptional } from "class-validator"
|
import { IsArray, IsOptional } from "class-validator"
|
||||||
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
||||||
|
|
||||||
|
import { EntityManager } from "typeorm"
|
||||||
import { TaxRate } from "../../../.."
|
import { TaxRate } from "../../../.."
|
||||||
import { TaxRateService } from "../../../../services"
|
import { TaxRateService } from "../../../../services"
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
import { EntityManager } from "typeorm"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [post] /tax-rates/:id/products/batch
|
* @oas [post] /tax-rates/{id}/products/batch
|
||||||
* operationId: "PostTaxRatesTaxRateProducts"
|
* operationId: "PostTaxRatesTaxRateProducts"
|
||||||
* summary: "Add Tax Rate to Products"
|
* summary: "Add Tax Rate to Products"
|
||||||
* description: "Associates a Tax Rate with a list of Products"
|
* description: "Associates a Tax Rate with a list of Products"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import { IsArray, IsOptional } from "class-validator"
|
import { IsArray, IsOptional } from "class-validator"
|
||||||
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
||||||
|
|
||||||
|
import { EntityManager } from "typeorm"
|
||||||
import { TaxRate } from "../../../.."
|
import { TaxRate } from "../../../.."
|
||||||
import { TaxRateService } from "../../../../services"
|
import { TaxRateService } from "../../../../services"
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
import { EntityManager } from "typeorm"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [post] /tax-rates/:id/shipping-options/batch
|
* @oas [post] /tax-rates/{id}/shipping-options/batch
|
||||||
* operationId: "PostTaxRatesTaxRateShippingOptions"
|
* operationId: "PostTaxRatesTaxRateShippingOptions"
|
||||||
* summary: "Add Tax Rate to Product Types"
|
* summary: "Add Tax Rate to Product Types"
|
||||||
* description: "Associates a Tax Rate with a list of Shipping Options"
|
* description: "Associates a Tax Rate with a list of Shipping Options"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -6,11 +6,12 @@ import { TaxRateService } from "../../../../services"
|
|||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [get] /tax-rates/:id
|
* @oas [get] /tax-rates/{id}
|
||||||
* operationId: "GetTaxRatesTaxRate"
|
* operationId: "GetTaxRatesTaxRate"
|
||||||
* summary: "Get Tax Rate"
|
* summary: "Get Tax Rate"
|
||||||
* description: "Retrieves a TaxRate"
|
* description: "Retrieves a TaxRate"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import { IsArray, IsOptional } from "class-validator"
|
import { IsArray, IsOptional } from "class-validator"
|
||||||
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
||||||
|
|
||||||
|
import { EntityManager } from "typeorm"
|
||||||
import { TaxRate } from "../../../.."
|
import { TaxRate } from "../../../.."
|
||||||
import { TaxRateService } from "../../../../services"
|
import { TaxRateService } from "../../../../services"
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
import { EntityManager } from "typeorm"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [delete] /tax-rates/:id/product-types/batch
|
* @oas [delete] /tax-rates/{id}/product-types/batch
|
||||||
* operationId: "DeleteTaxRatesTaxRateProductTypes"
|
* operationId: "DeleteTaxRatesTaxRateProductTypes"
|
||||||
* summary: "Remove Tax Rate from Product Types"
|
* summary: "Remove Tax Rate from Product Types"
|
||||||
* description: "Removes a Tax Rate from a list of Product Types"
|
* description: "Removes a Tax Rate from a list of Product Types"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import { IsArray, IsOptional } from "class-validator"
|
import { IsArray, IsOptional } from "class-validator"
|
||||||
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
||||||
|
|
||||||
|
import { EntityManager } from "typeorm"
|
||||||
import { TaxRate } from "../../../.."
|
import { TaxRate } from "../../../.."
|
||||||
import { TaxRateService } from "../../../../services"
|
import { TaxRateService } from "../../../../services"
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
import { EntityManager } from "typeorm"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [delete] /tax-rates/:id/products/batch
|
* @oas [delete] /tax-rates/{id}/products/batch
|
||||||
* operationId: "DeleteTaxRatesTaxRateProducts"
|
* operationId: "DeleteTaxRatesTaxRateProducts"
|
||||||
* summary: "Removes Tax Rate from Products"
|
* summary: "Removes Tax Rate from Products"
|
||||||
* description: "Removes a Tax Rate from a list of Products"
|
* description: "Removes a Tax Rate from a list of Products"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
import { IsArray, IsOptional } from "class-validator"
|
import { IsArray, IsOptional } from "class-validator"
|
||||||
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
import { getRetrieveConfig, pickByConfig } from "./utils/get-query-config"
|
||||||
|
|
||||||
|
import { EntityManager } from "typeorm"
|
||||||
import { TaxRate } from "../../../.."
|
import { TaxRate } from "../../../.."
|
||||||
import { TaxRateService } from "../../../../services"
|
import { TaxRateService } from "../../../../services"
|
||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
import { EntityManager } from "typeorm"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [delete] /tax-rates/:id/shipping-options/batch
|
* @oas [delete] /tax-rates/{id}/shipping-options/batch
|
||||||
* operationId: "DeleteTaxRatesTaxRateShippingOptions"
|
* operationId: "DeleteTaxRatesTaxRateShippingOptions"
|
||||||
* summary: "Removes a Tax Rate from Product Types"
|
* summary: "Removes a Tax Rate from Product Types"
|
||||||
* description: "Removes a Tax Rate from a list of Product Types"
|
* description: "Removes a Tax Rate from a list of Product Types"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
@@ -9,11 +9,12 @@ import { omit } from "lodash"
|
|||||||
import { validator } from "../../../../utils/validator"
|
import { validator } from "../../../../utils/validator"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [post] /tax-rates/:id
|
* @oas [post] /tax-rates/{id}
|
||||||
* operationId: "PostTaxRatesTaxRate"
|
* operationId: "PostTaxRatesTaxRate"
|
||||||
* summary: "Update a Tax Rate"
|
* summary: "Update a Tax Rate"
|
||||||
* description: "Updates a Tax Rate"
|
* description: "Updates a Tax Rate"
|
||||||
* parameters:
|
* parameters:
|
||||||
|
* - (path) id=* {string} ID of the tax rate.
|
||||||
* - in: query
|
* - in: query
|
||||||
* name: fields
|
* name: fields
|
||||||
* description: "Which fields should be included in the result."
|
* description: "Which fields should be included in the result."
|
||||||
|
|||||||
Reference in new issue
Block a user