post: operationId: PostCustomerGroups summary: Create a Customer Group description: Creates a CustomerGroup. x-authenticated: true requestBody: content: application/json: schema: $ref: ../components/schemas/AdminPostCustomerGroupsReq.yaml x-codegen: method: create x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/customer-groups/post.js - lang: Shell label: cURL source: $ref: ../code_samples/Shell/customer-groups/post.sh security: - api_token: [] - cookie_auth: [] tags: - Customer Group responses: '200': description: OK content: application/json: schema: $ref: ../components/schemas/AdminCustomerGroupsRes.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: GetCustomerGroups summary: List Customer Groups description: Retrieve a list of customer groups. x-authenticated: true parameters: - in: query name: q description: Query used for searching customer group names. schema: type: string - in: query name: offset description: How many groups to skip in the result. schema: type: integer default: 0 - in: query name: order description: the field used to order the customer groups. schema: type: string - in: query name: discount_condition_id description: The discount condition id on which to filter the customer groups. schema: type: string - in: query name: id style: form explode: false description: Filter by the customer group ID schema: oneOf: - type: string description: customer group ID - type: array description: multiple customer group IDs items: type: string - type: object properties: lt: type: string description: filter by IDs less than this ID gt: type: string description: filter by IDs greater than this ID lte: type: string description: filter by IDs less than or equal to this ID gte: type: string description: filter by IDs greater than or equal to this ID - in: query name: name style: form explode: false description: Filter by the customer group name schema: type: array description: multiple customer group names items: type: string description: customer group name - in: query name: created_at description: Date comparison for when resulting customer groups 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 customer groups 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: limit description: Limit the number of customer groups returned. schema: type: integer default: 10 - in: query name: expand description: >- (Comma separated) Which fields should be expanded in each customer groups of the result. schema: type: string x-codegen: method: list queryParams: AdminGetCustomerGroupsParams x-codeSamples: - lang: JavaScript label: JS Client source: $ref: ../code_samples/JavaScript/customer-groups/get.js - lang: Shell label: cURL source: $ref: ../code_samples/Shell/customer-groups/get.sh security: - api_token: [] - cookie_auth: [] tags: - Customer Group responses: '200': description: OK content: application/json: schema: $ref: ../components/schemas/AdminCustomerGroupsListRes.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