chore(docs): Refactor API Reference (#1883)
This commit is contained in:
67
docs/api/admin/paths/admin_draft-orders_{id}.yaml
Normal file
67
docs/api/admin/paths/admin_draft-orders_{id}.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
post:
|
||||
operationId: PostDraftOrdersDraftOrder
|
||||
summary: Update a Draft Order"
|
||||
description: Updates a Draft Order.
|
||||
x-authenticated: true
|
||||
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.
|
||||
country_code:
|
||||
type: string
|
||||
description: The 2 character ISO code for the Country.
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
email:
|
||||
type: string
|
||||
description: An email to be used on the Draft Order.
|
||||
format: email
|
||||
billing_address:
|
||||
description: The Address to be used for billing purposes.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
shipping_address:
|
||||
description: The Address to be used for shipping.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
discounts:
|
||||
description: An array of Discount codes to add to the Draft Order.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
description: The code that a Discount is identifed by.
|
||||
type: string
|
||||
no_notification_order:
|
||||
description: >-
|
||||
An optional flag passed to the resulting order to determine use
|
||||
of notifications.
|
||||
type: boolean
|
||||
customer_id:
|
||||
description: The ID of the Customer to associate the Draft Order with.
|
||||
type: string
|
||||
tags:
|
||||
- Draft Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
draft_order:
|
||||
$ref: ../components/schemas/draft-order.yaml
|
||||
18
docs/api/admin/paths/apps.yaml
Normal file
18
docs/api/admin/paths/apps.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
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.yaml
|
||||
34
docs/api/admin/paths/apps_authorizations.yaml
Normal file
34
docs/api/admin/paths/apps_authorizations.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
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.yaml
|
||||
62
docs/api/admin/paths/auth.yaml
Normal file
62
docs/api/admin/paths/auth.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
post:
|
||||
operationId: PostAuth
|
||||
summary: Authenticate a User
|
||||
x-authenticated: false
|
||||
description: Logs a User in and authorizes them to manage Store settings.
|
||||
parameters: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- email
|
||||
- password
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
description: The User's email.
|
||||
password:
|
||||
type: string
|
||||
description: The User's password.
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
user:
|
||||
$ref: ../components/schemas/user.yaml
|
||||
'401':
|
||||
description: The user doesn't exist or the credentials are incorrect.
|
||||
delete:
|
||||
operationId: DeleteAuth
|
||||
summary: Delete Session
|
||||
x-authenticated: true
|
||||
description: Deletes the current session for the logged in user.
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
get:
|
||||
operationId: GetAuth
|
||||
summary: Get Session
|
||||
x-authenticated: true
|
||||
description: Gets the currently logged in User.
|
||||
tags:
|
||||
- Auth
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
user:
|
||||
$ref: ../components/schemas/user.yaml
|
||||
'400':
|
||||
description: An error occurred.
|
||||
318
docs/api/admin/paths/batch-jobs.yaml
Normal file
318
docs/api/admin/paths/batch-jobs.yaml
Normal file
@@ -0,0 +1,318 @@
|
||||
post:
|
||||
operationId: PostBatchJobs
|
||||
summary: Create a Batch Job
|
||||
description: Creates a Batch Job.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- type
|
||||
- context
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
description: The type of batch job to start.
|
||||
example: product-export
|
||||
context:
|
||||
type: object
|
||||
description: >-
|
||||
Additional infomration regarding the batch to be used for
|
||||
processing.
|
||||
example:
|
||||
shape:
|
||||
prices:
|
||||
- region: null
|
||||
currency_code: eur
|
||||
dynamicImageColumnCount: 4
|
||||
dynamicOptionColumnCount: 2
|
||||
list_config:
|
||||
skip: 0
|
||||
take: 50
|
||||
order:
|
||||
created_at: DESC
|
||||
relations:
|
||||
- variants
|
||||
- variant.prices
|
||||
- images
|
||||
dry_run:
|
||||
type: boolean
|
||||
description: >-
|
||||
Set a batch job in dry_run mode to get some information on what
|
||||
will be done without applying any modifications.
|
||||
default: false
|
||||
tags:
|
||||
- Batch Job
|
||||
responses:
|
||||
'201':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
batch_job:
|
||||
$ref: ../components/schemas/batch_job.yaml
|
||||
get:
|
||||
operationId: GetBatchJobs
|
||||
summary: List Batch Jobs
|
||||
description: Retrieve a list of Batch Jobs.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of batch jobs to return.
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: offset
|
||||
description: The number of batch jobs to skip before results.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: id
|
||||
style: form
|
||||
explode: false
|
||||
description: Filter by the batch ID
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
description: batch job ID
|
||||
- type: array
|
||||
description: multiple batch job IDs
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: type
|
||||
style: form
|
||||
explode: false
|
||||
description: Filter by the batch type
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: confirmed_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was confirmed, i.e. less
|
||||
than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: pre_processed_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was pre processed, i.e.
|
||||
less than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: completed_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was completed, i.e. less
|
||||
than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: failed_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was failed, i.e. less
|
||||
than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: canceled_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was canceled, i.e. less
|
||||
than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: order
|
||||
description: Field used to order retrieved batch jobs
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each order of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each order of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was created, i.e. less
|
||||
than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
style: form
|
||||
explode: false
|
||||
description: >-
|
||||
Date comparison for when resulting collections was updated, i.e. less
|
||||
than, greater than etc.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
tags:
|
||||
- Batch Job
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
batch_jobs:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/batch_job.yaml
|
||||
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
|
||||
23
docs/api/admin/paths/batch-jobs_{id}.yaml
Normal file
23
docs/api/admin/paths/batch-jobs_{id}.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
get:
|
||||
operationId: GetBatchJobsBatchJob
|
||||
summary: Retrieve a Batch Job
|
||||
description: Retrieves a Batch Job.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Batch Job
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Batch Job
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
batch_job:
|
||||
$ref: ../components/schemas/batch_job.yaml
|
||||
23
docs/api/admin/paths/batch-jobs_{id}_cancel.yaml
Normal file
23
docs/api/admin/paths/batch-jobs_{id}_cancel.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
operationId: PostBatchJobsBatchJobCancel
|
||||
summary: Marks a batch job as canceled
|
||||
description: Marks a batch job as canceled
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the batch job.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Batch Job
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
batch_job:
|
||||
$ref: ../components/schemas/batch_job.yaml
|
||||
23
docs/api/admin/paths/batch-jobs_{id}_confirm.yaml
Normal file
23
docs/api/admin/paths/batch-jobs_{id}_confirm.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
operationId: PostBatchJobsBatchJobConfirmProcessing
|
||||
summary: Confirm a batch job
|
||||
description: Confirms that a previously requested batch job should be executed.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the batch job.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Batch Job
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
batch_job:
|
||||
$ref: ../components/schemas/batch_job.yaml
|
||||
157
docs/api/admin/paths/collections.yaml
Normal file
157
docs/api/admin/paths/collections.yaml
Normal file
@@ -0,0 +1,157 @@
|
||||
post:
|
||||
operationId: PostCollections
|
||||
summary: Create a Product Collection
|
||||
description: Creates a Product Collection.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
description: The title to identify the Collection by.
|
||||
handle:
|
||||
type: string
|
||||
description: >-
|
||||
An optional handle to be used in slugs, if none is provided we
|
||||
will kebab-case the title.
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
collection:
|
||||
$ref: ../components/schemas/product_collection.yaml
|
||||
get:
|
||||
operationId: GetCollections
|
||||
summary: List Product Collections
|
||||
description: Retrieve a list of Product Collection.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of collections to return.
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: offset
|
||||
description: The number of collections to skip before the results.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: title
|
||||
description: The title of collections to return.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: handle
|
||||
description: The handle of collections to return.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: q
|
||||
description: a search term to search titles and handles.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting collections were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting collections were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: deleted_at
|
||||
description: Date comparison for when resulting collections were deleted.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
collections:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/product_collection.yaml
|
||||
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
|
||||
96
docs/api/admin/paths/collections_{id}.yaml
Normal file
96
docs/api/admin/paths/collections_{id}.yaml
Normal file
@@ -0,0 +1,96 @@
|
||||
delete:
|
||||
operationId: DeleteCollectionsCollection
|
||||
summary: Delete a Product Collection
|
||||
description: Deletes a Product Collection.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Collection.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Collection
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: product-collection
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether the collection was deleted successfully or not.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetCollectionsCollection
|
||||
summary: Retrieve a Product Collection
|
||||
description: Retrieves a Product Collection.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product Collection
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
collection:
|
||||
$ref: ../components/schemas/product_collection.yaml
|
||||
post:
|
||||
operationId: PostCollectionsCollection
|
||||
summary: Update a Product Collection
|
||||
description: Updates a Product Collection.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Collection.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
title:
|
||||
type: string
|
||||
description: The title to identify the Collection by.
|
||||
handle:
|
||||
type: string
|
||||
description: >-
|
||||
An optional handle to be used in slugs, if none is provided we
|
||||
will kebab-case the title.
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
collection:
|
||||
$ref: ../components/schemas/product_collection.yaml
|
||||
83
docs/api/admin/paths/collections_{id}_products_batch.yaml
Normal file
83
docs/api/admin/paths/collections_{id}_products_batch.yaml
Normal file
@@ -0,0 +1,83 @@
|
||||
post:
|
||||
operationId: PostProductsToCollection
|
||||
summary: Updates products associated with a Product Collection
|
||||
description: Updates products associated with a Product Collection
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Collection.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- product_ids
|
||||
properties:
|
||||
product_ids:
|
||||
description: An array of Product IDs to add to the Product Collection.
|
||||
type: array
|
||||
items:
|
||||
description: The ID of a Product to add to the Product Collection.
|
||||
type: string
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
collection:
|
||||
$ref: ../components/schemas/product_collection.yaml
|
||||
delete:
|
||||
operationId: DeleteProductsFromCollection
|
||||
summary: Removes products associated with a Product Collection
|
||||
description: Removes products associated with a Product Collection
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Collection.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- product_ids
|
||||
properties:
|
||||
product_ids:
|
||||
description: An array of Product IDs to remove from the Product Collection.
|
||||
type: array
|
||||
items:
|
||||
description: The ID of a Product to add to the Product Collection.
|
||||
type: string
|
||||
tags:
|
||||
- Collection
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the collection
|
||||
object:
|
||||
type: string
|
||||
description: The type of object the removal was executed on
|
||||
default: product-collection
|
||||
removed_products:
|
||||
description: The IDs of the products removed from the collection
|
||||
type: array
|
||||
items:
|
||||
description: The ID of a Product to add to the Product Collection.
|
||||
type: string
|
||||
170
docs/api/admin/paths/customer-groups.yaml
Normal file
170
docs/api/admin/paths/customer-groups.yaml
Normal file
@@ -0,0 +1,170 @@
|
||||
post:
|
||||
operationId: PostCustomerGroups
|
||||
summary: Create a CustomerGroup
|
||||
description: Creates a CustomerGroup.
|
||||
x-authenticated: true
|
||||
parameters: []
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_group:
|
||||
$ref: ../components/schemas/customer_group.yaml
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the customer group
|
||||
metadata:
|
||||
type: object
|
||||
description: Metadata for the customer.
|
||||
get:
|
||||
operationId: GetCustomerGroups
|
||||
summary: Retrieve a list of customer groups
|
||||
description: Retrieve a list of customer groups.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
description: Query used for searching customer group names.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many groups to skip in the result.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: order
|
||||
description: the field used to order the customer groups.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
style: form
|
||||
explode: false
|
||||
description: Filter by the customer group ID
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
description: customer group ID
|
||||
- type: array
|
||||
description: multiple customer group IDs
|
||||
items:
|
||||
type: string
|
||||
- type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by IDs less than this ID
|
||||
gt:
|
||||
type: string
|
||||
description: filter by IDs greater than this ID
|
||||
lte:
|
||||
type: string
|
||||
description: filter by IDs less than or equal to this ID
|
||||
gte:
|
||||
type: string
|
||||
description: filter by IDs greater than or equal to this ID
|
||||
- in: query
|
||||
name: name
|
||||
style: form
|
||||
explode: false
|
||||
description: Filter by the customer group name
|
||||
schema:
|
||||
type: array
|
||||
description: multiple customer group names
|
||||
items:
|
||||
type: string
|
||||
description: customer group name
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting customer groups were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting customer groups were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of customer groups returned.
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each customer
|
||||
groups of the result.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_groups:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/customer_group.yaml
|
||||
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
|
||||
99
docs/api/admin/paths/customer-groups_{id}.yaml
Normal file
99
docs/api/admin/paths/customer-groups_{id}.yaml
Normal file
@@ -0,0 +1,99 @@
|
||||
delete:
|
||||
operationId: DeleteCustomerGroupsCustomerGroup
|
||||
summary: Delete a CustomerGroup
|
||||
description: Deletes a CustomerGroup.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Customer Group
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted customer group.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: customer_group
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether the customer group was deleted successfully or not.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetCustomerGroupsGroup
|
||||
summary: Retrieve a CustomerGroup
|
||||
description: Retrieves a Customer Group.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Customer Group.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: (Comma separated) Which fields should be expanded in the customer group.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: (Comma separated) Which fields should be included in the customer group.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_group:
|
||||
$ref: ../components/schemas/customer_group.yaml
|
||||
post:
|
||||
operationId: PostCustomerGroupsGroup
|
||||
summary: Update a CustomerGroup
|
||||
description: Update a CustomerGroup.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the customer group.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
name:
|
||||
description: Name of the customer group
|
||||
type: string
|
||||
metadata:
|
||||
description: Metadata for the customer.
|
||||
type: object
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_group:
|
||||
$ref: ../components/schemas/customer_group.yaml
|
||||
34
docs/api/admin/paths/customer-groups_{id}_customers.yaml
Normal file
34
docs/api/admin/paths/customer-groups_{id}_customers.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
get:
|
||||
operationId: GetCustomerGroupsGroupCustomers
|
||||
summary: List Customers
|
||||
description: Retrieves a list of customers in a customer group
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the customer group.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customers:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/customer.yaml
|
||||
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
|
||||
@@ -0,0 +1,80 @@
|
||||
post:
|
||||
operationId: PostCustomerGroupsGroupCustomersBatch
|
||||
summary: 'Add a list of customers to a customer group '
|
||||
description: Adds a list of customers, represented by id's, to a customer group.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the customer group.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- customer_ids
|
||||
properties:
|
||||
customer_ids:
|
||||
description: The ids of the customers to add
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: ID of the customer
|
||||
type: string
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_group:
|
||||
$ref: ../components/schemas/customer_group.yaml
|
||||
delete:
|
||||
operationId: DeleteCustomerGroupsGroupCustomerBatch
|
||||
summary: 'Remove a list of customers from a customer group '
|
||||
description: Removes a list of customers, represented by id's, from a customer group.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the customer group.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- customer_ids
|
||||
properties:
|
||||
customer_ids:
|
||||
description: The ids of the customers to remove
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: ID of the customer
|
||||
type: string
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_group:
|
||||
$ref: ../components/schemas/customer_group.yaml
|
||||
98
docs/api/admin/paths/customers.yaml
Normal file
98
docs/api/admin/paths/customers.yaml
Normal file
@@ -0,0 +1,98 @@
|
||||
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.yaml
|
||||
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.yaml
|
||||
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
|
||||
103
docs/api/admin/paths/customers_{id}.yaml
Normal file
103
docs/api/admin/paths/customers_{id}.yaml
Normal file
@@ -0,0 +1,103 @@
|
||||
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.yaml
|
||||
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.yaml
|
||||
250
docs/api/admin/paths/discounts.yaml
Normal file
250
docs/api/admin/paths/discounts.yaml
Normal file
@@ -0,0 +1,250 @@
|
||||
post:
|
||||
operationId: PostDiscounts
|
||||
summary: Creates a Discount
|
||||
x-authenticated: true
|
||||
description: >-
|
||||
Creates a Discount with a given set of rules that define how the Discount
|
||||
behaves.
|
||||
parameters:
|
||||
- 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:
|
||||
required:
|
||||
- code
|
||||
- rule
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
description: A unique code that will be used to redeem the Discount
|
||||
is_dynamic:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the Discount should have multiple instances of itself,
|
||||
each with a different code. This can be useful for automatically
|
||||
generated codes that all have to follow a common set of rules.
|
||||
default: false
|
||||
rule:
|
||||
description: The Discount Rule that defines how Discounts are calculated
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
- value
|
||||
- allocation
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
description: A short description of the discount
|
||||
type:
|
||||
type: string
|
||||
description: >-
|
||||
The type of the Discount, can be `fixed` for discounts that
|
||||
reduce the price by a fixed amount, `percentage` for
|
||||
percentage reductions or `free_shipping` for shipping
|
||||
vouchers.
|
||||
enum:
|
||||
- fixed
|
||||
- percentage
|
||||
- free_shipping
|
||||
value:
|
||||
type: number
|
||||
description: >-
|
||||
The value that the discount represents; this will depend on
|
||||
the type of the discount
|
||||
allocation:
|
||||
type: string
|
||||
description: The scope that the discount should apply to.
|
||||
enum:
|
||||
- total
|
||||
- item
|
||||
conditions:
|
||||
type: array
|
||||
description: >-
|
||||
A set of conditions that can be used to limit when the
|
||||
discount can be used. Only one of `products`,
|
||||
`product_types`, `product_collections`, `product_tags`, and
|
||||
`customer_groups` should be provided.
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- operator
|
||||
properties:
|
||||
operator:
|
||||
type: string
|
||||
description: Operator of the condition
|
||||
enum:
|
||||
- in
|
||||
- not_in
|
||||
products:
|
||||
type: array
|
||||
description: >-
|
||||
list of product IDs if the condition is applied on
|
||||
products.
|
||||
items:
|
||||
type: string
|
||||
product_types:
|
||||
type: array
|
||||
description: >-
|
||||
list of product type IDs if the condition is applied
|
||||
on product types.
|
||||
items:
|
||||
type: string
|
||||
product_collections:
|
||||
type: array
|
||||
description: >-
|
||||
list of product collection IDs if the condition is
|
||||
applied on product collections.
|
||||
items:
|
||||
type: string
|
||||
product_tags:
|
||||
type: array
|
||||
description: >-
|
||||
list of product tag IDs if the condition is applied on
|
||||
product tags.
|
||||
items:
|
||||
type: string
|
||||
customer_groups:
|
||||
type: array
|
||||
description: >-
|
||||
list of customer group IDs if the condition is applied
|
||||
on customer groups.
|
||||
items:
|
||||
type: string
|
||||
is_disabled:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the Discount code is disabled on creation. You will have
|
||||
to enable it later to make it available to Customers.
|
||||
default: false
|
||||
starts_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The time at which the Discount should be available.
|
||||
ends_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The time at which the Discount should no longer be available.
|
||||
valid_duration:
|
||||
type: string
|
||||
description: Duration the discount runs between
|
||||
example: P3Y6M4DT12H30M5S
|
||||
regions:
|
||||
description: >-
|
||||
A list of Region ids representing the Regions in which the
|
||||
Discount can be used.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
usage_limit:
|
||||
type: number
|
||||
description: Maximum times the discount can be used
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
get:
|
||||
operationId: GetDiscounts
|
||||
summary: List Discounts
|
||||
x-authenticated: true
|
||||
description: Retrieves a list of Discounts
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
description: Search query applied on the code field.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: rule
|
||||
description: Discount Rules filters to apply on the search
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- fixed
|
||||
- percentage
|
||||
- free_shipping
|
||||
description: >-
|
||||
The type of the Discount, can be `fixed` for discounts that reduce
|
||||
the price by a fixed amount, `percentage` for percentage
|
||||
reductions or `free_shipping` for shipping vouchers.
|
||||
allocation:
|
||||
type: string
|
||||
enum:
|
||||
- total
|
||||
- item
|
||||
description: >-
|
||||
The value that the discount represents; this will depend on the
|
||||
type of the discount
|
||||
- in: query
|
||||
name: is_dynamic
|
||||
description: Return only dynamic discounts.
|
||||
schema:
|
||||
type: boolean
|
||||
- in: query
|
||||
name: is_disabled
|
||||
description: Return only disabled discounts.
|
||||
schema:
|
||||
type: boolean
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of items in the response
|
||||
schema:
|
||||
type: number
|
||||
default: '20'
|
||||
- in: query
|
||||
name: offset
|
||||
description: The offset of items in response
|
||||
schema:
|
||||
type: number
|
||||
default: '0'
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated list of relations to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discounts:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
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
|
||||
33
docs/api/admin/paths/discounts_code_{code}.yaml
Normal file
33
docs/api/admin/paths/discounts_code_{code}.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
get:
|
||||
operationId: GetDiscountsDiscountCode
|
||||
summary: Retrieve a Discount by code
|
||||
description: Retrieves a Discount by its discount code
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: code
|
||||
required: true
|
||||
description: The code of the Discount
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated list of relations to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: Comma separated list of fields to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
86
docs/api/admin/paths/discounts_{discount_id}_conditions.yaml
Normal file
86
docs/api/admin/paths/discounts_{discount_id}_conditions.yaml
Normal file
@@ -0,0 +1,86 @@
|
||||
post:
|
||||
operationId: PostDiscountsDiscountConditions
|
||||
summary: >-
|
||||
Creates a DiscountCondition. Only one of `products`, `product_types`,
|
||||
`product_collections`, `product_tags`, and `customer_groups` should be
|
||||
provided.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: discount_id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each product of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each product of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
description: Creates a DiscountCondition
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- operator
|
||||
properties:
|
||||
operator:
|
||||
description: Operator of the condition
|
||||
type: string
|
||||
enum:
|
||||
- in
|
||||
- not_in
|
||||
products:
|
||||
type: array
|
||||
description: list of product IDs if the condition is applied on products.
|
||||
items:
|
||||
type: string
|
||||
product_types:
|
||||
type: array
|
||||
description: >-
|
||||
list of product type IDs if the condition is applied on product
|
||||
types.
|
||||
items:
|
||||
type: string
|
||||
product_collections:
|
||||
type: array
|
||||
description: >-
|
||||
list of product collection IDs if the condition is applied on
|
||||
product collections.
|
||||
items:
|
||||
type: string
|
||||
product_tags:
|
||||
type: array
|
||||
description: >-
|
||||
list of product tag IDs if the condition is applied on product
|
||||
tags.
|
||||
items:
|
||||
type: string
|
||||
customer_groups:
|
||||
type: array
|
||||
description: >-
|
||||
list of customer group IDs if the condition is applied on
|
||||
customer groups.
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
- Discount Condition
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
@@ -0,0 +1,176 @@
|
||||
delete:
|
||||
operationId: DeleteDiscountsDiscountConditionsCondition
|
||||
summary: Delete a DiscountCondition
|
||||
description: Deletes a DiscountCondition
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: discount_id
|
||||
required: true
|
||||
description: The ID of the Discount
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: condition_id
|
||||
required: true
|
||||
description: The ID of the DiscountCondition
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated list of relations to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: Comma separated list of fields to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount Condition
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted DiscountCondition
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: discount-condition
|
||||
deleted:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the discount condition was deleted successfully or
|
||||
not.
|
||||
default: true
|
||||
discount:
|
||||
description: The Discount to which the condition used to belong
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
get:
|
||||
operationId: GetDiscountsDiscountConditionsCondition
|
||||
summary: Gets a DiscountCondition
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: discount_id
|
||||
required: true
|
||||
description: The ID of the Discount.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: condition_id
|
||||
required: true
|
||||
description: The ID of the DiscountCondition.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated list of relations to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: Comma separated list of fields to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
description: Gets a DiscountCondition
|
||||
tags:
|
||||
- Discount Condition
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount_condition:
|
||||
$ref: ../components/schemas/discount_condition.yaml
|
||||
post:
|
||||
operationId: PostDiscountsDiscountConditionsCondition
|
||||
summary: >-
|
||||
Updates a DiscountCondition. Only one of `products`, `product_types`,
|
||||
`product_collections`, `product_tags`, and `customer_groups` should be
|
||||
provided.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: discount_id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: condition_id
|
||||
required: true
|
||||
description: The ID of the DiscountCondition.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each item of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each item of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
description: Updates a DiscountCondition
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
products:
|
||||
type: array
|
||||
description: list of product IDs if the condition is applied on products.
|
||||
items:
|
||||
type: string
|
||||
product_types:
|
||||
type: array
|
||||
description: >-
|
||||
list of product type IDs if the condition is applied on product
|
||||
types.
|
||||
items:
|
||||
type: string
|
||||
product_collections:
|
||||
type: array
|
||||
description: >-
|
||||
list of product collection IDs if the condition is applied on
|
||||
product collections.
|
||||
items:
|
||||
type: string
|
||||
product_tags:
|
||||
type: array
|
||||
description: >-
|
||||
list of product tag IDs if the condition is applied on product
|
||||
tags.
|
||||
items:
|
||||
type: string
|
||||
customer_groups:
|
||||
type: array
|
||||
description: >-
|
||||
list of customer group IDs if the condition is applied on
|
||||
customer groups.
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
221
docs/api/admin/paths/discounts_{id}.yaml
Normal file
221
docs/api/admin/paths/discounts_{id}.yaml
Normal file
@@ -0,0 +1,221 @@
|
||||
delete:
|
||||
operationId: DeleteDiscountsDiscount
|
||||
summary: Delete a Discount
|
||||
description: Deletes a Discount.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Discount
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: discount
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether the discount was deleted successfully or not.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetDiscountsDiscount
|
||||
summary: Retrieve a Discount
|
||||
description: Retrieves a Discount
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated list of relations to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: Comma separated list of fields to include in the results.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
post:
|
||||
operationId: PostDiscountsDiscount
|
||||
summary: Update a Discount
|
||||
description: >-
|
||||
Updates a Discount with a given set of rules that define how the Discount
|
||||
behaves.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each item of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each item of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
description: A unique code that will be used to redeem the Discount
|
||||
rule:
|
||||
description: The Discount Rule that defines how Discounts are calculated
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the Rule
|
||||
description:
|
||||
type: string
|
||||
description: A short description of the discount
|
||||
value:
|
||||
type: number
|
||||
description: >-
|
||||
The value that the discount represents; this will depend on
|
||||
the type of the discount
|
||||
allocation:
|
||||
type: string
|
||||
description: The scope that the discount should apply to.
|
||||
enum:
|
||||
- total
|
||||
- item
|
||||
conditions:
|
||||
type: array
|
||||
description: >-
|
||||
A set of conditions that can be used to limit when the
|
||||
discount can be used. Only one of `products`,
|
||||
`product_types`, `product_collections`, `product_tags`, and
|
||||
`customer_groups` should be provided.
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- operator
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the Rule
|
||||
operator:
|
||||
type: string
|
||||
description: Operator of the condition
|
||||
enum:
|
||||
- in
|
||||
- not_in
|
||||
products:
|
||||
type: array
|
||||
description: >-
|
||||
list of product IDs if the condition is applied on
|
||||
products.
|
||||
items:
|
||||
type: string
|
||||
product_types:
|
||||
type: array
|
||||
description: >-
|
||||
list of product type IDs if the condition is applied
|
||||
on product types.
|
||||
items:
|
||||
type: string
|
||||
product_collections:
|
||||
type: array
|
||||
description: >-
|
||||
list of product collection IDs if the condition is
|
||||
applied on product collections.
|
||||
items:
|
||||
type: string
|
||||
product_tags:
|
||||
type: array
|
||||
description: >-
|
||||
list of product tag IDs if the condition is applied on
|
||||
product tags.
|
||||
items:
|
||||
type: string
|
||||
customer_groups:
|
||||
type: array
|
||||
description: >-
|
||||
list of customer group IDs if the condition is applied
|
||||
on customer groups.
|
||||
items:
|
||||
type: string
|
||||
is_disabled:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the Discount code is disabled on creation. You will have
|
||||
to enable it later to make it available to Customers.
|
||||
starts_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The time at which the Discount should be available.
|
||||
ends_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The time at which the Discount should no longer be available.
|
||||
valid_duration:
|
||||
type: string
|
||||
description: Duration the discount runs between
|
||||
example: P3Y6M4DT12H30M5S
|
||||
usage_limit:
|
||||
type: number
|
||||
description: Maximum times the discount can be used
|
||||
regions:
|
||||
description: >-
|
||||
A list of Region ids representing the Regions in which the
|
||||
Discount can be used.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
metadata:
|
||||
description: An object containing metadata of the discount
|
||||
type: object
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
45
docs/api/admin/paths/discounts_{id}_dynamic-codes.yaml
Normal file
45
docs/api/admin/paths/discounts_{id}_dynamic-codes.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
post:
|
||||
operationId: PostDiscountsDiscountDynamicCodes
|
||||
summary: Create a dynamic Discount code
|
||||
description: >-
|
||||
Creates a unique code that can map to a parent Discount. This is useful if
|
||||
you want to automatically generate codes with the same behaviour.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount to create the dynamic code from."
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
type: string
|
||||
description: The unique code that will be used to redeem the Discount.
|
||||
usage_limit:
|
||||
type: number
|
||||
default: '1'
|
||||
description: amount of times the discount can be applied.
|
||||
metadata:
|
||||
type: object
|
||||
description: >-
|
||||
An optional set of key-value paris to hold additional
|
||||
information.
|
||||
@@ -0,0 +1,29 @@
|
||||
delete:
|
||||
operationId: DeleteDiscountsDiscountDynamicCodesCode
|
||||
summary: Delete a dynamic code
|
||||
description: Deletes a dynamic code from a Discount.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: code
|
||||
required: true
|
||||
description: The ID of the Discount
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
58
docs/api/admin/paths/discounts_{id}_regions_{region_id}.yaml
Normal file
58
docs/api/admin/paths/discounts_{id}_regions_{region_id}.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
post:
|
||||
operationId: PostDiscountsDiscountRegionsRegion
|
||||
summary: Adds Region availability
|
||||
description: Adds a Region to the list of Regions that a Discount can be used in.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: region_id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
delete:
|
||||
operationId: DeleteDiscountsDiscountRegionsRegion
|
||||
summary: Remove Region availability
|
||||
x-authenticated: true
|
||||
description: Removes a Region from the list of Regions that a Discount can be used in.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Discount.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: region_id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Discount
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
discount:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
162
docs/api/admin/paths/draft-orders.yaml
Normal file
162
docs/api/admin/paths/draft-orders.yaml
Normal file
@@ -0,0 +1,162 @@
|
||||
post:
|
||||
operationId: PostDraftOrders
|
||||
summary: Create a Draft Order
|
||||
description: Creates a Draft Order
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- email
|
||||
- items
|
||||
- region_id
|
||||
- shipping_methods
|
||||
properties:
|
||||
status:
|
||||
description: The status of the draft order
|
||||
type: string
|
||||
enum:
|
||||
- open
|
||||
- completed
|
||||
email:
|
||||
description: The email of the customer of the draft order
|
||||
type: string
|
||||
format: email
|
||||
billing_address:
|
||||
description: The Address to be used for billing purposes.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
shipping_address:
|
||||
description: The Address to be used for shipping.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
items:
|
||||
description: The Line Items that have been received.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- quantity
|
||||
properties:
|
||||
variant_id:
|
||||
description: >-
|
||||
The ID of the Product Variant to generate the Line Item
|
||||
from.
|
||||
type: string
|
||||
unit_price:
|
||||
description: The potential custom price of the item.
|
||||
type: integer
|
||||
title:
|
||||
description: The potential custom title of the item.
|
||||
type: string
|
||||
quantity:
|
||||
description: The quantity of the Line Item.
|
||||
type: integer
|
||||
metadata:
|
||||
description: >-
|
||||
The optional key-value map with additional details about
|
||||
the Line Item.
|
||||
type: object
|
||||
region_id:
|
||||
description: The ID of the region for the draft order
|
||||
type: string
|
||||
discounts:
|
||||
description: The discounts to add on the draft order
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- code
|
||||
properties:
|
||||
code:
|
||||
description: The code of the discount to apply
|
||||
type: string
|
||||
customer_id:
|
||||
description: The ID of the customer to add on the draft order
|
||||
type: string
|
||||
no_notification_order:
|
||||
description: >-
|
||||
An optional flag passed to the resulting order to determine use
|
||||
of notifications.
|
||||
type: boolean
|
||||
shipping_methods:
|
||||
description: The shipping methods for the draft order
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- option_id
|
||||
properties:
|
||||
option_id:
|
||||
description: The ID of the shipping option in use
|
||||
type: string
|
||||
data:
|
||||
description: >-
|
||||
The optional additional data needed for the shipping
|
||||
method
|
||||
type: object
|
||||
price:
|
||||
description: The potential custom price of the shipping
|
||||
type: integer
|
||||
metadata:
|
||||
description: >-
|
||||
The optional key-value map with additional details about the
|
||||
Draft Order.
|
||||
type: object
|
||||
tags:
|
||||
- Draft Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
draft_order:
|
||||
$ref: ../components/schemas/draft-order.yaml
|
||||
get:
|
||||
operationId: GetDraftOrders
|
||||
summary: List Draft Orders
|
||||
description: Retrieves an list of Draft Orders
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: offset
|
||||
description: The number of items to skip before the results.
|
||||
schema:
|
||||
type: number
|
||||
default: '0'
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of items returned.
|
||||
schema:
|
||||
type: number
|
||||
default: '50'
|
||||
- in: query
|
||||
name: q
|
||||
description: >-
|
||||
a search term to search emails in carts associated with draft orders and
|
||||
display IDs of draft orders
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Draft Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
draft_orders:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/draft-order.yaml
|
||||
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
|
||||
55
docs/api/admin/paths/draft-orders_{id}.yaml
Normal file
55
docs/api/admin/paths/draft-orders_{id}.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
delete:
|
||||
operationId: DeleteDraftOrdersDraftOrder
|
||||
summary: Delete a Draft Order
|
||||
description: Deletes a Draft Order
|
||||
x-authenticated: true
|
||||
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.
|
||||
default: draft-order
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether the draft order was deleted successfully or not.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetDraftOrdersDraftOrder
|
||||
summary: Retrieve a Draft Order
|
||||
description: Retrieves a Draft Order.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
48
docs/api/admin/paths/draft-orders_{id}_line-items.yaml
Normal file
48
docs/api/admin/paths/draft-orders_{id}_line-items.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
post:
|
||||
operationId: PostDraftOrdersDraftOrderLineItems
|
||||
summary: Create a Line Item for Draft Order
|
||||
description: Creates a Line Item for the Draft Order
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Draft Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- quantity
|
||||
properties:
|
||||
variant_id:
|
||||
description: The ID of the Product Variant to generate the Line Item from.
|
||||
type: string
|
||||
unit_price:
|
||||
description: The potential custom price of the item.
|
||||
type: integer
|
||||
title:
|
||||
description: The potential custom title of the item.
|
||||
type: string
|
||||
default: Custom item
|
||||
quantity:
|
||||
description: The quantity of the Line Item.
|
||||
type: integer
|
||||
metadata:
|
||||
description: >-
|
||||
The optional key-value map with additional details about the
|
||||
Line Item.
|
||||
type: object
|
||||
tags:
|
||||
- Draft Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
draft_order:
|
||||
$ref: ../components/schemas/draft-order.yaml
|
||||
@@ -0,0 +1,77 @@
|
||||
delete:
|
||||
operationId: DeleteDraftOrdersDraftOrderLineItemsItem
|
||||
summary: Delete a Line Item
|
||||
description: Removes a Line Item from a Draft Order.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
post:
|
||||
operationId: PostDraftOrdersDraftOrderLineItemsItem
|
||||
summary: Update a Line Item for a Draft Order
|
||||
description: Updates a Line Item for a Draft Order
|
||||
x-authenticated: true
|
||||
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 Line Item.
|
||||
schema:
|
||||
type: string
|
||||
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.yaml
|
||||
23
docs/api/admin/paths/draft-orders_{id}_pay.yaml
Normal file
23
docs/api/admin/paths/draft-orders_{id}_pay.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
summary: Registers a payment for a Draft Order
|
||||
operationId: PostDraftOrdersDraftOrderRegisterPayment
|
||||
description: Registers a payment for a Draft Order.
|
||||
x-authenticated: true
|
||||
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:
|
||||
order:
|
||||
$ref: ../components/schemas/draft-order.yaml
|
||||
90
docs/api/admin/paths/gift-cards.yaml
Normal file
90
docs/api/admin/paths/gift-cards.yaml
Normal file
@@ -0,0 +1,90 @@
|
||||
post:
|
||||
operationId: PostGiftCards
|
||||
summary: Create a Gift Card
|
||||
description: >-
|
||||
Creates a Gift Card that can redeemed by its unique code. The Gift Card is
|
||||
only valid within 1 region.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- region_id
|
||||
properties:
|
||||
value:
|
||||
type: integer
|
||||
description: The value (excluding VAT) that the Gift Card should represent.
|
||||
is_disabled:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the Gift Card is disabled on creation. You will have to
|
||||
enable it later to make it available to Customers.
|
||||
ends_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The time at which the Gift Card should no longer be available.
|
||||
region_id:
|
||||
description: The ID of the Region in which the Gift Card can be used.
|
||||
type: string
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: ../components/schemas/gift_card.yaml
|
||||
get:
|
||||
operationId: GetGiftCards
|
||||
summary: List Gift Cards
|
||||
description: Retrieves a list of Gift Cards.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: offset
|
||||
description: The number of items to skip before the results.
|
||||
schema:
|
||||
type: number
|
||||
default: '0'
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of items returned.
|
||||
schema:
|
||||
type: number
|
||||
default: '50'
|
||||
- in: query
|
||||
name: q
|
||||
description: a search term to search by code or display ID
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
gift_cards:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/gift_card.yaml
|
||||
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
|
||||
105
docs/api/admin/paths/gift-cards_{id}.yaml
Normal file
105
docs/api/admin/paths/gift-cards_{id}.yaml
Normal file
@@ -0,0 +1,105 @@
|
||||
delete:
|
||||
operationId: DeleteGiftCardsGiftCard
|
||||
summary: Delete a Gift Card
|
||||
description: Deletes a Gift Card
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Gift Card to delete.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Gift Card
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: gift-card
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether the gift card was deleted successfully or not.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetGiftCardsGiftCard
|
||||
summary: Retrieve a Gift Card
|
||||
description: Retrieves a Gift Card.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Gift Card.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: ../components/schemas/gift_card.yaml
|
||||
post:
|
||||
operationId: PostGiftCardsGiftCard
|
||||
summary: Create a Gift Card
|
||||
description: >-
|
||||
Creates a Gift Card that can redeemed by its unique code. The Gift Card is
|
||||
only valid within 1 region.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Gift Card.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
balance:
|
||||
type: integer
|
||||
description: The value (excluding VAT) that the Gift Card should represent.
|
||||
is_disabled:
|
||||
type: boolean
|
||||
description: >-
|
||||
Whether the Gift Card is disabled on creation. You will have to
|
||||
enable it later to make it available to Customers.
|
||||
ends_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: The time at which the Gift Card should no longer be available.
|
||||
region_id:
|
||||
description: The ID of the Region in which the Gift Card can be used.
|
||||
type: string
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Gift Card
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
gift_card:
|
||||
$ref: ../components/schemas/gift_card.yaml
|
||||
47
docs/api/admin/paths/invites.yaml
Normal file
47
docs/api/admin/paths/invites.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
post:
|
||||
operationId: PostInvites
|
||||
summary: Create an Invite
|
||||
description: Creates an Invite and triggers an 'invite' created event
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- user
|
||||
- role
|
||||
properties:
|
||||
user:
|
||||
description: The email for the user to be created.
|
||||
type: string
|
||||
format: email
|
||||
role:
|
||||
description: The role of the user to be created.
|
||||
type: string
|
||||
enum:
|
||||
- admin
|
||||
- member
|
||||
- developer
|
||||
tags:
|
||||
- Invite
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
get:
|
||||
operationId: GetInvites
|
||||
summary: Lists all Invites
|
||||
description: Lists all Invites
|
||||
x-authenticated: true
|
||||
tags:
|
||||
- Invite
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
invites:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/invite.yaml
|
||||
38
docs/api/admin/paths/invites_accept.yaml
Normal file
38
docs/api/admin/paths/invites_accept.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
post:
|
||||
operationId: PostInvitesInviteAccept
|
||||
summary: Accept an Invite
|
||||
description: Accepts an Invite and creates a corresponding user
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- token
|
||||
- user
|
||||
properties:
|
||||
token:
|
||||
description: The invite token provided by the admin.
|
||||
type: string
|
||||
user:
|
||||
description: The User to create.
|
||||
type: object
|
||||
required:
|
||||
- first_name
|
||||
- last_name
|
||||
- password
|
||||
properties:
|
||||
first_name:
|
||||
type: string
|
||||
description: the first name of the User
|
||||
last_name:
|
||||
type: string
|
||||
description: the last name of the User
|
||||
password:
|
||||
description: The desired password for the User
|
||||
type: string
|
||||
format: password
|
||||
tags:
|
||||
- Invite
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
32
docs/api/admin/paths/invites_{invite_id}.yaml
Normal file
32
docs/api/admin/paths/invites_{invite_id}.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
delete:
|
||||
operationId: DeleteInvitesInvite
|
||||
summary: Create an Invite
|
||||
description: Creates an Invite and triggers an 'invite' created event
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: invite_id
|
||||
required: true
|
||||
description: The ID of the Invite
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Invite
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Invite.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
format: invite
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the Invite was deleted.
|
||||
default: true
|
||||
17
docs/api/admin/paths/invites_{invite_id}_resend.yaml
Normal file
17
docs/api/admin/paths/invites_{invite_id}_resend.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
post:
|
||||
operationId: PostInvitesInviteResend
|
||||
summary: Resend an Invite
|
||||
description: Resends an Invite by triggering the 'invite' created event again
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: invite_id
|
||||
required: true
|
||||
description: The ID of the Invite
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Invite
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
79
docs/api/admin/paths/notes.yaml
Normal file
79
docs/api/admin/paths/notes.yaml
Normal file
@@ -0,0 +1,79 @@
|
||||
post:
|
||||
operationId: PostNotes
|
||||
summary: Creates a Note
|
||||
description: Creates a Note which can be associated with any resource as required.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- resource_id
|
||||
- resource_type
|
||||
- value
|
||||
properties:
|
||||
resource_id:
|
||||
type: string
|
||||
description: The ID of the resource which the Note relates to.
|
||||
resource_type:
|
||||
type: string
|
||||
description: The type of resource which the Note relates to.
|
||||
value:
|
||||
type: string
|
||||
description: The content of the Note to create.
|
||||
tags:
|
||||
- Note
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
note:
|
||||
$ref: ../components/schemas/note.yaml
|
||||
get:
|
||||
operationId: GetNotes
|
||||
summary: List Notes
|
||||
x-authenticated: true
|
||||
description: Retrieves a list of notes
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of notes to get
|
||||
schema:
|
||||
type: number
|
||||
default: '50'
|
||||
- in: query
|
||||
name: offset
|
||||
description: The offset at which to get notes
|
||||
schema:
|
||||
type: number
|
||||
default: '0'
|
||||
- in: query
|
||||
name: resource_id
|
||||
description: The ID which the notes belongs to
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Note
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
notes:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/note.yaml
|
||||
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
|
||||
88
docs/api/admin/paths/notes_{id}.yaml
Normal file
88
docs/api/admin/paths/notes_{id}.yaml
Normal file
@@ -0,0 +1,88 @@
|
||||
delete:
|
||||
operationId: DeleteNotesNote
|
||||
summary: Deletes a Note
|
||||
description: Deletes a Note.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Note to delete.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Note
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Note.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: note
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the Note was deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetNotesNote
|
||||
summary: Get Note
|
||||
description: Retrieves a single note using its id
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the note to retrieve.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Note
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
note:
|
||||
$ref: ../components/schemas/note.yaml
|
||||
post:
|
||||
operationId: PostNotesNote
|
||||
summary: Updates a Note
|
||||
x-authenticated: true
|
||||
description: Updates a Note associated with some resource
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Note to update
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
description: The updated description of the Note.
|
||||
tags:
|
||||
- Note
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
note:
|
||||
$ref: ../components/schemas/note.yaml
|
||||
72
docs/api/admin/paths/notifications.yaml
Normal file
72
docs/api/admin/paths/notifications.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
get:
|
||||
operationId: GetNotifications
|
||||
summary: List Notifications
|
||||
description: Retrieves a list of Notifications.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: offset
|
||||
description: >-
|
||||
The number of notifications to skip before starting to collect the
|
||||
notifications set
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of notifications to return
|
||||
schema:
|
||||
type: integer
|
||||
default: 50
|
||||
- in: query
|
||||
name: fields
|
||||
description: Comma separated fields to include in the result set
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated fields to populate
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: event_name
|
||||
description: The name of the event that the notification was sent for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: resource_type
|
||||
description: The type of resource that the Notification refers to.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: resource_id
|
||||
description: The ID of the resource that the Notification refers to.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: to
|
||||
description: >-
|
||||
The address that the Notification was sent to. This will usually be an
|
||||
email address, but represent other addresses such as a chat bot user id
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: include_resends
|
||||
description: >-
|
||||
A boolean indicating whether the result set should include resent
|
||||
notifications or not
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Notification
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
notifications:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/notification.yaml
|
||||
35
docs/api/admin/paths/notifications_{id}_resend.yaml
Normal file
35
docs/api/admin/paths/notifications_{id}_resend.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
post:
|
||||
operationId: PostNotificationsNotificationResend
|
||||
summary: Resend Notification
|
||||
description: >-
|
||||
Resends a previously sent notifications, with the same data but optionally
|
||||
to a different address
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Notification
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
to:
|
||||
description: >-
|
||||
A new address or user identifier that the Notification should be
|
||||
sent to
|
||||
type: string
|
||||
tags:
|
||||
- Notification
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
notification:
|
||||
$ref: ../components/schemas/notification.yaml
|
||||
144
docs/api/admin/paths/order_{id}_claims.yaml
Normal file
144
docs/api/admin/paths/order_{id}_claims.yaml
Normal file
@@ -0,0 +1,144 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderClaims
|
||||
summary: Create a Claim
|
||||
description: Creates a Claim.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- type
|
||||
- claim_items
|
||||
properties:
|
||||
type:
|
||||
description: >-
|
||||
The type of the Claim. This will determine how the Claim is
|
||||
treated: `replace` Claims will result in a Fulfillment with new
|
||||
items being created, while a `refund` Claim will refund the
|
||||
amount paid for the claimed items.
|
||||
type: string
|
||||
enum:
|
||||
- replace
|
||||
- refund
|
||||
claim_items:
|
||||
description: The Claim Items that the Claim will consist of.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- item_id
|
||||
- quantity
|
||||
properties:
|
||||
item_id:
|
||||
description: The ID of the Line Item that will be claimed.
|
||||
type: string
|
||||
quantity:
|
||||
description: The number of items that will be returned
|
||||
type: integer
|
||||
note:
|
||||
description: Short text describing the Claim Item in further detail.
|
||||
type: string
|
||||
reason:
|
||||
description: The reason for the Claim
|
||||
type: string
|
||||
enum:
|
||||
- missing_item
|
||||
- wrong_item
|
||||
- production_failure
|
||||
- other
|
||||
tags:
|
||||
description: A list o tags to add to the Claim Item
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
images:
|
||||
description: >-
|
||||
A list of image URL's that will be associated with the
|
||||
Claim
|
||||
items:
|
||||
type: string
|
||||
return_shipping:
|
||||
description: >-
|
||||
Optional details for the Return Shipping Method, if the items
|
||||
are to be sent back.
|
||||
type: object
|
||||
properties:
|
||||
option_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the Shipping Option to create the Shipping Method
|
||||
from.
|
||||
price:
|
||||
type: integer
|
||||
description: The price to charge for the Shipping Method.
|
||||
additional_items:
|
||||
description: >-
|
||||
The new items to send to the Customer when the Claim type is
|
||||
Replace.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- variant_id
|
||||
- quantity
|
||||
properties:
|
||||
variant_id:
|
||||
description: The ID of the Product Variant to ship.
|
||||
type: string
|
||||
quantity:
|
||||
description: The quantity of the Product Variant to ship.
|
||||
type: integer
|
||||
shipping_methods:
|
||||
description: The Shipping Methods to send the additional Line Items with.
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
description: The ID of an existing Shipping Method
|
||||
type: string
|
||||
option_id:
|
||||
description: >-
|
||||
The ID of the Shipping Option to create a Shipping Method
|
||||
from
|
||||
type: string
|
||||
price:
|
||||
description: The price to charge for the Shipping Method
|
||||
type: integer
|
||||
shipping_address:
|
||||
type: object
|
||||
description: >-
|
||||
An optional shipping address to send the claim to. Defaults to
|
||||
the parent order's shipping address
|
||||
$ref: ../components/schemas/address.yaml
|
||||
refund_amount:
|
||||
description: >-
|
||||
The amount to refund the Customer when the Claim type is
|
||||
`refund`.
|
||||
type: integer
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Claim.
|
||||
type: boolean
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Claim
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
120
docs/api/admin/paths/order_{id}_claims_{claim_id}.yaml
Normal file
120
docs/api/admin/paths/order_{id}_claims_{claim_id}.yaml
Normal file
@@ -0,0 +1,120 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderClaimsClaim
|
||||
summary: Update a Claim
|
||||
description: Updates a Claim.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: claim_id
|
||||
required: true
|
||||
description: The ID of the Claim.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
claim_items:
|
||||
description: The Claim Items that the Claim will consist of.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
- images
|
||||
- tags
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the Claim Item.
|
||||
type: string
|
||||
item_id:
|
||||
description: The ID of the Line Item that will be claimed.
|
||||
type: string
|
||||
quantity:
|
||||
description: The number of items that will be returned
|
||||
type: integer
|
||||
note:
|
||||
description: Short text describing the Claim Item in further detail.
|
||||
type: string
|
||||
reason:
|
||||
description: The reason for the Claim
|
||||
type: string
|
||||
enum:
|
||||
- missing_item
|
||||
- wrong_item
|
||||
- production_failure
|
||||
- other
|
||||
tags:
|
||||
description: A list o tags to add to the Claim Item
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Tag ID
|
||||
value:
|
||||
type: string
|
||||
description: Tag value
|
||||
images:
|
||||
description: >-
|
||||
A list of image URL's that will be associated with the
|
||||
Claim
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Image ID
|
||||
url:
|
||||
type: string
|
||||
description: Image URL
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
shipping_methods:
|
||||
description: The Shipping Methods to send the additional Line Items with.
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
description: The ID of an existing Shipping Method
|
||||
type: string
|
||||
option_id:
|
||||
description: >-
|
||||
The ID of the Shipping Option to create a Shipping Method
|
||||
from
|
||||
type: string
|
||||
price:
|
||||
description: The price to charge for the Shipping Method
|
||||
type: integer
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Swap.
|
||||
type: boolean
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Claim
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
107
docs/api/admin/paths/order_{id}_swaps.yaml
Normal file
107
docs/api/admin/paths/order_{id}_swaps.yaml
Normal file
@@ -0,0 +1,107 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderSwaps
|
||||
summary: Create a Swap
|
||||
description: >-
|
||||
Creates a Swap. Swaps are used to handle Return of previously purchased
|
||||
goods and Fulfillment of replacements simultaneously.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- return_items
|
||||
properties:
|
||||
return_items:
|
||||
description: The Line Items to return as part of the Swap.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- item_id
|
||||
- quantity
|
||||
properties:
|
||||
item_id:
|
||||
description: The ID of the Line Item that will be claimed.
|
||||
type: string
|
||||
quantity:
|
||||
description: The number of items that will be returned
|
||||
type: integer
|
||||
reason_id:
|
||||
description: The ID of the Return Reason to use.
|
||||
type: string
|
||||
note:
|
||||
description: An optional note with information about the Return.
|
||||
type: string
|
||||
return_shipping:
|
||||
description: How the Swap will be returned.
|
||||
type: object
|
||||
required:
|
||||
- option_id
|
||||
properties:
|
||||
option_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the Shipping Option to create the Shipping Method
|
||||
from.
|
||||
price:
|
||||
type: integer
|
||||
description: The price to charge for the Shipping Method.
|
||||
additional_items:
|
||||
description: The new items to send to the Customer.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- variant_id
|
||||
- quantity
|
||||
properties:
|
||||
variant_id:
|
||||
description: The ID of the Product Variant to ship.
|
||||
type: string
|
||||
quantity:
|
||||
description: The quantity of the Product Variant to ship.
|
||||
type: integer
|
||||
custom_shipping_options:
|
||||
description: >-
|
||||
The custom shipping options to potentially create a Shipping
|
||||
Method from.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- option_id
|
||||
- price
|
||||
properties:
|
||||
option_id:
|
||||
description: >-
|
||||
The ID of the Shipping Option to override with a custom
|
||||
price.
|
||||
type: string
|
||||
price:
|
||||
description: The custom price of the Shipping Option.
|
||||
type: integer
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Swap.
|
||||
type: boolean
|
||||
allow_backorder:
|
||||
description: If true, swaps can be completed with items out of stock
|
||||
type: boolean
|
||||
default: true
|
||||
tags:
|
||||
- Swap
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
241
docs/api/admin/paths/orders.yaml
Normal file
241
docs/api/admin/paths/orders.yaml
Normal file
@@ -0,0 +1,241 @@
|
||||
get:
|
||||
operationId: GetOrders
|
||||
summary: List Orders
|
||||
description: Retrieves a list of Orders
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
description: >-
|
||||
Query used for searching orders by shipping address first name, orders'
|
||||
email, and orders' display ID
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
description: ID of the order to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: status
|
||||
style: form
|
||||
explode: false
|
||||
description: Status to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- pending
|
||||
- completed
|
||||
- archived
|
||||
- canceled
|
||||
- requires_action
|
||||
- in: query
|
||||
name: fulfillment_status
|
||||
style: form
|
||||
explode: false
|
||||
description: Fulfillment status to search for.
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- not_fulfilled
|
||||
- fulfilled
|
||||
- partially_fulfilled
|
||||
- shipped
|
||||
- partially_shipped
|
||||
- canceled
|
||||
- returned
|
||||
- partially_returned
|
||||
- requires_action
|
||||
- in: query
|
||||
name: payment_status
|
||||
style: form
|
||||
explode: false
|
||||
description: Payment status to search for.
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- captured
|
||||
- awaiting
|
||||
- not_paid
|
||||
- refunded
|
||||
- partially_refunded
|
||||
- canceled
|
||||
- requires_action
|
||||
- in: query
|
||||
name: display_id
|
||||
description: Display ID to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: cart_id
|
||||
description: to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: customer_id
|
||||
description: to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: email
|
||||
description: to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: region_id
|
||||
style: form
|
||||
explode: false
|
||||
description: Regions to search orders by
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
description: ID of a Region.
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
description: ID of a Region.
|
||||
- in: query
|
||||
name: currency_code
|
||||
style: form
|
||||
explode: false
|
||||
description: Currency code to search for
|
||||
schema:
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
- in: query
|
||||
name: tax_rate
|
||||
description: to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting orders were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting orders were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: canceled_at
|
||||
description: Date comparison for when resulting orders were canceled.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: sales_channel_id
|
||||
style: form
|
||||
explode: false
|
||||
description: Filter by Sales Channels
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: The ID of a Sales Channel
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many orders to skip before the results.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of orders returned.
|
||||
schema:
|
||||
type: integer
|
||||
default: 50
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each order of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each order of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
orders:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
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
|
||||
114
docs/api/admin/paths/orders_{id}.yaml
Normal file
114
docs/api/admin/paths/orders_{id}.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
get:
|
||||
operationId: GetOrdersOrder
|
||||
summary: Retrieve an Order
|
||||
description: Retrieves an Order
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
post:
|
||||
operationId: PostOrdersOrder
|
||||
summary: Update an order
|
||||
description: Updates and order
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
email:
|
||||
description: the email for the order
|
||||
type: string
|
||||
billing_address:
|
||||
description: Billing address
|
||||
anyOf:
|
||||
- $ref: ../components/schemas/address.yaml
|
||||
shipping_address:
|
||||
description: Shipping address
|
||||
anyOf:
|
||||
- $ref: ../components/schemas/address.yaml
|
||||
items:
|
||||
description: The Line Items for the order
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/line_item.yaml
|
||||
region:
|
||||
description: ID of the region where the order belongs
|
||||
type: string
|
||||
discounts:
|
||||
description: Discounts applied to the order
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/discount.yaml
|
||||
customer_id:
|
||||
description: ID of the customer
|
||||
type: string
|
||||
payment_method:
|
||||
description: payment method chosen for the order
|
||||
type: object
|
||||
properties:
|
||||
provider_id:
|
||||
type: string
|
||||
description: ID of the payment provider
|
||||
data:
|
||||
description: Data relevant for the given payment method
|
||||
type: object
|
||||
shipping_method:
|
||||
description: The Shipping Method used for shipping the order.
|
||||
type: object
|
||||
properties:
|
||||
provider_id:
|
||||
type: string
|
||||
description: The ID of the shipping provider.
|
||||
profile_id:
|
||||
type: string
|
||||
description: The ID of the shipping profile.
|
||||
price:
|
||||
type: integer
|
||||
description: The price of the shipping.
|
||||
data:
|
||||
type: object
|
||||
description: Data relevant to the specific shipping method.
|
||||
items:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/line_item.yaml
|
||||
description: Items to ship
|
||||
no_notification:
|
||||
description: >-
|
||||
A flag to indicate if no notifications should be emitted related
|
||||
to the updated order.
|
||||
type: boolean
|
||||
tags:
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
23
docs/api/admin/paths/orders_{id}_archive.yaml
Normal file
23
docs/api/admin/paths/orders_{id}_archive.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderArchive
|
||||
summary: Archive order
|
||||
description: Archives the order with the given id.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
26
docs/api/admin/paths/orders_{id}_cancel.yaml
Normal file
26
docs/api/admin/paths/orders_{id}_cancel.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderCancel
|
||||
summary: Cancel an Order
|
||||
description: >-
|
||||
Registers an Order as canceled. This triggers a flow that will cancel any
|
||||
created Fulfillments and Payments, may fail if the Payment or Fulfillment
|
||||
Provider is unable to cancel the Payment/Fulfillment.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
23
docs/api/admin/paths/orders_{id}_capture.yaml
Normal file
23
docs/api/admin/paths/orders_{id}_capture.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderCapture
|
||||
summary: Capture an Order
|
||||
description: Captures all the Payments associated with an Order.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
@@ -0,0 +1,29 @@
|
||||
post:
|
||||
operationId: PostOrdersClaimCancel
|
||||
summary: Cancels a Claim
|
||||
description: Cancels a Claim
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: claim_id
|
||||
required: true
|
||||
description: The ID of the Claim.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Claim
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,44 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderClaimsClaimFulfillments
|
||||
summary: Create a Claim Fulfillment
|
||||
description: Creates a Fulfillment for a Claim.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: claim_id
|
||||
required: true
|
||||
description: The ID of the Claim.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Claim.
|
||||
type: boolean
|
||||
tags:
|
||||
- Fulfillment
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,35 @@
|
||||
post:
|
||||
operationId: PostOrdersClaimFulfillmentsCancel
|
||||
summary: Cancels a fulfilmment related to a Claim
|
||||
description: Registers a Fulfillment as canceled.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order which the Claim relates to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: claim_id
|
||||
required: true
|
||||
description: The ID of the Claim which the Fulfillment relates to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: fulfillment_id
|
||||
required: true
|
||||
description: The ID of the Fulfillment.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Fulfillment
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,44 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderClaimsClaimShipments
|
||||
summary: Create Claim Shipment
|
||||
description: Registers a Claim Fulfillment as shipped.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: claim_id
|
||||
required: true
|
||||
description: The ID of the Claim.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- fulfillment_id
|
||||
properties:
|
||||
fulfillment_id:
|
||||
description: The ID of the Fulfillment.
|
||||
type: string
|
||||
tracking_numbers:
|
||||
description: The tracking numbers for the shipment.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
- Claim
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
23
docs/api/admin/paths/orders_{id}_complete.yaml
Normal file
23
docs/api/admin/paths/orders_{id}_complete.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderComplete
|
||||
summary: Complete an Order
|
||||
description: Completes an Order
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
56
docs/api/admin/paths/orders_{id}_fulfillment.yaml
Normal file
56
docs/api/admin/paths/orders_{id}_fulfillment.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderFulfillments
|
||||
summary: Create a Fulfillment
|
||||
description: >-
|
||||
Creates a Fulfillment of an Order - will notify Fulfillment Providers to
|
||||
prepare a shipment.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- items
|
||||
properties:
|
||||
items:
|
||||
description: The Line Items to include in the Fulfillment.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- item_id
|
||||
- quantity
|
||||
properties:
|
||||
item_id:
|
||||
description: The ID of Line Item to fulfill.
|
||||
type: string
|
||||
quantity:
|
||||
description: The quantity of the Line Item to fulfill.
|
||||
type: integer
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Swap.
|
||||
type: boolean
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
tags:
|
||||
- Fulfillment
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,29 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderFulfillmentsCancel
|
||||
summary: Cancels a fulfilmment
|
||||
description: Registers a Fulfillment as canceled.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order which the Fulfillment relates to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: fulfillment_id
|
||||
required: true
|
||||
description: The ID of the Fulfillment
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Fulfillment
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
45
docs/api/admin/paths/orders_{id}_refund.yaml
Normal file
45
docs/api/admin/paths/orders_{id}_refund.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderRefunds
|
||||
summary: Create a Refund
|
||||
description: Issues a Refund.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- amount
|
||||
- reason
|
||||
properties:
|
||||
amount:
|
||||
description: The amount to refund.
|
||||
type: integer
|
||||
reason:
|
||||
description: The reason for the Refund.
|
||||
type: string
|
||||
note:
|
||||
description: A note with additional details about the Refund.
|
||||
type: string
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Refund.
|
||||
type: boolean
|
||||
tags:
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
82
docs/api/admin/paths/orders_{id}_return.yaml
Normal file
82
docs/api/admin/paths/orders_{id}_return.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderReturns
|
||||
summary: Request a Return
|
||||
description: >-
|
||||
Requests a Return. If applicable a return label will be created and other
|
||||
plugins notified.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- items
|
||||
properties:
|
||||
items:
|
||||
description: The Line Items that will be returned.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- item_id
|
||||
- quantity
|
||||
properties:
|
||||
item_id:
|
||||
description: The ID of the Line Item.
|
||||
type: string
|
||||
reason_id:
|
||||
description: The ID of the Return Reason to use.
|
||||
type: string
|
||||
note:
|
||||
description: An optional note with information about the Return.
|
||||
type: string
|
||||
quantity:
|
||||
description: The quantity of the Line Item.
|
||||
type: integer
|
||||
return_shipping:
|
||||
description: The Shipping Method to be used to handle the return shipment.
|
||||
type: object
|
||||
properties:
|
||||
option_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the Shipping Option to create the Shipping Method
|
||||
from.
|
||||
price:
|
||||
type: integer
|
||||
description: The price to charge for the Shipping Method.
|
||||
note:
|
||||
description: An optional note with information about the Return.
|
||||
type: string
|
||||
receive_now:
|
||||
description: >-
|
||||
A flag to indicate if the Return should be registerd as received
|
||||
immediately.
|
||||
type: boolean
|
||||
default: false
|
||||
no_notification:
|
||||
description: >-
|
||||
A flag to indicate if no notifications should be emitted related
|
||||
to the requested Return.
|
||||
type: boolean
|
||||
refund:
|
||||
description: The amount to refund.
|
||||
type: integer
|
||||
tags:
|
||||
- Return
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
43
docs/api/admin/paths/orders_{id}_shipment.yaml
Normal file
43
docs/api/admin/paths/orders_{id}_shipment.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderShipment
|
||||
summary: Create a Shipment
|
||||
description: Registers a Fulfillment as shipped.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- fulfillment_id
|
||||
properties:
|
||||
fulfillment_id:
|
||||
description: The ID of the Fulfillment.
|
||||
type: string
|
||||
tracking_numbers:
|
||||
description: The tracking numbers for the shipment.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Shipment.
|
||||
type: boolean
|
||||
tags:
|
||||
- Order
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
49
docs/api/admin/paths/orders_{id}_shipping-methods.yaml
Normal file
49
docs/api/admin/paths/orders_{id}_shipping-methods.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderShippingMethods
|
||||
summary: Add a Shipping Method
|
||||
description: >-
|
||||
Adds a Shipping Method to an Order. If another Shipping Method exists with
|
||||
the same Shipping Profile, the previous Shipping Method will be replaced.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required:
|
||||
- price
|
||||
- option_id
|
||||
properties:
|
||||
price:
|
||||
type: integer
|
||||
description: >-
|
||||
The price (excluding VAT) that should be charged for the
|
||||
Shipping Method
|
||||
option_id:
|
||||
type: string
|
||||
description: >-
|
||||
The ID of the Shipping Option to create the Shipping Method
|
||||
from.
|
||||
data:
|
||||
type: object
|
||||
description: >-
|
||||
The data required for the Shipping Option to create a Shipping
|
||||
Method. This will depend on the Fulfillment Provider.
|
||||
29
docs/api/admin/paths/orders_{id}_swaps_{swap_id}_cancel.yaml
Normal file
29
docs/api/admin/paths/orders_{id}_swaps_{swap_id}_cancel.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
post:
|
||||
operationId: PostOrdersSwapCancel
|
||||
summary: Cancels a Swap
|
||||
description: Cancels a Swap
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: swap_id
|
||||
required: true
|
||||
description: The ID of the Swap.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Swap
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,44 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderSwapsSwapFulfillments
|
||||
summary: Create a Swap Fulfillment
|
||||
description: Creates a Fulfillment for a Swap.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: swap_id
|
||||
required: true
|
||||
description: The ID of the Swap.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs to hold additional
|
||||
information.
|
||||
type: object
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Claim.
|
||||
type: boolean
|
||||
tags:
|
||||
- Fulfillment
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,35 @@
|
||||
post:
|
||||
operationId: PostOrdersSwapFulfillmentsCancel
|
||||
summary: Cancels a fulfilmment related to a Swap
|
||||
description: Registers a Fulfillment as canceled.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order which the Swap relates to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: swap_id
|
||||
required: true
|
||||
description: The ID of the Swap which the Fulfillment relates to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: fulfillment_id
|
||||
required: true
|
||||
description: The ID of the Fulfillment.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Fulfillment
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,32 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderSwapsSwapProcessPayment
|
||||
summary: Process a Swap difference
|
||||
description: >-
|
||||
When there are differences between the returned and shipped Products in a
|
||||
Swap, the difference must be processed. Either a Refund will be issued or a
|
||||
Payment will be captured.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: swap_id
|
||||
required: true
|
||||
description: The ID of the Swap.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Swap
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
@@ -0,0 +1,49 @@
|
||||
post:
|
||||
operationId: PostOrdersOrderSwapsSwapShipments
|
||||
summary: Create Swap Shipment
|
||||
description: Registers a Swap Fulfillment as shipped.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Order.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: swap_id
|
||||
required: true
|
||||
description: The ID of the Swap.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- fulfillment_id
|
||||
properties:
|
||||
fulfillment_id:
|
||||
description: The ID of the Fulfillment.
|
||||
type: string
|
||||
tracking_numbers:
|
||||
description: The tracking numbers for the shipment.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
no_notification:
|
||||
description: >-
|
||||
If set to true no notification will be send related to this
|
||||
Claim.
|
||||
type: boolean
|
||||
tags:
|
||||
- Swap
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
263
docs/api/admin/paths/price-lists.yaml
Normal file
263
docs/api/admin/paths/price-lists.yaml
Normal file
@@ -0,0 +1,263 @@
|
||||
post:
|
||||
operationId: PostPriceListsPriceList
|
||||
summary: Creates a Price List
|
||||
description: Creates a Price List
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
- description
|
||||
- type
|
||||
- prices
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Price List
|
||||
type: string
|
||||
description:
|
||||
description: A description of the Price List.
|
||||
type: string
|
||||
starts_at:
|
||||
description: The date with timezone that the Price List starts being valid.
|
||||
type: string
|
||||
format: date
|
||||
ends_at:
|
||||
description: The date with timezone that the Price List ends being valid.
|
||||
type: string
|
||||
format: date
|
||||
type:
|
||||
description: The type of the Price List.
|
||||
type: string
|
||||
enum:
|
||||
- sale
|
||||
- override
|
||||
status:
|
||||
description: The status of the Price List.
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- draft
|
||||
prices:
|
||||
description: The prices of the Price List.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
- variant_id
|
||||
properties:
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used. Only
|
||||
required if currecny_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the price will
|
||||
be used. Only required if region_id is not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
variant_id:
|
||||
description: The ID of the Variant for which the price is used.
|
||||
type: string
|
||||
min_quantity:
|
||||
description: The minimum quantity for which the price will be used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: The maximum quantity for which the price will be used.
|
||||
type: integer
|
||||
customer_groups:
|
||||
type: array
|
||||
description: A list of customer groups that the Price List applies to.
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of a customer group
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
price_list:
|
||||
$ref: ../components/schemas/price_list.yaml
|
||||
get:
|
||||
operationId: GetPriceLists
|
||||
summary: List Price Lists
|
||||
description: Retrieves a list of Price Lists.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of items to get
|
||||
schema:
|
||||
type: number
|
||||
default: '10'
|
||||
- in: query
|
||||
name: offset
|
||||
description: The offset at which to get items
|
||||
schema:
|
||||
type: number
|
||||
default: '0'
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each item of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: order
|
||||
description: field to order results by.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
description: ID to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: q
|
||||
description: >-
|
||||
query to search in price list description, price list name, and customer
|
||||
group name fields.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: status
|
||||
style: form
|
||||
explode: false
|
||||
description: Status to search for.
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- draft
|
||||
- in: query
|
||||
name: name
|
||||
description: price list name to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: customer_groups
|
||||
style: form
|
||||
explode: false
|
||||
description: Customer Group IDs to search for.
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: type
|
||||
style: form
|
||||
explode: false
|
||||
description: Type to search for.
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- sale
|
||||
- override
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting price lists were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting price lists were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: deleted_at
|
||||
description: Date comparison for when resulting price lists were deleted.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
price_lists:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/price_list.yaml
|
||||
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
|
||||
194
docs/api/admin/paths/price-lists_:id_products.yaml
Normal file
194
docs/api/admin/paths/price-lists_:id_products.yaml
Normal file
@@ -0,0 +1,194 @@
|
||||
get:
|
||||
operationId: GetPriceListsPriceListProducts
|
||||
summary: List Product in a Price List
|
||||
description: Retrieves a list of Product that are part of a Price List
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
description: >-
|
||||
Query used for searching product title and description, variant title
|
||||
and sku, and collection title.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
description: ID of the product to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: status
|
||||
description: Product status to search for
|
||||
style: form
|
||||
explode: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- draft
|
||||
- proposed
|
||||
- published
|
||||
- rejected
|
||||
- in: query
|
||||
name: collection_id
|
||||
description: Collection IDs to search for
|
||||
style: form
|
||||
explode: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: tags
|
||||
description: Tag IDs to search for
|
||||
style: form
|
||||
explode: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: title
|
||||
description: product title to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: description
|
||||
description: product description to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: handle
|
||||
description: product handle to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: is_giftcard
|
||||
description: Search for giftcards using is_giftcard=true.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: type
|
||||
description: to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: order
|
||||
description: field to sort results by.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting products were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting products were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: deleted_at
|
||||
description: Date comparison for when resulting products were deleted.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many products to skip in the result.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of products returned.
|
||||
schema:
|
||||
type: integer
|
||||
default: 50
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each product of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each product of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
products:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
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
|
||||
155
docs/api/admin/paths/price-lists_{id}.yaml
Normal file
155
docs/api/admin/paths/price-lists_{id}.yaml
Normal file
@@ -0,0 +1,155 @@
|
||||
delete:
|
||||
operationId: DeletePriceListsPriceList
|
||||
summary: Delete a Price List
|
||||
description: Deletes a Price List
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Price List to delete.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Price List.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: price-list
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetPriceListsPriceList
|
||||
summary: Retrieve a Price List
|
||||
description: Retrieves a Price List.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Price List.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
price_list:
|
||||
$ref: ../components/schemas/price_list.yaml
|
||||
post:
|
||||
operationId: PostPriceListsPriceListPriceList
|
||||
summary: Update a Price List
|
||||
description: Updates a Price List
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Price List.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Price List
|
||||
type: string
|
||||
description:
|
||||
description: A description of the Price List.
|
||||
type: string
|
||||
starts_at:
|
||||
description: The date with timezone that the Price List starts being valid.
|
||||
type: string
|
||||
format: date
|
||||
ends_at:
|
||||
description: The date with timezone that the Price List ends being valid.
|
||||
type: string
|
||||
format: date
|
||||
type:
|
||||
description: The type of the Price List.
|
||||
type: string
|
||||
enum:
|
||||
- sale
|
||||
- override
|
||||
status:
|
||||
description: The status of the Price List.
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- draft
|
||||
prices:
|
||||
description: The prices of the Price List.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the price.
|
||||
type: string
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used. Only
|
||||
required if currecny_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the price will
|
||||
be used. Only required if region_id is not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
variant_id:
|
||||
description: The ID of the Variant for which the price is used.
|
||||
type: string
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
min_quantity:
|
||||
description: The minimum quantity for which the price will be used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: The maximum quantity for which the price will be used.
|
||||
type: integer
|
||||
customer_groups:
|
||||
type: array
|
||||
description: A list of customer groups that the Price List applies to.
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of a customer group
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
price_list:
|
||||
$ref: ../components/schemas/price_list.yaml
|
||||
115
docs/api/admin/paths/price-lists_{id}_prices_batch.yaml
Normal file
115
docs/api/admin/paths/price-lists_{id}_prices_batch.yaml
Normal file
@@ -0,0 +1,115 @@
|
||||
post:
|
||||
operationId: PostPriceListsPriceListPricesBatch
|
||||
summary: Batch update prices for a Price List
|
||||
description: Batch update prices for a Price List
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Price List to update prices for.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
prices:
|
||||
description: The prices to update or add.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
- variant_id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the price.
|
||||
type: string
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used. Only
|
||||
required if currecny_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the price will
|
||||
be used. Only required if region_id is not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
variant_id:
|
||||
description: The ID of the Variant for which the price is used.
|
||||
type: string
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
min_quantity:
|
||||
description: The minimum quantity for which the price will be used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: The maximum quantity for which the price will be used.
|
||||
type: integer
|
||||
override:
|
||||
description: >-
|
||||
If true the prices will replace all existing prices associated
|
||||
with the Price List.
|
||||
type: boolean
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
price_list:
|
||||
$ref: ../components/schemas/price_list.yaml
|
||||
delete:
|
||||
operationId: DeletePriceListsPriceListPricesBatch
|
||||
summary: Batch delete prices that belong to a Price List
|
||||
description: Batch delete prices that belong to a Price List
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: >-
|
||||
The ID of the Price List that the Money Amounts (Prices) that will be
|
||||
deleted belongs to.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
price_ids:
|
||||
description: The price id's of the Money Amounts to delete.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
ids:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: The IDs of the deleted Money Amounts (Prices).
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: money-amount
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
@@ -0,0 +1,42 @@
|
||||
delete:
|
||||
operationId: DeletePriceListsPriceListProductsProductPrices
|
||||
summary: Delete all the prices related to a specific product in a price list
|
||||
description: Delete all the prices related to a specific product in a price list
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: >-
|
||||
The ID of the Price List that the Money Amounts that will be deleted
|
||||
belongs to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: product_id
|
||||
required: true
|
||||
description: The ID of the product from which the money amount will be deleted.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
ids:
|
||||
type: array
|
||||
description: The price ids that have been deleted.
|
||||
items:
|
||||
type: string
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: money-amount
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
@@ -0,0 +1,42 @@
|
||||
delete:
|
||||
operationId: DeletePriceListsPriceListVariantsVariantPrices
|
||||
summary: Delete all the prices related to a specific variant in a price list
|
||||
description: Delete all the prices related to a specific variant in a price list
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: >-
|
||||
The ID of the Price List that the Money Amounts that will be deleted
|
||||
belongs to.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: variant_id
|
||||
required: true
|
||||
description: The ID of the variant from which the money amount will be deleted.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Price List
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
ids:
|
||||
type: array
|
||||
description: The price ids that have been deleted.
|
||||
items:
|
||||
type: string
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: money-amount
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
110
docs/api/admin/paths/product-tags.yaml
Normal file
110
docs/api/admin/paths/product-tags.yaml
Normal file
@@ -0,0 +1,110 @@
|
||||
get:
|
||||
operationId: GetProductTags
|
||||
summary: List Product Tags
|
||||
description: Retrieve a list of Product Tags.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of tags to return.
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: offset
|
||||
description: The number of items to skip before the results.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: order
|
||||
description: The field to sort items by.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: value
|
||||
style: form
|
||||
explode: false
|
||||
description: The tag values to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: q
|
||||
description: A query string to search values for
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
style: form
|
||||
explode: false
|
||||
description: The tag IDs to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting product tags were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting product tags were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
tags:
|
||||
- Product Tag
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product_tags:
|
||||
$ref: ../components/schemas/product_tag.yaml
|
||||
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
|
||||
110
docs/api/admin/paths/product-types.yaml
Normal file
110
docs/api/admin/paths/product-types.yaml
Normal file
@@ -0,0 +1,110 @@
|
||||
get:
|
||||
operationId: GetProductTypes
|
||||
summary: List Product Types
|
||||
description: Retrieve a list of Product Types.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The number of types to return.
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
- in: query
|
||||
name: offset
|
||||
description: The number of items to skip before the results.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: order
|
||||
description: The field to sort items by.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: value
|
||||
style: form
|
||||
explode: false
|
||||
description: The type values to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
style: form
|
||||
explode: false
|
||||
description: The type IDs to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: q
|
||||
description: A query string to search values for
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting product types were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting product types were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
tags:
|
||||
- Product Type
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product_types:
|
||||
$ref: ../components/schemas/product_type.yaml
|
||||
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
|
||||
469
docs/api/admin/paths/products.yaml
Normal file
469
docs/api/admin/paths/products.yaml
Normal file
@@ -0,0 +1,469 @@
|
||||
post:
|
||||
operationId: PostProducts
|
||||
summary: Create a Product
|
||||
x-authenticated: true
|
||||
description: Creates a Product
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
description: The title of the Product
|
||||
type: string
|
||||
subtitle:
|
||||
description: The subtitle of the Product
|
||||
type: string
|
||||
description:
|
||||
description: A description of the Product.
|
||||
type: string
|
||||
is_giftcard:
|
||||
description: >-
|
||||
A flag to indicate if the Product represents a Gift Card.
|
||||
Purchasing Products with this flag set to `true` will result in
|
||||
a Gift Card being created.
|
||||
type: boolean
|
||||
default: false
|
||||
discountable:
|
||||
description: >-
|
||||
A flag to indicate if discounts can be applied to the LineItems
|
||||
generated from this Product
|
||||
type: boolean
|
||||
default: true
|
||||
images:
|
||||
description: Images of the Product.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
thumbnail:
|
||||
description: The thumbnail to use for the Product.
|
||||
type: string
|
||||
handle:
|
||||
description: A unique handle to identify the Product by.
|
||||
type: string
|
||||
status:
|
||||
description: The status of the product.
|
||||
type: string
|
||||
enum:
|
||||
- draft
|
||||
- proposed
|
||||
- published
|
||||
- rejected
|
||||
default: draft
|
||||
type:
|
||||
description: The Product Type to associate the Product with.
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the Product Type.
|
||||
type: string
|
||||
value:
|
||||
description: The value of the Product Type.
|
||||
type: string
|
||||
collection_id:
|
||||
description: The ID of the Collection the Product should belong to.
|
||||
type: string
|
||||
tags:
|
||||
description: Tags to associate the Product with.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The ID of an existing Tag.
|
||||
type: string
|
||||
value:
|
||||
description: The value of the Tag, these will be upserted.
|
||||
type: string
|
||||
sales_channels:
|
||||
description: '[EXPERIMENTAL] Sales channels to associate the Product with.'
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of an existing Sales channel.
|
||||
type: string
|
||||
options:
|
||||
description: >-
|
||||
The Options that the Product should have. These define on which
|
||||
properties the Product's Product Variants will differ.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
description: The title to identify the Product Option by.
|
||||
type: string
|
||||
variants:
|
||||
description: A list of Product Variants to create with the Product.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
description: The title to identify the Product Variant by.
|
||||
type: string
|
||||
sku:
|
||||
description: The unique SKU for the Product Variant.
|
||||
type: string
|
||||
ean:
|
||||
description: The EAN number of the item.
|
||||
type: string
|
||||
upc:
|
||||
description: The UPC number of the item.
|
||||
type: string
|
||||
barcode:
|
||||
description: A generic GTIN field for the Product Variant.
|
||||
type: string
|
||||
hs_code:
|
||||
description: The Harmonized System code for the Product Variant.
|
||||
type: string
|
||||
inventory_quantity:
|
||||
description: The amount of stock kept for the Product Variant.
|
||||
type: integer
|
||||
default: 0
|
||||
allow_backorder:
|
||||
description: >-
|
||||
Whether the Product Variant can be purchased when out of
|
||||
stock.
|
||||
type: boolean
|
||||
manage_inventory:
|
||||
description: >-
|
||||
Whether Medusa should keep track of the inventory for this
|
||||
Product Variant.
|
||||
type: boolean
|
||||
weight:
|
||||
description: The wieght of the Product Variant.
|
||||
type: number
|
||||
length:
|
||||
description: The length of the Product Variant.
|
||||
type: number
|
||||
height:
|
||||
description: The height of the Product Variant.
|
||||
type: number
|
||||
width:
|
||||
description: The width of the Product Variant.
|
||||
type: number
|
||||
origin_country:
|
||||
description: The country of origin of the Product Variant.
|
||||
type: string
|
||||
mid_code:
|
||||
description: >-
|
||||
The Manufacturer Identification code for the Product
|
||||
Variant.
|
||||
type: string
|
||||
material:
|
||||
description: The material composition of the Product Variant.
|
||||
type: string
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs with additional
|
||||
information.
|
||||
type: object
|
||||
prices:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
properties:
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used.
|
||||
Only required if currency_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the
|
||||
price will be used. Only required if region_id is
|
||||
not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
min_quantity:
|
||||
description: >-
|
||||
The minimum quantity for which the price will be
|
||||
used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: >-
|
||||
The maximum quantity for which the price will be
|
||||
used.
|
||||
type: integer
|
||||
options:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
value:
|
||||
description: >-
|
||||
The value to give for the Product Option at the same
|
||||
index in the Product's `options` field.
|
||||
type: string
|
||||
weight:
|
||||
description: The wieght of the Product.
|
||||
type: number
|
||||
length:
|
||||
description: The length of the Product.
|
||||
type: number
|
||||
height:
|
||||
description: The height of the Product.
|
||||
type: number
|
||||
width:
|
||||
description: The width of the Product.
|
||||
type: number
|
||||
hs_code:
|
||||
description: The Harmonized System code for the Product Variant.
|
||||
type: string
|
||||
origin_country:
|
||||
description: The country of origin of the Product.
|
||||
type: string
|
||||
mid_code:
|
||||
description: The Manufacturer Identification code for the Product.
|
||||
type: string
|
||||
material:
|
||||
description: The material composition of the Product.
|
||||
type: string
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
get:
|
||||
operationId: GetProducts
|
||||
summary: List Product
|
||||
description: Retrieves a list of Product
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: q
|
||||
description: >-
|
||||
Query used for searching product title and description, variant title
|
||||
and sku, and collection title.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: id
|
||||
style: form
|
||||
explode: false
|
||||
description: Filter by product IDs.
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
description: ID of the product to search for.
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
description: ID of a product.
|
||||
- in: query
|
||||
name: status
|
||||
style: form
|
||||
explode: false
|
||||
description: Status to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- draft
|
||||
- proposed
|
||||
- published
|
||||
- rejected
|
||||
- in: query
|
||||
name: collection_id
|
||||
style: form
|
||||
explode: false
|
||||
description: Collection ids to search for.
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: tags
|
||||
style: form
|
||||
explode: false
|
||||
description: Tag IDs to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: price_list_id
|
||||
style: form
|
||||
explode: false
|
||||
description: Price List IDs to search for
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: sales_channel_id
|
||||
style: form
|
||||
explode: false
|
||||
description: Sales Channel IDs to filter products by
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
- in: query
|
||||
name: title
|
||||
description: title to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: description
|
||||
description: description to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: handle
|
||||
description: handle to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: is_giftcard
|
||||
description: Search for giftcards using is_giftcard=true.
|
||||
schema:
|
||||
type: boolean
|
||||
- in: query
|
||||
name: type
|
||||
description: type ID to search for.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting products were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting products were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: deleted_at
|
||||
description: Date comparison for when resulting products were deleted.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many products to skip in the result.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of products returned.
|
||||
schema:
|
||||
type: integer
|
||||
default: 50
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each product of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each product of the
|
||||
result.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
products:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
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
|
||||
27
docs/api/admin/paths/products_tag-usage.yaml
Normal file
27
docs/api/admin/paths/products_tag-usage.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
get:
|
||||
operationId: GetProductsTagUsage
|
||||
summary: List Product Tags Usage Number
|
||||
description: Retrieves a list of Product Tags with how many times each is used.
|
||||
x-authenticated: true
|
||||
tags:
|
||||
- Product Tag
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the tag.
|
||||
type: string
|
||||
usage_count:
|
||||
description: The number of products that use this tag.
|
||||
type: string
|
||||
value:
|
||||
description: The value of the tag.
|
||||
type: string
|
||||
18
docs/api/admin/paths/products_types.yaml
Normal file
18
docs/api/admin/paths/products_types.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
get:
|
||||
operationId: GetProductsTypes
|
||||
summary: List Product Types
|
||||
description: Retrieves a list of Product Types.
|
||||
x-authenticated: true
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
types:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/product_type.yaml
|
||||
297
docs/api/admin/paths/products_{id}.yaml
Normal file
297
docs/api/admin/paths/products_{id}.yaml
Normal file
@@ -0,0 +1,297 @@
|
||||
delete:
|
||||
operationId: DeleteProductsProduct
|
||||
summary: Delete a Product
|
||||
description: Deletes a Product and it's associated Product Variants.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Product.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: product
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetProductsProduct
|
||||
summary: Retrieve a Product
|
||||
description: Retrieves a Product.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
post:
|
||||
operationId: PostProductsProduct
|
||||
summary: Update a Product
|
||||
description: Updates a Product
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
title:
|
||||
description: The title of the Product
|
||||
type: string
|
||||
subtitle:
|
||||
description: The subtitle of the Product
|
||||
type: string
|
||||
description:
|
||||
description: A description of the Product.
|
||||
type: string
|
||||
discountable:
|
||||
description: >-
|
||||
A flag to indicate if discounts can be applied to the LineItems
|
||||
generated from this Product
|
||||
type: boolean
|
||||
images:
|
||||
description: Images of the Product.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
thumbnail:
|
||||
description: The thumbnail to use for the Product.
|
||||
type: string
|
||||
handle:
|
||||
description: A unique handle to identify the Product by.
|
||||
type: string
|
||||
status:
|
||||
description: The status of the product.
|
||||
type: string
|
||||
enum:
|
||||
- draft
|
||||
- proposed
|
||||
- published
|
||||
- rejected
|
||||
type:
|
||||
description: The Product Type to associate the Product with.
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the Product Type.
|
||||
type: string
|
||||
value:
|
||||
description: The value of the Product Type.
|
||||
type: string
|
||||
collection_id:
|
||||
description: The ID of the Collection the Product should belong to.
|
||||
type: string
|
||||
tags:
|
||||
description: Tags to associate the Product with.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
id:
|
||||
description: The ID of an existing Tag.
|
||||
type: string
|
||||
value:
|
||||
description: The value of the Tag, these will be upserted.
|
||||
type: string
|
||||
sales_channels:
|
||||
description: '[EXPERIMENTAL] Sales channels to associate the Product with.'
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of an existing Sales channel.
|
||||
type: string
|
||||
variants:
|
||||
description: A list of Product Variants to create with the Product.
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the Product Variant.
|
||||
type: string
|
||||
title:
|
||||
description: The title to identify the Product Variant by.
|
||||
type: string
|
||||
sku:
|
||||
description: The unique SKU for the Product Variant.
|
||||
type: string
|
||||
ean:
|
||||
description: The EAN number of the item.
|
||||
type: string
|
||||
upc:
|
||||
description: The UPC number of the item.
|
||||
type: string
|
||||
barcode:
|
||||
description: A generic GTIN field for the Product Variant.
|
||||
type: string
|
||||
hs_code:
|
||||
description: The Harmonized System code for the Product Variant.
|
||||
type: string
|
||||
inventory_quantity:
|
||||
description: The amount of stock kept for the Product Variant.
|
||||
type: integer
|
||||
allow_backorder:
|
||||
description: >-
|
||||
Whether the Product Variant can be purchased when out of
|
||||
stock.
|
||||
type: boolean
|
||||
manage_inventory:
|
||||
description: >-
|
||||
Whether Medusa should keep track of the inventory for this
|
||||
Product Variant.
|
||||
type: boolean
|
||||
weight:
|
||||
description: The wieght of the Product Variant.
|
||||
type: number
|
||||
length:
|
||||
description: The length of the Product Variant.
|
||||
type: number
|
||||
height:
|
||||
description: The height of the Product Variant.
|
||||
type: number
|
||||
width:
|
||||
description: The width of the Product Variant.
|
||||
type: number
|
||||
origin_country:
|
||||
description: The country of origin of the Product Variant.
|
||||
type: string
|
||||
mid_code:
|
||||
description: >-
|
||||
The Manufacturer Identification code for the Product
|
||||
Variant.
|
||||
type: string
|
||||
material:
|
||||
description: The material composition of the Product Variant.
|
||||
type: string
|
||||
metadata:
|
||||
description: >-
|
||||
An optional set of key-value pairs with additional
|
||||
information.
|
||||
type: object
|
||||
prices:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the Price.
|
||||
type: string
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used.
|
||||
Only required if currency_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the
|
||||
price will be used. Only required if region_id is
|
||||
not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
min_quantity:
|
||||
description: >-
|
||||
The minimum quantity for which the price will be
|
||||
used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: >-
|
||||
The maximum quantity for which the price will be
|
||||
used.
|
||||
type: integer
|
||||
options:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- option_id
|
||||
- value
|
||||
properties:
|
||||
option_id:
|
||||
description: The ID of the Option.
|
||||
type: string
|
||||
value:
|
||||
description: >-
|
||||
The value to give for the Product Option at the same
|
||||
index in the Product's `options` field.
|
||||
type: string
|
||||
weight:
|
||||
description: The wieght of the Product.
|
||||
type: number
|
||||
length:
|
||||
description: The length of the Product.
|
||||
type: number
|
||||
height:
|
||||
description: The height of the Product.
|
||||
type: number
|
||||
width:
|
||||
description: The width of the Product.
|
||||
type: number
|
||||
origin_country:
|
||||
description: The country of origin of the Product.
|
||||
type: string
|
||||
mid_code:
|
||||
description: The Manufacturer Identification code for the Product.
|
||||
type: string
|
||||
material:
|
||||
description: The material composition of the Product.
|
||||
type: string
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
37
docs/api/admin/paths/products_{id}_metadata.yaml
Normal file
37
docs/api/admin/paths/products_{id}_metadata.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
post:
|
||||
operationId: PostProductsProductMetadata
|
||||
summary: Set Product metadata
|
||||
description: Set metadata key/value pair for Product
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- key
|
||||
- value
|
||||
properties:
|
||||
key:
|
||||
description: The metadata key
|
||||
type: string
|
||||
value:
|
||||
description: The metadata value
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
33
docs/api/admin/paths/products_{id}_options.yaml
Normal file
33
docs/api/admin/paths/products_{id}_options.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
post:
|
||||
operationId: PostProductsProductOptions
|
||||
summary: Add an Option
|
||||
x-authenticated: true
|
||||
description: Adds a Product Option to a Product
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
description: The title the Product Option will be identified by i.e. "Size"
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
82
docs/api/admin/paths/products_{id}_options_{option_id}.yaml
Normal file
82
docs/api/admin/paths/products_{id}_options_{option_id}.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
delete:
|
||||
operationId: DeleteProductsProductOptionsOption
|
||||
summary: Delete a Product Option
|
||||
description: >-
|
||||
Deletes a Product Option. Before a Product Option can be deleted all Option
|
||||
Values for the Product Option must be the same. You may, for example, have
|
||||
to delete some of your variants prior to deleting the Product Option
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: option_id
|
||||
required: true
|
||||
description: The ID of the Product Option.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
option_id:
|
||||
type: string
|
||||
description: The ID of the deleted Product Option
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: option
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
post:
|
||||
operationId: PostProductsProductOptionsOption
|
||||
summary: Update a Product Option.
|
||||
description: Updates a Product Option
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: option_id
|
||||
required: true
|
||||
description: The ID of the Product Option.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- title
|
||||
properties:
|
||||
title:
|
||||
description: The title of the Product Option
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
188
docs/api/admin/paths/products_{id}_variants.yaml
Normal file
188
docs/api/admin/paths/products_{id}_variants.yaml
Normal file
@@ -0,0 +1,188 @@
|
||||
post:
|
||||
operationId: PostProductsProductVariants
|
||||
summary: Create a Product Variant
|
||||
description: >-
|
||||
Creates a Product Variant. Each Product Variant must have a unique
|
||||
combination of Product Option Values.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- title
|
||||
- prices
|
||||
- options
|
||||
properties:
|
||||
title:
|
||||
description: The title to identify the Product Variant by.
|
||||
type: string
|
||||
sku:
|
||||
description: The unique SKU for the Product Variant.
|
||||
type: string
|
||||
ean:
|
||||
description: The EAN number of the item.
|
||||
type: string
|
||||
upc:
|
||||
description: The UPC number of the item.
|
||||
type: string
|
||||
barcode:
|
||||
description: A generic GTIN field for the Product Variant.
|
||||
type: string
|
||||
hs_code:
|
||||
description: The Harmonized System code for the Product Variant.
|
||||
type: string
|
||||
inventory_quantity:
|
||||
description: The amount of stock kept for the Product Variant.
|
||||
type: integer
|
||||
default: 0
|
||||
allow_backorder:
|
||||
description: Whether the Product Variant can be purchased when out of stock.
|
||||
type: boolean
|
||||
manage_inventory:
|
||||
description: >-
|
||||
Whether Medusa should keep track of the inventory for this
|
||||
Product Variant.
|
||||
type: boolean
|
||||
weight:
|
||||
description: The wieght of the Product Variant.
|
||||
type: number
|
||||
length:
|
||||
description: The length of the Product Variant.
|
||||
type: number
|
||||
height:
|
||||
description: The height of the Product Variant.
|
||||
type: number
|
||||
width:
|
||||
description: The width of the Product Variant.
|
||||
type: number
|
||||
origin_country:
|
||||
description: The country of origin of the Product Variant.
|
||||
type: string
|
||||
mid_code:
|
||||
description: The Manufacturer Identification code for the Product Variant.
|
||||
type: string
|
||||
material:
|
||||
description: The material composition of the Product Variant.
|
||||
type: string
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
prices:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the price.
|
||||
type: string
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used. Only
|
||||
required if currency_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the price will
|
||||
be used. Only required if region_id is not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
min_quantity:
|
||||
description: The minimum quantity for which the price will be used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: The maximum quantity for which the price will be used.
|
||||
type: integer
|
||||
options:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- option_id
|
||||
- value
|
||||
properties:
|
||||
option_id:
|
||||
description: The ID of the Product Option to set the value for.
|
||||
type: string
|
||||
value:
|
||||
description: The value to give for the Product Option.
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
get:
|
||||
operationId: GetProductsProductVariants
|
||||
summary: List a Product's Product Variants
|
||||
description: Retrieves a list of the Product Variants associated with a Product.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: ID of the product to search for the variants.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: Comma separated string of the column to select.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: expand
|
||||
description: Comma separated string of the relations to include.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many items to skip before the results.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of items returned.
|
||||
schema:
|
||||
type: integer
|
||||
default: 100
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
variants:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/product_variant.yaml
|
||||
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
|
||||
171
docs/api/admin/paths/products_{id}_variants_{variant_id}.yaml
Normal file
171
docs/api/admin/paths/products_{id}_variants_{variant_id}.yaml
Normal file
@@ -0,0 +1,171 @@
|
||||
delete:
|
||||
operationId: DeleteProductsProductVariantsVariant
|
||||
summary: Delete a Product Variant
|
||||
description: Deletes a Product Variant.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: variant_id
|
||||
required: true
|
||||
description: The ID of the Product Variant.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
variant_id:
|
||||
type: string
|
||||
description: The ID of the deleted Product Variant.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: variant
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
post:
|
||||
operationId: PostProductsProductVariantsVariant
|
||||
summary: Update a Product Variant
|
||||
description: Update a Product Variant.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Product.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: variant_id
|
||||
required: true
|
||||
description: The ID of the Product Variant.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
title:
|
||||
description: The title to identify the Product Variant by.
|
||||
type: string
|
||||
sku:
|
||||
description: The unique SKU for the Product Variant.
|
||||
type: string
|
||||
ean:
|
||||
description: The EAN number of the item.
|
||||
type: string
|
||||
upc:
|
||||
description: The UPC number of the item.
|
||||
type: string
|
||||
barcode:
|
||||
description: A generic GTIN field for the Product Variant.
|
||||
type: string
|
||||
hs_code:
|
||||
description: The Harmonized System code for the Product Variant.
|
||||
type: string
|
||||
inventory_quantity:
|
||||
description: The amount of stock kept for the Product Variant.
|
||||
type: integer
|
||||
allow_backorder:
|
||||
description: Whether the Product Variant can be purchased when out of stock.
|
||||
type: boolean
|
||||
manage_inventory:
|
||||
description: >-
|
||||
Whether Medusa should keep track of the inventory for this
|
||||
Product Variant.
|
||||
type: boolean
|
||||
weight:
|
||||
description: The wieght of the Product Variant.
|
||||
type: number
|
||||
length:
|
||||
description: The length of the Product Variant.
|
||||
type: number
|
||||
height:
|
||||
description: The height of the Product Variant.
|
||||
type: number
|
||||
width:
|
||||
description: The width of the Product Variant.
|
||||
type: number
|
||||
origin_country:
|
||||
description: The country of origin of the Product Variant.
|
||||
type: string
|
||||
mid_code:
|
||||
description: The Manufacturer Identification code for the Product Variant.
|
||||
type: string
|
||||
material:
|
||||
description: The material composition of the Product Variant.
|
||||
type: string
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
prices:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the price.
|
||||
type: string
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region for which the price is used. Only
|
||||
required if currency_code is not provided.
|
||||
type: string
|
||||
currency_code:
|
||||
description: >-
|
||||
The 3 character ISO currency code for which the price will
|
||||
be used. Only required if region_id is not provided.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
amount:
|
||||
description: The amount to charge for the Product Variant.
|
||||
type: integer
|
||||
min_quantity:
|
||||
description: The minimum quantity for which the price will be used.
|
||||
type: integer
|
||||
max_quantity:
|
||||
description: The maximum quantity for which the price will be used.
|
||||
type: integer
|
||||
options:
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- option_id
|
||||
- value
|
||||
properties:
|
||||
option_id:
|
||||
description: The ID of the Product Option to set the value for.
|
||||
type: string
|
||||
value:
|
||||
description: The value to give for the Product Option.
|
||||
type: string
|
||||
tags:
|
||||
- Product
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
product:
|
||||
$ref: ../components/schemas/product.yaml
|
||||
132
docs/api/admin/paths/regions.yaml
Normal file
132
docs/api/admin/paths/regions.yaml
Normal file
@@ -0,0 +1,132 @@
|
||||
post:
|
||||
operationId: PostRegions
|
||||
summary: Create a Region
|
||||
description: Creates a Region
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
- currency_code
|
||||
- tax_rate
|
||||
- payment_providers
|
||||
- fulfillment_providers
|
||||
- countries
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Region
|
||||
type: string
|
||||
currency_code:
|
||||
description: The 3 character ISO currency code to use for the Region.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
tax_code:
|
||||
description: An optional tax code the Region.
|
||||
type: string
|
||||
tax_rate:
|
||||
description: The tax rate to use on Orders in the Region.
|
||||
type: number
|
||||
payment_providers:
|
||||
description: >-
|
||||
A list of Payment Provider IDs that should be enabled for the
|
||||
Region
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
fulfillment_providers:
|
||||
description: >-
|
||||
A list of Fulfillment Provider IDs that should be enabled for
|
||||
the Region
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
countries:
|
||||
description: >-
|
||||
A list of countries' 2 ISO Characters that should be included in
|
||||
the Region.
|
||||
example:
|
||||
- US
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
get:
|
||||
operationId: GetRegions
|
||||
summary: List Regions
|
||||
description: Retrieves a list of Regions.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
schema:
|
||||
type: integer
|
||||
default: 50
|
||||
required: false
|
||||
description: limit the number of regions in response
|
||||
- in: query
|
||||
name: offset
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
required: false
|
||||
description: Offset of regions in response (used for pagination)
|
||||
- in: query
|
||||
name: created_at
|
||||
schema:
|
||||
type: object
|
||||
required: false
|
||||
description: >-
|
||||
Date comparison for when resulting region was created, i.e. less than,
|
||||
greater than etc.
|
||||
- in: query
|
||||
name: updated_at
|
||||
schema:
|
||||
type: object
|
||||
required: false
|
||||
description: >-
|
||||
Date comparison for when resulting region was updated, i.e. less than,
|
||||
greater than etc.
|
||||
- in: query
|
||||
name: deleted_at
|
||||
schema:
|
||||
type: object
|
||||
required: false
|
||||
description: >-
|
||||
Date comparison for when resulting region was deleted, i.e. less than,
|
||||
greater than etc.
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
regions:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
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
|
||||
135
docs/api/admin/paths/regions_{id}.yaml
Normal file
135
docs/api/admin/paths/regions_{id}.yaml
Normal file
@@ -0,0 +1,135 @@
|
||||
delete:
|
||||
operationId: DeleteRegionsRegion
|
||||
summary: Delete a Region
|
||||
description: Deletes a Region.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Region.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: region
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetRegionsRegion
|
||||
summary: Retrieve a Region
|
||||
description: Retrieves a Region.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
post:
|
||||
operationId: PostRegionsRegion
|
||||
summary: Update a Region
|
||||
description: Updates a Region
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Region
|
||||
type: string
|
||||
currency_code:
|
||||
description: The 3 character ISO currency code to use for the Region.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
automatic_taxes:
|
||||
description: >-
|
||||
If true Medusa will automatically calculate taxes for carts in
|
||||
this region. If false you have to manually call POST
|
||||
/carts/:id/taxes.
|
||||
type: boolean
|
||||
gift_cards_taxable:
|
||||
description: >-
|
||||
Whether gift cards in this region should be applied sales tax
|
||||
when purchasing a gift card
|
||||
type: boolean
|
||||
tax_provider_id:
|
||||
description: >-
|
||||
The ID of the tax provider to use; if null the system tax
|
||||
provider is used
|
||||
type: string
|
||||
tax_code:
|
||||
description: An optional tax code the Region.
|
||||
type: string
|
||||
tax_rate:
|
||||
description: The tax rate to use on Orders in the Region.
|
||||
type: number
|
||||
payment_providers:
|
||||
description: >-
|
||||
A list of Payment Provider IDs that should be enabled for the
|
||||
Region
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
fulfillment_providers:
|
||||
description: >-
|
||||
A list of Fulfillment Provider IDs that should be enabled for
|
||||
the Region
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
countries:
|
||||
description: >-
|
||||
A list of countries' 2 ISO Characters that should be included in
|
||||
the Region.
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
37
docs/api/admin/paths/regions_{id}_countries.yaml
Normal file
37
docs/api/admin/paths/regions_{id}_countries.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
post:
|
||||
operationId: PostRegionsRegionCountries
|
||||
summary: Add Country
|
||||
description: Adds a Country to the list of Countries in a Region
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- country_code
|
||||
properties:
|
||||
country_code:
|
||||
description: The 2 character ISO code for the Country.
|
||||
type: string
|
||||
externalDocs:
|
||||
url: >-
|
||||
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||
description: See a list of codes.
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
@@ -0,0 +1,32 @@
|
||||
delete:
|
||||
operationId: PostRegionsRegionCountriesCountry
|
||||
summary: Remove Country
|
||||
x-authenticated: true
|
||||
description: Removes a Country from the list of Countries in a Region
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: country_code
|
||||
description: The 2 character ISO code for the Country.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
|
||||
description: See a list of codes.
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
35
docs/api/admin/paths/regions_{id}_fulfillment-options.yaml
Normal file
35
docs/api/admin/paths/regions_{id}_fulfillment-options.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
operationId: GetRegionsRegionFulfillmentOptions
|
||||
summary: List Fulfillment Options available in the Region
|
||||
description: Gathers all the fulfillment options available to in the Region.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
fulfillment_options:
|
||||
type: array
|
||||
items:
|
||||
properties:
|
||||
provider_id:
|
||||
type: string
|
||||
description: ID of the fulfillment provider
|
||||
options:
|
||||
type: array
|
||||
description: fulfillment provider options
|
||||
example:
|
||||
- id: manual-fulfillment
|
||||
- id: manual-fulfillment-return
|
||||
is_return: true
|
||||
33
docs/api/admin/paths/regions_{id}_fulfillment-providers.yaml
Normal file
33
docs/api/admin/paths/regions_{id}_fulfillment-providers.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
post:
|
||||
operationId: PostRegionsRegionFulfillmentProviders
|
||||
summary: Add Fulfillment Provider
|
||||
description: Adds a Fulfillment Provider to a Region
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- provider_id
|
||||
properties:
|
||||
provider_id:
|
||||
description: The ID of the Fulfillment Provider to add.
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
@@ -0,0 +1,29 @@
|
||||
delete:
|
||||
operationId: PostRegionsRegionFulfillmentProvidersProvider
|
||||
summary: Remove Fulfillment Provider
|
||||
description: Removes a Fulfillment Provider.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: provider_id
|
||||
required: true
|
||||
description: The ID of the Fulfillment Provider.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
33
docs/api/admin/paths/regions_{id}_payment-providers.yaml
Normal file
33
docs/api/admin/paths/regions_{id}_payment-providers.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
post:
|
||||
operationId: PostRegionsRegionPaymentProviders
|
||||
summary: Add Payment Provider
|
||||
description: Adds a Payment Provider to a Region
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- provider_id
|
||||
properties:
|
||||
provider_id:
|
||||
description: The ID of the Payment Provider to add.
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
@@ -0,0 +1,29 @@
|
||||
delete:
|
||||
operationId: PostRegionsRegionPaymentProvidersProvider
|
||||
summary: Remove Payment Provider
|
||||
description: Removes a Payment Provider.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Region.
|
||||
schema:
|
||||
type: string
|
||||
- in: path
|
||||
name: provider_id
|
||||
required: true
|
||||
description: The ID of the Payment Provider.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Region
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
region:
|
||||
$ref: ../components/schemas/region.yaml
|
||||
59
docs/api/admin/paths/return-reasons.yaml
Normal file
59
docs/api/admin/paths/return-reasons.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
post:
|
||||
operationId: PostReturnReasons
|
||||
summary: Create a Return Reason
|
||||
description: Creates a Return Reason
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- label
|
||||
- value
|
||||
properties:
|
||||
label:
|
||||
description: The label to display to the Customer.
|
||||
type: string
|
||||
value:
|
||||
description: >-
|
||||
The value that the Return Reason will be identified by. Must be
|
||||
unique.
|
||||
type: string
|
||||
parent_return_reason_id:
|
||||
description: The ID of the parent return reason.
|
||||
type: string
|
||||
description:
|
||||
description: An optional description to for the Reason.
|
||||
type: string
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
tags:
|
||||
- Return Reason
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
return_reason:
|
||||
$ref: ../components/schemas/return_reason.yaml
|
||||
get:
|
||||
operationId: GetReturnReasons
|
||||
summary: List Return Reasons
|
||||
description: Retrieves a list of Return Reasons.
|
||||
x-authenticated: true
|
||||
tags:
|
||||
- Return Reason
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
return_reasons:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/return_reason.yaml
|
||||
97
docs/api/admin/paths/return-reasons_{id}.yaml
Normal file
97
docs/api/admin/paths/return-reasons_{id}.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
delete:
|
||||
operationId: DeleteReturnReason
|
||||
summary: Delete a return reason
|
||||
description: Deletes a return reason.
|
||||
x-authenticated: true
|
||||
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:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted return reason
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: return_reason
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetReturnReasonsReason
|
||||
summary: Retrieve a Return Reason
|
||||
description: Retrieves a Return Reason.
|
||||
x-authenticated: true
|
||||
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.yaml
|
||||
post:
|
||||
operationId: PostReturnReasonsReason
|
||||
summary: Update a Return Reason
|
||||
description: Updates a Return Reason
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Return Reason.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
label:
|
||||
description: The label to display to the Customer.
|
||||
type: string
|
||||
value:
|
||||
description: >-
|
||||
The value that the Return Reason will be identified by. Must be
|
||||
unique.
|
||||
type: string
|
||||
description:
|
||||
description: An optional description to for the Reason.
|
||||
type: string
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
tags:
|
||||
- Return Reason
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
return_reason:
|
||||
$ref: ../components/schemas/return_reason.yaml
|
||||
39
docs/api/admin/paths/returns.yaml
Normal file
39
docs/api/admin/paths/returns.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
get:
|
||||
operationId: GetReturns
|
||||
summary: List Returns
|
||||
description: Retrieves a list of Returns
|
||||
parameters:
|
||||
- in: query
|
||||
name: limit
|
||||
description: The upper limit for the amount of responses returned.
|
||||
schema:
|
||||
type: number
|
||||
default: '50'
|
||||
- in: query
|
||||
name: offset
|
||||
description: The offset of the list returned.
|
||||
schema:
|
||||
type: number
|
||||
default: '0'
|
||||
tags:
|
||||
- Return
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
returns:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/return.yaml
|
||||
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
|
||||
22
docs/api/admin/paths/returns_{id}_cancel.yaml
Normal file
22
docs/api/admin/paths/returns_{id}_cancel.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
post:
|
||||
operationId: PostReturnsReturnCancel
|
||||
summary: Cancel a Return
|
||||
description: Registers a Return as canceled.
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Return.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Return
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
order:
|
||||
$ref: ../components/schemas/order.yaml
|
||||
48
docs/api/admin/paths/returns_{id}_receive.yaml
Normal file
48
docs/api/admin/paths/returns_{id}_receive.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
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:
|
||||
required:
|
||||
- items
|
||||
properties:
|
||||
items:
|
||||
description: The Line Items that have been received.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- item_id
|
||||
- quantity
|
||||
properties:
|
||||
item_id:
|
||||
description: The ID of the Line Item.
|
||||
type: string
|
||||
quantity:
|
||||
description: The quantity of the Line Item.
|
||||
type: integer
|
||||
refund:
|
||||
description: The amount to refund.
|
||||
type: number
|
||||
tags:
|
||||
- Return
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
return:
|
||||
$ref: ../components/schemas/return.yaml
|
||||
177
docs/api/admin/paths/sales-channels.yaml
Normal file
177
docs/api/admin/paths/sales-channels.yaml
Normal file
@@ -0,0 +1,177 @@
|
||||
post:
|
||||
operationId: PostSalesChannels
|
||||
summary: Create a Sales Channel
|
||||
description: Creates a Sales Channel.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Sales Channel
|
||||
type: string
|
||||
description:
|
||||
description: The description of the Sales Channel
|
||||
type: string
|
||||
is_disabled:
|
||||
description: Whether the Sales Channel is disabled or not.
|
||||
type: boolean
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
sales_channel:
|
||||
$ref: ../components/schemas/sales_channel.yaml
|
||||
get:
|
||||
operationId: GetSalesChannels
|
||||
summary: List sales channels
|
||||
description: Retrieves a list of sales channels
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: id
|
||||
description: ID of the sales channel
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: name
|
||||
description: Name of the sales channel
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: description
|
||||
description: Description of the sales channel
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: q
|
||||
description: Query used for searching sales channels' names and descriptions.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: order
|
||||
description: The field to order the results by.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Date comparison for when resulting collections were created.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: updated_at
|
||||
description: Date comparison for when resulting collections were updated.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: deleted_at
|
||||
description: Date comparison for when resulting collections were deleted.
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
lt:
|
||||
type: string
|
||||
description: filter by dates less than this date
|
||||
format: date
|
||||
gt:
|
||||
type: string
|
||||
description: filter by dates greater than this date
|
||||
format: date
|
||||
lte:
|
||||
type: string
|
||||
description: filter by dates less than or equal to this date
|
||||
format: date
|
||||
gte:
|
||||
type: string
|
||||
description: filter by dates greater than or equal to this date
|
||||
format: date
|
||||
- in: query
|
||||
name: offset
|
||||
description: How many sales channels to skip in the result.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: limit
|
||||
description: Limit the number of sales channels returned.
|
||||
schema:
|
||||
type: integer
|
||||
default: 20
|
||||
- in: query
|
||||
name: expand
|
||||
description: >-
|
||||
(Comma separated) Which fields should be expanded in each sales channel
|
||||
of the result.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: fields
|
||||
description: >-
|
||||
(Comma separated) Which fields should be included in each sales channel
|
||||
of the result.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
sales_channels:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/sales_channel.yaml
|
||||
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
|
||||
92
docs/api/admin/paths/sales-channels_{id}.yaml
Normal file
92
docs/api/admin/paths/sales-channels_{id}.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
delete:
|
||||
operationId: DeleteSalesChannelsSalesChannel
|
||||
summary: Delete a sales channel
|
||||
description: Deletes the sales channel.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Sales channel.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted sales channel
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: sales-channel
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetSalesChannelsSalesChannel
|
||||
summary: Retrieve a sales channel
|
||||
description: Retrieves the sales channel.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Sales channel.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
sales_channel:
|
||||
$ref: ../components/schemas/sales_channel.yaml
|
||||
post:
|
||||
operationId: PostSalesChannelsSalesChannel
|
||||
summary: Update a Sales Channel
|
||||
description: Updates a Sales Channel.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Sales Channel.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the sales channel.
|
||||
description:
|
||||
type: string
|
||||
description: Sales Channel description.
|
||||
is_disabled:
|
||||
type: boolean
|
||||
description: Indication of if the sales channel is active.
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
sales_channel:
|
||||
$ref: ../components/schemas/sales_channel.yaml
|
||||
82
docs/api/admin/paths/sales-channels_{id}_products_batch.yaml
Normal file
82
docs/api/admin/paths/sales-channels_{id}_products_batch.yaml
Normal file
@@ -0,0 +1,82 @@
|
||||
post:
|
||||
operationId: PostSalesChannelsChannelProductsBatch
|
||||
summary: Assign a batch of product to a sales channel
|
||||
description: Assign a batch of product to a sales channel.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Sales channel.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- product_ids
|
||||
properties:
|
||||
product_ids:
|
||||
description: The IDs of the products to add to the Sales Channel
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the product
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
sales_channel:
|
||||
$ref: ../components/schemas/sales_channel.yaml
|
||||
delete:
|
||||
operationId: DeleteSalesChannelsChannelProductsBatch
|
||||
summary: Remove a list of products from a sales channel
|
||||
description: Remove a list of products from a sales channel.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Sales Channel
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- product_ids
|
||||
properties:
|
||||
product_ids:
|
||||
description: The IDs of the products to delete from the Sales Channel.
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
properties:
|
||||
id:
|
||||
description: The ID of a product
|
||||
type: string
|
||||
tags:
|
||||
- Sales Channel
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
sales_channel:
|
||||
$ref: ../components/schemas/sales_channel.yaml
|
||||
124
docs/api/admin/paths/shipping-options.yaml
Normal file
124
docs/api/admin/paths/shipping-options.yaml
Normal file
@@ -0,0 +1,124 @@
|
||||
post:
|
||||
operationId: PostShippingOptions
|
||||
summary: Create Shipping Option
|
||||
description: Creates a Shipping Option
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- name
|
||||
- region_id
|
||||
- provider_id
|
||||
- data
|
||||
- price_type
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Shipping Option
|
||||
type: string
|
||||
region_id:
|
||||
description: >-
|
||||
The ID of the Region in which the Shipping Option will be
|
||||
available.
|
||||
type: string
|
||||
provider_id:
|
||||
description: >-
|
||||
The ID of the Fulfillment Provider that handles the Shipping
|
||||
Option.
|
||||
type: string
|
||||
profile_id:
|
||||
description: The ID of the Shipping Profile to add the Shipping Option to.
|
||||
type: number
|
||||
data:
|
||||
description: >-
|
||||
The data needed for the Fulfillment Provider to handle shipping
|
||||
with this Shipping Option.
|
||||
type: object
|
||||
price_type:
|
||||
description: The type of the Shipping Option price.
|
||||
type: string
|
||||
enum:
|
||||
- flat_rate
|
||||
- calculated
|
||||
amount:
|
||||
description: The amount to charge for the Shipping Option.
|
||||
type: integer
|
||||
requirements:
|
||||
description: >-
|
||||
The requirements that must be satisfied for the Shipping Option
|
||||
to be available.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- type
|
||||
- amount
|
||||
properties:
|
||||
type:
|
||||
description: The type of the requirement
|
||||
type: string
|
||||
enum:
|
||||
- max_subtotal
|
||||
- min_subtotal
|
||||
amount:
|
||||
description: The amount to compare with.
|
||||
type: integer
|
||||
is_return:
|
||||
description: Whether the Shipping Option defines a return shipment.
|
||||
type: boolean
|
||||
default: false
|
||||
admin_only:
|
||||
description: If true, the option can be used for draft orders
|
||||
type: boolean
|
||||
default: false
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
tags:
|
||||
- Shipping Option
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
shipping_option:
|
||||
$ref: ../components/schemas/shipping_option.yaml
|
||||
get:
|
||||
operationId: GetShippingOptions
|
||||
summary: List Shipping Options
|
||||
description: Retrieves a list of Shipping Options.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: query
|
||||
name: region_id
|
||||
schema:
|
||||
type: string
|
||||
description: Region ID to fetch options from
|
||||
- in: query
|
||||
name: is_return
|
||||
schema:
|
||||
type: boolean
|
||||
description: Flag for fetching return options only
|
||||
- in: query
|
||||
name: admin_only
|
||||
schema:
|
||||
type: boolean
|
||||
description: Flag for fetching admin specific options
|
||||
tags:
|
||||
- Shipping Option
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
shipping_options:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../components/schemas/shipping_option.yaml
|
||||
count:
|
||||
type: integer
|
||||
description: The total number of items available
|
||||
119
docs/api/admin/paths/shipping-options_{id}.yaml
Normal file
119
docs/api/admin/paths/shipping-options_{id}.yaml
Normal file
@@ -0,0 +1,119 @@
|
||||
delete:
|
||||
operationId: DeleteShippingOptionsOption
|
||||
summary: Delete a Shipping Option
|
||||
description: Deletes a Shipping Option.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Shipping Option.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Shipping Option
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: The ID of the deleted Shipping Option.
|
||||
object:
|
||||
type: string
|
||||
description: The type of the object that was deleted.
|
||||
default: shipping-option
|
||||
deleted:
|
||||
type: boolean
|
||||
description: Whether or not the items were deleted.
|
||||
default: true
|
||||
get:
|
||||
operationId: GetShippingOptionsOption
|
||||
summary: Retrieve a Shipping Option
|
||||
description: Retrieves a Shipping Option.
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Shipping Option.
|
||||
schema:
|
||||
type: string
|
||||
tags:
|
||||
- Shipping Option
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
shipping_option:
|
||||
$ref: ../components/schemas/shipping_option.yaml
|
||||
post:
|
||||
operationId: PostShippingOptionsOption
|
||||
summary: Update Shipping Option
|
||||
description: Updates a Shipping Option
|
||||
x-authenticated: true
|
||||
parameters:
|
||||
- in: path
|
||||
name: id
|
||||
required: true
|
||||
description: The ID of the Shipping Option.
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
required:
|
||||
- requirements
|
||||
properties:
|
||||
name:
|
||||
description: The name of the Shipping Option
|
||||
type: string
|
||||
amount:
|
||||
description: The amount to charge for the Shipping Option.
|
||||
type: integer
|
||||
admin_only:
|
||||
description: If true, the option can be used for draft orders
|
||||
type: boolean
|
||||
metadata:
|
||||
description: An optional set of key-value pairs with additional information.
|
||||
type: object
|
||||
requirements:
|
||||
description: >-
|
||||
The requirements that must be satisfied for the Shipping Option
|
||||
to be available.
|
||||
type: array
|
||||
items:
|
||||
required:
|
||||
- type
|
||||
- amount
|
||||
properties:
|
||||
id:
|
||||
description: The ID of the requirement
|
||||
type: string
|
||||
type:
|
||||
description: The type of the requirement
|
||||
type: string
|
||||
enum:
|
||||
- max_subtotal
|
||||
- min_subtotal
|
||||
amount:
|
||||
description: The amount to compare with.
|
||||
type: integer
|
||||
tags:
|
||||
- Shipping Option
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
shipping_option:
|
||||
$ref: ../components/schemas/shipping_option.yaml
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user