105 lines
2.7 KiB
YAML
105 lines
2.7 KiB
YAML
post:
|
|
operationId: PostCustomers
|
|
summary: Create a Customer
|
|
description: Creates a Customer.
|
|
x-authenticated: true
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/AdminPostCustomersReq.yaml
|
|
tags:
|
|
- Customer
|
|
x-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/customers/postundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/customers/postundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
responses:
|
|
'201':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/AdminCustomersRes.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: GetCustomers
|
|
summary: List Customers
|
|
description: Retrieves a list of Customers.
|
|
x-authenticated: true
|
|
parameters:
|
|
- in: query
|
|
name: limit
|
|
description: The number of items to return.
|
|
schema:
|
|
type: integer
|
|
default: 50
|
|
- in: query
|
|
name: offset
|
|
description: The items to skip before result.
|
|
schema:
|
|
type: integer
|
|
default: 0
|
|
- in: query
|
|
name: expand
|
|
description: (Comma separated) Which fields should be expanded in each customer.
|
|
schema:
|
|
type: string
|
|
- in: query
|
|
name: q
|
|
description: a search term to search email, first_name, and last_name.
|
|
schema:
|
|
type: string
|
|
x-codeSamples:
|
|
- lang: JavaScript
|
|
label: JS Client
|
|
source:
|
|
$ref: ../code_samples/JavaScript/customers/getundefined
|
|
- lang: Shell
|
|
label: cURL
|
|
source:
|
|
$ref: ../code_samples/Shell/customers/getundefined
|
|
security:
|
|
- api_token: []
|
|
- cookie_auth: []
|
|
tags:
|
|
- Customer
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas/AdminCustomersListRes.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
|