Updates for openapi

This commit is contained in:
David Bomba 2023-03-12 22:44:53 +11:00
parent 0f1318e701
commit a94e36ed8b
3 changed files with 92 additions and 38 deletions

View File

@ -12054,7 +12054,7 @@ paths:
/api/v1/recurring_invoices: /api/v1/recurring_invoices:
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "List recurring invoices" summary: "List recurring invoices"
description: | description: |
Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
@ -12125,7 +12125,7 @@ paths:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Create recurring invoice" summary: "Create recurring invoice"
description: "Adds a Recurring Invoice to the system" description: "Adds a Recurring Invoice to the system"
operationId: storeRecurringInvoice operationId: storeRecurringInvoice
@ -12159,7 +12159,7 @@ paths:
"/api/v1/recurring_invoices/{id}": "/api/v1/recurring_invoices/{id}":
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Show recurring invoice" summary: "Show recurring invoice"
description: "Displays an RecurringInvoice by id" description: "Displays an RecurringInvoice by id"
operationId: showRecurringInvoice operationId: showRecurringInvoice
@ -12199,7 +12199,7 @@ paths:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Update recurring invoice" summary: "Update recurring invoice"
description: "Handles the updating of an RecurringInvoice by id" description: "Handles the updating of an RecurringInvoice by id"
operationId: updateRecurringInvoice operationId: updateRecurringInvoice
@ -12239,7 +12239,7 @@ paths:
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Delete recurring invoice" summary: "Delete recurring invoice"
description: "Handles the deletion of an RecurringInvoice by id" description: "Handles the deletion of an RecurringInvoice by id"
operationId: deleteRecurringInvoice operationId: deleteRecurringInvoice
@ -12276,7 +12276,7 @@ paths:
"/api/v1/recurring_invoices/{id}/edit": "/api/v1/recurring_invoices/{id}/edit":
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Edit recurring invoice" summary: "Edit recurring invoice"
description: "Displays an RecurringInvoice by id" description: "Displays an RecurringInvoice by id"
operationId: editRecurringInvoice operationId: editRecurringInvoice
@ -12318,7 +12318,7 @@ paths:
/api/v1/recurring_invoices/create: /api/v1/recurring_invoices/create:
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Blank recurring invoice" summary: "Blank recurring invoice"
description: "Returns a blank object with default values" description: "Returns a blank object with default values"
operationId: getRecurringInvoicesCreate operationId: getRecurringInvoicesCreate
@ -12351,25 +12351,52 @@ paths:
/api/v1/recurring_invoices/bulk: /api/v1/recurring_invoices/bulk:
post: post:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Bulk recurring invoice actions" summary: "Bulk recurring invoice actions"
description: "" description: |
There are multiple actions that are available including:
operationId: bulkRecurringInvoices operationId: bulkRecurringInvoices
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 details"
required: true required: true
content: content:
application/json: application/json:
schema: schema:
type: array type: object
items: properties:
description: "Array of hashed IDs to be bulk 'actioned" action:
type: integer type: string
example: "[0,1,2,3]" description: |
The action to be performed, options include:
- `start`
Starts (or restarts) the recurring invoice. **note** if the recurring invoice has been stopped for a long time, it will attempt to catch back up firing a new Invoice every hour per interval that has been missed.
If you do not wish to have the recurring invoice catch up, you should set the next_send_date to the correct date you wish the recurring invoice to commence from.
- `stop`
Stops the recurring invoice.
- `send_now`
Force sends the recurring invoice - this option is only available when the recurring invoice is in a draft state.
- `restore`
Restores the recurring invoice from an archived or deleted state.
- `archive`
Archives the recurring invoice. The recurring invoice will not fire in this state.
- `delete`
Deletes a recurring invoice.
required: true
ids:
required: true
type: array
items:
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
type: string
example:
action: start
ids: "['D2J234DFA','D2J234DFA','D2J234DFA']"
responses: responses:
200: 200:
description: "The RecurringInvoice response" description: "The RecurringInvoice response"
@ -12396,7 +12423,7 @@ paths:
get: get:
deprecated: true deprecated: true
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Custom recurring invoice action" summary: "Custom recurring invoice action"
description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email"
operationId: actionRecurringInvoice operationId: actionRecurringInvoice
@ -12445,7 +12472,7 @@ paths:
"/api/v1/recurring_invoice/{invitation_key}/download": "/api/v1/recurring_invoice/{invitation_key}/download":
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Download recurring invoice PDF" summary: "Download recurring invoice PDF"
description: "Downloads a specific invoice" description: "Downloads a specific invoice"
operationId: downloadRecurringInvoice operationId: downloadRecurringInvoice
@ -12482,7 +12509,7 @@ paths:
"/api/v1/recurring_invoices/{id}/upload": "/api/v1/recurring_invoices/{id}/upload":
put: put:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Add recurring invoice document" summary: "Add recurring invoice document"
description: "Handles the uploading of a document to a recurring_invoice" description: "Handles the uploading of a document to a recurring_invoice"
operationId: uploadRecurringInvoice operationId: uploadRecurringInvoice
@ -17296,7 +17323,7 @@ tags:
- name: invoices - name: invoices
description: | description: |
Endpoint definitions for interacting with invoices. Endpoint definitions for interacting with invoices.
- name: recurring_invoices - name: Recurring Invoices
description: | description: |
Endpoint definitions for interacting with recurring_invoices. Endpoint definitions for interacting with recurring_invoices.
- name: payments - name: payments

View File

@ -14,7 +14,7 @@ tags:
- name: invoices - name: invoices
description: | description: |
Endpoint definitions for interacting with invoices. Endpoint definitions for interacting with invoices.
- name: recurring_invoices - name: Recurring Invoices
description: | description: |
Endpoint definitions for interacting with recurring_invoices. Endpoint definitions for interacting with recurring_invoices.
- name: payments - name: payments

View File

@ -1,7 +1,7 @@
/api/v1/recurring_invoices: /api/v1/recurring_invoices:
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "List recurring invoices" summary: "List recurring invoices"
description: | description: |
Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
@ -72,7 +72,7 @@
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
post: post:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Create recurring invoice" summary: "Create recurring invoice"
description: "Adds a Recurring Invoice to the system" description: "Adds a Recurring Invoice to the system"
operationId: storeRecurringInvoice operationId: storeRecurringInvoice
@ -106,7 +106,7 @@
"/api/v1/recurring_invoices/{id}": "/api/v1/recurring_invoices/{id}":
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Show recurring invoice" summary: "Show recurring invoice"
description: "Displays an RecurringInvoice by id" description: "Displays an RecurringInvoice by id"
operationId: showRecurringInvoice operationId: showRecurringInvoice
@ -146,7 +146,7 @@
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
put: put:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Update recurring invoice" summary: "Update recurring invoice"
description: "Handles the updating of an RecurringInvoice by id" description: "Handles the updating of an RecurringInvoice by id"
operationId: updateRecurringInvoice operationId: updateRecurringInvoice
@ -186,7 +186,7 @@
$ref: "#/components/responses/default" $ref: "#/components/responses/default"
delete: delete:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Delete recurring invoice" summary: "Delete recurring invoice"
description: "Handles the deletion of an RecurringInvoice by id" description: "Handles the deletion of an RecurringInvoice by id"
operationId: deleteRecurringInvoice operationId: deleteRecurringInvoice
@ -223,7 +223,7 @@
"/api/v1/recurring_invoices/{id}/edit": "/api/v1/recurring_invoices/{id}/edit":
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Edit recurring invoice" summary: "Edit recurring invoice"
description: "Displays an RecurringInvoice by id" description: "Displays an RecurringInvoice by id"
operationId: editRecurringInvoice operationId: editRecurringInvoice
@ -265,7 +265,7 @@
/api/v1/recurring_invoices/create: /api/v1/recurring_invoices/create:
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Blank recurring invoice" summary: "Blank recurring invoice"
description: "Returns a blank object with default values" description: "Returns a blank object with default values"
operationId: getRecurringInvoicesCreate operationId: getRecurringInvoicesCreate
@ -298,25 +298,52 @@
/api/v1/recurring_invoices/bulk: /api/v1/recurring_invoices/bulk:
post: post:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Bulk recurring invoice actions" summary: "Bulk recurring invoice actions"
description: "" description: |
There are multiple actions that are available including:
operationId: bulkRecurringInvoices operationId: bulkRecurringInvoices
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 details"
required: true required: true
content: content:
application/json: application/json:
schema: schema:
type: array type: object
items: properties:
description: "Array of hashed IDs to be bulk 'actioned" action:
type: integer type: string
example: "[0,1,2,3]" description: |
The action to be performed, options include:
- `start`
Starts (or restarts) the recurring invoice. **note** if the recurring invoice has been stopped for a long time, it will attempt to catch back up firing a new Invoice every hour per interval that has been missed.
If you do not wish to have the recurring invoice catch up, you should set the next_send_date to the correct date you wish the recurring invoice to commence from.
- `stop`
Stops the recurring invoice.
- `send_now`
Force sends the recurring invoice - this option is only available when the recurring invoice is in a draft state.
- `restore`
Restores the recurring invoice from an archived or deleted state.
- `archive`
Archives the recurring invoice. The recurring invoice will not fire in this state.
- `delete`
Deletes a recurring invoice.
required: true
ids:
required: true
type: array
items:
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
type: string
example:
action: start
ids: "['D2J234DFA','D2J234DFA','D2J234DFA']"
responses: responses:
200: 200:
description: "The RecurringInvoice response" description: "The RecurringInvoice response"
@ -343,7 +370,7 @@
get: get:
deprecated: true deprecated: true
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Custom recurring invoice action" summary: "Custom recurring invoice action"
description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email"
operationId: actionRecurringInvoice operationId: actionRecurringInvoice
@ -392,7 +419,7 @@
"/api/v1/recurring_invoice/{invitation_key}/download": "/api/v1/recurring_invoice/{invitation_key}/download":
get: get:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Download recurring invoice PDF" summary: "Download recurring invoice PDF"
description: "Downloads a specific invoice" description: "Downloads a specific invoice"
operationId: downloadRecurringInvoice operationId: downloadRecurringInvoice
@ -429,7 +456,7 @@
"/api/v1/recurring_invoices/{id}/upload": "/api/v1/recurring_invoices/{id}/upload":
put: put:
tags: tags:
- recurring_invoices - Recurring Invoices
summary: "Add recurring invoice document" summary: "Add recurring invoice document"
description: "Handles the uploading of a document to a recurring_invoice" description: "Handles the uploading of a document to a recurring_invoice"
operationId: uploadRecurringInvoice operationId: uploadRecurringInvoice