Files
medusa-store/docs/api/admin/paths/sales-channels.yaml
2023-01-19 10:06:17 +02:00

200 lines
5.6 KiB
YAML

post:
operationId: PostSalesChannels
summary: Create a Sales Channel
description: Creates a Sales Channel.
x-authenticated: true
requestBody:
content:
application/json:
schema:
$ref: ../components/schemas/AdminPostSalesChannelsReq.yaml
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/sales-channels/postundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/sales-channels/postundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Sales Channel
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminSalesChannelsRes.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.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
x-codeSamples:
- lang: JavaScript
label: JS Client
source:
$ref: ../code_samples/JavaScript/sales-channels/getundefined
- lang: Shell
label: cURL
source:
$ref: ../code_samples/Shell/sales-channels/getundefined
security:
- api_token: []
- cookie_auth: []
tags:
- Sales Channel
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: ../components/schemas/AdminSalesChannelsListRes.yaml
'400':
$ref: ../components/responses/400_error.yaml
'401':
$ref: ../components/responses/unauthorized.yaml
'404':
$ref: ../components/responses/not_found_error.yaml
'409':
$ref: ../components/responses/invalid_state_error.yaml
'422':
$ref: ../components/responses/invalid_request_error.yaml
'500':
$ref: ../components/responses/500_error.yaml