diff --git a/api-docs.yaml b/api-docs.yaml index e43d419..39af160 100644 --- a/api-docs.yaml +++ b/api-docs.yaml @@ -1133,7 +1133,29 @@ paths: tags: - bank_transactions summary: "Performs match actions on an array of bank_transactions" - description: "" + description: | + Matching invoices or a payment to a bank transactions. + + The API expects the id of the transaction along with either a comma separated list of invoice ids OR the payment id to associate the transaction to. + + Example for matching a transaction to two invoices: + + {"transactions":[{"id":"olejRl5ejN","invoice_ids":"JxboYBLegw,JxboYBLeXX"}]} + + Example for matching a transaction and a paymente: + + {"transactions":[{"id":"olejRl5ejN","payment_id":"JxboYBLeXf"}]} + + Matching expenses. + + You can match an existing expense within Invoice Ninja - or - create a new expense using the following: + + {"transactions":[{"id":"open5pld7A","vendor_id":"gl9avJnaG1","ninja_category_id":""}]} + + To match to an existing expense: + + {"transactions":[{"id":"Jxbo2qKagw","expense_id":"7N1aMM1aWm"}]} + operationId: matchBankTransactions parameters: - $ref: "#/components/parameters/X-API-TOKEN" @@ -8608,21 +8630,20 @@ paths: default: $ref: "#/components/responses/default" - /api/v1/vendors: + /api/v1/credits: 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 + - credits + summary: "List credits" + description: "Lists credits, 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 credits, these are handled by the CreditFilters class which defines the methods available" + operationId: getCredits 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" + description: "A list of credits" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8638,7 +8659,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Vendor' + $ref: '#/components/schemas/Credit' meta: type: object $ref: '#/components/schemas/Meta' @@ -8656,17 +8677,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - vendors - summary: "Create vendor" - description: "Adds a vendor to a company" - operationId: storeVendor + - credits + summary: "Create credit" + description: "Adds an credit to the system" + operationId: storeCredit 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" + description: "Returns the saved credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8677,11 +8698,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Vendor" + $ref: "#/components/schemas/Credit" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -8690,20 +8712,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/vendors/{id}": + + "/api/v1/credits/{id}": get: tags: - - vendors - summary: "Show vendor" - description: "Displays a vendor by id" - operationId: showVendor + - credits + summary: "Show credit" + description: "Displays an credit by id" + operationId: showCredit 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" + description: "The Credit Hashed ID" required: true schema: type: string @@ -8711,7 +8734,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the vendor object" + description: "Returns the credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8722,11 +8745,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Vendor" + $ref: "#/components/schemas/Credit" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -8737,17 +8761,17 @@ paths: $ref: "#/components/responses/default" put: tags: - - vendors - summary: "Update vendor" - description: "Handles the updating of a vendor by id" - operationId: updateVendor + - Credits + summary: "Update credit" + description: "Handles the updating of an Credit by id" + operationId: updateCredit 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" + description: "The Credit Hashed ID" required: true schema: type: string @@ -8755,7 +8779,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the vendor object" + description: "Returns the Credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8766,11 +8790,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Vendor" + $ref: "#/components/schemas/Credit" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -8781,17 +8806,17 @@ paths: $ref: "#/components/responses/default" delete: tags: - - vendors - summary: "Delete vendor" - description: "Handles the deletion of a vendor by id" - operationId: deleteVendor + - credits + summary: "Delete credit" + description: "Handles the deletion of an credit by id" + operationId: deleteCredit 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" + description: "The Credit Hashed ID" required: true schema: type: string @@ -8811,6 +8836,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -8819,20 +8845,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/vendors/{id}/edit": + "/api/v1/credits/{id}/edit": get: tags: - - vendors - summary: "Edit vendor" - description: "Displays a vendor by id" - operationId: editVendor + - credits + summary: "Edit credit" + description: "Displays an credit by id" + operationId: editCredit 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" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -8840,7 +8866,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the vendor object" + description: "Returns the credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8851,11 +8877,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Vendor" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -8864,20 +8891,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/vendors/create: + /api/v1/credits/create: get: tags: - - vendors - summary: "Blank vendor" - description: "Returns a blank vendor with default values" - operationId: getVendorsCreate + - credits + summary: "Blank credit" + description: "Returns a blank object with default values" + operationId: getCreditsCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank vendor object" + description: "A blank credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8888,11 +8915,12 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Vendor" + $ref: "#/components/schemas/Credit" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -8901,13 +8929,13 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/vendors/bulk: + /api/v1/credits/bulk: post: tags: - - vendors - summary: "Bulk vendor actions" + - credits + summary: "Bulk credit actions" description: "" - operationId: bulkVendors + operationId: bulkCredits parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" @@ -8921,11 +8949,11 @@ paths: type: array items: description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" + type: string + example: '[D2J234DFA,D2J234DFA,D2J234DFA]' responses: 200: - description: "The Vendor User response" + description: "The Bulk Action response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8933,14 +8961,11 @@ paths: $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: $ref: '#/components/responses/422' 429: @@ -8949,20 +8974,62 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/vendors/{id}/upload": + "/api/v1/credit/{invitation_key}/download": + get: + tags: + - quotes + summary: "Download quote PDF" + description: "Downloads a specific quote" + operationId: downloadCredit + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Credit Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the credit pdf" + 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: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/credits/{id}/upload": post: tags: - - vendors - summary: "Uploads a vendor document" - description: "Handles the uploading of a document to a vendor" - operationId: uploadVendor + - credits + summary: "Upload a credit document" + description: "Handles the uploading of a document to a credit" + operationId: uploadCredits 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" + description: "The Credit Hashed ID" required: true schema: type: string @@ -8987,7 +9054,7 @@ paths: format: binary responses: 200: - description: "Returns the Vendor object" + description: "Returns the Credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -8998,7 +9065,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Vendor" + $ref: "#/components/schemas/Credit" 401: $ref: "#/components/responses/401" 403: @@ -9011,55 +9078,29 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/invoices: + /api/v1/recurring_invoices: get: tags: - - invoices - summary: "List invoices" + - Recurring Invoices + summary: "List recurring invoices" description: | Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. - - operationId: getInvoices + + operationId: getRecurringInvoices parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/status" - $ref: "#/components/parameters/client_id" - $ref: "#/components/parameters/created_at" - $ref: "#/components/parameters/updated_at" - $ref: "#/components/parameters/is_deleted" - $ref: "#/components/parameters/filter_deleted_clients" - $ref: "#/components/parameters/vendor_id" - - name: client_status - in: query - description: | - A comma separated list of invoice status strings. Valid options include: - - all - - paid - - unpaid - - overdue - required: false - schema: - type: string - example: ?client_status=paid,unpaid - - name: number - in: query - description: | - Search invoices by invoice number - required: false - schema: - type: string - example: ?number=INV-001 - name: filter in: query description: | Searches across a range of columns including: - - number - - po_number - - date - - amount - - balance - custom_value1 - custom_value2 - custom_value3 @@ -9068,30 +9109,18 @@ paths: schema: type: string example: ?filter=bob - - name: without_deleted_clients - in: query - description: | - Returns the invoice list without the invoices of deleted clients. - required: false - schema: - type: string - example: ?without_deleted_clients= - - name: overdue - in: query - description: | - Returns the list of invoices that are overdue - required: false - schema: - type: string - example: ?over_due= - - name: payable + - name: client_status in: query description: | - Returns the invoice list that are payable for a defined client. Please note, you must pass the client_id as the value for this query parameter + A comma separated list of invoice status strings. Valid options include: + - all + - active + - paused + - completed required: false schema: type: string - example: ?payable={client_id} + example: ?client_status=active,paused - name: sort in: query description: Returns the list sorted by column in ascending or descending order. @@ -9099,17 +9128,9 @@ paths: schema: type: string example: id|desc number|desc balance|asc - - name: private_notes - in: query - description: | - Searches on the private_notes field of the invoices - required: false - schema: - type: string - example: ?private_notes=super secret responses: 200: - description: "A list of invoices" + description: "A list of recurring_invoices" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9125,7 +9146,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Invoice' + $ref: '#/components/schemas/RecurringInvoice' meta: type: object $ref: '#/components/schemas/Meta' @@ -9143,38 +9164,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - invoices - summary: "Create invoice" - description: | - Adds a invoice to a company - - Triggered actions are available when updating or creating an invoice. - These are query parameters that can be chained in order to perform additional actions on the entity, these include: - - ``` - ?send_email=true [Saves and sends the invoice] - ?mark_sent=true [Saves and marks the invoice as sent] - ?paid=true [Saves and marks the invoice as paid] - ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] - ?cancel=true [Saves and marks the invoice as cancelled] - ?save_default_footer=true [Saves the current footer as the default footer] - ?save_default_terms=true [Saves the current terms as the default terms] - ``` - - operationId: storeInvoice + - Recurring Invoices + summary: "Create recurring invoice" + description: "Adds a Recurring Invoice to the system" + operationId: storeRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/InvoiceRequest" responses: 200: - description: "Returns the saved invoice entity" + description: "Returns the saved RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9185,7 +9185,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9198,21 +9198,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - "/api/v1/invoices/{id}": + + "/api/v1/recurring_invoices/{id}": get: tags: - - invoices - summary: "Show invoice" - description: "Displays an invoice by id" - operationId: showInvoice + - Recurring Invoices + summary: "Show recurring invoice" + description: "Displays an RecurringInvoice by id" + operationId: showRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hashed ID" + description: "The RecurringInvoice Hashed ID" required: true schema: type: string @@ -9220,7 +9220,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the invoice object" + description: "Returns the RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9231,7 +9231,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9244,35 +9244,19 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - put: tags: - - invoices - summary: "Update invoice" - description: | - Handles the updating of an invoice by id. - - Triggered actions are available when updating or creating an invoice. - These are query parameters that can be chained in order to perform additional actions on the entity, these include: - - ``` - ?send_email=true [Saves and sends the invoice] - ?mark_sent=true [Saves and marks the invoice as sent] - ?paid=true [Saves and marks the invoice as paid] - ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] - ?cancel=true [Saves and marks the invoice as cancelled] - ?save_default_footer=true [Saves the current footer as the default footer] - ?save_default_terms=true [Saves the current terms as the default terms] - ``` - - operationId: updateInvoice + - Recurring Invoices + summary: "Update recurring invoice" + description: "Handles the updating of an RecurringInvoice by id" + operationId: updateRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hashed ID" + description: "The RecurringInvoice Hashed ID" required: true schema: type: string @@ -9280,7 +9264,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the invoice object" + description: "Returns the RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9291,7 +9275,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9303,20 +9287,20 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" + $ref: "#/components/responses/default" delete: tags: - - invoices - summary: "Delete invoice" - description: "Handles the deletion of an invoice by id" - operationId: deleteInvoice + - Recurring Invoices + summary: "Delete recurring invoice" + description: "Handles the deletion of an RecurringInvoice by id" + operationId: deleteRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hashed ID" + description: "The RecurringInvoice Hashed ID" required: true schema: type: string @@ -9344,20 +9328,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/edit": + "/api/v1/recurring_invoices/{id}/edit": get: tags: - - invoices - summary: "Edit invoice" - description: "Displays an invoice by id for editting" - operationId: editInvoice + - Recurring Invoices + summary: "Edit recurring invoice" + description: "Displays an RecurringInvoice by id" + operationId: editRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hashed ID" + description: "The RecurringInvoice Hashed ID" required: true schema: type: string @@ -9365,7 +9349,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the invoice object" + description: "Returns the RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9376,7 +9360,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9389,21 +9373,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - /api/v1/invoices/create: + + /api/v1/recurring_invoices/create: get: tags: - - invoices - summary: "Blank invoice" + - Recurring Invoices + summary: "Blank recurring invoice" description: "Returns a blank object with default values" - operationId: getInvoicesCreate + operationId: getRecurringInvoicesCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank invoice object" + description: "A blank RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9414,7 +9398,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9427,16 +9411,15 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - /api/v1/invoices/bulk: + /api/v1/recurring_invoices/bulk: post: tags: - - invoices - summary: "Bulk invoice actions" + - Recurring Invoices + summary: "Bulk recurring invoice actions" description: | - There are multiple actions that are available including: + There are multiple actions that are available including: - operationId: bulkInvoices + operationId: bulkRecurringInvoices parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" @@ -9453,46 +9436,30 @@ paths: type: string description: | The action to be performed, options include: - - `bulk_download` - Bulk download an array of invoice PDFs (These are sent to the admin via email.) - - `download` - Download a single PDF. (Returns a single PDF object) - - `bulk_print` - Merges an array of Invoice PDFs for easy one click printing. - - `auto_bill` - Attempts to automatically bill the invoices with the payment method on file. - - `clone_to_invoice` - Returns a clone of the invoice. - - `clone_to_quote` - Returns a quote cloned using the properties of the given invoice. - - `mark_paid` - Marks an array of invoices as paid. - - `mark_sent` - Marks an array of invoices as sent. + - `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 an array of invoices - - `delete` - Deletes an array of invoices + Restores the recurring invoice from an archived or deleted state. - `archive` - Archives an array of invoices - - `cancel` - Cancels an array of invoices - - `email` - Emails an array of invoices - - `send_email` - Emails an array of invoices. Requires additional properties to be sent. `email_type` + Archives the recurring invoice. The recurring invoice will not fire in this state. + - `delete` + Deletes a recurring invoice. ids: type: array items: description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" type: string example: - action: bulk_download + action: start ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" - responses: 200: - description: "The Bulk Action response" + description: "The RecurringInvoice response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9500,6 +9467,10 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9512,33 +9483,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - "/api/v1/invoices/{id}/{action}": + "/api/v1/recurring_invoices/{id}/{action}": get: deprecated: true tags: - - invoices - summary: "Custom invoice action" - description: | - Performs a custom action on an invoice. - The current range of actions are as follows - - clone_to_invoice - - clone_to_quote - - history - - delivery_note - - mark_paid - - download - - archive - - delete - - email - operationId: actionInvoice + - Recurring Invoices + 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" + operationId: actionRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hashed ID" + description: "The RecurringInvoice Hashed ID" required: true schema: type: string @@ -9554,7 +9513,7 @@ paths: example: clone_to_quote responses: 200: - description: "Returns the invoice object" + description: "Returns the RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9565,7 +9524,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9578,20 +9537,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/invoice/{invitation_key}/download": + "/api/v1/recurring_invoice/{invitation_key}/download": get: tags: - - invoices - summary: "Download invoice PDF" + - Recurring Invoices + summary: "Download recurring invoice PDF" description: "Downloads a specific invoice" - operationId: downloadInvoice + operationId: downloadRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: invitation_key in: path - description: "The Invoice Invitation Key" + description: "The Recurring Invoice Invitation Key" required: true schema: type: string @@ -9599,7 +9558,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the invoice pdf" + description: "Returns the recurring invoice pdf" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9619,61 +9578,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/delivery_note": - get: + "/api/v1/recurring_invoices/{id}/upload": + post: tags: - - invoices - summary: "Download delivery note" - description: "Downloads a specific invoice delivery notes" - operationId: deliveryNote + - Recurring Invoices + summary: "Add recurring invoice document" + description: "Handles the uploading of a document to a recurring_invoice" + operationId: uploadRecurringInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hahsed Id" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the invoice delivery note pdf" - 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: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/invoices/{id}/upload": - post: - tags: - - invoices - summary: "Add invoice document" - description: "Handles the uploading of a document to a invoice" - operationId: uploadInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Invoice Hashed ID" + description: "The RecurringInvoice Hashed ID" required: true schema: type: string @@ -9698,7 +9616,7 @@ paths: format: binary responses: 200: - description: "Returns the Invoice object" + description: "Returns the RecurringInvoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9709,7 +9627,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -9722,20 +9640,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/credits: + /api/v1/tasks: get: tags: - - credits - summary: "List credits" - description: "Lists credits, 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 credits, these are handled by the CreditFilters class which defines the methods available" - operationId: getCredits + - tasks + summary: "List tasks" + description: "Lists tasks, 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 tasks, these are handled by the TaskFilters class which defines the methods available" + operationId: getTasks 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 credits" + description: "A list of tasks" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9751,7 +9670,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Credit' + $ref: '#/components/schemas/Task' meta: type: object $ref: '#/components/schemas/Meta' @@ -9769,17 +9688,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - credits - summary: "Create credit" - description: "Adds an credit to the system" - operationId: storeCredit + - tasks + summary: "Create task" + description: "Adds an task to a company" + operationId: storeTask parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "Returns the saved credit object" + description: "Returns the saved task object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9790,12 +9709,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -9804,21 +9722,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - "/api/v1/credits/{id}": + "/api/v1/tasks/{id}": get: tags: - - credits - summary: "Show credit" - description: "Displays an credit by id" - operationId: showCredit + - tasks + summary: "Show task" + description: "Displays a task by id" + operationId: showTask parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Credit Hashed ID" + description: "The Task Hashed ID" required: true schema: type: string @@ -9826,7 +9743,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the credit object" + description: "Returns the task object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9837,12 +9754,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -9853,17 +9769,17 @@ paths: $ref: "#/components/responses/default" put: tags: - - Credits - summary: "Update credit" - description: "Handles the updating of an Credit by id" - operationId: updateCredit + - tasks + summary: "Update task" + description: "Handles the updating of a task by id" + operationId: updateTask parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Credit Hashed ID" + description: "The task Hashed ID" required: true schema: type: string @@ -9871,7 +9787,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Credit object" + description: "Returns the task object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9882,12 +9798,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -9898,17 +9813,17 @@ paths: $ref: "#/components/responses/default" delete: tags: - - credits - summary: "Delete credit" - description: "Handles the deletion of an credit by id" - operationId: deleteCredit + - tasks + summary: "Delete task" + description: "Handles the deletion of a task by id" + operationId: deleteTask parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Credit Hashed ID" + description: "The Task Hashed ID" required: true schema: type: string @@ -9928,7 +9843,6 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -9937,20 +9851,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/credits/{id}/edit": + "/api/v1/tasks/{id}/edit": get: tags: - - credits - summary: "Edit credit" - description: "Displays an credit by id" - operationId: editCredit + - tasks + summary: "Edit task" + description: "Displays a task by id" + operationId: editTask parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Invoice Hashed ID" + description: "The Task Hashed ID" required: true schema: type: string @@ -9958,7 +9872,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the credit object" + description: "Returns the client object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -9969,12 +9883,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Invoice" + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -9983,20 +9896,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/credits/create: + /api/v1/tasks/create: get: tags: - - credits - summary: "Blank credit" - description: "Returns a blank object with default values" - operationId: getCreditsCreate + - tasks + summary: "Blank task" + description: "Returns a blank task with default values" + operationId: getTasksCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank credit object" + description: "A blank task object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10007,12 +9920,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -10021,13 +9933,13 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/credits/bulk: + /api/v1/tasks/bulk: post: tags: - - credits - summary: "Bulk credit actions" + - tasks + summary: "Bulk task actions" description: "" - operationId: bulkCredits + operationId: bulkTasks parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" @@ -10041,11 +9953,11 @@ paths: type: array items: description: "Array of hashed IDs to be bulk 'actioned" - type: string - example: '[D2J234DFA,D2J234DFA,D2J234DFA]' + type: integer + example: "[0,1,2,3]" responses: 200: - description: "The Bulk Action response" + description: "The Task User response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10053,11 +9965,14 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -10066,28 +9981,45 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/credit/{invitation_key}/download": - get: + "/api/v1/tasks/{id}/upload": + post: tags: - - quotes - summary: "Download quote PDF" - description: "Downloads a specific quote" - operationId: downloadCredit + - tasks + summary: "Uploads a task document" + description: "Handles the uploading of a document to a task" + operationId: uploadTask parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - - name: invitation_key + - name: id in: path - description: "The Credit Invitation Key" + description: "The Task Hashed ID" required: true schema: type: string format: string example: D2J234DFA + 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 responses: 200: - description: "Returns the credit pdf" + description: "Returns the Task object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10095,11 +10027,14 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -10108,45 +10043,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/credits/{id}/upload": + /api/v1/tasks/sort: post: tags: - - credits - summary: "Upload a credit document" - description: "Handles the uploading of a document to a credit" - operationId: uploadCredits + - tasks + summary: "Sort tasks on KanBan" + description: "Sorts tasks after drag and drop on the KanBan." + operationId: sortTasks parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Credit Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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 responses: 200: - description: "Returns the Credit object" + description: "Returns an Ok, 200 HTTP status" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10154,10 +10064,6 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Credit" 401: $ref: "#/components/responses/401" 403: @@ -10170,34 +10076,13 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/products: + /api/v1/quotes: get: tags: - - products - summary: "List products" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X GET 'https://invoicing.co/api/v1/products?filter=search&per_page=20&page=1&include=documents' \ - -H "X-API-TOKEN:company-token-test" \ - -H "X-Requested-With: XMLHttpRequest"; - - lang: go - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $products = $ninja->products->all([ - 'filter' => 'search', - 'per_page' => 20, - 'page' => 1, - 'include' => 'documents' - ]); - description: | - Lists products within your company. - - You can search and filter the result set using query parameters. These can be chained together allowing fine grained lists to be generated. - - operationId: getProducts + - quotes + summary: "List quotes" + description: "Lists quotes, 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 quotes, these are handled by the QuoteFilters class which defines the methods available" + operationId: getQuotes parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" @@ -10211,28 +10096,49 @@ paths: - $ref: "#/components/parameters/vendor_id" - name: filter in: query - description: Filter by product name + description: | + Searches across a range of columns including: + - number + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 required: false schema: type: string - example: bob - - name: product_key + example: ?filter=bob + - name: client_status in: query - description: Filter by product key + description: | + A comma separated list of quote status strings. Valid options include: + - all + - draft + - sent + - approved + - expired + - upcoming required: false schema: type: string - example: bob + example: ?client_status=paid,unpaid + - name: number + in: query + description: | + Search quote by quote number + required: false + schema: + type: string + example: ?number=Q-001 - name: sort in: query description: Returns the list sorted by column in ascending or descending order. required: false schema: type: string - example: id|desc product_key|desc + example: id|desc number|desc balance|asc responses: 200: - description: "A list of products" + description: "A list of quotes" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10248,14 +10154,14 @@ paths: data: type: array items: - $ref: '#/components/schemas/Product' + $ref: '#/components/schemas/Quote' meta: type: object $ref: '#/components/schemas/Meta' 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10263,46 +10169,20 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' + $ref: "#/components/responses/default" post: tags: - - products - summary: "Create Product" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X POST 'https://invoicing.co/api/v1/products' \ - -H "X-API-TOKEN:company-token-test" \ - -H "Content-Type:application/json" \ - -d '{"product_key":"sku_1","notes":"product description","cost":1,"price":10}' \ - -H "X-Requested-With: XMLHttpRequest"; - - lang: go - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $products = $ninja->products->create([ - 'product_key' => "sku_1", - 'notes' => "product description", - 'cost' => 1, - 'price' => 10 - ]); - description: "Adds a product to a company" - operationId: storeProduct + - quotes + summary: "Create quote" + description: "Adds an Quote to the system" + operationId: storeQuote parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - requestBody: - description: Product object that needs to be added to the company - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProductRequest' responses: 200: - description: "Returns the saved product object" + description: "Returns the saved Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10313,11 +10193,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10325,33 +10205,21 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' - "/api/v1/products/{id}": + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}": get: tags: - - products - summary: "Show product" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X GET 'https://invoicing.co/api/v1/products/{id}' \ - -H "X-API-TOKEN:company-token-test" \ - -H "X-Requested-With: XMLHttpRequest"; - - lang: php - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $product = $ninja->products->get("{id}"); - description: "Displays a product by id" - operationId: showProduct + - quotes + summary: "Show quote" + description: "Displays an Quote by id" + operationId: showQuote parameters: - $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 Quote Hashed ID" required: true schema: type: string @@ -10359,7 +10227,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the product object" + description: "Returns the Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10370,11 +10238,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10382,56 +10250,28 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' + $ref: "#/components/responses/default" put: tags: - - products - summary: "Update product" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X PUT 'https://invoicing.co/api/v1/products/{id}' \ - -H "X-API-TOKEN:company-token-test" \ - -H "Content-Type: application/json" \ - -d '{ - "product_key": "Updated Product", - "price": 150.0, - "notes": "An updated description of the product" - }' - - lang: go - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $product = $ninja->products->update("id", [ - "name" => "Updated Product", - "price" => 150.0, - "description" => "An updated description of the product" - ]); - description: "Handles the updating of a product by id" - operationId: updateProduct + - quotes + summary: "Update quote" + description: "Handles the updating of an Quote by id" + operationId: updateQuote parameters: - $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 Quote Hashed ID" required: true schema: type: string format: string example: D2J234DFA - requestBody: - description: Product object that needs to be added to the company - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProductRequest' responses: 200: - description: "Returns the Product object" + description: "Returns the Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10442,11 +10282,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10454,32 +10294,20 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' + $ref: "#/components/responses/default" delete: tags: - - products - summary: "Delete product" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X DELETE 'https://invoicing.co/api/v1/products/{id}' \ - -H "X-API-TOKEN:company-token-test" \ - -H "X-Requested-With: XMLHttpRequest"; - - lang: go - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $ninja->products->bulk("delete", "id"); - description: "Handles the deletion of a product by id" - operationId: deleteProduct + - quotes + summary: "Delete quote" + description: "Handles the deletion of an Quote by id" + operationId: deleteQuote parameters: - $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 Quote Hashed ID" required: true schema: type: string @@ -10496,9 +10324,9 @@ paths: X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10506,33 +10334,21 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' - "/api/v1/products/{id}/edit": + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}/edit": get: tags: - - products - summary: "Edit product" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X GET 'https://invoicing.co/api/v1/products/{id}/edit' \ - -H "X-API-TOKEN:company-token-test" \ - -H "X-Requested-With: XMLHttpRequest"; - - lang: php - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $product = $ninja->products->get("{id}"); - description: "Displays an Product by id" - operationId: editProduct + - quotes + summary: "Edit quote" + description: "Displays an Quote by id" + operationId: editQuote parameters: - $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 Quote Hashed ID" required: true schema: type: string @@ -10540,7 +10356,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Product object" + description: "Returns the Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10551,11 +10367,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10563,21 +10379,21 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' - "/api/v1/products/create": + $ref: "#/components/responses/default" + /api/v1/quotes/create: get: tags: - - products - summary: "Blank product" - description: "Returns a blank product object with default values" - operationId: getProductsCreate + - quotes + summary: "Blank quote" + description: "Returns a blank object with default values" + operationId: getQuotesCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank Product object" + description: "A blank Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10588,11 +10404,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10600,43 +10416,32 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' - - /api/v1/products/bulk: + $ref: "#/components/responses/default" + /api/v1/quotes/bulk: post: tags: - - products - summary: "Bulk product actions" - x-code-samples: - - lang: curl - label: Curl - source: | - curl -X GET 'https://invoicing.co/api/v1/products/bulk' \ - -H "Content-Type:application/json" \ - -d '{"action":"archive","ids":["id","id2"]}' \ - -H "X-API-TOKEN:company-token-test" \ - -H "X-Requested-With: XMLHttpRequest"; - - lang: php - label: PHP - source: | - $ninja = new InvoiceNinja("your_token"); - $product = $ninja->products->bulk("action", ["id","id2"]); - description: "Archive / Restore / Delete / Set tax id in bulk" - operationId: bulkProducts + - quotes + summary: "Bulk quote actions" + description: "" + operationId: bulkQuotes parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/index" requestBody: - description: 'Bulk action array' + description: "Hashed ids" required: true content: application/json: schema: - $ref: '#/components/schemas/ProductBulkAction' + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" responses: 200: - description: "The Product response" + description: "The Quote response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10647,11 +10452,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10659,28 +10464,123 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' - - "/api/v1/products/{id}/upload": + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}/{action}": + get: + deprecated: true + tags: + - quotes + summary: "Performs a custom action on an Quote" + description: "Performs a custom action on an Quote.\n\n The current range of actions are as follows\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - convert\n - convert_to_invoice\n - email" + operationId: actionQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote + responses: + 200: + description: "Returns the Quote 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/Quote" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/quote/{invitation_key}/download": + get: + tags: + - quotes + summary: "Download quote PDF" + description: "Downloads a specific quote" + operationId: downloadQuote + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Quote Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the quote pdf" + 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: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/quotes/{id}/upload": post: tags: - - products - summary: "Add product document" - description: "Handles the uploading of a document to a product" - operationId: uploadProduct + - quotes + summary: "Upload a quote document" + description: "Handles the uploading of a document to a quote" + operationId: uploadQuote parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/client_include" + - $ref: "#/components/parameters/include" - name: id in: path - description: "The Product Hashed ID" + description: "The Quote Hashed ID" required: true schema: type: string format: string example: D2J234DFA requestBody: + description: "File Upload Body" required: true content: multipart/form-data: @@ -10689,14 +10589,16 @@ paths: properties: _method: type: string - example: POST + example: PUT documents: type: array items: + description: "Array of binary documents for upload" + type: string format: binary responses: 200: - description: "Returns the Product object" + description: "Returns the Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10707,11 +10609,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Product" + $ref: "#/components/schemas/Quote" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -10719,15 +10621,16 @@ paths: 5XX: description: 'Server error' default: - $ref: '#/components/responses/default' - - /api/v1/quotes: + $ref: "#/components/responses/default" + /api/v1/invoices: get: tags: - - quotes - summary: "List quotes" - description: "Lists quotes, 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 quotes, these are handled by the QuoteFilters class which defines the methods available" - operationId: getQuotes + - invoices + summary: "List invoices" + description: | + Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. + + operationId: getInvoices parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" @@ -10739,11 +10642,35 @@ paths: - $ref: "#/components/parameters/is_deleted" - $ref: "#/components/parameters/filter_deleted_clients" - $ref: "#/components/parameters/vendor_id" + - name: client_status + in: query + description: | + A comma separated list of invoice status strings. Valid options include: + - all + - paid + - unpaid + - overdue + required: false + schema: + type: string + example: ?client_status=paid,unpaid + - name: number + in: query + description: | + Search invoices by invoice number + required: false + schema: + type: string + example: ?number=INV-001 - name: filter in: query description: | Searches across a range of columns including: - number + - po_number + - date + - amount + - balance - custom_value1 - custom_value2 - custom_value3 @@ -10752,28 +10679,30 @@ paths: schema: type: string example: ?filter=bob - - name: client_status + - name: without_deleted_clients in: query description: | - A comma separated list of quote status strings. Valid options include: - - all - - draft - - sent - - approved - - expired - - upcoming + Returns the invoice list without the invoices of deleted clients. required: false schema: type: string - example: ?client_status=paid,unpaid - - name: number + example: ?without_deleted_clients= + - name: overdue in: query description: | - Search quote by quote number + Returns the list of invoices that are overdue required: false schema: type: string - example: ?number=Q-001 + example: ?over_due= + - name: payable + in: query + description: | + Returns the invoice list that are payable for a defined client. Please note, you must pass the client_id as the value for this query parameter + required: false + schema: + type: string + example: ?payable={client_id} - name: sort in: query description: Returns the list sorted by column in ascending or descending order. @@ -10781,9 +10710,17 @@ paths: schema: type: string example: id|desc number|desc balance|asc + - name: private_notes + in: query + description: | + Searches on the private_notes field of the invoices + required: false + schema: + type: string + example: ?private_notes=super secret responses: 200: - description: "A list of quotes" + description: "A list of invoices" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10799,7 +10736,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Quote' + $ref: '#/components/schemas/Invoice' meta: type: object $ref: '#/components/schemas/Meta' @@ -10817,17 +10754,38 @@ paths: $ref: "#/components/responses/default" post: tags: - - quotes - summary: "Create quote" - description: "Adds an Quote to the system" - operationId: storeQuote + - invoices + summary: "Create invoice" + description: | + Adds a invoice to a company + + Triggered actions are available when updating or creating an invoice. + These are query parameters that can be chained in order to perform additional actions on the entity, these include: + + ``` + ?send_email=true [Saves and sends the invoice] + ?mark_sent=true [Saves and marks the invoice as sent] + ?paid=true [Saves and marks the invoice as paid] + ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] + ?cancel=true [Saves and marks the invoice as cancelled] + ?save_default_footer=true [Saves the current footer as the default footer] + ?save_default_terms=true [Saves the current terms as the default terms] + ``` + + operationId: storeInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/InvoiceRequest" responses: 200: - description: "Returns the saved Quote object" + description: "Returns the saved invoice entity" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10838,7 +10796,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -10851,20 +10809,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/quotes/{id}": + + "/api/v1/invoices/{id}": get: tags: - - quotes - summary: "Show quote" - description: "Displays an Quote by id" - operationId: showQuote + - invoices + summary: "Show invoice" + description: "Displays an invoice by id" + operationId: showInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Quote Hashed ID" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -10872,7 +10831,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Quote object" + description: "Returns the invoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10883,7 +10842,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -10896,19 +10855,35 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" + put: tags: - - quotes - summary: "Update quote" - description: "Handles the updating of an Quote by id" - operationId: updateQuote + - invoices + summary: "Update invoice" + description: | + Handles the updating of an invoice by id. + + Triggered actions are available when updating or creating an invoice. + These are query parameters that can be chained in order to perform additional actions on the entity, these include: + + ``` + ?send_email=true [Saves and sends the invoice] + ?mark_sent=true [Saves and marks the invoice as sent] + ?paid=true [Saves and marks the invoice as paid] + ?amount_paid=100 [Saves and marks the invoice as paid with the given amount] + ?cancel=true [Saves and marks the invoice as cancelled] + ?save_default_footer=true [Saves the current footer as the default footer] + ?save_default_terms=true [Saves the current terms as the default terms] + ``` + + operationId: updateInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Quote Hashed ID" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -10916,7 +10891,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Quote object" + description: "Returns the invoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10927,7 +10902,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -10939,20 +10914,20 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" + $ref: "#/components/responses/default" delete: tags: - - quotes - summary: "Delete quote" - description: "Handles the deletion of an Quote by id" - operationId: deleteQuote + - invoices + summary: "Delete invoice" + description: "Handles the deletion of an invoice by id" + operationId: deleteInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Quote Hashed ID" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -10980,20 +10955,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/edit": + "/api/v1/invoices/{id}/edit": get: tags: - - quotes - summary: "Edit quote" - description: "Displays an Quote by id" - operationId: editQuote + - invoices + summary: "Edit invoice" + description: "Displays an invoice by id for editting" + operationId: editInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Quote Hashed ID" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -11001,7 +10976,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Quote object" + description: "Returns the invoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11012,7 +10987,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -11025,20 +11000,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/quotes/create: + + /api/v1/invoices/create: get: tags: - - quotes - summary: "Blank quote" + - invoices + summary: "Blank invoice" description: "Returns a blank object with default values" - operationId: getQuotesCreate + operationId: getInvoicesCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank Quote object" + description: "A blank invoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11049,7 +11025,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -11062,31 +11038,72 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/quotes/bulk: + + /api/v1/invoices/bulk: post: tags: - - quotes - summary: "Bulk quote actions" - description: "" - operationId: bulkQuotes + - invoices + summary: "Bulk invoice actions" + description: | + There are multiple actions that are available including: + + operationId: bulkInvoices parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/index" requestBody: - description: "Hashed ids" + description: "Bulk action details" 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]" + type: object + properties: + action: + type: string + description: | + The action to be performed, options include: + - `bulk_download` + Bulk download an array of invoice PDFs (These are sent to the admin via email.) + - `download` + Download a single PDF. (Returns a single PDF object) + - `bulk_print` + Merges an array of Invoice PDFs for easy one click printing. + - `auto_bill` + Attempts to automatically bill the invoices with the payment method on file. + - `clone_to_invoice` + Returns a clone of the invoice. + - `clone_to_quote` + Returns a quote cloned using the properties of the given invoice. + - `mark_paid` + Marks an array of invoices as paid. + - `mark_sent` + Marks an array of invoices as sent. + - `restore` + Restores an array of invoices + - `delete` + Deletes an array of invoices + - `archive` + Archives an array of invoices + - `cancel` + Cancels an array of invoices + - `email` + Emails an array of invoices + - `send_email` + Emails an array of invoices. Requires additional properties to be sent. `email_type` + ids: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" + type: string + example: + action: bulk_download + ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" + responses: 200: - description: "The Quote response" + description: "The Bulk Action response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11094,10 +11111,6 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: @@ -11110,21 +11123,33 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/{action}": + + "/api/v1/invoices/{id}/{action}": get: deprecated: true tags: - - quotes - summary: "Performs a custom action on an Quote" - description: "Performs a custom action on an Quote.\n\n The current range of actions are as follows\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - convert\n - convert_to_invoice\n - email" - operationId: actionQuote + - invoices + summary: "Custom invoice action" + description: | + Performs a custom action on an invoice. + The current range of actions are as follows + - clone_to_invoice + - clone_to_quote + - history + - delivery_note + - mark_paid + - download + - archive + - delete + - email + operationId: actionInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Quote Hashed ID" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -11140,7 +11165,7 @@ paths: example: clone_to_quote responses: 200: - description: "Returns the Quote object" + description: "Returns the invoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11151,7 +11176,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -11164,20 +11189,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/quote/{invitation_key}/download": + "/api/v1/invoice/{invitation_key}/download": get: tags: - - quotes - summary: "Download quote PDF" - description: "Downloads a specific quote" - operationId: downloadQuote + - invoices + summary: "Download invoice PDF" + description: "Downloads a specific invoice" + operationId: downloadInvoice parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: invitation_key in: path - description: "The Quote Invitation Key" + description: "The Invoice Invitation Key" required: true schema: type: string @@ -11185,7 +11210,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the quote pdf" + description: "Returns the invoice pdf" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11205,45 +11230,86 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/upload": - post: + "/api/v1/invoices/{id}/delivery_note": + get: tags: - - quotes - summary: "Upload a quote document" - description: "Handles the uploading of a document to a quote" - operationId: uploadQuote + - invoices + summary: "Download delivery note" + description: "Downloads a specific invoice delivery notes" + operationId: deliveryNote parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Quote Hashed ID" + description: "The Invoice Hahsed Id" required: true schema: type: string format: string example: D2J234DFA - requestBody: - description: "File Upload Body" - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: PUT - documents: - type: array - items: + responses: + 200: + description: "Returns the invoice delivery note pdf" + 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: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/invoices/{id}/upload": + post: + tags: + - invoices + summary: "Add invoice document" + description: "Handles the uploading of a document to a invoice" + operationId: uploadInvoice + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Invoice Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + 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 responses: 200: - description: "Returns the Quote object" + description: "Returns the Invoice object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11254,7 +11320,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Quote" + $ref: "#/components/schemas/Invoice" 401: $ref: "#/components/responses/401" 403: @@ -11267,20 +11333,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/purchase_orders: + /api/v1/projects: get: tags: - - Purchase Orders - summary: "List purchase orders" - description: "Lists purchase orders, 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 purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available" - operationId: getPurchaseOrders + - projects + summary: "List projects" + description: "Lists projects" + operationId: getProjects 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 purchase orders" + description: "A list of projects" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11296,7 +11363,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/PurchaseOrder' + $ref: '#/components/schemas/Project' meta: type: object $ref: '#/components/schemas/Meta' @@ -11314,17 +11381,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - Purchase Orders - summary: "Create purchase order" - description: "Adds an purchase order to the system" - operationId: storePurchaseOrder + - projects + summary: "Create project" + description: "Adds an project to a company" + operationId: storeProject parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "Returns the saved purchase order object" + description: "Returns the saved project object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11335,7 +11402,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11348,21 +11415,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - "/api/v1/purchase_orders/{id}": + "/api/v1/projects/{id}": get: tags: - - Purchase Orders - summary: "Show purchase order" - description: "Displays an purchase order by id" - operationId: showPurchaseOrder + - projects + summary: "Show project" + description: "Displays a project by id" + operationId: showProject parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Purchase order Hashed ID" + description: "The Project Hashed ID" required: true schema: type: string @@ -11370,7 +11436,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the purchase order object" + description: "Returns the expense object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11381,7 +11447,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11394,20 +11460,19 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/purchase_order/{id}": put: tags: - - Purchase Orders - summary: "Update purchase order" - description: "Handles the updating of an purchase order by id" - operationId: updatePurchaseOrder + - projects + summary: "Update project" + description: "Handles the updating of a project by id" + operationId: updateProject parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The purchase order Hashed ID" + description: "The Project Hashed ID" required: true schema: type: string @@ -11415,7 +11480,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the purchase order object" + description: "Returns the project object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11426,7 +11491,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11441,17 +11506,17 @@ paths: $ref: "#/components/responses/default" delete: tags: - - Purchase Orders - summary: "Delete purchase order" - description: "Handles the deletion of an purchase orders by id" - operationId: deletePurchaseOrder + - projects + summary: "Delete project" + description: "Handles the deletion of a project by id" + operationId: deleteProject parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The purhcase order Hashed ID" + description: "The Project Hashed ID" required: true schema: type: string @@ -11479,20 +11544,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/edit": + "/api/v1/projects/{id}/edit": get: tags: - - Purchase Orders - summary: "Edit purchase order" - description: "Displays an purchase order by id" - operationId: editPurchaseOrder + - projects + summary: "Edit project" + description: "Displays a project by id" + operationId: editProject parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The purchase order Hashed ID" + description: "The Project Hashed ID" required: true schema: type: string @@ -11500,7 +11565,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the purchase order object" + description: "Returns the project object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11511,7 +11576,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11524,21 +11589,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - /api/v1/purchase_orders/create: + /api/v1/projects/create: get: tags: - - Purchase Orders - summary: "Blank purchase order" + - projects + summary: "Blank project" description: "Returns a blank object with default values" - operationId: getPurchaseOrderCreate + operationId: getProjectsCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank purchase order object" + description: "A blank project object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11549,7 +11613,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11562,19 +11626,19 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/purchase_orders/bulk: + /api/v1/projects/bulk: post: tags: - - Purchase Orders - summary: "Bulk purchase order action" + - projects + summary: "Bulk project actions" description: "" - operationId: bulkPurchaseOrderss + operationId: bulkProjects parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/index" requestBody: - description: "Purchase Order IDS" + description: "User credentials" required: true content: application/json: @@ -11586,57 +11650,7 @@ paths: example: "[0,1,2,3]" responses: 200: - description: "The Bulk Action 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" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/{action}": - get: - deprecated: true - tags: - - Purchase Orders - summary: "Custom purchase order actions" - description: "Performs a custom action on an purchase order.\n *\n * The current range of actions are as follows\n * - mark_paid\n * - download\n * - archive\n * - delete\n * - email" - operationId: actionPurchaseOrder - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Purchase Order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote - responses: - 200: - description: "Returns the purchase order object" + description: "The Project User response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11647,7 +11661,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11660,20 +11674,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/upload": + "/api/v1/projects/{id}/upload": post: tags: - - Purchase Orders - summary: "Uploads a purchase order document" - description: "Handles the uploading of a document to a purchase_order" - operationId: uploadPurchaseOrder + - projects + summary: "Uploads a project document" + description: "Handles the uploading of a document to a project" + operationId: uploadProject parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Purchase Order Hashed ID" + description: "The Project Hashed ID" required: true schema: type: string @@ -11698,7 +11712,7 @@ paths: format: binary responses: 200: - description: "Returns the Purchase Order object" + description: "Returns the Project object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11709,7 +11723,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/PurchaseOrder" + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -11722,62 +11736,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/purchase_order/{invitation_key}/download": + /api/v1/vendors: get: tags: - - Purchase Orders - summary: "Download a purchase order PDF" - description: "Downloads a specific purchase order" - operationId: downloadPurchaseOrder + - 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" - - name: invitation_key - in: path - description: "The Purchase Order Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA + - $ref: "#/components/parameters/index" responses: 200: - description: "Returns the Purchase Order pdf" - 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: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/tasks: - get: - tags: - - tasks - summary: "List tasks" - description: "Lists tasks, 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 tasks, these are handled by the TaskFilters class which defines the methods available" - operationId: getTasks - 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 tasks" + description: "A list of vendors" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11793,7 +11766,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Task' + $ref: '#/components/schemas/Vendor' meta: type: object $ref: '#/components/schemas/Meta' @@ -11811,17 +11784,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - tasks - summary: "Create task" - description: "Adds an task to a company" - operationId: storeTask + - 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 task object" + description: "Returns the saved clivendorent object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11832,7 +11805,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -11845,20 +11818,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/tasks/{id}": + "/api/v1/vendors/{id}": get: tags: - - tasks - summary: "Show task" - description: "Displays a task by id" - operationId: showTask + - 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 Task Hashed ID" + description: "The vendor Hashed ID" required: true schema: type: string @@ -11866,7 +11839,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the task object" + description: "Returns the vendor object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11877,7 +11850,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -11892,17 +11865,17 @@ paths: $ref: "#/components/responses/default" put: tags: - - tasks - summary: "Update task" - description: "Handles the updating of a task by id" - operationId: updateTask + - 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 task Hashed ID" + description: "The Vendor Hashed ID" required: true schema: type: string @@ -11910,7 +11883,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the task object" + description: "Returns the vendor object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -11921,7 +11894,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -11936,17 +11909,17 @@ paths: $ref: "#/components/responses/default" delete: tags: - - tasks - summary: "Delete task" - description: "Handles the deletion of a task by id" - operationId: deleteTask + - 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 Task Hashed ID" + description: "The Vendor Hashed ID" required: true schema: type: string @@ -11974,20 +11947,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/tasks/{id}/edit": + "/api/v1/vendors/{id}/edit": get: tags: - - tasks - summary: "Edit task" - description: "Displays a task by id" - operationId: editTask + - 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 Task Hashed ID" + description: "The Vendor Hashed ID" required: true schema: type: string @@ -11995,7 +11968,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the client object" + description: "Returns the vendor object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -12006,7 +11979,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -12019,20 +11992,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/tasks/create: + /api/v1/vendors/create: get: tags: - - tasks - summary: "Blank task" - description: "Returns a blank task with default values" - operationId: getTasksCreate + - 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 task object" + description: "A blank vendor object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -12043,7 +12016,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -12056,13 +12029,13 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/tasks/bulk: + /api/v1/vendors/bulk: post: tags: - - tasks - summary: "Bulk task actions" + - vendors + summary: "Bulk vendor actions" description: "" - operationId: bulkTasks + operationId: bulkVendors parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" @@ -12080,7 +12053,7 @@ paths: example: "[0,1,2,3]" responses: 200: - description: "The Task User response" + description: "The Vendor User response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -12091,7 +12064,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -12104,20 +12077,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/tasks/{id}/upload": + "/api/v1/vendors/{id}/upload": post: tags: - - tasks - summary: "Uploads a task document" - description: "Handles the uploading of a document to a task" - operationId: uploadTask + - 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 Task Hashed ID" + description: "The Vendor Hashed ID" required: true schema: type: string @@ -12142,7 +12115,7 @@ paths: format: binary responses: 200: - description: "Returns the Task object" + description: "Returns the Vendor object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -12153,7 +12126,88 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Task" + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + /api/v1/payments: + get: + tags: + - payments + summary: "List payments" + description: "Lists payments, 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 payments, these are handled by the PaymentFilters class which defines the methods available" + operationId: getPayments + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/client_id" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: filter + in: query + description: | + Searches across a range of columns including: + - amount + - date + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 + required: false + schema: + type: string + example: ?filter=10 + - name: number + in: query + description: | + Search payments by payment number + required: false + schema: + type: string + example: ?number=0001 + - name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc number|desc balance|asc + responses: + 200: + description: "A list of payments" + 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: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Payment' + meta: + type: object + $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: @@ -12166,20 +12220,26 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/tasks/sort: post: tags: - - tasks - summary: "Sort tasks on KanBan" - description: "Sorts tasks after drag and drop on the KanBan." - operationId: sortTasks + - payments + summary: "Create payment" + description: "Adds an Payment to the system" + operationId: storePayment parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + requestBody: + description: "The payment request" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" responses: 200: - description: "Returns an Ok, 200 HTTP status" + description: "Returns the saved Payment object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -12187,6 +12247,10 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" 401: $ref: "#/components/responses/401" 403: @@ -12199,219 +12263,109 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/clients: + + "/api/v1/payments/{id}": get: tags: - - clients - summary: 'List clients' - x-code-samples: - - lang: go - label: php - source: | - $ninja = new InvoiceNinja("your_token"); - $invoices = $ninja->clients->all(); - x-custom-element: - type: markdown - value: | - ### Custom Response Description - This is a custom description for the response returned by the `/example` endpoint. - description: | - When retrieving a list of clients you can also chain query parameters in order to filter the dataset that is returned. For example, you can send a request to the following URL to retrieve clients that have a balance greater than 1000:\ - - ``` - /api/v1/clients?balance=gt:1000 - ``` - - You can also sort the results by adding a sort parameter. The following example will sort the results by the client name in descending order:\ - - ``` - /api/v1/clients?sort=name|desc - ``` - - You can also combine multiple filters together. The following example will return clients that have a balance greater than 1000 and are not deleted and have a name that starts with "Bob":\ - - ``` - /api/v1/clients?balance=gt:1000&name=Bob* - ``` - - If you wish to retrieve child relations, you can also combine the query parameter `?include=` with a comma separated list of relationships:\ - - ``` - /api/v1/clients?include=activities,ledger,system_logs' - ``` - - The per_page and page variables allow pagination of the list of clients. The following example will return the second page of clients with 15 clients per page:\ - - ``` - /api/v1/clients?per_page=15&page=2 - ``` - - The default per_page value is 20. - - operationId: getClients + - payments + summary: "Show payment" + description: "Displays an Payment by id" + operationId: showPayment parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - - $ref: '#/components/parameters/index' - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: name - in: query - description: Filter by client name - required: false - schema: - type: string - example: bob - - 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 - 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 - in: query - description: Filter by client email - required: false - schema: - type: string - example: bob@gmail.com - - name: id_number - in: query - description: Filter by client id_number - required: false - schema: - type: string - example: a1039883 - - name: number - in: query - description: Filter by client number - required: false - schema: - type: string - example: a1039883 - - 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 - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true schema: type: string - example: id|desc name|desc balance|asc - + format: string + example: D2J234DFA responses: 200: - description: 'A list of clients' + description: "Returns the Payment 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: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Client' - example: - $ref: '#/components/schemas/Client' - meta: - type: object - $ref: '#/components/schemas/Meta' - example: - $ref: '#/components/schemas/Meta' + schema: + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - post: + $ref: "#/components/responses/default" + put: tags: - - clients - summary: 'Create client' - description: | - Adds a client to a company - - When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation. - - operationId: storeClient + - payments + summary: "Update payment" + description: "Handles the updating of an Payment by id" + operationId: updatePayment parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/client_include' - requestBody: - description: Client object that needs to be added to the company - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ClientRequest' + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Payment Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA responses: 200: - description: 'Returns the saved client object' + description: "Returns the Payment 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/Client' + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}': - get: + $ref: "#/components/responses/default" + delete: tags: - - clients - summary: 'Show client' - description: 'Displays a client by id' - operationId: showClient + - payments + summary: "Delete payment" + description: "Handles the deletion of an Payment by id" + operationId: deletePayment 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/include" - name: id in: path - description: 'The Client Hashed ID' + description: "The Payment Hashed ID" required: true schema: type: string @@ -12419,374 +12373,438 @@ paths: example: D2J234DFA responses: 200: - description: 'Returns the client object' + 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' - content: - application/json: - schema: - $ref: '#/components/schemas/Client' + $ref: "#/components/headers/X-RateLimit-Limit" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - put: + $ref: "#/components/responses/default" + "/api/v1/payments/{id}/edit": + get: 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' + - payments + summary: "Edit payment" + description: "Displays an Payment by id" + operationId: editPayment + parameters: + - $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' + description: "The Payment Hashed ID" required: true schema: type: string format: string example: D2J234DFA - requestBody: - description: Client object that needs to be updated - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ClientRequest' responses: 200: - description: 'Returns the client object' + description: "Returns the Payment 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/Client' - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - default: - $ref: '#/components/responses/default' - delete: - tags: - - clients - summary: 'Delete client' - 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 - in: path - description: 'The Client 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' + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/edit': + $ref: "#/components/responses/default" + /api/v1/payments/create: get: tags: - - clients - summary: 'Edit Client' - description: 'Displays a client by id, essentially an alias of the show route' - operationId: editClient + - payments + summary: "Blank payment" + description: "Returns a blank object with default values" + operationId: getPaymentsCreate parameters: - - $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 - schema: - type: string - format: string - example: D2J234DFA + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" responses: 200: - description: 'Returns the client object' + description: "A blank Payment 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/Client' + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - /api/v1/clients/create: - get: + $ref: "#/components/responses/default" + /api/v1/payments/refund: + post: tags: - - clients - summary: 'Blank Client' - description: 'Returns a blank object with default values' - operationId: getClientsCreate + - payments + summary: "Refund payment" + description: "Adds an Refund to the system" + operationId: storeRefund 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/include" + requestBody: + description: "The refund request" + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Payment" responses: 200: - description: 'A blank client object' + description: "Returns the saved Payment 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/Client' + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - /api/v1/clients/bulk: + $ref: "#/components/responses/default" + /api/v1/payments/bulk: post: tags: - - clients - summary: 'Bulk client actions' - description: 'Archive / Restore / Delete in bulk' - operationId: bulkClients + - payments + summary: "Bulk payment actions" + description: "" + operationId: bulkPayments 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: 'Bulk action array' + description: "User credentials" required: true content: application/json: schema: - $ref: '#/components/schemas/GenericBulkAction' - + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" responses: 200: - description: 'The Client listresponse' + description: "The Payment 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/Client' + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/upload': - post: + $ref: "#/components/responses/default" + "/api/v1/payments/{id}/{action}": + get: + deprecated: true tags: - - clients - summary: 'Add client document' - 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 + - payments + summary: "Custom payment actions" + description: "Performs a custom action on an Payment.\n\n The current range of actions are as follows\n - clone_to_Payment\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" + operationId: actionPayment 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/include" - name: id in: path - description: 'The Client Hashed ID' + description: "The Payment Hashed ID" required: true schema: type: string format: string example: D2J234DFA - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - properties: - _method: - type: string - example: POST - documents: - type: array - items: - format: binary + - name: action + in: path + description: "The action string to be performed" + required: true + schema: + type: string + format: string + example: clone_to_quote responses: 200: - description: 'Returns the client object' + description: "Returns the Payment 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/Client' + $ref: "#/components/schemas/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/purge': + $ref: "#/components/responses/default" + + "/api/v1/payments/{id}/upload": post: tags: - - clients - summary: 'Purge client' - description: | - Handles purging a clients. - - Please note this is a destructive action. - - This action will remove all data associated with the client and cannot be undone. - operationId: purgeClient + - payments + summary: "Upload a payment document" + description: "Handles the uploading of a document to a payment" + operationId: uploadPayment parameters: - - $ref: '#/components/parameters/X-API-TOKEN' - - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/X-API-PASSWORD' - - $ref: '#/components/parameters/client_include' + - $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' + description: "The Payment Hashed ID" required: true schema: type: string format: string example: D2J234DFA + 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 responses: 200: - description: 'Returns the client object' + description: "Returns the Payment 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/Payment" 401: - $ref: '#/components/responses/401' + $ref: "#/components/responses/401" 403: - $ref: '#/components/responses/403' + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' + 5XX: + description: 'Server error' default: - $ref: '#/components/responses/default' - '/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge': - post: + $ref: "#/components/responses/default" + /api/v1/clients: + get: tags: - clients - summary: 'Merge client' + summary: 'List clients' + x-code-samples: + - lang: go + label: php + source: | + $ninja = new InvoiceNinja("your_token"); + $invoices = $ninja->clients->all(); + x-custom-element: + type: markdown + value: | + ### Custom Response Description + This is a custom description for the response returned by the `/example` endpoint. description: | - Handles merging 2 clients + When retrieving a list of clients you can also chain query parameters in order to filter the dataset that is returned. For example, you can send a request to the following URL to retrieve clients that have a balance greater than 1000:\ + + ``` + /api/v1/clients?balance=gt:1000 + ``` + + You can also sort the results by adding a sort parameter. The following example will sort the results by the client name in descending order:\ + + ``` + /api/v1/clients?sort=name|desc + ``` - The id parameter is the client that will be the primary client after the merge has completed. + You can also combine multiple filters together. The following example will return clients that have a balance greater than 1000 and are not deleted and have a name that starts with "Bob":\ + + ``` + /api/v1/clients?balance=gt:1000&name=Bob* + ``` - The mergeable_client_hashed_id is the client that will be merged into the primary client, this clients records will be updated and associated with the primary client. - operationId: mergeClient + If you wish to retrieve child relations, you can also combine the query parameter `?include=` with a comma separated list of relationships:\ + + ``` + /api/v1/clients?include=activities,ledger,system_logs' + ``` + + The per_page and page variables allow pagination of the list of clients. The following example will return the second page of clients with 15 clients per page:\ + + ``` + /api/v1/clients?per_page=15&page=2 + ``` + + The default per_page value is 20. + + operationId: getClients parameters: - $ref: '#/components/parameters/X-API-TOKEN' - $ref: '#/components/parameters/X-Requested-With' - $ref: '#/components/parameters/client_include' - - $ref: '#/components/parameters/X-API-PASSWORD' - - name: id - in: path - description: 'The Client Hashed ID' - required: true + - $ref: '#/components/parameters/index' + - $ref: "#/components/parameters/status" + - $ref: "#/components/parameters/created_at" + - $ref: "#/components/parameters/updated_at" + - $ref: "#/components/parameters/is_deleted" + - $ref: "#/components/parameters/filter_deleted_clients" + - $ref: "#/components/parameters/vendor_id" + - name: name + in: query + description: Filter by client name + required: false schema: type: string - format: string - example: D2J234DFA - - name: mergeable_client_hashed_id - in: path - description: 'The Mergeable Client Hashed ID' - required: true + example: bob + - 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 - format: string - example: D2J234DFA + example: lt:10 + - 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 + in: query + description: Filter by client email + required: false + schema: + type: string + example: bob@gmail.com + - name: id_number + in: query + description: Filter by client id_number + required: false + schema: + type: string + example: a1039883 + - name: number + in: query + description: Filter by client number + required: false + schema: + type: string + example: a1039883 + - 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 + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc name|desc balance|asc + responses: 200: - description: 'Returns the client object' + description: 'A list of clients' headers: X-MINIMUM-CLIENT-VERSION: $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' @@ -12794,6 +12812,22 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-RateLimit-Limit: $ref: '#/components/headers/X-RateLimit-Limit' + content: + application/json: + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Client' + example: + $ref: '#/components/schemas/Client' + meta: + type: object + $ref: '#/components/schemas/Meta' + example: + $ref: '#/components/schemas/Meta' 401: $ref: '#/components/responses/401' 403: @@ -12804,46 +12838,30 @@ paths: $ref: '#/components/responses/429' default: $ref: '#/components/responses/default' - /api/v1/client_statement: post: tags: - clients - summary: 'Client statement PDF' - description: 'Return a PDF of the client statement' - operationId: clientStatement + summary: 'Create client' + description: | + Adds a client to a company + + When creating (or updating) a client you must include the child contacts with all mutating requests. Client contacts cannot be modified in isolation. + + operationId: storeClient parameters: - $ref: '#/components/parameters/X-API-TOKEN' - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/include' + - $ref: '#/components/parameters/client_include' requestBody: - description: 'Statement Options' + description: Client object that needs to be added to the company required: true content: application/json: schema: - properties: - start_date: - description: 'The start date of the statement period - format Y-m-d' - type: string - end_date: - description: 'The start date of the statement period - format Y-m-d' - type: string - client_id: - description: 'The hashed ID of the client' - type: string - show_payments_table: - description: 'Flag which determines if the payments table is shown' - type: boolean - show_credits_table: - description: 'Flag which determines if the credits table is shown' - type: boolean - show_aging_table: - description: 'Flag which determines if the aging table is shown' - type: boolean - type: object + $ref: '#/components/schemas/ClientRequest' responses: 200: - description: 'Returns the client object' + description: 'Returns the saved client object' headers: X-MINIMUM-CLIENT-VERSION: $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' @@ -12863,32 +12881,30 @@ paths: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: $ref: '#/components/responses/default' - /api/v1/reactivate_email/{bounce_id}: - post: - tags: + '/api/v1/clients/{id}': + get: + tags: - clients - summary: 'Removes email suppression of a user in the system' - description: 'Emails are suppressed by PostMark, when they receive a Hard bounce / Spam Complaint. This endpoint allows you to remove the suppression and send emails to the user again.' - operationId: reactivateEmail + summary: 'Show client' + description: 'Displays a client by id' + operationId: showClient parameters: - $ref: '#/components/parameters/X-API-TOKEN' - $ref: '#/components/parameters/X-Requested-With' - - $ref: '#/components/parameters/include' - - name: bounce_id + - $ref: '#/components/parameters/client_include' + - name: id in: path - description: 'The postmark Bounce ID reference' + description: 'The Client Hashed ID' required: true schema: type: string format: string - example: 123243 + example: D2J234DFA responses: 200: - description: 'Success' + description: 'Returns the client object' headers: X-MINIMUM-CLIENT-VERSION: $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' @@ -12896,8 +12912,10 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-RateLimit-Limit: $ref: '#/components/headers/X-RateLimit-Limit' - 400: - description: 'Postmark exception - generated if the suppression cannot be removed for any reason' + content: + application/json: + schema: + $ref: '#/components/schemas/Client' 401: $ref: '#/components/responses/401' 403: @@ -12906,32 +12924,36 @@ paths: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: $ref: '#/components/responses/default' - /api/v1/clients/{client}/updateTaxData: - post: + put: tags: - clients - summary: 'Update tax data' - description: 'Updates the clients tax data - if their address has changed' - operationId: updateClientTaxData + 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/include' - - name: client + - $ref: '#/components/parameters/client_include' + - name: id in: path - description: 'The Client Hashed ID reference' + description: 'The Client Hashed ID' required: true schema: type: string format: string - example: V2J234DFA + example: D2J234DFA + requestBody: + description: Client object that needs to be updated + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ClientRequest' responses: 200: - description: 'Success' + description: 'Returns the client object' headers: X-MINIMUM-CLIENT-VERSION: $ref: '#/components/headers/X-MINIMUM-CLIENT-VERSION' @@ -12939,8 +12961,10 @@ paths: $ref: '#/components/headers/X-RateLimit-Remaining' X-RateLimit-Limit: $ref: '#/components/headers/X-RateLimit-Limit' - 400: - description: 'Postmark exception - generated if the suppression cannot be removed for any reason' + content: + application/json: + schema: + $ref: '#/components/schemas/Client' 401: $ref: '#/components/responses/401' 403: @@ -12949,235 +12973,244 @@ paths: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: $ref: '#/components/responses/default' - /api/v1/projects: - get: + delete: tags: - - projects - summary: "List projects" - description: "Lists projects" - operationId: getProjects + - clients + summary: 'Delete client' + 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/include" - - $ref: "#/components/parameters/index" + - $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: "A list of projects" + 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" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Project' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/headers/X-RateLimit-Limit' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - post: + $ref: '#/components/responses/default' + '/api/v1/clients/{id}/edit': + get: tags: - - projects - summary: "Create project" - description: "Adds an project to a company" - operationId: storeProject + - clients + summary: 'Edit Client' + description: 'Displays a client by id, essentially an alias of the show route' + operationId: editClient 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' + - name: id + in: path + description: 'The Client Hashed ID' + required: true + schema: + type: string + format: string + example: D2J234DFA responses: 200: - description: "Returns the saved project object" + description: 'Returns the client 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/Project" + $ref: '#/components/schemas/Client' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - "/api/v1/projects/{id}": + $ref: '#/components/responses/default' + /api/v1/clients/create: get: tags: - - projects - summary: "Show project" - description: "Displays a project by id" - operationId: showProject + - clients + summary: 'Blank Client' + 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/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA + - $ref: '#/components/parameters/X-API-TOKEN' + - $ref: '#/components/parameters/X-Requested-With' + - $ref: '#/components/parameters/client_include' responses: 200: - description: "Returns the expense object" + description: 'A blank client 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/Project" + $ref: '#/components/schemas/Client' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - put: + $ref: '#/components/responses/default' + /api/v1/clients/bulk: + post: tags: - - projects - summary: "Update project" - description: "Handles the updating of a project by id" - operationId: updateProject + - clients + 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/include" - - name: id - in: path - description: "The Project Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA + - $ref: '#/components/parameters/X-API-TOKEN' + - $ref: '#/components/parameters/X-Requested-With' + - $ref: '#/components/parameters/index' + requestBody: + description: 'Bulk action array' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/GenericBulkAction' + responses: 200: - description: "Returns the project object" + description: 'The Client listresponse' 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/Project" + $ref: '#/components/schemas/Client' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - delete: + $ref: '#/components/responses/default' + '/api/v1/clients/{id}/upload': + post: tags: - - projects - summary: "Delete project" - description: "Handles the deletion of a project by id" - operationId: deleteProject + - clients + summary: 'Add client document' + 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/include" + - $ref: '#/components/parameters/X-API-TOKEN' + - $ref: '#/components/parameters/X-Requested-With' + - $ref: '#/components/parameters/client_include' - name: id in: path - description: "The Project Hashed ID" + description: 'The Client Hashed ID' required: true schema: type: string format: string example: D2J234DFA + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: POST + documents: + type: array + items: + format: binary responses: 200: - description: "Returns a HTTP status" + description: 'Returns the client 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/Client' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - "/api/v1/projects/{id}/edit": - get: + $ref: '#/components/responses/default' + '/api/v1/clients/{id}/purge': + post: tags: - - projects - summary: "Edit project" - description: "Displays a project by id" - operationId: editProject + - clients + summary: 'Purge client' + description: | + Handles purging a clients. + + Please note this is a destructive action. + + This action will remove all data associated with the client and cannot be undone. + operationId: purgeClient 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/X-API-PASSWORD' + - $ref: '#/components/parameters/client_include' - name: id in: path - description: "The Project Hashed ID" + description: 'The Client Hashed ID' required: true schema: type: string @@ -13185,107 +13218,132 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the project object" + description: 'Returns the client 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" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/headers/X-RateLimit-Limit' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - /api/v1/projects/create: - get: + $ref: '#/components/responses/default' + '/api/v1/clients/{id}/{mergeable_client_hashed_id}/merge': + post: tags: - - projects - summary: "Blank project" - description: "Returns a blank object with default values" - operationId: getProjectsCreate + - clients + summary: 'Merge client' + description: | + Handles merging 2 clients + + The id parameter is the client that will be the primary client after the merge has completed. + + The mergeable_client_hashed_id is the client that will be merged into the primary client, this clients records will be updated and associated with the primary client. + operationId: mergeClient 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/client_include' + - $ref: '#/components/parameters/X-API-PASSWORD' + - name: id + in: path + description: 'The Client Hashed ID' + required: true + schema: + type: string + format: string + example: D2J234DFA + - name: mergeable_client_hashed_id + in: path + description: 'The Mergeable Client Hashed ID' + required: true + schema: + type: string + format: string + example: D2J234DFA responses: 200: - description: "A blank project object" + description: 'Returns the client 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" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/headers/X-RateLimit-Limit' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: $ref: '#/components/responses/429' - 5XX: - description: 'Server error' default: - $ref: "#/components/responses/default" - /api/v1/projects/bulk: + $ref: '#/components/responses/default' + /api/v1/client_statement: post: tags: - - projects - summary: "Bulk project actions" - description: "" - operationId: bulkProjects + - clients + summary: 'Client statement PDF' + 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/index" + - $ref: '#/components/parameters/X-API-TOKEN' + - $ref: '#/components/parameters/X-Requested-With' + - $ref: '#/components/parameters/include' requestBody: - description: "User credentials" + description: 'Statement Options' 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]" + properties: + start_date: + description: 'The start date of the statement period - format Y-m-d' + type: string + end_date: + description: 'The start date of the statement period - format Y-m-d' + type: string + client_id: + description: 'The hashed ID of the client' + type: string + show_payments_table: + description: 'Flag which determines if the payments table is shown' + type: boolean + show_credits_table: + description: 'Flag which determines if the credits table is shown' + type: boolean + show_aging_table: + description: 'Flag which determines if the aging table is shown' + type: boolean + type: object responses: 200: - description: "The Project User response" + description: 'Returns the client 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/Project" + $ref: '#/components/schemas/Client' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -13293,61 +13351,42 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - "/api/v1/projects/{id}/upload": + $ref: '#/components/responses/default' + /api/v1/reactivate_email/{bounce_id}: post: tags: - - projects - summary: "Uploads a project document" - description: "Handles the uploading of a document to a project" - operationId: uploadProject + - clients + summary: 'Removes email suppression of a user in the system' + description: 'Emails are suppressed by PostMark, when they receive a Hard bounce / Spam Complaint. This endpoint allows you to remove the suppression and send emails to the user again.' + operationId: reactivateEmail 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: bounce_id in: path - description: "The Project Hashed ID" + description: 'The postmark Bounce ID reference' required: true schema: type: string format: string - example: D2J234DFA - 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 + example: 123243 responses: 200: - description: "Returns the Project object" + description: 'Success' 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" - content: - application/json: - schema: - $ref: "#/components/schemas/Project" + $ref: '#/components/headers/X-RateLimit-Limit' + 400: + description: 'Postmark exception - generated if the suppression cannot be removed for any reason' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -13355,57 +13394,64 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - /api/v1/payments: + $ref: '#/components/responses/default' + /api/v1/clients/{client}/updateTaxData: + post: + tags: + - clients + summary: 'Update tax data' + description: 'Updates the clients tax data - if their address has changed' + operationId: updateClientTaxData + parameters: + - $ref: '#/components/parameters/X-API-TOKEN' + - $ref: '#/components/parameters/X-Requested-With' + - $ref: '#/components/parameters/include' + - name: client + in: path + description: 'The Client Hashed ID reference' + required: true + schema: + type: string + format: string + example: V2J234DFA + responses: + 200: + description: 'Success' + 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' + 400: + description: 'Postmark exception - generated if the suppression cannot be removed for any reason' + 401: + $ref: '#/components/responses/401' + 403: + $ref: '#/components/responses/403' + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: '#/components/responses/default' + /api/v1/purchase_orders: get: tags: - - payments - summary: "List payments" - description: "Lists payments, 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 payments, these are handled by the PaymentFilters class which defines the methods available" - operationId: getPayments + - Purchase Orders + summary: "List purchase orders" + description: "Lists purchase orders, 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 purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available" + operationId: getPurchaseOrders parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/status" - - $ref: "#/components/parameters/client_id" - - $ref: "#/components/parameters/created_at" - - $ref: "#/components/parameters/updated_at" - - $ref: "#/components/parameters/is_deleted" - - $ref: "#/components/parameters/filter_deleted_clients" - - $ref: "#/components/parameters/vendor_id" - - name: filter - in: query - description: | - Searches across a range of columns including: - - amount - - date - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 - required: false - schema: - type: string - example: ?filter=10 - - name: number - in: query - description: | - Search payments by payment number - required: false - schema: - type: string - example: ?number=0001 - - name: sort - in: query - description: Returns the list sorted by column in ascending or descending order. - required: false - schema: - type: string - example: id|desc number|desc balance|asc responses: 200: - description: "A list of payments" + description: "A list of purchase orders" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13421,7 +13467,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Payment' + $ref: '#/components/schemas/PurchaseOrder' meta: type: object $ref: '#/components/schemas/Meta' @@ -13439,24 +13485,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - payments - summary: "Create payment" - description: "Adds an Payment to the system" - operationId: storePayment + - Purchase Orders + summary: "Create purchase order" + description: "Adds an purchase order to the system" + operationId: storePurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - requestBody: - description: "The payment request" - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" responses: 200: - description: "Returns the saved Payment object" + description: "Returns the saved purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13467,7 +13506,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13481,20 +13520,20 @@ paths: default: $ref: "#/components/responses/default" - "/api/v1/payments/{id}": + "/api/v1/purchase_orders/{id}": get: tags: - - payments - summary: "Show payment" - description: "Displays an Payment by id" - operationId: showPayment + - Purchase Orders + summary: "Show purchase order" + description: "Displays an purchase order by id" + operationId: showPurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Payment Hashed ID" + description: "The Purchase order Hashed ID" required: true schema: type: string @@ -13502,7 +13541,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Payment object" + description: "Returns the purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13513,7 +13552,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13526,19 +13565,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" + "/api/v1/purchase_order/{id}": put: tags: - - payments - summary: "Update payment" - description: "Handles the updating of an Payment by id" - operationId: updatePayment + - Purchase Orders + summary: "Update purchase order" + description: "Handles the updating of an purchase order by id" + operationId: updatePurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Payment Hashed ID" + description: "The purchase order Hashed ID" required: true schema: type: string @@ -13546,7 +13586,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Payment object" + description: "Returns the purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13557,7 +13597,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13572,17 +13612,17 @@ paths: $ref: "#/components/responses/default" delete: tags: - - payments - summary: "Delete payment" - description: "Handles the deletion of an Payment by id" - operationId: deletePayment + - Purchase Orders + summary: "Delete purchase order" + description: "Handles the deletion of an purchase orders by id" + operationId: deletePurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Payment Hashed ID" + description: "The purhcase order Hashed ID" required: true schema: type: string @@ -13610,20 +13650,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/payments/{id}/edit": + "/api/v1/purchase_orders/{id}/edit": get: tags: - - payments - summary: "Edit payment" - description: "Displays an Payment by id" - operationId: editPayment + - Purchase Orders + summary: "Edit purchase order" + description: "Displays an purchase order by id" + operationId: editPurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Payment Hashed ID" + description: "The purchase order Hashed ID" required: true schema: type: string @@ -13631,7 +13671,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Payment object" + description: "Returns the purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13642,7 +13682,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13655,20 +13695,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/payments/create: + + /api/v1/purchase_orders/create: get: tags: - - payments - summary: "Blank payment" + - Purchase Orders + summary: "Blank purchase order" description: "Returns a blank object with default values" - operationId: getPaymentsCreate + operationId: getPurchaseOrderCreate parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" responses: 200: - description: "A blank Payment object" + description: "A blank purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13679,7 +13720,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13692,27 +13733,31 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/payments/refund: + /api/v1/purchase_orders/bulk: post: tags: - - payments - summary: "Refund payment" - description: "Adds an Refund to the system" - operationId: storeRefund + - Purchase Orders + summary: "Bulk purchase order action" + description: "" + operationId: bulkPurchaseOrderss parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/index" requestBody: - description: "The refund request" + description: "Purchase Order IDS" required: true content: application/json: schema: - $ref: "#/components/schemas/Payment" + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" responses: 200: - description: "Returns the saved Payment object" + description: "The Bulk Action response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13720,10 +13765,6 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Payment" 401: $ref: "#/components/responses/401" 403: @@ -13736,69 +13777,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/payments/bulk: - post: + "/api/v1/purchase_orders/{id}/{action}": + get: + deprecated: true tags: - - payments - summary: "Bulk payment actions" - description: "" - operationId: bulkPayments - 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 Payment 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/Payment" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/payments/{id}/{action}": - get: - deprecated: true - tags: - - payments - summary: "Custom payment actions" - description: "Performs a custom action on an Payment.\n\n The current range of actions are as follows\n - clone_to_Payment\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email" - operationId: actionPayment + - Purchase Orders + summary: "Custom purchase order actions" + description: "Performs a custom action on an purchase order.\n *\n * The current range of actions are as follows\n * - mark_paid\n * - download\n * - archive\n * - delete\n * - email" + operationId: actionPurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Payment Hashed ID" + description: "The Purchase Order Hashed ID" required: true schema: type: string @@ -13814,7 +13807,7 @@ paths: example: clone_to_quote responses: 200: - description: "Returns the Payment object" + description: "Returns the purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13825,7 +13818,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13838,21 +13831,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - "/api/v1/payments/{id}/upload": + "/api/v1/purchase_orders/{id}/upload": post: tags: - - payments - summary: "Upload a payment document" - description: "Handles the uploading of a document to a payment" - operationId: uploadPayment + - Purchase Orders + summary: "Uploads a purchase order document" + description: "Handles the uploading of a document to a purchase_order" + operationId: uploadPurchaseOrder parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" - name: id in: path - description: "The Payment Hashed ID" + description: "The Purchase Order Hashed ID" required: true schema: type: string @@ -13877,7 +13869,7 @@ paths: format: binary responses: 200: - description: "Returns the Payment object" + description: "Returns the Purchase Order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13888,7 +13880,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Payment" + $ref: "#/components/schemas/PurchaseOrder" 401: $ref: "#/components/responses/401" 403: @@ -13901,19 +13893,80 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/recurring_invoices: + "/api/v1/purchase_order/{invitation_key}/download": get: tags: - - Recurring Invoices - summary: "List recurring invoices" + - Purchase Orders + summary: "Download a purchase order PDF" + description: "Downloads a specific purchase order" + operationId: downloadPurchaseOrder + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: invitation_key + in: path + description: "The Purchase Order Invitation Key" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Purchase Order pdf" + 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: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + /api/v1/products: + get: + tags: + - products + summary: "List products" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X GET 'https://invoicing.co/api/v1/products?filter=search&per_page=20&page=1&include=documents' \ + -H "X-API-TOKEN:company-token-test" \ + -H "X-Requested-With: XMLHttpRequest"; + - lang: go + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $products = $ninja->products->all([ + 'filter' => 'search', + 'per_page' => 20, + 'page' => 1, + 'include' => 'documents' + ]); description: | - Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list. + Lists products within your company. + + You can search and filter the result set using query parameters. These can be chained together allowing fine grained lists to be generated. - operationId: getRecurringInvoices + operationId: getProducts parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/status" - $ref: "#/components/parameters/client_id" - $ref: "#/components/parameters/created_at" - $ref: "#/components/parameters/updated_at" @@ -13922,38 +13975,28 @@ paths: - $ref: "#/components/parameters/vendor_id" - name: filter in: query - description: | - Searches across a range of columns including: - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 + description: Filter by product name required: false schema: type: string - example: ?filter=bob - - name: client_status + example: bob + - name: product_key in: query - description: | - A comma separated list of invoice status strings. Valid options include: - - all - - active - - paused - - completed + description: Filter by product key required: false schema: type: string - example: ?client_status=active,paused + example: bob - name: sort in: query description: Returns the list sorted by column in ascending or descending order. required: false schema: type: string - example: id|desc number|desc balance|asc + example: id|desc product_key|desc responses: 200: - description: "A list of recurring_invoices" + description: "A list of products" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13969,14 +14012,14 @@ paths: data: type: array items: - $ref: '#/components/schemas/RecurringInvoice' + $ref: '#/components/schemas/Product' meta: type: object $ref: '#/components/schemas/Meta' 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -13984,20 +14027,46 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" + $ref: '#/components/responses/default' post: tags: - - Recurring Invoices - summary: "Create recurring invoice" - description: "Adds a Recurring Invoice to the system" - operationId: storeRecurringInvoice + - products + summary: "Create Product" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X POST 'https://invoicing.co/api/v1/products' \ + -H "X-API-TOKEN:company-token-test" \ + -H "Content-Type:application/json" \ + -d '{"product_key":"sku_1","notes":"product description","cost":1,"price":10}' \ + -H "X-Requested-With: XMLHttpRequest"; + - lang: go + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $products = $ninja->products->create([ + 'product_key' => "sku_1", + 'notes' => "product description", + 'cost' => 1, + 'price' => 10 + ]); + 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" + requestBody: + description: Product object that needs to be added to the company + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProductRequest' responses: 200: - description: "Returns the saved RecurringInvoice object" + description: "Returns the saved product object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -14008,11 +14077,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14020,22 +14089,33 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - - "/api/v1/recurring_invoices/{id}": + $ref: '#/components/responses/default' + "/api/v1/products/{id}": get: tags: - - Recurring Invoices - summary: "Show recurring invoice" - description: "Displays an RecurringInvoice by id" - operationId: showRecurringInvoice + - products + summary: "Show product" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X GET 'https://invoicing.co/api/v1/products/{id}' \ + -H "X-API-TOKEN:company-token-test" \ + -H "X-Requested-With: XMLHttpRequest"; + - lang: php + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $product = $ninja->products->get("{id}"); + 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 in: path - description: "The RecurringInvoice Hashed ID" + description: "The Product Hashed ID" required: true schema: type: string @@ -14043,7 +14123,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the RecurringInvoice object" + description: "Returns the product object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -14054,11 +14134,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14066,30 +14146,58 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" + $ref: '#/components/responses/default' put: tags: - - Recurring Invoices - summary: "Update recurring invoice" - description: "Handles the updating of an RecurringInvoice by id" - operationId: updateRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the RecurringInvoice object" - headers: - X-MINIMUM-CLIENT-VERSION: + - products + summary: "Update product" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X PUT 'https://invoicing.co/api/v1/products/{id}' \ + -H "X-API-TOKEN:company-token-test" \ + -H "Content-Type: application/json" \ + -d '{ + "product_key": "Updated Product", + "price": 150.0, + "notes": "An updated description of the product" + }' + - lang: go + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $product = $ninja->products->update("id", [ + "name" => "Updated Product", + "price" => 150.0, + "description" => "An updated description of the 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 + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + requestBody: + description: Product object that needs to be added to the company + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProductRequest' + responses: + 200: + description: "Returns the Product object" + headers: + X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" X-RateLimit-Remaining: $ref: "#/components/headers/X-RateLimit-Remaining" @@ -14098,11 +14206,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14110,20 +14218,32 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" + $ref: '#/components/responses/default' delete: tags: - - Recurring Invoices - summary: "Delete recurring invoice" - description: "Handles the deletion of an RecurringInvoice by id" - operationId: deleteRecurringInvoice + - products + summary: "Delete product" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X DELETE 'https://invoicing.co/api/v1/products/{id}' \ + -H "X-API-TOKEN:company-token-test" \ + -H "X-Requested-With: XMLHttpRequest"; + - lang: go + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $ninja->products->bulk("delete", "id"); + 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 in: path - description: "The RecurringInvoice Hashed ID" + description: "The Product Hashed ID" required: true schema: type: string @@ -14140,9 +14260,9 @@ paths: X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14150,21 +14270,33 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoices/{id}/edit": + $ref: '#/components/responses/default' + "/api/v1/products/{id}/edit": get: tags: - - Recurring Invoices - summary: "Edit recurring invoice" - description: "Displays an RecurringInvoice by id" - operationId: editRecurringInvoice + - products + summary: "Edit product" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X GET 'https://invoicing.co/api/v1/products/{id}/edit' \ + -H "X-API-TOKEN:company-token-test" \ + -H "X-Requested-With: XMLHttpRequest"; + - lang: php + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $product = $ninja->products->get("{id}"); + 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 in: path - description: "The RecurringInvoice Hashed ID" + description: "The Product Hashed ID" required: true schema: type: string @@ -14172,7 +14304,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the RecurringInvoice object" + description: "Returns the Product object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -14183,11 +14315,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14195,22 +14327,21 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - - /api/v1/recurring_invoices/create: + $ref: '#/components/responses/default' + "/api/v1/products/create": get: tags: - - Recurring Invoices - summary: "Blank recurring invoice" - description: "Returns a blank object with default values" - operationId: getRecurringInvoicesCreate + - 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 RecurringInvoice object" + description: "A blank Product object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -14221,11 +14352,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14233,56 +14364,43 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - /api/v1/recurring_invoices/bulk: + $ref: '#/components/responses/default' + + /api/v1/products/bulk: post: tags: - - Recurring Invoices - summary: "Bulk recurring invoice actions" - description: | - There are multiple actions that are available including: - - operationId: bulkRecurringInvoices + - products + summary: "Bulk product actions" + x-code-samples: + - lang: curl + label: Curl + source: | + curl -X GET 'https://invoicing.co/api/v1/products/bulk' \ + -H "Content-Type:application/json" \ + -d '{"action":"archive","ids":["id","id2"]}' \ + -H "X-API-TOKEN:company-token-test" \ + -H "X-Requested-With: XMLHttpRequest"; + - lang: php + label: PHP + source: | + $ninja = new InvoiceNinja("your_token"); + $product = $ninja->products->bulk("action", ["id","id2"]); + description: "Archive / Restore / Delete / Set tax id in bulk" + operationId: bulkProducts parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/index" requestBody: - description: "Bulk action details" + description: 'Bulk action array' required: true content: application/json: schema: - type: object - properties: - action: - type: string - 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. - ids: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']" - type: string - example: - action: start - ids: "['D2J234DFA','D2J234DFA','D2J234DFA']" + $ref: '#/components/schemas/ProductBulkAction' responses: 200: - description: "The RecurringInvoice response" + description: "The Product response" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -14293,11 +14411,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14305,38 +14423,44 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoices/{id}/{action}": - get: - deprecated: true + $ref: '#/components/responses/default' + + "/api/v1/products/{id}/upload": + post: tags: - - Recurring Invoices - 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" - operationId: actionRecurringInvoice + - products + 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" + - $ref: "#/components/parameters/client_include" - name: id in: path - description: "The RecurringInvoice Hashed ID" + description: "The Product Hashed ID" required: true schema: type: string format: string example: D2J234DFA - - name: action - in: path - description: "The action string to be performed" - required: true - schema: - type: string - format: string - example: clone_to_quote + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + _method: + type: string + example: POST + documents: + type: array + items: + format: binary responses: 200: - description: "Returns the RecurringInvoice object" + description: "Returns the Product object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -14347,11 +14471,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/RecurringInvoice" + $ref: "#/components/schemas/Product" 401: - $ref: "#/components/responses/401" + $ref: '#/components/responses/401' 403: - $ref: "#/components/responses/403" + $ref: '#/components/responses/403' 422: $ref: '#/components/responses/422' 429: @@ -14359,110 +14483,8 @@ paths: 5XX: description: 'Server error' default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoice/{invitation_key}/download": - get: - tags: - - Recurring Invoices - summary: "Download recurring invoice PDF" - description: "Downloads a specific invoice" - operationId: downloadRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: invitation_key - in: path - description: "The Recurring Invoice Invitation Key" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the recurring invoice pdf" - 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: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/recurring_invoices/{id}/upload": - post: - tags: - - Recurring Invoices - summary: "Add recurring invoice document" - description: "Handles the uploading of a document to a recurring_invoice" - operationId: uploadRecurringInvoice - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The RecurringInvoice Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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 - responses: - 200: - description: "Returns the RecurringInvoice 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/RecurringInvoice" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" + $ref: '#/components/responses/default' + components: headers: X-MINIMUM-CLIENT-VERSION: @@ -14557,43 +14579,43 @@ components: # - prev: null # - next: null responses: - 401: - description: 'Authentication error' + default: + description: 'Unexpected Error' content: application/json: schema: - $ref: '#/components/schemas/AuthenticationError' - 422: - description: 'Validation error' + $ref: '#/components/schemas/Error' + 429: + description: 'Rate Limit Exceeded' content: application/json: schema: - $ref: '#/components/schemas/ValidationError' - + $ref: '#/components/schemas/RateLimiterError' 400: description: 'Invalid user input' content: application/json: schema: $ref: '#/components/schemas/InvalidInputError' - 403: - description: 'Authorization error' + + 401: + description: 'Authentication error' content: application/json: schema: - $ref: '#/components/schemas/AuthorizationError' - 429: - description: 'Rate Limit Exceeded' + $ref: '#/components/schemas/AuthenticationError' + 403: + description: 'Authorization error' content: application/json: schema: - $ref: '#/components/schemas/RateLimiterError' - default: - description: 'Unexpected Error' + $ref: '#/components/schemas/AuthorizationError' + 422: + description: 'Validation error' content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/ValidationError' parameters: X-API-SECRET: name: X-API-SECRET @@ -15177,420 +15199,676 @@ components: type: string example: JSON type: object - User: + Meta: + properties: + pagination: + $ref: '#/components/schemas/Pagination' + Pagination: + type: object + properties: + total: + type: integer + description: 'The total number of items' + example: 1 + readOnly: true + count: + type: integer + description: 'The number of items per page' + example: 1 + readOnly: true + per_page: + type: integer + description: 'The number of items per page' + example: 1 + readOnly: true + current_page: + type: integer + description: 'The current page number' + example: 1 + readOnly: true + total_pages: + type: integer + description: 'The total number of pages' + example: 1 + readOnly: true + links: + type: object + description: 'The pagination links' + readOnly: true + Document: properties: id: - description: 'The hashed id of the user' + description: 'The document hashed id' type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the user' + example: AS3df3A + user_id: + description: 'The user hashed id' type: string - example: Brad - last_name: - description: 'The last name of the user' + example: '' + assigned_user_id: + description: 'The assigned user hashed id' type: string - example: Pitt - email: - description: 'The users email address' + example: '' + project_id: + description: 'The project associated with this document' type: string - example: brad@pitt.com - phone: - description: 'The users phone number' + example: '' + vendor_id: + description: 'The vendor associated with this documents' type: string - example: 555-1233-23232 - signature: - description: 'The users sign off signature' + example: '' + name: + description: 'The document name' type: string - example: 'Have a nice day!' - avatar: - description: 'The users avatar' + example: Beauty + url: + description: 'The document url' type: string - example: 'https://url.to.your/avatar.png' - accepted_terms_version: - description: 'The version of the invoice ninja terms that has been accepted by the user' + example: Beauty + preview: + description: 'The document preview url' type: string - example: 1.0.1 - readOnly: true - oauth_user_id: - description: 'The provider id of the oauth entity' + example: Beauty + type: + description: 'The document type' type: string - example: jkhasdf789as6f675sdf768sdfs - readOnly: true - oauth_provider_id: - description: 'The oauth entity id' + example: Beauty + disk: + description: 'The document disk' type: string - example: google - readOnly: true - language_id: - description: 'The language id of the user' + example: Beauty + hash: + description: 'The document hashed' type: string - example: 1 - verified_phone_number: - description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' + example: Beauty + is_deleted: + description: 'Flag to determine if the document is deleted' type: boolean example: true - readOnly: true - sms_verification_code: - description: 'The sms verification code for the user. Required to settings up 2FA' - type: string - example: '123456' - readOnly: true - oauth_user_token_expiry: - description: 'The expiry date of the oauth token' - type: string - example: '2022-10-10' - readOnly: true - has_password: - description: 'Boolean flag determining if the user has a password' + is_default: + description: 'Flag to determine if the document is a default doc' type: boolean example: true - readOnly: true - last_confirmed_email_address: - description: 'The last confirmed email address of the user' + created_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + updated_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + deleted_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + type: object + Error: + properties: + message: + description: 'Something terrible went wrong' type: string - example: 'bob@gmail.com' + example: 'Unexpected error' + code: + description: 'The HTTP error code, ie 5xx 4xx' + type: integer + example: '500' + type: object + InvoiceItem: + type: object + properties: + quantity: + type: number + example: 1 + description: 'The quantity of the product offered for this line item' + cost: + type: number + format: float + example: 10.00 + description: 'The cost of the product offered for this line item' + product_key: + type: string + example: 'Product key' + description: 'The product key of the product offered for this line item (Referred to as Product in the product tab)' + product_cost: + type: number + format: float + example: 10.00 + description: 'The cost of the product offered for this line item (Referred to as Cost in the product tab)' + notes: + type: string + example: 'Item notes' + description: 'The notes/description for the product offered for this line item' + discount: + type: number + format: float + example: 5.00 + description: 'The discount applied to the product offered for this line item' + is_amount_discount: + type: boolean + example: false + description: 'Indicates whether the discount applied to the product offered for this line item is a fixed amount or a percentage' + tax_name1: + type: string + example: 'GST' + description: 'The name of the first tax applied to the product offered for this line item' + tax_rate1: + type: number + format: float + example: 10.00 + description: 'The rate of the first tax applied to the product offered for this line item' + tax_name2: + type: string + example: 'VAT' + description: 'The name of the second tax applied to the product offered for this line item' + tax_rate2: + type: number + format: float + example: 5.00 + description: 'The rate of the second tax applied to the product offered for this line item' + tax_name3: + type: string + example: 'CA Sales Tax' + description: 'The name of the third tax applied to the product offered for this line item' + tax_rate3: + type: number + format: float + example: 3.00 + description: 'The rate of the third tax applied to the product offered for this line item' + sort_id: + type: string + example: '0' + description: 'Deprecated' + deprecated: true + line_total: + type: number + format: float + example: 10.00 + description: 'The total amount of the product offered for this line item' + readOnly: true + gross_line_total: + type: number + format: float + example: 15.00 + description: 'The total amount of the product offered for this line item before discounts' + readOnly: true + tax_amount: + type: number + format: float + example: 1.00 + description: 'The total amount of tax applied to the product offered for this line item' readOnly: true + date: + type: string + format: date-time + example: '2023-03-19T00:00:00Z' + description: 'Deprecated' + deprecated: true custom_value1: - description: 'A custom value' type: string example: 'Custom value 1' + description: 'The first custom value of the product offered for this line item' custom_value2: - description: 'A custom value' type: string - example: '$1000' + example: 'Custom value 2' + description: 'The second custom value of the product offered for this line item' custom_value3: - description: 'A custom value' type: string example: 'Custom value 3' + description: 'The third custom value of the product offered for this line item' custom_value4: - description: 'A custom value' type: string example: 'Custom value 4' + description: 'The fourth custom value of the product offered for this line item' + type_id: + type: string + example: '1' + description: '1 = product, 2 = service, 3 unpaid gateway fee, 4 paid gateway fee, 5 late fee, 6 expense' + default: '1' + tax_id: + type: string + example: '1' + default: '1' + description: 'The tax ID of the product: 1 product, 2 service, 3 digital, 4 shipping, 5 exempt, 5 reduced tax, 7 override, 8 zero rate, 9 reverse tax' + ExpenseCategory: + properties: + id: + description: 'The expense hashed id' + type: string + example: Opnel5aKBz + name: + description: 'The expense category name' + type: string + example: Accounting + user_id: + description: 'The user hashed id' + type: string + example: XS987sD is_deleted: - description: 'Boolean flag determining if the user has been deleted' + description: 'Flag determining whether the expense category has been deleted' type: boolean example: true - readOnly: true - google_2fa_secret: - description: 'The google 2fa secret for the user' - type: string - example: '123456' - readOnly: true - company_user: - $ref: '#/components/schemas/CompanyUserRef' + updated_at: + description: 'The updated at timestamp' + type: integer + example: '2' + created_at: + description: 'The created at timestamp' + type: integer + example: '2' type: object - UserRef: + Client: properties: id: - description: 'The hashed id of the user' + description: 'The unique identifier of the client' type: string example: Opnel5aKBz readOnly: true - first_name: - description: 'The first name of the user' - type: string - example: Brad - last_name: - description: 'The last name of the user' + contacts: + type: array + items: + $ref: '#/components/schemas/ClientContact' + user_id: + description: 'The unique identifier of the user who created the client' type: string - example: Pitt - email: - description: 'The users email address' + example: Ua6Rw4pVbS + readOnly: true + assigned_user_id: + description: 'The unique identifier of the user who has been assigned the client' type: string - example: brad@pitt.com - phone: - description: 'The users phone number' + example: Ua6Rw4pVbS + name: + description: 'The name of the client company or organization' type: string - example: 555-1233-23232 - signature: - description: 'The users sign off signature' + example: "Jim's Housekeeping" + website: + description: 'The website URL of the client company or organization' type: string - example: 'Have a nice day!' - avatar: - description: 'The users avatar' + example: 'https://www.jims-housekeeping.com' + private_notes: + description: 'Notes that are only visible to the user who created the client' type: string - example: 'https://url.to.your/avatar.png' - accepted_terms_version: - description: 'The version of the invoice ninja terms that has been accepted by the user' + example: 'Client prefers email communication over phone calls' + client_hash: + description: 'A unique hash value for the client' type: string - example: 1.0.1 + example: asdfkjhk342hjhbfdvmnfb1 readOnly: true - oauth_user_id: - description: 'The provider id of the oauth entity' + industry_id: + description: 'The unique identifier of the industry the client operates in' + type: number + example: '5' + size_id: + description: 'The unique identifier for the size category of the client company or organization' + type: number + example: '2' + address1: + description: "First line of the client's address" type: string - example: jkhasdf789as6f675sdf768sdfs - readOnly: true - oauth_provider_id: - description: 'The oauth entity id' + example: '123 Main St' + address2: + description: "Second line of the client's address, if needed" type: string - example: google - readOnly: true - language_id: - description: 'The language id of the user' + example: 'Apt 4B' + city: + description: 'The city the client is located in' type: string - example: 1 - verified_phone_number: - description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' - type: boolean - example: true - readOnly: true - sms_verification_code: - description: 'The sms verification code for the user. Required to settings up 2FA' + example: 'Beverly Hills' + state: + description: 'The state, province, or locality the client is located in' type: string - example: '123456' - readOnly: true - oauth_user_token_expiry: - description: 'The expiry date of the oauth token' + example: 'California' + postal_code: + description: 'The postal code or ZIP code of the client' type: string - example: '2022-10-10' - readOnly: true - has_password: - description: 'Boolean flag determining if the user has a password' - type: boolean - example: true - readOnly: true - last_confirmed_email_address: - description: 'The last confirmed email address of the user' + example: '90210' + phone: + description: "The client's phone number" type: string - example: 'bob@gmail.com' - readOnly: true + example: '555-3434-3434' + country_id: + description: "The unique identifier of the client's country" + type: number + format: integer + example: '1' custom_value1: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: 'Custom value 1' + example: 'Preferred contact: Email' custom_value2: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: '$1000' + example: 'Account manager: John Doe' custom_value3: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: 'Custom value 3' + example: 'VIP client: Yes' custom_value4: - description: 'A custom value' - type: string - example: 'Custom value 4' - is_deleted: - description: 'Boolean flag determining if the user has been deleted' - type: boolean - example: true - readOnly: true - google_2fa_secret: - description: 'The google 2fa secret for the user' + description: 'A custom field for storing additional information' type: string - example: '123456' - readOnly: true - type: object - Task: - properties: - id: - description: 'The hashed id of the task' + example: 'Annual contract value: $50,000' + vat_number: + description: "The client's VAT (Value Added Tax) number, if applicable" type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user who created the task' + example: 'VAT123456' + id_number: + description: 'A unique identification number for the client, such as a tax ID or business registration number' type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user of the task' + number: + description: 'A system-assigned unique number for the client, typically used for invoicing purposes' type: string - example: Opnel5aKBz - client_id: - description: 'The hashed if of the client' + example: 'CL-0001' + shipping_address1: + description: "First line of the client's shipping address" type: string - example: Opnel5aKBz - invoice_id: - description: 'The hashed id of the invoice associated with the task' + example: '5 Wallaby Way' + shipping_address2: + description: "Second line of the client's shipping address, if needed" type: string - example: Opnel5aKBz - project_id: - description: 'The hashed id of the project associated with the task' + example: 'Suite 5' + shipping_city: + description: "The city of the client's shipping address" type: string - example: Opnel5aKBz - number: - description: 'The number of the task' + example: 'Perth' + shipping_state: + description: "The state, province, or locality of the client's shipping address" type: string - example: TASK-123 - time_log: - description: 'An array of unix time stamps defining the start and end times of the task' + example: 'Western Australia' + shipping_postal_code: + description: "The postal code or ZIP code of the client's shipping address" type: string - example: '[[1,2],[3,4]]' - is_running: - description: 'Determines if the task is still running' - type: boolean - example: true + example: '6110' + shipping_country_id: + description: "The unique identifier of the country for the client's shipping address" + type: number + format: integer + example: '4' is_deleted: - description: 'Boolean flag determining if the task has been deleted' + description: 'A boolean value indicating whether the client has been deleted or not' type: boolean - example: true - task_status_id: - description: 'The hashed id of the task status' - type: string - example: Opnel5aKBz - description: - description: 'The task description' - type: string - example: 'A wonder task to work on' - duration: - description: 'The task duration in seconds' - type: integer - example: '3600' - task_status_order: - description: 'The order of the task' - type: integer - example: '4' - rate: - description: 'The task rate' + example: false + readOnly: true + balance: + description: 'The outstanding balance the client owes' type: number - example: 10.00 - custom_value1: - description: 'A custom value' - type: string - example: '2022-10-10' - custom_value2: - description: 'A custom value' - type: string - example: $1100 - custom_value3: - description: 'A custom value' - type: string - example: 'I need help' - custom_value4: - description: 'A custom value' - type: string - example: INV-3343 - is_date_based: - description: 'Boolean flag determining if the task is date based' - type: boolean - example: true - calculated_start_date: - description: 'The calculated start date of the task' - type: string - example: '2022-10-10' + format: float + example: '500.00' + readOnly: true + paid_to_date: + description: 'The total amount the client has paid to date' + type: number + format: float + example: '2000.00' + readOnly: true + credit_balance: + description: 'The available credit balance for the client to use on future purchases' + type: number + format: float + example: '100.00' + readOnly: true + last_login: + description: "The timestamp of the client's last login" + type: number + format: integer + example: '1628686031' readOnly: true - invoice_documents: - description: "Boolean flags which determines whether to include the task documents on the invoice" - type: boolean - example: true created_at: - description: Timestamp + description: 'The timestamp when the client was created' type: number format: integer - example: '1434342123' + example: '1617629031' readOnly: true updated_at: - description: Timestamp + description: 'The timestamp when the client was last updated' type: number format: integer - example: '1434342123' + example: '1628445631' readOnly: true - archived_at: - description: Timestamp + group_settings_id: + description: 'The group settings assigned to the client' + type: string + example: Opnel5aKBz + routing_id: + description: 'The routing address id for e-invoicing for this client' + type: string + example: Opnel5aKBz3489-dfkiu-2239-sdsd + is_tax_exempt: + description: 'Flag which defines if the client is exempt from taxes' + type: boolean + example: false + has_valid_vat_number: + description: 'Flag which defines if the client has a valid VAT number' + type: boolean + example: false + readOnly: true + payment_balance: + description: 'Defines the payment balance the client has on file (pre payments / over payments / unapplied amounts)' type: number - format: integer - example: '1434342123' + example: 100 readOnly: true + settings: + $ref: '#/components/schemas/ClientSettings' type: object - Document: + Quote: properties: id: - description: 'The document hashed id' + description: 'The unique hashed identifier for the quote' type: string - example: AS3df3A + example: Opnel5aKBz user_id: - description: 'The user hashed id' + description: 'The unique hashed identifier for the user who created the quote' type: string example: '' assigned_user_id: - description: 'The assigned user hashed id' + description: 'The unique hashed identifier for the user assigned to the quote' type: string example: '' - project_id: - description: 'The project associated with this document' + client_id: + description: 'The unique hashed identifier for the client associated with the quote' type: string example: '' - vendor_id: - description: 'The vendor associated with this documents' + status_id: + description: 'The status of the quote represented by a unique identifier' type: string example: '' - name: - description: 'The document name' + number: + description: 'The unique alpha-numeric quote number for the quote per company' type: string - example: Beauty - url: - description: 'The document url' + example: QUOTE_101 + po_number: + description: 'The purchase order number associated with the quote' type: string - example: Beauty - preview: - description: 'The document preview url' + example: PO-1234 + terms: + description: 'The terms and conditions for the quote' type: string - example: Beauty - type: - description: 'The document type' + example: 'These are some quote terms. Valid for 14 days.' + public_notes: + description: 'Publicly visible notes associated with the quote' type: string - example: Beauty - disk: - description: 'The document disk' + example: 'These are public notes which the client may see' + private_notes: + description: 'Privately visible notes associated with the quote, not disclosed to the client' type: string - example: Beauty - hash: - description: 'The document hashed' + example: 'These are private notes, not to be disclosed to the client' + footer: + description: 'The footer text of the quote' type: string - example: Beauty - is_deleted: - description: 'Flag to determine if the document is deleted' + example: 'The text goes in the footer of the quote' + custom_value1: + description: 'First custom value field for additional information' + type: string + example: 'A custom value' + custom_value2: + description: 'Second custom value field for additional information' + type: string + example: 'A custom value' + custom_value3: + description: 'Third custom value field for additional information' + type: string + example: 'A custom value' + custom_value4: + description: 'Fourth custom value field for additional information' + type: string + example: 'A custom value' + tax_name1: + description: 'The name of the first tax applied to the quote' + type: string + example: GST + tax_name2: + description: 'The name of the second tax applied to the quote' + type: string + example: VAT + tax_rate1: + description: 'The rate of the first tax applied to the quote' + type: number + format: float + example: 10.00 + tax_rate2: + description: 'The rate of the second tax applied to the quote' + type: number + format: float + example: 10.00 + tax_name3: + description: 'The name of the third tax applied to the quote' + type: string + example: '' + tax_rate3: + description: 'The rate of the third tax applied to the quote' + type: number + format: float + example: 10.00 + total_taxes: + description: 'The total amount of taxes for the quote' + type: number + format: float + example: 10.00 + line_items: + type: array + description: 'An array of objects which define the line items of the quote' + items: + $ref: '#/components/schemas/InvoiceItem' + amount: + description: 'The total amount of the quote before taxes and discounts' + type: number + format: float + example: 10.00 + balance: + description: 'The balance due for the quote after accounting for payments' + type: number + format: float + example: 10.00 + paid_to_date: + description: 'The total amount paid on the quote so far' + type: number + format: float + example: 10.00 + discount: + description: 'The discount amount or percentage applied to the quote' + type: number + format: float + example: 10.00 + partial: + description: 'The partial or deposit amount for the quote' + type: number + format: float + example: 10.00 + is_amount_discount: + description: 'Boolean flag indicating if the discount is a fixed amount or a percentage' type: boolean example: true - is_default: - description: 'Flag to determine if the document is a default doc' + is_deleted: + description: 'Boolean flag indicating if the quote has been deleted' + type: boolean + example: false + uses_inclusive_taxes: + description: 'Boolean flag indicating if the taxes used are inclusive or exclusive' type: boolean example: true - created_at: - description: Timestamp + date: + description: 'The date the quote was created' + type: string + format: date + example: '1994-07-30' + last_sent_date: + description: 'The last date the quote was sent to the client' + type: string + format: date + example: '1994-07-30' + next_send_date: + description: 'The next scheduled date for sending a reminder for the quote' + type: string + format: date + example: '1994-07-30' + partial_due_date: + description: 'The due date for the partial or deposit amount' + type: string + format: date + example: '1994-07-30' + due_date: + description: 'The due date for the total amount of the quote' + type: string + format: date + example: '1994-07-30' + settings: + $ref: '#/components/schemas/CompanySettings' + last_viewed: + description: 'The timestamp of the last time the quote was viewed' type: number format: integer - example: '134341234234' + example: 1434342123 updated_at: - description: Timestamp + description: 'The timestamp of the last update to the quote' type: number format: integer - example: '134341234234' - deleted_at: - description: Timestamp + example: 1434342123 + archived_at: + description: 'The timestamp of when the quote was archived' type: number format: integer - example: '134341234234' - type: object - ClientGatewayToken: - properties: - id: - description: 'The hashed id of the client gateway token' - type: string - example: Opnel5aKBz - client_id: - description: 'The hashed_id of the client' - type: string - example: '2' - token: - description: 'The payment token' - type: string - example: '2' - routing_number: - description: 'THe bank account routing number' - type: string - example: '2' - company_gateway_id: - description: 'The hashed id of the company gateway' - type: string - example: '2' - is_default: - description: 'Flag determining if the token is the default payment method' + example: 1434342123 + custom_surcharge1: + description: 'First custom surcharge amount for the quote' + type: number + format: float + example: 10.00 + custom_surcharge2: + description: 'Second custom surcharge amount for the quote' + type: number + format: float + example: 10.00 + custom_surcharge3: + description: 'Third custom surcharge amount for the quote' + type: number + format: float + example: 10.00 + custom_surcharge4: + description: 'Fourth custom surcharge amount for the quote' + type: number + format: float + example: 10.00 + custom_surcharge_tax1: + description: 'Boolean flag indicating if taxes are charged on the first custom surcharge amount' type: boolean - example: 'true' + example: true + custom_surcharge_tax2: + description: 'Boolean flag indicating if taxes are charged on the second custom surcharge amount' + type: boolean + example: true + custom_surcharge_tax3: + description: 'Boolean flag indicating if taxes are charged on the third custom surcharge amount' + type: boolean + example: true + custom_surcharge_tax4: + description: 'Boolean flag indicating if taxes are charged on the fourth custom surcharge amount' + type: boolean + example: true type: object - Invoice: + InvoiceRequest: + required: + - client_id properties: id: description: 'The invoice hashed id' @@ -15601,7 +15879,6 @@ components: description: 'The user hashed id' type: string example: Opnel5aKBz - readOnly: true assigned_user_id: description: 'The assigned user hashed id' type: string @@ -15614,6 +15891,7 @@ components: description: 'The invoice status variable' type: string example: '4' + readOnly: true number: description: 'The invoice number - is a unique alpha numeric number per invoice per company' type: string @@ -15686,6 +15964,7 @@ components: type: number format: float example: '10.00' + readOnly: true line_items: type: array description: 'An array of objects which define the line items of the invoice' @@ -15695,22 +15974,25 @@ components: type: array description: 'An array of objects which define the invitations of the invoice' items: - $ref: '#/components/schemas/InvoiceInvitation' + $ref: '#/components/schemas/InvoiceInvitationRequest' amount: description: 'The invoice amount' type: number format: float example: '10.00' + readOnly: true balance: description: 'The invoice balance' type: number format: float example: '10.00' + readOnly: true paid_to_date: description: 'The amount paid on the invoice to date' type: number format: float example: '10.00' + readOnly: true discount: description: 'The invoice discount, can be an amount or a percentage' type: number @@ -15729,6 +16011,7 @@ components: description: 'Defines if the invoice has been deleted' type: boolean example: true + readOnly: true uses_inclusive_taxes: description: 'Defines the type of taxes used as either inclusive or exclusive' type: boolean @@ -15743,11 +16026,13 @@ components: type: string format: date example: '1994-07-30' + readOnly: true next_send_date: description: 'The Next date for a reminder to be sent' type: string format: date example: '1994-07-30' + readOnly: true partial_due_date: description: 'The due date for the deposit/partial amount' type: string @@ -15763,16 +16048,19 @@ components: type: number format: integer example: '1434342123' + readOnly: true updated_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true archived_at: description: Timestamp type: number format: integer example: '1434342123' + readOnly: true custom_surcharge1: description: 'First Custom Surcharge' type: number @@ -15813,196 +16101,182 @@ components: description: 'The project associated with this invoice' type: string example: Opnel5aKBz - auto_bill_tries: - description: 'The number of times the invoice has attempted to be auto billed' - type: integer - example: '1' - readOnly: true - auto_bill_enabled: - description: 'Boolean flag determining if the invoice is set to auto bill' - type: boolean - example: true - subscription_id: - description: 'The subscription associated with this invoice' - type: string - example: Opnel5aKBz - type: object - FillableInvoice: + ProductRequest: + type: object properties: - assigned_user_id: - description: "The assigned user's hashed ID" - type: string - example: 'a1b2c3d4' - client_id: - description: "The client's hashed ID" - type: string - example: 'x1y2z3a4' - number: - description: "The unique alphanumeric invoice number for each invoice per company" - type: string - example: INV_101 - po_number: - description: "The purchase order number associated with the invoice" - type: string - example: 'PO12345' - terms: - description: "The terms and conditions for the invoice" + id: type: string - example: 'Net 30' - public_notes: - description: "Public notes visible to the client on the invoice" + description: 'The hashed product ID.' + example: eP01N + readOnly: true + assigned_user_id: type: string - example: 'Thank you for your business.' - private_notes: - description: "Private notes for internal use only" + description: 'The hashed ID of the user assigned to this product.' + example: pR0j3 + + project_id: type: string - example: 'Client is a slow payer.' - footer: - description: "The footer text displayed on the invoice" + description: 'The hashed ID of the project that this product is associated with.' + example: pR0j3 + + vendor_id: type: string - example: 'Authorized Signature' + description: 'The hashed ID of the vendor that this product is associated with.' + example: pR0j3 + custom_value1: - description: "First custom value for additional information" type: string - example: 'Project ABC' + description: 'Custom value field 1.' + example: 'Custom value 1' + custom_value2: - description: "Second custom value for additional information" type: string - example: 'Department XYZ' + description: 'Custom value field 2.' + example: 'Custom value 2' + custom_value3: - description: "Third custom value for additional information" type: string - example: 'Location 123' + description: 'Custom value field 3.' + example: 'Custom value 3' + custom_value4: - description: "Fourth custom value for additional information" type: string - example: 'Currency USD' - tax_name1: - description: "Name of the first tax applied to the invoice" + description: 'Custom value field 4.' + example: 'Custom value 4' + + product_key: type: string - example: 'VAT' - tax_name2: - description: "Name of the second tax applied to the invoice" + description: 'The product key.' + example: '1234' + + notes: type: string - example: 'GST' + description: 'Notes about the product.' + example: 'These are some notes about the product.' + + cost: + type: number + format: double + description: 'The cost of the product.' + example: 10.0 + + price: + type: number + format: double + description: 'The price of the product.' + example: 20.0 + + quantity: + type: number + format: double + description: 'The quantity of the product.' + example: 5.0 + + default: 1 + tax_name1: + type: string + description: 'The name of tax 1.' + example: 'Tax 1' + tax_rate1: - description: "Rate of the first tax applied to the invoice" type: number - example: 10.00 + format: double + description: 'The rate of tax 1.' + example: 10.0 + + tax_name2: + type: string + description: 'The name of tax 2.' + example: 'Tax 2' + tax_rate2: - description: "Rate of the second tax applied to the invoice" type: number - example: 5.00 + format: double + description: 'The rate of tax 2.' + example: 5.0 + tax_name3: - description: "Name of the third tax applied to the invoice" type: string - example: 'PST' + description: 'The name of tax 3.' + example: 'Tax 3' + tax_rate3: - description: "Rate of the third tax applied to the invoice" - type: number - example: 8.00 - line_items: - type: array - description: 'An array of objects which define the line items of the invoice' - items: - $ref: '#/components/schemas/InvoiceItem' - discount: - description: "The discount applied to the invoice" - type: number - example: 10.00 - partial: - description: "The partial amount applied to the invoice" type: number - example: 20.00 - is_amount_discount: - description: "Indicates whether the discount applied is a fixed amount or a percentage" - type: boolean - example: true - uses_inclusive_taxes: - description: "Indicates whether the tax rates applied to the invoice are inclusive or exclusive" + format: double + description: 'The rate of tax 3.' + example: 0.0 + + in_stock_quantity: + type: integer + format: int32 + description: | + The quantity of the product that is currently in stock. + + **note** this field is not mutable without passing an extra query parameter which will allow modification of this value. + + The query parameter ?update_in_stock_quantity=true **MUST** be passed if you wish to update this value manually. + + default: 0 + + stock_notification: type: boolean - example: true - date: - description: "The date the invoice was issued" - type: string - example: '1994-07-30' - partial_due_date: - description: "The due date for the partial payment" + description: Indicates whether stock notifications are enabled for this product + default: true + + stock_notification_threshold: + type: integer + format: int32 + description: The minimum quantity threshold for which stock notifications will be triggered + default: 0 + + max_quantity: + type: integer + format: int32 + description: The maximum quantity that can be ordered for this product + + product_image: type: string - example: '1994-08-15' - due_date: - description: "The due date for the invoice" + description: The URL of the product image + format: uri-reference + + tax_id: type: string - example: '1994-08-30' - custom_surcharge1: - description: "First custom surcharge applied to the invoice" - type: number - example: 10.00 - custom_surcharge2: - description: "Second custom surcharge applied to the invoice" - type: number - example: 15.00 - custom_surcharge3: - description: "Third custom surcharge applied to the invoice" - type: number - example: 5.00 - custom_surcharge4: - description: "Fourth custom surcharge applied to the invoice" - type: number - example: 20.00 - type: object - CompanyGateway: + default: '1' + + description: | + The tax category id for this product.' + + 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' + ``` + example: '1' + + InvoiceInvitationRequest: + required: + - client_contact_id properties: id: - description: 'The hashed id of the company gateway' + description: 'The entity invitation hashed id' type: string example: Opnel5aKBz - gateway_key: - description: 'The gateway key (hash)' + readOnly: true + client_contact_id: + description: 'The client contact hashed id' type: string - example: '2' - accepted_credit_cards: - description: 'Bitmask representation of cards' - type: integer - example: '32' - require_billing_address: - description: 'Determines if the the billing address is required prior to payment.' - type: boolean - example: true - require_shipping_address: - description: 'Determines if the the billing address is required prior to payment.' - type: boolean - example: true - config: - description: 'The configuration map for the gateway' - type: string - example: dfadsfdsafsafd - update_details: - description: 'Determines if the client details should be updated.' - type: boolean - example: true - fees_and_limits: - description: 'A mapped collection of the fees and limits for the configured gateway' - type: array - items: - $ref: '#/components/schemas/FeesAndLimits' - type: object - - - InvoiceInvitation: - properties: - id: - description: 'The entity invitation hashed id' - type: string - example: Opnel5aKBz - readOnly: true - client_contact_id: - description: 'The client contact hashed id' - type: string - example: Opnel5aKBz - key: - description: 'The invitation key' + example: Opnel5aKBz + key: + description: 'The invitation key' type: string example: Opnel5aKBz4343343566236gvbb readOnly: true @@ -16048,354 +16322,112 @@ components: type: string readOnly: true - Account: + BankIntegration: properties: id: - description: 'The account hashed id' + description: 'The bank integration hashed id' type: string example: AS3df3A - account_sms_verified: - description: 'Boolean flag if the account has been verified by sms' + user_id: + description: 'The user hashed id' type: string - example: true + example: AS3df3A + provider_bank_name: + description: 'The providers bank name' + type: string + example: 'Chase Bank' + bank_account_id: + description: 'The bank account id' + type: integer + example: '1233434' + bank_account_name: + description: 'The name of the account' + type: string + example: 'My Checking Acc' + bank_account_number: + description: 'The account number' + type: string + example: '111 234 2332' + bank_account_status: + description: 'The status of the bank account' + type: string + example: ACTIVE + bank_account_type: + description: 'The type of account' + type: string + example: CREDITCARD + balance: + description: 'The current bank balance if available' + type: number + example: '1000000' + currency: + description: 'iso_3166_3 code' + type: string + example: USD type: object - ExpenseCategory: + CompanyToken: properties: - id: - description: 'The expense hashed id' - type: string - example: Opnel5aKBz name: - description: 'The expense category name' + description: 'The token name' type: string - example: Accounting - user_id: - description: 'The user hashed id' + example: 'Token Name' + token: + description: 'The token value' type: string - example: XS987sD - is_deleted: - description: 'Flag determining whether the expense category has been deleted' + example: AS3df3jUUH765fhfd9KJuidj3JShjA + is_system: + description: 'Determines whether the token is created by the system rather than a user' type: boolean - example: true - updated_at: - description: 'The updated at timestamp' - type: integer - example: '2' - created_at: - description: 'The created at timestamp' - type: integer - example: '2' + example: 'true' type: object - Subscription: + PurchaseOrder: properties: id: - description: Unique identifier for the subscription + description: 'The unique hashed identifier for the purchase order' type: string example: Opnel5aKBz user_id: - description: Unique identifier for the user associated with the subscription + description: 'The unique hashed identifier for the user who created the purchase order' type: string - example: Ua6Rw4pVbS - product_id: - description: Unique identifier for the product associated with the subscription + example: '' + assigned_user_id: + description: 'The unique hashed identifier for the user assigned to the purchase order' type: string - example: Pr5Ft7yBmC - recurring_invoice_id: - description: Unique identifier for the recurring invoice associated with the subscription + example: '' + vendor_id: + description: 'The unique hashed identifier for the vendor associated with the purchase order' type: string - example: Ri2Yt8zJkP - is_recurring: - description: Indicates whether the subscription is recurring - type: boolean - example: 'true' - frequency_id: - description: 'integer const representation of the frequency' + example: '' + status_id: + description: 'The status of the purchase order represented by a unique identifier' type: string - example: '1' - auto_bill: - description: 'enum setting' + example: '' + number: + description: 'The unique alpha-numeric purchase order number per company' type: string - example: always - promo_code: - description: Promotional code applied to the subscription + example: PO_101 + quote_number: + description: 'The quote number associated with this purchase order' type: string - example: PROMOCODE4U - promo_discount: - description: Discount percentage or amount applied to the subscription - type: number - example: 10 - is_amount_discount: - description: Indicates whether the discount is a fixed amount - type: boolean - example: 'true' - allow_cancellation: - description: Indicates whether the subscription can be cancelled - type: boolean - example: 'true' - per_seat_enabled: - description: Indicates whether the subscription pricing is per seat - type: boolean - example: 'true' - currency_id: - description: Unique identifier for the currency used in the subscription - type: integer - example: '1' - max_seats_limit: - description: Maximum number of seats allowed for the subscription - type: integer - example: '100' - trial_enabled: - description: Indicates whether the subscription has a trial period - type: boolean - example: 'true' - trial_duration: - description: Duration of the trial period in days - type: integer - example: '14' - allow_query_overrides: - description: Indicates whether query overrides are allowed for the subscription - type: boolean - example: 'true' - allow_plan_changes: - description: Indicates whether plan changes are allowed for the subscription - type: boolean - example: 'true' - refund_period: - description: Number of days within which refunds can be requested - type: integer - example: '30' - webhook_configuration: - description: Webhook configuration for the subscription + example: QUOTE_101 + terms: + description: 'The terms and conditions for the purchase order' type: string - example: 'expand reference for this' - is_deleted: - description: Indicates whether the subscription has been deleted - type: boolean - example: 'false' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - BulkAction: - type: array - items: - type: integer - example: '[0,1,2,3,]' - SystemLog: - properties: - id: - description: 'The account hashed id' + example: 'These are some purchase order terms. Valid for 14 days.' + public_notes: + description: 'Publicly visible notes associated with the purchase order' type: string - example: AS3df3A - user_id: - description: 'The user_id hashed id' + example: 'These are public notes which the vendor may see' + private_notes: + description: 'Privately visible notes associated with the purchase order, not disclosed to the vendor' type: string - example: AS3df3A - client_id: - description: 'The client_id hashed id' + example: 'These are private notes, not to be disclosed to the vendor' + footer: + description: 'The footer text of the purchase order' type: string - example: AS3df3A - event_id: - description: 'The Log Type ID' - type: integer - example: 1 - category_id: - description: 'The Category Type ID' - type: integer - example: 1 - type_id: - description: 'The Type Type ID' - type: integer - example: 1 - log: - description: 'The json object of the error' - type: object - example: '{''key'':''value''}' - updated_at: - description: Timestamp - type: string - example: '2' - created_at: - description: Timestamp - type: string - example: '2' - type: object - InvoiceItem: - type: object - properties: - quantity: - type: number - example: 1 - description: 'The quantity of the product offered for this line item' - cost: - type: number - format: float - example: 10.00 - description: 'The cost of the product offered for this line item' - product_key: - type: string - example: 'Product key' - description: 'The product key of the product offered for this line item (Referred to as Product in the product tab)' - product_cost: - type: number - format: float - example: 10.00 - description: 'The cost of the product offered for this line item (Referred to as Cost in the product tab)' - notes: - type: string - example: 'Item notes' - description: 'The notes/description for the product offered for this line item' - discount: - type: number - format: float - example: 5.00 - description: 'The discount applied to the product offered for this line item' - is_amount_discount: - type: boolean - example: false - description: 'Indicates whether the discount applied to the product offered for this line item is a fixed amount or a percentage' - tax_name1: - type: string - example: 'GST' - description: 'The name of the first tax applied to the product offered for this line item' - tax_rate1: - type: number - format: float - example: 10.00 - description: 'The rate of the first tax applied to the product offered for this line item' - tax_name2: - type: string - example: 'VAT' - description: 'The name of the second tax applied to the product offered for this line item' - tax_rate2: - type: number - format: float - example: 5.00 - description: 'The rate of the second tax applied to the product offered for this line item' - tax_name3: - type: string - example: 'CA Sales Tax' - description: 'The name of the third tax applied to the product offered for this line item' - tax_rate3: - type: number - format: float - example: 3.00 - description: 'The rate of the third tax applied to the product offered for this line item' - sort_id: - type: string - example: '0' - description: 'Deprecated' - deprecated: true - line_total: - type: number - format: float - example: 10.00 - description: 'The total amount of the product offered for this line item' - readOnly: true - gross_line_total: - type: number - format: float - example: 15.00 - description: 'The total amount of the product offered for this line item before discounts' - readOnly: true - tax_amount: - type: number - format: float - example: 1.00 - description: 'The total amount of tax applied to the product offered for this line item' - readOnly: true - date: - type: string - format: date-time - example: '2023-03-19T00:00:00Z' - description: 'Deprecated' - deprecated: true - custom_value1: - type: string - example: 'Custom value 1' - description: 'The first custom value of the product offered for this line item' - custom_value2: - type: string - example: 'Custom value 2' - description: 'The second custom value of the product offered for this line item' - custom_value3: - type: string - example: 'Custom value 3' - description: 'The third custom value of the product offered for this line item' - custom_value4: - type: string - example: 'Custom value 4' - description: 'The fourth custom value of the product offered for this line item' - type_id: - type: string - example: '1' - description: '1 = product, 2 = service, 3 unpaid gateway fee, 4 paid gateway fee, 5 late fee, 6 expense' - default: '1' - tax_id: - type: string - example: '1' - default: '1' - description: 'The tax ID of the product: 1 product, 2 service, 3 digital, 4 shipping, 5 exempt, 5 reduced tax, 7 override, 8 zero rate, 9 reverse tax' - PurchaseOrder: - properties: - id: - description: 'The unique hashed identifier for the purchase order' - type: string - example: Opnel5aKBz - user_id: - description: 'The unique hashed identifier for the user who created the purchase order' - type: string - example: '' - assigned_user_id: - description: 'The unique hashed identifier for the user assigned to the purchase order' - type: string - example: '' - vendor_id: - description: 'The unique hashed identifier for the vendor associated with the purchase order' - type: string - example: '' - status_id: - description: 'The status of the purchase order represented by a unique identifier' - type: string - example: '' - number: - description: 'The unique alpha-numeric purchase order number per company' - type: string - example: PO_101 - quote_number: - description: 'The quote number associated with this purchase order' - type: string - example: QUOTE_101 - terms: - description: 'The terms and conditions for the purchase order' - type: string - example: 'These are some purchase order terms. Valid for 14 days.' - public_notes: - description: 'Publicly visible notes associated with the purchase order' - type: string - example: 'These are public notes which the vendor may see' - private_notes: - description: 'Privately visible notes associated with the purchase order, not disclosed to the vendor' - type: string - example: 'These are private notes, not to be disclosed to the vendor' - footer: - description: 'The footer text of the purchase order' - type: string - example: 'The text goes in the footer of the purchase order' - custom_value1: - description: 'First custom value field for additional information' + example: 'The text goes in the footer of the purchase order' + custom_value1: + description: 'First custom value field for additional information' type: string example: 'A custom value' custom_value2: @@ -16565,1237 +16597,547 @@ components: type: object - CompanyUser: + InvoiceInvitation: properties: - permissions: - description: 'The user permissionsfor this company in a comma separated list' + id: + description: 'The entity invitation hashed id' type: string - example: 'create_invoice,create_client,view_client' - settings: - description: 'Settings that are used for the flutter applications to store user preferences / metadata' - type: object + example: Opnel5aKBz readOnly: true - react_settings: - description: 'Dedicated settings object for the react web application' - type: object + client_contact_id: + description: 'The client contact hashed id' + type: string + example: Opnel5aKBz + key: + description: 'The invitation key' + type: string + example: Opnel5aKBz4343343566236gvbb readOnly: true - is_owner: - description: 'Determines whether the user owns this company' - type: boolean - example: true + link: + description: 'The invitation link' + type: string + example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' readOnly: true - is_admin: - description: 'Determines whether the user is the admin of this company' - type: boolean - example: true + sent_date: + description: 'The invitation sent date' + type: string + format: date-time readOnly: true - is_locked: - description: 'Determines whether the users access to this company has been locked' - type: boolean - example: true + viewed_date: + description: 'The invitation viewed date' + type: string + format: date-time readOnly: true - updated_at: - description: 'The last time the record was modified, format Unix Timestamp' - type: integer - example: '1231232312321' - deleted_at: - description: 'Timestamp when the user was archived, format Unix Timestamp' - type: integer - example: '12312312321' - account: - $ref: '#/components/schemas/Account' - company: - $ref: '#/components/schemas/Company' - user: - $ref: '#/components/schemas/UserRef' - token: - $ref: '#/components/schemas/CompanyToken' - type: object - CompanyUserRef: - properties: - permissions: - description: 'The user permissionsfor this company in a comma separated list' + opened_date: + description: 'The invitation opened date' type: string - example: 'create_invoice,create_client,view_client' - settings: - description: 'Settings that are used for the flutter applications to store user preferences / metadata' - type: object + format: date-time readOnly: true - react_settings: - description: 'Dedicated settings object for the react web application' - type: object + updated_at: + description: 'Timestamp' + type: number + format: integer + example: '1434342123' readOnly: true - is_owner: - description: 'Determines whether the user owns this company' - type: boolean - example: true + archived_at: + description: 'Timestamp' + type: number + format: integer + example: '1434342123' readOnly: true - is_admin: - description: 'Determines whether the user is the admin of this company' - type: boolean - example: true + email_error: + description: 'The email error' + type: string + example: 'The email error' readOnly: true - is_locked: - description: 'Determines whether the users access to this company has been locked' + email_status: + description: 'The email status' + type: string + readOnly: true + + VendorContact: + properties: + id: + description: 'The hashed id of the vendor contact' + type: string + example: Opnel5aKBz + readOnly: true + user_id: + description: 'The hashed id of the user id' + type: string + example: Opnel5aKBz + readOnly: true + vendor_id: + description: 'The hashed id of the vendor' + type: string + example: Opnel5aKBz + readOnly: true + first_name: + description: 'The first name of the contact' + type: string + example: Harry + last_name: + description: 'The last name of the contact' + type: string + example: Windsor + contact_key: + description: 'A unique identifier for the contact' + type: string + example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a + readOnly: true + confirmation_code: + description: 'The confirmation code used to authenticate the contacts email address' + type: string + example: 333-sdjkh34gbasd + readOnly: true + phone: + description: 'The contacts phone number' + type: string + example: 555-123-1234 + custom_value1: + description: 'A custom value' + type: string + example: '2022-10-10' + custom_value2: + description: 'A custom value' + type: string + example: $1000 + custom_value3: + description: 'A custom value' + type: string + example: '' + custom_value4: + description: 'A custom value' + type: string + example: '' + email: + description: 'The contact email address' + type: string + example: harry@windsor.com + email_verified_at: + description: 'The date which the contact confirmed their email' + type: number + format: integer + example: '134341234234' + readOnly: true + password: + description: 'The hashed password of the contact' + type: string + example: '*****' + is_primary: + description: 'Boolean flag determining if the contact is the primary contact for the vendor' type: boolean example: true + created_at: + description: Timestamp + type: number + format: integer + example: '134341234234' readOnly: true updated_at: - description: 'The last time the record was modified, format Unix Timestamp' - type: integer - example: '1231232312321' + description: Timestamp + type: number + format: integer + example: '134341234234' + readOnly: true deleted_at: - description: 'Timestamp when the user was archived, format Unix Timestamp' - type: integer - example: '12312312321' - account: - $ref: '#/components/schemas/Account' - company: - $ref: '#/components/schemas/Company' - user: - $ref: '#/components/schemas/UserRef' + description: Timestamp + type: number + format: integer + example: '134341234234' + readOnly: true + type: object + ClientGatewayToken: + properties: + id: + description: 'The hashed id of the client gateway token' + type: string + example: Opnel5aKBz + client_id: + description: 'The hashed_id of the client' + type: string + example: '2' token: - $ref: '#/components/schemas/CompanyToken' + description: 'The payment token' + type: string + example: '2' + routing_number: + description: 'THe bank account routing number' + type: string + example: '2' + company_gateway_id: + description: 'The hashed id of the company gateway' + type: string + example: '2' + is_default: + description: 'Flag determining if the token is the default payment method' + type: boolean + example: 'true' type: object - CompanySettings: - required: - - currency_id - properties: - currency_id: - description: "The default currency id" - type: string - example: true - timezone_id: - description: "The timezone id" - type: string - example: "15" - date_format_id: - description: "The date format id" - type: string - example: "15" - military_time: - description: "Toggles 12/24 hour time" - type: boolean - example: true - language_id: - description: "The language id" - type: string - example: "1" - show_currency_code: - description: "Toggles whether the currency symbol or code is shown" - type: boolean - example: true - payment_terms: - description: "-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days" - type: integer - example: "1" - company_gateway_ids: - description: "A commad separate list of available gateways" - type: string - example: "1,2,3,4" - custom_value1: - description: "A Custom Label" - type: string - example: "Custom Label" - custom_value2: - description: "A Custom Label" - type: string - example: "Custom Label" - custom_value3: - description: "A Custom Label" - type: string - example: "Custom Label" - custom_value4: - description: "A Custom Label" - type: string - example: "Custom Label" - default_task_rate: - description: "The default task rate" - type: number - format: float - example: "10.00" - send_reminders: - description: "Toggles whether reminders are sent" - type: boolean - example: true - enable_client_portal_tasks: - description: "Show/hide the tasks panel in the client portal" - type: boolean - example: true - email_style: - description: "options include plain,light,dark,custom" - type: string - example: light - reply_to_email: - description: "The reply to email address" - type: string - example: email@gmail.com - bcc_email: - description: "A comma separate list of BCC emails" - type: string - example: "email@gmail.com, contact@gmail.com" - pdf_email_attachment: - description: "Toggles whether to attach PDF as attachment" - type: boolean - example: true - ubl_email_attachment: - description: "Toggles whether to attach UBL as attachment" - type: boolean - example: true - email_style_custom: - description: "The custom template" - type: string - example: "" - counter_number_applied: - description: "enum when the invoice number counter is set, ie when_saved, when_sent, when_paid" - type: string - example: when_sent - quote_number_applied: - description: "enum when the quote number counter is set, ie when_saved, when_sent" - type: string - example: when_sent - custom_message_dashboard: - description: "A custom message which is displayed on the dashboard" - type: string - example: "Please pay invoices immediately" - custom_message_unpaid_invoice: - description: "A custom message which is displayed in the client portal when a client is viewing a unpaid invoice." - type: string - example: "Please pay invoices immediately" - custom_message_paid_invoice: - description: "A custom message which is displayed in the client portal when a client is viewing a paid invoice." - type: string - example: "Thanks for paying this invoice!" - custom_message_unapproved_quote: - description: "A custom message which is displayed in the client portal when a client is viewing a unapproved quote." - type: string - example: "Please approve quote" - lock_invoices: - description: "Toggles whether invoices are locked once sent and cannot be modified further" - type: boolean - example: true - auto_archive_invoice: - description: "Toggles whether a invoice is archived immediately following payment" - type: boolean - example: true - auto_archive_quote: - description: "Toggles whether a quote is archived after being converted to a invoice" - type: boolean - example: true - auto_convert_quote: - description: "Toggles whether a quote is converted to a invoice when approved" - type: boolean - example: true - inclusive_taxes: - description: "Boolean flag determining whether inclusive or exclusive taxes are used" - type: boolean - example: true - translations: - description: "JSON payload of customized translations" - type: object - example: "" - task_number_pattern: - description: "Allows customisation of the task number pattern" - type: string - example: "{$year}-{$counter}" - task_number_counter: - description: "The incrementing counter for tasks" - type: integer - example: "1" - reminder_send_time: - description: "Time from UTC +0 when the email will be sent to the client" - type: integer - example: "32400" - expense_number_pattern: - description: "Allows customisation of the expense number pattern" - type: string - example: "{$year}-{$counter}" - expense_number_counter: - description: "The incrementing counter for expenses" - type: integer - example: "1" - vendor_number_pattern: - description: "Allows customisation of the vendor number pattern" - type: string - example: "{$year}-{$counter}" - vendor_number_counter: - description: "The incrementing counter for vendors" - type: integer - example: "1" - ticket_number_pattern: - description: "Allows customisation of the ticket number pattern" - type: string - example: "{$year}-{$counter}" - ticket_number_counter: - description: "The incrementing counter for tickets" - type: integer - example: "1" - payment_number_pattern: - description: "Allows customisation of the payment number pattern" - type: string - example: "{$year}-{$counter}" - payment_number_counter: - description: "The incrementing counter for payments" - type: integer - example: "1" - invoice_number_pattern: - description: "Allows customisation of the invoice number pattern" - type: string - example: "{$year}-{$counter}" - invoice_number_counter: - description: "The incrementing counter for invoices" - type: integer - example: "1" - quote_number_pattern: - description: "Allows customisation of the quote number pattern" - type: string - example: "{$year}-{$counter}" - quote_number_counter: - description: "The incrementing counter for quotes" - type: integer - example: "1" - client_number_pattern: - description: "Allows customisation of the client number pattern" - type: string - example: "{$year}-{$counter}" - client_number_counter: - description: "The incrementing counter for clients" - type: integer - example: "1" - credit_number_pattern: - description: "Allows customisation of the credit number pattern" - type: string - example: "{$year}-{$counter}" - credit_number_counter: - description: "The incrementing counter for credits" - type: integer - example: "1" - recurring_invoice_number_prefix: - description: "This string is prepended to the recurring invoice number" - type: string - example: R - reset_counter_frequency_id: - description: "CONSTANT which is used to apply the frequency which the counters are reset" - type: integer - example: "1" - reset_counter_date: - description: "The explicit date which is used to reset counters" - type: string - example: "2019-01-01" - counter_padding: - description: "Pads the counter with leading zeros" - type: integer - example: "1" - shared_invoice_quote_counter: - description: "Flags whether to share the counter for invoices and quotes" - type: boolean - example: true - update_products: - description: "Determines if client fields are updated from third party APIs" - type: boolean - example: true - convert_products: - description: "" - type: boolean - example: true - fill_products: - description: "Automatically fill products based on product_key" - type: boolean - example: true - invoice_terms: - description: "The default invoice terms" - type: string - example: "Invoice Terms are..." - quote_terms: - description: "The default quote terms" - type: string - example: "Quote Terms are..." - invoice_taxes: - description: "Taxes can be applied to the invoice" - type: number - example: "1" - invoice_design_id: - description: "The default design id (invoice, quote etc)" - type: string - example: "1" - quote_design_id: - description: "The default design id (invoice, quote etc)" - type: string - example: "1" - invoice_footer: - description: "The default invoice footer" - type: string - example: "1" - invoice_labels: - description: "JSON string of invoice labels" - type: string - example: "1" - tax_rate1: - description: "The tax rate (float)" - type: number - example: "10" - tax_name1: - description: "The tax name" - type: string - example: GST - tax_rate2: - description: "The tax rate (float)" - type: number - example: "10" - tax_name2: - description: "The tax name" - type: string - example: GST - tax_rate3: - description: "The tax rate (float)" - type: number - example: "10" - tax_name3: - description: "The tax name" - type: string - example: GST - payment_type_id: - description: "The default payment type id" - type: string - example: "1" - custom_fields: - description: "JSON string of custom fields" - type: string - example: "{}" - email_footer: - description: "The default email footer" - type: string - example: "A default email footer" - email_sending_method: - description: "The email driver to use to send email, options include default, gmail, client_postmark, client_mailgun, client_brevo, office365" - type: string - example: default - gmail_sending_user_id: - description: "The hashed_id of the user account to send email from" - type: string - example: F76sd34D - email_subject_invoice: - description: "" - type: string - example: "Your Invoice Subject" - email_subject_quote: - description: "" - type: string - example: "Your Quote Subject" - email_subject_payment: - description: "" - type: string - example: "Your Payment Subject" - email_template_invoice: - description: "The full template for invoice emails" - type: string - example: "" - email_template_quote: - description: "The full template for quote emails" - type: string - example: "" - email_template_payment: - description: "The full template for payment emails" - type: string - example: "" - email_subject_reminder1: - description: "Email subject for Reminder" - type: string - example: "" - email_subject_reminder2: - description: "Email subject for Reminder" - type: string - example: "" - email_subject_reminder3: - description: "Email subject for Reminder" - type: string - example: "" - email_subject_reminder_endless: - description: "Email subject for endless reminders" - type: string - example: "" - email_template_reminder1: - description: "The full template for Reminder 1" - type: string - example: "" - email_template_reminder2: - description: "The full template for Reminder 2" - type: string - example: "" - email_template_reminder3: - description: "The full template for Reminder 3" - type: string - example: "" - email_template_reminder_endless: - description: "The full template for enless reminders" - type: string - example: "" - enable_portal_password: - description: "Toggles whether a password is required to log into the client portal" - type: boolean - example: true - show_accept_invoice_terms: - description: "Toggles whether the terms dialogue is shown to the client" - type: boolean - example: true - show_accept_quote_terms: - description: "Toggles whether the terms dialogue is shown to the client" - type: boolean - example: true - require_invoice_signature: - description: "Toggles whether a invoice signature is required" - type: boolean - example: true - require_quote_signature: - description: "Toggles whether a quote signature is required" - type: boolean - example: true - name: - description: "The company name" - type: string - example: "Acme Co" - company_logo: - description: "The company logo file" - type: object - example: logo.png - website: - description: "The company website URL" - type: string - example: www.acme.com - address1: - description: "The company address line 1" - type: string - example: "Suite 888" - address2: - description: "The company address line 2" - type: string - example: "5 Jimbo Way" - city: - description: "The company city" - type: string - example: Sydney - state: - description: "The company state" - type: string - example: Florisa - postal_code: - description: "The company zip/postal code" - type: string - example: "90210" - phone: - description: "The company phone" - type: string - example: 555-213-3948 - email: - description: "The company email" - type: string - example: joe@acme.co - country_id: - description: "The country ID" - type: string - example: "1" - vat_number: - description: "The company VAT/TAX ID number" - type: string - example: "32 120 377 720" - page_size: - description: "The default page size" - type: string - example: A4 - font_size: - description: "The font size" - type: number - example: "9" - primary_font: - description: "The primary font" - type: string - example: roboto - secondary_font: - description: "The secondary font" - type: string - example: roboto - hide_paid_to_date: - description: "Flags whether to hide the paid to date field" - type: boolean - example: false - embed_documents: - description: "Toggled whether to embed documents in the PDF" - type: boolean - example: false - all_pages_header: - description: "The header for the PDF" - type: boolean - example: false - all_pages_footer: - description: "The footer for the PDF" - type: boolean - example: false - document_email_attachment: - description: "Toggles whether to attach documents in the email" - type: boolean - example: false - enable_client_portal_password: - description: "Toggles password protection of the client portal" - type: boolean - example: false - enable_email_markup: - description: "Toggles the use of markdown in emails" - type: boolean - example: false - enable_client_portal_dashboard: - description: "Toggles whether the client dashboard is shown in the client portal" - type: boolean - example: false - enable_client_portal: - description: "Toggles whether the entire client portal is displayed to the client, or only the context" - type: boolean - example: false - email_template_statement: - description: "The body of the email for statements" - type: string - example: "template matter" - email_subject_statement: - description: "The subject of the email for statements" - type: string - example: "subject matter" - signature_on_pdf: - description: "Toggles whether the signature (if available) is displayed on the PDF" - type: boolean - example: false - quote_footer: - description: "The default quote footer" - type: string - example: "the quote footer" - email_subject_custom1: - description: "Custom reminder template subject" - type: string - example: "Custom Subject 1" - email_subject_custom2: - description: "Custom reminder template subject" - type: string - example: "Custom Subject 2" - email_subject_custom3: - description: "Custom reminder template subject" - type: string - example: "Custom Subject 3" - email_template_custom1: - description: "Custom reminder template body" - type: string - example: "" - email_template_custom2: - description: "Custom reminder template body" - type: string - example: "" - email_template_custom3: - description: "Custom reminder template body" - type: string - example: "" - enable_reminder1: - description: "Toggles whether this reminder is enabled" - type: boolean - example: false - enable_reminder2: - description: "Toggles whether this reminder is enabled" - type: boolean - example: false - enable_reminder3: - description: "Toggles whether this reminder is enabled" - type: boolean - example: false - num_days_reminder1: - description: "The Reminder interval" - type: number - example: "9" - num_days_reminder2: - description: "The Reminder interval" - type: number - example: "9" - num_days_reminder3: - description: "The Reminder interval" - type: number - example: "9" - schedule_reminder1: - description: "(enum: after_invoice_date, before_due_date, after_due_date)" - type: string - example: after_invoice_date - schedule_reminder2: - description: "(enum: after_invoice_date, before_due_date, after_due_date)" - type: string - example: after_invoice_date - schedule_reminder3: - description: "(enum: after_invoice_date, before_due_date, after_due_date)" - type: string - example: after_invoice_date - late_fee_amount1: - description: "The late fee amount for reminder 1" - type: number - example: 10 - late_fee_amount2: - description: "The late fee amount for reminder 2" - type: number - example: 20 - late_fee_amount3: - description: "The late fee amount for reminder 2" - type: number - example: 100 - endless_reminder_frequency_id: - description: "The frequency id of the endless reminder" - type: string - example: "1" - client_online_payment_notification: - description: "Determines if a client should receive the notification for a online payment" - type: boolean - example: false - client_manual_payment_notification: - description: "Determines if a client should receive the notification for a manually entered payment" - type: boolean - example: false - enable_e_invoice: - description: "Determines if e-invoicing is enabled" - type: boolean - example: false - default_expense_payment_type_id: - description: "The default payment type for expenses" - type: string - example: "0" - e_invoice_type: - description: "The e-invoice type" - type: string - example: "EN16931" - mailgun_endpoint: - description: "The mailgun endpoint - used to determine whether US or EU endpoints are used" - type: string - example: "api.mailgun.net or api.eu.mailgun.net" - client_initiated_payments: - description: "Determines if clients can initiate payments directly from the client portal" - type: boolean - example: false - client_initiated_payments_minimum: - description: "The minimum amount a client can pay" - type: number - example: 10 - sync_invoice_quote_columns: - description: "Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns" - type: boolean - example: false - show_task_item_description: - description: "Determines if the task item description is shown on the invoice" - type: boolean - example: false - allow_billable_task_items: - description: "Determines if task items can be marked as billable" - type: boolean - example: false - accept_client_input_quote_approval: - description: "Determines if clients can approve quotes and also pass through a PO Number reference" - type: boolean - example: false - custom_sending_email: - description: "When using Mailgun or Postmark, the FROM email address can be customized using this setting." - type: string - example: "bob@gmail.com" - show_paid_stamp: - description: "Determines if the PAID stamp is shown on the invoice" - type: boolean - example: false - show_shipping_address: - description: "Determines if the shipping address is shown on the invoice" - type: boolean - example: false - company_logo_size: - description: "The size of the company logo on the PDF - percentage value between 0 and 100" - type: number - example: 100 - show_email_footer: - description: "Determines if the email footer is shown on emails" - type: boolean - example: false - email_alignment: - description: "The alignment of the email body text, options include left / center / right" - type: string - example: "left" - auto_bill_standard_invoices: - description: "Determines if standard invoices are automatically billed when they are created or due" - type: boolean - example: false - postmark_secret: - description: "The Postmark secret API key" - type: string - example: "123456" - mailgun_secret: - description: "The Mailgun secret API key" - type: string - example: "123456" - mailgun_domain: - description: "The Mailgun domain" - type: string - example: "sandbox123456.mailgun.org" - send_email_on_mark_paid: - description: "Determines if an email is sent when an invoice is marked as paid" - type: boolean - example: false - vendor_portal_enable_uploads: - description: "Determines if vendors can upload files to the portal" - type: boolean - example: false - besr_id: - description: "The BESR ID" - type: string - example: "123456" - qr_iban: - description: "The IBAN for the QR code" - type: string - example: "CH123456" - email_subject_purchase_order: - description: "The email subject for purchase orders" - type: string - example: "Purchase Order" - email_template_purchase_order: - description: "The email template for purchase orders" - type: string - example: "Please see attached your purchase order." - require_purchase_order_signature: - description: "Determines if a signature is required on purchase orders" - type: boolean - example: false - purchase_order_public_notes: - description: "The public notes for purchase orders" - type: string - example: "Please see attached your purchase order." - purchase_order_terms: - description: "The terms for purchase orders" - type: string - example: "Please see attached your purchase order." - purchase_order_footer: - description: "The footer for purchase orders" - type: string - example: "Please see attached your purchase order." - purchase_order_design_id: - description: "The design id for purchase orders" - type: string - example: "hd677df" - purchase_order_number_pattern: - description: "The pattern for purchase order numbers" - type: string - example: "PO-000000" - purchase_order_number_counter: - description: "The counter for purchase order numbers" - type: number - example: 1 - page_numbering_alignment: - description: "The alignment for page numbering: options include left / center / right" - type: string - example: "left" - page_numbering: - description: "Determines if page numbering is enabled on Document PDFs" - type: boolean - example: false - auto_archive_invoice_cancelled: - description: "Determines if invoices are automatically archived when they are cancelled" - type: boolean - example: false - email_from_name: - description: "The FROM name for emails when using Custom emailers" - type: string - example: "Bob Smith" - show_all_tasks_client_portal: - description: "Determines if all tasks are shown on the client portal" - type: boolean - example: false - entity_send_time: - description: "The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24" - type: integer - example: 9 - shared_invoice_credit_counter: - description: "Determines if the invoice and credit counter are shared" - type: boolean - example: false - reply_to_name: - description: "The reply to name for emails" - type: string - example: "Bob Smith" - hide_empty_columns_on_pdf: - description: "Determines if empty columns are hidden on PDFs" - type: boolean - example: false - enable_reminder_endless: - description: "Determines if endless reminders are enabled" - type: boolean - example: false - use_credits_payment: - description: "Determines if credits can be used as a payment method" - type: boolean - example: false - recurring_invoice_number_pattern: - description: "The pattern for recurring invoice numbers" - type: string - example: "R-000000" - recurring_invoice_number_counter: - description: "The counter for recurring invoice numbers" - type: number - example: 1 - client_portal_under_payment_minimum: - description: "The minimum payment payment" - type: number - example: 10 - auto_bill_date: - description: "Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))" - type: string - example: "on_send_date" - primary_color: - description: "The primary color for the client portal / document highlights" - type: string - example: "#ffffff" - secondary_color: - description: "The secondary color for the client portal / document highlights" - type: string - example: "#ffffff" - client_portal_allow_under_payment: - description: "Determines if clients can pay invoices under the invoice amount due" - type: boolean - example: false - client_portal_allow_over_payment: - description: "Determines if clients can pay invoices over the invoice amount" - type: boolean - example: false - auto_bill: - description: "Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing" - type: string - example: "off" - client_portal_terms: - description: "The terms which are displayed on the client portal" - type: string - example: "Please see attached your invoice." - client_portal_privacy_policy: - description: "The privacy policy which is displayed on the client portal" - type: string - example: "These are the terms of use for using the client portal." - client_can_register: - description: "Determines if clients can register on the client portal" - type: boolean - example: false - portal_design_id: - description: "The design id for the client portal" - type: string - example: "hd677df" - late_fee_endless_percent: - description: "The late fee percentage for endless late fees" - type: number - example: 10 - late_fee_endless_amount: - description: "The late fee amount for endless late fees" - type: number - example: 10 - auto_email_invoice: - description: "Determines if invoices are automatically emailed when they are created" - type: boolean - example: false - email_signature: - description: "The email signature for emails" - type: string - example: "Bob Smith" - classification: - description: "The classification for the company" - type: string - example: "individual" - type: object - - CompanyLedger: - properties: - entity_id: - description: 'This field will reference one of the following entity hashed ID payment_id, invoice_id or credit_id' - type: string - example: AS3df3A - notes: - description: 'The notes which reference this entry of the ledger' - type: string - example: 'Credit note for invoice #3212' - balance: - description: 'The client balance' - type: number - format: float - example: '10.00' - adjustment: - description: 'The amount the client balance is adjusted by' - type: number - format: float - example: '10.00' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - created_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - type: object - CompanyToken: - properties: - name: - description: 'The token name' - type: string - example: 'Token Name' - token: - description: 'The token value' - type: string - example: AS3df3jUUH765fhfd9KJuidj3JShjA - is_system: - description: 'Determines whether the token is created by the system rather than a user' - type: boolean - example: 'true' - type: object - Activity: - properties: - id: - description: 'The id field of the activity' - type: string - example: Opnel5aKBz - activity_type_id: - description: 'The activity type id' - type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - invoice_id: - description: 'The invoice hashed id' - type: string - example: Opnel5aKBz - payment_id: - description: 'The payment hashed id' - type: string - example: Opnel5aKBz - credit_id: - description: 'The credit hashed id' - type: string - example: Opnel5aKBz - updated_at: - description: 'Unixtimestamp the last time the record was updated' - type: integer - example: '343421434' - expense_id: - description: 'The expense hashed id' - type: string - example: Opnel5aKBz - is_system: - description: 'Defines is the activity was performed by the system' - type: boolean - example: true - contact_id: - description: 'The contact hashed id' - type: string - example: Opnel5aKBz - task_id: - description: 'The task hashed id' - type: string - example: Opnel5aKBz - notes: - description: 'Activity Notes' - type: string - example: Opnel5aKBz - token_id: - description: 'The hashed ID of the token who performed the action' - type: string - example: Opnel5aKBz - ip: - description: 'The IP Address of the user who performed the action' - type: string - example: 192.168.1.252 - user: - $ref: '#/components/schemas/User' - client: - $ref: '#/components/schemas/Client' - contact: - $ref: '#/components/schemas/ClientContact' - recurring_invoice: - $ref: '#/components/schemas/RecurringInvoice' - invoice: - $ref: '#/components/schemas/Invoice' - credit: - $ref: '#/components/schemas/Credit' - quote: - $ref: '#/components/schemas/Quote' - payment: - $ref: '#/components/schemas/Payment' - expense: - $ref: '#/components/schemas/Expense' - task: - $ref: '#/components/schemas/Task' - purchase_order: - $ref: '#/components/schemas/PurchaseOrder' - vendor: - $ref: '#/components/schemas/Vendor' - vendor_contact: - $ref: '#/components/schemas/VendorContact' - type: object - Error: - properties: - message: - description: 'Something terrible went wrong' - type: string - example: 'Unexpected error' - code: - description: 'The HTTP error code, ie 5xx 4xx' - type: integer - example: '500' - type: object - - GenericBulkAction: - properties: - action: - type: string - example: archive - description: 'The action to perform ie. archive / restore / delete' - ids: - type: array - items: - format: string - type: string - example: 2J234DFA,D2J234DFA,D2J234DFA - description: string array of client hashed ids - type: object - ClientContact: - properties: - id: - description: 'The hashed if of the contact' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The hashed id of the user who created the contact' - type: string - example: Opnel5aKBz - readOnly: true - client_id: - description: 'The hashed id of the client' + Company: + properties: + id: + description: "The unique hashed identifier for the company" type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' + example: WJxbojagwO + size_id: + description: "The unique identifier representing the company's size category" type: string - example: John - last_name: - description: 'The last name of the contact' + example: '2' + industry_id: + description: "The unique identifier representing the company's industry category" type: string - example: Doe - phone: - description: 'The phone number of the contact' + example: '5' + slack_webhook_url: + description: "The URL for the company's Slack webhook notifications" type: string - example: 555-152-4524 - custom_value1: - description: 'A Custom field value' + example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' + google_analytics_key: + description: "The company's Google Analytics tracking ID" type: string - example: '' - custom_value2: - description: 'A Custom field value' + example: 'UA-123456789-1' + portal_mode: + description: "The mode determining how client-facing URLs are structured (e.g., subdomain, domain, or iframe)" type: string - example: '' - custom_value3: - description: 'A Custom field value' + example: subdomain + subdomain: + description: "The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)" type: string - example: '' - custom_value4: - description: 'A Custom field value' + example: acme + portal_domain: + description: "The fully qualified domain used for client-facing URLs" type: string - example: '' - email: - description: 'The email of the contact' + example: 'https://subdomain.invoicing.co' + enabled_tax_rates: + description: "The number of tax rates used per entity" + type: integer + example: '2' + fill_products: + description: "A flag determining whether to auto-fill product descriptions based on the product key" + type: boolean + example: true + convert_products: + description: "A flag determining whether to convert products between different types or units" + type: boolean + example: true + update_products: + description: "A flag determining whether to update product descriptions when the description changes" + type: boolean + example: true + show_product_details: + description: "A flag determining whether to display product details in the user interface" + type: boolean + example: true + show_product_cost: + description: "A flag determining whether to display product cost is shown in the user interface" + type: boolean + example: true + custom_fields: + description: "A mapping of custom fields for various objects within the company" + type: object + enable_product_cost: + description: "A flag determining whether to show or hide the product cost field in the user interface" + type: boolean + example: true + enable_product_quantity: + description: "A flag determining whether to show or hide the product quantity field in the user interface" + type: boolean + example: true + default_quantity: + description: "A flag determining whether to use a default quantity for products" + type: boolean + example: true + custom_surcharge_taxes1: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the first custom surcharge field" + type: boolean + example: true + custom_surcharge_taxes2: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the second custom surcharge field" + type: boolean + example: true + custom_surcharge_taxes3: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the third custom surcharge field" + type: boolean + example: true + custom_surcharge_taxes4: + description: "A flag determining whether to apply taxes on custom surcharge amounts for the fourth custom" + logo: + description: "The company logo file in binary format" type: string - example: '' - accepted_terms_version: - description: 'The terms of service which the contact has accpeted' + format: binary + example: logo.png + company_key: + description: "The static company key hash used to identify the Company" + readOnly: true type: string - example: 'A long set of ToS' + example: "Vnb14bRlwiFjc5ckte6cfbygTRkn5IMQ" + client_can_register: + description: "A flag determining whether clients can register for the client portal" + type: boolean + example: true + enabled_modules: + type: integer + description: | + Bitmask representation of the modules that are enabled in the application + + ``` + self::ENTITY_RECURRING_INVOICE => 1, + self::ENTITY_CREDIT => 2, + self::ENTITY_QUOTE => 4, + self::ENTITY_TASK => 8, + self::ENTITY_EXPENSE => 16, + self::ENTITY_PROJECT => 32, + self::ENTITY_VENDOR => 64, + self::ENTITY_TICKET => 128, + self::ENTITY_PROPOSAL => 256, + self::ENTITY_RECURRING_EXPENSE => 512, + self::ENTITY_RECURRING_TASK => 1024, + self::ENTITY_RECURRING_QUOTE => 2048, + ``` + + The default per_page value is 20. + + example: 2048 + db: readOnly: true - password: - description: 'The hashed password of the contact' type: string - example: '*****' - confirmation_code: - description: 'The confirmation code used to authenticate the contacts email address' + example: 'db-ninja-01' + first_day_of_week: + description: "The first day of the week for the company" type: string - example: 333-sdjkh34gbasd - readOnly: true - token: - description: 'A uuid based token.' + example: '1' + first_month_of_year: + description: "The first month for the company financial year" + type: string + example: '1' + enabled_item_tax_rates: + description: "The number of tax rates used per item" + type: integer + example: 2 + is_large: + description: "A flag determining whether the company is considered large" + type: boolean + example: true + default_auto_bill: + type: string + example: 'always' + description: | + A flag determining whether to auto-bill clients by default + + values: + + - always - Always auto bill + - disabled - Never auto bill + - optin - Allow the client to select their auto bill status with the default being disabled + - optout -Allow the client to select their auto bill status with the default being enabled + mark_expenses_invoiceable: + description: "A flag determining whether to mark expenses as invoiceable by default" + type: boolean + example: true + mark_expenses_paid: + description: "A flag determining whether to mark expenses as paid by default" + type: boolean + example: true + invoice_expense_documents: + description: "A flag determining whether to include expense documents on invoices by default" + type: boolean + example: true + auto_start_tasks: + description: "A flag determining whether to auto-start tasks by default" + type: boolean + example: true + invoice_task_timelog: + description: "A flag determining whether to include task time logs on invoices by default" + type: boolean + example: true + invoice_task_documents: + description: "A flag determining whether to include task documents on invoices by default" + type: boolean + example: true + show_tasks_table: + description: "A flag determining whether to show the tasks table on invoices by default" + type: boolean + example: true + is_disabled: + description: "A flag determining whether the company is disabled" + type: boolean + example: true + default_task_is_date_based: + description: "A flag determining whether to default tasks to be date-based" + type: boolean + example: true + enable_product_discount: + description: "A flag determining whether to show or hide the product discount field in the user interface" + type: boolean + example: true + calculate_expense_tax_by_amount: + description: "A flag determining whether to calculate expense taxes by amount" + type: boolean + example: true + expense_inclusive_taxes: + description: "A flag determining whether to include taxes in the expense amount" + type: boolean + example: true + session_timeout: + description: "The session timeout for the company" + type: integer + example: 60 + oauth_password_required: + description: "A flag determining whether to require a password for `dangerous` actions when using OAuth" + type: boolean + example: true + invoice_task_datelog: + description: "A flag determining whether to include task date logs on invoices by default" + type: boolean + example: true + default_password_timeout: + description: "The default password timeout for the company" + type: integer + example: 60 + show_task_end_date: + description: "A flag determining whether to show the task end date on invoices by default" + type: boolean + example: true + markdown_enabled: + description: "A flag determining whether markdown is enabled for the company" + type: boolean + example: true + report_include_drafts: + description: "A flag determining whether to include draft invoices in reports" + type: boolean + example: true + client_registration_fields: + description: "The client registration fields for the company" + type: object + stop_on_unpaid_recurring: + description: "A flag determining whether to stop recurring invoices when they are unpaid" + type: boolean + example: true + use_quote_terms_on_conversion: + description: "A flag determining whether to use quote terms on conversion to an invoice" + type: boolean + example: true + enable_applying_payments: + description: "A flag determining whether to enable applying payments to invoices" + type: boolean + example: true + track_inventory: + description: "A flag determining whether to track inventory for the company" + type: boolean + example: true + inventory_notification_threshold: + description: "The inventory notification threshold for the company" + type: integer + example: 60 + stock_notification: + description: "A flag determining whether to send stock notifications for the company" + type: boolean + example: true + matomo_url: + description: "The Matomo URL for the company" type: string - example: 333-sdjkh34gbasd - readOnly: true - contact_key: - description: 'A unique identifier for the contact' + example: 'https://matomo.example.com' + matomo_id: + description: "The Matomo ID for the company" type: string - example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a - readOnly: true - is_primary: - description: 'Defines is this contact is the primary contact for the client' + example: '1' + enabled_expense_tax_rates: + description: "The number of tax rates used per expense" + type: integer + example: 2 + invoice_task_project: + description: "A flag determining whether to include the project on invoices by default" type: boolean example: true - confirmed: - description: 'Boolean value confirms the user has confirmed their account.' + report_include_deleted: + description: "A flag determining whether to include deleted invoices in reports" type: boolean example: true - is_locked: - description: 'Boolean value defines if the contact has been locked out.' + invoice_task_lock: + description: "A flag determining whether to lock tasks when invoiced" type: boolean example: true - send_email: - description: 'Boolean value determines is this contact should receive emails' + convert_payment_currency: + description: "A flag determining whether to convert the payment currency" type: boolean example: true - failed_logins: - description: 'The number of failed logins the contact has had' - type: number - format: integer - example: '3' - readOnly: true - email_verified_at: - description: 'The date which the contact confirmed their email' - type: number - format: integer - example: '134341234234' - readOnly: true - last_login: - description: Timestamp + convert_expense_currency: + description: "A flag determining whether to convert the expense currency" + type: boolean + example: true + notify_vendor_when_paid: + description: "A flag determining whether to notify the vendor when an expense is paid" + type: boolean + example: true + invoice_task_hours: + description: "A flag determining whether to include the task hours on invoices by default" + type: boolean + example: true + calculate_taxes: + description: "A flag determining whether to calculate taxes for the company" + type: boolean + example: true + tax_data: + description: "The tax data for the company" + type: object + e_invoice_certificate: + description: "The e-invoice certificate for the company" + type: string + example: '-----BEGIN CERTIFICATE-----' + e_invoice_certificate_passphrase: + description: "The e-invoice certificate passphrase for the company" + type: string + example: 'secret' + origin_tax_data: + description: "The origin tax data for the company" + type: object + invoice_task_project_header: + description: "A flag determining whether to include the project header on invoices by default" + type: boolean + example: true + invoice_task_item_description: + description: "A flag determining whether to include the item description on invoices by default" + type: boolean + example: true + + settings: + $ref: '#/components/schemas/CompanySettings' + type: object + CompanyLedger: + properties: + entity_id: + description: 'This field will reference one of the following entity hashed ID payment_id, invoice_id or credit_id' + type: string + example: AS3df3A + notes: + description: 'The notes which reference this entry of the ledger' + type: string + example: 'Credit note for invoice #3212' + balance: + description: 'The client balance' type: number - format: integer - example: '134341234234' - readOnly: true - created_at: - description: Timestamp + format: float + example: '10.00' + adjustment: + description: 'The amount the client balance is adjusted by' type: number - format: integer - example: '134341234234' - readOnly: true + format: float + example: '10.00' updated_at: description: Timestamp type: number format: integer - example: '134341234234' - readOnly: true - deleted_at: + example: '1434342123' + created_at: description: Timestamp type: number format: integer - example: '134341234234' - readOnly: true - type: object - Project: + example: '1434342123' type: object + RecurringInvoice: properties: id: - description: 'The project hashed id' + description: 'The hashed id of the recurring invoice' type: string example: Opnel5aKBz user_id: @@ -17803,269 +17145,185 @@ components: type: string example: Opnel5aKBz assigned_user_id: - description: The assigned user identifier associated with the project + description: 'The assigned user hashed id' type: string example: Opnel5aKBz client_id: + description: 'The client hashed id' type: string example: Opnel5aKBz - description: The client identifier associated with the project - name: - type: string - description: The name of the project - example: 'New Project' - task_rate: - type: number - format: float - example: 10 - description: The default rate per task for the project - due_date: - type: string - format: date - example: '2019-01-01' - description: The due date for the project - private_notes: - type: string - description: Private notes associated with the project - budgeted_hours: - type: number - format: float - description: The number of budgeted hours for the project - custom_value1: - type: string - description: Custom value field 1 - custom_value2: - type: string - description: Custom value field 2 - custom_value3: - type: string - description: Custom value field 3 - custom_value4: - type: string - description: Custom value field 4 - created_at: - type: number - format: integer - example: 134341234234 - description: The timestamp of the project creation - updated_at: - type: number - format: integer - example: 134341234234 - description: The timestamp of the last project update - archived_at: - type: number - format: integer - example: 134341234234 - description: The timestamp of the project deletion - public_notes: - type: string - description: Public notes associated with the project - is_deleted: - type: boolean - description: A flag indicating if the project is deleted - number: - type: string - description: The project number - color: - type: string - description: The color associated with the project - required: - - id - - user_id - - name - - task_rate - - budgeted_hours - - is_deleted - - color - - Credit: - properties: - id: - description: "The unique hashed ID of the credit" - type: string - example: Opnel5aKBz - user_id: - description: "The unique hashed ID of the user associated with the credit" - type: string - example: 1a2b3c4d5e - assigned_user_id: - description: "The unique hashed ID of the assigned user responsible for the credit" - type: string - example: 6f7g8h9i0j - client_id: - description: "The unique hashed ID of the client associated with the credit" - type: string - example: p1q2r3s4t5 status_id: - description: "The ID representing the current status of the credit" - type: string - example: 3 - invoice_id: - description: "The unique hashed ID of the linked invoice to which the credit is applied" + description: 'The invoice status variable' type: string - example: u1v2w3x4y5 + example: '4' + frequency_id: + description: 'The recurring invoice frequency' + type: number + example: '4' + remaining_cycles: + description: 'The number of invoices left to be generated' + type: number + example: '4' number: - description: "The unique alphanumeric credit number per company" + description: 'The recurringinvoice number - is a unique alpha numeric number per invoice per company' type: string - example: QUOTE_101 + example: INV_101 po_number: - description: "The purchase order number referred to by the credit" + description: 'The purchase order associated with this recurring invoice' type: string - example: PO_12345 + example: PO-1234 terms: - description: "The terms associated with the credit" + description: 'The invoice terms' type: string - example: "Net 30" + example: 'These are invoice terms' public_notes: - description: "Public notes for the credit" + description: 'The public notes of the invoice' type: string - example: "Thank you for your business." + example: 'These are some public notes' private_notes: - description: "Private notes for internal use, not visible to the client" + description: 'The private notes of the invoice' type: string - example: "Client is requesting a discount." + example: 'These are some private notes' footer: - description: "The footer text for the credit" + description: 'The invoice footer notes' type: string - example: "Footer text goes here." + example: '' custom_value1: - description: "Custom value 1 for additional credit information" + description: 'A custom field value' type: string - example: "Custom data 1" + example: '2022-10-01' custom_value2: - description: "Custom value 2 for additional credit information" + description: 'A custom field value' type: string - example: "Custom data 2" + example: 'Something custom' custom_value3: - description: "Custom value 3 for additional credit information" + description: 'A custom field value' type: string - example: "Custom data 3" + example: '' custom_value4: - description: "Custom value 4 for additional credit information" + description: 'A custom field value' type: string - example: "Custom data 4" + example: '' tax_name1: - description: "The name of the first tax applied to the credit" + description: 'The tax name' type: string - example: "VAT" + example: '' tax_name2: - description: "The name of the second tax applied to the credit" + description: 'The tax name' type: string - example: "GST" + example: '' tax_rate1: - description: "The rate of the first tax applied to the credit" + description: 'The tax rate' type: number format: float - example: 10.00 + example: '10.00' tax_rate2: - description: "The rate of the second tax applied to the credit" + description: 'The tax rate' type: number format: float - example: 5.00 + example: '10.00' tax_name3: - description: "The name of the third tax applied to the credit" + description: 'The tax name' type: string - example: "PST" + example: '' tax_rate3: - description: "The rate of the third tax applied to the credit" + description: 'The tax rate' type: number format: float - example: 8.00 + example: '10.00' total_taxes: - description: "The total amount of taxes for the credit" + description: 'The total taxes for the invoice' type: number format: float - example: 23.00 + example: '10.00' line_items: - type: array - description: 'An array of objects which define the line items of the credit' - items: - $ref: '#/components/schemas/InvoiceItem' + description: 'An array of objects which define the line items of the invoice' + type: object + example: '' amount: - description: "The total amount of the credit" + description: 'The invoice amount' type: number format: float - example: 100.00 + example: '10.00' balance: - description: "The outstanding balance of the credit" + description: 'The invoice balance' type: number format: float - example: 50.00 + example: '10.00' paid_to_date: - description: "The total amount paid to date for the credit" + description: 'The amount paid on the invoice to date' type: number format: float - example: 50.00 + example: '10.00' discount: - description: "The discount applied to the credit" + description: 'The invoice discount, can be an amount or a percentage' type: number format: float - example: 10.00 + example: '10.00' partial: - description: "The partial amount applied to the credit" + description: 'The deposit/partial amount' type: number format: float - example: 20.00 + example: '10.00' is_amount_discount: - description: "Indicates whether the discount applied is a fixed amount or a percentage" + description: 'Flag determining if the discount is an amount or a percentage' type: boolean example: true is_deleted: - description: "Indicates whether the credit has been deleted" + description: 'Defines if the invoice has been deleted' type: boolean - example: false + example: true uses_inclusive_taxes: - description: "Indicates whether the tax rates applied to the credit are inclusive or exclusive" + description: 'Defines the type of taxes used as either inclusive or exclusive' type: boolean example: true date: - description: "The date the credit was issued" + description: 'The Invoice Date' type: string format: date - example: "1994-07-30" + example: '1994-07-30' last_sent_date: - description: "The date the credit was last sent out" + description: 'The last date the invoice was sent out' type: string format: date - example: "1994-07-30" + example: '1994-07-30' next_send_date: - description: "The next scheduled date for sending a credit reminder" + description: 'The Next date for a reminder to be sent' type: string format: date - example: "1994-07-30" + example: '1994-07-30' partial_due_date: - description: "The due date for the partial amount of the credit" + description: 'The due date for the deposit/partial amount' type: string format: date - example: "1994-07-30" + example: '1994-07-30' due_date: - description: "The due date for the total amount of the credit" + description: 'The due date of the invoice' type: string format: date - example: "1994-07-30" + example: '1994-07-30' settings: - $ref: "#/components/schemas/CompanySettings" + $ref: '#/components/schemas/CompanySettings' last_viewed: - description: "The timestamp of the last time the credit was viewed" + description: Timestamp type: number format: integer - example: 1434342123 + example: '1434342123' updated_at: - description: "The timestamp of the last time the credit was updated" + description: Timestamp type: number format: integer - example: 1434342123 + example: '1434342123' archived_at: - description: "The timestamp of the last time the credit was archived" + description: Timestamp type: number format: integer - example: 1434342123 + example: '1434342123' custom_surcharge1: - description: "First custom surcharge amount" + description: 'First Custom Surcharge' type: number format: float - example: 10.00 + example: '10.00' custom_surcharge2: description: 'Second Custom Surcharge' type: number @@ -18098,43 +17356,7 @@ components: type: boolean example: true 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 + Payment: properties: id: @@ -18225,1335 +17447,2402 @@ components: example: PAY_101 type: object - BankTransactionRule: - properties: - id: - description: 'The bank transaction rules hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - example: AS3df3A - name: - description: 'The name of the transaction' - type: string - example: 'Rule 1' - rules: - description: 'A mapped collection of the sub rules for the BankTransactionRule' - type: array - items: - $ref: '#/components/schemas/BTRules' - auto_convert: - description: 'Flags whether the rule converts the transaction automatically' - type: boolean - example: true - matches_on_all: - description: 'Flags whether all subrules are required for the match' - type: boolean - example: true - applies_to: - description: 'Flags whether the rule applies to a CREDIT or DEBIT' - type: string - example: CREDIT - client_id: - description: 'The client hashed id' - type: string - example: AS3df3A - vendor_id: - description: 'The vendor hashed id' - type: string - example: AS3df3A - category_id: - description: 'The category hashed id' - type: string - example: AS3df3A - type: object - RecurringExpense: + Credit: properties: id: - description: 'The hashed id of the recurring expense' + description: "The unique hashed ID of the credit" type: string example: Opnel5aKBz user_id: - description: 'The hashed id of the user who created the recurring expense' + description: "The unique hashed ID of the user associated with the credit" type: string - example: Opnel5aKBz + example: 1a2b3c4d5e assigned_user_id: - description: 'The hashed id of the user assigned to this recurring expense' + description: "The unique hashed ID of the assigned user responsible for the credit" type: string - example: Opnel5aKBz + example: 6f7g8h9i0j client_id: - description: 'The hashed id of the client' - type: string - example: Opnel5aKBz - invoice_id: - description: 'The hashed id of the invoice' - type: string - example: Opnel5aKBz - bank_id: - description: 'The id of the bank associated with this recurring expense' + description: "The unique hashed ID of the client associated with the credit" type: string - example: '22' - invoice_currency_id: - description: 'The currency id of the invoice associated with this recurring expense' + example: p1q2r3s4t5 + status_id: + description: "The ID representing the current status of the credit" type: string - example: '1' - expense_currency_id: - description: 'The currency id of the expense associated with this recurring expense' + example: 3 + invoice_id: + description: "The unique hashed ID of the linked invoice to which the credit is applied" type: string - example: '1' - invoice_category_id: - description: 'The category id of the invoice' + example: u1v2w3x4y5 + number: + description: "The unique alphanumeric credit number per company" type: string - example: '1' - payment_type_id: - description: 'The payment type id' + example: QUOTE_101 + po_number: + description: "The purchase order number referred to by the credit" type: string - example: '1' - private_notes: - description: 'The recurring expense private notes' + example: PO_12345 + terms: + description: "The terms associated with the credit" type: string - example: 'Private and confidential' + example: "Net 30" public_notes: - description: 'The recurring expense public notes' + description: "Public notes for the credit" type: string - example: 'This is the best client in the world' - transaction_reference: - description: 'The recurring expense transaction reference' + example: "Thank you for your business." + private_notes: + description: "Private notes for internal use, not visible to the client" type: string - example: EXP-1223-2333 - transcation_id: - description: 'The transaction id of the recurring expense' + example: "Client is requesting a discount." + footer: + description: "The footer text for the credit" type: string - example: '1233312312' + example: "Footer text goes here." custom_value1: - description: 'Custom value field' + description: "Custom value 1 for additional credit information" type: string - example: $1000 + example: "Custom data 1" custom_value2: - description: 'Custom value field' + description: "Custom value 2 for additional credit information" type: string - example: '2022-10-10' + example: "Custom data 2" custom_value3: - description: 'Custom value field' + description: "Custom value 3 for additional credit information" type: string - example: 'short text' + example: "Custom data 3" custom_value4: - description: 'Custom value field' + description: "Custom value 4 for additional credit information" type: string - example: 'very long text' + example: "Custom data 4" tax_name1: - description: 'The tax name' + description: "The name of the first tax applied to the credit" type: string - example: GST + example: "VAT" tax_name2: - description: 'The tax name' + description: "The name of the second tax applied to the credit" type: string - example: VAT + example: "GST" tax_rate1: - description: 'The tax rate' + description: "The rate of the first tax applied to the credit" type: number format: float - example: '10.00' + example: 10.00 tax_rate2: - description: 'The tax rate' + description: "The rate of the second tax applied to the credit" type: number format: float - example: '10.00' + example: 5.00 tax_name3: - description: 'The tax name' + description: "The name of the third tax applied to the credit" type: string - example: '' + example: "PST" tax_rate3: - description: 'The tax rate' + description: "The rate of the third tax applied to the credit" type: number format: float - example: '10.00' + example: 8.00 + total_taxes: + description: "The total amount of taxes for the credit" + type: number + format: float + example: 23.00 + line_items: + type: array + description: 'An array of objects which define the line items of the credit' + items: + $ref: '#/components/schemas/InvoiceItem' amount: - description: 'The total amount of the recurring expense' + description: "The total amount of the credit" type: number format: float - example: '10.00' - frequency_id: - description: 'The frequency this recurring expense fires' + example: 100.00 + balance: + description: "The outstanding balance of the credit" type: number - format: int - example: '1' - remaining_cycles: - description: 'The number of remaining cycles for this recurring expense' + format: float + example: 50.00 + paid_to_date: + description: "The total amount paid to date for the credit" type: number - format: int - example: '1' - foreign_amount: - description: 'The foreign currency amount of the recurring expense' + format: float + example: 50.00 + discount: + description: "The discount applied to the credit" type: number format: float - example: '10.00' - exchange_rate: - description: 'The exchange rate for the expernse' + example: 10.00 + partial: + description: "The partial amount applied to the credit" type: number format: float - example: '0.80' + example: 20.00 + is_amount_discount: + description: "Indicates whether the discount applied is a fixed amount or a percentage" + type: boolean + example: true + is_deleted: + description: "Indicates whether the credit has been deleted" + type: boolean + example: false + uses_inclusive_taxes: + description: "Indicates whether the tax rates applied to the credit are inclusive or exclusive" + type: boolean + example: true date: - description: 'The date of the expense' + description: "The date the credit was issued" type: string - example: '' - payment_date: - description: 'The date the expense was paid' + format: date + example: "1994-07-30" + last_sent_date: + description: "The date the credit was last sent out" type: string - example: '' - should_be_invoiced: - description: 'Boolean flag determining if the expense should be invoiced' + format: date + example: "1994-07-30" + next_send_date: + description: "The next scheduled date for sending a credit reminder" + type: string + format: date + example: "1994-07-30" + partial_due_date: + description: "The due date for the partial amount of the credit" + type: string + format: date + example: "1994-07-30" + due_date: + description: "The due date for the total amount of the credit" + type: string + format: date + example: "1994-07-30" + settings: + $ref: "#/components/schemas/CompanySettings" + last_viewed: + description: "The timestamp of the last time the credit was viewed" + type: number + format: integer + example: 1434342123 + updated_at: + description: "The timestamp of the last time the credit was updated" + type: number + format: integer + example: 1434342123 + archived_at: + description: "The timestamp of the last time the credit was archived" + type: number + format: integer + example: 1434342123 + custom_surcharge1: + description: "First custom surcharge amount" + type: number + format: float + example: 10.00 + custom_surcharge2: + description: 'Second Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge3: + description: 'Third Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge4: + description: 'Fourth Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge_tax1: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + custom_surcharge_tax2: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + custom_surcharge_tax3: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + custom_surcharge_tax4: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + type: object + Subscription: + properties: + id: + description: Unique identifier for the subscription + type: string + example: Opnel5aKBz + user_id: + description: Unique identifier for the user associated with the subscription + type: string + example: Ua6Rw4pVbS + product_id: + description: Unique identifier for the product associated with the subscription + type: string + example: Pr5Ft7yBmC + recurring_invoice_id: + description: Unique identifier for the recurring invoice associated with the subscription + type: string + example: Ri2Yt8zJkP + is_recurring: + description: Indicates whether the subscription is recurring + type: boolean + example: 'true' + frequency_id: + description: 'integer const representation of the frequency' + type: string + example: '1' + auto_bill: + description: 'enum setting' + type: string + example: always + promo_code: + description: Promotional code applied to the subscription + type: string + example: PROMOCODE4U + promo_discount: + description: Discount percentage or amount applied to the subscription + type: number + example: 10 + is_amount_discount: + description: Indicates whether the discount is a fixed amount type: boolean - example: true - is_deleted: - description: 'Boolean flag determining if the recurring expense is deleted' + example: 'true' + allow_cancellation: + description: Indicates whether the subscription can be cancelled type: boolean - example: true - last_sent_date: - description: 'The Date it was sent last' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The next send date' + example: 'true' + per_seat_enabled: + description: Indicates whether the subscription pricing is per seat + type: boolean + example: 'true' + currency_id: + description: Unique identifier for the currency used in the subscription + type: integer + example: '1' + max_seats_limit: + description: Maximum number of seats allowed for the subscription + type: integer + example: '100' + trial_enabled: + description: Indicates whether the subscription has a trial period + type: boolean + example: 'true' + trial_duration: + description: Duration of the trial period in days + type: integer + example: '14' + allow_query_overrides: + description: Indicates whether query overrides are allowed for the subscription + type: boolean + example: 'true' + allow_plan_changes: + description: Indicates whether plan changes are allowed for the subscription + type: boolean + example: 'true' + refund_period: + description: Number of days within which refunds can be requested + type: integer + example: '30' + webhook_configuration: + description: Webhook configuration for the subscription type: string - format: date - example: '1994-07-30' - invoice_documents: - description: 'Boolean flag determining if the documents associated with this expense should be passed onto the invoice if it is converted to an invoice' + example: 'expand reference for this' + is_deleted: + description: Indicates whether the subscription has been deleted type: boolean - example: true - updated_at: + example: 'false' + archived_at: description: Timestamp type: number format: integer example: '1434342123' - archived_at: + created_at: description: Timestamp type: number format: integer - example: '1434342123' + example: '134341234234' + updated_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + type: object + BulkAction: + type: array + items: + type: integer + example: '[0,1,2,3,]' + Project: type: object - InvoiceRequest: - required: - - client_id properties: id: - description: 'The invoice hashed id' + description: 'The project hashed id' type: string example: Opnel5aKBz - readOnly: true user_id: description: 'The user hashed id' type: string example: Opnel5aKBz assigned_user_id: - description: 'The assigned user hashed id' + description: The assigned user identifier associated with the project type: string example: Opnel5aKBz client_id: - description: 'The client hashed id' type: string example: Opnel5aKBz - status_id: - description: 'The invoice status variable' - type: string - example: '4' - readOnly: true - number: - description: 'The invoice number - is a unique alpha numeric number per invoice per company' - type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this invoice' - type: string - example: PO-1234 - terms: - description: 'The invoice terms' + description: The client identifier associated with the project + name: type: string - example: 'These are invoice terms' - public_notes: - description: 'The public notes of the invoice' + description: The name of the project + example: 'New Project' + task_rate: + type: number + format: float + example: 10 + description: The default rate per task for the project + due_date: type: string - example: 'These are some public notes' + format: date + example: '2019-01-01' + description: The due date for the project private_notes: - description: 'The private notes of the invoice' - type: string - example: 'These are some private notes' - footer: - description: 'The invoice footer notes' type: string - example: '' + description: Private notes associated with the project + budgeted_hours: + type: number + format: float + description: The number of budgeted hours for the project custom_value1: - description: 'A custom field value' type: string - example: '2022-10-01' + description: Custom value field 1 custom_value2: - description: 'A custom field value' type: string - example: 'Something custom' + description: Custom value field 2 custom_value3: - description: 'A custom field value' type: string - example: '' + description: Custom value field 3 custom_value4: - description: 'A custom field value' type: string - example: '' - tax_name1: - description: 'The tax name' + description: Custom value field 4 + created_at: + type: number + format: integer + example: 134341234234 + description: The timestamp of the project creation + updated_at: + type: number + format: integer + example: 134341234234 + description: The timestamp of the last project update + archived_at: + type: number + format: integer + example: 134341234234 + description: The timestamp of the project deletion + public_notes: + type: string + description: Public notes associated with the project + is_deleted: + type: boolean + description: A flag indicating if the project is deleted + number: + type: string + description: The project number + color: + type: string + description: The color associated with the project + required: + - id + - user_id + - name + - task_rate + - budgeted_hours + - is_deleted + - color + + CompanySettings: + required: + - currency_id + properties: + currency_id: + description: "The default currency id" + type: string + example: true + timezone_id: + description: "The timezone id" + type: string + example: "15" + date_format_id: + description: "The date format id" + type: string + example: "15" + military_time: + description: "Toggles 12/24 hour time" + type: boolean + example: true + language_id: + description: "The language id" + type: string + example: "1" + show_currency_code: + description: "Toggles whether the currency symbol or code is shown" + type: boolean + example: true + payment_terms: + description: "-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days" + type: integer + example: "1" + company_gateway_ids: + description: "A commad separate list of available gateways" + type: string + example: "1,2,3,4" + custom_value1: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value2: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value3: + description: "A Custom Label" + type: string + example: "Custom Label" + custom_value4: + description: "A Custom Label" + type: string + example: "Custom Label" + default_task_rate: + description: "The default task rate" + type: number + format: float + example: "10.00" + send_reminders: + description: "Toggles whether reminders are sent" + type: boolean + example: true + enable_client_portal_tasks: + description: "Show/hide the tasks panel in the client portal" + type: boolean + example: true + email_style: + description: "options include plain,light,dark,custom" + type: string + example: light + reply_to_email: + description: "The reply to email address" + type: string + example: email@gmail.com + bcc_email: + description: "A comma separate list of BCC emails" + type: string + example: "email@gmail.com, contact@gmail.com" + pdf_email_attachment: + description: "Toggles whether to attach PDF as attachment" + type: boolean + example: true + ubl_email_attachment: + description: "Toggles whether to attach UBL as attachment" + type: boolean + example: true + email_style_custom: + description: "The custom template" + type: string + example: "" + counter_number_applied: + description: "enum when the invoice number counter is set, ie when_saved, when_sent, when_paid" + type: string + example: when_sent + quote_number_applied: + description: "enum when the quote number counter is set, ie when_saved, when_sent" + type: string + example: when_sent + custom_message_dashboard: + description: "A custom message which is displayed on the dashboard" + type: string + example: "Please pay invoices immediately" + custom_message_unpaid_invoice: + description: "A custom message which is displayed in the client portal when a client is viewing a unpaid invoice." + type: string + example: "Please pay invoices immediately" + custom_message_paid_invoice: + description: "A custom message which is displayed in the client portal when a client is viewing a paid invoice." + type: string + example: "Thanks for paying this invoice!" + custom_message_unapproved_quote: + description: "A custom message which is displayed in the client portal when a client is viewing a unapproved quote." + type: string + example: "Please approve quote" + lock_invoices: + description: "Toggles whether invoices are locked once sent and cannot be modified further" + type: boolean + example: true + auto_archive_invoice: + description: "Toggles whether a invoice is archived immediately following payment" + type: boolean + example: true + auto_archive_quote: + description: "Toggles whether a quote is archived after being converted to a invoice" + type: boolean + example: true + auto_convert_quote: + description: "Toggles whether a quote is converted to a invoice when approved" + type: boolean + example: true + inclusive_taxes: + description: "Boolean flag determining whether inclusive or exclusive taxes are used" + type: boolean + example: true + translations: + description: "JSON payload of customized translations" + type: object + example: "" + task_number_pattern: + description: "Allows customisation of the task number pattern" + type: string + example: "{$year}-{$counter}" + task_number_counter: + description: "The incrementing counter for tasks" + type: integer + example: "1" + reminder_send_time: + description: "Time from UTC +0 when the email will be sent to the client" + type: integer + example: "32400" + expense_number_pattern: + description: "Allows customisation of the expense number pattern" + type: string + example: "{$year}-{$counter}" + expense_number_counter: + description: "The incrementing counter for expenses" + type: integer + example: "1" + vendor_number_pattern: + description: "Allows customisation of the vendor number pattern" + type: string + example: "{$year}-{$counter}" + vendor_number_counter: + description: "The incrementing counter for vendors" + type: integer + example: "1" + ticket_number_pattern: + description: "Allows customisation of the ticket number pattern" + type: string + example: "{$year}-{$counter}" + ticket_number_counter: + description: "The incrementing counter for tickets" + type: integer + example: "1" + payment_number_pattern: + description: "Allows customisation of the payment number pattern" + type: string + example: "{$year}-{$counter}" + payment_number_counter: + description: "The incrementing counter for payments" + type: integer + example: "1" + invoice_number_pattern: + description: "Allows customisation of the invoice number pattern" + type: string + example: "{$year}-{$counter}" + invoice_number_counter: + description: "The incrementing counter for invoices" + type: integer + example: "1" + quote_number_pattern: + description: "Allows customisation of the quote number pattern" + type: string + example: "{$year}-{$counter}" + quote_number_counter: + description: "The incrementing counter for quotes" + type: integer + example: "1" + client_number_pattern: + description: "Allows customisation of the client number pattern" + type: string + example: "{$year}-{$counter}" + client_number_counter: + description: "The incrementing counter for clients" + type: integer + example: "1" + credit_number_pattern: + description: "Allows customisation of the credit number pattern" + type: string + example: "{$year}-{$counter}" + credit_number_counter: + description: "The incrementing counter for credits" + type: integer + example: "1" + recurring_invoice_number_prefix: + description: "This string is prepended to the recurring invoice number" + type: string + example: R + reset_counter_frequency_id: + description: "CONSTANT which is used to apply the frequency which the counters are reset" + type: integer + example: "1" + reset_counter_date: + description: "The explicit date which is used to reset counters" + type: string + example: "2019-01-01" + counter_padding: + description: "Pads the counter with leading zeros" + type: integer + example: "1" + shared_invoice_quote_counter: + description: "Flags whether to share the counter for invoices and quotes" + type: boolean + example: true + update_products: + description: "Determines if client fields are updated from third party APIs" + type: boolean + example: true + convert_products: + description: "" + type: boolean + example: true + fill_products: + description: "Automatically fill products based on product_key" + type: boolean + example: true + invoice_terms: + description: "The default invoice terms" + type: string + example: "Invoice Terms are..." + quote_terms: + description: "The default quote terms" + type: string + example: "Quote Terms are..." + invoice_taxes: + description: "Taxes can be applied to the invoice" + type: number + example: "1" + invoice_design_id: + description: "The default design id (invoice, quote etc)" + type: string + example: "1" + quote_design_id: + description: "The default design id (invoice, quote etc)" + type: string + example: "1" + invoice_footer: + description: "The default invoice footer" + type: string + example: "1" + invoice_labels: + description: "JSON string of invoice labels" + type: string + example: "1" + tax_rate1: + description: "The tax rate (float)" + type: number + example: "10" + tax_name1: + description: "The tax name" + type: string + example: GST + tax_rate2: + description: "The tax rate (float)" + type: number + example: "10" + tax_name2: + description: "The tax name" + type: string + example: GST + tax_rate3: + description: "The tax rate (float)" + type: number + example: "10" + tax_name3: + description: "The tax name" + type: string + example: GST + payment_type_id: + description: "The default payment type id" + type: string + example: "1" + custom_fields: + description: "JSON string of custom fields" + type: string + example: "{}" + email_footer: + description: "The default email footer" + type: string + example: "A default email footer" + email_sending_method: + description: "The email driver to use to send email, options include default, gmail, client_postmark, client_mailgun, client_brevo, office365" + type: string + example: default + gmail_sending_user_id: + description: "The hashed_id of the user account to send email from" + type: string + example: F76sd34D + email_subject_invoice: + description: "" + type: string + example: "Your Invoice Subject" + email_subject_quote: + description: "" + type: string + example: "Your Quote Subject" + email_subject_payment: + description: "" + type: string + example: "Your Payment Subject" + email_template_invoice: + description: "The full template for invoice emails" + type: string + example: "" + email_template_quote: + description: "The full template for quote emails" + type: string + example: "" + email_template_payment: + description: "The full template for payment emails" + type: string + example: "" + email_subject_reminder1: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder2: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder3: + description: "Email subject for Reminder" + type: string + example: "" + email_subject_reminder_endless: + description: "Email subject for endless reminders" + type: string + example: "" + email_template_reminder1: + description: "The full template for Reminder 1" + type: string + example: "" + email_template_reminder2: + description: "The full template for Reminder 2" + type: string + example: "" + email_template_reminder3: + description: "The full template for Reminder 3" + type: string + example: "" + email_template_reminder_endless: + description: "The full template for enless reminders" + type: string + example: "" + enable_portal_password: + description: "Toggles whether a password is required to log into the client portal" + type: boolean + example: true + show_accept_invoice_terms: + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true + show_accept_quote_terms: + description: "Toggles whether the terms dialogue is shown to the client" + type: boolean + example: true + require_invoice_signature: + description: "Toggles whether a invoice signature is required" + type: boolean + example: true + require_quote_signature: + description: "Toggles whether a quote signature is required" + type: boolean + example: true + name: + description: "The company name" + type: string + example: "Acme Co" + company_logo: + description: "The company logo file" + type: object + example: logo.png + website: + description: "The company website URL" + type: string + example: www.acme.com + address1: + description: "The company address line 1" + type: string + example: "Suite 888" + address2: + description: "The company address line 2" + type: string + example: "5 Jimbo Way" + city: + description: "The company city" + type: string + example: Sydney + state: + description: "The company state" + type: string + example: Florisa + postal_code: + description: "The company zip/postal code" + type: string + example: "90210" + phone: + description: "The company phone" + type: string + example: 555-213-3948 + email: + description: "The company email" + type: string + example: joe@acme.co + country_id: + description: "The country ID" + type: string + example: "1" + vat_number: + description: "The company VAT/TAX ID number" + type: string + example: "32 120 377 720" + page_size: + description: "The default page size" + type: string + example: A4 + font_size: + description: "The font size" + type: number + example: "9" + primary_font: + description: "The primary font" + type: string + example: roboto + secondary_font: + description: "The secondary font" + type: string + example: roboto + hide_paid_to_date: + description: "Flags whether to hide the paid to date field" + type: boolean + example: false + embed_documents: + description: "Toggled whether to embed documents in the PDF" + type: boolean + example: false + all_pages_header: + description: "The header for the PDF" + type: boolean + example: false + all_pages_footer: + description: "The footer for the PDF" + type: boolean + example: false + document_email_attachment: + description: "Toggles whether to attach documents in the email" + type: boolean + example: false + enable_client_portal_password: + description: "Toggles password protection of the client portal" + type: boolean + example: false + enable_email_markup: + description: "Toggles the use of markdown in emails" + type: boolean + example: false + enable_client_portal_dashboard: + description: "Toggles whether the client dashboard is shown in the client portal" + type: boolean + example: false + enable_client_portal: + description: "Toggles whether the entire client portal is displayed to the client, or only the context" + type: boolean + example: false + email_template_statement: + description: "The body of the email for statements" + type: string + example: "template matter" + email_subject_statement: + description: "The subject of the email for statements" + type: string + example: "subject matter" + signature_on_pdf: + description: "Toggles whether the signature (if available) is displayed on the PDF" + type: boolean + example: false + quote_footer: + description: "The default quote footer" + type: string + example: "the quote footer" + email_subject_custom1: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 1" + email_subject_custom2: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 2" + email_subject_custom3: + description: "Custom reminder template subject" + type: string + example: "Custom Subject 3" + email_template_custom1: + description: "Custom reminder template body" + type: string + example: "" + email_template_custom2: + description: "Custom reminder template body" + type: string + example: "" + email_template_custom3: + description: "Custom reminder template body" + type: string + example: "" + enable_reminder1: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + enable_reminder2: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + enable_reminder3: + description: "Toggles whether this reminder is enabled" + type: boolean + example: false + num_days_reminder1: + description: "The Reminder interval" + type: number + example: "9" + num_days_reminder2: + description: "The Reminder interval" + type: number + example: "9" + num_days_reminder3: + description: "The Reminder interval" + type: number + example: "9" + schedule_reminder1: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + schedule_reminder2: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + schedule_reminder3: + description: "(enum: after_invoice_date, before_due_date, after_due_date)" + type: string + example: after_invoice_date + late_fee_amount1: + description: "The late fee amount for reminder 1" + type: number + example: 10 + late_fee_amount2: + description: "The late fee amount for reminder 2" + type: number + example: 20 + late_fee_amount3: + description: "The late fee amount for reminder 2" + type: number + example: 100 + endless_reminder_frequency_id: + description: "The frequency id of the endless reminder" + type: string + example: "1" + client_online_payment_notification: + description: "Determines if a client should receive the notification for a online payment" + type: boolean + example: false + client_manual_payment_notification: + description: "Determines if a client should receive the notification for a manually entered payment" + type: boolean + example: false + enable_e_invoice: + description: "Determines if e-invoicing is enabled" + type: boolean + example: false + default_expense_payment_type_id: + description: "The default payment type for expenses" + type: string + example: "0" + e_invoice_type: + description: "The e-invoice type" + type: string + example: "EN16931" + mailgun_endpoint: + description: "The mailgun endpoint - used to determine whether US or EU endpoints are used" + type: string + example: "api.mailgun.net or api.eu.mailgun.net" + client_initiated_payments: + description: "Determines if clients can initiate payments directly from the client portal" + type: boolean + example: false + client_initiated_payments_minimum: + description: "The minimum amount a client can pay" + type: number + example: 10 + sync_invoice_quote_columns: + description: "Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns" + type: boolean + example: false + show_task_item_description: + description: "Determines if the task item description is shown on the invoice" + type: boolean + example: false + allow_billable_task_items: + description: "Determines if task items can be marked as billable" + type: boolean + example: false + accept_client_input_quote_approval: + description: "Determines if clients can approve quotes and also pass through a PO Number reference" + type: boolean + example: false + custom_sending_email: + description: "When using Mailgun or Postmark, the FROM email address can be customized using this setting." + type: string + example: "bob@gmail.com" + show_paid_stamp: + description: "Determines if the PAID stamp is shown on the invoice" + type: boolean + example: false + show_shipping_address: + description: "Determines if the shipping address is shown on the invoice" + type: boolean + example: false + company_logo_size: + description: "The size of the company logo on the PDF - percentage value between 0 and 100" + type: number + example: 100 + show_email_footer: + description: "Determines if the email footer is shown on emails" + type: boolean + example: false + email_alignment: + description: "The alignment of the email body text, options include left / center / right" + type: string + example: "left" + auto_bill_standard_invoices: + description: "Determines if standard invoices are automatically billed when they are created or due" + type: boolean + example: false + postmark_secret: + description: "The Postmark secret API key" + type: string + example: "123456" + mailgun_secret: + description: "The Mailgun secret API key" + type: string + example: "123456" + mailgun_domain: + description: "The Mailgun domain" + type: string + example: "sandbox123456.mailgun.org" + send_email_on_mark_paid: + description: "Determines if an email is sent when an invoice is marked as paid" + type: boolean + example: false + vendor_portal_enable_uploads: + description: "Determines if vendors can upload files to the portal" + type: boolean + example: false + besr_id: + description: "The BESR ID" + type: string + example: "123456" + qr_iban: + description: "The IBAN for the QR code" + type: string + example: "CH123456" + email_subject_purchase_order: + description: "The email subject for purchase orders" + type: string + example: "Purchase Order" + email_template_purchase_order: + description: "The email template for purchase orders" + type: string + example: "Please see attached your purchase order." + require_purchase_order_signature: + description: "Determines if a signature is required on purchase orders" + type: boolean + example: false + purchase_order_public_notes: + description: "The public notes for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_terms: + description: "The terms for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_footer: + description: "The footer for purchase orders" + type: string + example: "Please see attached your purchase order." + purchase_order_design_id: + description: "The design id for purchase orders" + type: string + example: "hd677df" + purchase_order_number_pattern: + description: "The pattern for purchase order numbers" + type: string + example: "PO-000000" + purchase_order_number_counter: + description: "The counter for purchase order numbers" + type: number + example: 1 + page_numbering_alignment: + description: "The alignment for page numbering: options include left / center / right" + type: string + example: "left" + page_numbering: + description: "Determines if page numbering is enabled on Document PDFs" + type: boolean + example: false + auto_archive_invoice_cancelled: + description: "Determines if invoices are automatically archived when they are cancelled" + type: boolean + example: false + email_from_name: + description: "The FROM name for emails when using Custom emailers" + type: string + example: "Bob Smith" + show_all_tasks_client_portal: + description: "Determines if all tasks are shown on the client portal" + type: boolean + example: false + entity_send_time: + description: "The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24" + type: integer + example: 9 + shared_invoice_credit_counter: + description: "Determines if the invoice and credit counter are shared" + type: boolean + example: false + reply_to_name: + description: "The reply to name for emails" + type: string + example: "Bob Smith" + hide_empty_columns_on_pdf: + description: "Determines if empty columns are hidden on PDFs" + type: boolean + example: false + enable_reminder_endless: + description: "Determines if endless reminders are enabled" + type: boolean + example: false + use_credits_payment: + description: "Determines if credits can be used as a payment method" + type: boolean + example: false + recurring_invoice_number_pattern: + description: "The pattern for recurring invoice numbers" + type: string + example: "R-000000" + recurring_invoice_number_counter: + description: "The counter for recurring invoice numbers" + type: number + example: 1 + client_portal_under_payment_minimum: + description: "The minimum payment payment" + type: number + example: 10 + auto_bill_date: + description: "Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))" + type: string + example: "on_send_date" + primary_color: + description: "The primary color for the client portal / document highlights" + type: string + example: "#ffffff" + secondary_color: + description: "The secondary color for the client portal / document highlights" + type: string + example: "#ffffff" + client_portal_allow_under_payment: + description: "Determines if clients can pay invoices under the invoice amount due" + type: boolean + example: false + client_portal_allow_over_payment: + description: "Determines if clients can pay invoices over the invoice amount" + type: boolean + example: false + auto_bill: + description: "Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing" + type: string + example: "off" + client_portal_terms: + description: "The terms which are displayed on the client portal" + type: string + example: "Please see attached your invoice." + client_portal_privacy_policy: + description: "The privacy policy which is displayed on the client portal" + type: string + example: "These are the terms of use for using the client portal." + client_can_register: + description: "Determines if clients can register on the client portal" + type: boolean + example: false + portal_design_id: + description: "The design id for the client portal" + type: string + example: "hd677df" + late_fee_endless_percent: + description: "The late fee percentage for endless late fees" + type: number + example: 10 + late_fee_endless_amount: + description: "The late fee amount for endless late fees" + type: number + example: 10 + auto_email_invoice: + description: "Determines if invoices are automatically emailed when they are created" + type: boolean + example: false + email_signature: + description: "The email signature for emails" + type: string + example: "Bob Smith" + classification: + description: "The classification for the company" + type: string + example: "individual" + type: object + + Design: + properties: + id: + description: 'The design hashed id' type: string - example: '' - tax_name2: - description: 'The tax name' + example: AS3df3A + name: + description: 'The design name' type: string - example: '' - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' + example: Beauty + design: + description: 'The design HTML' type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the invoice' - type: number - format: float - example: '10.00' - readOnly: true - line_items: - type: array - description: 'An array of objects which define the line items of the invoice' - items: - $ref: '#/components/schemas/InvoiceItem' - invitations: - type: array - description: 'An array of objects which define the invitations of the invoice' - items: - $ref: '#/components/schemas/InvoiceInvitationRequest' - amount: - description: 'The invoice amount' - type: number - format: float - example: '10.00' - readOnly: true - balance: - description: 'The invoice balance' - type: number - format: float - example: '10.00' - readOnly: true - paid_to_date: - description: 'The amount paid on the invoice to date' - type: number - format: float - example: '10.00' - readOnly: true - discount: - description: 'The invoice discount, can be an amount or a percentage' - type: number - format: float - example: '10.00' - partial: - description: 'The deposit/partial amount' - type: number - format: float - example: '10.00' - is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' + example: '' + is_custom: + description: 'Flag to determine if the design is a custom user design' type: boolean example: true - is_deleted: - description: 'Defines if the invoice has been deleted' + is_active: + description: 'Flag to determine if the design is available for use' type: boolean example: true - readOnly: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' + is_deleted: + description: 'Flag to determine if the design is deleted' type: boolean example: true - date: - description: 'The Invoice Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the invoice was sent out' - type: string - format: date - example: '1994-07-30' - readOnly: true - next_send_date: - description: 'The Next date for a reminder to be sent' - type: string - format: date - example: '1994-07-30' - readOnly: true - partial_due_date: - description: 'The due date for the deposit/partial amount' - type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date of the invoice' - type: string - format: date - example: '1994-07-30' - last_viewed: + created_at: description: Timestamp type: number format: integer - example: '1434342123' - readOnly: true + example: '134341234234' updated_at: description: Timestamp type: number format: integer - example: '1434342123' - readOnly: true - archived_at: + example: '134341234234' + deleted_at: description: Timestamp type: number format: integer - example: '1434342123' - readOnly: true - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean + example: '134341234234' + type: object + ClientSettings: + required: + - currency_id + properties: + currency_id: + description: 'The default currency id' + type: string example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' + timezone_id: + description: 'The timezone id' + type: string + example: '15' + date_format_id: + description: 'The date format id' + type: string + example: '15' + military_time: + description: 'Toggles 12/24 hour time' type: boolean example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' + language_id: + description: 'The language id' + type: string + example: '1' + show_currency_code: + description: 'Toggles whether the currency symbol or code is shown' type: boolean example: true - project_id: - description: 'The project associated with this invoice' - type: string - example: Opnel5aKBz - type: object - RecurringQuote: - properties: - id: - description: 'The hashed id of the recurring quote' + payment_terms: + description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' + type: integer + example: '1' + company_gateway_ids: + description: 'A commad separate list of available gateways' type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' + example: '1,2,3,4' + custom_value1: + description: 'A Custom Label' type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user hashed id' + example: 'Custom Label' + custom_value2: + description: 'A Custom Label' type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' + example: 'Custom Label' + custom_value3: + description: 'A Custom Label' type: string - example: Opnel5aKBz - status_id: - description: 'The quote status variable' + example: 'Custom Label' + custom_value4: + description: 'A Custom Label' type: string - example: '4' - frequency_id: - description: 'The recurring quote frequency' - type: number - example: '4' - remaining_cycles: - description: 'The number of quotes left to be generated' + example: 'Custom Label' + default_task_rate: + description: 'The default task rate' type: number - example: '4' - number: - description: 'The recurringquote number - is a unique alpha numeric number per quote per company' - type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this recurring quote' - type: string - example: PO-1234 - terms: - description: 'The quote terms' - type: string - example: 'These are quote terms' - public_notes: - description: 'The public notes of the quote' + format: float + example: '10.00' + send_reminders: + description: 'Toggles whether reminders are sent' + type: boolean + example: true + enable_client_portal_tasks: + description: 'Show/hide the tasks panel in the client portal' + type: boolean + example: true + email_style: + description: 'options include plain,light,dark,custom' type: string - example: 'These are some public notes' - private_notes: - description: 'The private notes of the quote' + example: light + reply_to_email: + description: 'The reply to email address' type: string - example: 'These are some private notes' - footer: - description: 'The quote footer notes' + example: email@gmail.com + bcc_email: + description: 'A comma separate list of BCC emails' type: string - example: '' - custom_value1: - description: 'A custom field value' + example: 'email@gmail.com, contact@gmail.com' + pdf_email_attachment: + description: 'Toggles whether to attach PDF as attachment' + type: boolean + example: true + ubl_email_attachment: + description: 'Toggles whether to attach UBL as attachment' + type: boolean + example: true + email_style_custom: + description: 'The custom template' type: string - example: '2022-10-01' - custom_value2: - description: 'A custom field value' + example: '' + counter_number_applied: + description: 'enum when the invoice number counter is set, ie when_saved, when_sent, when_paid' type: string - example: 'Something custom' - custom_value3: - description: 'A custom field value' + example: when_sent + quote_number_applied: + description: 'enum when the quote number counter is set, ie when_saved, when_sent' type: string - example: '' - custom_value4: - description: 'A custom field value' + example: when_sent + custom_message_dashboard: + description: 'A custom message which is displayed on the dashboard' type: string - example: '' - tax_name1: - description: 'The tax name' + example: 'Please pay invoices immediately' + custom_message_unpaid_invoice: + description: 'A custom message which is displayed in the client portal when a client is viewing a unpaid invoice.' type: string - example: '' - tax_name2: - description: 'The tax name' + example: 'Please pay invoices immediately' + custom_message_paid_invoice: + description: 'A custom message which is displayed in the client portal when a client is viewing a paid invoice.' type: string - example: '' - tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '10.00' - tax_name3: - description: 'The tax name' + example: 'Thanks for paying this invoice!' + custom_message_unapproved_quote: + description: 'A custom message which is displayed in the client portal when a client is viewing a unapproved quote.' type: string - example: '' - tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the quote' - type: number - format: float - example: '10.00' - line_items: - description: 'An array of objects which define the line items of the quote' - type: object - example: '' - amount: - description: 'The quote amount' - type: number - format: float - example: '10.00' - balance: - description: 'The quote balance' - type: number - format: float - example: '10.00' - paid_to_date: - description: 'The amount paid on the quote to date' - type: number - format: float - example: '10.00' - discount: - description: 'The quote discount, can be an amount or a percentage' - type: number - format: float - example: '10.00' - partial: - description: 'The deposit/partial amount' - type: number - format: float - example: '10.00' - is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' + example: 'Please approve quote' + lock_invoices: + description: 'Toggles whether invoices are locked once sent and cannot be modified further' type: boolean example: true - is_deleted: - description: 'Defines if the quote has been deleted' + auto_archive_invoice: + description: 'Toggles whether a invoice is archived immediately following payment' type: boolean example: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' + auto_archive_quote: + description: 'Toggles whether a quote is archived after being converted to a invoice' type: boolean example: true - date: - description: 'The quote Date' + auto_convert_quote: + description: 'Toggles whether a quote is converted to a invoice when approved' + type: boolean + example: true + inclusive_taxes: + description: 'Boolean flag determining whether inclusive or exclusive taxes are used' + type: boolean + example: true + task_number_pattern: + description: 'Allows customisation of the task number pattern' type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the quote was sent out' + example: '{$year}-{$counter}' + task_number_counter: + description: 'The incrementing counter for tasks' + type: integer + example: '1' + reminder_send_time: + description: 'Time from UTC +0 when the email will be sent to the client' + type: integer + example: '32400' + expense_number_pattern: + description: 'Allows customisation of the expense number pattern' type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The Next date for a reminder to be sent' + example: '{$year}-{$counter}' + expense_number_counter: + description: 'The incrementing counter for expenses' + type: integer + example: '1' + vendor_number_pattern: + description: 'Allows customisation of the vendor number pattern' type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the deposit/partial amount' + example: '{$year}-{$counter}' + vendor_number_counter: + description: 'The incrementing counter for vendors' + type: integer + example: '1' + ticket_number_pattern: + description: 'Allows customisation of the ticket number pattern' type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date of the quote' + example: '{$year}-{$counter}' + ticket_number_counter: + description: 'The incrementing counter for tickets' + type: integer + example: '1' + payment_number_pattern: + description: 'Allows customisation of the payment number pattern' type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: Timestamp - type: number - format: integer - example: '1434342123' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge2: - description: 'Second Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge3: - description: 'Third Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge4: - description: 'Fourth Custom Surcharge' - type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' + example: '{$year}-{$counter}' + payment_number_counter: + description: 'The incrementing counter for payments' + type: integer + example: '1' + invoice_number_pattern: + description: 'Allows customisation of the invoice number pattern' + type: string + example: '{$year}-{$counter}' + invoice_number_counter: + description: 'The incrementing counter for invoices' + type: integer + example: '1' + quote_number_pattern: + description: 'Allows customisation of the quote number pattern' + type: string + example: '{$year}-{$counter}' + quote_number_counter: + description: 'The incrementing counter for quotes' + type: integer + example: '1' + client_number_pattern: + description: 'Allows customisation of the client number pattern' + type: string + example: '{$year}-{$counter}' + client_number_counter: + description: 'The incrementing counter for clients' + type: integer + example: '1' + credit_number_pattern: + description: 'Allows customisation of the credit number pattern' + type: string + example: '{$year}-{$counter}' + credit_number_counter: + description: 'The incrementing counter for credits' + type: integer + example: '1' + recurring_invoice_number_prefix: + description: 'This string is prepended to the recurring invoice number' + type: string + example: R + reset_counter_frequency_id: + description: 'CONSTANT which is used to apply the frequency which the counters are reset' + type: integer + example: '1' + reset_counter_date: + description: 'The explicit date which is used to reset counters' + type: string + example: '2019-01-01' + counter_padding: + description: 'Pads the counter with leading zeros' + type: integer + example: '1' + shared_invoice_quote_counter: + description: 'Flags whether to share the counter for invoices and quotes' type: boolean example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' + update_products: + description: 'Determines if client fields are updated from third party APIs' type: boolean example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' + convert_products: + description: '' type: boolean example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' + fill_products: + description: 'Automatically fill products based on product_key' type: boolean example: true - type: object - Client: - properties: - id: - description: 'The unique identifier of the client' + invoice_terms: + description: 'The default invoice terms' type: string - example: Opnel5aKBz - readOnly: true - contacts: - type: array - items: - $ref: '#/components/schemas/ClientContact' - user_id: - description: 'The unique identifier of the user who created the client' + example: 'Invoice Terms are...' + quote_terms: + description: 'The default quote terms' type: string - example: Ua6Rw4pVbS - readOnly: true - assigned_user_id: - description: 'The unique identifier of the user who has been assigned the client' + example: 'Quote Terms are...' + invoice_taxes: + description: 'Taxes can be applied to the invoice' + type: number + example: '1' + invoice_design_id: + description: 'The default design id (invoice, quote etc)' type: string - example: Ua6Rw4pVbS - name: - description: 'The name of the client company or organization' + example: '1' + quote_design_id: + description: 'The default design id (invoice, quote etc)' type: string - example: "Jim's Housekeeping" - website: - description: 'The website URL of the client company or organization' + example: '1' + invoice_footer: + description: 'The default invoice footer' type: string - example: 'https://www.jims-housekeeping.com' - private_notes: - description: 'Notes that are only visible to the user who created the client' + example: '1' + invoice_labels: + description: 'JSON string of invoice labels' type: string - example: 'Client prefers email communication over phone calls' - client_hash: - description: 'A unique hash value for the client' + example: '1' + tax_rate1: + description: 'The tax rate (float)' + type: number + example: '10' + tax_name1: + description: 'The tax name' type: string - example: asdfkjhk342hjhbfdvmnfb1 - readOnly: true - industry_id: - description: 'The unique identifier of the industry the client operates in' + example: GST + tax_rate2: + description: 'The tax rate (float)' type: number - example: '5' - size_id: - description: 'The unique identifier for the size category of the client company or organization' + example: '10' + tax_name2: + description: 'The tax name' + type: string + example: GST + tax_rate3: + description: 'The tax rate (float)' type: number - example: '2' - address1: - description: "First line of the client's address" + example: '10' + tax_name3: + description: 'The tax name' type: string - example: '123 Main St' - address2: - description: "Second line of the client's address, if needed" + example: GST + payment_type_id: + description: 'The default payment type id' type: string - example: 'Apt 4B' - city: - description: 'The city the client is located in' + example: '1' + custom_fields: + description: 'JSON string of custom fields' type: string - example: 'Beverly Hills' - state: - description: 'The state, province, or locality the client is located in' + example: '{}' + email_footer: + description: 'The default email footer' type: string - example: 'California' - postal_code: - description: 'The postal code or ZIP code of the client' + example: 'A default email footer' + email_sending_method: + description: 'The email driver to use to send email, options include default, gmail' type: string - example: '90210' - phone: - description: "The client's phone number" + example: default + gmail_sending_user_id: + description: 'The hashed_id of the user account to send email from' type: string - example: '555-3434-3434' - country_id: - description: "The unique identifier of the client's country" - type: number - format: integer - example: '1' - custom_value1: - description: 'A custom field for storing additional information' + example: F76sd34D + email_subject_invoice: + description: '' type: string - example: 'Preferred contact: Email' - custom_value2: - description: 'A custom field for storing additional information' + example: 'Your Invoice Subject' + email_subject_quote: + description: '' type: string - example: 'Account manager: John Doe' - custom_value3: - description: 'A custom field for storing additional information' + example: 'Your Quote Subject' + email_subject_payment: + description: '' type: string - example: 'VIP client: Yes' - custom_value4: - description: 'A custom field for storing additional information' + example: 'Your Payment Subject' + email_template_invoice: + description: 'The full template for invoice emails' + type: string + example: '' + email_template_quote: + description: 'The full template for quote emails' + type: string + example: '' + email_template_payment: + description: 'The full template for payment emails' + type: string + example: '' + email_subject_reminder1: + description: 'Email subject for Reminder' + type: string + example: '' + email_subject_reminder2: + description: 'Email subject for Reminder' + type: string + example: '' + email_subject_reminder3: + description: 'Email subject for Reminder' + type: string + example: '' + email_subject_reminder_endless: + description: 'Email subject for endless reminders' + type: string + example: '' + email_template_reminder1: + description: 'The full template for Reminder 1' + type: string + example: '' + email_template_reminder2: + description: 'The full template for Reminder 2' + type: string + example: '' + email_template_reminder3: + description: 'The full template for Reminder 3' + type: string + example: '' + email_template_reminder_endless: + description: 'The full template for enless reminders' + type: string + example: '' + enable_portal_password: + description: 'Toggles whether a password is required to log into the client portal' + type: boolean + example: true + show_accept_invoice_terms: + description: 'Toggles whether the terms dialogue is shown to the client' + type: boolean + example: true + show_accept_quote_terms: + description: 'Toggles whether the terms dialogue is shown to the client' + type: boolean + example: true + require_invoice_signature: + description: 'Toggles whether a invoice signature is required' + type: boolean + example: true + require_quote_signature: + description: 'Toggles whether a quote signature is required' + type: boolean + example: true + name: + description: 'The company name' + type: string + example: 'Acme Co' + company_logo: + description: 'The company logo file' + type: object + example: logo.png + website: + description: 'The company website URL' + type: string + example: www.acme.com + address1: + description: 'The company address line 1' type: string - example: 'Annual contract value: $50,000' - vat_number: - description: "The client's VAT (Value Added Tax) number, if applicable" + example: 'Suite 888' + address2: + description: 'The company address line 2' type: string - example: 'VAT123456' - id_number: - description: 'A unique identification number for the client, such as a tax ID or business registration number' + example: '5 Jimbo Way' + city: + description: 'The company city' type: string - number: - description: 'A system-assigned unique number for the client, typically used for invoicing purposes' + example: Sydney + state: + description: 'The company state' type: string - example: 'CL-0001' - shipping_address1: - description: "First line of the client's shipping address" + example: Florisa + postal_code: + description: 'The company zip/postal code' type: string - example: '5 Wallaby Way' - shipping_address2: - description: "Second line of the client's shipping address, if needed" + example: '90210' + phone: + description: 'The company phone' type: string - example: 'Suite 5' - shipping_city: - description: "The city of the client's shipping address" + example: 555-213-3948 + email: + description: 'The company email' type: string - example: 'Perth' - shipping_state: - description: "The state, province, or locality of the client's shipping address" + example: joe@acme.co + country_id: + description: 'The country ID' type: string - example: 'Western Australia' - shipping_postal_code: - description: "The postal code or ZIP code of the client's shipping address" + example: '1' + vat_number: + description: 'The company VAT/TAX ID number' type: string - example: '6110' - shipping_country_id: - description: "The unique identifier of the country for the client's shipping address" - type: number - format: integer - example: '4' - is_deleted: - description: 'A boolean value indicating whether the client has been deleted or not' - type: boolean - example: false - readOnly: true - balance: - description: 'The outstanding balance the client owes' - type: number - format: float - example: '500.00' - readOnly: true - paid_to_date: - description: 'The total amount the client has paid to date' - type: number - format: float - example: '2000.00' - readOnly: true - credit_balance: - description: 'The available credit balance for the client to use on future purchases' - type: number - format: float - example: '100.00' - readOnly: true - last_login: - description: "The timestamp of the client's last login" - type: number - format: integer - example: '1628686031' - readOnly: true - created_at: - description: 'The timestamp when the client was created' - type: number - format: integer - example: '1617629031' - readOnly: true - updated_at: - description: 'The timestamp when the client was last updated' + example: '32 120 377 720' + page_size: + description: 'The default page size' + type: string + example: A4 + font_size: + description: 'The font size' type: number - format: integer - example: '1628445631' - readOnly: true - group_settings_id: - description: 'The group settings assigned to the client' + example: '9' + primary_font: + description: 'The primary font' type: string - example: Opnel5aKBz - routing_id: - description: 'The routing address id for e-invoicing for this client' + example: roboto + secondary_font: + description: 'The secondary font' type: string - example: Opnel5aKBz3489-dfkiu-2239-sdsd - is_tax_exempt: - description: 'Flag which defines if the client is exempt from taxes' + example: roboto + hide_paid_to_date: + description: 'Flags whether to hide the paid to date field' type: boolean example: false - has_valid_vat_number: - description: 'Flag which defines if the client has a valid VAT number' + embed_documents: + description: 'Toggled whether to embed documents in the PDF' type: boolean example: false - readOnly: true - payment_balance: - description: 'Defines the payment balance the client has on file (pre payments / over payments / unapplied amounts)' - type: number - example: 100 - readOnly: true - settings: - $ref: '#/components/schemas/ClientSettings' - type: object - PaymentTerm: - properties: - num_days: - description: 'The payment term length in days' - type: integer - example: '1' - name: - description: 'The payment term length in string format' + all_pages_header: + description: 'The header for the PDF' + type: boolean + example: false + all_pages_footer: + description: 'The footer for the PDF' + type: boolean + example: false + document_email_attachment: + description: 'Toggles whether to attach documents in the email' + type: boolean + example: false + enable_client_portal_password: + description: 'Toggles password protection of the client portal' + type: boolean + example: false + enable_email_markup: + description: 'Toggles the use of markdown in emails' + type: boolean + example: false + enable_client_portal_dashboard: + description: 'Toggles whether the client dashboard is shown in the client portal' + type: boolean + example: false + enable_client_portal: + description: 'Toggles whether the entire client portal is displayed to the client, or only the context' + type: boolean + example: false + email_template_statement: + description: 'The body of the email for statements' type: string - example: 'NET 1' - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - archived_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - Product: - type: object - properties: - id: + example: 'template matter' + email_subject_statement: + description: 'The subject of the email for statements' type: string - description: 'The hashed product ID.' - example: eP01N - readOnly: true - user_id: + example: 'subject matter' + signature_on_pdf: + description: 'Toggles whether the signature (if available) is displayed on the PDF' + type: boolean + example: false + quote_footer: + description: 'The default quote footer' type: string - description: 'The hashed ID of the user that created this product.' - example: n30m4 - readOnly: true - assigned_user_id: + example: 'the quote footer' + email_subject_custom1: + description: 'Custom reminder template subject' type: string - description: 'The hashed ID of the user assigned to this product.' - example: pR0j3 - project_id: + example: 'Custom Subject 1' + email_subject_custom2: + description: 'Custom reminder template subject' type: string - description: 'The hashed ID of the project that this product is associated with.' - example: pR0j3 - vendor_id: + example: 'Custom Subject 2' + email_subject_custom3: + description: 'Custom reminder template subject' type: string - description: 'The hashed ID of the vendor that this product is associated with.' - example: pR0j3 - custom_value1: + example: 'Custom Subject 3' + email_template_custom1: + description: 'Custom reminder template body' type: string - description: 'Custom value field 1.' - example: 'Custom value 1' - custom_value2: + example: '' + email_template_custom2: + description: 'Custom reminder template body' type: string - description: 'Custom value field 2.' - example: 'Custom value 2' - custom_value3: + example: '' + email_template_custom3: + description: 'Custom reminder template body' type: string - description: 'Custom value field 3.' - example: 'Custom value 3' - custom_value4: + example: '' + enable_reminder1: + description: 'Toggles whether this reminder is enabled' + type: boolean + example: false + enable_reminder2: + description: 'Toggles whether this reminder is enabled' + type: boolean + example: false + enable_reminder3: + description: 'Toggles whether this reminder is enabled' + type: boolean + example: false + num_days_reminder1: + description: 'The Reminder interval' + type: number + example: '9' + num_days_reminder2: + description: 'The Reminder interval' + type: number + example: '9' + num_days_reminder3: + description: 'The Reminder interval' + type: number + example: '9' + schedule_reminder1: + description: '(enum: after_invoice_date, before_due_date, after_due_date)' type: string - description: 'Custom value field 4.' - example: 'Custom value 4' - product_key: + example: after_invoice_date + schedule_reminder2: + description: '(enum: after_invoice_date, before_due_date, after_due_date)' type: string - description: 'The product key.' - example: '1234' - notes: + example: after_invoice_date + schedule_reminder3: + description: '(enum: after_invoice_date, before_due_date, after_due_date)' type: string - description: 'Notes about the product.' - example: 'These are some notes about the product.' - cost: + example: after_invoice_date + late_fee_amount1: + description: 'The late fee amount for reminder 1' type: number - format: double - description: 'The cost of the product. (Your purchase price for this product)' - example: 10.0 - price: + example: 10 + late_fee_amount2: + description: 'The late fee amount for reminder 2' type: number - format: double - description: 'The price of the product that you are charging.' - example: 20.0 - quantity: + example: 20 + late_fee_amount3: + description: 'The late fee amount for reminder 2' type: number - format: double - description: 'The quantity of the product. (used as a default)' - example: 5.0 - tax_name1: + example: 100 + endless_reminder_frequency_id: + description: 'The frequency id of the endless reminder' type: string - description: 'The name of tax 1.' - example: 'Tax 1' - tax_rate1: - type: number - format: double - description: 'The rate of tax 1.' - example: 10.0 - tax_name2: + example: '1' + client_online_payment_notification: + description: 'Determines if a client should receive the notification for a online payment' + type: boolean + example: false + client_manual_payment_notification: + description: 'Determines if a client should receive the notification for a manually entered payment' + type: boolean + example: false + enable_e_invoice: + description: 'Determines if e-invoicing is enabled' + type: boolean + example: false + default_expense_payment_type_id: + description: 'The default payment type for expenses' type: string - description: 'The name of tax 2.' - example: 'Tax 2' - tax_rate2: + example: '0' + e_invoice_type: + description: 'The e-invoice type' + type: string + example: 'EN16931' + mailgun_endpoint: + description: 'The mailgun endpoint - used to determine whether US or EU endpoints are used' + type: string + example: 'api.mailgun.net or api.eu.mailgun.net' + client_initiated_payments: + description: 'Determines if clients can initiate payments directly from the client portal' + type: boolean + example: false + client_initiated_payments_minimum: + description: 'The minimum amount a client can pay' type: number - format: double - description: 'The rate of tax 2.' - example: 5.0 - tax_name3: + example: 10 + sync_invoice_quote_columns: + description: 'Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns' + type: boolean + example: false + show_task_item_description: + description: 'Determines if the task item description is shown on the invoice' + type: boolean + example: false + allow_billable_task_items: + description: 'Determines if task items can be marked as billable' + type: boolean + example: false + accept_client_input_quote_approval: + description: 'Determines if clients can approve quotes and also pass through a PO Number reference' + type: boolean + example: false + custom_sending_email: + description: 'When using Mailgun or Postmark, the FROM email address can be customized using this setting.' type: string - description: 'The name of tax 3.' - example: 'Tax 3' - tax_rate3: + example: 'bob@gmail.com' + show_paid_stamp: + description: 'Determines if the PAID stamp is shown on the invoice' + type: boolean + example: false + show_shipping_address: + description: 'Determines if the shipping address is shown on the invoice' + type: boolean + example: false + company_logo_size: + description: 'The size of the company logo on the PDF - percentage value between 0 and 100' type: number - format: double - description: 'The rate of tax 3.' - example: 0.0 - archived_at: - type: integer - format: timestamp - description: 'The timestamp when the product was archived.' - example: '2022-03-18T15:00:00Z' - readOnly: true - created_at: - type: integer - format: timestamp - description: 'The timestamp when the product was created.' - example: '2022-03-18T15:00:00Z' - readOnly: true - updated_at: - description: Timestamp - type: integer - format: timestamp - example: '2022-03-18T12:34:56.789Z' - readOnly: true - is_deleted: + example: 100 + show_email_footer: + description: 'Determines if the email footer is shown on emails' type: boolean - description: 'Boolean flag determining if the product has been deleted' example: false - readOnly: true - in_stock_quantity: - type: integer - format: int32 - description: The quantity of the product that is currently in stock - default: 0 - stock_notification: + email_alignment: + description: 'The alignment of the email body text, options include left / center / right' + type: string + example: 'left' + auto_bill_standard_invoices: + description: 'Determines if standard invoices are automatically billed when they are created or due' type: boolean - description: Indicates whether stock notifications are enabled for this product - default: true - stock_notification_threshold: - type: integer - format: int32 - description: The minimum quantity threshold for which stock notifications will be triggered - default: 0 - max_quantity: - type: integer - format: int32 - description: The maximum quantity that can be ordered for this product - product_image: + example: false + postmark_secret: + description: 'The Postmark secret API key' type: string - description: The URL of the product image - format: uri-reference - tax_id: + example: '123456' + mailgun_secret: + description: 'The Mailgun secret API key' type: string - default: '1' - description: | - The tax category id for this product.' - - 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' - ``` - example: '1' - - Meta: - properties: - pagination: - $ref: '#/components/schemas/Pagination' - Pagination: - type: object - properties: - total: - type: integer - description: 'The total number of items' - example: 1 - readOnly: true - count: - type: integer - description: 'The number of items per page' - example: 1 - readOnly: true - per_page: - type: integer - description: 'The number of items per page' - example: 1 - readOnly: true - current_page: - type: integer - description: 'The current page number' - example: 1 - readOnly: true - total_pages: - type: integer - description: 'The total number of pages' - example: 1 - readOnly: true - links: - type: object - description: 'The pagination links' - readOnly: true - ClientContactRequest: - properties: - id: - description: 'The hashed if of the contact' + example: '123456' + mailgun_domain: + description: 'The Mailgun domain' + type: string + example: 'sandbox123456.mailgun.org' + send_email_on_mark_paid: + description: 'Determines if an email is sent when an invoice is marked as paid' + type: boolean + example: false + vendor_portal_enable_uploads: + description: 'Determines if vendors can upload files to the portal' + type: boolean + example: false + besr_id: + description: 'The BESR ID' type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' + example: '123456' + qr_iban: + description: 'The IBAN for the QR code' type: string - example: John - last_name: - description: 'The last name of the contact' + example: 'CH123456' + email_subject_purchase_order: + description: 'The email subject for purchase orders' type: string - example: Doe - phone: - description: 'The phone number of the contact' + example: 'Purchase Order' + email_template_purchase_order: + description: 'The email template for purchase orders' type: string - example: 555-152-4524 - custom_value1: - description: 'A Custom field value' + example: 'Please see attached your purchase order.' + require_purchase_order_signature: + description: 'Determines if a signature is required on purchase orders' + type: boolean + example: false + purchase_order_public_notes: + description: 'The public notes for purchase orders' type: string - example: '' - custom_value2: - description: 'A Custom field value' + example: 'Please see attached your purchase order.' + purchase_order_terms: + description: 'The terms for purchase orders' type: string - example: '' - custom_value3: - description: 'A Custom field value' + example: 'Please see attached your purchase order.' + purchase_order_footer: + description: 'The footer for purchase orders' type: string - example: '' - custom_value4: - description: 'A Custom field value' + example: 'Please see attached your purchase order.' + purchase_order_design_id: + description: 'The design id for purchase orders' type: string - example: '' - email: - description: 'The email of the contact' + example: 'hd677df' + purchase_order_number_pattern: + description: 'The pattern for purchase order numbers' type: string - example: '' - password: - description: 'The hashed password of the contact' + example: 'PO-000000' + purchase_order_number_counter: + description: 'The counter for purchase order numbers' + type: number + example: 1 + page_numbering_alignment: + description: 'The alignment for page numbering: options include left / center / right' type: string - example: '*****' - send_email: - description: 'Boolean value determines is this contact should receive emails' + example: 'left' + page_numbering: + description: 'Determines if page numbering is enabled on Document PDFs' type: boolean - example: true - type: object - Design: - properties: - id: - description: 'The design hashed id' - type: string - example: AS3df3A - name: - description: 'The design name' + example: false + auto_archive_invoice_cancelled: + description: 'Determines if invoices are automatically archived when they are cancelled' + type: boolean + example: false + email_from_name: + description: 'The FROM name for emails when using Custom emailers' type: string - example: Beauty - design: - description: 'The design HTML' + example: 'Bob Smith' + show_all_tasks_client_portal: + description: 'Determines if all tasks are shown on the client portal' + type: boolean + example: false + entity_send_time: + description: 'The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24' + type: integer + example: 9 + shared_invoice_credit_counter: + description: 'Determines if the invoice and credit counter are shared' + type: boolean + example: false + reply_to_name: + description: 'The reply to name for emails' type: string - example: '' - is_custom: - description: 'Flag to determine if the design is a custom user design' + example: 'Bob Smith' + hide_empty_columns_on_pdf: + description: 'Determines if empty columns are hidden on PDFs' type: boolean - example: true - is_active: - description: 'Flag to determine if the design is available for use' + example: false + enable_reminder_endless: + description: 'Determines if endless reminders are enabled' type: boolean - example: true - is_deleted: - description: 'Flag to determine if the design is deleted' + example: false + use_credits_payment: + description: 'Determines if credits can be used as a payment method' type: boolean - example: true - created_at: - description: Timestamp + example: false + recurring_invoice_number_pattern: + description: 'The pattern for recurring invoice numbers' + type: string + example: 'R-000000' + recurring_invoice_number_counter: + description: 'The counter for recurring invoice numbers' type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp + example: 1 + client_portal_under_payment_minimum: + description: 'The minimum payment payment' type: number - format: integer - example: '134341234234' - deleted_at: - description: Timestamp + example: 10 + auto_bill_date: + description: 'Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))' + type: string + example: 'on_send_date' + primary_color: + description: 'The primary color for the client portal / document highlights' + type: string + example: '#ffffff' + secondary_color: + description: 'The secondary color for the client portal / document highlights' + type: string + example: '#ffffff' + client_portal_allow_under_payment: + description: 'Determines if clients can pay invoices under the invoice amount due' + type: boolean + example: false + client_portal_allow_over_payment: + description: 'Determines if clients can pay invoices over the invoice amount' + type: boolean + example: false + auto_bill: + description: 'Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing' + type: string + example: 'off' + client_portal_terms: + description: 'The terms which are displayed on the client portal' + type: string + example: 'Please see attached your invoice.' + client_portal_privacy_policy: + description: 'The privacy policy which is displayed on the client portal' + type: string + example: 'These are the terms of use for using the client portal.' + client_can_register: + description: 'Determines if clients can register on the client portal' + type: boolean + example: false + portal_design_id: + description: 'The design id for the client portal' + type: string + example: 'hd677df' + late_fee_endless_percent: + description: 'The late fee percentage for endless late fees' type: number - format: integer - example: '134341234234' + example: 10 + late_fee_endless_amount: + description: 'The late fee amount for endless late fees' + type: number + example: 10 + auto_email_invoice: + description: 'Determines if invoices are automatically emailed when they are created' + type: boolean + example: false + email_signature: + description: 'The email signature for emails' + type: string + example: 'Bob Smith' type: object - Vendor: + BTRules: properties: - id: - description: 'The hashed id of the vendor. This is a unique identifier for the vendor.' + data_key: + description: 'The key to search' type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The hashed id of the user who created the vendor. This is a unique identifier for the user.' + example: 'description,amount' + operator: + description: 'The operator flag of the search' type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The hashed id of the assigned user to this vendor. This is a unique identifier for the user.' + example: '>' + value: + description: 'The value to search for' type: string - example: Opnel5aKBz - contacts: - type: array - items: - $ref: '#/components/schemas/VendorContact' - description: 'An array of contacts associated with the vendor.' - name: - description: 'The name of the vendor.' + example: bob + type: object + Account: + properties: + id: + description: 'The account hashed id' type: string - example: 'Harry cafe de wheels' - classification: - description: 'The classification of the vendor.' + example: AS3df3A + account_sms_verified: + description: 'Boolean flag if the account has been verified by sms' type: string - example: 'individual' - website: - description: 'The website of the vendor.' + example: true + type: object + Invoice: + properties: + id: + description: 'The invoice hashed id' type: string - example: www.harry.com - private_notes: - description: 'The private notes of the vendor. These notes are only visible to users with appropriate permissions.' + example: Opnel5aKBz + readOnly: true + user_id: + description: 'The user hashed id' type: string - example: 'Shhh, do not tell the vendor' - industry_id: - description: 'The industry id of the vendor. This is a unique identifier for the industry.' + example: Opnel5aKBz + readOnly: true + assigned_user_id: + description: 'The assigned user hashed id' type: string - example: '1' - size_id: - description: 'The size id of the vendor. This is a unique identifier for the size of the vendor.' + example: Opnel5aKBz + client_id: + description: 'The client hashed id' type: string - example: '' - address1: - description: 'The first line of the vendor''s address.' + example: Opnel5aKBz + status_id: + description: 'The invoice status variable' type: string - example: '' - address2: - description: 'The second line of the vendor''s address.' + example: '4' + number: + description: 'The invoice number - is a unique alpha numeric number per invoice per company' type: string - example: '' - city: - description: 'The city of the vendor''s address.' + example: INV_101 + po_number: + description: 'The purchase order associated with this invoice' type: string - example: '' - state: - description: 'The state of the vendor''s address.' + example: PO-1234 + terms: + description: 'The invoice terms' type: string - example: '' - postal_code: - description: 'The postal code of the vendor''s address.' + example: 'These are invoice terms' + public_notes: + description: 'The public notes of the invoice' type: string - example: '' - phone: - description: 'The phone number of the vendor.' + example: 'These are some public notes' + private_notes: + description: 'The private notes of the invoice' type: string - example: 555-3434-3434 - country_id: - description: 'The country id of the vendor. This is a unique identifier for the country.' + example: 'These are some private notes' + footer: + description: 'The invoice footer notes' type: string example: '' - currency_id: - description: 'The currency id of the vendor. This is a unique identifier for the currency.' - type: string - example: '4' custom_value1: - description: 'The value of the first custom field for the vendor.' + description: 'A custom field value' type: string - example: '' + example: '2022-10-01' custom_value2: - description: 'The value of the second custom field for the vendor.' + description: 'A custom field value' type: string - example: '' + example: 'Something custom' custom_value3: - description: 'The value of the third custom field for the vendor.' + description: 'A custom field value' type: string example: '' custom_value4: - description: 'The value of the fourth custom field for the vendor.' + description: 'A custom field value' type: string example: '' - vat_number: - description: 'The VAT number of the vendor.' + tax_name1: + description: 'The tax name' type: string example: '' - id_number: - description: 'The ID number of the vendor.' + tax_name2: + description: 'The tax name' type: string example: '' - number: - description: 'The number of the vendor' + tax_rate1: + description: 'The tax rate' + type: number + format: float + example: '10.00' + tax_rate2: + description: 'The tax rate' + type: number + format: float + example: '10.00' + tax_name3: + description: 'The tax name' type: string - example: '11234' + example: '' + tax_rate3: + description: 'The tax rate' + type: number + format: float + example: '10.00' + total_taxes: + description: 'The total taxes for the invoice' + type: number + format: float + example: '10.00' + line_items: + type: array + description: 'An array of objects which define the line items of the invoice' + items: + $ref: '#/components/schemas/InvoiceItem' + invitations: + type: array + description: 'An array of objects which define the invitations of the invoice' + items: + $ref: '#/components/schemas/InvoiceInvitation' + amount: + description: 'The invoice amount' + type: number + format: float + example: '10.00' + balance: + description: 'The invoice balance' + type: number + format: float + example: '10.00' + paid_to_date: + description: 'The amount paid on the invoice to date' + type: number + format: float + example: '10.00' + discount: + description: 'The invoice discount, can be an amount or a percentage' + type: number + format: float + example: '10.00' + partial: + description: 'The deposit/partial amount' + type: number + format: float + example: '10.00' + is_amount_discount: + description: 'Flag determining if the discount is an amount or a percentage' + type: boolean + example: true is_deleted: - description: 'Boolean flag determining if the vendor has been deleted' + description: 'Defines if the invoice has been deleted' type: boolean example: true - language_id: - description: 'The language id of the vendor. This is a unique identifier for the language.' + uses_inclusive_taxes: + description: 'Defines the type of taxes used as either inclusive or exclusive' + type: boolean + example: true + date: + description: 'The Invoice Date' type: string - example: '1' - vendor_hash: - description: 'The vendor hash of the vendor. This is a unique identifier for the vendor.' + format: date + example: '1994-07-30' + last_sent_date: + description: 'The last date the invoice was sent out' type: string - example: 'aaa-sss-www' - readOnly: true - transaction_name: - description: 'The transaction name of the vendor.' + format: date + example: '1994-07-30' + next_send_date: + description: 'The Next date for a reminder to be sent' type: string - example: 'aaa-sss-www' - last_login: + format: date + example: '1994-07-30' + partial_due_date: + description: 'The due date for the deposit/partial amount' + type: string + format: date + example: '1994-07-30' + due_date: + description: 'The due date of the invoice' + type: string + format: date + example: '1994-07-30' + last_viewed: description: Timestamp type: number format: integer - example: '134341234234' - readOnly: true - created_at: + example: '1434342123' + updated_at: description: Timestamp type: number format: integer - example: '134341234234' - readOnly: true - updated_at: + example: '1434342123' + archived_at: description: Timestamp type: number format: integer - example: '134341234234' - readOnly: true - display_name: - description: 'The display name of the vendor.' - type: string - example: 'Bob the vendor' - readOnly: true - type: object - BTRules: - properties: - data_key: - description: 'The key to search' - type: string - example: 'description,amount' - operator: - description: 'The operator flag of the search' + example: '1434342123' + custom_surcharge1: + description: 'First Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge2: + description: 'Second Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge3: + description: 'Third Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge4: + description: 'Fourth Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge_tax1: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + custom_surcharge_tax2: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + custom_surcharge_tax3: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + custom_surcharge_tax4: + description: 'Toggles charging taxes on custom surcharge amounts' + type: boolean + example: true + project_id: + description: 'The project associated with this invoice' type: string - example: '>' - value: - description: 'The value to search for' + example: Opnel5aKBz + auto_bill_tries: + description: 'The number of times the invoice has attempted to be auto billed' + type: integer + example: '1' + readOnly: true + auto_bill_enabled: + description: 'Boolean flag determining if the invoice is set to auto bill' + type: boolean + example: true + subscription_id: + description: 'The subscription associated with this invoice' type: string - example: bob + example: Opnel5aKBz + type: object ClientRequest: required: @@ -19597,878 +19886,768 @@ components: address2: description: "Second line of the client's address, if needed" type: string - example: 'Apt 4B' - city: - description: 'The city the client is located in' - type: string - example: 'Beverly Hills' - state: - description: 'The state, province, or locality the client is located in' - type: string - example: 'California' - postal_code: - description: 'The postal code or ZIP code of the client' - type: string - example: '90210' - phone: - description: "The client's phone number" - type: string - example: '555-3434-3434' - country_id: - description: "The unique identifier of the client's country" - type: number - format: integer - example: '1' - custom_value1: - description: 'A custom field for storing additional information' - type: string - example: 'Preferred contact: Email' - custom_value2: - description: 'A custom field for storing additional information' - type: string - example: 'Account manager: John Doe' - custom_value3: - description: 'A custom field for storing additional information' - type: string - example: 'VIP client: Yes' - custom_value4: - description: 'A custom field for storing additional information' - type: string - example: 'Annual contract value: $50,000' - vat_number: - description: "The client's VAT (Value Added Tax) number, if applicable" - type: string - example: 'VAT123456' - id_number: - description: 'A unique identification number for the client, such as a tax ID or business registration number' - type: string - number: - description: 'A system-assigned unique number for the client, typically used for invoicing purposes' - type: string - example: 'CL-0001' - shipping_address1: - description: "First line of the client's shipping address" - type: string - example: '5 Wallaby Way' - shipping_address2: - description: "Second line of the client's shipping address, if needed" - type: string - example: 'Suite 5' - shipping_city: - description: "The city of the client's shipping address" - type: string - example: 'Perth' - shipping_state: - description: "The state, province, or locality of the client's shipping address" - type: string - example: 'Western Australia' - shipping_postal_code: - description: "The postal code or ZIP code of the client's shipping address" - type: string - example: '6110' - shipping_country_id: - description: "The unique identifier of the country for the client's shipping address" - type: number - format: integer - example: '4' - is_deleted: - description: 'A boolean value indicating whether the client has been deleted or not' - type: boolean - example: false - readOnly: true - group_settings_id: - description: 'The group settings assigned to the client' - type: string - example: Opnel5aKBz - routing_id: - description: 'The routing address id for e-invoicing for this client' - type: string - example: Opnel5aKBz3489-dfkiu-2239-sdsd - is_tax_exempt: - description: 'Flag which defines if the client is exempt from taxes' - type: boolean - example: false - has_valid_vat_number: - description: 'Flag which defines if the client has a valid VAT number' - type: boolean - example: false - readOnly: true - classification: - description: 'The classification of the client' - type: string - example: 'individual' - settings: - $ref: '#/components/schemas/ClientSettings' - type: object - BankTransaction: - properties: - id: - description: 'The bank integration hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - example: AS3df3A - transaction_id: - description: 'The id of the transaction rule' - type: integer - example: 343434 - amount: - description: 'The transaction amount' - type: number - example: 10 - currency_id: - description: 'The currency ID of the currency' - type: string - example: '1' - account_type: - description: 'The account type' - type: string - example: creditCard - description: - description: 'The description of the transaction' - type: string - example: 'Potato purchases for kevin' - category_id: - description: 'The category id' - type: integer - example: 1 - category_type: - description: 'The category description' - type: string - example: Expenses - base_type: - description: 'Either CREDIT or DEBIT' - type: string - example: CREDIT - date: - description: 'The date of the transaction' - type: string - example: '2022-09-01' - bank_account_id: - description: 'The ID number of the bank account' - type: integer - example: '1' - type: object - - FeesAndLimits: - properties: - min_limit: - description: 'The minimum amount accepted for this gateway' - type: string - example: '2' - max_limit: - description: 'The maximum amount accepted for this gateway' - type: string - example: '2' - fee_amount: - description: 'The gateway fee amount' - type: number - format: float - example: '2.0' - fee_percent: - description: 'The gateway fee percentage' - type: number - format: float - example: '2.0' - fee_tax_name1: - description: 'Fee tax name' - type: string - example: GST - fee_tax_name2: - description: 'Fee tax name' - type: string - example: VAT - fee_tax_name3: - description: 'Fee tax name' - type: string - example: 'CA Sales Tax' - fee_tax_rate1: - description: 'The tax rate' - type: number - format: float - example: '10.0' - fee_tax_rate2: - description: 'The tax rate' - type: number - format: float - example: '17.5' - fee_tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '25.0' - fee_cap: - description: 'If set the fee amount will be no higher than this amount' - type: number - format: float - example: '2.0' - adjust_fee_percent: - description: 'Adjusts the fee to match the exact gateway fee.' - type: boolean - example: true - type: object - VendorContact: - properties: - id: - description: 'The hashed id of the vendor contact' - type: string - example: Opnel5aKBz - readOnly: true - user_id: - description: 'The hashed id of the user id' - type: string - example: Opnel5aKBz - readOnly: true - vendor_id: - description: 'The hashed id of the vendor' - type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' - type: string - example: Harry - last_name: - description: 'The last name of the contact' + example: 'Apt 4B' + city: + description: 'The city the client is located in' type: string - example: Windsor - contact_key: - description: 'A unique identifier for the contact' + example: 'Beverly Hills' + state: + description: 'The state, province, or locality the client is located in' type: string - example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a - readOnly: true - confirmation_code: - description: 'The confirmation code used to authenticate the contacts email address' + example: 'California' + postal_code: + description: 'The postal code or ZIP code of the client' type: string - example: 333-sdjkh34gbasd - readOnly: true + example: '90210' phone: - description: 'The contacts phone number' + description: "The client's phone number" type: string - example: 555-123-1234 + example: '555-3434-3434' + country_id: + description: "The unique identifier of the client's country" + type: number + format: integer + example: '1' custom_value1: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: '2022-10-10' + example: 'Preferred contact: Email' custom_value2: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: $1000 + example: 'Account manager: John Doe' custom_value3: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: '' + example: 'VIP client: Yes' custom_value4: - description: 'A custom value' + description: 'A custom field for storing additional information' type: string - example: '' - email: - description: 'The contact email address' + example: 'Annual contract value: $50,000' + vat_number: + description: "The client's VAT (Value Added Tax) number, if applicable" type: string - example: harry@windsor.com - email_verified_at: - description: 'The date which the contact confirmed their email' + example: 'VAT123456' + id_number: + description: 'A unique identification number for the client, such as a tax ID or business registration number' + type: string + number: + description: 'A system-assigned unique number for the client, typically used for invoicing purposes' + type: string + example: 'CL-0001' + shipping_address1: + description: "First line of the client's shipping address" + type: string + example: '5 Wallaby Way' + shipping_address2: + description: "Second line of the client's shipping address, if needed" + type: string + example: 'Suite 5' + shipping_city: + description: "The city of the client's shipping address" + type: string + example: 'Perth' + shipping_state: + description: "The state, province, or locality of the client's shipping address" + type: string + example: 'Western Australia' + shipping_postal_code: + description: "The postal code or ZIP code of the client's shipping address" + type: string + example: '6110' + shipping_country_id: + description: "The unique identifier of the country for the client's shipping address" type: number format: integer - example: '134341234234' + example: '4' + is_deleted: + description: 'A boolean value indicating whether the client has been deleted or not' + type: boolean + example: false readOnly: true - password: - description: 'The hashed password of the contact' + group_settings_id: + description: 'The group settings assigned to the client' type: string - example: '*****' - is_primary: - description: 'Boolean flag determining if the contact is the primary contact for the vendor' + example: Opnel5aKBz + routing_id: + description: 'The routing address id for e-invoicing for this client' + type: string + example: Opnel5aKBz3489-dfkiu-2239-sdsd + is_tax_exempt: + description: 'Flag which defines if the client is exempt from taxes' type: boolean - example: true + example: false + has_valid_vat_number: + description: 'Flag which defines if the client has a valid VAT number' + type: boolean + example: false + readOnly: true + classification: + description: 'The classification of the client' + type: string + example: 'individual' + settings: + $ref: '#/components/schemas/ClientSettings' + type: object + PaymentTerm: + properties: + num_days: + description: 'The payment term length in days' + type: integer + example: '1' + name: + description: 'The payment term length in string format' + type: string + example: 'NET 1' created_at: description: Timestamp type: number format: integer example: '134341234234' - readOnly: true updated_at: description: Timestamp type: number format: integer example: '134341234234' - readOnly: true - deleted_at: + archived_at: description: Timestamp type: number format: integer example: '134341234234' - readOnly: true type: object - InvoiceInvitationRequest: - required: - - client_contact_id + ClientContactRequest: properties: id: - description: 'The entity invitation hashed id' + description: 'The hashed if of the contact' type: string example: Opnel5aKBz readOnly: true - client_contact_id: - description: 'The client contact hashed id' + first_name: + description: 'The first name of the contact' type: string - example: Opnel5aKBz - key: - description: 'The invitation key' + example: John + last_name: + description: 'The last name of the contact' type: string - example: Opnel5aKBz4343343566236gvbb - readOnly: true - link: - description: 'The invitation link' + example: Doe + phone: + description: 'The phone number of the contact' type: string - example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' - readOnly: true - sent_date: - description: 'The invitation sent date' + example: 555-152-4524 + custom_value1: + description: 'A Custom field value' type: string - format: date-time - readOnly: true - viewed_date: - description: 'The invitation viewed date' + example: '' + custom_value2: + description: 'A Custom field value' type: string - format: date-time - readOnly: true - opened_date: - description: 'The invitation opened date' + example: '' + custom_value3: + description: 'A Custom field value' type: string - format: date-time - readOnly: true - updated_at: - description: 'Timestamp' - type: number - format: integer - example: '1434342123' - readOnly: true - archived_at: - description: 'Timestamp' - type: number - format: integer - example: '1434342123' - readOnly: true - email_error: - description: 'The email error' + example: '' + custom_value4: + description: 'A Custom field value' type: string - example: 'The email error' - readOnly: true - email_status: - description: 'The email status' + example: '' + email: + description: 'The email of the contact' type: string - readOnly: true + example: '' + password: + description: 'The hashed password of the contact' + type: string + example: '*****' + send_email: + description: 'Boolean value determines is this contact should receive emails' + type: boolean + example: true + type: object - Paymentable: + GenericBulkAction: + properties: + action: + type: string + example: archive + description: 'The action to perform ie. archive / restore / delete' + ids: + type: array + items: + format: string + type: string + example: 2J234DFA,D2J234DFA,D2J234DFA + description: string array of client hashed ids + type: object + BankTransactionRule: properties: id: - description: 'The paymentable hashed id' + description: 'The bank transaction rules hashed id' + type: string + example: AS3df3A + user_id: + description: 'The user hashed id' + type: string + example: AS3df3A + name: + description: 'The name of the transaction' + type: string + example: 'Rule 1' + rules: + description: 'A mapped collection of the sub rules for the BankTransactionRule' + type: array + items: + $ref: '#/components/schemas/BTRules' + auto_convert: + description: 'Flags whether the rule converts the transaction automatically' + type: boolean + example: true + matches_on_all: + description: 'Flags whether all subrules are required for the match' + type: boolean + example: true + applies_to: + description: 'Flags whether the rule applies to a CREDIT or DEBIT' + type: string + example: CREDIT + client_id: + description: 'The client hashed id' type: string example: AS3df3A - invoice_id: - description: 'The invoice hashed id' + vendor_id: + description: 'The vendor hashed id' type: string example: AS3df3A - credit_id: - description: 'The credit hashed id' + category_id: + description: 'The category hashed id' type: string example: AS3df3A - refunded: - description: 'The amount that has been refunded for this payment' - type: number - format: float - example: '10.00' - amount: - description: 'The amount that has been applied to the payment' - type: number - format: float - example: '10.00' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - created_at: - description: Timestamp - type: number - format: integer - example: '1434342123' type: object - Company: + Product: + type: object properties: id: - description: "The unique hashed identifier for the company" type: string - example: WJxbojagwO - size_id: - description: "The unique identifier representing the company's size category" + description: 'The hashed product ID.' + example: eP01N + readOnly: true + user_id: type: string - example: '2' - industry_id: - description: "The unique identifier representing the company's industry category" + description: 'The hashed ID of the user that created this product.' + example: n30m4 + readOnly: true + assigned_user_id: type: string - example: '5' - slack_webhook_url: - description: "The URL for the company's Slack webhook notifications" + description: 'The hashed ID of the user assigned to this product.' + example: pR0j3 + project_id: type: string - example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' - google_analytics_key: - description: "The company's Google Analytics tracking ID" + description: 'The hashed ID of the project that this product is associated with.' + example: pR0j3 + vendor_id: type: string - example: 'UA-123456789-1' - portal_mode: - description: "The mode determining how client-facing URLs are structured (e.g., subdomain, domain, or iframe)" + description: 'The hashed ID of the vendor that this product is associated with.' + example: pR0j3 + custom_value1: type: string - example: subdomain - subdomain: - description: "The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)" + description: 'Custom value field 1.' + example: 'Custom value 1' + custom_value2: type: string - example: acme - portal_domain: - description: "The fully qualified domain used for client-facing URLs" + description: 'Custom value field 2.' + example: 'Custom value 2' + custom_value3: type: string - example: 'https://subdomain.invoicing.co' - enabled_tax_rates: - description: "The number of tax rates used per entity" + description: 'Custom value field 3.' + example: 'Custom value 3' + custom_value4: + type: string + description: 'Custom value field 4.' + example: 'Custom value 4' + product_key: + type: string + description: 'The product key.' + example: '1234' + notes: + type: string + description: 'Notes about the product.' + example: 'These are some notes about the product.' + cost: + type: number + format: double + description: 'The cost of the product. (Your purchase price for this product)' + example: 10.0 + price: + type: number + format: double + description: 'The price of the product that you are charging.' + example: 20.0 + quantity: + type: number + format: double + description: 'The quantity of the product. (used as a default)' + example: 5.0 + tax_name1: + type: string + description: 'The name of tax 1.' + example: 'Tax 1' + tax_rate1: + type: number + format: double + description: 'The rate of tax 1.' + example: 10.0 + tax_name2: + type: string + description: 'The name of tax 2.' + example: 'Tax 2' + tax_rate2: + type: number + format: double + description: 'The rate of tax 2.' + example: 5.0 + tax_name3: + type: string + description: 'The name of tax 3.' + example: 'Tax 3' + tax_rate3: + type: number + format: double + description: 'The rate of tax 3.' + example: 0.0 + archived_at: type: integer - example: '2' - fill_products: - description: "A flag determining whether to auto-fill product descriptions based on the product key" - type: boolean - example: true - convert_products: - description: "A flag determining whether to convert products between different types or units" - type: boolean - example: true - update_products: - description: "A flag determining whether to update product descriptions when the description changes" - type: boolean - example: true - show_product_details: - description: "A flag determining whether to display product details in the user interface" - type: boolean - example: true - show_product_cost: - description: "A flag determining whether to display product cost is shown in the user interface" - type: boolean - example: true - custom_fields: - description: "A mapping of custom fields for various objects within the company" - type: object - enable_product_cost: - description: "A flag determining whether to show or hide the product cost field in the user interface" - type: boolean - example: true - enable_product_quantity: - description: "A flag determining whether to show or hide the product quantity field in the user interface" - type: boolean - example: true - default_quantity: - description: "A flag determining whether to use a default quantity for products" - type: boolean - example: true - custom_surcharge_taxes1: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the first custom surcharge field" - type: boolean - example: true - custom_surcharge_taxes2: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the second custom surcharge field" - type: boolean - example: true - custom_surcharge_taxes3: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the third custom surcharge field" + format: timestamp + description: 'The timestamp when the product was archived.' + example: '2022-03-18T15:00:00Z' + readOnly: true + created_at: + type: integer + format: timestamp + description: 'The timestamp when the product was created.' + example: '2022-03-18T15:00:00Z' + readOnly: true + updated_at: + description: Timestamp + type: integer + format: timestamp + example: '2022-03-18T12:34:56.789Z' + readOnly: true + is_deleted: type: boolean - example: true - custom_surcharge_taxes4: - description: "A flag determining whether to apply taxes on custom surcharge amounts for the fourth custom" - logo: - description: "The company logo file in binary format" - type: string - format: binary - example: logo.png - company_key: - description: "The static company key hash used to identify the Company" + description: 'Boolean flag determining if the product has been deleted' + example: false readOnly: true - type: string - example: "Vnb14bRlwiFjc5ckte6cfbygTRkn5IMQ" - client_can_register: - description: "A flag determining whether clients can register for the client portal" + in_stock_quantity: + type: integer + format: int32 + description: The quantity of the product that is currently in stock + default: 0 + stock_notification: type: boolean - example: true - enabled_modules: + description: Indicates whether stock notifications are enabled for this product + default: true + stock_notification_threshold: type: integer - description: | - Bitmask representation of the modules that are enabled in the application - - ``` - self::ENTITY_RECURRING_INVOICE => 1, - self::ENTITY_CREDIT => 2, - self::ENTITY_QUOTE => 4, - self::ENTITY_TASK => 8, - self::ENTITY_EXPENSE => 16, - self::ENTITY_PROJECT => 32, - self::ENTITY_VENDOR => 64, - self::ENTITY_TICKET => 128, - self::ENTITY_PROPOSAL => 256, - self::ENTITY_RECURRING_EXPENSE => 512, - self::ENTITY_RECURRING_TASK => 1024, - self::ENTITY_RECURRING_QUOTE => 2048, - ``` + format: int32 + description: The minimum quantity threshold for which stock notifications will be triggered + default: 0 + max_quantity: + type: integer + format: int32 + description: The maximum quantity that can be ordered for this product + product_image: + type: string + description: The URL of the product image + format: uri-reference + tax_id: + type: string + default: '1' + description: | + The tax category id for this product.' + + The following constants are available (default = '1') - The default per_page value is 20. + ``` + 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' + ``` + example: '1' - example: 2048 - db: - readOnly: true + RecurringQuote: + properties: + id: + description: 'The hashed id of the recurring quote' type: string - example: 'db-ninja-01' - first_day_of_week: - description: "The first day of the week for the company" + example: Opnel5aKBz + user_id: + description: 'The user hashed id' type: string - example: '1' - first_month_of_year: - description: "The first month for the company financial year" + example: Opnel5aKBz + assigned_user_id: + description: 'The assigned user hashed id' type: string - example: '1' - enabled_item_tax_rates: - description: "The number of tax rates used per item" - type: integer - example: 2 - is_large: - description: "A flag determining whether the company is considered large" - type: boolean - example: true - default_auto_bill: + example: Opnel5aKBz + client_id: + description: 'The client hashed id' type: string - example: 'always' - description: | - A flag determining whether to auto-bill clients by default - - values: - - - always - Always auto bill - - disabled - Never auto bill - - optin - Allow the client to select their auto bill status with the default being disabled - - optout -Allow the client to select their auto bill status with the default being enabled - mark_expenses_invoiceable: - description: "A flag determining whether to mark expenses as invoiceable by default" - type: boolean - example: true - mark_expenses_paid: - description: "A flag determining whether to mark expenses as paid by default" - type: boolean - example: true - invoice_expense_documents: - description: "A flag determining whether to include expense documents on invoices by default" - type: boolean - example: true - auto_start_tasks: - description: "A flag determining whether to auto-start tasks by default" - type: boolean - example: true - invoice_task_timelog: - description: "A flag determining whether to include task time logs on invoices by default" - type: boolean - example: true - invoice_task_documents: - description: "A flag determining whether to include task documents on invoices by default" - type: boolean - example: true - show_tasks_table: - description: "A flag determining whether to show the tasks table on invoices by default" - type: boolean - example: true - is_disabled: - description: "A flag determining whether the company is disabled" - type: boolean - example: true - default_task_is_date_based: - description: "A flag determining whether to default tasks to be date-based" - type: boolean - example: true - enable_product_discount: - description: "A flag determining whether to show or hide the product discount field in the user interface" - type: boolean - example: true - calculate_expense_tax_by_amount: - description: "A flag determining whether to calculate expense taxes by amount" - type: boolean - example: true - expense_inclusive_taxes: - description: "A flag determining whether to include taxes in the expense amount" - type: boolean - example: true - session_timeout: - description: "The session timeout for the company" - type: integer - example: 60 - oauth_password_required: - description: "A flag determining whether to require a password for `dangerous` actions when using OAuth" - type: boolean - example: true - invoice_task_datelog: - description: "A flag determining whether to include task date logs on invoices by default" - type: boolean - example: true - default_password_timeout: - description: "The default password timeout for the company" - type: integer - example: 60 - show_task_end_date: - description: "A flag determining whether to show the task end date on invoices by default" - type: boolean - example: true - markdown_enabled: - description: "A flag determining whether markdown is enabled for the company" - type: boolean - example: true - report_include_drafts: - description: "A flag determining whether to include draft invoices in reports" - type: boolean - example: true - client_registration_fields: - description: "The client registration fields for the company" + example: Opnel5aKBz + status_id: + description: 'The quote status variable' + type: string + example: '4' + frequency_id: + description: 'The recurring quote frequency' + type: number + example: '4' + remaining_cycles: + description: 'The number of quotes left to be generated' + type: number + example: '4' + number: + description: 'The recurringquote number - is a unique alpha numeric number per quote per company' + type: string + example: INV_101 + po_number: + description: 'The purchase order associated with this recurring quote' + type: string + example: PO-1234 + terms: + description: 'The quote terms' + type: string + example: 'These are quote terms' + public_notes: + description: 'The public notes of the quote' + type: string + example: 'These are some public notes' + private_notes: + description: 'The private notes of the quote' + type: string + example: 'These are some private notes' + footer: + description: 'The quote footer notes' + type: string + example: '' + custom_value1: + description: 'A custom field value' + type: string + example: '2022-10-01' + custom_value2: + description: 'A custom field value' + type: string + example: 'Something custom' + custom_value3: + description: 'A custom field value' + type: string + example: '' + custom_value4: + description: 'A custom field value' + type: string + example: '' + tax_name1: + description: 'The tax name' + type: string + example: '' + tax_name2: + description: 'The tax name' + type: string + example: '' + tax_rate1: + description: 'The tax rate' + type: number + format: float + example: '10.00' + tax_rate2: + description: 'The tax rate' + type: number + format: float + example: '10.00' + tax_name3: + description: 'The tax name' + type: string + example: '' + tax_rate3: + description: 'The tax rate' + type: number + format: float + example: '10.00' + total_taxes: + description: 'The total taxes for the quote' + type: number + format: float + example: '10.00' + line_items: + description: 'An array of objects which define the line items of the quote' type: object - stop_on_unpaid_recurring: - description: "A flag determining whether to stop recurring invoices when they are unpaid" - type: boolean - example: true - use_quote_terms_on_conversion: - description: "A flag determining whether to use quote terms on conversion to an invoice" - type: boolean - example: true - enable_applying_payments: - description: "A flag determining whether to enable applying payments to invoices" + example: '' + amount: + description: 'The quote amount' + type: number + format: float + example: '10.00' + balance: + description: 'The quote balance' + type: number + format: float + example: '10.00' + paid_to_date: + description: 'The amount paid on the quote to date' + type: number + format: float + example: '10.00' + discount: + description: 'The quote discount, can be an amount or a percentage' + type: number + format: float + example: '10.00' + partial: + description: 'The deposit/partial amount' + type: number + format: float + example: '10.00' + is_amount_discount: + description: 'Flag determining if the discount is an amount or a percentage' type: boolean example: true - track_inventory: - description: "A flag determining whether to track inventory for the company" + is_deleted: + description: 'Defines if the quote has been deleted' type: boolean example: true - inventory_notification_threshold: - description: "The inventory notification threshold for the company" - type: integer - example: 60 - stock_notification: - description: "A flag determining whether to send stock notifications for the company" + uses_inclusive_taxes: + description: 'Defines the type of taxes used as either inclusive or exclusive' type: boolean example: true - matomo_url: - description: "The Matomo URL for the company" + date: + description: 'The quote Date' type: string - example: 'https://matomo.example.com' - matomo_id: - description: "The Matomo ID for the company" + format: date + example: '1994-07-30' + last_sent_date: + description: 'The last date the quote was sent out' type: string - example: '1' - enabled_expense_tax_rates: - description: "The number of tax rates used per expense" - type: integer - example: 2 - invoice_task_project: - description: "A flag determining whether to include the project on invoices by default" - type: boolean - example: true - report_include_deleted: - description: "A flag determining whether to include deleted invoices in reports" - type: boolean - example: true - invoice_task_lock: - description: "A flag determining whether to lock tasks when invoiced" - type: boolean - example: true - convert_payment_currency: - description: "A flag determining whether to convert the payment currency" - type: boolean - example: true - convert_expense_currency: - description: "A flag determining whether to convert the expense currency" - type: boolean - example: true - notify_vendor_when_paid: - description: "A flag determining whether to notify the vendor when an expense is paid" + format: date + example: '1994-07-30' + next_send_date: + description: 'The Next date for a reminder to be sent' + type: string + format: date + example: '1994-07-30' + partial_due_date: + description: 'The due date for the deposit/partial amount' + type: string + format: date + example: '1994-07-30' + due_date: + description: 'The due date of the quote' + type: string + format: date + example: '1994-07-30' + settings: + $ref: '#/components/schemas/CompanySettings' + last_viewed: + description: Timestamp + type: number + format: integer + example: '1434342123' + updated_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + archived_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + custom_surcharge1: + description: 'First Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge2: + description: 'Second Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge3: + description: 'Third Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge4: + description: 'Fourth Custom Surcharge' + type: number + format: float + example: '10.00' + custom_surcharge_tax1: + description: 'Toggles charging taxes on custom surcharge amounts' type: boolean example: true - invoice_task_hours: - description: "A flag determining whether to include the task hours on invoices by default" + custom_surcharge_tax2: + description: 'Toggles charging taxes on custom surcharge amounts' type: boolean example: true - calculate_taxes: - description: "A flag determining whether to calculate taxes for the company" + custom_surcharge_tax3: + description: 'Toggles charging taxes on custom surcharge amounts' type: boolean example: true - tax_data: - description: "The tax data for the company" - type: object - e_invoice_certificate: - description: "The e-invoice certificate for the company" - type: string - example: '-----BEGIN CERTIFICATE-----' - e_invoice_certificate_passphrase: - description: "The e-invoice certificate passphrase for the company" - type: string - example: 'secret' - origin_tax_data: - description: "The origin tax data for the company" - type: object - invoice_task_project_header: - description: "A flag determining whether to include the project header on invoices by default" - type: boolean - example: true - invoice_task_item_description: - description: "A flag determining whether to include the item description on invoices by default" + custom_surcharge_tax4: + description: 'Toggles charging taxes on custom surcharge amounts' type: boolean example: true - - settings: - $ref: '#/components/schemas/CompanySettings' - type: object - ProductRequest: type: object + Paymentable: properties: id: + description: 'The paymentable hashed id' type: string - description: 'The hashed product ID.' - example: eP01N - readOnly: true - assigned_user_id: + example: AS3df3A + invoice_id: + description: 'The invoice hashed id' type: string - description: 'The hashed ID of the user assigned to this product.' - example: pR0j3 - - project_id: + example: AS3df3A + credit_id: + description: 'The credit hashed id' type: string - description: 'The hashed ID of the project that this product is associated with.' - example: pR0j3 - - vendor_id: + example: AS3df3A + refunded: + description: 'The amount that has been refunded for this payment' + type: number + format: float + example: '10.00' + amount: + description: 'The amount that has been applied to the payment' + type: number + format: float + example: '10.00' + updated_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + created_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + type: object + SystemLog: + properties: + id: + description: 'The account hashed id' type: string - description: 'The hashed ID of the vendor that this product is associated with.' - example: pR0j3 - - custom_value1: + example: AS3df3A + user_id: + description: 'The user_id hashed id' type: string - description: 'Custom value field 1.' - example: 'Custom value 1' - - custom_value2: + example: AS3df3A + client_id: + description: 'The client_id hashed id' type: string - description: 'Custom value field 2.' - example: 'Custom value 2' - - custom_value3: + example: AS3df3A + event_id: + description: 'The Log Type ID' + type: integer + example: 1 + category_id: + description: 'The Category Type ID' + type: integer + example: 1 + type_id: + description: 'The Type Type ID' + type: integer + example: 1 + log: + description: 'The json object of the error' + type: object + example: '{''key'':''value''}' + updated_at: + description: Timestamp type: string - description: 'Custom value field 3.' - example: 'Custom value 3' - - custom_value4: + example: '2' + created_at: + description: Timestamp type: string - description: 'Custom value field 4.' - example: 'Custom value 4' - - product_key: + example: '2' + type: object + BankTransaction: + properties: + id: + description: 'The bank integration hashed id' type: string - description: 'The product key.' - example: '1234' - - notes: + example: AS3df3A + user_id: + description: 'The user hashed id' type: string - description: 'Notes about the product.' - example: 'These are some notes about the product.' - - cost: - type: number - format: double - description: 'The cost of the product.' - example: 10.0 - - price: - type: number - format: double - description: 'The price of the product.' - example: 20.0 - - quantity: + example: AS3df3A + transaction_id: + description: 'The id of the transaction rule' + type: integer + example: 343434 + amount: + description: 'The transaction amount' type: number - format: double - description: 'The quantity of the product.' - example: 5.0 - - default: 1 - tax_name1: + example: 10 + currency_id: + description: 'The currency ID of the currency' type: string - description: 'The name of tax 1.' - example: 'Tax 1' - - tax_rate1: - type: number - format: double - description: 'The rate of tax 1.' - example: 10.0 - - tax_name2: + example: '1' + account_type: + description: 'The account type' type: string - description: 'The name of tax 2.' - example: 'Tax 2' - - tax_rate2: - type: number - format: double - description: 'The rate of tax 2.' - example: 5.0 - - tax_name3: + example: creditCard + description: + description: 'The description of the transaction' type: string - description: 'The name of tax 3.' - example: 'Tax 3' - - tax_rate3: - type: number - format: double - description: 'The rate of tax 3.' - example: 0.0 - - in_stock_quantity: - type: integer - format: int32 - description: | - The quantity of the product that is currently in stock. - - **note** this field is not mutable without passing an extra query parameter which will allow modification of this value. - - The query parameter ?update_in_stock_quantity=true **MUST** be passed if you wish to update this value manually. - - default: 0 - - stock_notification: - type: boolean - description: Indicates whether stock notifications are enabled for this product - default: true - - stock_notification_threshold: + example: 'Potato purchases for kevin' + category_id: + description: 'The category id' type: integer - format: int32 - description: The minimum quantity threshold for which stock notifications will be triggered - default: 0 - - max_quantity: + example: 1 + category_type: + description: 'The category description' + type: string + example: Expenses + base_type: + description: 'Either CREDIT or DEBIT' + type: string + example: CREDIT + date: + description: 'The date of the transaction' + type: string + example: '2022-09-01' + bank_account_id: + description: 'The ID number of the bank account' type: integer - format: int32 - description: The maximum quantity that can be ordered for this product + example: '1' + type: object - product_image: + ProductBulkAction: + required: + - action + - ids + properties: + action: type: string - description: The URL of the product image - format: uri-reference - + 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 - default: '1' - + example: '1' description: | - The tax category id for this product.' + The tax rate id to set on the list of products The following constants are available (default = '1') @@ -20483,1481 +20662,1324 @@ components: PRODUCT_TYPE_ZERO_RATED = '8' PRODUCT_TYPE_REVERSE_TAX = '9' ``` - example: '1' - - RecurringInvoice: + type: object + FillableInvoice: properties: - id: - description: 'The hashed id of the recurring invoice' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz assigned_user_id: - description: 'The assigned user hashed id' + description: "The assigned user's hashed ID" type: string - example: Opnel5aKBz + example: 'a1b2c3d4' client_id: - description: 'The client hashed id' - type: string - example: Opnel5aKBz - status_id: - description: 'The invoice status variable' + description: "The client's hashed ID" type: string - example: '4' - frequency_id: - description: 'The recurring invoice frequency' - type: number - example: '4' - remaining_cycles: - description: 'The number of invoices left to be generated' - type: number - example: '4' + example: 'x1y2z3a4' number: - description: 'The recurringinvoice number - is a unique alpha numeric number per invoice per company' + description: "The unique alphanumeric invoice number for each invoice per company" type: string example: INV_101 po_number: - description: 'The purchase order associated with this recurring invoice' + description: "The purchase order number associated with the invoice" type: string - example: PO-1234 + example: 'PO12345' terms: - description: 'The invoice terms' + description: "The terms and conditions for the invoice" type: string - example: 'These are invoice terms' + example: 'Net 30' public_notes: - description: 'The public notes of the invoice' + description: "Public notes visible to the client on the invoice" type: string - example: 'These are some public notes' + example: 'Thank you for your business.' private_notes: - description: 'The private notes of the invoice' + description: "Private notes for internal use only" type: string - example: 'These are some private notes' + example: 'Client is a slow payer.' footer: - description: 'The invoice footer notes' + description: "The footer text displayed on the invoice" type: string - example: '' + example: 'Authorized Signature' custom_value1: - description: 'A custom field value' + description: "First custom value for additional information" type: string - example: '2022-10-01' + example: 'Project ABC' custom_value2: - description: 'A custom field value' + description: "Second custom value for additional information" type: string - example: 'Something custom' + example: 'Department XYZ' custom_value3: - description: 'A custom field value' + description: "Third custom value for additional information" type: string - example: '' + example: 'Location 123' custom_value4: - description: 'A custom field value' + description: "Fourth custom value for additional information" type: string - example: '' + example: 'Currency USD' tax_name1: - description: 'The tax name' + description: "Name of the first tax applied to the invoice" type: string - example: '' + example: 'VAT' tax_name2: - description: 'The tax name' + description: "Name of the second tax applied to the invoice" type: string - example: '' + example: 'GST' tax_rate1: - description: 'The tax rate' + description: "Rate of the first tax applied to the invoice" type: number - format: float - example: '10.00' + example: 10.00 tax_rate2: - description: 'The tax rate' + description: "Rate of the second tax applied to the invoice" type: number - format: float - example: '10.00' + example: 5.00 tax_name3: - description: 'The tax name' + description: "Name of the third tax applied to the invoice" type: string - example: '' + example: 'PST' tax_rate3: - description: 'The tax rate' - type: number - format: float - example: '10.00' - total_taxes: - description: 'The total taxes for the invoice' - type: number - format: float - example: '10.00' - line_items: - description: 'An array of objects which define the line items of the invoice' - type: object - example: '' - amount: - description: 'The invoice amount' - type: number - format: float - example: '10.00' - balance: - description: 'The invoice balance' - type: number - format: float - example: '10.00' - paid_to_date: - description: 'The amount paid on the invoice to date' + description: "Rate of the third tax applied to the invoice" type: number - format: float - example: '10.00' + example: 8.00 + line_items: + type: array + description: 'An array of objects which define the line items of the invoice' + items: + $ref: '#/components/schemas/InvoiceItem' discount: - description: 'The invoice discount, can be an amount or a percentage' + description: "The discount applied to the invoice" type: number - format: float - example: '10.00' + example: 10.00 partial: - description: 'The deposit/partial amount' + description: "The partial amount applied to the invoice" type: number - format: float - example: '10.00' + example: 20.00 is_amount_discount: - description: 'Flag determining if the discount is an amount or a percentage' - type: boolean - example: true - is_deleted: - description: 'Defines if the invoice has been deleted' + description: "Indicates whether the discount applied is a fixed amount or a percentage" type: boolean example: true uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' + description: "Indicates whether the tax rates applied to the invoice are inclusive or exclusive" type: boolean example: true date: - description: 'The Invoice Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the invoice was sent out' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The Next date for a reminder to be sent' + description: "The date the invoice was issued" type: string - format: date example: '1994-07-30' partial_due_date: - description: 'The due date for the deposit/partial amount' + description: "The due date for the partial payment" type: string - format: date - example: '1994-07-30' + example: '1994-08-15' due_date: - description: 'The due date of the invoice' + description: "The due date for the invoice" type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: Timestamp - type: number - format: integer - example: '1434342123' - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' + example: '1994-08-30' custom_surcharge1: - description: 'First Custom Surcharge' + description: "First custom surcharge applied to the invoice" type: number - format: float - example: '10.00' + example: 10.00 custom_surcharge2: - description: 'Second Custom Surcharge' + description: "Second custom surcharge applied to the invoice" type: number - format: float - example: '10.00' + example: 15.00 custom_surcharge3: - description: 'Third Custom Surcharge' + description: "Third custom surcharge applied to the invoice" type: number - format: float - example: '10.00' + example: 5.00 custom_surcharge4: - description: 'Fourth Custom Surcharge' + description: "Fourth custom surcharge applied to the invoice" type: number - format: float - example: '10.00' - custom_surcharge_tax1: - description: 'Toggles charging taxes on custom surcharge amounts' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Toggles charging taxes on custom surcharge amounts' + example: 20.00 + type: object + CompanyGateway: + properties: + id: + description: 'The hashed id of the company gateway' + type: string + example: Opnel5aKBz + gateway_key: + description: 'The gateway key (hash)' + type: string + example: '2' + accepted_credit_cards: + description: 'Bitmask representation of cards' + type: integer + example: '32' + require_billing_address: + description: 'Determines if the the billing address is required prior to payment.' type: boolean example: true - custom_surcharge_tax3: - description: 'Toggles charging taxes on custom surcharge amounts' + require_shipping_address: + description: 'Determines if the the billing address is required prior to payment.' type: boolean example: true - custom_surcharge_tax4: - description: 'Toggles charging taxes on custom surcharge amounts' + config: + description: 'The configuration map for the gateway' + type: string + example: dfadsfdsafsafd + update_details: + description: 'Determines if the client details should be updated.' type: boolean example: true + fees_and_limits: + description: 'A mapped collection of the fees and limits for the configured gateway' + type: array + items: + $ref: '#/components/schemas/FeesAndLimits' type: object - - BankIntegration: + + + Activity: properties: id: - description: 'The bank integration hashed id' + description: 'The id field of the activity' type: string - example: AS3df3A + example: Opnel5aKBz + activity_type_id: + description: 'The activity type id' + type: string + example: Opnel5aKBz + client_id: + description: 'The client hashed id' + type: string + example: Opnel5aKBz + company_id: + description: 'The company hashed id' + type: string + example: Opnel5aKBz user_id: description: 'The user hashed id' type: string - example: AS3df3A - provider_bank_name: - description: 'The providers bank name' + example: Opnel5aKBz + invoice_id: + description: 'The invoice hashed id' type: string - example: 'Chase Bank' - bank_account_id: - description: 'The bank account id' + example: Opnel5aKBz + payment_id: + description: 'The payment hashed id' + type: string + example: Opnel5aKBz + credit_id: + description: 'The credit hashed id' + type: string + example: Opnel5aKBz + updated_at: + description: 'Unixtimestamp the last time the record was updated' type: integer - example: '1233434' - bank_account_name: - description: 'The name of the account' + example: '343421434' + expense_id: + description: 'The expense hashed id' type: string - example: 'My Checking Acc' - bank_account_number: - description: 'The account number' + example: Opnel5aKBz + is_system: + description: 'Defines is the activity was performed by the system' + type: boolean + example: true + contact_id: + description: 'The contact hashed id' type: string - example: '111 234 2332' - bank_account_status: - description: 'The status of the bank account' + example: Opnel5aKBz + task_id: + description: 'The task hashed id' type: string - example: ACTIVE - bank_account_type: - description: 'The type of account' + example: Opnel5aKBz + notes: + description: 'Activity Notes' type: string - example: CREDITCARD - balance: - description: 'The current bank balance if available' - type: number - example: '1000000' - currency: - description: 'iso_3166_3 code' + example: Opnel5aKBz + token_id: + description: 'The hashed ID of the token who performed the action' type: string - example: USD + example: Opnel5aKBz + ip: + description: 'The IP Address of the user who performed the action' + type: string + example: 192.168.1.252 + user: + $ref: '#/components/schemas/User' + client: + $ref: '#/components/schemas/Client' + contact: + $ref: '#/components/schemas/ClientContact' + recurring_invoice: + $ref: '#/components/schemas/RecurringInvoice' + invoice: + $ref: '#/components/schemas/Invoice' + credit: + $ref: '#/components/schemas/Credit' + quote: + $ref: '#/components/schemas/Quote' + payment: + $ref: '#/components/schemas/Payment' + expense: + $ref: '#/components/schemas/Expense' + task: + $ref: '#/components/schemas/Task' + purchase_order: + $ref: '#/components/schemas/PurchaseOrder' + vendor: + $ref: '#/components/schemas/Vendor' + vendor_contact: + $ref: '#/components/schemas/VendorContact' type: object - Expense: + User: properties: id: - description: 'The expense hashed id' - type: string - example: 'Opnel5aKBz' - user_id: - description: 'The user hashed id' - type: string - example: 'Opnel5aKBz' - assigned_user_id: - description: 'The assigned user hashed id' + description: 'The hashed id of the user' type: string - example: 'Opnel5aKBz' - project_id: - description: 'The associated project_id' + example: Opnel5aKBz + readOnly: true + first_name: + description: 'The first name of the user' type: string - example: 'Opnel5aKBz' - client_id: - description: 'The client hashed id' + example: Brad + last_name: + description: 'The last name of the user' type: string - example: 'Opnel5aKBz' - invoice_id: - description: 'The related invoice hashed id' + example: Pitt + email: + description: 'The users email address' type: string - example: 'Opnel5aKBz' - bank_id: - description: 'The bank id related to this expense' + example: brad@pitt.com + phone: + description: 'The users phone number' type: string - example: '' - invoice_currency_id: - description: 'The currency id of the related invoice' + example: 555-1233-23232 + signature: + description: 'The users sign off signature' type: string - example: '1' - currency_id: - description: 'The currency id of the expense' + example: 'Have a nice day!' + avatar: + description: 'The users avatar' type: string - example: '2' - invoice_category_id: - description: 'The invoice category id' + example: 'https://url.to.your/avatar.png' + accepted_terms_version: + description: 'The version of the invoice ninja terms that has been accepted by the user' type: string - example: 'Opnel5aKBz' - payment_type_id: - description: 'The payment type id' + example: 1.0.1 + readOnly: true + oauth_user_id: + description: 'The provider id of the oauth entity' type: string - example: '' - recurring_expense_id: - description: 'The related recurring expense this expense was created from' + example: jkhasdf789as6f675sdf768sdfs + readOnly: true + oauth_provider_id: + description: 'The oauth entity id' type: string - example: 'Opnel5aKBz' - private_notes: - description: 'The private notes of the expense' + example: google + readOnly: true + language_id: + description: 'The language id of the user' type: string - example: '' - public_notes: - description: 'The public notes of the expense' + example: 1 + verified_phone_number: + description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' + type: boolean + example: true + readOnly: true + sms_verification_code: + description: 'The sms verification code for the user. Required to settings up 2FA' type: string - example: '' - transaction_reference: - description: 'The transaction references of the expense' + example: '123456' + readOnly: true + oauth_user_token_expiry: + description: 'The expiry date of the oauth token' type: string - example: '' - transcation_id: - description: 'The transaction id of the expense' + example: '2022-10-10' + readOnly: true + has_password: + description: 'Boolean flag determining if the user has a password' + type: boolean + example: true + readOnly: true + last_confirmed_email_address: + description: 'The last confirmed email address of the user' type: string - example: '' + example: 'bob@gmail.com' + readOnly: true custom_value1: description: 'A custom value' type: string - example: '' + example: 'Custom value 1' custom_value2: description: 'A custom value' type: string - example: '' + example: '$1000' custom_value3: description: 'A custom value' type: string - example: '' + example: 'Custom value 3' custom_value4: description: 'A custom value' type: string - example: '' - tax_amount: - description: 'The tax amount' - type: number - example: 10.00 - tax_name1: - description: 'Tax Name 1' - type: string - example: 'GST' - tax_name2: - description: 'Tax Name 2' - type: string - example: 'VAT' - tax_name3: - description: 'Tax Name 3' - type: string - example: 'IVA' - tax_rate1: - description: 'Tax rate 1' - type: number - format: float - example: '10.00' - tax_rate2: - description: 'Tax rate 2' - type: number - format: float - example: '10.00' - tax_rate3: - description: 'Tax rate 3' - type: number - format: float - example: '10.00' - amount: - description: 'The total expense amont' - type: number - format: float - example: '10.00' - foreign_amount: - description: 'The total foreign amount of the expense' - type: number - format: float - example: '10.00' - exchange_rate: - description: 'The exchange rate at the time of the expense' - type: number - format: float - example: '0.80' - date: - description: 'The expense date format Y-m-d' - type: string - example: '2022-12-01' - payment_date: - description: 'The date of payment for the expense, format Y-m-d' - type: string - example: '2022-12-01' - should_be_invoiced: - description: 'Flag whether the expense should be invoiced' - type: boolean - example: true + example: 'Custom value 4' is_deleted: - description: 'Boolean determining whether the expense has been deleted' - type: boolean - example: true - invoice_documents: - description: 'Passing the expense documents over to the invoice' + description: 'Boolean flag determining if the user has been deleted' type: boolean example: true - updated_at: - description: Timestamp - type: number - format: integer - example: '1434342123' - archived_at: - description: Timestamp - type: number - format: integer - example: '1434342123' + readOnly: true + google_2fa_secret: + description: 'The google 2fa secret for the user' + type: string + example: '123456' + readOnly: true + company_user: + $ref: '#/components/schemas/CompanyUserRef' type: object - ClientSettings: - required: - - currency_id + UserRef: properties: - currency_id: - description: 'The default currency id' + id: + description: 'The hashed id of the user' type: string - example: true - timezone_id: - description: 'The timezone id' + example: Opnel5aKBz + readOnly: true + first_name: + description: 'The first name of the user' type: string - example: '15' - date_format_id: - description: 'The date format id' + example: Brad + last_name: + description: 'The last name of the user' type: string - example: '15' - military_time: - description: 'Toggles 12/24 hour time' + example: Pitt + email: + description: 'The users email address' + type: string + example: brad@pitt.com + phone: + description: 'The users phone number' + type: string + example: 555-1233-23232 + signature: + description: 'The users sign off signature' + type: string + example: 'Have a nice day!' + avatar: + description: 'The users avatar' + type: string + example: 'https://url.to.your/avatar.png' + accepted_terms_version: + description: 'The version of the invoice ninja terms that has been accepted by the user' + type: string + example: 1.0.1 + readOnly: true + oauth_user_id: + description: 'The provider id of the oauth entity' + type: string + example: jkhasdf789as6f675sdf768sdfs + readOnly: true + oauth_provider_id: + description: 'The oauth entity id' + type: string + example: google + readOnly: true + language_id: + description: 'The language id of the user' + type: string + example: 1 + verified_phone_number: + description: 'Boolean flag if the user has their phone verified. Required to settings up 2FA' type: boolean example: true - language_id: - description: 'The language id' + readOnly: true + sms_verification_code: + description: 'The sms verification code for the user. Required to settings up 2FA' type: string - example: '1' - show_currency_code: - description: 'Toggles whether the currency symbol or code is shown' + example: '123456' + readOnly: true + oauth_user_token_expiry: + description: 'The expiry date of the oauth token' + type: string + example: '2022-10-10' + readOnly: true + has_password: + description: 'Boolean flag determining if the user has a password' type: boolean example: true - payment_terms: - description: '-1 sets no payment term, 0 sets payment due immediately, positive integers indicates payment terms in days' - type: integer - example: '1' - company_gateway_ids: - description: 'A commad separate list of available gateways' + readOnly: true + last_confirmed_email_address: + description: 'The last confirmed email address of the user' type: string - example: '1,2,3,4' + example: 'bob@gmail.com' + readOnly: true custom_value1: - description: 'A Custom Label' + description: 'A custom value' type: string - example: 'Custom Label' + example: 'Custom value 1' custom_value2: - description: 'A Custom Label' + description: 'A custom value' type: string - example: 'Custom Label' + example: '$1000' custom_value3: - description: 'A Custom Label' + description: 'A custom value' type: string - example: 'Custom Label' + example: 'Custom value 3' custom_value4: - description: 'A Custom Label' + description: 'A custom value' type: string - example: 'Custom Label' - default_task_rate: - description: 'The default task rate' - type: number - format: float - example: '10.00' - send_reminders: - description: 'Toggles whether reminders are sent' - type: boolean - example: true - enable_client_portal_tasks: - description: 'Show/hide the tasks panel in the client portal' + example: 'Custom value 4' + is_deleted: + description: 'Boolean flag determining if the user has been deleted' type: boolean example: true - email_style: - description: 'options include plain,light,dark,custom' - type: string - example: light - reply_to_email: - description: 'The reply to email address' + readOnly: true + google_2fa_secret: + description: 'The google 2fa secret for the user' type: string - example: email@gmail.com - bcc_email: - description: 'A comma separate list of BCC emails' + example: '123456' + readOnly: true + type: object + CompanyUser: + properties: + permissions: + description: 'The user permissionsfor this company in a comma separated list' type: string - example: 'email@gmail.com, contact@gmail.com' - pdf_email_attachment: - description: 'Toggles whether to attach PDF as attachment' - type: boolean - example: true - ubl_email_attachment: - description: 'Toggles whether to attach UBL as attachment' + example: 'create_invoice,create_client,view_client' + settings: + description: 'Settings that are used for the flutter applications to store user preferences / metadata' + type: object + readOnly: true + react_settings: + description: 'Dedicated settings object for the react web application' + type: object + readOnly: true + is_owner: + description: 'Determines whether the user owns this company' type: boolean example: true - email_style_custom: - description: 'The custom template' - type: string - example: '' - counter_number_applied: - description: 'enum when the invoice number counter is set, ie when_saved, when_sent, when_paid' - type: string - example: when_sent - quote_number_applied: - description: 'enum when the quote number counter is set, ie when_saved, when_sent' - type: string - example: when_sent - custom_message_dashboard: - description: 'A custom message which is displayed on the dashboard' - type: string - example: 'Please pay invoices immediately' - custom_message_unpaid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a unpaid invoice.' - type: string - example: 'Please pay invoices immediately' - custom_message_paid_invoice: - description: 'A custom message which is displayed in the client portal when a client is viewing a paid invoice.' - type: string - example: 'Thanks for paying this invoice!' - custom_message_unapproved_quote: - description: 'A custom message which is displayed in the client portal when a client is viewing a unapproved quote.' - type: string - example: 'Please approve quote' - lock_invoices: - description: 'Toggles whether invoices are locked once sent and cannot be modified further' + readOnly: true + is_admin: + description: 'Determines whether the user is the admin of this company' type: boolean example: true - auto_archive_invoice: - description: 'Toggles whether a invoice is archived immediately following payment' + readOnly: true + is_locked: + description: 'Determines whether the users access to this company has been locked' type: boolean example: true - auto_archive_quote: - description: 'Toggles whether a quote is archived after being converted to a invoice' + readOnly: true + updated_at: + description: 'The last time the record was modified, format Unix Timestamp' + type: integer + example: '1231232312321' + deleted_at: + description: 'Timestamp when the user was archived, format Unix Timestamp' + type: integer + example: '12312312321' + account: + $ref: '#/components/schemas/Account' + company: + $ref: '#/components/schemas/Company' + user: + $ref: '#/components/schemas/UserRef' + token: + $ref: '#/components/schemas/CompanyToken' + type: object + CompanyUserRef: + properties: + permissions: + description: 'The user permissionsfor this company in a comma separated list' + type: string + example: 'create_invoice,create_client,view_client' + settings: + description: 'Settings that are used for the flutter applications to store user preferences / metadata' + type: object + readOnly: true + react_settings: + description: 'Dedicated settings object for the react web application' + type: object + readOnly: true + is_owner: + description: 'Determines whether the user owns this company' type: boolean example: true - auto_convert_quote: - description: 'Toggles whether a quote is converted to a invoice when approved' + readOnly: true + is_admin: + description: 'Determines whether the user is the admin of this company' type: boolean example: true - inclusive_taxes: - description: 'Boolean flag determining whether inclusive or exclusive taxes are used' + readOnly: true + is_locked: + description: 'Determines whether the users access to this company has been locked' type: boolean example: true - task_number_pattern: - description: 'Allows customisation of the task number pattern' - type: string - example: '{$year}-{$counter}' - task_number_counter: - description: 'The incrementing counter for tasks' + readOnly: true + updated_at: + description: 'The last time the record was modified, format Unix Timestamp' type: integer - example: '1' - reminder_send_time: - description: 'Time from UTC +0 when the email will be sent to the client' + example: '1231232312321' + deleted_at: + description: 'Timestamp when the user was archived, format Unix Timestamp' type: integer - example: '32400' - expense_number_pattern: - description: 'Allows customisation of the expense number pattern' + example: '12312312321' + account: + $ref: '#/components/schemas/Account' + company: + $ref: '#/components/schemas/Company' + user: + $ref: '#/components/schemas/UserRef' + token: + $ref: '#/components/schemas/CompanyToken' + type: object + RecurringExpense: + properties: + id: + description: 'The hashed id of the recurring expense' type: string - example: '{$year}-{$counter}' - expense_number_counter: - description: 'The incrementing counter for expenses' - type: integer - example: '1' - vendor_number_pattern: - description: 'Allows customisation of the vendor number pattern' + example: Opnel5aKBz + user_id: + description: 'The hashed id of the user who created the recurring expense' type: string - example: '{$year}-{$counter}' - vendor_number_counter: - description: 'The incrementing counter for vendors' - type: integer - example: '1' - ticket_number_pattern: - description: 'Allows customisation of the ticket number pattern' + example: Opnel5aKBz + assigned_user_id: + description: 'The hashed id of the user assigned to this recurring expense' type: string - example: '{$year}-{$counter}' - ticket_number_counter: - description: 'The incrementing counter for tickets' - type: integer - example: '1' - payment_number_pattern: - description: 'Allows customisation of the payment number pattern' + example: Opnel5aKBz + client_id: + description: 'The hashed id of the client' type: string - example: '{$year}-{$counter}' - payment_number_counter: - description: 'The incrementing counter for payments' - type: integer - example: '1' - invoice_number_pattern: - description: 'Allows customisation of the invoice number pattern' + example: Opnel5aKBz + invoice_id: + description: 'The hashed id of the invoice' type: string - example: '{$year}-{$counter}' - invoice_number_counter: - description: 'The incrementing counter for invoices' - type: integer - example: '1' - quote_number_pattern: - description: 'Allows customisation of the quote number pattern' + example: Opnel5aKBz + bank_id: + description: 'The id of the bank associated with this recurring expense' type: string - example: '{$year}-{$counter}' - quote_number_counter: - description: 'The incrementing counter for quotes' - type: integer - example: '1' - client_number_pattern: - description: 'Allows customisation of the client number pattern' + example: '22' + invoice_currency_id: + description: 'The currency id of the invoice associated with this recurring expense' type: string - example: '{$year}-{$counter}' - client_number_counter: - description: 'The incrementing counter for clients' - type: integer example: '1' - credit_number_pattern: - description: 'Allows customisation of the credit number pattern' + expense_currency_id: + description: 'The currency id of the expense associated with this recurring expense' type: string - example: '{$year}-{$counter}' - credit_number_counter: - description: 'The incrementing counter for credits' - type: integer example: '1' - recurring_invoice_number_prefix: - description: 'This string is prepended to the recurring invoice number' + invoice_category_id: + description: 'The category id of the invoice' type: string - example: R - reset_counter_frequency_id: - description: 'CONSTANT which is used to apply the frequency which the counters are reset' - type: integer example: '1' - reset_counter_date: - description: 'The explicit date which is used to reset counters' + payment_type_id: + description: 'The payment type id' type: string - example: '2019-01-01' - counter_padding: - description: 'Pads the counter with leading zeros' - type: integer example: '1' - shared_invoice_quote_counter: - description: 'Flags whether to share the counter for invoices and quotes' - type: boolean - example: true - update_products: - description: 'Determines if client fields are updated from third party APIs' - type: boolean - example: true - convert_products: - description: '' - type: boolean - example: true - fill_products: - description: 'Automatically fill products based on product_key' - type: boolean - example: true - invoice_terms: - description: 'The default invoice terms' + private_notes: + description: 'The recurring expense private notes' type: string - example: 'Invoice Terms are...' - quote_terms: - description: 'The default quote terms' + example: 'Private and confidential' + public_notes: + description: 'The recurring expense public notes' type: string - example: 'Quote Terms are...' - invoice_taxes: - description: 'Taxes can be applied to the invoice' - type: number - example: '1' - invoice_design_id: - description: 'The default design id (invoice, quote etc)' + example: 'This is the best client in the world' + transaction_reference: + description: 'The recurring expense transaction reference' type: string - example: '1' - quote_design_id: - description: 'The default design id (invoice, quote etc)' + example: EXP-1223-2333 + transcation_id: + description: 'The transaction id of the recurring expense' type: string - example: '1' - invoice_footer: - description: 'The default invoice footer' + example: '1233312312' + custom_value1: + description: 'Custom value field' type: string - example: '1' - invoice_labels: - description: 'JSON string of invoice labels' + example: $1000 + custom_value2: + description: 'Custom value field' type: string - example: '1' - tax_rate1: - description: 'The tax rate (float)' - type: number - example: '10' + example: '2022-10-10' + custom_value3: + description: 'Custom value field' + type: string + example: 'short text' + custom_value4: + description: 'Custom value field' + type: string + example: 'very long text' tax_name1: description: 'The tax name' type: string example: GST - tax_rate2: - description: 'The tax rate (float)' - type: number - example: '10' tax_name2: description: 'The tax name' type: string - example: GST - tax_rate3: - description: 'The tax rate (float)' + example: VAT + tax_rate1: + description: 'The tax rate' type: number - example: '10' + format: float + example: '10.00' + tax_rate2: + description: 'The tax rate' + type: number + format: float + example: '10.00' tax_name3: description: 'The tax name' type: string - example: GST - payment_type_id: - description: 'The default payment type id' - type: string + example: '' + tax_rate3: + description: 'The tax rate' + type: number + format: float + example: '10.00' + amount: + description: 'The total amount of the recurring expense' + type: number + format: float + example: '10.00' + frequency_id: + description: 'The frequency this recurring expense fires' + type: number + format: int example: '1' - custom_fields: - description: 'JSON string of custom fields' + remaining_cycles: + description: 'The number of remaining cycles for this recurring expense' + type: number + format: int + example: '1' + foreign_amount: + description: 'The foreign currency amount of the recurring expense' + type: number + format: float + example: '10.00' + exchange_rate: + description: 'The exchange rate for the expernse' + type: number + format: float + example: '0.80' + date: + description: 'The date of the expense' type: string - example: '{}' - email_footer: - description: 'The default email footer' + example: '' + payment_date: + description: 'The date the expense was paid' type: string - example: 'A default email footer' - email_sending_method: - description: 'The email driver to use to send email, options include default, gmail' + example: '' + should_be_invoiced: + description: 'Boolean flag determining if the expense should be invoiced' + type: boolean + example: true + is_deleted: + description: 'Boolean flag determining if the recurring expense is deleted' + type: boolean + example: true + last_sent_date: + description: 'The Date it was sent last' type: string - example: default - gmail_sending_user_id: - description: 'The hashed_id of the user account to send email from' + format: date + example: '1994-07-30' + next_send_date: + description: 'The next send date' type: string - example: F76sd34D - email_subject_invoice: - description: '' + format: date + example: '1994-07-30' + invoice_documents: + description: 'Boolean flag determining if the documents associated with this expense should be passed onto the invoice if it is converted to an invoice' + type: boolean + example: true + updated_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + archived_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + type: object + ClientContact: + properties: + id: + description: 'The hashed if of the contact' type: string - example: 'Your Invoice Subject' - email_subject_quote: - description: '' + example: Opnel5aKBz + readOnly: true + user_id: + description: 'The hashed id of the user who created the contact' type: string - example: 'Your Quote Subject' - email_subject_payment: - description: '' + example: Opnel5aKBz + readOnly: true + client_id: + description: 'The hashed id of the client' type: string - example: 'Your Payment Subject' - email_template_invoice: - description: 'The full template for invoice emails' + example: Opnel5aKBz + readOnly: true + first_name: + description: 'The first name of the contact' type: string - example: '' - email_template_quote: - description: 'The full template for quote emails' + example: John + last_name: + description: 'The last name of the contact' type: string - example: '' - email_template_payment: - description: 'The full template for payment emails' + example: Doe + phone: + description: 'The phone number of the contact' type: string - example: '' - email_subject_reminder1: - description: 'Email subject for Reminder' + example: 555-152-4524 + custom_value1: + description: 'A Custom field value' type: string - example: '' - email_subject_reminder2: - description: 'Email subject for Reminder' + example: '' + custom_value2: + description: 'A Custom field value' + type: string + example: '' + custom_value3: + description: 'A Custom field value' + type: string + example: '' + custom_value4: + description: 'A Custom field value' type: string - example: '' - email_subject_reminder3: - description: 'Email subject for Reminder' + example: '' + email: + description: 'The email of the contact' type: string - example: '' - email_subject_reminder_endless: - description: 'Email subject for endless reminders' + example: '' + accepted_terms_version: + description: 'The terms of service which the contact has accpeted' type: string - example: '' - email_template_reminder1: - description: 'The full template for Reminder 1' + example: 'A long set of ToS' + readOnly: true + password: + description: 'The hashed password of the contact' type: string - example: '' - email_template_reminder2: - description: 'The full template for Reminder 2' + example: '*****' + confirmation_code: + description: 'The confirmation code used to authenticate the contacts email address' type: string - example: '' - email_template_reminder3: - description: 'The full template for Reminder 3' + example: 333-sdjkh34gbasd + readOnly: true + token: + description: 'A uuid based token.' type: string - example: '' - email_template_reminder_endless: - description: 'The full template for enless reminders' + example: 333-sdjkh34gbasd + readOnly: true + contact_key: + description: 'A unique identifier for the contact' type: string - example: '' - enable_portal_password: - description: 'Toggles whether a password is required to log into the client portal' - type: boolean - example: true - show_accept_invoice_terms: - description: 'Toggles whether the terms dialogue is shown to the client' + example: JD0X52bkfZlJRiroCJ0tcSiAjsJTntZ5uqKdiZ0a + readOnly: true + is_primary: + description: 'Defines is this contact is the primary contact for the client' type: boolean example: true - show_accept_quote_terms: - description: 'Toggles whether the terms dialogue is shown to the client' + confirmed: + description: 'Boolean value confirms the user has confirmed their account.' type: boolean example: true - require_invoice_signature: - description: 'Toggles whether a invoice signature is required' + is_locked: + description: 'Boolean value defines if the contact has been locked out.' type: boolean example: true - require_quote_signature: - description: 'Toggles whether a quote signature is required' + send_email: + description: 'Boolean value determines is this contact should receive emails' type: boolean example: true - name: - description: 'The company name' + failed_logins: + description: 'The number of failed logins the contact has had' + type: number + format: integer + example: '3' + readOnly: true + email_verified_at: + description: 'The date which the contact confirmed their email' + type: number + format: integer + example: '134341234234' + readOnly: true + last_login: + description: Timestamp + type: number + format: integer + example: '134341234234' + readOnly: true + created_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + readOnly: true + deleted_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + readOnly: true + type: object + Expense: + properties: + id: + description: 'The expense hashed id' type: string - example: 'Acme Co' - company_logo: - description: 'The company logo file' - type: object - example: logo.png - website: - description: 'The company website URL' + example: 'Opnel5aKBz' + user_id: + description: 'The user hashed id' type: string - example: www.acme.com - address1: - description: 'The company address line 1' + example: 'Opnel5aKBz' + assigned_user_id: + description: 'The assigned user hashed id' type: string - example: 'Suite 888' - address2: - description: 'The company address line 2' + example: 'Opnel5aKBz' + project_id: + description: 'The associated project_id' type: string - example: '5 Jimbo Way' - city: - description: 'The company city' + example: 'Opnel5aKBz' + client_id: + description: 'The client hashed id' type: string - example: Sydney - state: - description: 'The company state' + example: 'Opnel5aKBz' + invoice_id: + description: 'The related invoice hashed id' type: string - example: Florisa - postal_code: - description: 'The company zip/postal code' + example: 'Opnel5aKBz' + bank_id: + description: 'The bank id related to this expense' type: string - example: '90210' - phone: - description: 'The company phone' + example: '' + invoice_currency_id: + description: 'The currency id of the related invoice' type: string - example: 555-213-3948 - email: - description: 'The company email' + example: '1' + currency_id: + description: 'The currency id of the expense' type: string - example: joe@acme.co - country_id: - description: 'The country ID' + example: '2' + invoice_category_id: + description: 'The invoice category id' type: string - example: '1' - vat_number: - description: 'The company VAT/TAX ID number' + example: 'Opnel5aKBz' + payment_type_id: + description: 'The payment type id' type: string - example: '32 120 377 720' - page_size: - description: 'The default page size' + example: '' + recurring_expense_id: + description: 'The related recurring expense this expense was created from' type: string - example: A4 - font_size: - description: 'The font size' - type: number - example: '9' - primary_font: - description: 'The primary font' + example: 'Opnel5aKBz' + private_notes: + description: 'The private notes of the expense' type: string - example: roboto - secondary_font: - description: 'The secondary font' + example: '' + public_notes: + description: 'The public notes of the expense' type: string - example: roboto - hide_paid_to_date: - description: 'Flags whether to hide the paid to date field' - type: boolean - example: false - embed_documents: - description: 'Toggled whether to embed documents in the PDF' - type: boolean - example: false - all_pages_header: - description: 'The header for the PDF' - type: boolean - example: false - all_pages_footer: - description: 'The footer for the PDF' - type: boolean - example: false - document_email_attachment: - description: 'Toggles whether to attach documents in the email' - type: boolean - example: false - enable_client_portal_password: - description: 'Toggles password protection of the client portal' - type: boolean - example: false - enable_email_markup: - description: 'Toggles the use of markdown in emails' - type: boolean - example: false - enable_client_portal_dashboard: - description: 'Toggles whether the client dashboard is shown in the client portal' - type: boolean - example: false - enable_client_portal: - description: 'Toggles whether the entire client portal is displayed to the client, or only the context' - type: boolean - example: false - email_template_statement: - description: 'The body of the email for statements' + example: '' + transaction_reference: + description: 'The transaction references of the expense' type: string - example: 'template matter' - email_subject_statement: - description: 'The subject of the email for statements' + example: '' + transcation_id: + description: 'The transaction id of the expense' type: string - example: 'subject matter' - signature_on_pdf: - description: 'Toggles whether the signature (if available) is displayed on the PDF' - type: boolean - example: false - quote_footer: - description: 'The default quote footer' + example: '' + custom_value1: + description: 'A custom value' type: string - example: 'the quote footer' - email_subject_custom1: - description: 'Custom reminder template subject' + example: '' + custom_value2: + description: 'A custom value' type: string - example: 'Custom Subject 1' - email_subject_custom2: - description: 'Custom reminder template subject' + example: '' + custom_value3: + description: 'A custom value' type: string - example: 'Custom Subject 2' - email_subject_custom3: - description: 'Custom reminder template subject' + example: '' + custom_value4: + description: 'A custom value' type: string - example: 'Custom Subject 3' - email_template_custom1: - description: 'Custom reminder template body' + example: '' + tax_amount: + description: 'The tax amount' + type: number + example: 10.00 + tax_name1: + description: 'Tax Name 1' type: string - example: '' - email_template_custom2: - description: 'Custom reminder template body' + example: 'GST' + tax_name2: + description: 'Tax Name 2' type: string - example: '' - email_template_custom3: - description: 'Custom reminder template body' + example: 'VAT' + tax_name3: + description: 'Tax Name 3' type: string - example: '' - enable_reminder1: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - enable_reminder2: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - enable_reminder3: - description: 'Toggles whether this reminder is enabled' - type: boolean - example: false - num_days_reminder1: - description: 'The Reminder interval' + example: 'IVA' + tax_rate1: + description: 'Tax rate 1' type: number - example: '9' - num_days_reminder2: - description: 'The Reminder interval' + format: float + example: '10.00' + tax_rate2: + description: 'Tax rate 2' type: number - example: '9' - num_days_reminder3: - description: 'The Reminder interval' + format: float + example: '10.00' + tax_rate3: + description: 'Tax rate 3' type: number - example: '9' - schedule_reminder1: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - schedule_reminder2: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - schedule_reminder3: - description: '(enum: after_invoice_date, before_due_date, after_due_date)' - type: string - example: after_invoice_date - late_fee_amount1: - description: 'The late fee amount for reminder 1' + format: float + example: '10.00' + amount: + description: 'The total expense amont' type: number - example: 10 - late_fee_amount2: - description: 'The late fee amount for reminder 2' + format: float + example: '10.00' + foreign_amount: + description: 'The total foreign amount of the expense' type: number - example: 20 - late_fee_amount3: - description: 'The late fee amount for reminder 2' + format: float + example: '10.00' + exchange_rate: + description: 'The exchange rate at the time of the expense' type: number - example: 100 - endless_reminder_frequency_id: - description: 'The frequency id of the endless reminder' - type: string - example: '1' - client_online_payment_notification: - description: 'Determines if a client should receive the notification for a online payment' - type: boolean - example: false - client_manual_payment_notification: - description: 'Determines if a client should receive the notification for a manually entered payment' - type: boolean - example: false - enable_e_invoice: - description: 'Determines if e-invoicing is enabled' - type: boolean - example: false - default_expense_payment_type_id: - description: 'The default payment type for expenses' - type: string - example: '0' - e_invoice_type: - description: 'The e-invoice type' + format: float + example: '0.80' + date: + description: 'The expense date format Y-m-d' type: string - example: 'EN16931' - mailgun_endpoint: - description: 'The mailgun endpoint - used to determine whether US or EU endpoints are used' + example: '2022-12-01' + payment_date: + description: 'The date of payment for the expense, format Y-m-d' type: string - example: 'api.mailgun.net or api.eu.mailgun.net' - client_initiated_payments: - description: 'Determines if clients can initiate payments directly from the client portal' - type: boolean - example: false - client_initiated_payments_minimum: - description: 'The minimum amount a client can pay' - type: number - example: 10 - sync_invoice_quote_columns: - description: 'Determines if invoice and quote columns are synced for the PDF rendering, or if they use their own columns' - type: boolean - example: false - show_task_item_description: - description: 'Determines if the task item description is shown on the invoice' - type: boolean - example: false - allow_billable_task_items: - description: 'Determines if task items can be marked as billable' - type: boolean - example: false - accept_client_input_quote_approval: - description: 'Determines if clients can approve quotes and also pass through a PO Number reference' + example: '2022-12-01' + should_be_invoiced: + description: 'Flag whether the expense should be invoiced' type: boolean - example: false - custom_sending_email: - description: 'When using Mailgun or Postmark, the FROM email address can be customized using this setting.' - type: string - example: 'bob@gmail.com' - show_paid_stamp: - description: 'Determines if the PAID stamp is shown on the invoice' + example: true + is_deleted: + description: 'Boolean determining whether the expense has been deleted' type: boolean - example: false - show_shipping_address: - description: 'Determines if the shipping address is shown on the invoice' + example: true + invoice_documents: + description: 'Passing the expense documents over to the invoice' type: boolean - example: false - company_logo_size: - description: 'The size of the company logo on the PDF - percentage value between 0 and 100' + example: true + updated_at: + description: Timestamp type: number - example: 100 - show_email_footer: - description: 'Determines if the email footer is shown on emails' - type: boolean - example: false - email_alignment: - description: 'The alignment of the email body text, options include left / center / right' + format: integer + example: '1434342123' + archived_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + type: object + Task: + properties: + id: + description: 'The hashed id of the task' type: string - example: 'left' - auto_bill_standard_invoices: - description: 'Determines if standard invoices are automatically billed when they are created or due' - type: boolean - example: false - postmark_secret: - description: 'The Postmark secret API key' + example: Opnel5aKBz + user_id: + description: 'The hashed id of the user who created the task' type: string - example: '123456' - mailgun_secret: - description: 'The Mailgun secret API key' + example: Opnel5aKBz + assigned_user_id: + description: 'The assigned user of the task' type: string - example: '123456' - mailgun_domain: - description: 'The Mailgun domain' + example: Opnel5aKBz + client_id: + description: 'The hashed if of the client' type: string - example: 'sandbox123456.mailgun.org' - send_email_on_mark_paid: - description: 'Determines if an email is sent when an invoice is marked as paid' - type: boolean - example: false - vendor_portal_enable_uploads: - description: 'Determines if vendors can upload files to the portal' - type: boolean - example: false - besr_id: - description: 'The BESR ID' + example: Opnel5aKBz + invoice_id: + description: 'The hashed id of the invoice associated with the task' type: string - example: '123456' - qr_iban: - description: 'The IBAN for the QR code' + example: Opnel5aKBz + project_id: + description: 'The hashed id of the project associated with the task' type: string - example: 'CH123456' - email_subject_purchase_order: - description: 'The email subject for purchase orders' + example: Opnel5aKBz + number: + description: 'The number of the task' type: string - example: 'Purchase Order' - email_template_purchase_order: - description: 'The email template for purchase orders' + example: TASK-123 + time_log: + description: 'An array of unix time stamps defining the start and end times of the task' type: string - example: 'Please see attached your purchase order.' - require_purchase_order_signature: - description: 'Determines if a signature is required on purchase orders' + example: '[[1,2],[3,4]]' + is_running: + description: 'Determines if the task is still running' type: boolean - example: false - purchase_order_public_notes: - description: 'The public notes for purchase orders' + example: true + is_deleted: + description: 'Boolean flag determining if the task has been deleted' + type: boolean + example: true + task_status_id: + description: 'The hashed id of the task status' type: string - example: 'Please see attached your purchase order.' - purchase_order_terms: - description: 'The terms for purchase orders' + example: Opnel5aKBz + description: + description: 'The task description' type: string - example: 'Please see attached your purchase order.' - purchase_order_footer: - description: 'The footer for purchase orders' + example: 'A wonder task to work on' + duration: + description: 'The task duration in seconds' + type: integer + example: '3600' + task_status_order: + description: 'The order of the task' + type: integer + example: '4' + rate: + description: 'The task rate' + type: number + example: 10.00 + custom_value1: + description: 'A custom value' type: string - example: 'Please see attached your purchase order.' - purchase_order_design_id: - description: 'The design id for purchase orders' + example: '2022-10-10' + custom_value2: + description: 'A custom value' type: string - example: 'hd677df' - purchase_order_number_pattern: - description: 'The pattern for purchase order numbers' + example: $1100 + custom_value3: + description: 'A custom value' type: string - example: 'PO-000000' - purchase_order_number_counter: - description: 'The counter for purchase order numbers' - type: number - example: 1 - page_numbering_alignment: - description: 'The alignment for page numbering: options include left / center / right' + example: 'I need help' + custom_value4: + description: 'A custom value' type: string - example: 'left' - page_numbering: - description: 'Determines if page numbering is enabled on Document PDFs' - type: boolean - example: false - auto_archive_invoice_cancelled: - description: 'Determines if invoices are automatically archived when they are cancelled' + example: INV-3343 + is_date_based: + description: 'Boolean flag determining if the task is date based' type: boolean - example: false - email_from_name: - description: 'The FROM name for emails when using Custom emailers' + example: true + calculated_start_date: + description: 'The calculated start date of the task' type: string - example: 'Bob Smith' - show_all_tasks_client_portal: - description: 'Determines if all tasks are shown on the client portal' - type: boolean - example: false - entity_send_time: - description: 'The time that emails are sent. The time is localized to the clients locale, integer values from 1 - 24' - type: integer - example: 9 - shared_invoice_credit_counter: - description: 'Determines if the invoice and credit counter are shared' + example: '2022-10-10' + readOnly: true + invoice_documents: + description: "Boolean flags which determines whether to include the task documents on the invoice" type: boolean - example: false - reply_to_name: - description: 'The reply to name for emails' + example: true + created_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + readOnly: true + updated_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + readOnly: true + archived_at: + description: Timestamp + type: number + format: integer + example: '1434342123' + readOnly: true + type: object + + FeesAndLimits: + properties: + min_limit: + description: 'The minimum amount accepted for this gateway' type: string - example: 'Bob Smith' - hide_empty_columns_on_pdf: - description: 'Determines if empty columns are hidden on PDFs' - type: boolean - example: false - enable_reminder_endless: - description: 'Determines if endless reminders are enabled' - type: boolean - example: false - use_credits_payment: - description: 'Determines if credits can be used as a payment method' - type: boolean - example: false - recurring_invoice_number_pattern: - description: 'The pattern for recurring invoice numbers' + example: '2' + max_limit: + description: 'The maximum amount accepted for this gateway' type: string - example: 'R-000000' - recurring_invoice_number_counter: - description: 'The counter for recurring invoice numbers' + example: '2' + fee_amount: + description: 'The gateway fee amount' type: number - example: 1 - client_portal_under_payment_minimum: - description: 'The minimum payment payment' + format: float + example: '2.0' + fee_percent: + description: 'The gateway fee percentage' type: number - example: 10 - auto_bill_date: - description: 'Determines when the invoices are auto billed, options are on_send_date (when the invoice is sent) or on_due_date (when the invoice is due))' + format: float + example: '2.0' + fee_tax_name1: + description: 'Fee tax name' type: string - example: 'on_send_date' - primary_color: - description: 'The primary color for the client portal / document highlights' + example: GST + fee_tax_name2: + description: 'Fee tax name' type: string - example: '#ffffff' - secondary_color: - description: 'The secondary color for the client portal / document highlights' + example: VAT + fee_tax_name3: + description: 'Fee tax name' type: string - example: '#ffffff' - client_portal_allow_under_payment: - description: 'Determines if clients can pay invoices under the invoice amount due' - type: boolean - example: false - client_portal_allow_over_payment: - description: 'Determines if clients can pay invoices over the invoice amount' + example: 'CA Sales Tax' + fee_tax_rate1: + description: 'The tax rate' + type: number + format: float + example: '10.0' + fee_tax_rate2: + description: 'The tax rate' + type: number + format: float + example: '17.5' + fee_tax_rate3: + description: 'The tax rate' + type: number + format: float + example: '25.0' + fee_cap: + description: 'If set the fee amount will be no higher than this amount' + type: number + format: float + example: '2.0' + adjust_fee_percent: + description: 'Adjusts the fee to match the exact gateway fee.' type: boolean - example: false - auto_bill: - description: 'Determines how autobilling is applied for recurring invoices. off (no auto billed), always (always auto bill), optin (The user must opt in to auto billing), optout (The user must opt out of auto billing' + example: true + type: object + Vendor: + properties: + id: + description: 'The hashed id of the vendor. This is a unique identifier for the vendor.' type: string - example: 'off' - client_portal_terms: - description: 'The terms which are displayed on the client portal' + example: Opnel5aKBz + readOnly: true + user_id: + description: 'The hashed id of the user who created the vendor. This is a unique identifier for the user.' type: string - example: 'Please see attached your invoice.' - client_portal_privacy_policy: - description: 'The privacy policy which is displayed on the client portal' + example: Opnel5aKBz + assigned_user_id: + description: 'The hashed id of the assigned user to this vendor. This is a unique identifier for the user.' type: string - example: 'These are the terms of use for using the client portal.' - client_can_register: - description: 'Determines if clients can register on the client portal' - type: boolean - example: false - portal_design_id: - description: 'The design id for the client portal' + example: Opnel5aKBz + contacts: + type: array + items: + $ref: '#/components/schemas/VendorContact' + description: 'An array of contacts associated with the vendor.' + name: + description: 'The name of the vendor.' type: string - example: 'hd677df' - late_fee_endless_percent: - description: 'The late fee percentage for endless late fees' - type: number - example: 10 - late_fee_endless_amount: - description: 'The late fee amount for endless late fees' - type: number - example: 10 - auto_email_invoice: - description: 'Determines if invoices are automatically emailed when they are created' - type: boolean - example: false - email_signature: - description: 'The email signature for emails' + example: 'Harry cafe de wheels' + classification: + description: 'The classification of the vendor.' + type: string + example: 'individual' + website: + description: 'The website of the vendor.' type: string - example: 'Bob Smith' - type: object - Quote: - properties: - id: - description: 'The unique hashed identifier for the quote' + example: www.harry.com + private_notes: + description: 'The private notes of the vendor. These notes are only visible to users with appropriate permissions.' type: string - example: Opnel5aKBz - user_id: - description: 'The unique hashed identifier for the user who created the quote' + example: 'Shhh, do not tell the vendor' + industry_id: + description: 'The industry id of the vendor. This is a unique identifier for the industry.' type: string - example: '' - assigned_user_id: - description: 'The unique hashed identifier for the user assigned to the quote' + example: '1' + size_id: + description: 'The size id of the vendor. This is a unique identifier for the size of the vendor.' type: string example: '' - client_id: - description: 'The unique hashed identifier for the client associated with the quote' + address1: + description: 'The first line of the vendor''s address.' type: string example: '' - status_id: - description: 'The status of the quote represented by a unique identifier' + address2: + description: 'The second line of the vendor''s address.' type: string example: '' - number: - description: 'The unique alpha-numeric quote number for the quote per company' + city: + description: 'The city of the vendor''s address.' type: string - example: QUOTE_101 - po_number: - description: 'The purchase order number associated with the quote' + example: '' + state: + description: 'The state of the vendor''s address.' type: string - example: PO-1234 - terms: - description: 'The terms and conditions for the quote' + example: '' + postal_code: + description: 'The postal code of the vendor''s address.' type: string - example: 'These are some quote terms. Valid for 14 days.' - public_notes: - description: 'Publicly visible notes associated with the quote' + example: '' + phone: + description: 'The phone number of the vendor.' type: string - example: 'These are public notes which the client may see' - private_notes: - description: 'Privately visible notes associated with the quote, not disclosed to the client' + example: 555-3434-3434 + country_id: + description: 'The country id of the vendor. This is a unique identifier for the country.' type: string - example: 'These are private notes, not to be disclosed to the client' - footer: - description: 'The footer text of the quote' + example: '' + currency_id: + description: 'The currency id of the vendor. This is a unique identifier for the currency.' type: string - example: 'The text goes in the footer of the quote' + example: '4' custom_value1: - description: 'First custom value field for additional information' + description: 'The value of the first custom field for the vendor.' type: string - example: 'A custom value' + example: '' custom_value2: - description: 'Second custom value field for additional information' + description: 'The value of the second custom field for the vendor.' type: string - example: 'A custom value' + example: '' custom_value3: - description: 'Third custom value field for additional information' + description: 'The value of the third custom field for the vendor.' type: string - example: 'A custom value' + example: '' custom_value4: - description: 'Fourth custom value field for additional information' - type: string - example: 'A custom value' - tax_name1: - description: 'The name of the first tax applied to the quote' + description: 'The value of the fourth custom field for the vendor.' type: string - example: GST - tax_name2: - description: 'The name of the second tax applied to the quote' + example: '' + vat_number: + description: 'The VAT number of the vendor.' type: string - example: VAT - tax_rate1: - description: 'The rate of the first tax applied to the quote' - type: number - format: float - example: 10.00 - tax_rate2: - description: 'The rate of the second tax applied to the quote' - type: number - format: float - example: 10.00 - tax_name3: - description: 'The name of the third tax applied to the quote' + example: '' + id_number: + description: 'The ID number of the vendor.' type: string example: '' - tax_rate3: - description: 'The rate of the third tax applied to the quote' - type: number - format: float - example: 10.00 - total_taxes: - description: 'The total amount of taxes for the quote' - type: number - format: float - example: 10.00 - line_items: - type: array - description: 'An array of objects which define the line items of the quote' - items: - $ref: '#/components/schemas/InvoiceItem' - amount: - description: 'The total amount of the quote before taxes and discounts' - type: number - format: float - example: 10.00 - balance: - description: 'The balance due for the quote after accounting for payments' - type: number - format: float - example: 10.00 - paid_to_date: - description: 'The total amount paid on the quote so far' - type: number - format: float - example: 10.00 - discount: - description: 'The discount amount or percentage applied to the quote' - type: number - format: float - example: 10.00 - partial: - description: 'The partial or deposit amount for the quote' - type: number - format: float - example: 10.00 - is_amount_discount: - description: 'Boolean flag indicating if the discount is a fixed amount or a percentage' - type: boolean - example: true + number: + description: 'The number of the vendor' + type: string + example: '11234' is_deleted: - description: 'Boolean flag indicating if the quote has been deleted' - type: boolean - example: false - uses_inclusive_taxes: - description: 'Boolean flag indicating if the taxes used are inclusive or exclusive' + description: 'Boolean flag determining if the vendor has been deleted' type: boolean example: true - date: - description: 'The date the quote was created' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the quote was sent to the client' - type: string - format: date - example: '1994-07-30' - next_send_date: - description: 'The next scheduled date for sending a reminder for the quote' + language_id: + description: 'The language id of the vendor. This is a unique identifier for the language.' type: string - format: date - example: '1994-07-30' - partial_due_date: - description: 'The due date for the partial or deposit amount' + example: '1' + vendor_hash: + description: 'The vendor hash of the vendor. This is a unique identifier for the vendor.' type: string - format: date - example: '1994-07-30' - due_date: - description: 'The due date for the total amount of the quote' + example: 'aaa-sss-www' + readOnly: true + transaction_name: + description: 'The transaction name of the vendor.' type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: 'The timestamp of the last time the quote was viewed' + example: 'aaa-sss-www' + last_login: + description: Timestamp type: number format: integer - example: 1434342123 - updated_at: - description: 'The timestamp of the last update to the quote' + example: '134341234234' + readOnly: true + created_at: + description: Timestamp type: number format: integer - example: 1434342123 - archived_at: - description: 'The timestamp of when the quote was archived' + example: '134341234234' + readOnly: true + updated_at: + description: Timestamp type: number format: integer - example: 1434342123 - custom_surcharge1: - description: 'First custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge2: - description: 'Second custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge3: - description: 'Third custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge4: - description: 'Fourth custom surcharge amount for the quote' - type: number - format: float - example: 10.00 - custom_surcharge_tax1: - description: 'Boolean flag indicating if taxes are charged on the first custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax2: - description: 'Boolean flag indicating if taxes are charged on the second custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax3: - description: 'Boolean flag indicating if taxes are charged on the third custom surcharge amount' - type: boolean - example: true - custom_surcharge_tax4: - description: 'Boolean flag indicating if taxes are charged on the fourth custom surcharge amount' - type: boolean - example: true + example: '134341234234' + readOnly: true + display_name: + description: 'The display name of the vendor.' + type: string + example: 'Bob the vendor' + readOnly: true type: object tags: - name: login