docs: update api-reference project for v2 (#7307)
* remove everything v1 and make v2 default * move main v2 rewrites to book * move rewrites to book + other fixes
This commit is contained in:
@@ -2,143 +2,22 @@ get:
|
||||
operationId: GetCollections
|
||||
summary: List Collections
|
||||
description: >-
|
||||
Retrieve a list of Product Collection. The product collections can be
|
||||
filtered by fields such as `handle` or `title`. The collections can also be
|
||||
sorted or paginated.
|
||||
Retrieve a list of collections. The collections can be filtered by fields
|
||||
such as `id`. The collections can also be sorted or paginated.
|
||||
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 when retrieving the collections.
|
||||
schema:
|
||||
type: integer
|
||||
default: 0
|
||||
- in: query
|
||||
name: title
|
||||
description: Filter collections by their title.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: handle
|
||||
description: Filter collections by their handle.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: q
|
||||
description: a term to search collections by their title or handle.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: order
|
||||
description: A field to sort-order the retrieved collections by.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: discount_condition_id
|
||||
description: Filter collections by a discount condition ID associated with them.
|
||||
schema:
|
||||
type: string
|
||||
- in: query
|
||||
name: created_at
|
||||
description: Filter by a creation date range.
|
||||
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: Filter by an update date range.
|
||||
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: Filter by a deletion date range.
|
||||
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
|
||||
x-codegen:
|
||||
method: list
|
||||
queryParams: AdminGetCollectionsParams
|
||||
parameters: []
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_collections/get.js
|
||||
- lang: tsx
|
||||
label: Medusa React
|
||||
source:
|
||||
$ref: ../code_samples/tsx/admin_collections/get.tsx
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_collections/get.sh
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
tags:
|
||||
- Product Collections
|
||||
- Collections
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminCollectionsListRes.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
@@ -151,44 +30,28 @@ get:
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
post:
|
||||
operationId: PostCollections
|
||||
summary: Create a Collection
|
||||
description: Create a Product Collection.
|
||||
x-authenticated: true
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminPostCollectionsReq.yaml
|
||||
x-codegen:
|
||||
method: create
|
||||
schema: {}
|
||||
post:
|
||||
operationId: PostCollections
|
||||
summary: Create Collection
|
||||
description: Create a collection.
|
||||
x-authenticated: true
|
||||
parameters: []
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: JavaScript
|
||||
label: JS Client
|
||||
source:
|
||||
$ref: ../code_samples/JavaScript/admin_collections/post.js
|
||||
- lang: tsx
|
||||
label: Medusa React
|
||||
source:
|
||||
$ref: ../code_samples/tsx/admin_collections/post.tsx
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/admin_collections/post.sh
|
||||
security:
|
||||
- api_token: []
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
tags:
|
||||
- Product Collections
|
||||
- Collections
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/AdminCollectionsRes.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
@@ -201,3 +64,7 @@ post:
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
|
||||
Reference in New Issue
Block a user