mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 00:54:38 -04:00
Completing OpenAPI documentation for clients
This commit is contained in:
parent
162cbc96ac
commit
279de2dfff
@ -9923,23 +9923,19 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- products
|
- products
|
||||||
summary: "Bulk product actions"
|
summary: "Bulk product actions"
|
||||||
description: "Archive / Restore / Delete in bulk"
|
description: "Archive / Restore / Delete / Set tax id in bulk"
|
||||||
operationId: bulkProducts
|
operationId: bulkProducts
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||||
- $ref: "#/components/parameters/X-Requested-With"
|
- $ref: "#/components/parameters/X-Requested-With"
|
||||||
- $ref: "#/components/parameters/index"
|
- $ref: "#/components/parameters/index"
|
||||||
requestBody:
|
requestBody:
|
||||||
description: "Hashed IDs"
|
description: 'Bulk action array'
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: '#/components/schemas/ProductBulkAction'
|
||||||
items:
|
|
||||||
description: "Array of hashed IDs to be bulk 'actioned"
|
|
||||||
type: integer
|
|
||||||
example: "[0,1,2,3]"
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "The Product response"
|
description: "The Product response"
|
||||||
@ -17448,6 +17444,43 @@ components:
|
|||||||
token:
|
token:
|
||||||
$ref: '#/components/schemas/CompanyToken'
|
$ref: '#/components/schemas/CompanyToken'
|
||||||
type: object
|
type: object
|
||||||
|
|
||||||
|
ProductBulkAction:
|
||||||
|
required:
|
||||||
|
- action
|
||||||
|
- ids
|
||||||
|
properties:
|
||||||
|
action:
|
||||||
|
type: string
|
||||||
|
example: archive
|
||||||
|
description: 'The action to perform ie. archive / restore / delete / set_tax_id'
|
||||||
|
ids:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
format: string
|
||||||
|
type: string
|
||||||
|
example: 2J234DFA,D2J234DFA,D2J234DFA
|
||||||
|
description: string array of client hashed ids
|
||||||
|
tax_id:
|
||||||
|
type: string
|
||||||
|
example: '1'
|
||||||
|
description: |
|
||||||
|
The tax rate id to set on the list of products
|
||||||
|
|
||||||
|
The following constants are available (default = '1')
|
||||||
|
|
||||||
|
```
|
||||||
|
PRODUCT_TYPE_PHYSICAL = '1'
|
||||||
|
PRODUCT_TYPE_SERVICE = '2'
|
||||||
|
PRODUCT_TYPE_DIGITAL = '3'
|
||||||
|
PRODUCT_TYPE_SHIPPING = '4'
|
||||||
|
PRODUCT_TYPE_EXEMPT = '5'
|
||||||
|
PRODUCT_TYPE_REDUCED_TAX = '6'
|
||||||
|
PRODUCT_TYPE_OVERRIDE_TAX = '7'
|
||||||
|
PRODUCT_TYPE_ZERO_RATED = '8'
|
||||||
|
PRODUCT_TYPE_REVERSE_TAX = '9'
|
||||||
|
```
|
||||||
|
type: object
|
||||||
Document:
|
Document:
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
|
37
openapi/components/schemas/product_bulk_action.yaml
Normal file
37
openapi/components/schemas/product_bulk_action.yaml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
ProductBulkAction:
|
||||||
|
required:
|
||||||
|
- action
|
||||||
|
- ids
|
||||||
|
properties:
|
||||||
|
action:
|
||||||
|
type: string
|
||||||
|
example: archive
|
||||||
|
description: 'The action to perform ie. archive / restore / delete / set_tax_id'
|
||||||
|
ids:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
format: string
|
||||||
|
type: string
|
||||||
|
example: 2J234DFA,D2J234DFA,D2J234DFA
|
||||||
|
description: string array of client hashed ids
|
||||||
|
tax_id:
|
||||||
|
type: string
|
||||||
|
example: '1'
|
||||||
|
description: |
|
||||||
|
The tax rate id to set on the list of products
|
||||||
|
|
||||||
|
The following constants are available (default = '1')
|
||||||
|
|
||||||
|
```
|
||||||
|
PRODUCT_TYPE_PHYSICAL = '1'
|
||||||
|
PRODUCT_TYPE_SERVICE = '2'
|
||||||
|
PRODUCT_TYPE_DIGITAL = '3'
|
||||||
|
PRODUCT_TYPE_SHIPPING = '4'
|
||||||
|
PRODUCT_TYPE_EXEMPT = '5'
|
||||||
|
PRODUCT_TYPE_REDUCED_TAX = '6'
|
||||||
|
PRODUCT_TYPE_OVERRIDE_TAX = '7'
|
||||||
|
PRODUCT_TYPE_ZERO_RATED = '8'
|
||||||
|
PRODUCT_TYPE_REVERSE_TAX = '9'
|
||||||
|
```
|
||||||
|
type: object
|
@ -333,23 +333,19 @@
|
|||||||
tags:
|
tags:
|
||||||
- products
|
- products
|
||||||
summary: "Bulk product actions"
|
summary: "Bulk product actions"
|
||||||
description: "Archive / Restore / Delete in bulk"
|
description: "Archive / Restore / Delete / Set tax id in bulk"
|
||||||
operationId: bulkProducts
|
operationId: bulkProducts
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||||
- $ref: "#/components/parameters/X-Requested-With"
|
- $ref: "#/components/parameters/X-Requested-With"
|
||||||
- $ref: "#/components/parameters/index"
|
- $ref: "#/components/parameters/index"
|
||||||
requestBody:
|
requestBody:
|
||||||
description: "Hashed IDs"
|
description: 'Bulk action array'
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: '#/components/schemas/ProductBulkAction'
|
||||||
items:
|
|
||||||
description: "Array of hashed IDs to be bulk 'actioned"
|
|
||||||
type: integer
|
|
||||||
example: "[0,1,2,3]"
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: "The Product response"
|
description: "The Product response"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user