From 11b15b05c9b56794f74f4ec2a76d69d5e583117c Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 2 Jul 2023 16:00:24 +1000 Subject: [PATCH] Update company openapi schema --- openapi/api-docs.yaml | 11028 +++++++++++----------- openapi/components/schemas/company.yaml | 239 +- 2 files changed, 5854 insertions(+), 5413 deletions(-) diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index 29784e0102..0d6a4d73c0 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -8044,6 +8044,852 @@ paths: default: $ref: "#/components/responses/default" + /api/v1/products: + get: + tags: + - products + summary: "List products" + description: | + Lists products, search and filters allow fine grained lists to be generated. + Query parameters can be added to perform fine grained filtering of the products list, these are handled by the ProductFilters class + which defines the methods available + operationId: getProducts + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - $ref: "#/components/parameters/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: Filter by product name + required: false + schema: + type: string + example: bob + - name: product_key + in: query + description: Filter by product key + required: false + schema: + type: string + 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 product_key|desc + responses: + 200: + description: "A list of products" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $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' + post: + tags: + - products + summary: "Create Product" + description: "Adds a product to a company" + operationId: storeProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + 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" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $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/{id}": + get: + tags: + - products + summary: "Show product" + description: "Displays a product by id" + operationId: showProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + 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" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 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' + put: + tags: + - products + summary: "Update product" + description: "Handles the updating of a product by id" + operationId: updateProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + 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" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 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' + delete: + tags: + - products + summary: "Delete product" + description: "Handles the deletion of a product by id" + operationId: deleteProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: '#/components/responses/401' + 403: + $ref: '#/components/responses/403' + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: '#/components/responses/default' + "/api/v1/products/{id}/edit": + get: + tags: + - products + summary: "Edit product" + description: "Displays an Product by id" + operationId: editProduct + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Product Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + 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" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 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/create": + get: + tags: + - products + summary: "Blank product" + description: "Returns a blank product object with default values" + operationId: getProductsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank Product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $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/bulk: + post: + tags: + - products + summary: "Bulk product actions" + 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 array' + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/ProductBulkAction' + responses: + 200: + description: "The Product 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/Product" + 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/{id}/upload": + put: + tags: + - 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/client_include" + - name: id + in: path + description: "The Product 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 the Product object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Product" + 401: + $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" + 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/Task" + 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" + post: + tags: + - 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 task 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/Task" + 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/{id}": + get: + tags: + - 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 Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the task 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/Task" + 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" + put: + tags: + - 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 task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the task 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/Task" + 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" + delete: + tags: + - 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 Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/tasks/{id}/edit": + get: + tags: + - 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 Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the client object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 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/create: + get: + tags: + - 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 task 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/Task" + 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/bulk: + post: + tags: + - tasks + summary: "Bulk task actions" + description: "" + operationId: bulkTasks + 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 Task User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Task" + 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/{id}/upload": + put: + tags: + - 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: id + in: path + description: "The Task Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Task 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/Task" + 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/sort: + post: + tags: + - 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" + responses: + 200: + description: "Returns an Ok, 200 HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" /api/v1/projects: get: tags: @@ -9067,1387 +9913,20 @@ paths: description: 'Server error' default: $ref: '#/components/responses/default' - /api/v1/quotes: + /api/v1/credits: 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 - 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: - - number - - custom_value1 - - custom_value2 - - custom_value3 - - custom_value4 - required: false - schema: - type: string - example: ?filter=bob - - name: client_status - in: query - description: | - A comma separated list of quote status strings. Valid options include: - - all - - draft - - sent - - approved - - expired - - upcoming - required: false - schema: - type: string - 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 number|desc balance|asc - responses: - 200: - description: "A list of quotes" - 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" - post: - tags: - - quotes - summary: "Create quote" - description: "Adds an Quote to the system" - operationId: storeQuote + - 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" responses: 200: - description: "Returns the saved 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/quotes/{id}": - get: - tags: - - 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 Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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" - put: - tags: - - 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 Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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" - delete: - tags: - - 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 Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/quotes/{id}/edit": - get: - tags: - - 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 Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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/quotes/create: - get: - tags: - - 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 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/quotes/bulk: - post: - tags: - - 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: "Hashed ids" - 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 Quote 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/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/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": - put: - tags: - - 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/include" - - name: id - in: path - description: "The Quote Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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/products: - get: - tags: - - products - summary: "List products" - description: | - Lists products, search and filters allow fine grained lists to be generated. - Query parameters can be added to perform fine grained filtering of the products list, these are handled by the ProductFilters class - which defines the methods available - operationId: getProducts - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/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: Filter by product name - required: false - schema: - type: string - example: bob - - name: product_key - in: query - description: Filter by product key - required: false - schema: - type: string - 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 product_key|desc - responses: - 200: - description: "A list of products" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $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' - post: - tags: - - products - summary: "Create Product" - description: "Adds a product to a company" - operationId: storeProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - 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" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $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/{id}": - get: - tags: - - products - summary: "Show product" - description: "Displays a product by id" - operationId: showProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 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' - put: - tags: - - products - summary: "Update product" - description: "Handles the updating of a product by id" - operationId: updateProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - 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" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 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' - delete: - tags: - - products - summary: "Delete product" - description: "Handles the deletion of a product by id" - operationId: deleteProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: '#/components/responses/401' - 403: - $ref: '#/components/responses/403' - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: '#/components/responses/default' - "/api/v1/products/{id}/edit": - get: - tags: - - products - summary: "Edit product" - description: "Displays an Product by id" - operationId: editProduct - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Product Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - 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" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 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/create": - get: - tags: - - products - summary: "Blank product" - description: "Returns a blank product object with default values" - operationId: getProductsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank Product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $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/bulk: - post: - tags: - - products - summary: "Bulk product actions" - 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 array' - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/ProductBulkAction' - responses: - 200: - description: "The Product 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/Product" - 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/{id}/upload": - put: - tags: - - 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/client_include" - - name: id - in: path - description: "The Product 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 the Product object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Product" - 401: - $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" - 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/Task" - 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" - post: - tags: - - 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 task 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/Task" - 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/{id}": - get: - tags: - - 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 Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the task 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/Task" - 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" - put: - tags: - - 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 task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the task 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/Task" - 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" - delete: - tags: - - 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 Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/tasks/{id}/edit": - get: - tags: - - 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 Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the client object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 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/create: - get: - tags: - - 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 task 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/Task" - 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/bulk: - post: - tags: - - tasks - summary: "Bulk task actions" - description: "" - operationId: bulkTasks - 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 Task User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Task" - 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/{id}/upload": - put: - tags: - - 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: id - in: path - description: "The Task Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Task 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/Task" - 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/sort: - post: - tags: - - 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" - responses: - 200: - description: "Returns an Ok, 200 HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/purchase_orders: - 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 - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A list of purchase orders" + description: "A list of credits" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10473,17 +9952,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - Purchase Orders - summary: "Create purchase order" - description: "Adds an purchase order to the system" - operationId: storePurchaseOrder + - 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 purchase order object" + description: "Returns the saved credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10499,6 +9978,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10508,20 +9988,20 @@ paths: default: $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}": + "/api/v1/credits/{id}": get: tags: - - Purchase Orders - summary: "Show purchase order" - description: "Displays an purchase order by id" - operationId: showPurchaseOrder + - 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 Purchase order Hashed ID" + description: "The Credit Hashed ID" required: true schema: type: string @@ -10529,7 +10009,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the purchase order object" + description: "Returns the credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10545,6 +10025,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10553,20 +10034,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 + - 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 purchase order Hashed ID" + description: "The Credit Hashed ID" required: true schema: type: string @@ -10574,7 +10054,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the purchase order object" + description: "Returns the Credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10590,6 +10070,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10600,17 +10081,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 + - 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 purhcase order Hashed ID" + description: "The Credit Hashed ID" required: true schema: type: string @@ -10630,6 +10111,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10638,20 +10120,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/purchase_orders/{id}/edit": + "/api/v1/credits/{id}/edit": get: tags: - - Purchase Orders - summary: "Edit purchase order" - description: "Displays an purchase order by id" - operationId: editPurchaseOrder + - 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 purchase order Hashed ID" + description: "The Invoice Hashed ID" required: true schema: type: string @@ -10659,7 +10141,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the purchase order object" + description: "Returns the credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10675,6 +10157,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10683,21 +10166,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - /api/v1/purchase_orders/create: + /api/v1/credits/create: get: tags: - - Purchase Orders - summary: "Blank purchase order" + - credits + summary: "Blank credit" description: "Returns a blank object with default values" - operationId: getPurchaseOrderCreate + operationId: getCreditsCreate 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 credit object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10713,6 +10195,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10721,19 +10204,19 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/purchase_orders/bulk: + /api/v1/credits/bulk: post: tags: - - Purchase Orders - summary: "Bulk purchase order action" + - credits + summary: "Bulk credit actions" description: "" - operationId: bulkPurchaseOrderss + operationId: bulkCredits 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: @@ -10741,8 +10224,8 @@ 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 Bulk Action response" @@ -10757,6 +10240,7 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" + 422: $ref: '#/components/responses/422' 429: @@ -10765,119 +10249,20 @@ paths: 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 invoice 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/Invoice" - 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}/upload": - put: - tags: - - 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 Purchase Order Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Purchase Order object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/purchase_order/{invitation_key}/download": + "/api/v1/credit/{invitation_key}/download": get: tags: - - Purchase Orders - summary: "Download a purchase order PDF" - description: "Downloads a specific purchase order" - operationId: downloadPurchaseOrder + - 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 Purchase Order Invitation Key" + description: "The Credit Invitation Key" required: true schema: type: string @@ -10885,7 +10270,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Purchase Order pdf" + description: "Returns the credit pdf" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -10897,6 +10282,52 @@ paths: $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": + put: + tags: + - 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 Credit Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Credit 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/Credit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" 422: $ref: '#/components/responses/422' 429: @@ -11425,384 +10856,6 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/vendors: - get: - tags: - - vendors - summary: "List vendors" - description: "Lists vendors, search and filters allow fine grained lists to be generated.\n\n Query parameters can be added to performed more fine grained filtering of the vendors, these are handled by the VendorFilters class which defines the methods available" - operationId: getVendors - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - $ref: "#/components/parameters/index" - responses: - 200: - description: "A list of vendors" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $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" - post: - tags: - - vendors - summary: "Create vendor" - description: "Adds a vendor to a company" - operationId: storeVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "Returns the saved clivendorent object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/vendors/{id}": - get: - tags: - - vendors - summary: "Show vendor" - description: "Displays a vendor by id" - operationId: showVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - put: - tags: - - vendors - summary: "Update vendor" - description: "Handles the updating of a vendor by id" - operationId: updateVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - delete: - tags: - - vendors - summary: "Delete vendor" - description: "Handles the deletion of a vendor by id" - operationId: deleteVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns a HTTP status" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/vendors/{id}/edit": - get: - tags: - - vendors - summary: "Edit vendor" - description: "Displays a vendor by id" - operationId: editVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/vendors/create: - get: - tags: - - vendors - summary: "Blank vendor" - description: "Returns a blank vendor with default values" - operationId: getVendorsCreate - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - responses: - 200: - description: "A blank vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - /api/v1/vendors/bulk: - post: - tags: - - vendors - summary: "Bulk vendor actions" - description: "" - operationId: bulkVendors - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/index" - requestBody: - description: "User credentials" - required: true - content: - application/json: - schema: - type: array - items: - description: "Array of hashed IDs to be bulk 'actioned" - type: integer - example: "[0,1,2,3]" - responses: - 200: - description: "The Vendor User response" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" - "/api/v1/vendors/{id}/upload": - put: - tags: - - vendors - summary: "Uploads a vendor document" - description: "Handles the uploading of a document to a vendor" - operationId: uploadVendor - parameters: - - $ref: "#/components/parameters/X-API-TOKEN" - - $ref: "#/components/parameters/X-Requested-With" - - $ref: "#/components/parameters/include" - - name: id - in: path - description: "The Vendor Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA - responses: - 200: - description: "Returns the Vendor object" - headers: - X-MINIMUM-CLIENT-VERSION: - $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" - X-RateLimit-Remaining: - $ref: "#/components/headers/X-RateLimit-Remaining" - X-RateLimit-Limit: - $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - $ref: "#/components/schemas/Vendor" - 401: - $ref: "#/components/responses/401" - 403: - $ref: "#/components/responses/403" - 422: - $ref: '#/components/responses/422' - 429: - $ref: '#/components/responses/429' - 5XX: - description: 'Server error' - default: - $ref: "#/components/responses/default" /api/v1/invoices: get: tags: @@ -13015,20 +12068,69 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/credits: + /api/v1/quotes: 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 + - 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" - $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: + - number + - custom_value1 + - custom_value2 + - custom_value3 + - custom_value4 + required: false + schema: + type: string + example: ?filter=bob + - name: client_status + in: query + description: | + A comma separated list of quote status strings. Valid options include: + - all + - draft + - sent + - approved + - expired + - upcoming + required: false + schema: + type: string + 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 number|desc balance|asc responses: 200: - description: "A list of credits" + description: "A list of quotes" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13039,7 +12141,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: @@ -13054,17 +12156,17 @@ paths: $ref: "#/components/responses/default" post: tags: - - credits - summary: "Create credit" - description: "Adds an credit to the system" - operationId: storeCredit + - 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" responses: 200: - description: "Returns the saved credit object" + description: "Returns the saved Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13075,12 +12177,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13089,21 +12190,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - - "/api/v1/credits/{id}": + "/api/v1/quotes/{id}": get: tags: - - credits - summary: "Show credit" - description: "Displays an credit by id" - operationId: showCredit + - 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 Credit Hashed ID" + description: "The Quote Hashed ID" required: true schema: type: string @@ -13111,7 +12211,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the credit object" + description: "Returns the Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13122,12 +12222,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13138,17 +12237,17 @@ paths: $ref: "#/components/responses/default" put: tags: - - Credits - summary: "Update credit" - description: "Handles the updating of an Credit by id" - operationId: updateCredit + - 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 Credit Hashed ID" + description: "The Quote Hashed ID" required: true schema: type: string @@ -13156,7 +12255,7 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the Credit object" + description: "Returns the Quote object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13167,12 +12266,11 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13183,17 +12281,17 @@ paths: $ref: "#/components/responses/default" delete: tags: - - credits - summary: "Delete credit" - description: "Handles the deletion of an credit by id" - operationId: deleteCredit + - 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 Credit Hashed ID" + description: "The Quote Hashed ID" required: true schema: type: string @@ -13213,7 +12311,6 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13222,20 +12319,20 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/credits/{id}/edit": + "/api/v1/quotes/{id}/edit": get: tags: - - credits - summary: "Edit credit" - description: "Displays an credit by id" - operationId: editCredit + - 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 Invoice Hashed ID" + description: "The Quote Hashed ID" required: true schema: type: string @@ -13243,7 +12340,481 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the credit object" + 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/quotes/create: + get: + tags: + - 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 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/quotes/bulk: + post: + tags: + - 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: "Hashed ids" + 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 Quote 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/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/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": + put: + tags: + - 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/include" + - name: id + in: path + description: "The Quote Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + 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/purchase_orders: + 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 + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A list of purchase orders" + 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/Credit" + 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" + post: + tags: + - 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" + responses: + 200: + description: "Returns the saved purchase order 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/Credit" + 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}": + get: + tags: + - 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 Purchase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the purchase order 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/Credit" + 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_order/{id}": + put: + tags: + - 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 purchase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the purchase order 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/Credit" + 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" + delete: + tags: + - 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 purhcase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_orders/{id}/edit": + get: + tags: + - 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 purchase order Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13259,7 +12830,6 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13268,20 +12838,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/credits/create: + + /api/v1/purchase_orders/create: get: tags: - - credits - summary: "Blank credit" + - Purchase Orders + summary: "Blank purchase order" description: "Returns a blank object with default values" - operationId: getCreditsCreate + operationId: getPurchaseOrderCreate 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 purchase order object" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13297,7 +12868,6 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13306,19 +12876,19 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - /api/v1/credits/bulk: + /api/v1/purchase_orders/bulk: post: tags: - - credits - summary: "Bulk credit actions" + - Purchase Orders + summary: "Bulk purchase order action" description: "" - operationId: bulkCredits + operationId: bulkPurchaseOrderss parameters: - $ref: "#/components/parameters/X-API-TOKEN" - $ref: "#/components/parameters/X-Requested-With" - $ref: "#/components/parameters/index" requestBody: - description: "User credentials" + description: "Purchase Order IDS" required: true content: application/json: @@ -13326,8 +12896,8 @@ 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" @@ -13342,7 +12912,6 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13351,20 +12920,74 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/credit/{invitation_key}/download": + "/api/v1/purchase_orders/{id}/{action}": get: + deprecated: true tags: - - quotes - summary: "Download quote PDF" - description: "Downloads a specific quote" - operationId: downloadCredit + - 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: invitation_key + - name: id in: path - description: "The Credit Invitation Key" + 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 invoice 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/Invoice" + 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}/upload": + put: + tags: + - 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 Purchase Order Hashed ID" required: true schema: type: string @@ -13372,7 +12995,52 @@ paths: example: D2J234DFA responses: 200: - description: "Returns the credit pdf" + description: "Returns the Purchase Order object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/purchase_order/{invitation_key}/download": + get: + tags: + - 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" @@ -13384,7 +13052,6 @@ paths: $ref: "#/components/responses/401" 403: $ref: "#/components/responses/403" - 422: $ref: '#/components/responses/422' 429: @@ -13393,28 +13060,21 @@ paths: description: 'Server error' default: $ref: "#/components/responses/default" - "/api/v1/credits/{id}/upload": - put: + /api/v1/vendors: + get: tags: - - credits - summary: "Upload a credit document" - description: "Handles the uploading of a document to a credit" - operationId: uploadCredits + - 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: id - in: path - description: "The Credit Hashed ID" - required: true - schema: - type: string - format: string - example: D2J234DFA + - $ref: "#/components/parameters/index" responses: 200: - description: "Returns the Credit object" + description: "A list of vendors" headers: X-MINIMUM-CLIENT-VERSION: $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" @@ -13425,7 +13085,347 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/Credit" + $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" + post: + tags: + - vendors + summary: "Create vendor" + description: "Adds a vendor to a company" + operationId: storeVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "Returns the saved clivendorent object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/vendors/{id}": + get: + tags: + - vendors + summary: "Show vendor" + description: "Displays a vendor by id" + operationId: showVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + put: + tags: + - vendors + summary: "Update vendor" + description: "Handles the updating of a vendor by id" + operationId: updateVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + delete: + tags: + - vendors + summary: "Delete vendor" + description: "Handles the deletion of a vendor by id" + operationId: deleteVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns a HTTP status" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/vendors/{id}/edit": + get: + tags: + - vendors + summary: "Edit vendor" + description: "Displays a vendor by id" + operationId: editVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + /api/v1/vendors/create: + get: + tags: + - vendors + summary: "Blank vendor" + description: "Returns a blank vendor with default values" + operationId: getVendorsCreate + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + responses: + 200: + description: "A blank vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + /api/v1/vendors/bulk: + post: + tags: + - vendors + summary: "Bulk vendor actions" + description: "" + operationId: bulkVendors + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/index" + requestBody: + description: "User credentials" + required: true + content: + application/json: + schema: + type: array + items: + description: "Array of hashed IDs to be bulk 'actioned" + type: integer + example: "[0,1,2,3]" + responses: + 200: + description: "The Vendor User response" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" + 401: + $ref: "#/components/responses/401" + 403: + $ref: "#/components/responses/403" + 422: + $ref: '#/components/responses/422' + 429: + $ref: '#/components/responses/429' + 5XX: + description: 'Server error' + default: + $ref: "#/components/responses/default" + "/api/v1/vendors/{id}/upload": + put: + tags: + - vendors + summary: "Uploads a vendor document" + description: "Handles the uploading of a document to a vendor" + operationId: uploadVendor + parameters: + - $ref: "#/components/parameters/X-API-TOKEN" + - $ref: "#/components/parameters/X-Requested-With" + - $ref: "#/components/parameters/include" + - name: id + in: path + description: "The Vendor Hashed ID" + required: true + schema: + type: string + format: string + example: D2J234DFA + responses: + 200: + description: "Returns the Vendor object" + headers: + X-MINIMUM-CLIENT-VERSION: + $ref: "#/components/headers/X-MINIMUM-CLIENT-VERSION" + X-RateLimit-Remaining: + $ref: "#/components/headers/X-RateLimit-Remaining" + X-RateLimit-Limit: + $ref: "#/components/headers/X-RateLimit-Limit" + content: + application/json: + schema: + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -13459,43 +13459,43 @@ components: in: header name: X-API-TOKEN responses: - 422: - description: 'Validation error' - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationError' - 403: - description: 'Authorization error' - content: - application/json: - schema: - $ref: '#components/schemas/AuthorizationError' - 401: - description: 'Authentication error' - content: - application/json: - schema: - $ref: '#components/schemas/AuthenticationError' - 400: - description: 'Invalid user input' - content: - application/json: - schema: - $ref: '#components/schemas/InvalidInputError' - 429: description: 'Rate Limit Exceeded' content: application/json: schema: $ref: '#/components/schemas/RateLimiterError' + + 403: + description: 'Authorization error' + content: + application/json: + schema: + $ref: '#components/schemas/AuthorizationError' + 422: + description: 'Validation error' + content: + application/json: + schema: + $ref: '#/components/schemas/ValidationError' default: description: 'Unexpected Error' content: application/json: schema: $ref: '#/components/schemas/Error' + 400: + description: 'Invalid user input' + content: + application/json: + schema: + $ref: '#components/schemas/InvalidInputError' + 401: + description: 'Authentication error' + content: + application/json: + schema: + $ref: '#components/schemas/AuthenticationError' parameters: X-API-SECRET: name: X-API-SECRET @@ -14053,279 +14053,498 @@ components: type: string example: JSON type: object - Task: + Product: + type: object properties: id: - description: 'The hashed id of the task' type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user who created the task' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user of the task' - type: string - example: Opnel5aKBz + description: 'The hashed product ID.' + example: eP01N + readOnly: true company_id: - description: 'The hashed id of the company' type: string - example: Opnel5aKBz - client_id: - description: 'The hashed if of the client' + description: 'The hashed ID of the company that owns this product.' + example: eP01N + readOnly: true + user_id: type: string - example: Opnel5aKBz - invoice_id: - description: 'The hashed id of the invoice associated with the task' + description: 'The hashed ID of the user that created this product.' + example: n30m4 + readOnly: true + assigned_user_id: type: string - example: Opnel5aKBz + description: 'The hashed ID of the user assigned to this product.' + example: pR0j3 project_id: - description: 'The hashed id of the project associated with the task' type: string - example: Opnel5aKBz - number: - description: 'The number of the task' + description: 'The hashed ID of the project that this product is associated with.' + example: pR0j3 + vendor_id: type: string - example: TASK-123 - time_log: - description: 'An array of unix time stamps defining the start and end times of the task' - type: string - example: '[[1,2],[3,4]]' - is_running: - description: 'Determines if the task is still running' - type: boolean - 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: Opnel5aKBz - description: - description: 'The task description' - type: string - example: 'A wonder task to work on' - duration: - description: 'The task duration' - type: integer - example: '' - task_status_order: - description: 'The order of the task' - type: integer - example: '4' + description: 'The hashed ID of the vendor that this product is associated with.' + example: pR0j3 custom_value1: - description: 'A custom value' type: string - example: '2022-10-10' + description: 'Custom value field 1.' + example: 'Custom value 1' custom_value2: - description: 'A custom value' type: string - example: $1100 + description: 'Custom value field 2.' + example: 'Custom value 2' custom_value3: - description: 'A custom value' type: string - example: 'I need help' + description: 'Custom value field 3.' + example: 'Custom value 3' custom_value4: - description: 'A custom value' type: string - example: INV-3343 + 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 + 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 + 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: + 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: + 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') + + ``` + 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' + + 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: 'Flag determining whether the expense category has been deleted' + 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' + type: object + ProductRequest: + type: object + properties: + id: + type: string + description: 'The hashed product ID.' + example: eP01N + readOnly: true + assigned_user_id: + type: string + description: 'The hashed ID of the user assigned to this product.' + example: pR0j3 + required: false + project_id: + type: string + description: 'The hashed ID of the project that this product is associated with.' + example: pR0j3 + required: false + vendor_id: + type: string + description: 'The hashed ID of the vendor that this product is associated with.' + example: pR0j3 + required: false + custom_value1: + type: string + description: 'Custom value field 1.' + example: 'Custom value 1' + required: false + custom_value2: + type: string + description: 'Custom value field 2.' + example: 'Custom value 2' + required: false + custom_value3: + type: string + description: 'Custom value field 3.' + example: 'Custom value 3' + required: false + custom_value4: + type: string + description: 'Custom value field 4.' + example: 'Custom value 4' + required: false + product_key: + type: string + description: 'The product key.' + example: '1234' + required: false + notes: + type: string + description: 'Notes about the product.' + example: 'These are some notes about the product.' + required: false + cost: + type: number + format: double + description: 'The cost of the product.' + example: 10.0 + required: false + price: + type: number + format: double + description: 'The price of the product.' + example: 20.0 + required: false + quantity: + type: number + format: double + description: 'The quantity of the product.' + example: 5.0 + required: false + default: 1 + tax_name1: + type: string + description: 'The name of tax 1.' + example: 'Tax 1' + required: false + tax_rate1: + type: number + format: double + description: 'The rate of tax 1.' + example: 10.0 + required: false + tax_name2: + type: string + description: 'The name of tax 2.' + example: 'Tax 2' + required: false + tax_rate2: + type: number + format: double + description: 'The rate of tax 2.' + example: 5.0 + required: false + tax_name3: + type: string + description: 'The name of tax 3.' + example: 'Tax 3' + required: false + tax_rate3: + type: number + format: double + description: 'The rate of tax 3.' + example: 0.0 + required: false + 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 + required: false + stock_notification: + type: boolean + description: Indicates whether stock notifications are enabled for this product + default: true + required: false + stock_notification_threshold: + type: integer + format: int32 + description: The minimum quantity threshold for which stock notifications will be triggered + default: 0 + required: false + max_quantity: + type: integer + format: int32 + description: The maximum quantity that can be ordered for this product + required: false + product_image: + type: string + description: The URL of the product image + format: uri-reference + required: false + tax_id: + type: string + default: '1' + required: false + 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' + + 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 + Document: + properties: + id: + description: 'The document hashed id' + type: string + example: AS3df3A + user_id: + description: 'The user hashed id' + type: string + example: '' + assigned_user_id: + description: 'The assigned user hashed id' + type: string + example: '' + project_id: + description: 'The project associated with this document' + type: string + example: '' + vendor_id: + description: 'The vendor associated with this documents' + type: string + example: '' + name: + description: 'The document name' + type: string + example: Beauty + url: + description: 'The document url' + type: string + example: Beauty + preview: + description: 'The document preview url' + type: string + example: Beauty + type: + description: 'The document type' + type: string + example: Beauty + disk: + description: 'The document disk' + type: string + example: Beauty + hash: + description: 'The document hashed' + type: string + example: Beauty + is_deleted: + description: 'Flag to determine if the document is deleted' + type: boolean + example: true + is_default: + description: 'Flag to determine if the document is a default doc' + type: boolean + example: true created_at: description: Timestamp type: number format: integer - example: '1434342123' + example: '134341234234' updated_at: description: Timestamp type: number format: integer - example: '1434342123' - archived_at: + example: '134341234234' + deleted_at: description: Timestamp type: number format: integer - example: '1434342123' + example: '134341234234' type: object - RecurringInvoice: + Payment: properties: id: - description: 'The hashed id of the recurring invoice' + description: 'The payment hashed id' + type: string + example: Opnel5aKBz + client_id: + description: 'The client hashed id' + type: string + example: Opnel5aKBz + invitation_id: + description: 'The invitation hashed id' + type: string + example: Opnel5aKBz + client_contact_id: + description: 'The client contact hashed id' type: string example: Opnel5aKBz user_id: description: 'The user hashed id' type: string example: Opnel5aKBz + type_id: + description: 'The Payment Type ID' + type: string + example: '1' + date: + description: 'The Payment date' + type: string + example: 1-1-2014 + transaction_reference: + description: 'The transaction reference as defined by the payment gateway' + type: string + example: xcsSxcs124asd assigned_user_id: description: 'The assigned user hashed id' type: string example: Opnel5aKBz - company_id: - description: 'The company hashed id' - 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' - 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 recurringinvoice 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 recurring invoice' - type: string - example: PO-1234 - terms: - description: 'The invoice terms' - type: string - example: 'These are invoice terms' - public_notes: - description: 'The public notes of the invoice' - type: string - example: 'These are some public notes' private_notes: - description: 'The private notes of the invoice' + description: 'The private notes of the payment' type: string - example: 'These are some private notes' - footer: - description: 'The invoice 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 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' - 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' + example: 'The payment was refunded due to error' + is_manual: + description: 'Flags whether the payment was made manually or processed via a gateway' type: boolean example: true is_deleted: - description: 'Defines if the invoice has been deleted' + description: 'Defines if the payment has been deleted' type: boolean example: true - 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 - 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' - 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 invoice' - type: string - format: date - example: '1994-07-30' - settings: - $ref: '#/components/schemas/CompanySettings' - last_viewed: - description: Timestamp + amount: + description: 'The amount of this payment' type: number - format: integer - example: '1434342123' + example: 10 + refunded: + description: 'The refunded amount of this payment' + type: number + example: 10 updated_at: description: Timestamp type: number @@ -14336,672 +14555,27 @@ components: 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 - 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 - - Client: - properties: - id: - description: 'The unique identifier of the client' + company_gateway_id: + description: 'The company gateway id' type: string - example: Opnel5aKBz - readOnly: true - contacts: + example: '3' + paymentables: + $ref: '#/components/schemas/Paymentable' + invoices: + description: '' type: array items: - $ref: '#/components/schemas/ClientContact' - user_id: - description: 'The unique identifier of the user who created the client' - type: string - example: Ua6Rw4pVbS - readOnly: true - assigned_user_id: - description: 'The unique identifier of the user who has been assigned the client' - type: string - example: Ua6Rw4pVbS - company_id: - description: 'The unique identifier of the company the client belongs to' - type: string - example: Co7Vn3yLmW - readOnly: true - name: - description: 'The name of the client company or organization' - type: string - example: "Jim's Housekeeping" - website: - description: 'The website URL of the client company or organization' - type: string - example: 'https://www.jims-housekeeping.com' - private_notes: - description: 'Notes that are only visible to the user who created the client' - type: string - example: 'Client prefers email communication over phone calls' - client_hash: - description: 'A unique hash value for the client' - type: string - example: asdfkjhk342hjhbfdvmnfb1 - readOnly: true - 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: '123 Main St' - 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 + $ref: '#/components/schemas/InvoicePaymentable' + credits: + description: '' + type: array + items: + $ref: '#/components/schemas/CreditPaymentable' number: - description: 'A system-assigned unique number for the client, typically used for invoicing purposes' + description: 'The payment number - is a unique alpha numeric number per payment per company' 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 - 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' - type: number - format: integer - example: '1628445631' - 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 - 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' + example: PAY_101 type: object - SystemLog: - properties: - id: - description: 'The account hashed id' - type: string - example: AS3df3A - company_id: - description: 'The company hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user_id hashed id' - type: string - example: AS3df3A - client_id: - description: 'The client_id hashed id' - 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 - 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 - 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 - company_id: - description: "The unique hashed ID of the company associated with the credit" - type: string - example: k1l2m3n4o5 - 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" - type: string - example: u1v2w3x4y5 - number: - description: "The unique alphanumeric credit number per company" - type: string - example: QUOTE_101 - po_number: - description: "The purchase order number referred to by the credit" - type: string - example: PO_12345 - terms: - description: "The terms associated with the credit" - type: string - example: "Net 30" - public_notes: - description: "Public notes for the credit" - type: string - example: "Thank you for your business." - private_notes: - description: "Private notes for internal use, not visible to the client" - type: string - example: "Client is requesting a discount." - footer: - description: "The footer text for the credit" - type: string - example: "Footer text goes here." - custom_value1: - description: "Custom value 1 for additional credit information" - type: string - example: "Custom data 1" - custom_value2: - description: "Custom value 2 for additional credit information" - type: string - example: "Custom data 2" - custom_value3: - description: "Custom value 3 for additional credit information" - type: string - example: "Custom data 3" - custom_value4: - description: "Custom value 4 for additional credit information" - type: string - example: "Custom data 4" - tax_name1: - description: "The name of the first tax applied to the credit" - type: string - example: "VAT" - tax_name2: - description: "The name of the second tax applied to the credit" - type: string - example: "GST" - tax_rate1: - description: "The rate of the first tax applied to the credit" - type: number - format: float - example: 10.00 - tax_rate2: - description: "The rate of the second tax applied to the credit" - type: number - format: float - example: 5.00 - tax_name3: - description: "The name of the third tax applied to the credit" - type: string - example: "PST" - tax_rate3: - description: "The rate of the third tax applied to the credit" - type: number - format: float - 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 credit" - type: number - format: float - example: 100.00 - balance: - description: "The outstanding balance of the credit" - type: number - format: float - example: 50.00 - paid_to_date: - description: "The total amount paid to date for the credit" - type: number - format: float - example: 50.00 - discount: - description: "The discount applied to the credit" - type: number - format: float - example: 10.00 - partial: - description: "The partial amount applied to the credit" - type: number - format: float - 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 the credit was issued" - type: string - format: date - example: "1994-07-30" - last_sent_date: - description: "The date the credit was last sent out" - type: string - 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 - 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 - CompanyGateway: - properties: - id: - description: 'The hashed id of the company gateway' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: '2' - 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 - 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 - BankTransactionRule: properties: @@ -15051,156 +14625,10 @@ components: type: string example: AS3df3A type: object - Paymentable: + RecurringQuote: properties: id: - description: 'The paymentable hashed id' - type: string - example: AS3df3A - invoice_id: - description: 'The invoice hashed id' - type: string - example: AS3df3A - credit_id: - description: 'The credit 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 - 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 - company_id: - description: Unique identifier for the company associated with the subscription - type: string - example: Co7Vn3yLmW - 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' - 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 - 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,]' - Invoice: - properties: - id: - description: 'The invoice hashed id' + description: 'The hashed id of the recurring quote' type: string example: Opnel5aKBz user_id: @@ -15220,31 +14648,39 @@ components: type: string example: Opnel5aKBz status_id: - description: 'The invoice status variable' + 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 invoice number - is a unique alpha numeric number per invoice per company' + 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 invoice' + description: 'The purchase order associated with this recurring quote' type: string example: PO-1234 terms: - description: 'The invoice terms' + description: 'The quote terms' type: string - example: 'These are invoice terms' + example: 'These are quote terms' public_notes: - description: 'The public notes of the invoice' + description: 'The public notes of the quote' type: string example: 'These are some public notes' private_notes: - description: 'The private notes of the invoice' + description: 'The private notes of the quote' type: string example: 'These are some private notes' footer: - description: 'The invoice footer notes' + description: 'The quote footer notes' type: string example: '' custom_value1: @@ -15291,37 +14727,31 @@ components: format: float example: '10.00' total_taxes: - description: 'The total taxes for the invoice' + description: 'The total 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 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' + description: 'An array of objects which define the line items of the quote' + type: object + example: '' amount: - description: 'The invoice amount' + description: 'The quote amount' type: number format: float example: '10.00' balance: - description: 'The invoice balance' + description: 'The quote balance' type: number format: float example: '10.00' paid_to_date: - description: 'The amount paid on the invoice to date' + description: 'The amount paid on the quote to date' type: number format: float example: '10.00' discount: - description: 'The invoice discount, can be an amount or a percentage' + description: 'The quote discount, can be an amount or a percentage' type: number format: float example: '10.00' @@ -15335,7 +14765,7 @@ components: type: boolean example: true is_deleted: - description: 'Defines if the invoice has been deleted' + description: 'Defines if the quote has been deleted' type: boolean example: true uses_inclusive_taxes: @@ -15343,12 +14773,12 @@ components: type: boolean example: true date: - description: 'The Invoice Date' + description: 'The quote Date' type: string format: date example: '1994-07-30' last_sent_date: - description: 'The last date the invoice was sent out' + description: 'The last date the quote was sent out' type: string format: date example: '1994-07-30' @@ -15363,7 +14793,7 @@ components: format: date example: '1994-07-30' due_date: - description: 'The due date of the invoice' + description: 'The due date of the quote' type: string format: date example: '1994-07-30' @@ -15421,412 +14851,48 @@ components: type: boolean example: true 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 - BankTransaction: + CompanyGateway: properties: id: - description: 'The bank integration hashed id' + description: 'The hashed id of the company gateway' type: string - example: AS3df3A + example: Opnel5aKBz company_id: description: 'The company 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 - Company: - 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" + example: '2' + gateway_key: + description: 'The gateway key (hash)' type: string example: '2' - industry_id: - description: "The unique identifier representing the company's industry category" - type: string - example: '5' - slack_webhook_url: - description: "The URL for the company's Slack webhook notifications" - type: string - example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' - google_analytics_key: - description: "The company's Google Analytics tracking 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)" - type: string - example: subdomain - subdomain: - description: "The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)" - type: string - example: acme - portal_domain: - description: "The fully qualified domain used for client-facing URLs" - type: string - example: 'https://subdomain.invoicing.co' - enabled_tax_rates: - description: "The number of tax rates used per entity" + accepted_credit_cards: + description: 'Bitmask representation of cards' type: integer - example: '2' - fill_products: - description: "A flag determining whether to auto-fill product descriptions based on the product key" + example: '32' + require_billing_address: + description: 'Determines if the the billing address is required prior to payment.' type: boolean example: true - convert_products: - description: "A flag determining whether to convert products between different types or units" + require_shipping_address: + description: 'Determines if the the billing address is required prior to payment.' 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 - 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" + config: + description: 'The configuration map for the gateway' type: string - format: binary - example: logo.png - settings: - $ref: '#/components/schemas/CompanySettings' - type: object - Vendor: - properties: - id: - description: 'The hashed id of the vendor' - type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user who created the vendor' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The hashed id of the assigned user to this vendor' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - client_id: - description: 'The hashed id of the client' - type: string - example: Opnel5aKBz - contacts: + 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/VendorContact' - name: - description: 'The vendor name' - type: string - example: 'Harry''s cafe de wheels' - website: - description: 'The website of the vendor' - type: string - example: www.harry.com - private_notes: - description: 'The private notes of the vendor' - type: string - example: 'Shhh, don''t tell the vendor' - industry_id: - description: 'The industry id of the vendor' - type: string - example: '1' - size_id: - description: ________ - type: string - example: '' - address1: - description: ________ - type: string - example: '' - address2: - description: ________ - type: string - example: '' - city: - description: ________ - type: string - example: '' - state: - description: ________ - type: string - example: '' - postal_code: - description: ________ - type: string - example: '' - phone: - description: 'The client phone number' - type: string - example: 555-3434-3434 - country_id: - description: ________ - type: string - example: '' - currency_id: - description: ________ - type: string - example: '4' - custom_value1: - description: ________ - type: string - example: '' - custom_value2: - description: ________ - type: string - example: '' - custom_value3: - description: ________ - type: string - example: '' - custom_value4: - description: ________ - type: string - example: '' - vat_number: - description: ________ - type: string - example: '' - id_number: - description: ________ - type: string - example: '' - number: - description: ________ - type: string - example: '' - is_deleted: - description: ________ - type: boolean - example: true - last_login: - description: Timestamp - type: number - format: integer - example: '134341234234' - created_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - settings: - $ref: '#/components/schemas/CompanySettings' - type: object - BankIntegration: - properties: - id: - description: 'The bank integration hashed id' - type: string - example: AS3df3A - company_id: - description: 'The company hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' - type: string - 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: - 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: 'Flag determining whether the expense category has been deleted' - 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' + $ref: '#/components/schemas/FeesAndLimits' type: object + + CompanySettings: required: - currency_id @@ -16665,176 +15731,673 @@ components: type: string example: 'Bob Smith' type: object - ProductRequest: - type: object + SystemLog: properties: id: + description: 'The account hashed id' type: string - description: 'The hashed product ID.' - example: eP01N + example: AS3df3A + company_id: + description: 'The company hashed id' + type: string + example: AS3df3A + user_id: + description: 'The user_id hashed id' + type: string + example: AS3df3A + client_id: + description: 'The client_id hashed id' + 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 + ClientGatewayToken: + properties: + id: + description: 'The hashed id of the client gateway token' + type: string + example: Opnel5aKBz + company_id: + description: 'The hashed id of the company' + type: string + example: '2' + 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' + type: boolean + example: 'true' + 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 + InvoiceInvitationRequest: + required: + - client_contact_id + 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' + type: string + example: Opnel5aKBz4343343566236gvbb + readOnly: true + link: + description: 'The invitation link' + type: string + example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' + readOnly: true + sent_date: + description: 'The invitation sent date' + type: string + format: date-time + readOnly: true + viewed_date: + description: 'The invitation viewed date' + type: string + format: date-time + readOnly: true + opened_date: + description: 'The invitation opened date' + 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' + type: string + example: 'The email error' + readOnly: true + email_status: + description: 'The email status' + type: string + readOnly: true + + Client: + properties: + id: + description: 'The unique identifier of the client' + 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' + type: string + example: Ua6Rw4pVbS readOnly: true assigned_user_id: + description: 'The unique identifier of the user who has been assigned the client' type: string - description: 'The hashed ID of the user assigned to this product.' - example: pR0j3 - required: false - project_id: + example: Ua6Rw4pVbS + company_id: + description: 'The unique identifier of the company the client belongs to' type: string - description: 'The hashed ID of the project that this product is associated with.' - example: pR0j3 - required: false - vendor_id: + example: Co7Vn3yLmW + readOnly: true + name: + description: 'The name of the client company or organization' type: string - description: 'The hashed ID of the vendor that this product is associated with.' - example: pR0j3 - required: false - custom_value1: + example: "Jim's Housekeeping" + website: + description: 'The website URL of the client company or organization' type: string - description: 'Custom value field 1.' - example: 'Custom value 1' - required: false - custom_value2: + example: 'https://www.jims-housekeeping.com' + private_notes: + description: 'Notes that are only visible to the user who created the client' type: string - description: 'Custom value field 2.' - example: 'Custom value 2' - required: false - custom_value3: + example: 'Client prefers email communication over phone calls' + client_hash: + description: 'A unique hash value for the client' type: string - description: 'Custom value field 3.' - example: 'Custom value 3' - required: false - custom_value4: - type: string - description: 'Custom value field 4.' - example: 'Custom value 4' - required: false - product_key: - type: string - description: 'The product key.' - example: '1234' - required: false - notes: - type: string - description: 'Notes about the product.' - example: 'These are some notes about the product.' - required: false - cost: + example: asdfkjhk342hjhbfdvmnfb1 + readOnly: true + industry_id: + description: 'The unique identifier of the industry the client operates in' type: number - format: double - description: 'The cost of the product.' - example: 10.0 - required: false - price: + example: '5' + size_id: + description: 'The unique identifier for the size category of the client company or organization' type: number - format: double - description: 'The price of the product.' - example: 20.0 - required: false - quantity: + example: '2' + address1: + description: "First line of the client's address" + type: string + example: '123 Main St' + 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: double - description: 'The quantity of the product.' - example: 5.0 - required: false - default: 1 - tax_name1: - type: string - description: 'The name of tax 1.' - example: 'Tax 1' - required: false - tax_rate1: - type: number - format: double - description: 'The rate of tax 1.' - example: 10.0 - required: false - tax_name2: - type: string - description: 'The name of tax 2.' - example: 'Tax 2' - required: false - tax_rate2: - type: number - format: double - description: 'The rate of tax 2.' - example: 5.0 - required: false - tax_name3: - type: string - description: 'The name of tax 3.' - example: 'Tax 3' - required: false - tax_rate3: - type: number - format: double - description: 'The rate of tax 3.' - example: 0.0 - required: false - 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 - required: false - stock_notification: - type: boolean - description: Indicates whether stock notifications are enabled for this product - default: true - required: false - stock_notification_threshold: - type: integer - format: int32 - description: The minimum quantity threshold for which stock notifications will be triggered - default: 0 - required: false - max_quantity: - type: integer - format: int32 - description: The maximum quantity that can be ordered for this product - required: false - product_image: - type: string - description: The URL of the product image - format: uri-reference - required: false - tax_id: - type: string - default: '1' - required: false - 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' - ``` + format: integer example: '1' - - Error: - properties: - message: - description: 'Something terrible went wrong' + custom_value1: + description: 'A custom field for storing additional information' type: string - example: 'Unexpected error' - code: - description: 'The HTTP error code, ie 5xx 4xx' + 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 + 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' + type: number + format: integer + example: '1628445631' + 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 + 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 + CompanyUser: + properties: + permissions: + description: 'The company user permissions' + type: string + example: '[create_invoice]' + settings: + description: 'Settings that are used for the frontend applications to store user preferences / metadata' + type: object + example: 'json object' + react_settings: + description: 'Dedicated settings object for the react web application' + type: object' + example: 'json object' + is_owner: + description: 'Determines whether the user owns this company' + type: boolean + example: true + is_admin: + description: 'Determines whether the user is the admin of this company' + type: boolean + example: true + is_locked: + description: 'Determines whether the users access to this company has been locked' + type: boolean + example: true + updated_at: + description: 'The last time the record was modified, format Unix Timestamp' type: integer - example: '500' + 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/User' + token: + $ref: '#/components/schemas/CompanyToken' + type: object + Design: + properties: + id: + description: 'The design hashed id' + type: string + example: AS3df3A + name: + description: 'The design name' + type: string + example: Beauty + design: + description: 'The design HTML' + type: string + example: '' + is_custom: + description: 'Flag to determine if the design is a custom user design' + type: boolean + example: true + is_active: + description: 'Flag to determine if the design is available for use' + type: boolean + example: true + is_deleted: + description: 'Flag to determine if the design is deleted' + type: boolean + example: true + 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 + InvoiceRequest: + required: + - client_id + properties: + id: + description: 'The invoice 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' + type: string + example: Opnel5aKBz + company_id: + description: 'The company hashed id' + type: string + example: Opnel5aKBz + readOnly: true + 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' + type: string + example: 'These are invoice terms' + public_notes: + description: 'The public notes of the invoice' + type: string + example: 'These are some public notes' + 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: '' + 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 invoice' + type: number + format: float + example: '10.00' + readOnly: + 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' + type: boolean + example: true + is_deleted: + 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 + 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: + 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 + 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 type: object FillableInvoice: properties: @@ -16960,64 +16523,1643 @@ components: type: number example: 20.00 type: object - Payment: + Paymentable: properties: id: - description: 'The payment hashed id' + description: 'The paymentable hashed id' type: string - example: Opnel5aKBz - client_id: - description: 'The client hashed id' + example: AS3df3A + invoice_id: + description: 'The invoice hashed id' type: string - example: Opnel5aKBz - invitation_id: - description: 'The invitation hashed id' + example: AS3df3A + credit_id: + description: 'The credit hashed id' type: string - example: Opnel5aKBz - client_contact_id: - description: 'The client contact hashed 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 + BankTransaction: + properties: + id: + description: 'The bank integration hashed id' + type: string + example: AS3df3A + company_id: + description: 'The company 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 + InvoiceItem: + type: object + properties: + quantity: + type: integer + 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' + Project: + type: object + properties: + id: + description: 'The project hashed id' type: string example: Opnel5aKBz user_id: description: 'The user hashed id' type: string example: Opnel5aKBz - type_id: - description: 'The Payment Type ID' + assigned_user_id: + description: The assigned user identifier associated with the project + type: string + example: Opnel5aKBz + client_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 + - company_id + - name + - task_rate + - budgeted_hours + - is_deleted + - color + + 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' + updated_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + archived_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + type: object + BankIntegration: + properties: + id: + description: 'The bank integration hashed id' + type: string + example: AS3df3A + company_id: + description: 'The company hashed id' + type: string + example: AS3df3A + user_id: + description: 'The user hashed id' + type: string + 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 + 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: '' + company_id: + description: 'The unique hashed identifier for the company associated with 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' + 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 purchase order' + type: string + example: GST + tax_name2: + description: 'The name of the second tax applied to the purchase order' + type: string + example: VAT + tax_rate1: + description: 'The rate of the first tax applied to the purchase order' + type: number + format: float + example: 10.00 + tax_rate2: + description: 'The rate of the second tax applied to the purchase order' + type: number + format: float + example: 10.00 + tax_name3: + description: 'The name of the third tax applied to the purchase order' + type: string + example: '' + tax_rate3: + description: 'The rate of the third tax applied to the purchase order' + type: number + format: float + example: 10.00 + total_taxes: + description: 'The total amount of taxes applied to the purchase order' + type: number + format: float + example: 10.00 + line_items: + type: array + description: 'An array of objects which define the line items of the purchase order' + items: + $ref: '#/components/schemas/InvoiceItem' + amount: + description: 'The total amount of the purchase order before taxes and discounts' + type: number + format: float + example: 10.00 + balance: + description: 'The balance due for the purchase order after accounting for payments' + type: number + format: float + example: 10.00 + paid_to_date: + description: 'The total amount paid on the purchase order so far' + type: number + format: float + example: 10.00 + discount: + description: 'The discount amount or percentage applied to the purchase order' + type: number + format: float + example: 10.00 + partial: + description: 'The partial or deposit amount for the purchase order' + 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_deleted: + description: 'Boolean flag indicating if the purchase order 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 + date: + description: 'The date the purchase order was created' + type: string + format: date + example: '1994-07-30' + last_sent_date: + description: 'The last date the purchase order was sent to the vendor' + type: string + format: date + example: '1994-07-30' + next_send_date: + description: 'The next scheduled date for sending a reminder for the purchase order' + 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 purchase order' + 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 amount for the purchase order' + type: number + format: float + example: 10.00 + custom_surcharge2: + description: 'Second custom surcharge amount for the purchase order' + type: number + format: float + example: 10.00 + custom_surcharge3: + description: 'Third custom surcharge amount for the purchase order' + type: number + format: float + example: 10.00 + custom_surcharge4: + description: 'Fourth custom surcharge amount for the purchase order' + 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 + 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 + Task: + properties: + id: + description: 'The hashed id of the task' + type: string + example: Opnel5aKBz + user_id: + description: 'The hashed id of the user who created the task' + type: string + example: Opnel5aKBz + assigned_user_id: + description: 'The assigned user of the task' + type: string + example: Opnel5aKBz + company_id: + description: 'The hashed id of the company' + type: string + example: Opnel5aKBz + client_id: + description: 'The hashed if of the client' + type: string + example: Opnel5aKBz + invoice_id: + description: 'The hashed id of the invoice associated with the task' + type: string + example: Opnel5aKBz + project_id: + description: 'The hashed id of the project associated with the task' + type: string + example: Opnel5aKBz + number: + description: 'The number of the task' + type: string + example: TASK-123 + time_log: + description: 'An array of unix time stamps defining the start and end times of the task' + type: string + example: '[[1,2],[3,4]]' + is_running: + description: 'Determines if the task is still running' + type: boolean + 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: Opnel5aKBz + description: + description: 'The task description' + type: string + example: 'A wonder task to work on' + duration: + description: 'The task duration' + type: integer + example: '' + task_status_order: + description: 'The order of the task' + type: integer + example: '4' + 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 + created_at: + 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' + type: object + ClientContact: + properties: + id: + description: 'The hashed if of the contact' + type: string + example: Opnel5aKBz + user_id: + description: 'The hashed id of the user who created the contact' + type: string + example: Opnel5aKBz + company_id: + description: 'The hashed id of the company' + type: string + example: Opnel5aKBz + client_id: + description: 'The hashed id of the client' + type: string + example: Opnel5aKBz + first_name: + description: 'The first name of the contact' + type: string + example: John + last_name: + description: 'The last name of the contact' + type: string + example: Doe + phone: + description: 'The phone number of the contact' + type: string + example: 555-152-4524 + custom_value1: + description: 'A Custom field value' + type: string + 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: + description: 'The email of the contact' + type: string + example: '' + accepted_terms_version: + description: 'The terms of service which the contact has accpeted' + type: string + example: 'A long set of ToS' + password: + description: 'The hashed password of the contact' + type: string + example: '*****' + confirmation-code: + description: 'The confirmation code used to authenticate the contacts email address' + type: string + example: 333-sdjkh34gbasd + token: + description: 'A uuid based token.' + type: string + example: 333-sdjkh34gbasd + is_primary: + description: 'Defines is this contact is the primary contact for the client' + type: boolean + example: true + confirmed: + description: 'Boolean value confirms the user has confirmed their account.' + type: boolean + example: true + is_locked: + description: 'Boolean value defines if the contact has been locked out.' + type: boolean + example: true + send_email: + description: 'Boolean value determines is this contact should receive emails' + type: boolean + example: true + failed_logins: + description: 'The number of failed logins the contact has had' + type: number + format: integer + example: '3' + email_verified_at: + description: 'The date which the contact confirmed their email' + type: number + format: integer + example: '134341234234' + last_login: + description: Timestamp + type: number + format: integer + example: '134341234234' + 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 + ClientContactRequest: + properties: + id: + description: 'The hashed if of the contact' + type: string + example: Opnel5aKBz + readOnly: true + first_name: + description: 'The first name of the contact' + type: string + example: John + last_name: + description: 'The last name of the contact' + type: string + example: Doe + phone: + description: 'The phone number of the contact' + type: string + example: 555-152-4524 + custom_value1: + description: 'A Custom field value' + type: string + 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: + description: 'The email of the contact' + type: string + 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 + VendorContact: + properties: + id: + description: 'The hashed id of the vendor contact' + type: string + example: Opnel5aKBz + user_id: + description: 'The hashed id of the user id' + type: string + example: Opnel5aKBz + company_id: + description: 'The hashed id of the company' + type: string + example: Opnel5aKBz + vendor_id: + description: 'The hashed id of the vendor' + type: string + example: Opnel5aKBz + 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 + 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 + 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' + updated_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + deleted_at: + description: Timestamp + type: number + format: integer + example: '134341234234' + 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 + company_id: + description: Unique identifier for the company associated with the subscription + type: string + example: Co7Vn3yLmW + 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' - date: - description: 'The Payment date' + auto_bill: + description: 'enum setting' type: string - example: 1-1-2014 - transaction_reference: - description: 'The transaction reference as defined by the payment gateway' + example: always + promo_code: + description: Promotional code applied to the subscription type: string - example: xcsSxcs124asd + 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 + 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,]' + BTRules: + properties: + data_key: + description: 'The key to search' + type: string + example: 'description,amount' + operator: + description: 'The operator flag of the search' + type: string + example: '>' + value: + description: 'The value to search for' + type: string + example: bob + type: object + Company: + 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" + type: string + example: '2' + industry_id: + description: "The unique identifier representing the company's industry category" + type: string + example: '5' + slack_webhook_url: + description: "The URL for the company's Slack webhook notifications" + type: string + example: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX' + google_analytics_key: + description: "The company's Google Analytics tracking 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)" + type: string + example: subdomain + subdomain: + description: "The subdomain prefix for the company's domain (e.g., 'acme' in acme.domain.com)" + type: string + example: acme + portal_domain: + description: "The fully qualified domain used for client-facing URLs" + type: string + 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 + format: binary + example: logo.png + company_key: + description: "The static company key hash used to identify the Company" + readOnly: true + type: string + 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 + type: string + example: 'db-ninja-01' + first_day_of_week: + description: "The first day of the week for the company" + type: string + 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: enum + 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: 'https://matomo.example.com' + matomo_id: + description: "The Matomo ID for the company" + 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" + 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 + RecurringInvoice: + 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' type: string example: Opnel5aKBz - private_notes: - description: 'The private notes of the payment' + company_id: + description: 'The company hashed id' type: string - example: 'The payment was refunded due to error' - is_manual: - description: 'Flags whether the payment was made manually or processed via a gateway' + example: Opnel5aKBz + client_id: + description: 'The client hashed id' + type: string + example: Opnel5aKBz + status_id: + description: 'The invoice status variable' + 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' + number: + description: 'The recurringinvoice 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 recurring invoice' + type: string + example: PO-1234 + terms: + description: 'The invoice terms' + type: string + example: 'These are invoice terms' + public_notes: + description: 'The public notes of the invoice' + type: string + example: 'These are some public notes' + 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: '' + 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 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' + 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: 'Defines if the payment has been deleted' + description: 'Defines if the invoice has been deleted' type: boolean example: true - amount: - description: 'The amount of this payment' + 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 + 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' + 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 invoice' + type: string + format: date + example: '1994-07-30' + settings: + $ref: '#/components/schemas/CompanySettings' + last_viewed: + description: Timestamp type: number - example: 10 - refunded: - description: 'The refunded amount of this payment' - type: number - example: 10 + format: integer + example: '1434342123' updated_at: description: Timestamp type: number @@ -17028,131 +18170,487 @@ components: type: number format: integer example: '1434342123' - company_gateway_id: - description: 'The company gateway id' + 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 + type: object + + Quote: + properties: + id: + description: 'The unique hashed identifier for the quote' type: string - example: '3' - paymentables: - $ref: '#/components/schemas/Paymentable' - invoices: - description: '' - type: array - items: - $ref: '#/components/schemas/InvoicePaymentable' - credits: - description: '' - type: array - items: - $ref: '#/components/schemas/CreditPaymentable' + example: Opnel5aKBz + user_id: + description: 'The unique hashed identifier for the user who created the quote' + type: string + example: '' + assigned_user_id: + description: 'The unique hashed identifier for the user assigned to the quote' + type: string + example: '' + company_id: + description: 'The unique hashed identifier for the company associated with the quote' + type: string + example: '' + client_id: + description: 'The unique hashed identifier for the client associated with the quote' + type: string + example: '' + status_id: + description: 'The status of the quote represented by a unique identifier' + type: string + example: '' number: - description: 'The payment number - is a unique alpha numeric number per payment per company' + description: 'The unique alpha-numeric quote number for the quote per company' type: string - example: PAY_101 - type: object - - User: - properties: - id: - description: 'The hashed id of the user' + example: QUOTE_101 + po_number: + description: 'The purchase order number associated with the quote' type: string - example: Opnel5aKBz - first_name: - description: 'The first name of the user' + example: PO-1234 + terms: + description: 'The terms and conditions for the quote' type: string - example: Brad - last_name: - description: 'The last name of the user' + example: 'These are some quote terms. Valid for 14 days.' + public_notes: + description: 'Publicly visible notes associated with the quote' type: string - example: Pitt - email: - description: 'The users email address' + 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: brad@pitt.com - phone: - description: 'The users phone number' + example: 'These are private notes, not to be disclosed to the client' + footer: + description: 'The footer text of the quote' type: string - example: 555-1233-23232 - signature: - description: 'The users sign off signature' + example: 'The text goes in the footer of the quote' + custom_value1: + description: 'First custom value field for additional information' type: string - example: 'Have a nice day!' - avatar: - description: 'The users avatar' + example: 'A custom value' + custom_value2: + description: 'Second custom value field for additional information' 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: 'A custom value' + custom_value3: + description: 'Third custom value field for additional information' type: string - example: 1.0.1 - oauth_user_id: - description: 'The provider id of the oauth entity' + example: 'A custom value' + custom_value4: + description: 'Fourth custom value field for additional information' type: string - example: jkhasdf789as6f675sdf768sdfs - oauth_provider_id: - description: 'The oauth entity id' + example: 'A custom value' + tax_name1: + description: 'The name of the first tax applied to the quote' type: string - example: google - type: object - InvoiceInvitationRequest: - required: - - client_contact_id - properties: - id: - description: 'The entity invitation hashed id' + example: GST + tax_name2: + description: 'The name of the second tax applied to the quote' type: string - example: Opnel5aKBz - readOnly: true - client_contact_id: - description: 'The client contact hashed id' + 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: Opnel5aKBz - key: - description: 'The invitation key' + 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_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 + date: + description: 'The date the quote was created' type: string - example: Opnel5aKBz4343343566236gvbb - readOnly: true - link: - description: 'The invitation link' + format: date + example: '1994-07-30' + last_sent_date: + description: 'The last date the quote was sent to the client' type: string - example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' - readOnly: true - sent_date: - description: 'The invitation sent date' + 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-time - readOnly: true - viewed_date: - description: 'The invitation viewed date' + format: date + example: '1994-07-30' + partial_due_date: + description: 'The due date for the partial or deposit amount' type: string - format: date-time - readOnly: true - opened_date: - description: 'The invitation opened date' + format: date + example: '1994-07-30' + due_date: + description: 'The due date for the total amount of the quote' type: string - format: date-time - readOnly: true + 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: 1434342123 updated_at: - description: 'Timestamp' + description: 'The timestamp of the last update to the quote' type: number format: integer - example: '1434342123' - readOnly: true + example: 1434342123 archived_at: - description: 'Timestamp' + description: 'The timestamp of when the quote was archived' + 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 + type: object + Invoice: + properties: + id: + description: 'The invoice 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' + type: string + example: Opnel5aKBz + company_id: + description: 'The company hashed id' + 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' + 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' + type: string + example: 'These are invoice terms' + public_notes: + description: 'The public notes of the invoice' + type: string + example: 'These are some public notes' + 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: '' + 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 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: 'Defines if the invoice has been deleted' + type: boolean + example: true + 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 + 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' + 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 invoice' + type: string + format: date + example: '1994-07-30' + settings: + $ref: '#/components/schemas/CompanySettings' + last_viewed: + description: Timestamp type: number format: integer example: '1434342123' - readOnly: true - email_error: - description: 'The email error' - type: string - example: 'The email error' - readOnly: true - email_status: - description: 'The email status' - type: string - readOnly: true - + 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 + 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 ClientRequest: required: - contacts @@ -17294,345 +18792,121 @@ components: settings: $ref: '#/components/schemas/ClientSettings' type: object - Project: - type: object + Vendor: properties: id: - description: 'The project hashed id' + description: 'The hashed id of the vendor' type: string example: Opnel5aKBz user_id: - description: 'The user hashed id' + description: 'The hashed id of the user who created the vendor' type: string example: Opnel5aKBz assigned_user_id: - description: The assigned user identifier associated with the project + description: 'The hashed id of the assigned user to this vendor' + type: string + example: Opnel5aKBz + company_id: + description: 'The hashed id of the company' type: string example: Opnel5aKBz client_id: + description: 'The hashed id of the client' 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 - - company_id - - name - - task_rate - - budgeted_hours - - is_deleted - - color - - InvoiceItem: - type: object - properties: - quantity: - type: integer - 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' - CompanyUser: - properties: - permissions: - description: 'The company user permissions' - type: string - example: '[create_invoice]' - settings: - description: 'Settings that are used for the frontend applications to store user preferences / metadata' - type: object - example: 'json object' - react_settings: - description: 'Dedicated settings object for the react web application' - type: object' - example: 'json object' - is_owner: - description: 'Determines whether the user owns this company' - type: boolean - example: true - is_admin: - description: 'Determines whether the user is the admin of this company' - type: boolean - example: true - is_locked: - description: 'Determines whether the users access to this company has been locked' - type: boolean - example: 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/User' - token: - $ref: '#/components/schemas/CompanyToken' - 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: + contacts: type: array items: - format: string - type: string - example: 2J234DFA,D2J234DFA,D2J234DFA - description: string array of client hashed ids - tax_id: + $ref: '#/components/schemas/VendorContact' + name: + description: 'The vendor name' + type: string + example: 'Harry''s cafe de wheels' + website: + description: 'The website of the vendor' + type: string + example: www.harry.com + private_notes: + description: 'The private notes of the vendor' + type: string + example: 'Shhh, don''t tell the vendor' + industry_id: + description: 'The industry id of the vendor' type: string example: '1' - description: | - The tax rate id to set on the list of products - - The following constants are available (default = '1') - - ``` - PRODUCT_TYPE_PHYSICAL = '1' - PRODUCT_TYPE_SERVICE = '2' - PRODUCT_TYPE_DIGITAL = '3' - PRODUCT_TYPE_SHIPPING = '4' - PRODUCT_TYPE_EXEMPT = '5' - PRODUCT_TYPE_REDUCED_TAX = '6' - PRODUCT_TYPE_OVERRIDE_TAX = '7' - PRODUCT_TYPE_ZERO_RATED = '8' - PRODUCT_TYPE_REVERSE_TAX = '9' - ``` - type: object - Document: - properties: - id: - description: 'The document hashed id' - type: string - example: AS3df3A - user_id: - description: 'The user hashed id' + size_id: + description: ________ type: string example: '' - assigned_user_id: - description: 'The assigned user hashed id' + address1: + description: ________ type: string example: '' - project_id: - description: 'The project associated with this document' + address2: + description: ________ type: string example: '' - vendor_id: - description: 'The vendor associated with this documents' + city: + description: ________ type: string example: '' - name: - description: 'The document name' + state: + description: ________ type: string - example: Beauty - url: - description: 'The document url' + example: '' + postal_code: + description: ________ type: string - example: Beauty - preview: - description: 'The document preview url' + example: '' + phone: + description: 'The client phone number' type: string - example: Beauty - type: - description: 'The document type' + example: 555-3434-3434 + country_id: + description: ________ type: string - example: Beauty - disk: - description: 'The document disk' + example: '' + currency_id: + description: ________ type: string - example: Beauty - hash: - description: 'The document hashed' + example: '4' + custom_value1: + description: ________ type: string - example: Beauty + example: '' + custom_value2: + description: ________ + type: string + example: '' + custom_value3: + description: ________ + type: string + example: '' + custom_value4: + description: ________ + type: string + example: '' + vat_number: + description: ________ + type: string + example: '' + id_number: + description: ________ + type: string + example: '' + number: + description: ________ + type: string + example: '' is_deleted: - description: 'Flag to determine if the document is deleted' - type: boolean - example: true - is_default: - description: 'Flag to determine if the document is a default doc' + description: ________ type: boolean example: true + last_login: + description: Timestamp + type: number + format: integer + example: '134341234234' created_at: description: Timestamp type: number @@ -17643,53 +18917,8 @@ components: type: number format: integer example: '134341234234' - deleted_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - Design: - properties: - id: - description: 'The design hashed id' - type: string - example: AS3df3A - name: - description: 'The design name' - type: string - example: Beauty - design: - description: 'The design HTML' - type: string - example: '' - is_custom: - description: 'Flag to determine if the design is a custom user design' - type: boolean - example: true - is_active: - description: 'Flag to determine if the design is available for use' - type: boolean - example: true - is_deleted: - description: 'Flag to determine if the design is deleted' - type: boolean - example: true - 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' + settings: + $ref: '#/components/schemas/CompanySettings' type: object ClientSettings: required: @@ -18696,304 +19925,98 @@ components: format: integer example: '1434342123' type: object - InvoiceInvitation: + Activity: properties: id: - description: 'The entity invitation hashed id' + description: 'The id field of the activity' type: string example: Opnel5aKBz - readOnly: true - client_contact_id: - description: 'The client contact hashed id' - type: string - example: Opnel5aKBz - key: - description: 'The invitation key' - type: string - example: Opnel5aKBz4343343566236gvbb - readOnly: true - link: - description: 'The invitation link' - type: string - example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' - readOnly: true - sent_date: - description: 'The invitation sent date' - type: string - format: date-time - readOnly: true - viewed_date: - description: 'The invitation viewed date' - type: string - format: date-time - readOnly: true - opened_date: - description: 'The invitation opened date' - 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' - type: string - example: 'The email error' - readOnly: true - email_status: - description: 'The email status' - type: string - readOnly: true - - RecurringQuote: - properties: - id: - description: 'The hashed id of the recurring quote' - type: string - example: Opnel5aKBz - user_id: - description: 'The user hashed id' - type: string - example: Opnel5aKBz - assigned_user_id: - description: 'The assigned user hashed id' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' + activity_type_id: + description: 'The activity type id' type: string example: Opnel5aKBz client_id: description: 'The client hashed id' type: string example: Opnel5aKBz - status_id: - description: 'The quote status variable' + company_id: + description: 'The company hashed id' 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' + example: Opnel5aKBz + user_id: + description: 'The user hashed id' type: string - example: INV_101 - po_number: - description: 'The purchase order associated with this recurring quote' + example: Opnel5aKBz + invoice_id: + description: 'The invoice hashed id' type: string - example: PO-1234 - terms: - description: 'The quote terms' + example: Opnel5aKBz + payment_id: + description: 'The payment hashed id' type: string - example: 'These are quote terms' - public_notes: - description: 'The public notes of the quote' + example: Opnel5aKBz + credit_id: + description: 'The credit hashed id' 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 - 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 - is_deleted: - description: 'Defines if the quote has been deleted' - type: boolean - example: true - uses_inclusive_taxes: - description: 'Defines the type of taxes used as either inclusive or exclusive' - type: boolean - example: true - date: - description: 'The quote Date' - type: string - format: date - example: '1994-07-30' - last_sent_date: - description: 'The last date the quote was sent out' - type: string - 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' + example: Opnel5aKBz 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 - 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 - BTRules: - properties: - data_key: - description: 'The key to search' + description: 'Unixtimestamp the last time the record was updated' + type: integer + example: '343421434' + expense_id: + description: 'The expense hashed id' type: string - example: 'description,amount' - operator: - description: 'The operator flag of the search' + 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: '>' - value: - description: 'The value to search for' + example: Opnel5aKBz + task_id: + description: 'The task hashed id' type: string - example: bob + 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 Expense: properties: @@ -19150,432 +20173,357 @@ components: format: integer example: '1434342123' type: object - PurchaseOrder: + 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 + InvoiceInvitation: properties: id: - description: 'The unique hashed identifier for the purchase order' + 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' + type: string + example: Opnel5aKBz4343343566236gvbb + readOnly: true + link: + description: 'The invitation link' + type: string + example: 'https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb' + readOnly: true + sent_date: + description: 'The invitation sent date' + type: string + format: date-time + readOnly: true + viewed_date: + description: 'The invitation viewed date' + type: string + format: date-time + readOnly: true + opened_date: + description: 'The invitation opened date' + 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' + type: string + example: 'The email error' + readOnly: true + email_status: + description: 'The email status' + type: string + readOnly: true + + + 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 + User: + properties: + id: + description: 'The hashed id of the user' + type: string + example: Opnel5aKBz + first_name: + description: 'The first name of the user' + type: string + example: Brad + last_name: + description: 'The last name of the user' + type: string + 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 + oauth_user_id: + description: 'The provider id of the oauth entity' + type: string + example: jkhasdf789as6f675sdf768sdfs + oauth_provider_id: + description: 'The oauth entity id' + type: string + example: google + type: object + Account: + properties: + id: + description: 'The account hashed id' + type: string + example: AS3df3A + account_sms_verified: + description: 'Boolean flag if the account has been verified by sms' + type: string + example: true + type: object + Credit: + properties: + id: + description: "The unique hashed ID of the credit" type: string example: Opnel5aKBz user_id: - description: 'The unique hashed identifier for the user who created the purchase order' + description: "The unique hashed ID of the user associated with the credit" type: string - example: '' + example: 1a2b3c4d5e assigned_user_id: - description: 'The unique hashed identifier for the user assigned to the purchase order' + description: "The unique hashed ID of the assigned user responsible for the credit" type: string - example: '' + example: 6f7g8h9i0j company_id: - description: 'The unique hashed identifier for the company associated with the purchase order' + description: "The unique hashed ID of the company associated with the credit" type: string - example: '' - vendor_id: - description: 'The unique hashed identifier for the vendor associated with the purchase order' + example: k1l2m3n4o5 + client_id: + description: "The unique hashed ID of the client associated with the credit" type: string - example: '' + example: p1q2r3s4t5 status_id: - description: 'The status of the purchase order represented by a unique identifier' + description: "The ID representing the current status of the credit" type: string - example: '' + example: 3 + invoice_id: + description: "The unique hashed ID of the linked invoice to which the credit is applied" + type: string + example: u1v2w3x4y5 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' + description: "The unique alphanumeric credit number per company" type: string example: QUOTE_101 + po_number: + description: "The purchase order number referred to by the credit" + type: string + example: PO_12345 terms: - description: 'The terms and conditions for the purchase order' + description: "The terms associated with the credit" type: string - example: 'These are some purchase order terms. Valid for 14 days.' + example: "Net 30" public_notes: - description: 'Publicly visible notes associated with the purchase order' + description: "Public notes for the credit" type: string - example: 'These are public notes which the vendor may see' + example: "Thank you for your business." private_notes: - description: 'Privately visible notes associated with the purchase order, not disclosed to the vendor' + description: "Private notes for internal use, not visible to the client" type: string - example: 'These are private notes, not to be disclosed to the vendor' + example: "Client is requesting a discount." footer: - description: 'The footer text of the purchase order' + description: "The footer text for the credit" type: string - example: 'The text goes in the footer of the purchase order' + example: "Footer text goes here." custom_value1: - description: 'First custom value field for additional information' + description: "Custom value 1 for additional credit information" type: string - example: 'A custom value' + example: "Custom data 1" custom_value2: - description: 'Second custom value field for additional information' + description: "Custom value 2 for additional credit information" type: string - example: 'A custom value' + example: "Custom data 2" custom_value3: - description: 'Third custom value field for additional information' + description: "Custom value 3 for additional credit information" type: string - example: 'A custom value' + example: "Custom data 3" custom_value4: - description: 'Fourth custom value field for additional information' + description: "Custom value 4 for additional credit information" type: string - example: 'A custom value' + example: "Custom data 4" tax_name1: - description: 'The name of the first tax applied to the purchase order' + description: "The name of the first tax applied to the credit" type: string - example: GST + example: "VAT" tax_name2: - description: 'The name of the second tax applied to the purchase order' + description: "The name of the second tax applied to the credit" type: string - example: VAT + example: "GST" tax_rate1: - description: 'The rate of the first tax applied to the purchase order' + description: "The rate of the first tax applied to the credit" type: number format: float example: 10.00 tax_rate2: - description: 'The rate of the second tax applied to the purchase order' + 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 name of the third tax applied to the purchase order' + description: "The name of the third tax applied to the credit" type: string - example: '' + example: "PST" tax_rate3: - description: 'The rate of the third tax applied to the purchase order' + 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 applied to the purchase order' + description: "The total amount of taxes for the credit" type: number format: float - example: 10.00 + example: 23.00 line_items: type: array - description: 'An array of objects which define the line items of the purchase order' + 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 purchase order before taxes and discounts' + description: "The total amount of the credit" type: number format: float - example: 10.00 + example: 100.00 balance: - description: 'The balance due for the purchase order after accounting for payments' + description: "The outstanding balance of the credit" type: number format: float - example: 10.00 + example: 50.00 paid_to_date: - description: 'The total amount paid on the purchase order so far' + description: "The total amount paid to date for the credit" type: number format: float - example: 10.00 + example: 50.00 discount: - description: 'The discount amount or percentage applied to the purchase order' + description: "The discount applied to the credit" type: number format: float example: 10.00 partial: - description: 'The partial or deposit amount for the purchase order' + description: "The partial amount applied to the credit" type: number format: float - example: 10.00 + example: 20.00 is_amount_discount: - description: 'Boolean flag indicating if the discount is a fixed amount or a percentage' + description: "Indicates whether the discount applied is a fixed amount or a percentage" type: boolean example: true is_deleted: - description: 'Boolean flag indicating if the purchase order has been deleted' + description: "Indicates whether the credit has been deleted" type: boolean example: false uses_inclusive_taxes: - description: 'Boolean flag indicating if the taxes used are inclusive or exclusive' + description: "Indicates whether the tax rates applied to the credit are inclusive or exclusive" type: boolean example: true date: - description: 'The date the purchase order was created' + description: "The date the credit was issued" type: string format: date - example: '1994-07-30' + example: "1994-07-30" last_sent_date: - description: 'The last date the purchase order was sent to the vendor' + description: "The date the credit was last 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 reminder for the purchase order' + description: "The next scheduled date for sending a credit reminder" type: string format: date - example: '1994-07-30' + example: "1994-07-30" partial_due_date: - description: 'The due date for the partial or deposit amount' + description: "The due date for the partial amount of the credit" type: string format: date - example: '1994-07-30' + example: "1994-07-30" due_date: - description: 'The due date for the total amount of the purchase order' + description: "The due date for the total amount of the credit" type: string format: date - example: '1994-07-30' + example: "1994-07-30" settings: - $ref: '#/components/schemas/CompanySettings' + $ref: "#/components/schemas/CompanySettings" last_viewed: - description: Timestamp + description: "The timestamp of the last time the credit was viewed" type: number format: integer example: 1434342123 updated_at: - description: Timestamp + description: "The timestamp of the last time the credit was updated" type: number format: integer example: 1434342123 archived_at: - description: Timestamp + description: "The timestamp of the last time the credit was archived" type: number format: integer example: 1434342123 custom_surcharge1: - description: 'First custom surcharge amount for the purchase order' + description: "First custom surcharge amount" type: number format: float example: 10.00 - custom_surcharge2: - description: 'Second custom surcharge amount for the purchase order' - type: number - format: float - example: 10.00 - custom_surcharge3: - description: 'Third custom surcharge amount for the purchase order' - type: number - format: float - example: 10.00 - custom_surcharge4: - description: 'Fourth custom surcharge amount for the purchase order' - 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 - type: object - - - InvoiceRequest: - required: - - client_id - properties: - id: - description: 'The invoice 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' - type: string - example: Opnel5aKBz - company_id: - description: 'The company hashed id' - type: string - example: Opnel5aKBz - readOnly: true - 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' - type: string - example: 'These are invoice terms' - public_notes: - description: 'The public notes of the invoice' - type: string - example: 'These are some public notes' - 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: '' - 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 invoice' - type: number - format: float - example: '10.00' - readOnly: - 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' - type: boolean - example: true - is_deleted: - 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 - 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: - 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 - custom_surcharge1: - description: 'First Custom Surcharge' - type: number - format: float - example: '10.00' custom_surcharge2: description: 'Second Custom Surcharge' type: number @@ -19608,716 +20556,6 @@ components: type: boolean example: true type: object - ClientContact: - properties: - id: - description: 'The hashed if of the contact' - type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user who created the contact' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - client_id: - description: 'The hashed id of the client' - type: string - example: Opnel5aKBz - first_name: - description: 'The first name of the contact' - type: string - example: John - last_name: - description: 'The last name of the contact' - type: string - example: Doe - phone: - description: 'The phone number of the contact' - type: string - example: 555-152-4524 - custom_value1: - description: 'A Custom field value' - type: string - 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: - description: 'The email of the contact' - type: string - example: '' - accepted_terms_version: - description: 'The terms of service which the contact has accpeted' - type: string - example: 'A long set of ToS' - password: - description: 'The hashed password of the contact' - type: string - example: '*****' - confirmation-code: - description: 'The confirmation code used to authenticate the contacts email address' - type: string - example: 333-sdjkh34gbasd - token: - description: 'A uuid based token.' - type: string - example: 333-sdjkh34gbasd - is_primary: - description: 'Defines is this contact is the primary contact for the client' - type: boolean - example: true - confirmed: - description: 'Boolean value confirms the user has confirmed their account.' - type: boolean - example: true - is_locked: - description: 'Boolean value defines if the contact has been locked out.' - type: boolean - example: true - send_email: - description: 'Boolean value determines is this contact should receive emails' - type: boolean - example: true - failed_logins: - description: 'The number of failed logins the contact has had' - type: number - format: integer - example: '3' - email_verified_at: - description: 'The date which the contact confirmed their email' - type: number - format: integer - example: '134341234234' - last_login: - description: Timestamp - type: number - format: integer - example: '134341234234' - 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 - - 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 - ClientGatewayToken: - properties: - id: - description: 'The hashed id of the client gateway token' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: '2' - 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' - type: boolean - example: 'true' - type: object - Product: - type: object - properties: - id: - type: string - description: 'The hashed product ID.' - example: eP01N - readOnly: true - company_id: - type: string - description: 'The hashed ID of the company that owns this product.' - example: eP01N - readOnly: true - user_id: - type: string - description: 'The hashed ID of the user that created this product.' - example: n30m4 - readOnly: true - assigned_user_id: - type: string - description: 'The hashed ID of the user assigned to this product.' - example: pR0j3 - project_id: - type: string - description: 'The hashed ID of the project that this product is associated with.' - example: pR0j3 - vendor_id: - type: string - description: 'The hashed ID of the vendor that this product is associated with.' - example: pR0j3 - custom_value1: - type: string - description: 'Custom value field 1.' - example: 'Custom value 1' - custom_value2: - type: string - description: 'Custom value field 2.' - example: 'Custom value 2' - custom_value3: - type: string - 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 - 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 - 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: - 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: - 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') - - ``` - 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' - - Quote: - properties: - id: - description: 'The unique hashed identifier for the quote' - type: string - example: Opnel5aKBz - user_id: - description: 'The unique hashed identifier for the user who created the quote' - type: string - example: '' - assigned_user_id: - description: 'The unique hashed identifier for the user assigned to the quote' - type: string - example: '' - company_id: - description: 'The unique hashed identifier for the company associated with the quote' - type: string - example: '' - client_id: - description: 'The unique hashed identifier for the client associated with the quote' - type: string - example: '' - status_id: - description: 'The status of the quote represented by a unique identifier' - type: string - example: '' - number: - description: 'The unique alpha-numeric quote number for the quote per company' - type: string - example: QUOTE_101 - po_number: - description: 'The purchase order number associated with the quote' - type: string - example: PO-1234 - terms: - description: 'The terms and conditions for the quote' - type: string - example: 'These are some quote terms. Valid for 14 days.' - public_notes: - description: 'Publicly visible notes associated with the quote' - 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' - type: string - example: 'These are private notes, not to be disclosed to the client' - footer: - description: 'The footer text of the quote' - type: string - 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_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 - 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: 1434342123 - updated_at: - description: 'The timestamp of the last update to the quote' - type: number - format: integer - example: 1434342123 - archived_at: - description: 'The timestamp of when the quote was archived' - 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 - 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 - VendorContact: - properties: - id: - description: 'The hashed id of the vendor contact' - type: string - example: Opnel5aKBz - user_id: - description: 'The hashed id of the user id' - type: string - example: Opnel5aKBz - company_id: - description: 'The hashed id of the company' - type: string - example: Opnel5aKBz - vendor_id: - description: 'The hashed id of the vendor' - type: string - example: Opnel5aKBz - 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 - 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 - 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' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - deleted_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - 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' - updated_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - archived_at: - description: Timestamp - type: number - format: integer - example: '134341234234' - type: object - ClientContactRequest: - properties: - id: - description: 'The hashed if of the contact' - type: string - example: Opnel5aKBz - readOnly: true - first_name: - description: 'The first name of the contact' - type: string - example: John - last_name: - description: 'The last name of the contact' - type: string - example: Doe - phone: - description: 'The phone number of the contact' - type: string - example: 555-152-4524 - custom_value1: - description: 'A Custom field value' - type: string - 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: - description: 'The email of the contact' - type: string - 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 - Account: - properties: - id: - description: 'The account hashed id' - type: string - example: AS3df3A - account_sms_verified: - description: 'Boolean flag if the account has been verified by sms' - type: string - example: true - type: object tags: - name: login description: | diff --git a/openapi/components/schemas/company.yaml b/openapi/components/schemas/company.yaml index 403a8cfe78..d4d2d2099a 100644 --- a/openapi/components/schemas/company.yaml +++ b/openapi/components/schemas/company.yaml @@ -101,26 +101,229 @@ example: true enabled_modules: type: integer - example: 2048 description: | - - Bitmask representation of the modules that are enabled in the application + 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, - ``` - + ``` + 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 + type: string + example: 'db-ninja-01' + first_day_of_week: + description: "The first day of the week for the company" + type: string + 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: enum + 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: 'https://matomo.example.com' + matomo_id: + description: "The Matomo ID for the company" + 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" + 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 \ No newline at end of file