1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00
invoiceninja/openapi/paths/vendors.yaml

403 lines
13 KiB
YAML
Raw Normal View History

2023-02-19 06:16:55 +01:00
/api/v1/vendors:
get:
tags:
- vendors
summary: "List vendors"
description: "Lists vendors, 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 vendors, these are handled by the VendorFilters class which defines the methods available"
operationId: getVendors
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
- $ref: "#/components/parameters/index"
responses:
200:
description: "A list of vendors"
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:
2023-07-08 12:16:09 +02:00
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Vendor'
meta:
type: object
$ref: '#/components/schemas/Meta'
2023-02-19 06:16:55 +01:00
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
post:
tags:
- vendors
summary: "Create vendor"
description: "Adds a vendor to a company"
operationId: storeVendor
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
responses:
200:
description: "Returns the saved clivendorent 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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
"/api/v1/vendors/{id}":
get:
tags:
- vendors
summary: "Show vendor"
description: "Displays a vendor by id"
operationId: showVendor
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
- name: id
in: path
description: "The vendor Hashed ID"
required: true
schema:
type: string
format: string
example: D2J234DFA
responses:
200:
description: "Returns the vendor 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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
put:
tags:
- vendors
summary: "Update vendor"
description: "Handles the updating of a vendor by id"
operationId: updateVendor
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
- name: id
in: path
description: "The Vendor Hashed ID"
required: true
schema:
type: string
format: string
example: D2J234DFA
responses:
200:
description: "Returns the vendor 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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
delete:
tags:
- vendors
summary: "Delete vendor"
description: "Handles the deletion of a vendor by id"
operationId: deleteVendor
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
- name: id
in: path
description: "The Vendor Hashed ID"
required: true
schema:
type: string
format: string
example: D2J234DFA
responses:
200:
description: "Returns a HTTP status"
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"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
"/api/v1/vendors/{id}/edit":
get:
tags:
- vendors
summary: "Edit vendor"
description: "Displays a vendor by id"
operationId: editVendor
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
- name: id
in: path
description: "The Vendor Hashed ID"
required: true
schema:
type: string
format: string
example: D2J234DFA
responses:
200:
description: "Returns the vendor 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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
/api/v1/vendors/create:
get:
tags:
- vendors
summary: "Blank vendor"
description: "Returns a blank vendor with default values"
operationId: getVendorsCreate
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
responses:
200:
description: "A blank vendor 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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
/api/v1/vendors/bulk:
post:
tags:
- vendors
summary: "Bulk vendor actions"
description: ""
operationId: bulkVendors
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/index"
requestBody:
description: "User credentials"
required: true
content:
application/json:
schema:
type: array
items:
description: "Array of hashed IDs to be bulk 'actioned"
type: integer
example: "[0,1,2,3]"
responses:
200:
description: "The Vendor User response"
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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"
"/api/v1/vendors/{id}/upload":
2023-11-23 02:08:50 +01:00
post:
2023-02-19 06:16:55 +01:00
tags:
- vendors
summary: "Uploads a vendor document"
description: "Handles the uploading of a document to a vendor"
operationId: uploadVendor
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/include"
- name: id
in: path
description: "The Vendor Hashed ID"
required: true
schema:
type: string
format: string
example: D2J234DFA
2023-11-23 02:08:50 +01:00
requestBody:
description: "File Upload Body"
required: true
content:
multipart/form-data:
schema:
type: object
properties:
_method:
type: string
example: PUT
documents:
type: array
items:
description: "Array of binary documents for upload"
type: string
format: binary
2023-02-19 06:16:55 +01:00
responses:
200:
description: "Returns the Vendor 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/Vendor"
401:
$ref: "#/components/responses/401"
403:
$ref: "#/components/responses/403"
422:
2023-04-29 15:12:29 +02:00
$ref: '#/components/responses/422'
429:
$ref: '#/components/responses/429'
5XX:
description: 'Server error'
2023-02-19 06:16:55 +01:00
default:
$ref: "#/components/responses/default"