chore(docs): Refactor API Reference (#1883)
This commit is contained in:
170
docs/api/admin/paths/customer-groups.yaml
Normal file
170
docs/api/admin/paths/customer-groups.yaml
Normal file
@@ -0,0 +1,170 @@
|
||||
post:
|
||||
operationId: PostCustomerGroups
|
||||
summary: Create a CustomerGroup
|
||||
description: Creates a CustomerGroup.
|
||||
x-authenticated: true
|
||||
parameters: []
|
||||
tags:
|
||||
- Customer Group
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
customer_group:
|
||||
$ref: ../components/schemas/customer_group.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: Retrieve a list of 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
|
||||
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
|
||||
Reference in New Issue
Block a user