Files
medusa-store/docs/api/admin/paths/collections_{id}.yaml
2022-08-05 14:06:12 +02:00

97 lines
2.5 KiB
YAML

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