{ "openapi": "3.0.0", "paths": { "/invoices/template": { "post": { "operationId": "create-invoice-template", "summary": "Create template", "description": "API to create a template", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceTemplateDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceTemplateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [ "invoices/template.write" ] }, { "Agency-Access": [ "invoices/template.write" ] } ] }, "get": { "operationId": "list-invoice-templates", "summary": "List templates", "description": "API to get list of templates", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } }, { "name": "status", "required": false, "in": "query", "description": "status to be filtered", "schema": { "type": "string" } }, { "name": "startAt", "required": false, "in": "query", "description": "startAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "endAt", "required": false, "in": "query", "description": "endAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "To search for an invoice by id / name / email / phoneNo", "schema": { "example": "Alex", "type": "string" } }, { "name": "paymentMode", "required": false, "in": "query", "description": "payment mode", "schema": { "example": "live", "enum": [ "default", "live", "test" ], "type": "string" } }, { "name": "limit", "required": true, "in": "query", "description": "Limit the number of items to return", "schema": { "example": 10, "type": "string" } }, { "name": "offset", "required": true, "in": "query", "description": "Number of items to skip", "schema": { "example": 10, "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListTemplatesResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [ "invoices/template.readonly" ] }, { "Agency-Access": [ "invoices/template.readonly" ] } ] } }, "/invoices/template/{templateId}": { "get": { "operationId": "get-invoice-template", "summary": "Get an template", "description": "API to get an template by template id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetTemplateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [ "invoices/template.readonly" ] }, { "Agency-Access": [ "invoices/template.readonly" ] } ] }, "put": { "operationId": "update-invoice-template", "summary": "Update template", "description": "API to update an template by template id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceTemplateDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceTemplateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [ "invoices/template.write" ] }, { "Agency-Access": [ "invoices/template.write" ] } ] }, "delete": { "operationId": "delete-invoice-template", "summary": "Delete template", "description": "API to update an template by template id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteInvoiceTemplateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [ "invoices/template.write" ] }, { "Agency-Access": [ "invoices/template.write" ] } ] } }, "/invoices/template/{templateId}/late-fees-configuration": { "patch": { "operationId": "update-invoice-template-late-fees-configuration", "summary": "Update template late fees configuration", "description": "API to update template late fees configuration by template id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceLateFeesConfigurationDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceTemplateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [] }, { "Agency-Access": [] } ] } }, "/invoices/template/{templateId}/payment-methods-configuration": { "patch": { "operationId": "update-invoice-payment-methods-configuration", "summary": "Update template late fees configuration", "description": "API to update template late fees configuration by template id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePaymentMethodsConfigurationDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceTemplateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Template" ], "security": [ { "Location-Access": [] }, { "Agency-Access": [] } ] } }, "/invoices/schedule": { "post": { "operationId": "create-invoice-schedule", "summary": "Create Invoice Schedule", "description": "API to create an invoice Schedule", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceScheduleDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] }, "get": { "operationId": "list-invoice-schedules", "summary": "List schedules", "description": "API to get list of schedules", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } }, { "name": "status", "required": false, "in": "query", "description": "status to be filtered", "schema": { "type": "string" } }, { "name": "startAt", "required": false, "in": "query", "description": "startAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "endAt", "required": false, "in": "query", "description": "endAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "To search for an invoice by id / name / email / phoneNo", "schema": { "example": "Alex", "type": "string" } }, { "name": "paymentMode", "required": false, "in": "query", "description": "payment mode", "schema": { "example": "live", "enum": [ "default", "live", "test" ], "type": "string" } }, { "name": "limit", "required": true, "in": "query", "description": "Limit the number of items to return", "schema": { "example": 10, "type": "string" } }, { "name": "offset", "required": true, "in": "query", "description": "Number of items to skip", "schema": { "example": 10, "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListSchedulesResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.readonly" ] }, { "Agency-Access": [ "invoices/schedule.readonly" ] } ] } }, "/invoices/schedule/{scheduleId}": { "get": { "operationId": "get-invoice-schedule", "summary": "Get an schedule", "description": "API to get an schedule by schedule id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.readonly" ] }, { "Agency-Access": [ "invoices/schedule.readonly" ] } ] }, "put": { "operationId": "update-invoice-schedule", "summary": "Update schedule", "description": "API to update an schedule by schedule id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceScheduleDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] }, "delete": { "operationId": "delete-invoice-schedule", "summary": "Delete schedule", "description": "API to delete an schedule by schedule id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] } }, "/invoices/schedule/{scheduleId}/updateAndSchedule": { "post": { "operationId": "update-and-schedule-invoice-schedule", "summary": "Update scheduled recurring invoice", "description": "API to update scheduled recurring invoice", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAndScheduleInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] } }, "/invoices/schedule/{scheduleId}/schedule": { "post": { "operationId": "schedule-invoice-schedule", "summary": "Schedule an schedule invoice", "description": "API to schedule an schedule invoice to start sending to the customer", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleInvoiceScheduleDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScheduleInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] } }, "/invoices/schedule/{scheduleId}/auto-payment": { "post": { "operationId": "auto-payment-invoice-schedule", "summary": "Manage Auto payment for an schedule invoice", "description": "API to manage auto payment for a schedule", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoPaymentScheduleDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoPaymentInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] } }, "/invoices/schedule/{scheduleId}/cancel": { "post": { "operationId": "cancel-invoice-schedule", "summary": "Cancel an scheduled invoice", "description": "API to cancel a scheduled invoice by schedule id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "scheduleId", "required": true, "in": "path", "description": "Schedule Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelInvoiceScheduleDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelInvoiceScheduleResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Schedule" ], "security": [ { "Location-Access": [ "invoices/schedule.write" ] }, { "Agency-Access": [ "invoices/schedule.write" ] } ] } }, "/invoices/text2pay": { "post": { "operationId": "text2pay-invoice", "summary": "Create & Send", "description": "API to create or update a text2pay invoice", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Text2PayDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Text2PayInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Text2Pay" ], "security": [ { "Location-Access": [ "invoices.write" ] } ] } }, "/invoices/generate-invoice-number": { "get": { "operationId": "generate-invoice-number", "summary": "Generate Invoice Number", "description": "Get the next invoice number for the given location", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "Location Id", "schema": { "type": "string" } }, { "name": "altType", "required": true, "in": "query", "schema": { "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateInvoiceNumberResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.readonly" ] }, { "Agency-Access": [ "invoices.readonly" ] } ] } }, "/invoices/settings": { "get": { "operationId": "get-invoice-settings", "summary": "Get Invoice Settings", "description": "Get the invoice settings for the given location", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "Location Id or Agency Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "schema": { "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetInvoiceSettingsResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.readonly" ] }, { "Agency-Access": [ "invoices.readonly" ] } ] } }, "/invoices/{invoiceId}": { "get": { "operationId": "get-invoice", "summary": "Get invoice", "description": "API to get invoice by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.readonly" ] }, { "Agency-Access": [ "invoices.readonly" ] } ] }, "put": { "operationId": "update-invoice", "summary": "Update invoice", "description": "API to update invoice by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.write" ] }, { "Agency-Access": [ "invoices.write" ] } ] }, "delete": { "operationId": "delete-invoice", "summary": "Delete invoice", "description": "API to delete invoice by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "examples": { "UnableToFindInvoiceResponse": { "value": { "statusCode": 400, "message": "Unable to find an invoice with the given invoice id" } }, "DeleteDraftInvoiceBadResponse": { "value": { "statusCode": 400, "message": "Invoice status need to be draft to delete an invoice" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.write" ] }, { "Agency-Access": [ "invoices.write" ] } ] } }, "/invoices/{invoiceId}/late-fees-configuration": { "patch": { "operationId": "update-invoice-late-fees-configuration", "summary": "Update invoice late fees configuration", "description": "API to update invoice late fees configuration by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceLateFeesConfigurationDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [] }, { "Agency-Access": [] } ] } }, "/invoices/{invoiceId}/void": { "post": { "operationId": "void-invoice", "summary": "Void invoice", "description": "API to delete invoice by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoidInvoiceDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VoidInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "examples": { "UnableToFindInvoiceResponse": { "value": { "statusCode": 400, "message": "Unable to find an invoice with the given invoice id" } }, "VoidDraftInvoiceBadResponse": { "value": { "statusCode": 400, "message": "Can not void draft invoice. You can delete draft invoice!" } }, "VoidProviderInvoiceBadResponse": { "value": { "statusCode": 400, "message": "To void an invoice which has received payment through the payment provider, the corresponding transaction needs to be refunded first" } } } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.write" ] }, { "Agency-Access": [ "invoices.write" ] } ] } }, "/invoices/{invoiceId}/send": { "post": { "operationId": "send-invoice", "summary": "Send invoice", "description": "API to send invoice by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendInvoiceDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendInvoicesResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.write" ] }, { "Agency-Access": [ "invoices.write" ] } ] } }, "/invoices/{invoiceId}/record-payment": { "post": { "operationId": "record-invoice", "summary": "Record a manual payment for an invoice", "description": "API to record manual payment for an invoice by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "invoiceId", "required": true, "in": "path", "description": "Invoice Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordPaymentDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordPaymentResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.write" ] }, { "Agency-Access": [ "invoices.write" ] } ] } }, "/invoices/stats/last-visited-at": { "patch": { "operationId": "update-invoice-last-visited-at", "summary": "Update invoice last visited at", "description": "API to update invoice last visited at by invoice id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchInvoiceStatsLastViewedDto" } } } }, "responses": { "200": { "description": "" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [] }, { "Agency-Access": [] } ] } }, "/invoices/estimate": { "post": { "operationId": "create-new-estimate", "summary": "Create New Estimate", "description": "Create a new estimate with the provided details", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEstimatesDto" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] } }, "/invoices/estimate/{estimateId}": { "put": { "operationId": "update-estimate", "summary": "Update Estimate", "description": "Update an existing estimate with new details", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "estimateId", "required": true, "in": "path", "description": "Estimate Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEstimateDto" } } } }, "responses": { "200": { "description": "Successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] }, "delete": { "operationId": "delete-estimate", "summary": "Delete Estimate", "description": "Delete an existing estimate", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "estimateId", "required": true, "in": "path", "description": "Estimate Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AltDto" } } } }, "responses": { "200": { "description": "Successfully Deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] } }, "/invoices/estimate/number/generate": { "get": { "operationId": "generate-estimate-number", "summary": "Generate Estimate Number", "description": "Get the next estimate number for the given location", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "Location Id or Agency Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "schema": { "enum": [ "location" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateEstimateNumberResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.readonly" ] }, { "Agency-Access": [ "invoices/estimate.readonly" ] } ] } }, "/invoices/estimate/{estimateId}/send": { "post": { "operationId": "send-estimate", "summary": "Send Estimate", "description": "API to send estimate by estimate id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "estimateId", "required": true, "in": "path", "description": "Estimate Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SendEstimateDto" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] } }, "/invoices/estimate/{estimateId}/invoice": { "post": { "operationId": "create-invoice-from-estimate", "summary": "Create Invoice from Estimate", "description": "Create a new invoice from an existing estimate", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "estimateId", "required": true, "in": "path", "description": "Estimate Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceFromEstimateDto" } } } }, "responses": { "200": { "description": "Successfully Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceFromEstimateResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] } }, "/invoices/estimate/list": { "get": { "operationId": "list-estimates", "summary": "List Estimates", "description": "Get a paginated list of estimates", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "Location Id or Agency Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "schema": { "enum": [ "location" ], "type": "string" } }, { "name": "startAt", "required": false, "in": "query", "description": "startAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "endAt", "required": false, "in": "query", "description": "endAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "search text for estimates name", "schema": { "example": "Home services estimate", "type": "string" } }, { "name": "status", "required": false, "in": "query", "description": "estimate status", "schema": { "example": "sent", "enum": [ "all", "draft", "sent", "accepted", "declined", "invoiced", "viewed" ], "type": "string" } }, { "name": "contactId", "required": false, "in": "query", "description": "Contact ID for the estimate", "schema": { "example": "AmuzcoPBpgKeccNsFlib", "type": "string" } }, { "name": "limit", "required": true, "in": "query", "description": "Limit the number of items to return", "schema": { "example": 10, "type": "string" } }, { "name": "offset", "required": true, "in": "query", "description": "Number of items to skip", "schema": { "example": 10, "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListEstimatesResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.readonly" ] }, { "Agency-Access": [ "invoices/estimate.readonly" ] } ] } }, "/invoices/estimate/stats/last-visited-at": { "patch": { "operationId": "update-estimate-last-visited-at", "summary": "Update estimate last visited at", "description": "API to update estimate last visited at by estimate id", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateIdParam" } } } }, "responses": { "200": { "description": "" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [] }, { "Agency-Access": [] } ] } }, "/invoices/estimate/template": { "get": { "operationId": "list-estimate-templates", "summary": "List Estimate Templates", "description": "Get a list of estimate templates or a specific template by ID", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "Location Id or Agency Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "schema": { "enum": [ "location" ], "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "To search for an estimate template by id / name", "schema": { "example": "Alex", "type": "string" } }, { "name": "limit", "required": true, "in": "query", "description": "Limit the number of items to return", "schema": { "example": 10, "type": "string" } }, { "name": "offset", "required": true, "in": "query", "description": "Number of items to skip", "schema": { "example": 10, "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListEstimateTemplateResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.readonly" ] }, { "Agency-Access": [ "invoices/estimate.readonly" ] } ] }, "post": { "operationId": "create-estimate-template", "summary": "Create Estimate Template", "description": "Create a new estimate template", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTemplatesDto" } } } }, "responses": { "201": { "description": "Successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTemplateResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] } }, "/invoices/estimate/template/{templateId}": { "put": { "operationId": "update-estimate-template", "summary": "Update Estimate Template", "description": "Update an existing estimate template", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTemplatesDto" } } } }, "responses": { "200": { "description": "Successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTemplateResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] }, "delete": { "operationId": "delete-estimate-template", "summary": "Delete Estimate Template", "description": "Delete an existing estimate template", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "templateId", "required": true, "in": "path", "description": "Template Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AltDto" } } } }, "responses": { "200": { "description": "Successfully deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTemplateResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.write" ] }, { "Agency-Access": [ "invoices/estimate.write" ] } ] } }, "/invoices/estimate/template/preview": { "get": { "operationId": "preview-estimate-template", "summary": "Preview Estimate Template", "description": "Get a preview of an estimate template", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "Location Id or Agency Id", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "schema": { "enum": [ "location" ], "type": "string" } }, { "name": "templateId", "required": true, "in": "query", "description": "Template Id", "schema": { "example": "5f9d6d8b1b2d2c001f2d9e4b", "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateTemplateResponseDTO" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Estimate" ], "security": [ { "Location-Access": [ "invoices/estimate.readonly" ] }, { "Agency-Access": [ "invoices/estimate.readonly" ] } ] } }, "/invoices/": { "post": { "operationId": "create-invoice", "summary": "Create Invoice", "description": "API to create an invoice", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceDto" } } } }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvoiceResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.write" ] }, { "Agency-Access": [ "invoices.write" ] } ] }, "get": { "operationId": "list-invoices", "summary": "List invoices", "description": "API to get list of invoices", "parameters": [ { "name": "Version", "in": "header", "description": "API Version", "required": true, "schema": { "type": "string", "enum": [ "2021-07-28" ] } }, { "name": "altId", "required": true, "in": "query", "description": "location Id / company Id based on altType", "schema": { "example": "6578278e879ad2646715ba9c", "type": "string" } }, { "name": "altType", "required": true, "in": "query", "description": "Alt Type", "schema": { "example": "location", "enum": [ "location" ], "type": "string" } }, { "name": "status", "required": false, "in": "query", "description": "status to be filtered", "schema": { "type": "string" } }, { "name": "startAt", "required": false, "in": "query", "description": "startAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "endAt", "required": false, "in": "query", "description": "endAt in YYYY-MM-DD format", "schema": { "example": "2023-01-01", "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "To search for an invoice by id / name / email / phoneNo", "schema": { "example": "Alex", "type": "string" } }, { "name": "paymentMode", "required": false, "in": "query", "description": "payment mode", "schema": { "example": "live", "enum": [ "default", "live", "test" ], "type": "string" } }, { "name": "contactId", "required": false, "in": "query", "description": "Contact ID for the invoice", "schema": { "example": "AmuzcoPBpgKeccNsFlib", "type": "string" } }, { "name": "limit", "required": true, "in": "query", "description": "Limit the number of items to return", "schema": { "example": 10, "type": "string" } }, { "name": "offset", "required": true, "in": "query", "description": "Number of items to skip", "schema": { "example": 10, "type": "string" } }, { "name": "sortField", "required": false, "in": "query", "description": "The field on which sorting should be applied", "schema": { "example": "issueDate", "enum": [ "issueDate" ], "type": "string" } }, { "name": "sortOrder", "required": false, "in": "query", "description": "The order of sort which should be applied for the sortField", "schema": { "example": "descend", "enum": [ "ascend", "descend" ], "type": "string" } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListInvoicesResponseDto" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/BadRequestDTO" } } } }, "401": { "description": "Unauthorized", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnauthorizedDTO" } } } }, "422": { "description": "Unprocessable Entity", "content": { "application/json": { "schema": { "$ref": "../common/common-schemas.json#/components/schemas/UnprocessableDTO" } } } } }, "tags": [ "Invoice" ], "security": [ { "Location-Access": [ "invoices.readonly" ] }, { "Agency-Access": [ "invoices.readonly" ] } ] } } }, "info": { "title": "Invoice API", "description": "Documentation for invoice API", "version": "1.0", "contact": {} }, "tags": [ { "name": "Invoice", "description": "Documentation for invoice API" }, { "name": "Template", "description": "Documentation for invoice API" }, { "name": "Schedule", "description": "Documentation for invoice API" }, { "name": "Text2Pay", "description": "Documentation for invoice API" }, { "name": "Estimate", "description": "Documentation for invoice API" } ], "servers": [ { "url": "https://services.leadconnectorhq.com" } ], "components": { "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", "type": "http" }, "Location-Access": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.", "type": "http" }, "Location-Access-Only": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Sub-Account.", "type": "http" }, "Agency-Access": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.", "type": "http" }, "Agency-Access-Only": { "scheme": "bearer", "bearerFormat": "JWT", "name": "Authorization", "in": "header", "description": "Use the Access Token generated with user type as Agency.", "type": "http" } }, "schemas": { "AddressDto": { "type": "object", "properties": { "addressLine1": { "type": "string", "description": "Address Line 1", "example": "9931 Beechwood" }, "addressLine2": { "type": "string", "description": "Address Line 2", "example": "Beechwood" }, "city": { "type": "string", "description": "City", "example": "St. Houston" }, "state": { "type": "string", "description": "State", "example": "TX" }, "countryCode": { "type": "string", "description": "Country Code", "example": "US" }, "postalCode": { "type": "string", "description": "Postal Code", "example": "559-6993" } } }, "BusinessDetailsDto": { "type": "object", "properties": { "logoUrl": { "type": "string", "description": "Business Logo URL", "example": "https://example.com/logo.png" }, "name": { "type": "string", "description": "Business Name", "example": "ABC Corp." }, "phoneNo": { "type": "string", "description": "Business Phone Number", "example": "+1-214-559-6993" }, "address": { "description": "Business Address", "example": "9931 Beechwood, TX", "allOf": [ { "$ref": "#/components/schemas/AddressDto" } ] }, "website": { "type": "string", "description": "Business Website Link", "example": "wwww.example.com" }, "customValues": { "description": "Custom Values", "type": "array", "items": { "type": "string" } } } }, "ItemTaxDto": { "type": "object", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "rate": { "type": "number" }, "calculation": { "type": "string", "enum": [ "exclusive" ] }, "description": { "type": "string" }, "taxId": { "type": "string" } }, "required": [ "_id", "name", "rate" ] }, "InvoiceItemDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Invoice Item Name", "example": "ABC Product" }, "description": { "type": "string", "description": "Invoice descriptions", "example": "ABC Corp." }, "productId": { "type": "string", "description": "Product Id", "example": "6578278e879ad2646715ba9c" }, "priceId": { "type": "string", "description": "Price Id", "example": "6578278e879ad2646715ba9c" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "amount": { "type": "number", "description": "Product amount", "example": 999 }, "qty": { "type": "number", "description": "Product Quantity", "example": 1 }, "taxes": { "description": "Tax", "type": "array", "items": { "$ref": "#/components/schemas/ItemTaxDto" } }, "automaticTaxCategoryId": { "type": "string", "description": "Tax category id for calculating automatic tax", "example": "6578278e879ad2646715ba9c" }, "isSetupFeeItem": { "type": "boolean", "description": "Setupfee item, only created when 1st invoice of recurring schedule is generated" }, "type": { "type": "string", "description": "Price type of the item", "example": "one_time", "enum": [ "one_time", "recurring" ] }, "taxInclusive": { "type": "boolean", "description": "true if item amount is tax inclusive", "example": true, "default": false } }, "required": [ "name", "currency", "amount", "qty" ] }, "DiscountDto": { "type": "object", "properties": { "value": { "type": "number", "description": "Discount Value", "example": 10, "default": 0 }, "type": { "type": "string", "description": "Discount type", "enum": [ "percentage", "fixed" ], "example": "percentage", "default": "percentage" }, "validOnProductIds": { "description": "Product Ids on which discount is applicable", "example": "[ '6579751d56f60276e5bd4154' ]", "type": "array", "items": { "type": "string" } } }, "required": [ "type" ] }, "TipsConfigurationDto": { "type": "object", "properties": { "tipsPercentage": { "description": "Percentage of tips allowed", "example": [ 5, 10, 15 ], "type": "array", "items": { "type": "string" } }, "tipsEnabled": { "type": "boolean", "description": "Tips enabled status", "example": true } }, "required": [ "tipsPercentage", "tipsEnabled" ] }, "LateFeesFrequencyDto": { "type": "object", "properties": { "intervalCount": { "type": "number", "description": "Late fees interval count", "example": 10 }, "interval": { "type": "string", "description": "Late fees interval", "example": "day", "enum": [ "minute", "hour", "day", "week", "month", "one_time" ] } }, "required": [ "intervalCount", "interval" ] }, "LateFeesGraceDto": { "type": "object", "properties": { "intervalCount": { "type": "number", "description": "Late fees grace interval count", "example": 10 }, "interval": { "type": "string", "description": "Late fees grace interval", "example": "day", "enum": [ "day" ] } }, "required": [ "intervalCount", "interval" ] }, "LateFeesMaxFeesDto": { "type": "object", "properties": { "type": { "type": "string", "example": "fixed", "enum": [ "fixed" ] }, "value": { "type": "number", "example": "10", "description": "Max late fees to pay" } }, "required": [ "type", "value" ] }, "LateFeesConfigurationDto": { "type": "object", "properties": { "enable": { "type": "boolean", "description": "Enable late fees", "example": true }, "value": { "type": "number", "description": "Late Fees Value", "example": 10 }, "type": { "type": "string", "description": "Late Fees Type", "example": "fixed", "enum": [ "fixed", "percentage" ] }, "frequency": { "description": "Late Fees Frequency", "allOf": [ { "$ref": "#/components/schemas/LateFeesFrequencyDto" } ] }, "grace": { "description": "Late Fees Grace", "allOf": [ { "$ref": "#/components/schemas/LateFeesGraceDto" } ] }, "maxLateFees": { "description": "Max late fees payable", "allOf": [ { "$ref": "#/components/schemas/LateFeesMaxFeesDto" } ] } }, "required": [ "enable", "value", "type", "frequency" ] }, "StripePaymentMethodDto": { "type": "object", "properties": { "enableBankDebitOnly": { "type": "boolean", "description": "Enable Bank Debit Only", "example": false } }, "required": [ "enableBankDebitOnly" ] }, "PaymentMethodDto": { "type": "object", "properties": { "stripe": { "description": "Payment Method", "allOf": [ { "$ref": "#/components/schemas/StripePaymentMethodDto" } ] } }, "required": [ "stripe" ] }, "ProcessingFeePaidChargeDto": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the processing fee", "example": "Processing Fee" }, "charge": { "type": "number", "description": "charge for the processing fee", "example": 10 }, "amount": { "type": "number", "description": "amount of the processing fee", "example": 10 }, "_id": { "type": "string", "description": "id of the processing fee", "example": "673d01d7d547648a8dab6211" } }, "required": [ "name", "charge", "amount", "_id" ] }, "ProcessingFeeDto": { "type": "object", "properties": { "charges": { "description": "charges for the processing fee", "items": { "type": "array" }, "type": "array" }, "collectedMiscellaneousCharges": { "type": "number", "description": "collected miscellaneous charges", "example": 10 }, "paidCharges": { "description": "paid miscellaneous charges", "type": "array", "items": { "$ref": "#/components/schemas/ProcessingFeePaidChargeDto" } } }, "required": [ "charges" ] }, "CreateInvoiceTemplateDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "internal": { "type": "boolean" }, "name": { "type": "string", "description": "Name of the template", "example": "New Template" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string" }, "title": { "type": "string", "description": "Template title", "example": "New Template" }, "tipsConfiguration": { "description": "Configuration for tips on invoices", "allOf": [ { "$ref": "#/components/schemas/TipsConfigurationDto" } ] }, "lateFeesConfiguration": { "description": "Late fees configuration for the invoices", "allOf": [ { "$ref": "#/components/schemas/LateFeesConfigurationDto" } ] }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "paymentMethods": { "description": "Payment Methods for Invoices", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "type": "string" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items" ] }, "CreateInvoiceTemplateResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Template Id", "example": "6578278e879ad2646715ba9c" }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the Template", "example": "New Template" }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "altId", "altType", "name", "businessDetails", "currency", "items", "total", "createdAt", "updatedAt" ] }, "GetTemplateResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Template Id", "example": "6578278e879ad2646715ba9c" }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the Template", "example": "New Template" }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "altId", "altType", "name", "businessDetails", "currency", "items", "total", "createdAt", "updatedAt" ] }, "ListTemplatesResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/GetTemplateResponseDto" } }, "totalCount": { "type": "number", "description": "Total number of Templates", "example": 100 } }, "required": [ "data", "totalCount" ] }, "UpdateInvoiceTemplateDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "internal": { "type": "boolean" }, "name": { "type": "string", "description": "Name of the template", "example": "New Template" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string" }, "title": { "type": "string", "description": "Template title", "example": "New Template" }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items" ] }, "UpdateInvoiceTemplateResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Template Id", "example": "6578278e879ad2646715ba9c" }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the Template", "example": "New Template" }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "altId", "altType", "name", "businessDetails", "currency", "items", "total", "createdAt", "updatedAt" ] }, "UpdateInvoiceLateFeesConfigurationDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "lateFeesConfiguration": { "description": "late fees configuration", "allOf": [ { "$ref": "#/components/schemas/LateFeesConfigurationDto" } ] } }, "required": [ "altId", "altType", "lateFeesConfiguration" ] }, "UpdatePaymentMethodsConfigurationDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "paymentMethods": { "description": "Payment Methods for Invoices", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] } }, "required": [ "altId", "altType" ] }, "DeleteInvoiceTemplateResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "description": "success", "example": true } }, "required": [ "success" ] }, "AdditionalEmailsDto": { "type": "object", "properties": { "email": { "type": "string", "example": "alex@example.com" } }, "required": [ "email" ] }, "ContactDetailsDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Contact ID", "example": "6578278e879ad2646715ba9c" }, "name": { "type": "string", "description": "Contact Name", "example": "Alex" }, "phoneNo": { "type": "string", "description": "Contact Phone Number", "example": "+1234567890" }, "email": { "type": "string", "description": "Contact Email", "example": "alex@example.com" }, "additionalEmails": { "description": "Secondary email addresses for the contact to be saved", "type": "array", "items": { "$ref": "#/components/schemas/AdditionalEmailsDto" } }, "companyName": { "type": "string", "description": "Contact Company Name", "example": "ABC Corp." }, "address": { "$ref": "#/components/schemas/AddressDto" }, "customFields": { "description": "Custom Values", "type": "array", "items": { "type": "string" } } }, "required": [ "id", "name", "phoneNo", "email" ] }, "CustomRRuleOptionsDto": { "type": "object", "properties": { "intervalType": { "type": "string", "enum": [ "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly" ], "example": "monthly" }, "interval": { "type": "number", "example": 2 }, "startDate": { "type": "string", "description": "Start date in YYYY-MM-DD format", "example": "2023-01-01" }, "startTime": { "type": "string", "description": "Start time in HH:mm:ss format", "example": "20:45:00" }, "endDate": { "type": "string", "description": "End date in YYYY-MM-DD format", "example": "2029-11-01" }, "endTime": { "type": "string", "description": "End time in HH:mm:ss format", "example": "18:45:00" }, "dayOfMonth": { "type": "number", "description": "-1, 1, 2, 3, ..., 27, 28", "example": 15 }, "dayOfWeek": { "type": "string", "enum": [ "mo", "tu", "we", "th", "fr", "sa", "su" ], "example": "mo" }, "numOfWeek": { "type": "number", "description": "-1, 1, 2, 3, 4", "example": -1 }, "monthOfYear": { "type": "string", "enum": [ "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" ], "example": "jan" }, "count": { "type": "number", "description": "Max number of task executions", "example": 10 }, "daysBefore": { "type": "number", "description": "Execute task number of days before", "example": 5 }, "useStartAsPrimaryUserAccepted": { "type": "boolean", "description": "Start as primary user accepted date", "example": true }, "endType": { "type": "string", "description": "End type like after, by, count", "example": "by" } }, "required": [ "intervalType", "interval", "startDate" ] }, "ScheduleOptionsDto": { "type": "object", "properties": { "executeAt": { "type": "string" }, "rrule": { "$ref": "#/components/schemas/CustomRRuleOptionsDto" } } }, "AttachmentsDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Id of the file selected", "example": "6241712be68f7a98102ba272" }, "name": { "type": "string", "description": "Name of the file ", "example": "Electronics.pdf" }, "url": { "type": "string", "description": "URL of the file", "example": "https://example.com/digital-delivery" }, "type": { "type": "string", "description": "Type of the file" }, "size": { "type": "number", "description": "Size of the file", "example": 10000 } }, "required": [ "id", "name", "url", "type", "size" ] }, "CreateInvoiceScheduleDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "name": { "type": "string" }, "contactDetails": { "$ref": "#/components/schemas/ContactDetailsDto" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "liveMode": { "type": "boolean" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string" }, "title": { "type": "string" }, "tipsConfiguration": { "description": "Configuration for tips on invoices", "allOf": [ { "$ref": "#/components/schemas/TipsConfigurationDto" } ] }, "lateFeesConfiguration": { "description": "Late fees configuration for the invoices", "allOf": [ { "$ref": "#/components/schemas/LateFeesConfigurationDto" } ] }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "paymentMethods": { "description": "Payment Methods for Invoices", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "contactDetails", "schedule", "liveMode", "businessDetails", "currency", "items", "discount" ] }, "DefaultInvoiceResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "string", "description": "Invoice Status", "example": "draft", "enum": [ "draft", "sent", "payment_processing", "paid", "void", "partially_paid" ] }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "amountPaid": { "type": "number", "description": "Amount Paid", "example": 0 }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "businessDetails": { "type": "object", "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" } }, "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "type": "object", "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } } }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-01" }, "discount": { "type": "object", "description": "Discount", "example": { "type": "percentage", "value": 0 } }, "invoiceItems": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "amountDue": { "type": "number", "description": "Total Amount Due", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "automaticTaxesCalculated": { "type": "boolean", "description": "Is Automatic taxes calculated for the Invoice items", "example": true }, "paymentSchedule": { "type": "object", "description": "split invoice into payment schedule summing up to full invoice amount" } }, "required": [ "_id", "status", "liveMode", "amountPaid", "altId", "altType", "name", "businessDetails", "invoiceNumber", "currency", "contactDetails", "issueDate", "dueDate", "invoiceItems", "total", "title", "amountDue", "createdAt", "updatedAt" ] }, "CreateInvoiceScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "GetScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "ListSchedulesResponseDto": { "type": "object", "properties": { "schedules": { "type": "array", "items": { "$ref": "#/components/schemas/GetScheduleResponseDto" } }, "total": { "type": "number", "description": "Total number of Schedules", "example": 100 } }, "required": [ "schedules", "total" ] }, "UpdateInvoiceScheduleDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "name": { "type": "string" }, "contactDetails": { "$ref": "#/components/schemas/ContactDetailsDto" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "liveMode": { "type": "boolean" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string" }, "title": { "type": "string" }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "contactDetails", "schedule", "liveMode", "businessDetails", "currency", "items", "discount" ] }, "UpdateInvoiceScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "DeleteInvoiceScheduleResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "description": "success", "example": true } }, "required": [ "success" ] }, "UpdateAndScheduleInvoiceScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "CardDto": { "type": "object", "properties": { "brand": { "type": "string" }, "last4": { "type": "string" } }, "required": [ "brand", "last4" ] }, "USBankAccountDto": { "type": "object", "properties": { "bank_name": { "type": "string" }, "last4": { "type": "string" } }, "required": [ "bank_name", "last4" ] }, "SepaDirectDebitDTO": { "type": "object", "properties": { "bank_code": { "type": "string" }, "last4": { "type": "string" }, "branch_code": { "type": "string" } }, "required": [ "bank_code", "last4", "branch_code" ] }, "BacsDirectDebitDTO": { "type": "object", "properties": { "sort_code": { "type": "string" }, "last4": { "type": "string" } }, "required": [ "sort_code", "last4" ] }, "BecsDirectDebitDTO": { "type": "object", "properties": { "bsb_number": { "type": "string" }, "last4": { "type": "string" } }, "required": [ "bsb_number", "last4" ] }, "AutoPaymentDetailsDto": { "type": "object", "properties": { "enable": { "type": "boolean" }, "type": { "type": "string" }, "paymentMethodId": { "type": "string" }, "customerId": { "type": "string" }, "card": { "$ref": "#/components/schemas/CardDto" }, "usBankAccount": { "$ref": "#/components/schemas/USBankAccountDto" }, "sepaDirectDebit": { "$ref": "#/components/schemas/SepaDirectDebitDTO" }, "bacsDirectDebit": { "$ref": "#/components/schemas/BacsDirectDebitDTO" }, "becsDirectDebit": { "$ref": "#/components/schemas/BecsDirectDebitDTO" }, "cardId": { "type": "string" }, "provider": { "type": "object" } }, "required": [ "enable" ] }, "ScheduleInvoiceScheduleDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "liveMode": { "type": "boolean" }, "autoPayment": { "description": "auto-payment configuration", "allOf": [ { "$ref": "#/components/schemas/AutoPaymentDetailsDto" } ] } }, "required": [ "altId", "altType", "liveMode" ] }, "ScheduleInvoiceScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "AutoPaymentScheduleDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "id": { "type": "string" }, "autoPayment": { "description": "auto-payment configuration", "allOf": [ { "$ref": "#/components/schemas/AutoPaymentDetailsDto" } ] } }, "required": [ "altId", "altType", "id", "autoPayment" ] }, "AutoPaymentInvoiceScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "CancelInvoiceScheduleDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" } }, "required": [ "altId", "altType" ] }, "CancelInvoiceScheduleResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Schedule Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "object", "description": "Schedule Status", "example": "draft" }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "schedule": { "$ref": "#/components/schemas/ScheduleOptionsDto" }, "invoices": { "description": "List of invoices", "type": "array", "items": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "businessDetails": { "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "discount": { "description": "Discount", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "items": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "termsNotes": { "type": "string", "description": "Terms notes", "example": "Confidential" }, "compiledTermsNotes": { "type": "string", "description": "Compiled terms notes", "example": "Confidential" }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" } }, "required": [ "_id", "status", "liveMode", "altId", "altType", "name", "invoices", "businessDetails", "currency", "contactDetails", "items", "total", "title", "termsNotes", "compiledTermsNotes", "createdAt", "updatedAt" ] }, "SentToDto": { "type": "object", "properties": { "email": { "description": "Email Address", "example": [ "alex@example.com" ], "type": "array", "items": { "type": "string" } }, "emailCc": { "description": "cc to be kept in any sent out emails", "example": [ "alex@example.com" ], "type": "array", "items": { "type": "string" } }, "emailBcc": { "description": "bcc to be kept in any sent out emails", "example": [ "alex@example.com" ], "type": "array", "items": { "type": "string" } }, "phoneNo": { "description": "Contact Phone Number", "example": [ "+1-214-559-6993" ], "type": "array", "items": { "type": "string" } } }, "required": [ "email" ] }, "PaymentScheduleDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Payment schedule type", "enum": [ "fixed", "percentage" ], "example": "percentage" }, "schedules": { "description": "payment schedule item", "type": "array", "items": { "type": "string" } } }, "required": [ "type", "schedules" ] }, "Text2PayDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "name": { "type": "string", "description": "Invoice Name", "example": "New Invoice" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "items": { "description": "An array of items for the invoice.", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups", "example": "
This is a default terms.
" }, "title": { "type": "string", "description": "Title for the invoice", "example": "INVOICE" }, "contactDetails": { "description": "Contact information to send the invoice to", "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "invoiceNumber": { "type": "string", "description": "Invoice Number", "example": "1001" }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-14" }, "sentTo": { "$ref": "#/components/schemas/SentToDto" }, "liveMode": { "type": "boolean" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "paymentSchedule": { "description": "split invoice into payment schedule summing up to full invoice amount", "allOf": [ { "$ref": "#/components/schemas/PaymentScheduleDto" } ] }, "lateFeesConfiguration": { "description": "late fees configuration", "allOf": [ { "$ref": "#/components/schemas/LateFeesConfigurationDto" } ] }, "tipsConfiguration": { "description": "tips configuration for the invoice", "allOf": [ { "$ref": "#/components/schemas/TipsConfigurationDto" } ] }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "paymentMethods": { "description": "Payment Methods for Invoices", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] }, "id": { "type": "string", "description": "id of invoice to update. If skipped, a new invoice will be created" }, "includeTermsNote": { "type": "boolean", "description": "include terms & notes with receipts", "example": true }, "action": { "type": "string", "description": "create invoice in draft mode or send mode", "example": "draft", "enum": [ "draft", "send" ] }, "userId": { "type": "string", "description": "id of user generating invoice" }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" } }, "required": [ "altId", "altType", "name", "currency", "items", "contactDetails", "issueDate", "sentTo", "liveMode", "action", "userId" ] }, "Text2PayInvoiceResponseDto": { "type": "object", "properties": { "invoice": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" }, "invoiceUrl": { "type": "string", "description": "preview url of generated invoice" } }, "required": [ "invoice", "invoiceUrl" ] }, "GenerateInvoiceNumberResponseDto": { "type": "object", "properties": { "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" } } }, "CustomNotificationItemDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Flag indicating if the notification is enabled or not" }, "emailTemplate": { "type": "string", "description": "Template to be used for sending email" }, "smsTemplate": { "type": "string", "description": "Template to be used for sending sms" }, "fromName": { "type": "string", "description": "Name to be used while sending email", "example": "Alex" }, "fromEmail": { "type": "string", "description": "Email address to be used for sending email", "example": "alex@example.com" }, "emailSubject": { "type": "string", "description": "Subject of email which is sent out", "example": "Thank you for purchasing" }, "defaultEmailTemplateId": { "type": "string", "description": "Default email TemplateId to be used for sending via email", "example": "dhwjqi2899012990w2u" } }, "required": [ "enabled", "emailTemplate", "smsTemplate" ] }, "CustomNotificationDto": { "type": "object", "properties": { "customerSendInvoice": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamPaymentSuccess": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerPaymentSuccess": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamAutoPaymentSuccess": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerAutoPaymentSuccess": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamPaymentFailure": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerPaymentFailure": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamAutoPaymentFailure": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerAutoPaymentFailure": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerAutoPaymentInfo": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerAutoPaymentAmountChanged": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamAutoPaymentSkip": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamRecurringSendInvoiceFailed": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "customerSendEstimate": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamEstimateAccepted": { "$ref": "#/components/schemas/CustomNotificationItemDto" }, "teamEstimateDeclined": { "$ref": "#/components/schemas/CustomNotificationItemDto" } }, "required": [ "customerSendInvoice", "teamPaymentSuccess", "customerPaymentSuccess", "teamAutoPaymentSuccess", "customerAutoPaymentSuccess", "teamPaymentFailure", "customerPaymentFailure", "teamAutoPaymentFailure", "customerAutoPaymentFailure", "customerAutoPaymentInfo", "customerAutoPaymentAmountChanged", "teamAutoPaymentSkip", "teamRecurringSendInvoiceFailed", "customerSendEstimate", "teamEstimateAccepted", "teamEstimateDeclined" ] }, "Address": { "type": "object", "properties": { "addressLine1": { "type": "string" }, "addressLine2": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "enum": [ "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "XK", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "AN", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "GB", "UA", "AE", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW" ] }, "postalCode": { "type": "string" } } }, "InvoiceSettingsBusinessDetailsDto": { "type": "object", "properties": { "logoUrl": { "type": "string" }, "name": { "type": "string" }, "phoneNo": { "type": "string" }, "address": { "$ref": "#/components/schemas/Address" }, "website": { "type": "string" }, "customValues": { "type": "array", "items": { "type": "string" } } }, "required": [ "name" ] }, "InvoiceSettingsSenderConfigurationDto": { "type": "object", "properties": { "fromName": { "type": "string", "description": "Sender name to be used while sending email notification", "example": "Alex" }, "fromEmail": { "type": "string", "description": "Email id to be used while sending email notification", "example": "alex@example.com" } } }, "InvoiceProductSettingsDto": { "type": "object", "properties": { "enableImportProductDescription": { "type": "boolean", "description": "Flag indicating if the product description import is enabled or not", "example": true }, "descriptionOptional": { "type": "boolean", "description": "Flag indicating if the product description is optional or not", "example": true } } }, "ReminderDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Flag indicating if the reminder is enabled or not", "example": true }, "emailTemplate": { "type": "string", "description": "Email template to be used for sending reminders", "example": "default" }, "smsTemplate": { "type": "string", "description": "SMS template to be used for sending reminders", "example": "default" }, "emailSubject": { "type": "string", "description": "Subject of the reminder", "example": "Reminder" }, "reminderId": { "type": "string", "description": "Unique identifier for the reminder", "example": "9333e45f-a27d-4659-90e5-76c5ef06d094" }, "reminderName": { "type": "string", "description": "Name of the reminder", "example": "Special Reminder" }, "reminderTime": { "type": "string", "description": "Time condition for the reminder", "example": "before", "enum": [ "before", "after" ] }, "intervalType": { "type": "string", "description": "Interval type for the reminder", "example": "daily", "enum": [ "yearly", "monthly", "weekly", "daily", "hourly", "minutely", "secondly" ] }, "maxReminders": { "type": "number", "description": "Maximum number of reminders that can be sent", "example": 3 }, "reminderInvoiceCondition": { "type": "string", "description": "Condition for sending the reminder", "example": "invoice_sent", "enum": [ "invoice_sent", "invoice_overdue" ] }, "reminderNumber": { "type": "number", "description": "frequency gap of the reminder to exeucte", "example": 10 }, "startTime": { "type": "string", "description": "Business Hour Start Time", "example": "9:00 AM" }, "endTime": { "type": "string", "description": "Business Hour End Time", "example": "5:00 PM" }, "timezone": { "type": "string", "description": "Timezone at which reminder will be sent", "example": "businessTZ" } }, "required": [ "enabled", "emailTemplate", "smsTemplate", "emailSubject", "reminderId", "reminderName", "reminderTime", "intervalType", "maxReminders", "reminderInvoiceCondition", "reminderNumber" ] }, "ReminderSettingsDto": { "type": "object", "properties": { "defaultEmailTemplateId": { "type": "string", "description": "default template Id of reminder", "example": "dhwjqi2899012990w2u" }, "reminders": { "description": "List of reminders", "type": "array", "items": { "$ref": "#/components/schemas/ReminderDto" } } }, "required": [ "defaultEmailTemplateId", "reminders" ] }, "GetInvoiceSettingsResponseDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Sub-Account Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "termsNote": { "type": "string", "description": "Terms and conditions for invoices", "example": "Payment is due within 30 days." }, "estimatesTermsNote": { "type": "string", "description": "Terms and conditions for estimates", "example": "This estimate is valid for 30 days." }, "title": { "type": "string", "description": "Title for invoices", "example": "INVOICE", "maxLength": 40 }, "estimatesTitle": { "type": "string", "description": "Title for estimates", "example": "ESTIMATE", "maxLength": 40 }, "invoiceNumberPrefix": { "type": "string", "description": "Prefix for invoice numbers", "example": "INV-", "maxLength": 10 }, "estimateNumberPrefix": { "type": "string", "description": "Prefix for estimate numbers", "example": "EST-", "maxLength": 10 }, "dueAfterXDays": { "type": "number", "description": "Number of days after which invoice is due", "example": 30 }, "estimatesExpireAfterXDays": { "type": "number", "description": "Number of days after which estimate expires", "example": 30 }, "minimumPercentagePartialPayment": { "type": "number", "description": "Minimum percentage for partial payment", "example": 25 }, "customFields": { "description": "Custom fields array", "example": [ "6578278e879ad2646715baxc", "6901e9fb77ac4d701ba0b996" ], "maxItems": 3, "type": "array", "items": { "type": "string" } }, "customNotification": { "description": "Custom notification settings", "allOf": [ { "$ref": "#/components/schemas/CustomNotificationDto" } ] }, "businessDetails": { "description": "Business details", "allOf": [ { "$ref": "#/components/schemas/InvoiceSettingsBusinessDetailsDto" } ] }, "senderConfiguration": { "description": "Sender configuration", "allOf": [ { "$ref": "#/components/schemas/InvoiceSettingsSenderConfigurationDto" } ] }, "productSettings": { "description": "Product settings", "allOf": [ { "$ref": "#/components/schemas/InvoiceProductSettingsDto" } ] }, "reminderSettings": { "description": "Reminder settings", "allOf": [ { "$ref": "#/components/schemas/ReminderSettingsDto" } ] }, "lateFeesConfiguration": { "description": "Late fees configuration", "allOf": [ { "$ref": "#/components/schemas/LateFeesConfigurationDto" } ] }, "tipsConfiguration": { "description": "Tips configuration", "allOf": [ { "$ref": "#/components/schemas/TipsConfigurationDto" } ] }, "paymentMethods": { "description": "Payment methods configuration", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] } } }, "CreateInvoiceDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "name": { "type": "string", "description": "Invoice Name", "example": "New Invoice" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "items": { "description": "An array of items for the invoice.", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups", "example": "This is a default terms.
" }, "title": { "type": "string", "description": "Title for the invoice", "example": "INVOICE" }, "contactDetails": { "description": "Contact information to send the invoice to", "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "invoiceNumber": { "type": "string", "description": "Invoice Number", "example": "1001" }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-14" }, "sentTo": { "$ref": "#/components/schemas/SentToDto" }, "liveMode": { "type": "boolean" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "paymentSchedule": { "description": "split invoice into payment schedule summing up to full invoice amount", "allOf": [ { "$ref": "#/components/schemas/PaymentScheduleDto" } ] }, "lateFeesConfiguration": { "description": "late fees configuration", "allOf": [ { "$ref": "#/components/schemas/LateFeesConfigurationDto" } ] }, "tipsConfiguration": { "description": "tips configuration for the invoice", "allOf": [ { "$ref": "#/components/schemas/TipsConfigurationDto" } ] }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "paymentMethods": { "description": "Payment Methods for Invoices", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items", "discount", "contactDetails", "issueDate", "sentTo", "liveMode" ] }, "OldCreateInvoiceDTO": { "type": "object", "properties": {} }, "CreateInvoiceResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "string", "description": "Invoice Status", "example": "draft", "enum": [ "draft", "sent", "payment_processing", "paid", "void", "partially_paid" ] }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "amountPaid": { "type": "number", "description": "Amount Paid", "example": 0 }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "businessDetails": { "type": "object", "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" } }, "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "type": "object", "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } } }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-01" }, "discount": { "type": "object", "description": "Discount", "example": { "type": "percentage", "value": 0 } }, "invoiceItems": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "amountDue": { "type": "number", "description": "Total Amount Due", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "automaticTaxesCalculated": { "type": "boolean", "description": "Is Automatic taxes calculated for the Invoice items", "example": true }, "paymentSchedule": { "type": "object", "description": "split invoice into payment schedule summing up to full invoice amount" } }, "required": [ "_id", "status", "liveMode", "amountPaid", "altId", "altType", "name", "businessDetails", "invoiceNumber", "currency", "contactDetails", "issueDate", "dueDate", "invoiceItems", "total", "title", "amountDue", "createdAt", "updatedAt" ] }, "TotalSummaryDto": { "type": "object", "properties": { "subTotal": { "type": "number", "description": "subTotal", "example": 999 }, "discount": { "type": "number", "description": "discount", "example": 0 }, "tax": { "type": "number", "description": "tax", "example": 0 } }, "required": [ "subTotal", "discount", "tax" ] }, "ReminderExecutionDetailsList": { "type": "object", "properties": {} }, "RemindersConfigurationDto": { "type": "object", "properties": { "reminderExecutionDetailsList": { "description": "List of reminders", "allOf": [ { "$ref": "#/components/schemas/ReminderExecutionDetailsList" } ] }, "reminderSettings": { "description": "Reminder settings", "allOf": [ { "$ref": "#/components/schemas/ReminderSettingsDto" } ] } }, "required": [ "reminderExecutionDetailsList", "reminderSettings" ] }, "GetInvoiceResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "string", "description": "Invoice Status", "example": "draft", "enum": [ "draft", "sent", "payment_processing", "paid", "void", "partially_paid" ] }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "amountPaid": { "type": "number", "description": "Amount Paid", "example": 0 }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "businessDetails": { "type": "object", "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" } }, "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "type": "object", "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } } }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-01" }, "discount": { "type": "object", "description": "Discount", "example": { "type": "percentage", "value": 0 } }, "invoiceItems": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "amountDue": { "type": "number", "description": "Total Amount Due", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "automaticTaxesCalculated": { "type": "boolean", "description": "Is Automatic taxes calculated for the Invoice items", "example": true }, "paymentSchedule": { "type": "object", "description": "split invoice into payment schedule summing up to full invoice amount" }, "totalSummary": { "$ref": "#/components/schemas/TotalSummaryDto" }, "remindersConfiguration": { "description": "Reminders Configuration", "allOf": [ { "$ref": "#/components/schemas/RemindersConfigurationDto" } ] } }, "required": [ "_id", "status", "liveMode", "amountPaid", "altId", "altType", "name", "businessDetails", "invoiceNumber", "currency", "contactDetails", "issueDate", "dueDate", "invoiceItems", "total", "title", "amountDue", "createdAt", "updatedAt", "totalSummary" ] }, "ListInvoicesResponseDto": { "type": "object", "properties": { "invoices": { "type": "array", "items": { "$ref": "#/components/schemas/GetInvoiceResponseDto" } }, "total": { "type": "number", "description": "Total number of invoices", "example": 100 } }, "required": [ "invoices", "total" ] }, "UpdateInvoiceDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "name": { "type": "string", "description": "Name to be updated", "example": "New Invoice" }, "title": { "type": "string", "description": "Title for the invoice", "example": "INVOICE" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "description": { "type": "string", "description": "Description", "example": "ABC Corp payments" }, "businessDetails": { "description": "Business details which need to be updated", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetailsDto" } ] }, "invoiceNumber": { "type": "string", "description": "Invoice Number", "example": "1001" }, "contactId": { "type": "string", "description": "Id of the contact which you need to send the invoice", "example": "6578278e879ad2646715ba9c" }, "contactDetails": { "$ref": "#/components/schemas/ContactDetailsDto" }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups", "example": "This is a default terms.
" }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "invoiceItems": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItemDto" } }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "liveMode": { "type": "boolean", "description": "Payment mode" }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-14" }, "paymentSchedule": { "description": "split invoice into payment schedule summing up to full invoice amount", "allOf": [ { "$ref": "#/components/schemas/PaymentScheduleDto" } ] }, "tipsConfiguration": { "description": "tips configuration for the invoice", "allOf": [ { "$ref": "#/components/schemas/TipsConfigurationDto" } ] }, "xeroDetails": { "type": "object" }, "invoiceNumberPrefix": { "type": "string", "description": "prefix for invoice number", "example": "INV-" }, "paymentMethods": { "description": "Payment Methods for Invoices", "allOf": [ { "$ref": "#/components/schemas/PaymentMethodDto" } ] }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the invoice", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "currency", "invoiceItems", "issueDate", "dueDate" ] }, "UpdateInvoiceResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "string", "description": "Invoice Status", "example": "draft", "enum": [ "draft", "sent", "payment_processing", "paid", "void", "partially_paid" ] }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "amountPaid": { "type": "number", "description": "Amount Paid", "example": 0 }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "businessDetails": { "type": "object", "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" } }, "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "type": "object", "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } } }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-01" }, "discount": { "type": "object", "description": "Discount", "example": { "type": "percentage", "value": 0 } }, "invoiceItems": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "amountDue": { "type": "number", "description": "Total Amount Due", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "automaticTaxesCalculated": { "type": "boolean", "description": "Is Automatic taxes calculated for the Invoice items", "example": true }, "paymentSchedule": { "type": "object", "description": "split invoice into payment schedule summing up to full invoice amount" } }, "required": [ "_id", "status", "liveMode", "amountPaid", "altId", "altType", "name", "businessDetails", "invoiceNumber", "currency", "contactDetails", "issueDate", "dueDate", "invoiceItems", "total", "title", "amountDue", "createdAt", "updatedAt" ] }, "DeleteInvoiceResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "string", "description": "Invoice Status", "example": "draft", "enum": [ "draft", "sent", "payment_processing", "paid", "void", "partially_paid" ] }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "amountPaid": { "type": "number", "description": "Amount Paid", "example": 0 }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "businessDetails": { "type": "object", "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" } }, "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "type": "object", "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } } }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-01" }, "discount": { "type": "object", "description": "Discount", "example": { "type": "percentage", "value": 0 } }, "invoiceItems": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "amountDue": { "type": "number", "description": "Total Amount Due", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "automaticTaxesCalculated": { "type": "boolean", "description": "Is Automatic taxes calculated for the Invoice items", "example": true }, "paymentSchedule": { "type": "object", "description": "split invoice into payment schedule summing up to full invoice amount" } }, "required": [ "_id", "status", "liveMode", "amountPaid", "altId", "altType", "name", "businessDetails", "invoiceNumber", "currency", "contactDetails", "issueDate", "dueDate", "invoiceItems", "total", "title", "amountDue", "createdAt", "updatedAt" ] }, "VoidInvoiceDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" } }, "required": [ "altId", "altType" ] }, "VoidInvoiceResponseDto": { "type": "object", "properties": { "_id": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" }, "status": { "type": "string", "description": "Invoice Status", "example": "draft", "enum": [ "draft", "sent", "payment_processing", "paid", "void", "partially_paid" ] }, "liveMode": { "type": "boolean", "description": "Live Mode", "example": false }, "amountPaid": { "type": "number", "description": "Amount Paid", "example": 0 }, "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Name of the invoice", "example": "New Invoice" }, "businessDetails": { "type": "object", "description": "Business Details", "example": { "name": "Alex", "address": { "addressLine1": "9931 Beechwood", "city": "St. Houston", "state": "TX", "countryCode": "USA", "postalCode": "559-6993" }, "phoneNo": "+1-214-559-6993", "website": "www.example.com" } }, "invoiceNumber": { "type": "number", "description": "Invoice Number", "example": "19" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "contactDetails": { "type": "object", "description": "Contact Details", "example": { "id": "c6tZZU0rJBf30ZXx9Gli", "phoneNo": "+1-214-559-6993", "email": "alex@example.com", "customFields": [], "name": "Alex", "address": { "countryCode": "US" } } }, "issueDate": { "type": "string", "description": "Issue date in YYYY-MM-DD format", "example": "2023-01-01" }, "dueDate": { "type": "string", "description": "Due date in YYYY-MM-DD format", "example": "2023-01-01" }, "discount": { "type": "object", "description": "Discount", "example": { "type": "percentage", "value": 0 } }, "invoiceItems": { "description": "Invoice Items", "example": [ { "taxes": [], "_id": "c6tZZU0rJBf30ZXx9Gli", "productId": "c6tZZU0rJBf30ZXx9Gli", "priceId": "c6tZZU0rJBf30ZXx9Gli", "currency": "USD", "name": "Macbook Pro", "qty": 1, "amount": 999 } ], "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total Amount", "example": 999 }, "title": { "type": "string", "description": "Title", "example": "INVOICE" }, "amountDue": { "type": "number", "description": "Total Amount Due", "example": 999 }, "createdAt": { "type": "string", "description": "created at", "example": "2023-12-12T09:27:42.355Z" }, "updatedAt": { "type": "string", "description": "updated at", "example": "2023-12-12T09:27:42.355Z" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Invoice", "example": true }, "automaticTaxesCalculated": { "type": "boolean", "description": "Is Automatic taxes calculated for the Invoice items", "example": true }, "paymentSchedule": { "type": "object", "description": "split invoice into payment schedule summing up to full invoice amount" } }, "required": [ "_id", "status", "liveMode", "amountPaid", "altId", "altType", "name", "businessDetails", "invoiceNumber", "currency", "contactDetails", "issueDate", "dueDate", "invoiceItems", "total", "title", "amountDue", "createdAt", "updatedAt" ] }, "SendInvoiceDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "userId": { "type": "string", "description": "Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this location. This account will serve as the primary channel for all future communications and updates.", "example": "6578278e879ad2646715ba9c" }, "action": { "type": "string", "enum": [ "sms_and_email", "send_manually", "email", "sms" ] }, "liveMode": { "type": "boolean" }, "sentFrom": { "description": "sender details for invoice, valid only if invoice is not sent manually", "allOf": [ { "$ref": "#/components/schemas/InvoiceSettingsSenderConfigurationDto" } ] }, "autoPayment": { "description": "auto-payment configuration", "allOf": [ { "$ref": "#/components/schemas/AutoPaymentDetailsDto" } ] } }, "required": [ "altId", "altType", "userId", "action", "liveMode" ] }, "SendInvoicesResponseDto": { "type": "object", "properties": { "invoice": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" }, "smsData": { "type": "object" }, "emailData": { "type": "object" } }, "required": [ "invoice", "smsData", "emailData" ] }, "ChequeDto": { "type": "object", "properties": { "number": { "type": "string", "description": "check number", "example": "129-129-129-912" } }, "required": [ "number" ] }, "RecordPaymentDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "location Id / company Id based on altType", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "description": "Alt Type", "enum": [ "location" ], "example": "location" }, "mode": { "type": "string", "description": "manual payment method", "enum": [ "cash", "card", "cheque", "bank_transfer", "other" ], "example": "card" }, "card": { "$ref": "#/components/schemas/CardDto" }, "cheque": { "$ref": "#/components/schemas/ChequeDto" }, "notes": { "type": "string", "description": "Any note to be recorded with the transaction", "example": "This was a direct payment" }, "amount": { "type": "number", "description": "Amount to be paid against the invoice.", "example": 999 }, "meta": { "type": "object" }, "paymentScheduleIds": { "description": "Payment Schedule Ids to be recorded against the invoice.", "example": [ "6578278e879ad2646715ba9c" ], "type": "array", "items": { "type": "string" } }, "fulfilledAt": { "type": "string", "description": "Updated At to be recorded against the invoice.", "example": "2025-03-19T05:03:00.000Z" } }, "required": [ "altId", "altType", "mode", "card", "cheque", "notes" ] }, "RecordPaymentResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "description": "status", "example": true }, "invoice": { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } }, "required": [ "success", "invoice" ] }, "PatchInvoiceStatsLastViewedDto": { "type": "object", "properties": { "invoiceId": { "type": "string", "description": "Invoice Id", "example": "6578278e879ad2646715ba9c" } }, "required": [ "invoiceId" ] }, "EstimateLineItemDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Invoice Item Name", "example": "ABC Product" }, "description": { "type": "string", "description": "Invoice descriptions", "example": "ABC Corp." }, "productId": { "type": "string", "description": "Product Id", "example": "6578278e879ad2646715ba9c" }, "priceId": { "type": "string", "description": "Price Id", "example": "6578278e879ad2646715ba9c" }, "currency": { "type": "string", "description": "Currency", "example": "USD" }, "amount": { "type": "number", "description": "Product amount", "example": 999 }, "qty": { "type": "number", "description": "Product Quantity", "example": 1 }, "taxes": { "description": "Tax", "type": "array", "items": { "$ref": "#/components/schemas/ItemTaxDto" } }, "automaticTaxCategoryId": { "type": "string", "description": "Tax category id for calculating automatic tax", "example": "6578278e879ad2646715ba9c" }, "isSetupFeeItem": { "type": "boolean", "description": "Setupfee item, only created when 1st invoice of recurring schedule is generated" }, "type": { "type": "string", "description": "Price type of the item", "example": "one_time", "enum": [ "one_time", "recurring" ] }, "taxInclusive": { "type": "boolean", "description": "true if item amount is tax inclusive", "example": true, "default": false }, "attachments": { "description": "Attachments for the line item", "example": [ "https://example.com/file1.jpg", "https://example.com/file2.png" ], "type": "array", "items": { "type": "string" } } }, "required": [ "name", "currency", "amount", "qty" ] }, "SendEstimateDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "action": { "type": "string", "enum": [ "sms_and_email", "send_manually", "email", "sms" ] }, "liveMode": { "type": "boolean", "description": "livemode for estimate", "example": true }, "userId": { "type": "string", "description": "Please ensure that the UserId corresponds to an authorized personnel, either by an employee ID or agency ID, to access this location. This account will serve as the primary channel for all future communications and updates.", "example": "6578278e879ad2646715ba9c" }, "sentFrom": { "description": "sender details for invoice, valid only if invoice is not sent manually", "allOf": [ { "$ref": "#/components/schemas/InvoiceSettingsSenderConfigurationDto" } ] }, "estimateName": { "type": "string", "description": "estimate name", "example": "Estimate" } }, "required": [ "altId", "altType", "action", "liveMode", "userId" ] }, "FrequencySettingsDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "enabled for the frequency settings", "example": true }, "schedule": { "description": "schedule setting for the estimate", "allOf": [ { "$ref": "#/components/schemas/ScheduleOptionsDto" } ] } }, "required": [ "enabled", "schedule" ] }, "AutoInvoicingDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Enable Auto Invoice", "example": true }, "directPayments": { "type": "boolean", "description": "Direct Payments", "example": true } }, "required": [ "enabled" ] }, "PaymentScheduleDateConfigDto": { "type": "object", "properties": { "depositDateType": { "type": "string", "description": "Deposit date type", "example": "estimate_accepted", "enum": [ "estimate_accepted", "custom" ] }, "scheduleDateType": { "type": "string", "description": "Payment Schedule Date Type", "example": "regular_interval", "enum": [ "regular_interval", "custom" ] } }, "required": [ "depositDateType", "scheduleDateType" ] }, "PaymentScheduleConfigDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Payment Schedule Type", "example": "fixed", "enum": [ "fixed", "percentage" ] }, "dateConfig": { "description": "Due date type configuration", "allOf": [ { "$ref": "#/components/schemas/PaymentScheduleDateConfigDto" } ] }, "schedules": { "description": "Payment Schedule Items", "items": { "type": "array" }, "type": "array" } }, "required": [ "type", "dateConfig", "schedules" ] }, "CreateEstimatesDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Estimate Name", "example": "Home Service Estimate" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "items": { "description": "An array of items for the estimate.", "type": "array", "items": { "$ref": "#/components/schemas/EstimateLineItemDto" } }, "liveMode": { "type": "boolean", "description": "livemode for estimate", "example": true, "default": true }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups", "example": "This is a default terms.
" }, "title": { "type": "string", "description": "Title for the estimate", "example": "ESTIMATE" }, "contactDetails": { "description": "Contact information to send the estimate to", "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "estimateNumber": { "type": "number", "description": "Estimate Number, if not specified will take in the next valid estimate number", "example": 1001 }, "issueDate": { "type": "string", "description": "issue date estimate", "example": "2024-08-07" }, "expiryDate": { "type": "string", "description": "expiry date estimate", "example": "2024-08-10" }, "sentTo": { "description": "Email and sent to details for the estimate", "allOf": [ { "$ref": "#/components/schemas/SentToDto" } ] }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Estimate", "example": true, "default": false }, "meta": { "type": "object", "description": "Meta data for the estimate", "example": { "key": "value" } }, "sendEstimateDetails": { "description": "When sending estimate directly while saving", "allOf": [ { "$ref": "#/components/schemas/SendEstimateDto" } ] }, "frequencySettings": { "description": "frequency settings for the estimate", "allOf": [ { "$ref": "#/components/schemas/FrequencySettingsDto" } ] }, "estimateNumberPrefix": { "type": "string", "description": "Prefix for the estimate number", "example": "EST-", "default": "EST-" }, "userId": { "type": "string", "description": "User Id", "example": "6578278e879ad2646715ba9c" }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "autoInvoice": { "description": "Auto invoice for the estimate", "example": { "enabled": true, "directPayments": true }, "allOf": [ { "$ref": "#/components/schemas/AutoInvoicingDto" } ] }, "miscellaneousCharges": { "description": "miscellaneous charges for the estimate", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] }, "paymentScheduleConfig": { "description": "Payment Schedule Config for the estimate", "allOf": [ { "$ref": "#/components/schemas/PaymentScheduleConfigDto" } ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items", "discount", "contactDetails", "frequencySettings" ] }, "BusinessDetails": { "type": "object", "properties": {} }, "ContactDetails": { "type": "object", "properties": {} }, "SentTo": { "type": "object", "properties": {} }, "AutoInvoice": { "type": "object", "properties": {} }, "EstimateResponseDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "_id": { "type": "string", "description": "Unique identifier", "example": "67ac9a51106ee8311e911XXXX" }, "liveMode": { "type": "boolean", "description": "Indicates if it is in live mode", "example": true }, "deleted": { "type": "boolean", "description": "Indicates if deleted", "example": false }, "name": { "type": "string", "description": "Name", "example": "Estimate Name" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "businessDetails": { "description": "Business details associated with the estimate", "example": { "logoUrl": "your_image-url", "name": "Business name", "address": { "addressLine1": "address line 1", "city": "Test City", "state": "State Name", "countryCode": "US", "postalCode": "12345" }, "phoneNo": "+1 1234567890", "website": "www.example.com", "customValues": [ { "name": "Test", "fieldKey": "{{custom_values.test}}", "id": "5DYTWoiQvWiIJZXX44XXX", "value": "Test's Custom Value" } ] }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetails" } ] }, "items": { "description": "An array of items", "example": [ { "taxes": [], "taxInclusive": false, "_id": "67ac9a51106ee8311e911XXXX", "description": "Futuristic anti-gravity racing
", "currency": "USD", "productId": "67ac9a51106ee8311e911XXXX", "priceId": "67ac9a51106ee8311e911XXXX", "amount": 9.99, "qty": 1, "name": "TEST", "type": "one_time" }, { "taxes": [ { "_id": "67ac9a51106ee8311e911XXXX", "name": "TaxTwo", "rate": 8.5, "calculation": "exclusive" } ], "taxInclusive": true, "_id": "67ac9a51106ee8311e911XXXX", "productId": "67ac9a51106ee8311e911XXXX", "priceId": "67ac9a51106ee8311e911XXXX", "currency": "USD", "name": "TEST2", "qty": 1, "amount": 500, "description": "", "type": "recurring" } ], "type": "array", "items": { "type": "array" } }, "discount": { "description": "Discount details for the estimate template", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "title": { "type": "string", "description": "Title", "example": "ESTIMATE" }, "estimateNumberPrefix": { "type": "string", "description": "Estimate number prefix", "example": "EST-" }, "attachments": { "description": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "updatedBy": { "type": "string", "description": "User Id of who last updated", "example": "3HIpOF9NIc5ltriQXXXX" }, "total": { "type": "number", "description": "Total amount", "example": 1222.03 }, "createdAt": { "format": "date-time", "type": "string", "description": "Timestamp when created", "example": "2025-02-12T13:17:47.416Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Timestamp when last updated", "example": "2025-02-12T13:17:47.416Z" }, "__v": { "type": "number", "description": "Version number", "example": 0 }, "automaticTaxesEnabled": { "type": "boolean", "description": "Indicates if automatic taxes are enabled for this estimate", "example": false }, "termsNotes": { "type": "string", "description": "Terms and conditions for the estimate, supports HTML markup", "example": "All services are subject to availability.
" }, "companyId": { "type": "string", "description": "Company identifier associated with the estimate", "example": "COMP12345" }, "contactDetails": { "description": "Contact details for the estimate", "example": { "id": "jvzfKTNdE7OYXXXXXX", "name": "Contact Name", "phoneNo": "+911111111114", "email": "email@test.com", "address": { "countryCode": "US" } }, "allOf": [ { "$ref": "#/components/schemas/ContactDetails" } ] }, "issueDate": { "format": "date-time", "type": "string", "description": "Date when the estimate was issued", "example": "2023-06-15T00:00:00.000Z" }, "expiryDate": { "format": "date-time", "type": "string", "description": "Date when the estimate expires", "example": "2023-07-15T00:00:00.000Z" }, "sentBy": { "type": "string", "description": "User who sent the estimate", "example": "user@example.com" }, "automaticTaxesCalculated": { "type": "boolean", "description": "Indicates if automatic taxes were calculated", "example": true }, "meta": { "type": "object", "description": "Additional metadata associated with the estimate", "example": { "key": "value" } }, "estimateActionHistory": { "description": "History of actions taken on the estimate", "example": [ { "action": "Created", "timestamp": "2023-06-15T10:00:00.000Z" } ], "type": "array", "items": { "type": "string" } }, "sentTo": { "description": "Recipient details for the estimate", "example": { "email": [ "test@example.com" ], "phoneNo": [ "+1 99444444444" ] }, "allOf": [ { "$ref": "#/components/schemas/SentTo" } ] }, "frequencySettings": { "description": "Frequency settings for recurring estimates", "examples": [ { "enabled": false }, { "enabled": true, "schedule": { "rrule": { "intervalType": "monthly", "numOfWeek": 0, "dayOfMonth": 1, "interval": 1, "startDate": "2025-02-12", "endType": "after", "count": "5" } } }, { "enabled": true, "schedule": { "rrule": { "intervalType": "monthly", "numOfWeek": 0, "dayOfMonth": 1, "interval": 1, "startDate": "2025-02-12", "endType": "by", "endDate": "2025-02-24" } } }, { "enabled": true, "schedule": { "rrule": { "intervalType": "monthly", "numOfWeek": 0, "dayOfMonth": 1, "interval": 1, "startDate": "2025-02-12", "endType": "never" } } } ], "allOf": [ { "$ref": "#/components/schemas/FrequencySettingsDto" } ] }, "lastVisitedAt": { "format": "date-time", "type": "string", "description": "Timestamp when the estimate was last visited", "example": "2023-06-20T08:30:00.000Z" }, "totalamountInUSD": { "type": "number", "description": "Total amount in USD", "example": 1500.75 }, "autoInvoice": { "description": "Auto-invoice settings for the estimate", "example": { "enabled": true, "directPayments": false }, "allOf": [ { "$ref": "#/components/schemas/AutoInvoice" } ] }, "traceId": { "type": "string", "description": "Trace ID for logging and debugging", "example": "010c7a01-857f-4619-970d-xyxyxyxy" } }, "required": [ "altId", "altType", "_id", "liveMode", "deleted", "name", "currency", "businessDetails", "items", "discount", "total", "createdAt", "updatedAt", "__v", "automaticTaxesEnabled", "companyId", "contactDetails", "issueDate", "expiryDate", "automaticTaxesCalculated", "meta", "estimateActionHistory", "sentTo", "frequencySettings", "lastVisitedAt", "totalamountInUSD", "traceId" ] }, "UpdateEstimateDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Estimate Name", "example": "Home Service Estimate" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "items": { "description": "An array of items for the estimate.", "type": "array", "items": { "$ref": "#/components/schemas/EstimateLineItemDto" } }, "liveMode": { "type": "boolean", "description": "livemode for estimate", "example": true, "default": true }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups", "example": "This is a default terms.
" }, "title": { "type": "string", "description": "Title for the estimate", "example": "ESTIMATE" }, "contactDetails": { "description": "Contact information to send the estimate to", "allOf": [ { "$ref": "#/components/schemas/ContactDetailsDto" } ] }, "estimateNumber": { "type": "number", "description": "Estimate Number, if not specified will take in the next valid estimate number", "example": 1001 }, "issueDate": { "type": "string", "description": "issue date estimate", "example": "2024-08-07" }, "expiryDate": { "type": "string", "description": "expiry date estimate", "example": "2024-08-10" }, "sentTo": { "description": "Email and sent to details for the estimate", "allOf": [ { "$ref": "#/components/schemas/SentToDto" } ] }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Estimate", "example": true, "default": false }, "meta": { "type": "object", "description": "Meta data for the estimate", "example": { "key": "value" } }, "sendEstimateDetails": { "description": "When sending estimate directly while saving", "allOf": [ { "$ref": "#/components/schemas/SendEstimateDto" } ] }, "frequencySettings": { "description": "frequency settings for the estimate", "allOf": [ { "$ref": "#/components/schemas/FrequencySettingsDto" } ] }, "estimateNumberPrefix": { "type": "string", "description": "Prefix for the estimate number", "example": "EST-", "default": "EST-" }, "userId": { "type": "string", "description": "User Id", "example": "6578278e879ad2646715ba9c" }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "autoInvoice": { "description": "Auto invoice for the estimate", "example": { "enabled": true, "directPayments": true }, "allOf": [ { "$ref": "#/components/schemas/AutoInvoicingDto" } ] }, "miscellaneousCharges": { "description": "miscellaneous charges for the estimate", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] }, "paymentScheduleConfig": { "description": "Payment Schedule Config for the estimate", "allOf": [ { "$ref": "#/components/schemas/PaymentScheduleConfigDto" } ] }, "estimateStatus": { "type": "string", "description": "Estimate Status", "example": "sent", "enum": [ "all", "draft", "sent", "accepted", "declined", "invoiced", "viewed" ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items", "discount", "contactDetails", "frequencySettings" ] }, "GenerateEstimateNumberResponse": { "type": "object", "properties": { "estimateNumber": { "type": "number" }, "traceId": { "type": "string" } }, "required": [ "estimateNumber", "traceId" ] }, "AltDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] } }, "required": [ "altId", "altType" ] }, "CreateInvoiceFromEstimateDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "markAsInvoiced": { "type": "boolean", "description": "Mark Estimate as Invoiced", "example": true }, "version": { "type": "string", "description": "Version of the update request", "example": "v2", "enum": [ "v1", "v2" ] } }, "required": [ "altId", "altType", "markAsInvoiced" ] }, "CreateInvoiceFromEstimateResponseDTO": { "type": "object", "properties": { "estimate": { "description": "Estimate details", "allOf": [ { "$ref": "#/components/schemas/EstimateResponseDto" } ] }, "invoice": { "description": "Invoice details", "allOf": [ { "$ref": "#/components/schemas/DefaultInvoiceResponseDto" } ] } }, "required": [ "estimate", "invoice" ] }, "ListEstimatesResponseDTO": { "type": "object", "properties": { "estimates": { "description": "List of estimates", "type": "array", "items": { "type": "string" } }, "total": { "type": "number", "description": "Total number of estimates" }, "traceId": { "type": "string", "description": "Unique identifier for tracing the request" } }, "required": [ "estimates", "total", "traceId" ] }, "EstimateIdParam": { "type": "object", "properties": { "estimateId": { "type": "string", "description": "Estimate Id", "example": "5f9d6d8b1b2d2c001f2d9e4b" } }, "required": [ "estimateId" ] }, "ListEstimateTemplateResponseDTO": { "type": "object", "properties": { "data": { "description": "List of estimate templates", "type": "array", "items": { "type": "string" } }, "totalCount": { "type": "number", "description": "Total number of estimate templates available" }, "traceId": { "type": "string", "description": "Unique identifier for tracing the request" } }, "required": [ "data", "totalCount", "traceId" ] }, "EstimateTemplatesDto": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "name": { "type": "string", "description": "Estimate Name", "example": "Home Service Estimate Template" }, "businessDetails": { "$ref": "#/components/schemas/BusinessDetailsDto" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "items": { "description": "An array of items for the estimate.", "items": { "type": "array" }, "type": "array" }, "liveMode": { "type": "boolean", "description": "livemode for estimate", "example": true, "default": true }, "discount": { "$ref": "#/components/schemas/DiscountDto" }, "termsNotes": { "type": "string", "description": "Terms notes, Also supports HTML markups", "example": "This is a default terms.
" }, "title": { "type": "string", "description": "Title for the estimate", "example": "ESTIMATE" }, "automaticTaxesEnabled": { "type": "boolean", "description": "Automatic taxes enabled for the Estimate", "example": true, "default": false }, "meta": { "type": "object", "description": "Meta data for the estimate", "example": { "key": "value" } }, "sendEstimateDetails": { "description": "When sending estimate directly while saving", "allOf": [ { "$ref": "#/components/schemas/SendEstimateDto" } ] }, "estimateNumberPrefix": { "type": "string", "description": "Prefix for the estimate number", "example": "EST-", "default": "EST-" }, "attachments": { "description": "attachments for the invoice", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "miscellaneousCharges": { "description": "miscellaneous charges for the estimate", "allOf": [ { "$ref": "#/components/schemas/ProcessingFeeDto" } ] } }, "required": [ "altId", "altType", "name", "businessDetails", "currency", "items", "discount" ] }, "EstimateTemplateResponseDTO": { "type": "object", "properties": { "altId": { "type": "string", "description": "Location Id or Agency Id", "example": "6578278e879ad2646715ba9c" }, "altType": { "type": "string", "enum": [ "location" ] }, "_id": { "type": "string", "description": "Unique identifier", "example": "67ac9a51106ee8311e911XXXX" }, "liveMode": { "type": "boolean", "description": "Indicates if it is in live mode", "example": true }, "deleted": { "type": "boolean", "description": "Indicates if deleted", "example": false }, "name": { "type": "string", "description": "Name", "example": "Estimate Name" }, "currency": { "type": "string", "description": "Currency code", "example": "USD" }, "businessDetails": { "description": "Business details associated with the estimate", "example": { "logoUrl": "your_image-url", "name": "Business name", "address": { "addressLine1": "address line 1", "city": "Test City", "state": "State Name", "countryCode": "US", "postalCode": "12345" }, "phoneNo": "+1 1234567890", "website": "www.example.com", "customValues": [ { "name": "Test", "fieldKey": "{{custom_values.test}}", "id": "5DYTWoiQvWiIJZXX44XXX", "value": "Test's Custom Value" } ] }, "allOf": [ { "$ref": "#/components/schemas/BusinessDetails" } ] }, "items": { "description": "An array of items", "example": [ { "taxes": [], "taxInclusive": false, "_id": "67ac9a51106ee8311e911XXXX", "description": "Futuristic anti-gravity racing
", "currency": "USD", "productId": "67ac9a51106ee8311e911XXXX", "priceId": "67ac9a51106ee8311e911XXXX", "amount": 9.99, "qty": 1, "name": "TEST", "type": "one_time" }, { "taxes": [ { "_id": "67ac9a51106ee8311e911XXXX", "name": "TaxTwo", "rate": 8.5, "calculation": "exclusive" } ], "taxInclusive": true, "_id": "67ac9a51106ee8311e911XXXX", "productId": "67ac9a51106ee8311e911XXXX", "priceId": "67ac9a51106ee8311e911XXXX", "currency": "USD", "name": "TEST2", "qty": 1, "amount": 500, "description": "", "type": "recurring" } ], "type": "array", "items": { "type": "array" } }, "discount": { "description": "Discount details for the estimate template", "example": { "type": "percentage", "value": 0 }, "allOf": [ { "$ref": "#/components/schemas/DiscountDto" } ] }, "title": { "type": "string", "description": "Title", "example": "ESTIMATE" }, "estimateNumberPrefix": { "type": "string", "description": "Estimate number prefix", "example": "EST-" }, "attachments": { "description": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentsDto" } }, "updatedBy": { "type": "string", "description": "User Id of who last updated", "example": "3HIpOF9NIc5ltriQXXXX" }, "total": { "type": "number", "description": "Total amount", "example": 1222.03 }, "createdAt": { "format": "date-time", "type": "string", "description": "Timestamp when created", "example": "2025-02-12T13:17:47.416Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Timestamp when last updated", "example": "2025-02-12T13:17:47.416Z" }, "__v": { "type": "number", "description": "Version number", "example": 0 }, "automaticTaxesEnabled": { "type": "boolean", "description": "Indicates if automatic taxes are enabled for this estimate", "example": false }, "termsNotes": { "type": "string", "description": "Terms and conditions for the estimate, supports HTML markup", "example": "All services are subject to availability.
" } }, "required": [ "altId", "altType", "_id", "liveMode", "deleted", "name", "currency", "businessDetails", "items", "discount", "total", "createdAt", "updatedAt", "__v", "automaticTaxesEnabled" ] } } }, "x-tagGroups": { "name": "Invoice", "tags": [ "Invoice", "Template", "Schedule", "Text2Pay", "Estimate" ] } }