219 lines
6.2 KiB
YAML
219 lines
6.2 KiB
YAML
post:
|
|
operationId: PostCustomerGroups
|
|
summary: Create a Customer Group
|
|
description: Creates a CustomerGroup.
|
|
x-authenticated: true
|
|
parameters: []
|
|
x-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/customer-groups/postundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/customer-groups/postundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
tags:
|
|
- Customer Group
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
customer_group:
|
|
$ref: ../components/schemas/customer_group.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
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- name
|
|
properties:
|
|
name:
|
|
type: string
|
|
description: Name of the customer group
|
|
metadata:
|
|
type: object
|
|
description: Metadata for the customer.
|
|
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: 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-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/customer-groups/getundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/customer-groups/getundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
tags:
|
|
- Customer Group
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
properties:
|
|
customer_groups:
|
|
type: array
|
|
items:
|
|
$ref: ../components/schemas/customer_group.yaml
|
|
count:
|
|
type: integer
|
|
description: The total number of items available
|
|
offset:
|
|
type: integer
|
|
description: The number of items skipped before these items
|
|
limit:
|
|
type: integer
|
|
description: The number of items per page
|
|
'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
|