mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
add responses into components
This commit is contained in:
parent
e97b69d55c
commit
9f997e9bc4
11518
openapi/api-docs.yaml
11518
openapi/api-docs.yaml
File diff suppressed because it is too large
Load Diff
5
openapi/components/responses/401.yaml
Normal file
5
openapi/components/responses/401.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
5
openapi/components/responses/403.yaml
Normal file
5
openapi/components/responses/403.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
0
openapi/components/responses/404.yaml
Normal file
0
openapi/components/responses/404.yaml
Normal file
5
openapi/components/responses/422.yaml
Normal file
5
openapi/components/responses/422.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
5
openapi/components/responses/default.yaml
Normal file
5
openapi/components/responses/default.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
@ -1,25 +1,21 @@
|
||||
tags:
|
||||
-
|
||||
name: login
|
||||
- name: login
|
||||
description: |
|
||||
Attempts to authenticate with the API using a email/password combination.
|
||||
Attempts to authenticate with the API using a email/password combination.
|
||||
externalDocs:
|
||||
description: 'Find out more'
|
||||
url: 'https://invoiceninja.github.io'
|
||||
-
|
||||
name: clients
|
||||
description: "Find out more"
|
||||
url: "https://invoiceninja.github.io"
|
||||
- name: clients
|
||||
description: |
|
||||
Endpoint definitions for interacting with clients.
|
||||
-
|
||||
name: products
|
||||
Endpoint definitions for interacting with clients.
|
||||
- name: products
|
||||
description: |
|
||||
Endpoint definitions for interacting with products.
|
||||
-
|
||||
name: invoices
|
||||
Endpoint definitions for interacting with products.
|
||||
- name: invoices
|
||||
description: |
|
||||
Endpoint definitions for interacting with invoices.
|
||||
Endpoint definitions for interacting with invoices.
|
||||
externalDocs:
|
||||
description: 'https://invoiceninja.github.io'
|
||||
url: 'https://invoiceninja.github.io'
|
||||
description: "https://invoiceninja.github.io"
|
||||
url: "https://invoiceninja.github.io"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
- ApiKeyAuth: []
|
||||
|
10554
openapi/paths.yaml
10554
openapi/paths.yaml
File diff suppressed because it is too large
Load Diff
@ -7,72 +7,60 @@
|
||||
Lists clients. Fine grained filtering is also available using query parameters.
|
||||
operationId: getClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
-
|
||||
name: name
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- $ref: '#/components/parameters/index'
|
||||
- name: name
|
||||
in: query
|
||||
description: Filter by client name
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob
|
||||
-
|
||||
name: balance
|
||||
- name: balance
|
||||
in: query
|
||||
description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: lt:10
|
||||
-
|
||||
name: between_balance
|
||||
- name: between_balance
|
||||
in: query
|
||||
description: Filter between client balances, format uses two values separated by a colon
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: 10:100
|
||||
-
|
||||
name: email
|
||||
- name: email
|
||||
in: query
|
||||
description: Filter by client email
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: bob@gmail.com
|
||||
-
|
||||
name: id_number
|
||||
- name: id_number
|
||||
in: query
|
||||
description: Filter by client id_number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: number
|
||||
- name: number
|
||||
in: query
|
||||
description: Filter by client number
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: filter
|
||||
- name: filter
|
||||
in: query
|
||||
description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: a1039883
|
||||
-
|
||||
name: sort
|
||||
- name: sort
|
||||
in: query
|
||||
description: Returns the list sorted by column in ascending or descending order.
|
||||
required: false
|
||||
@ -101,36 +89,21 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Create client'
|
||||
description: 'Adds an client to a company'
|
||||
description: 'Adds a client to a company'
|
||||
operationId: storeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the saved client object'
|
||||
@ -152,23 +125,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}':
|
||||
get:
|
||||
tags:
|
||||
@ -177,74 +138,10 @@
|
||||
description: 'Displays a client by id'
|
||||
operationId: showClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the cl.ient object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Update client'
|
||||
description: 'Handles the updating of a client by id'
|
||||
operationId: updateClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -273,23 +170,55 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
$ref: '#/components/responses/default'
|
||||
put:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Update client'
|
||||
description: 'Handles the updating of a client by id'
|
||||
operationId: updateClient
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the client object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
$ref: '#/components/responses/default'
|
||||
delete:
|
||||
tags:
|
||||
- clients
|
||||
@ -297,14 +226,10 @@
|
||||
description: 'Handles the deletion of a client by id'
|
||||
operationId: deleteClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -329,23 +254,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/edit':
|
||||
get:
|
||||
tags:
|
||||
@ -354,14 +267,10 @@
|
||||
description: 'Displays a client by id'
|
||||
operationId: editClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -390,23 +299,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
/api/v1/clients/create:
|
||||
get:
|
||||
tags:
|
||||
@ -415,12 +312,9 @@
|
||||
description: 'Returns a blank object with default values'
|
||||
operationId: getClientsCreate
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
responses:
|
||||
200:
|
||||
description: 'A blank client object'
|
||||
@ -442,37 +336,22 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
/api/v1/clients/bulk:
|
||||
post:
|
||||
tags:
|
||||
- clients
|
||||
summary: 'Bulk actions'
|
||||
description: ''
|
||||
summary: 'Bulk client actions'
|
||||
description: 'Archive / Restore / Delete in bulk'
|
||||
operationId: bulkClients
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/index'
|
||||
requestBody:
|
||||
description: 'User credentials'
|
||||
required: true
|
||||
@ -505,23 +384,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/upload':
|
||||
put:
|
||||
tags:
|
||||
@ -530,14 +397,10 @@
|
||||
description: 'Handles the uploading of a document to a client, please note due to a quirk in REST you will need to use a _method parameter with value of POST'
|
||||
operationId: uploadClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -581,23 +444,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/purge':
|
||||
post:
|
||||
tags:
|
||||
@ -606,14 +457,10 @@
|
||||
description: 'Handles purging a client'
|
||||
operationId: purgeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -638,23 +485,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
'/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge':
|
||||
post:
|
||||
tags:
|
||||
@ -663,14 +498,10 @@
|
||||
description: 'Handles merging 2 clients'
|
||||
operationId: mergeClient
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/client_include'
|
||||
-
|
||||
name: id
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/client_include'
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Client Hashed ID'
|
||||
required: true
|
||||
@ -678,8 +509,7 @@
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
-
|
||||
name: mergeable_client_hashed_id
|
||||
- name: mergeable_client_hashed_id
|
||||
in: path
|
||||
description: 'The Mergeable Client Hashed ID'
|
||||
required: true
|
||||
@ -704,23 +534,11 @@
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
||||
/api/v1/client_statement:
|
||||
post:
|
||||
tags:
|
||||
@ -729,12 +547,9 @@
|
||||
description: 'Return a PDF of the client statement'
|
||||
operationId: clientStatement
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
- $ref: '#/components/parameters/X-API-TOKEN'
|
||||
- $ref: '#/components/parameters/X-Requested-With'
|
||||
- $ref: '#/components/parameters/include'
|
||||
requestBody:
|
||||
description: 'Statment Options'
|
||||
required: true
|
||||
@ -773,26 +588,10 @@
|
||||
schema:
|
||||
$ref: '#/components/schemas/Client'
|
||||
401:
|
||||
description: 'Authentication error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthenticationError'
|
||||
$ref: '#/components/responses/401'
|
||||
403:
|
||||
description: 'Authorization error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#components/schemas/AuthorizationError'
|
||||
$ref: '#/components/responses/403'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: '#/components/responses/422'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: '#/components/responses/default'
|
@ -2,139 +2,104 @@
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: 'List products'
|
||||
description: "Lists products, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the products, these are handled by the ProductFilters class which defines the methods available"
|
||||
summary: "List products"
|
||||
description: |
|
||||
Lists products, search and filters allow fine grained lists to be generated.
|
||||
Query parameters can be added to perform fine grained filtering of the products list, these are handled by the ProductFilters class
|
||||
which defines the methods available
|
||||
operationId: getProducts
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: 'A list of products'
|
||||
description: "A list of products"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Create Product'
|
||||
description: 'Adds an Product to the system'
|
||||
summary: "Create Product"
|
||||
description: "Adds a product to a company"
|
||||
operationId: storeProduct
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the saved Product object'
|
||||
description: "Returns the saved product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
/api/v1/products/create:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"/api/v1/products/{id}":
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Create product'
|
||||
description: 'Returns a blank object with default values'
|
||||
operationId: getProductsCreate
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
responses:
|
||||
200:
|
||||
description: 'A blank Product object'
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
422:
|
||||
description: 'Validation error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/products/{id}':
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Show product'
|
||||
description: 'Displays an Product by id'
|
||||
summary: "Show product"
|
||||
description: "Displays a product by id"
|
||||
operationId: showProduct
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Product Hashed ID'
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
@ -142,47 +107,55 @@
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the Product object'
|
||||
description: "Returns the product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: "#/components/schemas/Error"
|
||||
put:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Update product'
|
||||
description: 'Handles the updating of an Product by id'
|
||||
summary: "Update product"
|
||||
description: "Handles the updating of a product by id"
|
||||
operationId: updateProduct
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Product Hashed ID'
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
@ -190,47 +163,55 @@
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the Product object'
|
||||
description: "Returns the Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: "#/components/schemas/Error"
|
||||
delete:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Delete product'
|
||||
description: 'Handles the deletion of an Product by id'
|
||||
summary: "Delete product"
|
||||
description: "Handles the deletion of a product by id"
|
||||
operationId: deleteProduct
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Product Hashed ID'
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
@ -238,44 +219,52 @@
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns a HTTP status'
|
||||
description: "Returns a HTTP status"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/products/{id}/edit':
|
||||
$ref: "#/components/schemas/Error"
|
||||
"/api/v1/products/{id}/edit":
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Edit product'
|
||||
description: 'Displays an Product by id'
|
||||
summary: "Edit product"
|
||||
description: "Displays an Product by id"
|
||||
operationId: editProduct
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Product Hashed ID'
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
@ -283,127 +272,221 @@
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
200:
|
||||
description: 'Returns the Product object'
|
||||
description: "Returns the Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: "#/components/schemas/Error"
|
||||
"/api/v1/products/create":
|
||||
get:
|
||||
tags:
|
||||
- products
|
||||
summary: "Blank product"
|
||||
description: "Returns a blank product object with default values"
|
||||
operationId: getProductsCreate
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/include"
|
||||
responses:
|
||||
200:
|
||||
description: "A blank Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
|
||||
/api/v1/products/bulk:
|
||||
post:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Bulk product actions'
|
||||
description: ''
|
||||
summary: "Bulk product actions"
|
||||
description: "Archive / Restore / Delete in bulk"
|
||||
operationId: bulkProducts
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/index'
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/index"
|
||||
requestBody:
|
||||
description: 'Hashed IDs'
|
||||
description: "Hashed IDs"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
description: 'Array of hashed IDs to be bulk ''actioned'
|
||||
description: "Array of hashed IDs to be bulk 'actioned"
|
||||
type: integer
|
||||
example: '[0,1,2,3]'
|
||||
example: "[0,1,2,3]"
|
||||
responses:
|
||||
200:
|
||||
description: 'The Product response'
|
||||
description: "The Product response"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'/api/v1/products/{id}/upload':
|
||||
$ref: "#/components/schemas/Error"
|
||||
|
||||
"/api/v1/products/{id}/upload":
|
||||
put:
|
||||
tags:
|
||||
- products
|
||||
summary: 'Add product document'
|
||||
description: 'Handles the uploading of a document to a product'
|
||||
summary: "Add product document"
|
||||
description: "Handles the uploading of a document to a product"
|
||||
operationId: uploadProduct
|
||||
parameters:
|
||||
-
|
||||
$ref: '#/components/parameters/X-API-TOKEN'
|
||||
-
|
||||
$ref: '#/components/parameters/X-Requested-With'
|
||||
-
|
||||
$ref: '#/components/parameters/include'
|
||||
-
|
||||
name: id
|
||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||
- $ref: "#/components/parameters/X-Requested-With"
|
||||
- $ref: "#/components/parameters/client_include"
|
||||
- name: id
|
||||
in: path
|
||||
description: 'The Product Hashed ID'
|
||||
description: "The Product Hashed ID"
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: string
|
||||
example: D2J234DFA
|
||||
responses:
|
||||
produces:
|
||||
- application/json
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
_method:
|
||||
type: string
|
||||
example: POST
|
||||
documents:
|
||||
type: array
|
||||
format: binary
|
||||
200:
|
||||
description: 'Returns the Product object'
|
||||
description: "Returns the Product object"
|
||||
headers:
|
||||
X-MINIMUM-CLIENT-VERSION:
|
||||
$ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION'
|
||||
$ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION"
|
||||
X-RateLimit-Remaining:
|
||||
$ref: '#/components/headers/X-RateLimit-Remaining'
|
||||
$ref: "#/components/headers/X-RateLimit-Remaining"
|
||||
X-RateLimit-Limit:
|
||||
$ref: '#/components/headers/X-RateLimit-Limit'
|
||||
$ref: "#/components/headers/X-RateLimit-Limit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Product'
|
||||
$ref: "#/components/schemas/Product"
|
||||
401:
|
||||
description: "Authentication error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthenticationError"
|
||||
403:
|
||||
description: "Authorization error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#components/schemas/AuthorizationError"
|
||||
422:
|
||||
description: 'Validation error'
|
||||
description: "Validation error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ValidationError'
|
||||
$ref: "#/components/schemas/ValidationError"
|
||||
default:
|
||||
description: 'Unexpected Error'
|
||||
description: "Unexpected Error"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
$ref: "#/components/schemas/Error"
|
||||
|
Loading…
x
Reference in New Issue
Block a user