delete: operationId: DeleteCollectionsCollection summary: Delete a 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 x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/collections_{id}/deleteundefined - lang: Shell label: cURL source: $ref: ../code_samples/Shell/collections_{id}/deleteundefined security: - api_token: [] - cookie_auth: [] 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 '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: GetCollectionsCollection summary: Get a 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 x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/collections_{id}/getundefined - lang: Shell label: cURL source: $ref: ../code_samples/Shell/collections_{id}/getundefined security: - api_token: [] - cookie_auth: [] tags: - Collection responses: '200': description: OK content: application/json: schema: properties: collection: $ref: ../components/schemas/product_collection.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 post: operationId: PostCollectionsCollection summary: Update a 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 x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/collections_{id}/postundefined - lang: Shell label: cURL source: $ref: ../code_samples/Shell/collections_{id}/postundefined security: - api_token: [] - cookie_auth: [] tags: - Collection responses: '200': description: OK content: application/json: schema: properties: collection: $ref: ../components/schemas/product_collection.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