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. 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 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 responses: '200': description: OK content: application/json: schema: $ref: ../components/schemas/AdminCollectionsListRes.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: 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 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 responses: '200': description: OK content: application/json: schema: $ref: ../components/schemas/AdminCollectionsRes.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