From 369fef4109314e35f45075b1b8336551d281d278 Mon Sep 17 00:00:00 2001 From: "Cody J. Hanson" Date: Tue, 22 Oct 2024 20:53:22 -0500 Subject: [PATCH] Add specs --- openapi_specs/accounting-v2.json | 8981 ++++++++++++++ openapi_specs/crm-v2.json | 11118 ++++++++++++++++++ openapi_specs/customer-interactions-v2.json | 194 + openapi_specs/dispatch-v2.json | 5432 +++++++++ openapi_specs/equipment-systems-v2.json | 1500 +++ openapi_specs/forms-v2.json | 1627 +++ openapi_specs/inventory-v2.json | 9773 +++++++++++++++ openapi_specs/jbce-v2.json | 340 + openapi_specs/jpm-v2.json | 10456 ++++++++++++++++ openapi_specs/marketing-ads-v2.json | 1611 +++ openapi_specs/marketing-reputation-v2.json | 536 + openapi_specs/marketing-v2.json | 2195 ++++ openapi_specs/memberships-v2.json | 6553 +++++++++++ openapi_specs/payroll-v2.json | 5889 ++++++++++ openapi_specs/pricebook-v2.json | 10815 +++++++++++++++++ openapi_specs/reporting-v2.json | 1143 ++ openapi_specs/salestech-v2.json | 2402 ++++ openapi_specs/scheduling-pro-v2.json | 852 ++ openapi_specs/service-agreements-v2.json | 1323 +++ openapi_specs/settings-v2.json | 4866 ++++++++ openapi_specs/task-management-v2.json | 1888 +++ openapi_specs/telecom.json | 3424 ++++++ 22 files changed, 92918 insertions(+) create mode 100644 openapi_specs/accounting-v2.json create mode 100644 openapi_specs/crm-v2.json create mode 100644 openapi_specs/customer-interactions-v2.json create mode 100644 openapi_specs/dispatch-v2.json create mode 100644 openapi_specs/equipment-systems-v2.json create mode 100644 openapi_specs/forms-v2.json create mode 100644 openapi_specs/inventory-v2.json create mode 100644 openapi_specs/jbce-v2.json create mode 100644 openapi_specs/jpm-v2.json create mode 100644 openapi_specs/marketing-ads-v2.json create mode 100644 openapi_specs/marketing-reputation-v2.json create mode 100644 openapi_specs/marketing-v2.json create mode 100644 openapi_specs/memberships-v2.json create mode 100644 openapi_specs/payroll-v2.json create mode 100644 openapi_specs/pricebook-v2.json create mode 100644 openapi_specs/reporting-v2.json create mode 100644 openapi_specs/salestech-v2.json create mode 100644 openapi_specs/scheduling-pro-v2.json create mode 100644 openapi_specs/service-agreements-v2.json create mode 100644 openapi_specs/settings-v2.json create mode 100644 openapi_specs/task-management-v2.json create mode 100644 openapi_specs/telecom.json diff --git a/openapi_specs/accounting-v2.json b/openapi_specs/accounting-v2.json new file mode 100644 index 0000000..948842c --- /dev/null +++ b/openapi_specs/accounting-v2.json @@ -0,0 +1,8981 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Accounting", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/accounting/v2" + } + ], + "paths": { + "/tenant/{tenant}/ap-credits": { + "get": { + "tags": [ + "ApCredits" + ], + "summary": "Gets a paginated list of ap credits", + "description": "Gets a paginated list of ap credits", + "operationId": "ApCredits_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by specified fields", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.ApCreditResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "inventoryReturnId": 0, + "jobId": 0, + "active": true, + "createdOn": "string", + "modifiedOn": "string", + "date": "string", + "canceledOn": "string", + "number": "string", + "referenceNumber": "string", + "memo": "string", + "amount": 0, + "appliedAmount": 0, + "status": "Unreconciled", + "syncStatus": "Pending", + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "remittanceVendor": { + "id": 0, + "name": "string" + }, + "vendor": { + "id": 0, + "name": "string" + }, + "paymentStatus": "Unpaid", + "splits": [ + { + "id": 0, + "active": true, + "createdOn": "string", + "inventoryBillId": 0, + "vendorCreditId": 0, + "amount": 0 + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/ap-credits/markasexported": { + "post": { + "tags": [ + "ApCredits" + ], + "summary": "Marks ap-credits as exported.", + "description": "Marks ap-credits as exported.", + "operationId": "ApCredits_MarkAsExported", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkApCreditAsExportedUpdateRequest" + } + }, + "example": [ + { + "apCreditId": 0 + } + ] + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkApCreditAsExportedUpdateResponse" + } + }, + "example": [ + { + "apCreditId": 0, + "success": true, + "errorMessage": "string" + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/ap-payments": { + "get": { + "tags": [ + "ApPayments" + ], + "summary": "ApPayments_GetList", + "operationId": "ApPayments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by specified fields", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.ApPaymentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "createdOn": "string", + "modifiedOn": "string", + "date": "string", + "approvedDate": "string", + "method": "AccountingSystem", + "name": "string", + "printCheck": true, + "amount": 0, + "errorMessage": "string", + "status": "Unpaid", + "syncStatus": "Pending", + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "glAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "vendor": { + "id": 0, + "name": "string" + }, + "remittanceVendor": { + "id": 0, + "name": "string" + }, + "splits": [ + { + "id": 0, + "active": true, + "createdOn": "string", + "documentId": 0, + "inventoryBillId": 0, + "amount": 0 + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/ap-payments/markasexported": { + "post": { + "tags": [ + "ApPayments" + ], + "summary": "Marks ap-payments as exported.", + "description": "Marks ap-payments as exported.", + "operationId": "ApPayments_MarkAsExported", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkApPaymentAsExportedUpdateRequest" + } + }, + "example": [ + { + "apPaymentId": 0, + "externalId": "string", + "externalMessage": "string" + } + ] + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkApPaymentAsExportedUpdateResponse" + } + }, + "example": [ + { + "apPaymentId": 0, + "success": true, + "errorMessage": "string" + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/invoices": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for invoices", + "description": "Provides export feed for invoices", + "operationId": "Export_Invoices", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Accounting.V2.ExportInvoiceResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "syncStatus": "string", + "summary": "string", + "referenceNumber": "string", + "invoiceDate": "string", + "dueDate": "string", + "subTotal": "string", + "salesTax": "string", + "salesTaxCode": { + "id": 0, + "name": "string", + "taxRate": 0 + }, + "total": "string", + "balance": "string", + "invoiceType": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "name": "string" + }, + "customerAddress": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "location": { + "id": 0, + "name": "string" + }, + "locationAddress": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "termName": "string", + "createdBy": "string", + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "depositedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "adjustmentToId": 0, + "job": { + "id": 0, + "number": "string", + "type": "string" + }, + "projectId": 0, + "royalty": { + "status": "string", + "date": "string", + "sentOn": "string", + "memo": "string" + }, + "employeeInfo": { + "id": 0, + "name": "string", + "modifiedOn": "string" + }, + "commissionEligibilityDate": "string", + "sentStatus": "NotSent", + "reviewStatus": "NeedsReview", + "assignedTo": { + "id": 0, + "name": "string" + }, + "items": [ + { + "id": 0, + "description": "string", + "quantity": "string", + "cost": "string", + "totalCost": "string", + "inventoryLocation": "string", + "price": "string", + "type": "Service", + "skuName": "string", + "skuId": 0, + "total": "string", + "inventory": true, + "taxable": true, + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "membershipTypeId": 0, + "itemGroup": { + "rootId": 0, + "name": "string" + }, + "displayName": "string", + "soldHours": 0, + "modifiedOn": "string", + "serviceDate": "string", + "order": 0, + "businessUnit": { + "id": 0, + "name": "string" + } + } + ], + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/invoice-items": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for invoice items", + "description": "Provides export feed for invoice items", + "operationId": "Export_InvoiceItems", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Accounting.V2.ExportInvoiceItemResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "description": "string", + "quantity": "string", + "cost": "string", + "totalCost": "string", + "inventoryLocation": "string", + "price": "string", + "type": "Service", + "skuName": "string", + "skuId": 0, + "total": "string", + "inventory": true, + "taxable": true, + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "membershipTypeId": 0, + "itemGroup": { + "rootId": 0, + "name": "string" + }, + "displayName": "string", + "soldHours": 0, + "modifiedOn": "string", + "serviceDate": "string", + "order": 0, + "businessUnit": { + "id": 0, + "name": "string" + }, + "active": true, + "invoiceId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/payments": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for payments", + "description": "Provides export feed for payments", + "operationId": "Export_Payments", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Accounting.V2.ExportPaymentResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "syncStatus": "string", + "referenceNumber": "string", + "date": "string", + "type": "string", + "typeId": "string", + "total": "string", + "unappliedAmount": "string", + "memo": "string", + "customer": { + "id": 0, + "name": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "createdBy": "string", + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "appliedTo": [ + { + "appliedId": 0, + "appliedTo": 0, + "appliedAmount": "string", + "appliedOn": "string", + "appliedBy": "string", + "appliedToReferenceNumber": "string" + } + ], + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "authCode": "string", + "checkNumber": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/inventory-bills": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for inventory bills", + "description": "Provides export feed for inventory bills", + "operationId": "Export_InventoryBills", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Accounting.V2.ExportInventoryBillResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "purchaseOrderId": 0, + "syncStatus": "string", + "referenceNumber": "string", + "vendorNumber": "string", + "summary": "string", + "billDate": "string", + "billAmount": "string", + "taxAmount": "string", + "shippingAmount": "string", + "createdBy": "string", + "createdOn": "string", + "termName": "string", + "dueDate": "string", + "shipToDescription": "string", + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "vendor": { + "id": 0, + "name": "string" + }, + "shipTo": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "items": [ + { + "order": 0, + "name": "string", + "description": "string", + "quantity": "string", + "cost": "string", + "inventoryLocation": "string", + "serialNumber": "string", + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "skuId": 0, + "skuCode": "string" + } + ], + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "jobId": 0, + "jobNumber": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/inventory-bills": { + "get": { + "tags": [ + "InventoryBills" + ], + "summary": "InventoryBills_GetList", + "operationId": "InventoryBills_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "batchNumber", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "billNumber", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customField.Fields", + "in": "query", + "description": "Dictionary of name-value pairs", + "schema": { + "maxProperties": 50, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customField.Operator", + "in": "query", + "description": "Operator to be used between the name-value pairs. Can be \"Or\" or \"And\", default is \"And\".\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "dateFrom", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dateTo", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "jobNumber", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "purchaseOrderNumber", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "purchaseOrderTypes", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "syncStatuses", + "in": "query", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InventoryBillSyncStatus" + }, + "nullable": true + } + }, + { + "name": "minCost", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "maxCost", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InventoryBillResponse" + } + }, + "example": [ + { + "id": 0, + "purchaseOrderId": 0, + "syncStatus": "string", + "referenceNumber": "string", + "vendorNumber": "string", + "summary": "string", + "billDate": "string", + "billAmount": "string", + "taxAmount": "string", + "shippingAmount": "string", + "createdBy": "string", + "createdOn": "string", + "termName": "string", + "dueDate": "string", + "shipToDescription": "string", + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "vendor": { + "id": 0, + "name": "string" + }, + "shipTo": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "items": [ + { + "order": 0, + "name": "string", + "description": "string", + "quantity": "string", + "cost": "string", + "inventoryLocation": "string", + "serialNumber": "string", + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "skuId": 0, + "skuCode": "string" + } + ], + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "jobId": 0, + "jobNumber": "string" + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/inventory-bills/custom-fields": { + "patch": { + "tags": [ + "InventoryBills" + ], + "summary": "InventoryBills_UpdateCustomFields", + "operationId": "InventoryBills_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/inventory-bills/markasexported": { + "post": { + "tags": [ + "InventoryBills" + ], + "summary": "mark bill as exported. Id = inventoryBillId", + "description": "mark bill as exported. Id = inventoryBillId", + "operationId": "InventoryBills_MarkAsExported", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.MarkInventoryBillAsExportedUpdateRequest" + }, + "example": { + "inventoryBillIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkInventoryBillAsExportedUpdateResponse" + } + }, + "example": [ + { + "inventoryBillId": 0, + "success": true, + "errorMessage": "string" + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoices": { + "get": { + "tags": [ + "Invoices" + ], + "summary": "Retrieves a list of invoices. By default, all invoices will be returned regardless of status.", + "description": "Retrieves a list of invoices. By default, all invoices will be returned regardless of status.", + "operationId": "Invoices_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Comma-delimited list of invoice IDs.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "statuses", + "in": "query", + "description": "Transaction status, which can be one of: Pending, Posted, Exported.\nBy default, all transaction statuses are included. If you want to filter by more\nthan one status, add a new \"statuses\" query parameter for each status you want to include.\nFor example: &statuses=Pending&statuses=Posted", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.TransactionStatus" + }, + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64. Batch ID associated with invoices.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "batchNumber", + "in": "query", + "description": "Format - int32. Batch number associated with invoices.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "customField.Fields", + "in": "query", + "description": "Dictionary of name-value pairs", + "schema": { + "maxProperties": 50, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customField.Operator", + "in": "query", + "description": "Operator to be used between the name-value pairs. Can be \"Or\" or \"And\", default is \"And\".\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Job ID associated with invoices. This will be null if the invoice is not linked to a job.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobNumber", + "in": "query", + "description": "Job number associated with invoices. This will be null if the invoice is not linked to a job.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitId", + "in": "query", + "description": "Format - int64. Business unit ID associated with invoices.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Customer ID associated with invoices.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "invoicedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "invoicedOnBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "adjustmentToId", + "in": "query", + "description": "Format - int64. When searching for adjustment invoices, this field will search for invoices that are adjustments to the specified invoice ID.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Reference number associated with invoices.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "totalGreater", + "in": "query", + "description": "Format - decimal. Retrieve all invoices with a total greater than or equal to the input value.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "totalLess", + "in": "query", + "description": "Format - decimal. Retrieve all invoices with a total less than or equal to the input value.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "balanceFilter.Balance", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal" + } + }, + { + "name": "balanceFilter.Comparer", + "in": "query", + "description": "Values: [Equals, NotEquals, Greater, Less]", + "schema": { + "$ref": "#/components/schemas/Accounting.V2.BalanceComparer" + } + }, + { + "name": "dueDateBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Retrieve all invoices with a due date before the input value", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dueDateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Retrieve all invoices with a due date on after or equal the input value", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "description": "Field on which you want to order the returned list of invoices.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderByDirection", + "in": "query", + "description": "Order direction of the retuned list of invoices. Values of \"desc\" or \"descending\" will order the list in descending order, otherwise the list will be ordered in ascending order.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "reviewStatuses", + "in": "query", + "description": "Review statuses associated with invoices.", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceReviewStatus" + }, + "nullable": true + } + }, + { + "name": "assignedToIds", + "in": "query", + "description": "AssignedTo IDs associated with invoices.", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.InvoiceResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "syncStatus": "string", + "summary": "string", + "referenceNumber": "string", + "invoiceDate": "string", + "dueDate": "string", + "subTotal": "string", + "salesTax": "string", + "salesTaxCode": { + "id": 0, + "name": "string", + "taxRate": 0 + }, + "total": "string", + "balance": "string", + "invoiceType": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "name": "string" + }, + "customerAddress": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "location": { + "id": 0, + "name": "string" + }, + "locationAddress": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "termName": "string", + "createdBy": "string", + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "depositedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "adjustmentToId": 0, + "job": { + "id": 0, + "number": "string", + "type": "string" + }, + "projectId": 0, + "royalty": { + "status": "string", + "date": "string", + "sentOn": "string", + "memo": "string" + }, + "employeeInfo": { + "id": 0, + "name": "string", + "modifiedOn": "string" + }, + "commissionEligibilityDate": "string", + "sentStatus": "NotSent", + "reviewStatus": "NeedsReview", + "assignedTo": { + "id": 0, + "name": "string" + }, + "items": [ + { + "id": 0, + "description": "string", + "quantity": "string", + "cost": "string", + "totalCost": "string", + "inventoryLocation": "string", + "price": "string", + "type": "Service", + "skuName": "string", + "skuId": 0, + "total": "string", + "inventory": true, + "taxable": true, + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "membershipTypeId": 0, + "itemGroup": { + "rootId": 0, + "name": "string" + }, + "displayName": "string", + "soldHours": 0, + "modifiedOn": "string", + "serviceDate": "string", + "order": 0, + "businessUnit": { + "id": 0, + "name": "string" + } + } + ], + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Invoices" + ], + "summary": "create adjustment invoice", + "description": "create adjustment invoice", + "operationId": "Invoices_CreateAdjustmentInvoice", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.AdjustmentInvoiceCreateRequest" + }, + "example": { + "number": "string", + "typeId": 0, + "invoicedOn": "string", + "subtotal": 0, + "tax": 0, + "summary": "string", + "royaltyStatus": {}, + "royaltyDate": "string", + "royaltySentOn": "string", + "royaltyMemo": "string", + "exportId": "string", + "reviewStatus": {}, + "assignedToId": 0, + "items": [ + { + "skuId": 0, + "skuName": "string", + "technicianId": 0, + "description": "string", + "quantity": 0, + "unitPrice": 0, + "cost": 0, + "isAddOn": true, + "signature": "string", + "technicianAcknowledgementSignature": "string", + "installedOn": "string", + "inventoryWarehouseName": "string", + "skipUpdatingMembershipPrices": true, + "itemGroupName": "string", + "itemGroupRootId": 0, + "inventoryLocationId": 0, + "durationBillingId": 0, + "id": 0 + } + ], + "adjustmentToId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + }, + "example": 0 + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoices/custom-fields": { + "patch": { + "tags": [ + "Invoices" + ], + "summary": "Updates custom fields for specified invoices", + "description": "Updates custom fields for specified invoices", + "operationId": "Invoices_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoices/{id}": { + "patch": { + "tags": [ + "Invoices" + ], + "summary": "update invoice", + "description": "update invoice", + "operationId": "Invoices_UpdateInvoice", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceUpdateRequest" + }, + "example": { + "number": "string", + "typeId": 0, + "invoicedOn": "string", + "subtotal": 0, + "tax": 0, + "summary": "string", + "royaltyStatus": {}, + "royaltyDate": "string", + "royaltySentOn": "string", + "royaltyMemo": "string", + "exportId": "string", + "reviewStatus": {}, + "assignedToId": 0, + "items": [ + { + "skuId": 0, + "skuName": "string", + "technicianId": 0, + "description": "string", + "quantity": 0, + "unitPrice": 0, + "cost": 0, + "isAddOn": true, + "signature": "string", + "technicianAcknowledgementSignature": "string", + "installedOn": "string", + "inventoryWarehouseName": "string", + "skipUpdatingMembershipPrices": true, + "itemGroupName": "string", + "itemGroupRootId": 0, + "inventoryLocationId": 0, + "durationBillingId": 0, + "id": 0 + } + ], + "payments": [ + { + "id": 0, + "settlementStatus": {}, + "settlementDate": "string" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoices/{invoiceId}/items": { + "patch": { + "tags": [ + "Invoices" + ], + "summary": "update invoice items", + "description": "update invoice items", + "operationId": "Invoices_UpdateInvoiceItems", + "parameters": [ + { + "name": "invoiceId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemUpdateRequest" + }, + "example": { + "skuId": 0, + "skuName": "string", + "technicianId": 0, + "description": "string", + "quantity": 0, + "unitPrice": 0, + "cost": 0, + "isAddOn": true, + "signature": "string", + "technicianAcknowledgementSignature": "string", + "installedOn": "string", + "inventoryWarehouseName": "string", + "skipUpdatingMembershipPrices": true, + "itemGroupName": "string", + "itemGroupRootId": 0, + "inventoryLocationId": 0, + "durationBillingId": 0, + "id": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoices/{invoiceId}/items/{itemId}": { + "delete": { + "tags": [ + "Invoices" + ], + "summary": "delete invoice item", + "description": "delete invoice item", + "operationId": "Invoices_DeleteInvoiceItem", + "parameters": [ + { + "name": "invoiceId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoices/markasexported": { + "post": { + "tags": [ + "Invoices" + ], + "summary": "mark invoice as exported. Id = invoiceId", + "description": "mark invoice as exported. Id = invoiceId", + "operationId": "Invoices_MarkAsExported", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkInvoiceAsExportedUpdateRequest" + } + }, + "example": [ + { + "invoiceId": 0, + "externalId": "string", + "externalMessage": "string" + } + ] + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.MarkInvoiceAsExportedUpdateResponse" + } + }, + "example": [ + { + "invoiceId": 0, + "success": true, + "errorMessage": "string" + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/journal-entries": { + "get": { + "tags": [ + "JournalEntries" + ], + "summary": "Gets a list of journal entries.", + "description": "Gets a list of journal entries.", + "operationId": "JournalEntries_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Comma-delimited list of journal entry IDs, maximum 50 items", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "exportedFrom", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Exported on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "exportedTo", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Exported on or before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "postedFrom", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Posted on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "postedTo", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Posted on or before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "exportedBy", + "in": "query", + "description": "Comma-delimited list of user IDs, maximum 50 items", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Name contains", + "schema": { + "maxLength": 255, + "type": "string", + "nullable": true + } + }, + { + "name": "numberFrom", + "in": "query", + "description": "Format - int32. Number is greater or equal than", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "numberTo", + "in": "query", + "description": "Format - int32. Number is less or equal to", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "statuses", + "in": "query", + "description": "Array of statuses", + "schema": { + "maxItems": 50, + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryPostingStatus" + }, + "nullable": true + } + }, + { + "name": "transactionPostedFrom", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Contains a transaction posted on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "transactionPostedTo", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Contains a transaction posted on or before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Comma-delimited list of business unit IDs, maximum 50 items", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "serviceAgreementIds", + "in": "query", + "description": "Comma-delimited list of service agreement IDs, maximum 50 items", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerName", + "in": "query", + "description": "Contains a transaction for a customer with name containing", + "schema": { + "maxLength": 255, + "type": "string", + "nullable": true + } + }, + { + "name": "locationName", + "in": "query", + "description": "Contains a transaction for a customer location with name containing", + "schema": { + "maxLength": 255, + "type": "string", + "nullable": true + } + }, + { + "name": "vendorName", + "in": "query", + "description": "Contains a transaction for a vendor with name containing", + "schema": { + "maxLength": 255, + "type": "string", + "nullable": true + } + }, + { + "name": "inventoryLocationName", + "in": "query", + "description": "Contains a transaction for an inventory location with name containing", + "schema": { + "maxLength": 255, + "type": "string", + "nullable": true + } + }, + { + "name": "refNumber", + "in": "query", + "description": "Contains a transaction with reference number containing", + "schema": { + "maxLength": 255, + "type": "string", + "nullable": true + } + }, + { + "name": "transactionTypes", + "in": "query", + "description": "List of transaction types.\\\nA journal entry will be returned if it contains at least one transaction of this type.", + "schema": { + "maxItems": 50, + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryTransactionType" + }, + "nullable": true + } + }, + { + "name": "customField", + "in": "query", + "description": "Filter by custom fields associated with journal entries.\\\nExample: ?customField.fieldName1=value1&customField.fieldName2=value2\\\nA field with null value, and a non-existent field are treated equally.\\\nMaximum 5 custom fields are supported in one request.", + "schema": { + "maxProperties": 5, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field and direction.\\\nOptions: Id, Number, Name, Status, CreatedOn, ExportedOn, ExportedBy, PostDate.\\\nUse \"+\" for ascending order, and \"-\" for descending order.\\\nExample: \"?sort=-Number\" will sort by number in descending order.\\", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default). Maximum value is 500.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryPagingResponse_Of_Accounting.V2.JournalEntryResponse" + }, + "example": { + "pageSize": 0, + "page": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": "string", + "createdOn": "string", + "modifiedOn": "string", + "number": 0, + "name": "string", + "status": "Open", + "postDate": "string", + "exportedOn": "string", + "exportedBy": { + "id": 0, + "name": "string" + }, + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "url": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/journal-entries/{id}/summary": { + "get": { + "tags": [ + "JournalEntries" + ], + "summary": "Gets a list of journal entry items aggregated by account and business unit.", + "description": "Gets a list of journal entry items aggregated by account and business unit.", + "operationId": "JournalEntries_GetSummary", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - guid.", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default). Maximum value is 500.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryPagingResponse_Of_Accounting.V2.JournalEntrySummaryResponse" + }, + "example": { + "pageSize": 0, + "page": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "postDate": "string", + "account": { + "id": 0, + "number": "string", + "name": "string", + "type": "string", + "subtype": "string" + }, + "credit": 0, + "debit": 0, + "memo": "string", + "businessUnit": { + "id": 0, + "name": "string" + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/journal-entries/{id}/details": { + "get": { + "tags": [ + "JournalEntries" + ], + "summary": "Gets a list of journal entry items aggregated by account, business unit, transaction and pricebook item.", + "description": "Gets a list of journal entry items aggregated by account, business unit, transaction and pricebook item.", + "operationId": "JournalEntries_GetDetails", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - guid.", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default). Maximum value is 500.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryPagingResponse_Of_Accounting.V2.JournalEntryDetailsResponse" + }, + "example": { + "pageSize": 0, + "page": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "postDate": "string", + "account": { + "id": 0, + "number": "string", + "name": "string", + "type": "string", + "subtype": "string" + }, + "debit": 0, + "credit": 0, + "memo": "string", + "transaction": { + "id": 0, + "type": "Invoice", + "refNumber": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "name": "string" + }, + "vendor": { + "id": 0, + "name": "string" + }, + "inventoryLocation": { + "id": 0, + "name": "string" + }, + "job": { + "id": 0, + "number": "string" + }, + "customerLocation": { + "id": 0, + "name": "string" + }, + "paymentType": { + "id": 0, + "name": "string" + }, + "project": { + "id": 0, + "number": "string" + }, + "serviceAgreement": { + "id": 0, + "number": "string" + }, + "appliedTo": { + "id": 0, + "type": "Invoice", + "refNumber": "string" + }, + "sku": { + "id": 0, + "type": {}, + "code": "string" + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/journal-entries/{id}": { + "patch": { + "tags": [ + "JournalEntries" + ], + "summary": "Updates a journal entry.", + "description": "Updates a journal entry.", + "operationId": "JournalEntries_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - guid.", + "required": true, + "schema": { + "type": "string", + "format": "guid" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryUpdateRequest" + }, + "example": { + "status": {}, + "customFields": {} + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryResponse" + }, + "example": { + "id": "string", + "createdOn": "string", + "modifiedOn": "string", + "number": 0, + "name": "string", + "status": "Open", + "postDate": "string", + "exportedOn": "string", + "exportedBy": { + "id": 0, + "name": "string" + }, + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "url": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payments": { + "get": { + "tags": [ + "Payments" + ], + "summary": "Gets a paginated list of payments", + "description": "Gets a paginated list of payments", + "operationId": "Payments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "appliedToInvoiceIds", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "appliedToReferenceNumber", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "statuses", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "paidOnAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "paidOnBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "batchNumber", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "transactionType", + "in": "query", + "description": "Values: [Undefined, JournalEntry, ReceivePayment]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.PaymentTransactionType" + } + ], + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "totalGreater", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "totalLess", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "customField.Fields", + "in": "query", + "description": "Dictionary of name-value pairs", + "schema": { + "maxProperties": 50, + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customField.Operator", + "in": "query", + "description": "Operator to be used between the name-value pairs. Can be \"Or\" or \"And\", default is \"And\".\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.DetailedPaymentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "syncStatus": "string", + "referenceNumber": "string", + "date": "string", + "type": "string", + "typeId": "string", + "total": "string", + "unappliedAmount": "string", + "memo": "string", + "customer": { + "id": 0, + "name": "string" + }, + "businessUnit": { + "id": 0, + "name": "string" + }, + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "createdBy": "string", + "generalLedgerAccount": { + "id": 0, + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "appliedTo": [ + { + "appliedId": 0, + "appliedTo": 0, + "appliedAmount": "string", + "appliedOn": "string", + "appliedBy": "string", + "appliedToReferenceNumber": "string" + } + ], + "customFields": [ + { + "name": "string", + "value": "string" + } + ], + "authCode": "string", + "checkNumber": "string", + "modifiedOn": "string", + "createdOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Payments" + ], + "summary": "Creates new payment", + "description": "Creates new payment", + "operationId": "Payments_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentCreateRequest" + }, + "example": { + "typeId": 0, + "memo": "string", + "paidOn": "string", + "authCode": "string", + "checkNumber": "string", + "exportId": "string", + "status": {}, + "splits": [ + { + "invoiceId": 0, + "amount": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentResponse" + }, + "example": { + "id": 0, + "typeId": 0, + "active": true, + "memo": "string", + "paidOn": "string", + "authCode": "string", + "checkNumber": "string", + "exportId": "string", + "transactionStatus": {}, + "status": {}, + "splits": [ + { + "invoiceId": 0, + "amount": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payments/custom-fields": { + "patch": { + "tags": [ + "Payments" + ], + "summary": "Update custom fields for specified payments", + "description": "Update custom fields for specified payments", + "operationId": "Payments_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payments/{id}": { + "patch": { + "tags": [ + "Payments" + ], + "summary": "Updates specified payment in \"patch\" mode", + "description": "Updates specified payment in \"patch\" mode", + "operationId": "Payments_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentUpdateRequest" + }, + "example": { + "typeId": 0, + "active": true, + "memo": "string", + "paidOn": "string", + "authCode": "string", + "checkNumber": "string", + "exportId": "string", + "status": "Pending", + "splits": [ + { + "invoiceId": 0, + "amount": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentResponse" + }, + "example": { + "id": 0, + "typeId": 0, + "active": true, + "memo": "string", + "paidOn": "string", + "authCode": "string", + "checkNumber": "string", + "exportId": "string", + "transactionStatus": {}, + "status": {}, + "splits": [ + { + "invoiceId": 0, + "amount": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payments/status": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Updates payment status", + "description": "Updates payment status", + "operationId": "Payments_UpdateStatus", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentStatusBatchRequest" + }, + "example": { + "status": "Pending", + "paymentIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payment-terms/{paymentTermId}": { + "get": { + "tags": [ + "PaymentTerms" + ], + "summary": "Gets Payment Term", + "description": "Gets Payment Term", + "operationId": "PaymentTerms_GetPaymentTermModel", + "parameters": [ + { + "name": "paymentTermId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentTermAPIModel" + }, + "example": { + "id": 0, + "name": "string", + "dueDayType": "NumberOfDays", + "dueDay": 0, + "isCustomerDefault": true, + "isVendorDefault": true, + "active": true, + "inUse": true, + "modifiedOn": "string", + "paymentTermDiscountModel": { + "id": 0, + "discountApplyTo": {}, + "discount": 0, + "discountType": {}, + "account": "string", + "applyBy": {}, + "applyByValue": 0 + }, + "interestSettings": { + "id": 0, + "rateType": "Flat", + "flatRateValue": 0, + "percentageRateValue": 0, + "chargeMethod": {}, + "frequency": "Once", + "gracePeriod": 0, + "targetInvoices": [ + "JobInvoices" + ], + "taskId": 0, + "taskDisplayName": "string" + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payment-terms": { + "get": { + "tags": [ + "PaymentTerms" + ], + "summary": "Gets a list of payment terms", + "description": "Gets a list of payment terms", + "operationId": "PaymentTerms_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.PaymentTermAPIModel" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "dueDayType": "NumberOfDays", + "dueDay": 0, + "isCustomerDefault": true, + "isVendorDefault": true, + "active": true, + "inUse": true, + "modifiedOn": "string", + "paymentTermDiscountModel": { + "id": 0, + "discountApplyTo": {}, + "discount": 0, + "discountType": {}, + "account": "string", + "applyBy": {}, + "applyByValue": 0 + }, + "interestSettings": { + "id": 0, + "rateType": "Flat", + "flatRateValue": 0, + "percentageRateValue": 0, + "chargeMethod": {}, + "frequency": "Once", + "gracePeriod": 0, + "targetInvoices": [ + "JobInvoices" + ], + "taskId": 0, + "taskDisplayName": "string" + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payment-types": { + "get": { + "tags": [ + "PaymentTypes" + ], + "summary": "Gets a list of payment types", + "description": "Gets a list of payment types", + "operationId": "PaymentTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.PaymentTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payment-types/{id}": { + "get": { + "tags": [ + "PaymentTypes" + ], + "summary": "Gets payment type specified by ID", + "description": "Gets payment type specified by ID", + "operationId": "PaymentTypes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Accounting.V2.PaymentTypeResponse" + }, + "example": { + "id": 0, + "name": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/tax-zones": { + "get": { + "tags": [ + "TaxZones" + ], + "summary": "Get a list of tax zones and their rates.", + "description": "Gets a list of tax zones and their rates based on the supplied filter.\nIf no filter is supplied it returns all tax zones.", + "operationId": "TaxZones_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Tax Zone Ids to pull tax zones for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Accounting.V2.TaxZoneResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "color": 0, + "isTaxRateSeparated": true, + "isMultipleTaxZone": true, + "rates": [ + { + "id": 0, + "taxName": "string", + "taxBaseType": [ + "Subtotal" + ], + "taxRate": 0, + "salesTaxItem": "string" + } + ], + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Accounting.V2.ApCreditResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ApCreditResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.ApCreditResponse": { + "required": [ + "id", + "active", + "createdOn", + "modifiedOn", + "date", + "amount", + "appliedAmount", + "status", + "syncStatus", + "paymentStatus", + "splits" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "inventoryReturnId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "active": { + "type": "boolean" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "canceledOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "number": { + "type": "string", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + }, + "amount": { + "type": "number", + "format": "decimal" + }, + "appliedAmount": { + "type": "number", + "format": "decimal" + }, + "status": { + "$ref": "#/components/schemas/Accounting.V2.VendorCreditStatus" + }, + "syncStatus": { + "$ref": "#/components/schemas/Accounting.V2.ApCreditSyncStatus" + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "remittanceVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "vendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "paymentStatus": { + "$ref": "#/components/schemas/Accounting.V2.ApPaymentStatus" + }, + "splits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ApCreditSplitModelResponse" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.VendorCreditStatus": { + "enum": [ + "Unreconciled", + "Canceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Unreconciled", + "Canceled" + ] + }, + "Accounting.V2.ApCreditSyncStatus": { + "enum": [ + "Pending", + "Posted", + "Exported" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Pending", + "Posted", + "Exported" + ] + }, + "Accounting.V2.BatchResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "number": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.NamedFieldResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.ApPaymentStatus": { + "enum": [ + "Unpaid", + "ReadyForApproval", + "Initiated", + "Paid", + "Cancelled", + "InTransit", + "Processing" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Unpaid", + "ReadyForApproval", + "Initiated", + "Paid", + "Cancelled", + "InTransit", + "Processing" + ] + }, + "Accounting.V2.ApCreditSplitModelResponse": { + "required": [ + "id", + "active", + "createdOn", + "inventoryBillId", + "vendorCreditId", + "amount" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "inventoryBillId": { + "type": "integer", + "format": "int64" + }, + "vendorCreditId": { + "type": "integer", + "format": "int64" + }, + "amount": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "Accounting.V2.MarkApCreditAsExportedUpdateResponse": { + "required": [ + "apCreditId", + "success" + ], + "type": "object", + "properties": { + "apCreditId": { + "type": "integer", + "format": "int64" + }, + "success": { + "type": "boolean" + }, + "errorMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.MarkApCreditAsExportedUpdateRequest": { + "required": [ + "apCreditId" + ], + "type": "object", + "properties": { + "apCreditId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Accounting.V2.ApPaymentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ApPaymentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.ApPaymentResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "date", + "method", + "amount", + "status", + "syncStatus", + "splits" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "approvedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "method": { + "$ref": "#/components/schemas/Accounting.V2.ApPaymentMethod" + }, + "name": { + "type": "string", + "nullable": true + }, + "printCheck": { + "type": "boolean", + "nullable": true + }, + "amount": { + "type": "number", + "format": "decimal" + }, + "errorMessage": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/Accounting.V2.ApPaymentStatus" + }, + "syncStatus": { + "$ref": "#/components/schemas/Accounting.V2.ApPaymentSyncStatus" + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "glAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "vendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "remittanceVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "splits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ApPaymentSplitApiModel" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.ApPaymentMethod": { + "enum": [ + "AccountingSystem", + "ServiceTitan" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "AccountingSystem", + "ServiceTitan" + ] + }, + "Accounting.V2.ApPaymentSyncStatus": { + "enum": [ + "Pending", + "Posted", + "Exported" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Pending", + "Posted", + "Exported" + ] + }, + "Accounting.V2.GLAccountResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "number": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "detailType": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.ApPaymentSplitApiModel": { + "required": [ + "id", + "createdOn", + "amount" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "documentId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "inventoryBillId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "amount": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Accounting.V2.MarkApPaymentAsExportedUpdateResponse": { + "required": [ + "apPaymentId", + "success" + ], + "type": "object", + "properties": { + "apPaymentId": { + "type": "integer", + "format": "int64" + }, + "success": { + "type": "boolean" + }, + "errorMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.MarkApPaymentAsExportedUpdateRequest": { + "required": [ + "apPaymentId" + ], + "type": "object", + "properties": { + "apPaymentId": { + "type": "integer", + "format": "int64" + }, + "externalId": { + "type": "string", + "nullable": true + }, + "externalMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Accounting.V2.ExportInvoiceResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ExportInvoiceResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Accounting.V2.ExportInvoiceResponse": { + "required": [ + "id", + "createdOn", + "sentStatus", + "reviewStatus", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "syncStatus": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string", + "format": "html", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "invoiceDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "subTotal": { + "type": "string", + "nullable": true + }, + "salesTax": { + "type": "string", + "nullable": true + }, + "salesTaxCode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.SalesTaxResponse" + } + ], + "nullable": true + }, + "total": { + "type": "string", + "nullable": true + }, + "balance": { + "type": "string", + "nullable": true + }, + "invoiceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "customerAddress": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.AddressResponse" + } + ], + "nullable": true + }, + "location": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "locationAddress": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.AddressResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "termName": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "depositedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "adjustmentToId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "job": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JobResponse" + } + ], + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "royalty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.RoyaltyResponse" + } + ], + "nullable": true + }, + "employeeInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.EmployeeInfoResponse" + } + ], + "nullable": true + }, + "commissionEligibilityDate": { + "type": "string", + "nullable": true + }, + "sentStatus": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceSentStatus" + }, + "reviewStatus": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceReviewStatus" + }, + "assignedTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemResponse" + }, + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldResponse" + }, + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether this invoice is active, or not anymore." + } + }, + "additionalProperties": false + }, + "Accounting.V2.SalesTaxResponse": { + "required": [ + "id", + "taxRate" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "taxRate": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Accounting.V2.AddressResponse": { + "type": "object", + "properties": { + "street": { + "type": "string", + "nullable": true + }, + "unit": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "state": { + "type": "string", + "nullable": true + }, + "zip": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JobResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "number": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.RoyaltyResponse": { + "type": "object", + "properties": { + "status": { + "type": "string", + "nullable": true + }, + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "sentOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.EmployeeInfoResponse": { + "required": [ + "id", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Accounting.V2.InvoiceSentStatus": { + "enum": [ + "NotSent", + "Sent", + "Opened" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "NotSent", + "Sent", + "Opened" + ] + }, + "Accounting.V2.InvoiceReviewStatus": { + "enum": [ + "NeedsReview", + "OnHold", + "Reviewed" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "NeedsReview", + "OnHold", + "Reviewed" + ] + }, + "Accounting.V2.InvoiceItemResponse": { + "required": [ + "id", + "type", + "skuId", + "inventory", + "taxable", + "membershipTypeId", + "modifiedOn", + "order" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string", + "format": "html", + "nullable": true + }, + "quantity": { + "type": "string", + "nullable": true + }, + "cost": { + "type": "string", + "nullable": true + }, + "totalCost": { + "type": "string", + "nullable": true + }, + "inventoryLocation": { + "type": "string", + "nullable": true + }, + "price": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemType" + }, + "skuName": { + "type": "string", + "nullable": true + }, + "skuId": { + "type": "integer", + "format": "int64" + }, + "total": { + "type": "string", + "nullable": true + }, + "inventory": { + "type": "boolean" + }, + "taxable": { + "type": "boolean" + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "costOfSaleAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "assetAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "membershipTypeId": { + "type": "integer", + "format": "int64" + }, + "itemGroup": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.ItemGroupResponse" + } + ], + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "soldHours": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "serviceDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32" + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.InvoiceItemType": { + "enum": [ + "Service", + "Material", + "Equipment", + "PriceModifier", + "Unspecified" + ], + "type": "string", + "description": "Indicates a type's item", + "x-enumNames": [ + "Service", + "Material", + "Equipment", + "PriceModifier", + "Unspecified" + ] + }, + "Accounting.V2.ItemGroupResponse": { + "required": [ + "rootId" + ], + "type": "object", + "properties": { + "rootId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.CustomFieldResponse": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Accounting.V2.ExportInvoiceItemResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ExportInvoiceItemResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Accounting.V2.ExportInvoiceItemResponse": { + "required": [ + "id", + "type", + "skuId", + "inventory", + "taxable", + "membershipTypeId", + "modifiedOn", + "order", + "active", + "invoiceId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "description": { + "type": "string", + "format": "html", + "nullable": true + }, + "quantity": { + "type": "string", + "nullable": true + }, + "cost": { + "type": "string", + "nullable": true + }, + "totalCost": { + "type": "string", + "nullable": true + }, + "inventoryLocation": { + "type": "string", + "nullable": true + }, + "price": { + "type": "string", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemType" + }, + "skuName": { + "type": "string", + "nullable": true + }, + "skuId": { + "type": "integer", + "format": "int64" + }, + "total": { + "type": "string", + "nullable": true + }, + "inventory": { + "type": "boolean" + }, + "taxable": { + "type": "boolean" + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "costOfSaleAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "assetAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "membershipTypeId": { + "type": "integer", + "format": "int64" + }, + "itemGroup": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.ItemGroupResponse" + } + ], + "nullable": true + }, + "displayName": { + "type": "string", + "nullable": true + }, + "soldHours": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "serviceDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "order": { + "type": "integer", + "format": "int32" + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "active": { + "type": "boolean" + }, + "invoiceId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Accounting.V2.ExportPaymentResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ExportPaymentResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Accounting.V2.ExportPaymentResponse": { + "required": [ + "id", + "modifiedOn", + "createdOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "syncStatus": { + "type": "string", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "typeId": { + "type": "string", + "nullable": true + }, + "total": { + "type": "string", + "nullable": true + }, + "unappliedAmount": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "appliedTo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentAppliedResponse" + }, + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.CustomFieldModel" + }, + "nullable": true + }, + "authCode": { + "type": "string", + "nullable": true + }, + "checkNumber": { + "type": "string", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentAppliedResponse": { + "required": [ + "appliedId", + "appliedTo" + ], + "type": "object", + "properties": { + "appliedId": { + "type": "integer", + "format": "int64" + }, + "appliedTo": { + "type": "integer", + "format": "int64" + }, + "appliedAmount": { + "type": "string", + "nullable": true + }, + "appliedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "appliedBy": { + "type": "string", + "nullable": true + }, + "appliedToReferenceNumber": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.CustomFieldModel": { + "required": [ + "name", + "value" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Accounting.V2.ExportInventoryBillResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.ExportInventoryBillResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Accounting.V2.ExportInventoryBillResponse": { + "required": [ + "id", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "purchaseOrderId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "syncStatus": { + "type": "string", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "vendorNumber": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string", + "nullable": true + }, + "billDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "billAmount": { + "type": "string", + "nullable": true + }, + "taxAmount": { + "type": "string", + "nullable": true + }, + "shippingAmount": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "termName": { + "type": "string", + "nullable": true + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "shipToDescription": { + "type": "string", + "nullable": true + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "vendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.AddressResponse" + } + ], + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InventoryBillItemResponse" + }, + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldResponse" + }, + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobNumber": { + "type": "string", + "nullable": true + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Accounting.V2.InventoryBillItemResponse": { + "required": [ + "order", + "skuId", + "skuCode" + ], + "type": "object", + "properties": { + "order": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "format": "html", + "nullable": true + }, + "quantity": { + "type": "string", + "nullable": true + }, + "cost": { + "type": "string", + "nullable": true + }, + "inventoryLocation": { + "type": "string", + "nullable": true + }, + "serialNumber": { + "type": "string", + "nullable": true + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "costOfSaleAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "assetAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "skuId": { + "type": "integer", + "format": "int64" + }, + "skuCode": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Accounting.V2.InventoryBillResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "purchaseOrderId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "syncStatus": { + "type": "string", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "vendorNumber": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string", + "nullable": true + }, + "billDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "billAmount": { + "type": "string", + "nullable": true + }, + "taxAmount": { + "type": "string", + "nullable": true + }, + "shippingAmount": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "termName": { + "type": "string", + "nullable": true + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "shipToDescription": { + "type": "string", + "nullable": true + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "vendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.AddressResponse" + } + ], + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InventoryBillItemResponse" + }, + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldResponse" + }, + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobNumber": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.LogicalOperator": { + "enum": [ + "And", + "Or" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "And", + "Or" + ] + }, + "Accounting.V2.InventoryBillSyncStatus": { + "enum": [ + "Pending", + "Posted", + "Exported", + "PostedAndExported" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Pending", + "Posted", + "Exported", + "PostedAndExported" + ] + }, + "Accounting.V2.CustomFieldUpdateRequest": { + "required": [ + "operations" + ], + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldOperationRequest" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.CustomFieldOperationRequest": { + "required": [ + "objectId", + "customFields" + ], + "type": "object", + "properties": { + "objectId": { + "type": "integer", + "format": "int64" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldPairRequest" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.CustomFieldPairRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "maxLength": 255, + "type": "string" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.MarkInventoryBillAsExportedUpdateResponse": { + "required": [ + "inventoryBillId", + "success" + ], + "type": "object", + "properties": { + "inventoryBillId": { + "type": "integer", + "format": "int64" + }, + "success": { + "type": "boolean" + }, + "errorMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.MarkInventoryBillAsExportedUpdateRequest": { + "required": [ + "inventoryBillIds" + ], + "type": "object", + "properties": { + "inventoryBillIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Accounting.V2.InvoiceResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.InvoiceResponse": { + "required": [ + "id", + "createdOn", + "sentStatus", + "reviewStatus" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "syncStatus": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string", + "format": "html", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "invoiceDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "dueDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "subTotal": { + "type": "string", + "nullable": true + }, + "salesTax": { + "type": "string", + "nullable": true + }, + "salesTaxCode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.SalesTaxResponse" + } + ], + "nullable": true + }, + "total": { + "type": "string", + "nullable": true + }, + "balance": { + "type": "string", + "nullable": true + }, + "invoiceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "customerAddress": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.AddressResponse" + } + ], + "nullable": true + }, + "location": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "locationAddress": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.AddressResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "termName": { + "type": "string", + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "depositedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "adjustmentToId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "job": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JobResponse" + } + ], + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "royalty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.RoyaltyResponse" + } + ], + "nullable": true + }, + "employeeInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.EmployeeInfoResponse" + } + ], + "nullable": true + }, + "commissionEligibilityDate": { + "type": "string", + "nullable": true + }, + "sentStatus": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceSentStatus" + }, + "reviewStatus": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceReviewStatus" + }, + "assignedTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemResponse" + }, + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldResponse" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.TransactionStatus": { + "enum": [ + "Pending", + "Posted", + "Exported" + ], + "type": "string", + "description": "Indicates a transaction's status.", + "x-enumNames": [ + "Pending", + "Posted", + "Exported" + ] + }, + "Accounting.V2.BalanceComparer": { + "enum": [ + "Equals", + "NotEquals", + "Greater", + "Less" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Equals", + "NotEquals", + "Greater", + "Less" + ] + }, + "Accounting.V2.AdjustmentInvoiceCreateRequest": { + "required": [ + "adjustmentToId" + ], + "type": "object", + "properties": { + "number": { + "type": "string", + "nullable": true + }, + "typeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "invoicedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "subtotal": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "tax": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "summary": { + "type": "string", + "format": "html", + "nullable": true + }, + "royaltyStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.RoyaltyStatus" + } + ], + "nullable": true + }, + "royaltyDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "royaltySentOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "royaltyMemo": { + "type": "string", + "nullable": true + }, + "exportId": { + "type": "string", + "nullable": true + }, + "reviewStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.InvoiceReviewStatus" + } + ], + "nullable": true + }, + "assignedToId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemUpdateRequest" + }, + "nullable": true + }, + "adjustmentToId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Accounting.V2.RoyaltyStatus": { + "enum": [ + "Pending", + "Sent", + "Failed" + ], + "type": "string", + "description": "Indicates royalty status of invoice", + "x-enumNames": [ + "Pending", + "Sent", + "Failed" + ] + }, + "Accounting.V2.InvoiceItemUpdateRequest": { + "required": [ + "description", + "quantity" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "skuName": { + "type": "string", + "nullable": true + }, + "technicianId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "format": "html" + }, + "quantity": { + "type": "number", + "format": "decimal" + }, + "unitPrice": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "cost": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "isAddOn": { + "type": "boolean", + "nullable": true + }, + "signature": { + "type": "string", + "nullable": true + }, + "technicianAcknowledgementSignature": { + "type": "string", + "nullable": true + }, + "installedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "inventoryWarehouseName": { + "type": "string", + "nullable": true + }, + "skipUpdatingMembershipPrices": { + "type": "boolean", + "nullable": true + }, + "itemGroupName": { + "type": "string", + "nullable": true + }, + "itemGroupRootId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "inventoryLocationId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "durationBillingId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.InvoiceUpdateRequest": { + "type": "object", + "properties": { + "number": { + "type": "string", + "nullable": true + }, + "typeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "invoicedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "subtotal": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "tax": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "summary": { + "type": "string", + "format": "html", + "nullable": true + }, + "royaltyStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.RoyaltyStatus" + } + ], + "nullable": true + }, + "royaltyDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "royaltySentOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "royaltyMemo": { + "type": "string", + "nullable": true + }, + "exportId": { + "type": "string", + "nullable": true + }, + "reviewStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.InvoiceReviewStatus" + } + ], + "nullable": true + }, + "assignedToId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InvoiceItemUpdateRequest" + }, + "nullable": true + }, + "payments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentSettlementUpdateRequest" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentSettlementUpdateRequest": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "settlementStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.SettlementStatus" + } + ], + "nullable": true + }, + "settlementDate": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.SettlementStatus": { + "enum": [ + "NotSettled", + "Settled" + ], + "type": "string", + "description": "Indicates settlement status of payment", + "x-enumNames": [ + "NotSettled", + "Settled" + ] + }, + "Accounting.V2.MarkInvoiceAsExportedUpdateResponse": { + "required": [ + "invoiceId", + "success" + ], + "type": "object", + "properties": { + "invoiceId": { + "type": "integer", + "format": "int64" + }, + "success": { + "type": "boolean" + }, + "errorMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.MarkInvoiceAsExportedUpdateRequest": { + "required": [ + "invoiceId" + ], + "type": "object", + "properties": { + "invoiceId": { + "type": "integer", + "format": "int64" + }, + "externalId": { + "type": "string", + "nullable": true + }, + "externalMessage": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntryPagingResponse_Of_Accounting.V2.JournalEntryResponse": { + "required": [ + "pageSize", + "page", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "page": { + "type": "integer", + "description": "Page number for this query", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.JournalEntryResponse": { + "required": [ + "createdOn", + "modifiedOn", + "number", + "status" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "guid", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "number": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string", + "nullable": true + }, + "status": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryPostingStatus" + }, + "postDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "exportedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "exportedBy": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.CustomFieldResponse" + }, + "nullable": true + }, + "url": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntryPostingStatus": { + "enum": [ + "Open", + "Closed" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Open", + "Closed" + ] + }, + "Accounting.V2.JournalEntryTransactionType": { + "enum": [ + "Invoice", + "Payment", + "Bill", + "VendorCredit", + "VendorPayment", + "InventoryAdjustment", + "PaymentApplication", + "BankDeposit", + "RevenueRecognition" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Invoice", + "Payment", + "Bill", + "VendorCredit", + "VendorPayment", + "InventoryAdjustment", + "PaymentApplication", + "BankDeposit", + "RevenueRecognition" + ] + }, + "Accounting.V2.JournalEntryPagingResponse_Of_Accounting.V2.JournalEntrySummaryResponse": { + "required": [ + "pageSize", + "page", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "page": { + "type": "integer", + "description": "Page number for this query", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntrySummaryResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.JournalEntrySummaryResponse": { + "required": [ + "account", + "credit", + "debit" + ], + "type": "object", + "properties": { + "postDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "account": { + "$ref": "#/components/schemas/Accounting.V2.GeneralLedgerAccount" + }, + "credit": { + "type": "number", + "format": "decimal" + }, + "debit": { + "type": "number", + "format": "decimal" + }, + "memo": { + "type": "string", + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.GeneralLedgerAccount": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "number": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "subtype": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntryPagingResponse_Of_Accounting.V2.JournalEntryDetailsResponse": { + "required": [ + "pageSize", + "page", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "page": { + "type": "integer", + "description": "Page number for this query", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryDetailsResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.JournalEntryDetailsResponse": { + "required": [ + "account", + "debit", + "credit" + ], + "type": "object", + "properties": { + "postDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "account": { + "$ref": "#/components/schemas/Accounting.V2.GeneralLedgerAccount" + }, + "debit": { + "type": "number", + "format": "decimal" + }, + "credit": { + "type": "number", + "format": "decimal" + }, + "memo": { + "type": "string", + "nullable": true + }, + "transaction": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryTransaction" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "vendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "inventoryLocation": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "job": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NumberFieldResponse" + } + ], + "nullable": true + }, + "customerLocation": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "paymentType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "project": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NumberFieldResponse" + } + ], + "nullable": true + }, + "serviceAgreement": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NumberFieldResponse" + } + ], + "nullable": true + }, + "appliedTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryTransaction" + } + ], + "nullable": true + }, + "sku": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JournalEntrySku" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntryTransaction": { + "required": [ + "id", + "type" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryTransactionType" + }, + "refNumber": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.NumberFieldResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "number": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntrySku": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JournalEntrySkuType" + } + ], + "nullable": true + }, + "code": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntrySkuType": { + "enum": [ + "Service", + "Material", + "Equipment", + "PriceModifier" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Service", + "Material", + "Equipment", + "PriceModifier" + ] + }, + "Accounting.V2.JournalEntryUpdateRequest": { + "type": "object", + "properties": { + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.JournalEntryStatus" + } + ], + "description": "New journal entry status" + }, + "customFields": { + "maxProperties": 5, + "type": "object", + "additionalProperties": { + "type": "string", + "nullable": true + }, + "description": "Custom fields to create or update.\\\n An existing custom field cannot be deleted, but it can be set to null.\\\n Existing fields not specified in this request will not be affected.\\\n Maximum 5 custom fields per journal entry are supported.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.JournalEntryStatus": { + "enum": [ + "Open", + "Closed" + ], + "type": "string", + "description": "Indicates a journal entry's status.", + "x-enumNames": [ + "Open", + "Closed" + ] + }, + "PaginatedResponse_Of_Accounting.V2.DetailedPaymentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.DetailedPaymentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.DetailedPaymentResponse": { + "required": [ + "id", + "modifiedOn", + "createdOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "syncStatus": { + "type": "string", + "nullable": true + }, + "referenceNumber": { + "type": "string", + "nullable": true + }, + "date": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "type": { + "type": "string", + "nullable": true + }, + "typeId": { + "type": "string", + "nullable": true + }, + "total": { + "type": "string", + "nullable": true + }, + "unappliedAmount": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "businessUnit": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.NamedFieldResponse" + } + ], + "nullable": true + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.BatchResponse" + } + ], + "nullable": true + }, + "createdBy": { + "type": "string", + "nullable": true + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.GLAccountResponse" + } + ], + "nullable": true + }, + "appliedTo": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentAppliedResponse" + }, + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.CustomFieldModel" + }, + "nullable": true + }, + "authCode": { + "type": "string", + "nullable": true + }, + "checkNumber": { + "type": "string", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentTransactionType": { + "enum": [ + "Undefined", + "JournalEntry", + "ReceivePayment" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Undefined", + "JournalEntry", + "ReceivePayment" + ] + }, + "Accounting.V2.PaymentResponse": { + "required": [ + "id", + "typeId", + "splits" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "typeId": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + }, + "paidOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "authCode": { + "type": "string", + "nullable": true + }, + "checkNumber": { + "type": "string", + "nullable": true + }, + "exportId": { + "type": "string", + "description": "Gets or sets the identifier when exported.", + "nullable": true + }, + "transactionStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.TransactionProcessingStatus" + } + ], + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.PaymentStatus" + } + ], + "nullable": true + }, + "splits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentSplitApiModel" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.TransactionProcessingStatus": { + "enum": [ + "Success", + "Fail", + "Pending" + ], + "type": "string", + "description": "Indicates a transaction's status.", + "x-enumNames": [ + "Success", + "Fail", + "Pending" + ] + }, + "Accounting.V2.PaymentStatus": { + "enum": [ + "Pending", + "Posted", + "Exported" + ], + "type": "string", + "description": "Indicates a payment's status.", + "x-enumNames": [ + "Pending", + "Posted", + "Exported" + ] + }, + "Accounting.V2.PaymentSplitApiModel": { + "type": "object", + "properties": { + "invoiceId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "amount": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentCreateRequest": { + "required": [ + "typeId", + "splits" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "memo": { + "type": "string", + "nullable": true + }, + "paidOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "authCode": { + "type": "string", + "nullable": true + }, + "checkNumber": { + "type": "string", + "nullable": true + }, + "exportId": { + "type": "string", + "description": "Gets or sets the identifier when exported.", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.PaymentStatus" + } + ], + "nullable": true + }, + "splits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentSplitApiModel" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentUpdateRequest": { + "required": [ + "typeId", + "splits" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "memo": { + "type": "string" + }, + "paidOn": { + "type": "string", + "format": "date-time" + }, + "authCode": { + "type": "string" + }, + "checkNumber": { + "type": "string" + }, + "exportId": { + "type": "string", + "description": "Gets or sets the identifier when exported." + }, + "status": { + "$ref": "#/components/schemas/Accounting.V2.PaymentStatus" + }, + "splits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentSplitApiModel" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentStatusBatchRequest": { + "required": [ + "status", + "paymentIds" + ], + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/Accounting.V2.PaymentStatus" + }, + "paymentIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentTermAPIModel": { + "required": [ + "dueDayType", + "isCustomerDefault", + "isVendorDefault", + "active", + "modifiedOn", + "paymentTermDiscountModel", + "interestSettings" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "dueDayType": { + "$ref": "#/components/schemas/Accounting.V2.PaymentTermDueDayType" + }, + "dueDay": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "isCustomerDefault": { + "type": "boolean" + }, + "isVendorDefault": { + "type": "boolean" + }, + "active": { + "type": "boolean" + }, + "inUse": { + "type": "boolean", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "paymentTermDiscountModel": { + "$ref": "#/components/schemas/Accounting.V2.PaymentTermDiscountAPIModel" + }, + "interestSettings": { + "$ref": "#/components/schemas/Accounting.V2.InterestSettingsAPIModel" + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentTermDueDayType": { + "enum": [ + "NumberOfDays", + "CertainDayOfCurrentMonth", + "CertainDayOfFollowingMonth" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "NumberOfDays", + "CertainDayOfCurrentMonth", + "CertainDayOfFollowingMonth" + ] + }, + "Accounting.V2.PaymentTermDiscountAPIModel": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "discountApplyTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.PaymentTermApplyTo" + } + ], + "nullable": true + }, + "discount": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "discountType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.PaymentTermValueType" + } + ], + "nullable": true + }, + "account": { + "type": "string", + "nullable": true + }, + "applyBy": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.DiscountAppliedBy" + } + ], + "nullable": true + }, + "applyByValue": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.PaymentTermApplyTo": { + "enum": [ + "ApplyToTotalAmount", + "ApplyToSubtotalAmount", + "ApplyToRemainingBalance" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "ApplyToTotalAmount", + "ApplyToSubtotalAmount", + "ApplyToRemainingBalance" + ] + }, + "Accounting.V2.PaymentTermValueType": { + "enum": [ + "Fixed", + "Percent" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Fixed", + "Percent" + ] + }, + "Accounting.V2.DiscountAppliedBy": { + "enum": [ + "NumberOfDays", + "DayOfMonth", + "DayOfFollowingMonth" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "NumberOfDays", + "DayOfMonth", + "DayOfFollowingMonth" + ] + }, + "Accounting.V2.InterestSettingsAPIModel": { + "required": [ + "rateType", + "frequency", + "targetInvoices", + "taskId", + "taskDisplayName" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "rateType": { + "$ref": "#/components/schemas/Accounting.V2.InterestRateType" + }, + "flatRateValue": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "percentageRateValue": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "chargeMethod": { + "oneOf": [ + { + "$ref": "#/components/schemas/Accounting.V2.InterestChargeMethod" + } + ], + "nullable": true + }, + "frequency": { + "$ref": "#/components/schemas/Accounting.V2.InterestChargeFrequency" + }, + "gracePeriod": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "targetInvoices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.InterestTargetInvoice" + } + }, + "taskId": { + "type": "integer", + "format": "int64" + }, + "taskDisplayName": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Accounting.V2.InterestRateType": { + "enum": [ + "Flat", + "Percentage", + "MaxOfFlatAndPercentage" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Flat", + "Percentage", + "MaxOfFlatAndPercentage" + ] + }, + "Accounting.V2.InterestChargeMethod": { + "enum": [ + "PrincipalOnly", + "Total" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "PrincipalOnly", + "Total" + ] + }, + "Accounting.V2.InterestChargeFrequency": { + "enum": [ + "Once", + "Daily", + "Monthly" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Once", + "Daily", + "Monthly" + ] + }, + "Accounting.V2.InterestTargetInvoice": { + "enum": [ + "JobInvoices", + "MembershipInvoices", + "ProgressInvoices", + "PointOfSalesInvoices" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "JobInvoices", + "MembershipInvoices", + "ProgressInvoices", + "PointOfSalesInvoices" + ] + }, + "PaginatedResponse_Of_Accounting.V2.PaymentTermAPIModel": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentTermAPIModel" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "PaginatedResponse_Of_Accounting.V2.PaymentTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.PaymentTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.PaymentTypeResponse": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "PaginatedResponse_Of_Accounting.V2.TaxZoneResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.TaxZoneResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Accounting.V2.TaxZoneResponse": { + "required": [ + "id", + "isTaxRateSeparated", + "isMultipleTaxZone", + "rates", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tax Zone Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Tax Zone Name", + "nullable": true + }, + "color": { + "type": "integer", + "description": "Tax Zone Color", + "format": "int32", + "nullable": true + }, + "isTaxRateSeparated": { + "type": "boolean", + "description": "Tax Zone has separate material and labor taxes" + }, + "isMultipleTaxZone": { + "type": "boolean", + "description": "Tax Zone has multiple rates" + }, + "rates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.TaxRateResponse" + }, + "description": "Tax Zone rates" + }, + "createdOn": { + "type": "string", + "description": "Date which the Tax Zone was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date which the Tax Zone was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Tax zone is active" + } + }, + "additionalProperties": false + }, + "Accounting.V2.TaxRateResponse": { + "required": [ + "taxBaseType", + "taxRate" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tax Rate Id", + "format": "int64", + "nullable": true + }, + "taxName": { + "type": "string", + "description": "Tax Rate Name", + "nullable": true + }, + "taxBaseType": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Accounting.V2.TaxBaseTypeNames" + }, + "description": "Indicates how the tax rate is applied (Subtotal, Labor, Material)" + }, + "taxRate": { + "type": "number", + "description": "Tax rate as a fractional/decimal value", + "format": "decimal" + }, + "salesTaxItem": { + "type": "string", + "description": "The Quickbooks item that relates to this tax rate", + "nullable": true + } + }, + "additionalProperties": false + }, + "Accounting.V2.TaxBaseTypeNames": { + "enum": [ + "Subtotal", + "Labor", + "Material" + ], + "type": "string", + "description": "Indicates the types of tax applied for a given rate", + "x-enumNames": [ + "Subtotal", + "Labor", + "Material" + ] + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/crm-v2.json b/openapi_specs/crm-v2.json new file mode 100644 index 0000000..5b757fe --- /dev/null +++ b/openapi_specs/crm-v2.json @@ -0,0 +1,11118 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "CRM", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/crm/v2" + } + ], + "paths": { + "/tenant/{tenant}/booking-provider-tags": { + "post": { + "tags": [ + "BookingProviderTags" + ], + "summary": "Create a booking provider tag", + "description": "Create a booking provider tag", + "operationId": "BookingProviderTags_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.CreateBookingProviderTagRequest" + }, + "example": { + "tagName": "string", + "description": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.CreateBookingProviderTagResponse" + }, + "example": { + "id": 0, + "tagName": "string", + "description": "string", + "type": {}, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "BookingProviderTags" + ], + "summary": "Gets a list of booking provider tags", + "description": "Gets a list of booking provider tags", + "operationId": "BookingProviderTags_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "name", + "in": "query", + "description": "Name of the booking provider tag", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.GetBookingProviderTagResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "tagName": "string", + "description": "string", + "type": {}, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/booking-provider-tags/{id}": { + "get": { + "tags": [ + "BookingProviderTags" + ], + "summary": "Gets a single booking provider tag by ID", + "description": "Gets a single booking provider tag by ID", + "operationId": "BookingProviderTags_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.GetBookingProviderTagResponse" + }, + "example": { + "id": 0, + "tagName": "string", + "description": "string", + "type": {}, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "BookingProviderTags" + ], + "summary": "Update a booking provider tag", + "description": "Update a booking provider tag", + "operationId": "BookingProviderTags_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.UpdateBookingProviderTagRequest" + }, + "example": { + "tagName": "string", + "description": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.BookingProviderTagResponse" + }, + "example": { + "id": 0, + "tagName": "string", + "description": "string", + "type": {}, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/bookings/{id}": { + "get": { + "tags": [ + "Bookings" + ], + "summary": "Gets a booking by ID", + "description": "Gets a booking by ID", + "operationId": "Bookings_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.BookingResponse" + }, + "example": { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/bookings": { + "get": { + "tags": [ + "Bookings" + ], + "summary": "Gets a list of bookings", + "description": "Gets a list of bookings", + "operationId": "Bookings_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "externalId", + "in": "query", + "description": "Filters by booking's external ID", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.BookingResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/bookings/{id}/contacts": { + "get": { + "tags": [ + "Bookings" + ], + "summary": "Get a list of contacts for a booking", + "description": "Get a list of contacts for a booking", + "operationId": "Bookings_GetContactList", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.BookingContactResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}": { + "get": { + "tags": [ + "Bookings" + ], + "summary": "Gets a booking by ID for a booking provider", + "description": "Gets a booking by ID for a booking provider", + "operationId": "Bookings_GetForProvider", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.BookingResponse" + }, + "example": { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Bookings" + ], + "summary": "Updates a booking for a booking provider", + "description": "Updates a booking for a booking provider", + "operationId": "Bookings_Update", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.UpdateBookingRequest" + }, + "example": { + "source": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "externalId": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.BookingResponse" + }, + "example": { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/booking-provider/{booking_provider}/bookings": { + "get": { + "tags": [ + "Bookings" + ], + "summary": "Gets a list of bookings for a booking provider", + "description": "Gets a list of bookings for a booking provider", + "operationId": "Bookings_GetList2", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "externalId", + "in": "query", + "description": "Filters by booking's external ID", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.BookingResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Bookings" + ], + "summary": "Creates a booking for a booking provider", + "description": "Creates a booking for a booking provider", + "operationId": "Bookings_Create", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.CreateBookingRequest" + }, + "example": { + "source": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "contacts": [ + { + "type": "Phone", + "value": "string", + "memo": "string" + } + ], + "customerType": "string", + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "externalId": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.BookingResponse" + }, + "example": { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}/contacts": { + "post": { + "tags": [ + "Bookings" + ], + "summary": "Creates a contact on the specified booking for a booking provider", + "description": "Creates a contact on the specified booking for a booking provider", + "operationId": "Bookings_CreateContact", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.ContactCreateRequest" + }, + "example": { + "type": "string", + "value": "string", + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.BookingContactResponse" + }, + "example": { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "Bookings" + ], + "summary": "Get a list of contacts for a booking for a booking provider", + "description": "Get a list of contacts for a booking for a booking provider", + "operationId": "Bookings_GetContactList2", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.BookingContactResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}/contacts/{contactId}": { + "patch": { + "tags": [ + "Bookings" + ], + "summary": "Updates a single booking contact for a booking provider", + "description": "Updates a single booking contact for a booking provider", + "operationId": "Bookings_UpdateBookingContact", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "contactId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.UpdateBookingContactRequest" + }, + "example": { + "type": "Phone", + "value": "string", + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.UpdateBookingContactRequest" + }, + "example": { + "type": "Phone", + "value": "string", + "memo": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Booking or Contact was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Bookings" + ], + "summary": "Removes a contact from a booking for a booking provider", + "description": "Removes a contact from a booking for a booking provider", + "operationId": "Bookings_DeleteContact", + "parameters": [ + { + "name": "booking_provider", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "contactId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/tags": { + "put": { + "tags": [ + "BulkTags" + ], + "summary": "Add multiple tags to more than 1 customer", + "description": "Add multiple tags to more than 1 customer", + "operationId": "BulkTags_AddTags", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.AddBulkTagsRequest" + }, + "example": { + "customerIds": [ + 0 + ], + "tagTypeIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "BulkTags" + ], + "summary": "Remove multiple tags to more than 1 customer", + "description": "Remove multiple tags to more than 1 customer", + "operationId": "BulkTags_RemoveTags", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.RemoveBulkTagsRequest" + }, + "example": { + "customerIds": [ + 0 + ], + "tagTypeIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/customers/{id}": { + "get": { + "tags": [ + "Customers" + ], + "summary": "Gets a Customer specified by ID", + "description": "Gets a Customer specified by ID", + "operationId": "Customers_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "type": {}, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "balance": 0, + "tagTypeIds": [ + 0 + ], + "doNotMail": true, + "doNotService": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Customers" + ], + "summary": "Update a customer", + "description": "Update a customer", + "operationId": "Customers_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.UpdateCustomerRequest" + }, + "example": { + "name": "string", + "type": {}, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "doNotMail": true, + "doNotService": true, + "active": true, + "tagTypeIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "type": {}, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "balance": 0, + "tagTypeIds": [ + 0 + ], + "doNotMail": true, + "doNotService": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/customers": { + "get": { + "tags": [ + "Customers" + ], + "summary": "Gets a list of Customers", + "description": "Gets a list of Customers", + "operationId": "Customers_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Returns specific customer records by customer ID.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customer records created before the requested date (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customer records created on or after the requested date (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customer records modified before the requested date (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customer records modified after the requested date (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "excludeAccountingChangesFromModifiedDateRange", + "in": "query", + "description": "Excludes accounting changes such as balance adjustments from the modified date range.", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Returns customer records by name.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "street", + "in": "query", + "description": "Returns customer records by street.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "unit", + "in": "query", + "description": "Returns customer records by unit.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "city", + "in": "query", + "description": "Returns customer records by city.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "state", + "in": "query", + "description": "Returns customer records by state.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "zip", + "in": "query", + "description": "Returns customer records by zip.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "country", + "in": "query", + "description": "Returns customer records by country.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "latitude", + "in": "query", + "description": "Format - double. Returns customer records by latitude.", + "schema": { + "type": "number", + "format": "double", + "nullable": true + } + }, + { + "name": "longitude", + "in": "query", + "description": "Format - double. Returns customer records by longitude.", + "schema": { + "type": "number", + "format": "double", + "nullable": true + } + }, + { + "name": "phone", + "in": "query", + "description": "Returns customer records by phone number of contacts.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Returns customer records by active status (only active items will be returned by default).\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Returns customer records with external data for a particular GUID", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.Customers.CustomerResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "type": {}, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "balance": 0, + "tagTypeIds": [ + 0 + ], + "doNotMail": true, + "doNotService": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Customers" + ], + "summary": "Creates a New Customer", + "description": "Creates a New Customer", + "operationId": "Customers_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CreateCustomerRequest" + }, + "example": { + "name": "string", + "type": {}, + "doNotMail": true, + "doNotService": true, + "locations": [ + { + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "contacts": [ + { + "type": {}, + "value": "string", + "memo": "string" + } + ], + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "tagTypeIds": [ + 0 + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + ], + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "contacts": [ + { + "type": {}, + "value": "string", + "memo": "string" + } + ], + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "tagTypeIds": [ + 0 + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CreatedCustomerResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "type": {}, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "balance": 0, + "tagTypeIds": [ + 0 + ], + "doNotMail": true, + "doNotService": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "locations": [ + { + "taxZoneId": 0, + "id": 0, + "customerId": 0, + "active": true, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "zoneId": 0, + "tagTypeIds": [ + 0 + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "contacts": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string" + } + ] + } + ], + "contacts": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/customers/{id}/notes": { + "get": { + "tags": [ + "Customers" + ], + "summary": "Gets a list of notes for a customer", + "description": "Gets a list of notes for a customer", + "operationId": "Customers_GetNotes", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.NoteResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Customers" + ], + "summary": "Creates a New Note", + "description": "Creates a New Note", + "operationId": "Customers_CreateNote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.CustomerNoteCreateRequest" + }, + "example": { + "text": "string", + "pinToTop": true, + "addToLocations": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.NoteResponse" + }, + "example": { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/customers/{id}/contacts": { + "get": { + "tags": [ + "Customers" + ], + "summary": "Gets a list of contacts for the specified customer", + "description": "Gets a list of contacts for the specified customer", + "operationId": "Customers_GetContactList", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.Customers.CustomerContactWithModifiedOnResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "modifiedOn": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Customers" + ], + "summary": "Creates a contact on the customer", + "description": "Creates a contact on the customer", + "operationId": "Customers_CreateContact", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CreateCustomerContactRequest" + }, + "example": { + "type": {}, + "value": "string", + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerContactWithModifiedOnResponse" + }, + "example": { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "modifiedOn": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/customers/{id}/contacts/{contactId}": { + "delete": { + "tags": [ + "Customers" + ], + "summary": "Removes a contact from a customer", + "description": "Removes a contact from a customer", + "operationId": "Customers_DeleteContact", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "contactId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Customers" + ], + "summary": "Updates a contact on the customer", + "description": "Updates a contact on the customer", + "operationId": "Customers_UpdateContact", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "contactId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.UpdateCustomerContactRequest" + }, + "example": { + "type": {}, + "value": "string", + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerContactWithModifiedOnResponse" + }, + "example": { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "modifiedOn": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/customers/contacts": { + "get": { + "tags": [ + "Customers" + ], + "summary": "Gets a list of contacts for a specific modified-on date range or by their Customer IDs. Either CustomerIds, modifiedOn or modifiedOnOrAfter parameter must be specified", + "description": "Gets a list of contacts for a specific modified-on date range or by their Customer IDs. Either CustomerIds, modifiedOn or modifiedOnOrAfter parameter must be specified", + "operationId": "Customers_GetModifiedContactsList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on/after certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "customerIds", + "in": "query", + "description": "Returns specific contact records by customer IDs.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.Customers.CustomerContactWithModifiedOnAndCustomerIdResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "modifiedOn": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "customerId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/bookings": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for bookings", + "description": "Provides export feed for bookings", + "operationId": "ExportBookings_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Crm.V2.ExportBookingResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "source": "string", + "createdOn": "string", + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "customerType": {}, + "start": "string", + "summary": "string", + "campaignId": 0, + "businessUnitId": 0, + "isFirstTimeClient": true, + "uploadedImages": [ + "string" + ], + "isSendConfirmationEmail": true, + "status": {}, + "dismissingReasonId": 0, + "jobId": 0, + "externalId": "string", + "priority": {}, + "jobTypeId": 0, + "bookingProviderId": 0, + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/customers/contacts": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for customer contacts", + "description": "Provides export feed for customer contacts", + "operationId": "ExportContacts_CustomersContacts", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Crm.V2.ExportCustomerContactResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "modifiedOn": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "customerId": 0, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/locations/contacts": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for locations contacts", + "description": "Provides export feed for locations contacts", + "operationId": "ExportContacts_LocationsContacts", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Crm.V2.ExportLocationContactResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "modifiedOn": "string", + "locationId": 0, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/customers": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for customers", + "description": "Provides export feed for customers", + "operationId": "ExportCustomers_GetCustomers", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Crm.V2.ExportCustomerResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "type": {}, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "balance": 0, + "tagTypeIds": [ + 0 + ], + "doNotMail": true, + "doNotService": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/leads": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for leads", + "description": "Provides export feed for leads", + "operationId": "ExportLeads_Leads", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Crm.V2.ExportLeadsResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "status": {}, + "customerId": 0, + "locationId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "summary": "string", + "callReasonId": 0, + "callId": 0, + "bookingId": 0, + "manualCallId": 0, + "followUpDate": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "dismissingReasonId": 0, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/locations": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for appointments", + "description": "Provides export feed for appointments", + "operationId": "ExportLocations_Locations", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Crm.V2.ExportLocationsResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "taxZoneId": 0, + "id": 0, + "customerId": 0, + "active": true, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "zoneId": 0, + "tagTypeIds": [ + 0 + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/leads/{id}": { + "get": { + "tags": [ + "Leads" + ], + "summary": "Gets a lead specified by ID", + "description": "Gets a lead specified by ID", + "operationId": "Leads_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LeadResponse" + }, + "example": { + "id": 0, + "status": {}, + "customerId": 0, + "locationId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "summary": "string", + "callReasonId": 0, + "callId": 0, + "bookingId": 0, + "manualCallId": 0, + "followUpDate": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "dismissingReasonId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Lead not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Leads" + ], + "summary": "Updates a lead", + "description": "Updates a lead", + "operationId": "Leads_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LeadUpdateRequest" + }, + "example": { + "campaignId": 0, + "priority": {}, + "businessUnitId": 0, + "jobTypeId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LeadResponse" + }, + "example": { + "id": 0, + "status": {}, + "customerId": 0, + "locationId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "summary": "string", + "callReasonId": 0, + "callId": 0, + "bookingId": 0, + "manualCallId": 0, + "followUpDate": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "dismissingReasonId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/leads": { + "get": { + "tags": [ + "Leads" + ], + "summary": "Gets a list of leads", + "description": "Gets a list of leads", + "operationId": "Leads_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Filters by associated customer", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "isProspect", + "in": "query", + "description": "Allows to filter leads where the customer doesn't have a job, or there is no customer.\nPossible values are:\nnull (return all leads);\ntrue (return leads without customer/jobs);\nfalse (return leads with customer and job)", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "withoutCustomer", + "in": "query", + "description": "Allows to filter leads that don't have a customer or location record associated to it.\nPossible values are:\nnull (return all leads);\ntrue (return leads without customers or locations only);\nfalse (return leads with customers and locations only)", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filters by status\\\nValues: [Open, Dismissed, Converted]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.LeadStatus" + } + ], + "nullable": true + } + }, + { + "name": "customerCity", + "in": "query", + "description": "Filters by customer city", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerState", + "in": "query", + "description": "Filters by customer state", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerZip", + "in": "query", + "description": "Filters by customer zip", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerCreatedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customers who were created on or before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "customerCreatedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customers who were created after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "customerModifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns customers who were modified on or before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.LeadResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "status": {}, + "customerId": 0, + "locationId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "summary": "string", + "callReasonId": 0, + "callId": 0, + "bookingId": 0, + "manualCallId": 0, + "followUpDate": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "dismissingReasonId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Leads" + ], + "summary": "Creates a lead", + "description": "Creates a lead", + "operationId": "Leads_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LeadCreateRequest" + }, + "example": { + "customerId": 0, + "locationId": 0, + "campaignId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "summary": "string", + "tagTypeIds": [ + 0 + ], + "priority": {}, + "callReasonId": 0, + "followUpDate": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LeadResponse" + }, + "example": { + "id": 0, + "status": {}, + "customerId": 0, + "locationId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "summary": "string", + "callReasonId": 0, + "callId": 0, + "bookingId": 0, + "manualCallId": 0, + "followUpDate": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "dismissingReasonId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/leads/{id}/follow-up": { + "post": { + "tags": [ + "Leads" + ], + "summary": "Creates a follow-up", + "description": "Creates a follow-up", + "operationId": "Leads_CreateFollowUp", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.CreateFollowUpRequest" + }, + "example": { + "followUpDate": "string", + "text": "string", + "pinToTop": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.FollowUpResponse" + }, + "example": { + "leadId": 0, + "followUpDate": "string", + "text": "string", + "pinToTop": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/leads/{id}/notes": { + "get": { + "tags": [ + "Leads" + ], + "summary": "Gets notes for a lead", + "description": "Gets notes for a lead", + "operationId": "Leads_GetNotes", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.NoteResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Leads" + ], + "summary": "Creates a note on the specified lead", + "description": "Creates a note on the specified lead", + "operationId": "Leads_CreateNote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LeadNoteCreateRequest" + }, + "example": { + "text": "string", + "pinToTop": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.NoteResponse" + }, + "example": { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Lead not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/leads/{id}/dismiss": { + "post": { + "tags": [ + "Leads" + ], + "summary": "Dismisses a lead specified by ID", + "description": "Dismisses a lead specified by ID", + "operationId": "Leads_Dismiss", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.DismissLeadRequest" + }, + "example": { + "dismissingReasonId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Lead not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/leads/form": { + "post": { + "tags": [ + "Leads" + ], + "summary": "Submits a lead form", + "description": "Submits a lead form", + "operationId": "Leads_SubmitLeadForm", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.SubmitLeadFormRequest" + }, + "example": { + "name": "string", + "email": "string", + "phoneNumber": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "summary": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.SubmitLeadFormResponse" + }, + "example": { + "leadId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations/{id}": { + "get": { + "tags": [ + "Locations" + ], + "summary": "Gets a location specified by ID", + "description": "Gets a location specified by ID", + "operationId": "Locations_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Locations.LocationResponse" + }, + "example": { + "id": 0, + "customerId": 0, + "active": true, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "zoneId": 0, + "tagTypeIds": [ + 0 + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "taxZoneId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Location not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Locations" + ], + "summary": "Updates a location", + "description": "Updates a location", + "operationId": "Locations_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Locations.UpdateLocationRequest" + }, + "example": { + "customerId": 0, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "active": true, + "taxZoneId": 0, + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "tagTypeIds": [ + 0 + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Locations.LocationResponse" + }, + "example": { + "id": 0, + "customerId": 0, + "active": true, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "zoneId": 0, + "tagTypeIds": [ + 0 + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "taxZoneId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Location not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Customer/Tax Zone not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations": { + "post": { + "tags": [ + "Locations" + ], + "summary": "Creates a new location", + "description": "Creates a new location", + "operationId": "Locations_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Locations.CreateLocationRequest" + }, + "example": { + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "contacts": [ + { + "type": {}, + "value": "string", + "memo": "string" + } + ], + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "tagTypeIds": [ + 0 + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "customerId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.Locations.CreateLocationResponse" + }, + "example": { + "taxZoneId": 0, + "id": 0, + "customerId": 0, + "active": true, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "zoneId": 0, + "tagTypeIds": [ + 0 + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "contacts": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Unknown customer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "Locations" + ], + "summary": "Gets a list of locations", + "description": "Gets a list of locations", + "operationId": "Locations_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Filters by customer's name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Filters by customer ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "street", + "in": "query", + "description": "Filters by customer's street", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "unit", + "in": "query", + "description": "Filters by customer's unit", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "city", + "in": "query", + "description": "Filters by customer's city", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "state", + "in": "query", + "description": "Filters by customer's state", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "zip", + "in": "query", + "description": "Filters by customer's zip", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "country", + "in": "query", + "description": "Filters by customer's country", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "latitude", + "in": "query", + "description": "Format - double. Filters by customer's latitude", + "schema": { + "type": "number", + "format": "double", + "nullable": true + } + }, + { + "name": "longitude", + "in": "query", + "description": "Format - double. Filters by customer's longitude", + "schema": { + "type": "number", + "format": "double", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Returns location records with external data for a particular GUID", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.Locations.LocationResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "customerId": 0, + "active": true, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "mergedToId": 0, + "zoneId": 0, + "tagTypeIds": [ + 0 + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "taxZoneId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations/{id}/notes": { + "get": { + "tags": [ + "Locations" + ], + "summary": "Gets a list of notes on the specified location", + "description": "Gets a list of notes on the specified location", + "operationId": "Locations_GetNotes", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.NoteResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Locations" + ], + "summary": "Creates a note on the specified location", + "description": "Creates a note on the specified location", + "operationId": "Locations_CreateNote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LocationNoteCreateRequest" + }, + "example": { + "text": "string", + "pinToTop": true, + "addToCustomer": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.NoteResponse" + }, + "example": { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Location not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations/{id}/contacts": { + "get": { + "tags": [ + "Locations" + ], + "summary": "Gets a list of contacts for the specified location", + "description": "Gets a list of contacts for the specified location", + "operationId": "Locations_GetContactList", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.LocationContactResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Locations" + ], + "summary": "Creates a contact on the location", + "description": "Creates a contact on the location", + "operationId": "Locations_CreateContact", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LocationContactCreateRequest" + }, + "example": { + "type": {}, + "value": "string", + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LocationContactResponse" + }, + "example": { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations/contacts": { + "get": { + "tags": [ + "Locations" + ], + "summary": "Gets a list of contacts for a specific ModifiedOn date range or by their Location IDs. Either LocationIds, modifiedOn or modifiedOnOrAfter parameter must be specified.", + "description": "Gets a list of contacts for a specific ModifiedOn date range or by their Location IDs. Either LocationIds, modifiedOn or modifiedOnOrAfter parameter must be specified.", + "operationId": "Locations_GetLocationsContactsList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on/after certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "locationIds", + "in": "query", + "description": "Returns specific contact records by location IDs.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.LocationsContactResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "modifiedOn": "string", + "locationId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations/{id}/contacts/{contactId}": { + "delete": { + "tags": [ + "Locations" + ], + "summary": "Removes a contact from a location", + "description": "Removes a contact from a location", + "operationId": "Locations_DeleteContact", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "contactId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Locations" + ], + "summary": "Updates a contact on the location", + "description": "Updates a contact on the location", + "operationId": "Locations_UpdateContact", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "contactId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LocationContactUpdateRequest" + }, + "example": { + "type": {}, + "value": "string", + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Crm.V2.LocationContactResponse" + }, + "example": { + "id": 0, + "type": {}, + "value": "string", + "memo": "string", + "phoneSettings": { + "phoneNumber": "string", + "doNotText": true + }, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Crm.V2.CreateBookingProviderTagResponse": { + "required": [ + "id", + "tagName", + "description", + "type", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "id of booking provider tag", + "format": "int64" + }, + "tagName": { + "type": "string", + "description": "Name of tag" + }, + "description": { + "type": "string", + "description": "Description of tag" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.BookingAgentTagType" + } + ], + "description": "Type of tag" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the booking provider tag was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when the booking provider tag was modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Crm.V2.BookingAgentTagType": { + "enum": [ + "V1Api", + "V2Api" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "V1Api", + "V2Api" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "Crm.V2.CreateBookingProviderTagRequest": { + "required": [ + "tagName", + "description" + ], + "type": "object", + "properties": { + "tagName": { + "type": "string", + "description": "Name of tag" + }, + "description": { + "type": "string", + "description": "Description of tag" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.GetBookingProviderTagResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.GetBookingProviderTagResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.GetBookingProviderTagResponse": { + "required": [ + "id", + "tagName", + "description", + "type", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "id of booking provider tag", + "format": "int64" + }, + "tagName": { + "type": "string", + "description": "Name of tag" + }, + "description": { + "type": "string", + "description": "Description of tag" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.BookingAgentTagType" + } + ], + "description": "Type of tag" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the booking provider tag was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when the booking provider tag was modified", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Crm.V2.BookingProviderTagResponse": { + "required": [ + "id", + "tagName", + "description", + "type", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "id of booking provider tag", + "format": "int64" + }, + "tagName": { + "type": "string", + "description": "Name of tag" + }, + "description": { + "type": "string", + "description": "Description of tag" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.BookingAgentTagType" + } + ], + "description": "Type of tag" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the booking provider tag was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when the booking provider tag was modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Crm.V2.UpdateBookingProviderTagRequest": { + "type": "object", + "properties": { + "tagName": { + "type": "string", + "description": "Name of tag" + }, + "description": { + "type": "string", + "description": "Description of tag" + } + }, + "additionalProperties": false + }, + "Crm.V2.BookingResponse": { + "required": [ + "id", + "source", + "createdOn", + "name", + "start", + "status", + "externalId", + "bookingProviderId", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the booking", + "format": "int64" + }, + "source": { + "type": "string", + "description": "Source of the booking" + }, + "createdOn": { + "type": "string", + "description": "when the booking was created", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Name of the booking's customer" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.AddressModel" + } + ], + "description": "Address of the booking", + "nullable": true + }, + "customerType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Type of customer (Residential/Commercial)", + "nullable": true + }, + "start": { + "type": "string", + "description": "Booking's start date time, in UTC", + "format": "date-time" + }, + "summary": { + "type": "string", + "description": "Booking summary", + "nullable": true + }, + "campaignId": { + "type": "integer", + "description": "ID of the booking's campaign", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the booking's business unit", + "format": "int64", + "nullable": true + }, + "isFirstTimeClient": { + "type": "boolean", + "description": "Returns true if first time client", + "nullable": true + }, + "uploadedImages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Uploaded images", + "nullable": true + }, + "isSendConfirmationEmail": { + "type": "boolean", + "description": "Returns true if customer should receive email when booking is created", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.BookingStatus" + } + ], + "description": "Booking status" + }, + "dismissingReasonId": { + "type": "integer", + "description": "ID of the reason booking was dismissed", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "ID of the job booked from the booking", + "format": "int64", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External ID of booking" + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Booking priority", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "ID of the booking's job type", + "format": "int64", + "nullable": true + }, + "bookingProviderId": { + "type": "integer", + "description": "Booking provider id", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "When the booking was modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Crm.V2.AddressModel": { + "required": [ + "street", + "city", + "state", + "zip", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Booking address street" + }, + "unit": { + "type": "string", + "description": "Booking address unit", + "nullable": true + }, + "city": { + "type": "string", + "description": "Booking address city" + }, + "state": { + "type": "string", + "description": "Booking address state" + }, + "zip": { + "type": "string", + "description": "Booking address zip code" + }, + "country": { + "type": "string", + "description": "Booking address country" + } + }, + "additionalProperties": false + }, + "Crm.V2.CustomerType": { + "enum": [ + "Residential", + "Commercial" + ], + "type": "string", + "description": "Indicates a customer's type.", + "x-enumNames": [ + "Residential", + "Commercial" + ] + }, + "Crm.V2.BookingStatus": { + "enum": [ + "New", + "Converted", + "Dismissed", + "Accepted" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "New", + "Converted", + "Dismissed", + "Accepted" + ] + }, + "Crm.V2.Priority": { + "enum": [ + "Low", + "Normal", + "High", + "Urgent" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Low", + "Normal", + "High", + "Urgent" + ] + }, + "PaginatedResponse_Of_Crm.V2.BookingResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.BookingResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "PaginatedResponse_Of_Crm.V2.BookingContactResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.BookingContactResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.BookingContactResponse": { + "required": [ + "id", + "type", + "value", + "memo", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the contact was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Crm.V2.ContactType": { + "enum": [ + "Phone", + "Phone", + "Email", + "Fax", + "MobilePhone" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Phone", + "LandlinePhone", + "Email", + "Fax", + "MobilePhone" + ] + }, + "Crm.V2.CreateBookingRequest": { + "required": [ + "source", + "name", + "summary", + "isFirstTimeClient", + "externalId" + ], + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Source of the booking" + }, + "name": { + "type": "string", + "description": "Name of the customer" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.AddressModel" + } + ], + "description": "Address of the booking", + "nullable": true + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.BookingContactModel" + }, + "description": "Contacts for the booking", + "nullable": true + }, + "customerType": { + "type": "string", + "description": "Type of the customer (Residential/Commercial)", + "nullable": true + }, + "start": { + "type": "string", + "description": "Booking's start Date(time) in UTC", + "format": "date-time", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Summary of the booking" + }, + "campaignId": { + "type": "integer", + "description": "ID of the booking's campaign", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the booking's business unit", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "ID of the booking's job type", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Booking priority", + "nullable": true + }, + "isFirstTimeClient": { + "type": "boolean", + "description": "True if first time client" + }, + "uploadedImages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Uploaded images", + "nullable": true + }, + "isSendConfirmationEmail": { + "type": "boolean", + "description": "Returns true if customer should receive email when booking is created", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External ID of booking" + } + }, + "additionalProperties": false + }, + "Crm.V2.BookingContactModel": { + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/Crm.V2.ContactType" + }, + "value": { + "type": "string" + }, + "memo": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.UpdateBookingRequest": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "Source of the booking" + }, + "name": { + "type": "string", + "description": "Name of the booking's customer" + }, + "address": { + "$ref": "#/components/schemas/Crm.V2.AddressPatchModel" + }, + "customerType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Type of customer (Residential/Commercial)" + }, + "start": { + "type": "string", + "description": "Booking's start date time, in UTC", + "format": "date-time" + }, + "summary": { + "type": "string", + "description": "Booking summary" + }, + "campaignId": { + "type": "integer", + "description": "ID of the booking's campaign", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the booking's business unit", + "format": "int64" + }, + "jobTypeId": { + "type": "integer", + "description": "ID of the booking's job type", + "format": "int64" + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Booking priority" + }, + "isFirstTimeClient": { + "type": "boolean", + "description": "True if first time client" + }, + "uploadedImages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Uploaded images" + }, + "externalId": { + "type": "string", + "description": "External ID of booking" + } + }, + "additionalProperties": false + }, + "Crm.V2.AddressPatchModel": { + "required": [ + "street", + "unit", + "city", + "state", + "zip", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Booking address street" + }, + "unit": { + "type": "string", + "description": "Booking address unit" + }, + "city": { + "type": "string", + "description": "Booking address city" + }, + "state": { + "type": "string", + "description": "Booking address state" + }, + "zip": { + "type": "string", + "description": "Booking address zip code" + }, + "country": { + "type": "string", + "description": "Booking address country" + } + }, + "additionalProperties": false + }, + "Crm.V2.ContactCreateRequest": { + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.UpdateBookingContactRequest": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/Crm.V2.ContactType" + }, + "value": { + "type": "string" + }, + "memo": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Crm.V2.AddBulkTagsRequest": { + "required": [ + "customerIds", + "tagTypeIds" + ], + "type": "object", + "properties": { + "customerIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of Customer ID(s)" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of TagType ID(s) to add to the customers" + } + }, + "additionalProperties": false, + "description": "Add bulk tags request." + }, + "Crm.V2.RemoveBulkTagsRequest": { + "required": [ + "customerIds", + "tagTypeIds" + ], + "type": "object", + "properties": { + "customerIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of Customer ID(s)" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of TagType ID(s) to add to the customers" + } + }, + "additionalProperties": false, + "description": "Remove bulk tags request." + }, + "Crm.V2.Customers.CustomerResponse": { + "required": [ + "id", + "active", + "name", + "type", + "address", + "customFields", + "balance", + "tagTypeIds", + "doNotMail", + "doNotService", + "createdOn", + "createdById", + "modifiedOn", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the customer", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "False indicates that someone has deactivated the customer record, typically upon merging with another record." + }, + "name": { + "type": "string", + "description": "Name of the customer" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Residential or commercial" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Bill-To address of the customer record" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldModel" + }, + "description": "Customer record’s custom fields" + }, + "balance": { + "type": "number", + "description": "Customer’s account balance", + "format": "decimal" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs associated with the Customer" + }, + "doNotMail": { + "type": "boolean", + "description": "Customer has been flagged as “do not mail”" + }, + "doNotService": { + "type": "boolean", + "description": "Customer has been flagged as “do not service”" + }, + "createdOn": { + "type": "string", + "description": "DateTime (UTC) that customer record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created the record.", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Modified on (UTC) for the record.", + "format": "date-time" + }, + "mergedToId": { + "type": "integer", + "description": "The customer ID of the record that this record was previously merged to.", + "format": "int64", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this Customer,\nwhich corresponds to the application GUID provided in the request." + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.CustomerAddress": { + "required": [ + "street", + "city", + "state", + "zip", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street" + }, + "unit": { + "type": "string", + "description": "Unit", + "nullable": true + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "zip": { + "type": "string", + "description": "Zip" + }, + "country": { + "type": "string", + "description": "Country" + }, + "latitude": { + "type": "number", + "description": "Latitude", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Longitude", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.CustomFieldModel": { + "required": [ + "typeId" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "description": "ID of the custom field", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name/label of the custom field", + "nullable": true + }, + "value": { + "type": "string", + "description": "Value of the custom field", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.ExternalDataModel": { + "required": [ + "key", + "value" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value." + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.Customers.CustomerResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Crm.V2.Customers.CreatedCustomerResponse": { + "required": [ + "id", + "active", + "name", + "type", + "address", + "customFields", + "balance", + "tagTypeIds", + "doNotMail", + "doNotService", + "createdOn", + "createdById", + "modifiedOn", + "externalData", + "locations", + "contacts" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the customer", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "False indicates that someone has deactivated the customer record, typically upon merging with another record." + }, + "name": { + "type": "string", + "description": "Name of the customer" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Residential or commercial" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Bill-To address of the customer record" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldModel" + }, + "description": "Customer record’s custom fields" + }, + "balance": { + "type": "number", + "description": "Customer’s account balance", + "format": "decimal" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs associated with the Customer" + }, + "doNotMail": { + "type": "boolean", + "description": "Customer has been flagged as “do not mail”" + }, + "doNotService": { + "type": "boolean", + "description": "Customer has been flagged as “do not service”" + }, + "createdOn": { + "type": "string", + "description": "DateTime (UTC) that customer record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created the record.", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Modified on (UTC) for the record.", + "format": "date-time" + }, + "mergedToId": { + "type": "integer", + "description": "The customer ID of the record that this record was previously merged to.", + "format": "int64", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this Customer,\nwhich corresponds to the application GUID provided in the request." + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Locations.CreateLocationResponse" + }, + "description": "Locations for the customer" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerContact" + }, + "description": "Contacts for the customer" + } + }, + "additionalProperties": false + }, + "Crm.V2.Locations.CreateLocationResponse": { + "required": [ + "id", + "customerId", + "active", + "name", + "address", + "customFields", + "createdOn", + "createdById", + "modifiedOn", + "tagTypeIds", + "externalData", + "contacts" + ], + "type": "object", + "properties": { + "taxZoneId": { + "type": "integer", + "description": "ID of the location tax zone", + "format": "int64", + "nullable": true + }, + "id": { + "type": "integer", + "description": "ID of the location", + "format": "int64" + }, + "customerId": { + "type": "integer", + "description": "ID of the location’s customer.", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "If false, the record has been deactivated." + }, + "name": { + "type": "string", + "description": "Name of the location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Location’s address" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldModel" + }, + "description": "Location record’s custom fields" + }, + "createdOn": { + "type": "string", + "description": "DateTime (UTC) that location record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created the record.", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Modified On (UTC) for the record.", + "format": "date-time" + }, + "mergedToId": { + "type": "integer", + "description": "Tells you which location record this record was merged into.", + "format": "int64", + "nullable": true + }, + "zoneId": { + "type": "integer", + "description": "ID of the location's Zone", + "format": "int64", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs of the location" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this Location,\nwhich corresponds to the application GUID provided in the request." + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Locations.LocationContact" + } + } + }, + "additionalProperties": false + }, + "Crm.V2.Locations.LocationContact": { + "required": [ + "id", + "type", + "value" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax." + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact." + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.CustomerContact": { + "required": [ + "id", + "type", + "value" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax." + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact." + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.CreateCustomerRequest": { + "required": [ + "name", + "locations", + "address" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the customer" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Residential or commercial", + "nullable": true + }, + "doNotMail": { + "type": "boolean", + "description": "Customer has been flagged as “do not mail”", + "nullable": true + }, + "doNotService": { + "type": "boolean", + "description": "Customer has been flagged as “do not service”", + "nullable": true + }, + "locations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.NewLocation" + }, + "description": "Locations for the customer" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Bill-To address of the customer record" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.NewCustomerContact" + }, + "description": "Contacts for the customer", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel" + }, + "description": "Customer record’s custom fields", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs to be associated with the customer", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this Customer.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.NewLocation": { + "required": [ + "name", + "address" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Address of the location record" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.NewCustomerContact" + }, + "description": "Contacts for the location", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel" + }, + "description": "Location record’s custom fields", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag type ids for the location", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this Location.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.NewCustomerContact": { + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax." + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact." + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.CustomFieldUpdateModel": { + "required": [ + "typeId", + "value" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "description": "ID of the custom field", + "format": "int64" + }, + "value": { + "type": "string", + "description": "Value of the custom field" + } + }, + "additionalProperties": false + }, + "Crm.V2.ExternalDataCreateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.UpdateCustomerRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the customer" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Residential or commercial" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.UpdateCustomerAddress" + } + ], + "description": "Bill-To address of the customer record" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel" + }, + "description": "Customer record’s custom fields" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model." + }, + "doNotMail": { + "type": "boolean", + "description": "Customer has been flagged as “do not mail”" + }, + "doNotService": { + "type": "boolean", + "description": "Customer has been flagged as “do not service”" + }, + "active": { + "type": "boolean", + "description": "Customer has been flagged as “active” ar \"innactive\"" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the Tag Types" + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.UpdateCustomerAddress": { + "required": [ + "street", + "unit", + "city", + "state", + "zip", + "country", + "latitude", + "longitude" + ], + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street" + }, + "unit": { + "type": "string", + "description": "Unit" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "zip": { + "type": "string", + "description": "Zip" + }, + "country": { + "type": "string", + "description": "Country" + }, + "latitude": { + "type": "number", + "description": "Latitude", + "format": "double" + }, + "longitude": { + "type": "number", + "description": "Longitude", + "format": "double" + } + }, + "additionalProperties": false + }, + "Crm.V2.ExternalDataUpdateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "patchMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ExternalDataPatchMode" + } + ], + "description": "External data patch mode.\\\n\"Replace\" (default) replaces all existing keys with new values. If job A has custom data with keys X and Y and this field only contains an item\nwith a key X, then custom data with a key Y on job A will be removed.\\\n\"Merge\" will only replace key X in the example above. Keys with null value will be deleted.", + "nullable": true + }, + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataUpdateModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Crm.V2.ExternalDataPatchMode": { + "enum": [ + "Replace", + "Merge" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Replace", + "Merge" + ] + }, + "Crm.V2.ExternalDataUpdateModel": { + "required": [ + "key" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value.", + "format": "multiline", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.NoteResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.NoteResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.NoteResponse": { + "required": [ + "text", + "isPinned", + "createdById", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Text content of a note" + }, + "isPinned": { + "type": "boolean", + "description": "Whether the note is pinned to the top" + }, + "createdById": { + "type": "integer", + "description": "ID of user who created this note", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) the note was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the note was modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Crm.V2.CustomerNoteCreateRequest": { + "required": [ + "text" + ], + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Text content of customer note" + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin customer note to the top", + "nullable": true + }, + "addToLocations": { + "type": "boolean", + "description": "Whether to add the same note to the customer's active locations", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.Customers.CustomerContactWithModifiedOnResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerContactWithModifiedOnResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.Customers.CustomerContactWithModifiedOnResponse": { + "required": [ + "id", + "type", + "value", + "modifiedOn", + "phoneSettings" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax." + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact." + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Modified On (UTC) for the record", + "format": "date-time" + }, + "phoneSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.PhoneSettings" + } + ], + "description": "Phone settings of the customer contact" + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.PhoneSettings": { + "required": [ + "phoneNumber", + "doNotText" + ], + "type": "object", + "properties": { + "phoneNumber": { + "type": "string", + "description": "Phone Number" + }, + "doNotText": { + "type": "boolean", + "description": "If the phone number has opted-out from notifications." + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.CreateCustomerContactRequest": { + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax" + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact" + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly”", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Customers.UpdateCustomerContactRequest": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax" + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact" + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly”" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.Customers.CustomerContactWithModifiedOnAndCustomerIdResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerContactWithModifiedOnAndCustomerIdResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.Customers.CustomerContactWithModifiedOnAndCustomerIdResponse": { + "required": [ + "modifiedOn", + "phoneSettings", + "id", + "type", + "value", + "customerId" + ], + "type": "object", + "properties": { + "modifiedOn": { + "type": "string", + "description": "Modified On (UTC) for the record", + "format": "date-time" + }, + "phoneSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.PhoneSettings" + } + ], + "description": "Phone settings of the customer contact" + }, + "id": { + "type": "integer", + "description": "ID of the contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax." + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact." + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”", + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Crm.V2.ExportBookingResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExportBookingResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Crm.V2.ExportBookingResponse": { + "required": [ + "id", + "source", + "createdOn", + "name", + "start", + "status", + "externalId", + "bookingProviderId", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the booking", + "format": "int64" + }, + "source": { + "type": "string", + "description": "Source of the booking" + }, + "createdOn": { + "type": "string", + "description": "when the booking was created", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Name of the booking's customer" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.AddressModel" + } + ], + "description": "Address of the booking", + "nullable": true + }, + "customerType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Type of customer (Residential/Commercial)", + "nullable": true + }, + "start": { + "type": "string", + "description": "Booking's start date time, in UTC", + "format": "date-time" + }, + "summary": { + "type": "string", + "description": "Booking summary", + "nullable": true + }, + "campaignId": { + "type": "integer", + "description": "ID of the booking's campaign", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the booking's business unit", + "format": "int64", + "nullable": true + }, + "isFirstTimeClient": { + "type": "boolean", + "description": "Returns true if first time client", + "nullable": true + }, + "uploadedImages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Uploaded images", + "nullable": true + }, + "isSendConfirmationEmail": { + "type": "boolean", + "description": "Returns true if customer should receive email when booking is created", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.BookingStatus" + } + ], + "description": "Booking status" + }, + "dismissingReasonId": { + "type": "integer", + "description": "ID of the reason booking was dismissed", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "ID of the job booked from the booking", + "format": "int64", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External ID of booking" + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Booking priority", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "ID of the booking's job type", + "format": "int64", + "nullable": true + }, + "bookingProviderId": { + "type": "integer", + "description": "Booking provider id", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "When the booking was modified", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Crm.V2.ExportCustomerContactResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExportCustomerContactResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Crm.V2.ExportCustomerContactResponse": { + "required": [ + "modifiedOn", + "phoneSettings", + "id", + "type", + "value", + "customerId", + "active" + ], + "type": "object", + "properties": { + "modifiedOn": { + "type": "string", + "description": "Modified On (UTC) for the record", + "format": "date-time" + }, + "phoneSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.PhoneSettings" + } + ], + "description": "Phone settings of the customer contact" + }, + "id": { + "type": "integer", + "description": "ID of the contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Landline, mobile, e-mail, or fax." + }, + "value": { + "type": "string", + "description": "The email, phone number, or fax number for the contact." + }, + "memo": { + "type": "string", + "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”", + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Crm.V2.ExportLocationContactResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExportLocationContactResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Crm.V2.ExportLocationContactResponse": { + "required": [ + "id", + "type", + "value", + "phoneSettings", + "modifiedOn", + "locationId", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact", + "nullable": true + }, + "phoneSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.PhoneSettings" + } + ], + "description": "Phone settings of the location contact" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the contact was last modified", + "format": "date-time" + }, + "locationId": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Crm.V2.ExportCustomerResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExportCustomerResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Crm.V2.ExportCustomerResponse": { + "required": [ + "id", + "active", + "name", + "type", + "address", + "customFields", + "balance", + "tagTypeIds", + "doNotMail", + "doNotService", + "createdOn", + "createdById", + "modifiedOn", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the customer", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "False indicates that someone has deactivated the customer record, typically upon merging with another record." + }, + "name": { + "type": "string", + "description": "Name of the customer" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.CustomerType" + } + ], + "description": "Residential or commercial" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Bill-To address of the customer record" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldModel" + }, + "description": "Customer record’s custom fields" + }, + "balance": { + "type": "number", + "description": "Customer’s account balance", + "format": "decimal" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs associated with the Customer" + }, + "doNotMail": { + "type": "boolean", + "description": "Customer has been flagged as “do not mail”" + }, + "doNotService": { + "type": "boolean", + "description": "Customer has been flagged as “do not service”" + }, + "createdOn": { + "type": "string", + "description": "DateTime (UTC) that customer record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created the record.", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Modified on (UTC) for the record.", + "format": "date-time" + }, + "mergedToId": { + "type": "integer", + "description": "The customer ID of the record that this record was previously merged to.", + "format": "int64", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this Customer,\nwhich corresponds to the application GUID provided in the request." + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Crm.V2.ExportLeadsResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExportLeadsResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Crm.V2.ExportLeadsResponse": { + "required": [ + "id", + "status", + "priority", + "campaignId", + "createdOn", + "createdById", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the lead", + "format": "int64" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.LeadStatus" + } + ], + "description": "Status of the lead" + }, + "customerId": { + "type": "integer", + "description": "Customer associated to the lead", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "Location associated to the lead", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit associated to the lead", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type associated to the lead", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Priority of the lead" + }, + "campaignId": { + "type": "integer", + "description": "Campaign associated to the lead", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Summary of the lead", + "nullable": true + }, + "callReasonId": { + "type": "integer", + "description": "Call reason ID used to classify the lead by the user", + "format": "int64", + "nullable": true + }, + "callId": { + "type": "integer", + "description": "Call ID used to classify the lead", + "format": "int64", + "nullable": true + }, + "bookingId": { + "type": "integer", + "description": "Booking ID used to classify the lead", + "format": "int64", + "nullable": true + }, + "manualCallId": { + "type": "integer", + "description": "Manual Call ID used to classify the lead", + "format": "int64", + "nullable": true + }, + "followUpDate": { + "type": "string", + "description": "The next time someone is supposed to follow up on this lead", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the lead was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created this lead", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "When the lead was modified", + "format": "date-time" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of IDs of tags on the lead", + "nullable": true + }, + "dismissingReasonId": { + "type": "integer", + "description": "ID of the reason booking was dismissed", + "format": "int64", + "nullable": true + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Crm.V2.LeadStatus": { + "enum": [ + "Open", + "Dismissed", + "Converted" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Open", + "Dismissed", + "Converted" + ] + }, + "ExportResponse_Of_Crm.V2.ExportLocationsResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExportLocationsResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Crm.V2.ExportLocationsResponse": { + "required": [ + "id", + "customerId", + "active", + "name", + "address", + "customFields", + "createdOn", + "createdById", + "modifiedOn", + "tagTypeIds", + "externalData" + ], + "type": "object", + "properties": { + "taxZoneId": { + "type": "integer", + "description": "ID of the location tax zone", + "format": "int64", + "nullable": true + }, + "id": { + "type": "integer", + "description": "ID of the location", + "format": "int64" + }, + "customerId": { + "type": "integer", + "description": "ID of the location’s customer.", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "If false, the record has been deactivated." + }, + "name": { + "type": "string", + "description": "Name of the location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Location’s address" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldModel" + }, + "description": "Location record’s custom fields" + }, + "createdOn": { + "type": "string", + "description": "DateTime (UTC) that location record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created the record.", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Modified On (UTC) for the record.", + "format": "date-time" + }, + "mergedToId": { + "type": "integer", + "description": "Tells you which location record this record was merged into.", + "format": "int64", + "nullable": true + }, + "zoneId": { + "type": "integer", + "description": "ID of the location's Zone", + "format": "int64", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs of the location" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this Location,\nwhich corresponds to the application GUID provided in the request." + } + }, + "additionalProperties": false + }, + "Crm.V2.LeadResponse": { + "required": [ + "id", + "status", + "priority", + "campaignId", + "createdOn", + "createdById", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the lead", + "format": "int64" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.LeadStatus" + } + ], + "description": "Status of the lead" + }, + "customerId": { + "type": "integer", + "description": "Customer associated to the lead", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "Location associated to the lead", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit associated to the lead", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type associated to the lead", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Priority of the lead" + }, + "campaignId": { + "type": "integer", + "description": "Campaign associated to the lead", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Summary of the lead", + "nullable": true + }, + "callReasonId": { + "type": "integer", + "description": "Call reason ID used to classify the lead by the user", + "format": "int64", + "nullable": true + }, + "callId": { + "type": "integer", + "description": "Call ID used to classify the lead", + "format": "int64", + "nullable": true + }, + "bookingId": { + "type": "integer", + "description": "Booking ID used to classify the lead", + "format": "int64", + "nullable": true + }, + "manualCallId": { + "type": "integer", + "description": "Manual Call ID used to classify the lead", + "format": "int64", + "nullable": true + }, + "followUpDate": { + "type": "string", + "description": "The next time someone is supposed to follow up on this lead", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the lead was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created this lead", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "When the lead was modified", + "format": "date-time" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of IDs of tags on the lead", + "nullable": true + }, + "dismissingReasonId": { + "type": "integer", + "description": "ID of the reason booking was dismissed", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.LeadResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.LeadResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.FollowUpResponse": { + "required": [ + "leadId", + "followUpDate", + "pinToTop" + ], + "type": "object", + "properties": { + "leadId": { + "type": "integer", + "description": "ID of the lead the follow-up is for", + "format": "int64" + }, + "followUpDate": { + "type": "string", + "description": "Follow-up date", + "format": "date-time" + }, + "text": { + "type": "string", + "description": "Text of follow-up note", + "nullable": true + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin follow-up note to the top" + } + }, + "additionalProperties": false + }, + "Crm.V2.CreateFollowUpRequest": { + "required": [ + "followUpDate" + ], + "type": "object", + "properties": { + "followUpDate": { + "type": "string", + "description": "Follow-up date", + "format": "date-time" + }, + "text": { + "type": "string", + "description": "Text of follow-up note", + "nullable": true + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin follow-up note to the top", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.LeadCreateRequest": { + "required": [ + "campaignId", + "summary" + ], + "type": "object", + "properties": { + "customerId": { + "type": "integer", + "description": "ID of the customer", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "ID of the location", + "format": "int64", + "nullable": true + }, + "campaignId": { + "type": "integer", + "description": "ID of the campaign", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the business unit", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "ID of job type", + "format": "int64", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Lead summary" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of IDs of tags on the lead", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Priority of the lead", + "nullable": true + }, + "callReasonId": { + "type": "integer", + "description": "ID of the call reason. Required if follow up date is not provided.", + "format": "int64", + "nullable": true + }, + "followUpDate": { + "type": "string", + "description": "Date of when to follow up. Required if call reason ID is not provided.", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.LeadUpdateRequest": { + "type": "object", + "properties": { + "campaignId": { + "type": "integer", + "description": "ID of the campaign", + "format": "int64" + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Priority" + } + ], + "description": "Priority of the lead" + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the business unit", + "format": "int64" + }, + "jobTypeId": { + "type": "integer", + "description": "ID of job type", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Crm.V2.LeadNoteCreateRequest": { + "required": [ + "text" + ], + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Text content of lead note" + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin lead note to the top", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.DismissLeadRequest": { + "required": [ + "dismissingReasonId" + ], + "type": "object", + "properties": { + "dismissingReasonId": { + "type": "integer", + "description": "Select a Call Reason to associate to a Booking that’s being dismissed for reporting purposes.", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Crm.V2.SubmitLeadFormResponse": { + "required": [ + "leadId" + ], + "type": "object", + "properties": { + "leadId": { + "type": "integer", + "description": "The id of the lead entity that represents the lead form", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Crm.V2.SubmitLeadFormRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the customer" + }, + "email": { + "type": "string", + "description": "The email of the customer", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "description": "The phone number of the customer", + "nullable": true + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "The address of the customer", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Summary submitted in the form", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Locations.LocationResponse": { + "required": [ + "id", + "customerId", + "active", + "name", + "address", + "customFields", + "createdOn", + "createdById", + "modifiedOn", + "tagTypeIds", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the location", + "format": "int64" + }, + "customerId": { + "type": "integer", + "description": "ID of the location’s customer.", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "If false, the record has been deactivated." + }, + "name": { + "type": "string", + "description": "Name of the location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Location’s address" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldModel" + }, + "description": "Location record’s custom fields" + }, + "createdOn": { + "type": "string", + "description": "DateTime (UTC) that location record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "User ID who created the record.", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Modified On (UTC) for the record.", + "format": "date-time" + }, + "mergedToId": { + "type": "integer", + "description": "Tells you which location record this record was merged into.", + "format": "int64", + "nullable": true + }, + "zoneId": { + "type": "integer", + "description": "ID of the location's Zone", + "format": "int64", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag Type IDs of the location" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this Location,\nwhich corresponds to the application GUID provided in the request." + }, + "taxZoneId": { + "type": "integer", + "description": "ID of the location tax zone", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.Locations.CreateLocationRequest": { + "required": [ + "name", + "address", + "customerId" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress" + } + ], + "description": "Address of the location record" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.NewCustomerContact" + }, + "description": "Contacts for the location", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel" + }, + "description": "Location record’s custom fields", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tag type ids for the location", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this Location.", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "ID of the location’s customer.", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.Locations.LocationResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Locations.LocationResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.Locations.UpdateLocationRequest": { + "type": "object", + "properties": { + "customerId": { + "type": "integer", + "description": "ID of the location’s customer.", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Locations.AddressPatchModel" + } + ], + "description": "Address of the location record" + }, + "active": { + "type": "boolean", + "description": "If false, the record has been deactivated." + }, + "taxZoneId": { + "type": "integer", + "description": "ID of the location tax zone", + "format": "int64" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel" + }, + "description": "List of custom fields and their values. This list must describe the full list of custom fields on the location.\nIf location A has values for custom fields X and Y and this field only contains a model for custom field X, then\nthe value for custom field Y on location A will be removed." + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of tag type IDs. If location has tag types X and Y and this field only contains tag type X, then Y will removed from the location.\nIf it is an empty list, all tags on the location will be removed." + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ExternalDataUpdateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be updated to this Location." + } + }, + "additionalProperties": false + }, + "Crm.V2.Locations.AddressPatchModel": { + "required": [ + "street", + "unit", + "city", + "state", + "zip", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street" + }, + "unit": { + "type": "string", + "description": "Unit" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "zip": { + "type": "string", + "description": "Zip" + }, + "country": { + "type": "string", + "description": "Country" + }, + "latitude": { + "type": "number", + "description": "Latitude", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Longitude", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.LocationNoteCreateRequest": { + "required": [ + "text" + ], + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Text content of location note" + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin location note to the top", + "nullable": true + }, + "addToCustomer": { + "type": "boolean", + "description": "Whether to add the same note to the location's customer", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.LocationContactResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.LocationContactResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.LocationContactResponse": { + "required": [ + "id", + "type", + "value", + "phoneSettings", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact", + "nullable": true + }, + "phoneSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.PhoneSettings" + } + ], + "description": "Phone settings of the location contact" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the contact was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Crm.V2.LocationsContactResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.V2.LocationsContactResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Crm.V2.LocationsContactResponse": { + "required": [ + "id", + "type", + "value", + "phoneSettings", + "modifiedOn", + "locationId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of contact", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact", + "nullable": true + }, + "phoneSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.Customers.PhoneSettings" + } + ], + "description": "Phone settings of the location contact" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the contact was last modified", + "format": "date-time" + }, + "locationId": { + "type": "integer", + "description": "Id of location", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Crm.V2.LocationContactCreateRequest": { + "required": [ + "type", + "value" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.V2.LocationContactUpdateRequest": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Crm.V2.ContactType" + } + ], + "description": "Type of contact" + }, + "value": { + "type": "string", + "description": "Value of contact" + }, + "memo": { + "type": "string", + "description": "Memo of contact" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/customer-interactions-v2.json b/openapi_specs/customer-interactions-v2.json new file mode 100644 index 0000000..665980c --- /dev/null +++ b/openapi_specs/customer-interactions-v2.json @@ -0,0 +1,194 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Customer Interactions", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/customer-interactions/v2" + } + ], + "paths": { + "/tenant/{tenant}/technician-rating/technician/{technicianId}/job/{jobId}": { + "put": { + "tags": [ + "TechnicianRating" + ], + "summary": "Add a rating for the specified technician, tied to the specific job.\nIf the rating already exists for that technician/ job combination, update it with the new score.", + "description": "Add a rating for the specified technician, tied to the specific job.\nIf the rating already exists for that technician/ job combination, update it with the new score.", + "operationId": "TechnicianRating_Update", + "parameters": [ + { + "name": "technicianId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "jobId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerInteractions.V2.CreateOrUpdateTechnicianAssessmentRequest" + }, + "example": { + "value": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Technician or Job not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "CustomerInteractions.V2.CreateOrUpdateTechnicianAssessmentRequest": { + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "number", + "description": "Rating (0-10)", + "format": "double" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/dispatch-v2.json b/openapi_specs/dispatch-v2.json new file mode 100644 index 0000000..2ac763a --- /dev/null +++ b/openapi_specs/dispatch-v2.json @@ -0,0 +1,5432 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Dispatch", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/dispatch/v2" + } + ], + "paths": { + "/tenant/{tenant}/gps-provider/{gps_provider}/gps-pings": { + "post": { + "tags": [ + "Gps" + ], + "summary": "Creates new gps ping.", + "description": "Creates new gps ping.", + "operationId": "Gps_Create", + "parameters": [ + { + "name": "gps_provider", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.GpsPingCreateRequest" + } + }, + "example": [ + { + "unitId": "string", + "unitName": "string", + "eventTime": "string", + "latitude": 0, + "longitude": 0, + "speed": 0, + "street": "string", + "city": "string", + "region": "string", + "postalCode": "string", + "message": "string", + "externalId": "string", + "isNew": true, + "statusMessage": "string" + } + ] + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.GpsPingResponse" + } + }, + "example": [ + { + "externalId": "string", + "status": {}, + "message": "string" + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointment-assignments": { + "get": { + "tags": [ + "AppointmentAssignments" + ], + "summary": "Gets a list of appointment assignments", + "description": "Gets a list of appointment assignments", + "operationId": "AppointmentAssignments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "appointmentIds", + "in": "query", + "description": "Return appointment assignments for one or more appointments", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Return appointment assignments for a single job", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, CreatedOn, ModifiedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Dispatch.V2.AppointmentAssignmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "technicianId": 0, + "technicianName": "string", + "assignedById": 0, + "assignedOn": "string", + "status": {}, + "isPaused": true, + "jobId": 0, + "appointmentId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointment-assignments/assign-technicians": { + "post": { + "tags": [ + "AppointmentAssignments" + ], + "summary": "Assigns the list of technicians to the appointment", + "description": "Assigns the list of technicians to the appointment", + "operationId": "AppointmentAssignments_AssignTechnicians", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.AssignTechniciansRequest" + }, + "example": { + "jobAppointmentId": 0, + "technicianIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.AppointmentResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointment-assignments/unassign-technicians": { + "post": { + "tags": [ + "AppointmentAssignments" + ], + "summary": "Unassigns the list of technicians from the appointment", + "description": "Unassigns the list of technicians from the appointment", + "operationId": "AppointmentAssignments_UnassignTechnicians", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.UnassignTechniciansRequest" + }, + "example": { + "jobAppointmentId": 0, + "technicianIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.AppointmentResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/arrival-windows": { + "get": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_GetList", + "operationId": "ArrivalWindows_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Dispatch.V2.ArrivalWindowResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "start": "string", + "duration": "string", + "businessUnitIds": [ + 0 + ], + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_Create", + "operationId": "ArrivalWindows_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateArrivalWindowRequest" + }, + "example": { + "start": "string", + "duration": "string", + "businessUnitIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowResponse" + }, + "example": { + "id": 0, + "start": "string", + "duration": "string", + "businessUnitIds": [ + 0 + ], + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/arrival-windows/{id}": { + "get": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_Get", + "operationId": "ArrivalWindows_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowResponse" + }, + "example": { + "id": 0, + "start": "string", + "duration": "string", + "businessUnitIds": [ + 0 + ], + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "put": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_Update", + "operationId": "ArrivalWindows_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.UpdateArrivalWindowRequest" + }, + "example": { + "start": "string", + "duration": "string", + "businessUnitIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowResponse" + }, + "example": { + "id": 0, + "start": "string", + "duration": "string", + "businessUnitIds": [ + 0 + ], + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/arrival-windows/{id}/activated": { + "put": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_Activated", + "operationId": "ArrivalWindows_Activated", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.SetArrivalWindowStatusRequest" + }, + "example": { + "isActive": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/arrival-windows/configuration": { + "get": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_GetConfiguration", + "operationId": "ArrivalWindows_GetConfiguration", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowConfigurationResponse" + }, + "example": { + "configuration": "StartTimeOfArrivalWindow" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "ArrivalWindows" + ], + "summary": "ArrivalWindows_UpdatedConfiguration", + "operationId": "ArrivalWindows_UpdatedConfiguration", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.UpdateArrivalWindowConfigurationRequest" + }, + "example": { + "configuration": "StartTimeOfArrivalWindow" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowConfigurationResponse" + }, + "example": { + "configuration": "StartTimeOfArrivalWindow" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/business-hours": { + "get": { + "tags": [ + "BusinessHour" + ], + "summary": "Gets the business hours.", + "description": "Gets the business hours.", + "operationId": "BusinessHour_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "A list with the business hours", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.BusinessHourModel" + }, + "example": { + "weekdays": [ + { + "fromHour": 0, + "toHour": 0 + } + ], + "saturday": [ + { + "fromHour": 0, + "toHour": 0 + } + ], + "sunday": [ + { + "fromHour": 0, + "toHour": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "BusinessHour" + ], + "summary": "BusinessHour_Create", + "operationId": "BusinessHour_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateBusinessHourRequest" + }, + "example": { + "weekdays": [ + { + "fromHour": 0, + "toHour": 0 + } + ], + "saturday": [ + { + "fromHour": 0, + "toHour": 0 + } + ], + "sunday": [ + { + "fromHour": 0, + "toHour": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateBusinessHourResponse" + }, + "example": { + "weekdays": [ + { + "fromHour": 0, + "toHour": 0 + } + ], + "saturday": [ + { + "fromHour": 0, + "toHour": 0 + } + ], + "sunday": [ + { + "fromHour": 0, + "toHour": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/capacity": { + "post": { + "tags": [ + "Capacity" + ], + "summary": "Capacity_GetList", + "operationId": "Capacity_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CapacityRequestArgs" + }, + "example": { + "startsOnOrAfter": "string", + "endsOnOrBefore": "string", + "businessUnitIds": [ + 0 + ], + "jobTypeId": 0, + "skillBasedAvailability": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CapacityResponse" + }, + "example": { + "timeStamp": "string", + "availabilities": [ + { + "start": "string", + "end": "string", + "startUtc": "string", + "endUtc": "string", + "businessUnitIds": [ + 0 + ], + "totalAvailability": 0, + "openAvailability": 0, + "technicians": [ + { + "id": 0, + "name": "string", + "status": {}, + "hasRequiredSkills": true + } + ], + "isAvailable": true, + "isExceedingIdealBookingPercentage": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/appointment-assignments": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for appointment assignments", + "description": "Provides export feed for appointment assignments", + "operationId": "Export_AppointmentAssignments", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Dispatch.V2.ExportAppointmentAssignmentsResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "technicianId": 0, + "technicianName": "string", + "assignedById": 0, + "assignedOn": "string", + "status": {}, + "isPaused": true, + "jobId": 0, + "appointmentId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/non-job-appointments/{id}": { + "get": { + "tags": [ + "NonJobAppointments" + ], + "summary": "NonJobAppointments_Get", + "operationId": "NonJobAppointments_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.GetNonJobAppointmentResponse" + }, + "example": { + "id": 0, + "technicianId": 0, + "start": "string", + "name": "string", + "duration": "string", + "timesheetCodeId": 0, + "summary": "string", + "clearDispatchBoard": true, + "clearTechnicianView": true, + "removeTechnicianFromCapacityPlanning": true, + "allDay": true, + "showOnTechnicianSchedule": true, + "active": true, + "createdOn": "string", + "createdById": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "put": { + "tags": [ + "NonJobAppointments" + ], + "summary": "Update an existing non-job appointment", + "description": "Update an existing non-job appointment", + "operationId": "NonJobAppointments_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.NonJobAppointmentUpdateRequest" + }, + "example": { + "technicianId": 0, + "start": "string", + "duration": "string", + "name": "string", + "timesheetCodeId": 0, + "summary": "string", + "clearDispatchBoard": true, + "clearTechnicianView": true, + "showOnTechnicianSchedule": true, + "removeTechnicianFromCapacityPlanning": true, + "allDay": true, + "repeat": true, + "countOccurrences": 0, + "interval": 0, + "frequency": {}, + "endType": {}, + "endOn": "string", + "daysOfWeek": "Monday, Wednesday, Friday" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.GetNonJobAppointmentResponse" + }, + "example": { + "id": 0, + "technicianId": 0, + "start": "string", + "name": "string", + "duration": "string", + "timesheetCodeId": 0, + "summary": "string", + "clearDispatchBoard": true, + "clearTechnicianView": true, + "removeTechnicianFromCapacityPlanning": true, + "allDay": true, + "showOnTechnicianSchedule": true, + "active": true, + "createdOn": "string", + "createdById": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "NonJobAppointments" + ], + "summary": "Delete non-job appointment", + "description": "Delete non-job appointment", + "operationId": "NonJobAppointments_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.DeleteNonJobAppointmentResult" + }, + "example": { + "message": "string", + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/non-job-appointments": { + "get": { + "tags": [ + "NonJobAppointments" + ], + "summary": "Gets a list of non-job appointments", + "description": "Gets a list of non-job appointments", + "operationId": "NonJobAppointments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. Unique id of the technician this non-job appointment applies to", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "startsOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). When the Start of non-job appointment should be at or after", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "startsOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). When the Start of non-job appointment should be at or before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "timesheetCodeId", + "in": "query", + "description": "Format - int64. Unique Id of timesheet code must apply to", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "activeOnly", + "in": "query", + "description": "Whether the result should contains only active non-job appointments", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "showOnTechnicianSchedule", + "in": "query", + "description": "Whether the non-job appointment shows on the technicians schedule even if there is no timesheet", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Dispatch.V2.NonJobAppointmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "technicianId": 0, + "start": "string", + "name": "string", + "duration": "string", + "timesheetCodeId": 0, + "summary": "string", + "clearDispatchBoard": true, + "clearTechnicianView": true, + "removeTechnicianFromCapacityPlanning": true, + "allDay": true, + "showOnTechnicianSchedule": true, + "active": true, + "createdOn": "string", + "createdById": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "NonJobAppointments" + ], + "summary": "Create a new non-job appointment", + "description": "Create a new non-job appointment", + "operationId": "NonJobAppointments_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateNonJobAppointmentRequest" + }, + "example": { + "technicianId": 0, + "start": "string", + "duration": "string", + "name": "string", + "timesheetCodeId": 0, + "summary": "string", + "clearDispatchBoard": true, + "clearTechnicianView": true, + "showOnTechnicianSchedule": true, + "removeTechnicianFromCapacityPlanning": true, + "allDay": true, + "repeat": true, + "countOccurrences": 0, + "interval": 0, + "frequency": {}, + "endType": {}, + "endOn": "string", + "daysOfWeek": "Monday, Wednesday, Friday" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.CreateNonJobAppointmentResult" + }, + "example": { + "id": 0, + "technicianId": 0, + "start": "string", + "name": "string", + "duration": "string", + "timesheetCodeId": 0, + "summary": "string", + "clearDispatchBoard": true, + "clearTechnicianView": true, + "removeTechnicianFromCapacityPlanning": true, + "allDay": true, + "showOnTechnicianSchedule": true, + "active": true, + "createdOn": "string", + "createdById": 0, + "repeat": true, + "countOccurrences": 0, + "interval": 0, + "frequency": {}, + "endType": {}, + "endOn": "string", + "daysOfWeek": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/teams": { + "get": { + "tags": [ + "Team" + ], + "summary": "Gets a list of teams", + "description": "Gets a list of teams", + "operationId": "Team_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "includeInactive", + "in": "query", + "description": "Whether to include inactive teams", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Dispatch.V2.TeamResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "createdBy": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Team" + ], + "summary": "Creates new team", + "description": "Creates new team", + "operationId": "Team_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateTeamRequest" + }, + "example": { + "active": true, + "name": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateTeamResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "createdBy": 0, + "createdOn": "string", + "modifiedOn": "string", + "created": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/teams/{id}": { + "get": { + "tags": [ + "Team" + ], + "summary": "Gets a specific team", + "description": "Gets a specific team", + "operationId": "Team_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.TeamResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "createdBy": 0, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Team" + ], + "summary": "Delete team", + "description": "Delete team", + "operationId": "Team_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technician-shifts": { + "get": { + "tags": [ + "TechnicianShifts" + ], + "summary": "Gets a list of technician shifts", + "description": "Gets a list of technician shifts", + "operationId": "TechnicianShifts_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "startsOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). When the Start of shift should be at or after", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "endsOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). When the End of shift should be at or before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "shiftType", + "in": "query", + "description": "Value to match ShiftType to\\\nValues: [Normal, OnCall, TimeOff]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.ShiftType" + } + ], + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. Unique Id of technician shift must apply to", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "titleContains", + "in": "query", + "description": "Text that must appear in the Title", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "noteContains", + "in": "query", + "description": "Text that must appear in the Note", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Dispatch.V2.TechnicianShiftResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "shiftType": {}, + "title": "string", + "note": "string", + "active": true, + "technicianId": 0, + "start": "string", + "end": "string", + "timesheetCodeId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "TechnicianShifts" + ], + "summary": "Creates new Technician Shift", + "description": "Creates new Technician Shift", + "operationId": "TechnicianShifts_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.CreateTechnicianShiftRequest" + }, + "example": { + "technicianIds": [ + 0 + ], + "shiftType": "Normal", + "title": "string", + "start": "string", + "end": "string", + "note": "string", + "timesheetCodeId": 0, + "repeatType": "Weekly", + "repeatEndDate": "string", + "repeatInterval": 0, + "shiftDays": "Monday, Wednesday, Friday" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.TechnicianShiftCreateResponse" + }, + "example": { + "created": true, + "technicianShifts": [ + { + "id": 0, + "shiftType": {}, + "title": "string", + "note": "string", + "active": true, + "technicianId": 0, + "start": "string", + "end": "string", + "timesheetCodeId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technician-shifts/{id}": { + "get": { + "tags": [ + "TechnicianShifts" + ], + "summary": "Gets a specific technician shift", + "description": "Gets a specific technician shift", + "operationId": "TechnicianShifts_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.TechnicianShiftResponse" + }, + "example": { + "id": 0, + "shiftType": {}, + "title": "string", + "note": "string", + "active": true, + "technicianId": 0, + "start": "string", + "end": "string", + "timesheetCodeId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "TechnicianShifts" + ], + "summary": "Updates Technician Shift", + "description": "Updates Technician Shift", + "operationId": "TechnicianShifts_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.UpdateTechnicianShiftRequest" + }, + "example": { + "shiftType": "Normal", + "title": "string", + "start": "string", + "end": "string", + "note": "string", + "timesheetCodeId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.TechnicianShiftUpdateResponse" + }, + "example": { + "technicianShifts": [ + { + "id": 0, + "shiftType": {}, + "title": "string", + "note": "string", + "active": true, + "technicianId": 0, + "start": "string", + "end": "string", + "timesheetCodeId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "TechnicianShifts" + ], + "summary": "Deletes the specified technician shift", + "description": "Deletes the specified technician shift", + "operationId": "TechnicianShifts_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The technician shift Id to delete", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.Contracts.TechnicianShift.DeleteTechnicianShiftResult" + }, + "example": { + "message": "string", + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technician-shifts/bulk-delete": { + "post": { + "tags": [ + "TechnicianShifts" + ], + "summary": "Deletes the technician shifts specified by the criteria", + "description": "Deletes the technician shifts specified by the criteria", + "operationId": "TechnicianShifts_BulkDelete", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "The criteria to delete", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.BulkDeleteTechnicianShiftRequest" + }, + "example": { + "start": "string", + "end": "string" + } + } + } + }, + "responses": { + "200": { + "description": "A list with the deleted technician shift Ids", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.Contracts.TechnicianShift.BulkDeleteTechnicianShiftResult" + }, + "example": { + "message": "string", + "deletedIds": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/zones": { + "get": { + "tags": [ + "Zone" + ], + "summary": "Gets a list of zones", + "description": "Gets a list of zones", + "operationId": "Zone_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Dispatch.V2.ZoneResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "zips": [ + "string" + ], + "cities": [ + "string" + ], + "territoryNumbers": [ + "string" + ], + "locnNumbers": [ + "string" + ], + "createdBy": 0, + "createdOn": "string", + "modifiedOn": "string", + "serviceDaysEnabled": true, + "serviceDays": [ + "string" + ], + "businessUnits": [ + 0 + ], + "technicians": [ + 0 + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/zones/{id}": { + "get": { + "tags": [ + "Zone" + ], + "summary": "Gets a specific zone", + "description": "Gets a specific zone", + "operationId": "Zone_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Dispatch.V2.ZoneResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "zips": [ + "string" + ], + "cities": [ + "string" + ], + "territoryNumbers": [ + "string" + ], + "locnNumbers": [ + "string" + ], + "createdBy": 0, + "createdOn": "string", + "modifiedOn": "string", + "serviceDaysEnabled": true, + "serviceDays": [ + "string" + ], + "businessUnits": [ + 0 + ], + "technicians": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Dispatch.V2.GpsPingResponse": { + "required": [ + "externalId", + "status", + "message" + ], + "type": "object", + "properties": { + "externalId": { + "type": "string", + "description": "Unique External ID for data point" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.GpsPingResultStatus" + } + ], + "description": "Request status" + }, + "message": { + "type": "string", + "description": "Gets or sets the response message received from the GPS provider about the unit at the time of recording", + "format": "html" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.GpsPingResultStatus": { + "enum": [ + "Fail", + "Success" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Fail", + "Success" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "Dispatch.V2.GpsPingCreateRequest": { + "required": [ + "unitId", + "unitName", + "eventTime", + "street", + "city", + "region", + "postalCode", + "message", + "externalId", + "isNew", + "statusMessage" + ], + "type": "object", + "properties": { + "unitId": { + "type": "string", + "description": "Gets or sets the ID of the object for which location information is provided" + }, + "unitName": { + "type": "string", + "description": "Gets or sets the name of the object for which location information is provided" + }, + "eventTime": { + "type": "string", + "description": "Gets or sets the time of the recording", + "format": "date-time" + }, + "latitude": { + "type": "number", + "description": "Gets or sets the latitude coordinate of the unit's location at the time of recording", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "description": "Gets or sets the longitude coordinate of the unit's location at the time of recording", + "format": "double", + "nullable": true + }, + "speed": { + "type": "number", + "description": "Gets or sets the speed of the vehicle at the time of recording", + "format": "double", + "nullable": true + }, + "street": { + "type": "string", + "description": "Gets the location's street address" + }, + "city": { + "type": "string", + "description": "Gets the location's city" + }, + "region": { + "type": "string", + "description": "Gets the location's region" + }, + "postalCode": { + "type": "string", + "description": "Gets the location's postal code" + }, + "message": { + "type": "string", + "description": "Gets or sets the response message received from the GPS provider about the unit at the time of recording", + "format": "html" + }, + "externalId": { + "type": "string", + "description": "Unique External ID for data point" + }, + "isNew": { + "type": "boolean", + "description": "Indicate if gps ping unit is a new one" + }, + "statusMessage": { + "type": "string", + "description": "Gets the status message" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Dispatch.V2.AppointmentAssignmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.AppointmentAssignmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Dispatch.V2.AppointmentAssignmentResponse": { + "required": [ + "id", + "technicianId", + "technicianName", + "assignedById", + "assignedOn", + "status", + "isPaused", + "jobId", + "appointmentId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the appointment assignment", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "ID of the technician", + "format": "int64" + }, + "technicianName": { + "type": "string", + "description": "Name of the technician" + }, + "assignedById": { + "type": "integer", + "description": "ID of the user who assigned the appointment assignment", + "format": "int64" + }, + "assignedOn": { + "type": "string", + "description": "Date/time (in UTC) when the appointment assignment was assigned", + "format": "date-time" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.JobAppointmentAssignmentStatus" + } + ], + "description": "Status of the appointment assignment" + }, + "isPaused": { + "type": "boolean", + "description": "Whether appointment assignment is paused" + }, + "jobId": { + "type": "integer", + "description": "ID of the job", + "format": "int64" + }, + "appointmentId": { + "type": "integer", + "description": "ID of the appointment", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.JobAppointmentAssignmentStatus": { + "enum": [ + "Scheduled", + "Dispatched", + "Working", + "Done" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Scheduled", + "Dispatched", + "Working", + "Done" + ] + }, + "Dispatch.V2.AppointmentResponse": { + "required": [ + "id", + "jobId", + "start", + "end", + "status", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Appointment ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "ID of the job that the appointment was created for", + "format": "int64" + }, + "appointmentNumber": { + "type": "string", + "description": "Appointment number", + "nullable": true + }, + "start": { + "type": "string", + "description": "Appointment's start date/time (in UTC)", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "Appointment's end date/time (in UTC)", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "Arrival window start date/time (in UTC), if configured", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "Arrival window end date/time (in UTC), if configured", + "format": "date-time", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.AppointmentStatus" + } + ], + "description": "Appointment's status" + }, + "specialInstructions": { + "type": "string", + "description": "Special instructions associated to the appointment", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the appointment was created (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the appointment was modified (in UTC)", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Appointment response model" + }, + "Dispatch.V2.AppointmentStatus": { + "enum": [ + "Scheduled", + "Dispatched", + "Working", + "Hold", + "Done", + "Canceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Scheduled", + "Dispatched", + "Working", + "Hold", + "Done", + "Canceled" + ] + }, + "Dispatch.V2.AssignTechniciansRequest": { + "required": [ + "jobAppointmentId", + "technicianIds" + ], + "type": "object", + "properties": { + "jobAppointmentId": { + "type": "integer", + "description": "Id of the appointment to assign to.", + "format": "int64" + }, + "technicianIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Assign these technicians to the appointment." + } + }, + "additionalProperties": false + }, + "Dispatch.V2.UnassignTechniciansRequest": { + "required": [ + "jobAppointmentId", + "technicianIds" + ], + "type": "object", + "properties": { + "jobAppointmentId": { + "type": "integer", + "description": "Id of the appointment to unassign from.", + "format": "int64" + }, + "technicianIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Unassign these technicians from the appointment." + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Dispatch.V2.ArrivalWindowResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Dispatch.V2.ArrivalWindowResponse": { + "required": [ + "id", + "start", + "duration", + "businessUnitIds", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "start": { + "type": "string", + "format": "duration" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Dispatch.V2.CreateArrivalWindowRequest": { + "required": [ + "start", + "duration", + "businessUnitIds" + ], + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "The start time for the arrival window defined as TimeSpan. I.e. \"09:00\"", + "format": "duration" + }, + "duration": { + "type": "string", + "description": "The end time for the arrival window defined as TimeSpan. I.e. \"11:00\"", + "format": "duration" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The business unit ids list that this arrival window applies for." + } + }, + "additionalProperties": false + }, + "Dispatch.V2.UpdateArrivalWindowRequest": { + "required": [ + "start", + "duration", + "businessUnitIds" + ], + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "The start time for the arrival window defined as TimeSpan. I.e. \"09:00\"", + "format": "duration" + }, + "duration": { + "type": "string", + "description": "The end time for the arrival window defined as TimeSpan. I.e. \"11:00\"", + "format": "duration" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The business unit ids list that this arrival window applies for." + } + }, + "additionalProperties": false + }, + "Dispatch.V2.SetArrivalWindowStatusRequest": { + "required": [ + "isActive" + ], + "type": "object", + "properties": { + "isActive": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.ArrivalWindowConfigurationResponse": { + "required": [ + "configuration" + ], + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowConfiguration" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.ArrivalWindowConfiguration": { + "enum": [ + "StartTimeOfArrivalWindow", + "EndTimeOfArrivalWindow" + ], + "type": "string", + "description": "Determines the default Job's start time during booking or rescheduling after an Arrival window has been selected or changed by a user.", + "x-enumNames": [ + "StartTimeOfArrivalWindow", + "EndTimeOfArrivalWindow" + ] + }, + "Dispatch.V2.UpdateArrivalWindowConfigurationRequest": { + "required": [ + "configuration" + ], + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/Dispatch.V2.ArrivalWindowConfiguration" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.BusinessHourModel": { + "required": [ + "weekdays", + "saturday", + "sunday" + ], + "type": "object", + "properties": { + "weekdays": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + }, + "saturday": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + }, + "sunday": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + } + }, + "additionalProperties": false + }, + "Dispatch.V2.TimeRange": { + "required": [ + "fromHour", + "toHour" + ], + "type": "object", + "properties": { + "fromHour": { + "type": "integer", + "format": "int32" + }, + "toHour": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CreateBusinessHourResponse": { + "required": [ + "weekdays", + "saturday", + "sunday" + ], + "type": "object", + "properties": { + "weekdays": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + }, + "saturday": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + }, + "sunday": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CreateBusinessHourRequest": { + "required": [ + "weekdays", + "saturday", + "sunday" + ], + "type": "object", + "properties": { + "weekdays": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + }, + "saturday": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + }, + "sunday": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TimeRange" + } + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CapacityResponse": { + "required": [ + "timeStamp", + "availabilities" + ], + "type": "object", + "properties": { + "timeStamp": { + "type": "string", + "description": "When the request was processed", + "format": "date-time" + }, + "availabilities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.CapacityResponseAvailability" + }, + "description": "Availability calculations by time frame" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CapacityResponseAvailability": { + "required": [ + "start", + "end", + "startUtc", + "endUtc", + "businessUnitIds", + "totalAvailability", + "openAvailability", + "technicians", + "isAvailable", + "isExceedingIdealBookingPercentage" + ], + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "When the availability time frame starts", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "When the availability time frame ends", + "format": "date-time" + }, + "startUtc": { + "type": "string", + "description": "When the availability time frame starts", + "format": "date-time" + }, + "endUtc": { + "type": "string", + "description": "When the availability time frame ends", + "format": "date-time" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Business units that the availability applies to" + }, + "totalAvailability": { + "type": "number", + "description": "Number of hours that total capacity can allow to be booked during this time frame", + "format": "double" + }, + "openAvailability": { + "type": "number", + "description": "Number of remaining hours that can be booked during this time frame", + "format": "double" + }, + "technicians": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.CapacityResponseTechnician" + }, + "description": "Technician details for this availability time frame" + }, + "isAvailable": { + "type": "boolean", + "description": "Indicate if time slot is available" + }, + "isExceedingIdealBookingPercentage": { + "type": "boolean", + "description": "Indicate if Ideal Booking Percentage is exceeded" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CapacityResponseTechnician": { + "required": [ + "id", + "name", + "status" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique Id of technician", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of technician" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.CapacityResponseTechnicianStatus" + } + ], + "description": "Whether the technician is available to work during the associated time frame" + }, + "hasRequiredSkills": { + "type": "boolean", + "description": "Whether the technician has all the skills required for the job type", + "nullable": true + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CapacityResponseTechnicianStatus": { + "enum": [ + "Available", + "Unavailable" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Available", + "Unavailable" + ] + }, + "Dispatch.V2.CapacityRequestArgs": { + "required": [ + "startsOnOrAfter", + "endsOnOrBefore", + "skillBasedAvailability" + ], + "type": "object", + "properties": { + "startsOnOrAfter": { + "type": "string", + "description": "When the time frame should start at or after", + "format": "date-time" + }, + "endsOnOrBefore": { + "type": "string", + "description": "When the time frame should end at or before", + "format": "date-time" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Business units to calculate availability for", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type whose duration should be used to calculate availability", + "format": "int64", + "nullable": true + }, + "skillBasedAvailability": { + "type": "boolean", + "description": "Indicate whether to use skill-based availability matching" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Dispatch.V2.ExportAppointmentAssignmentsResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.ExportAppointmentAssignmentsResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Dispatch.V2.ExportAppointmentAssignmentsResponse": { + "required": [ + "id", + "technicianId", + "technicianName", + "assignedById", + "assignedOn", + "status", + "isPaused", + "jobId", + "appointmentId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the appointment assignment", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "ID of the technician", + "format": "int64" + }, + "technicianName": { + "type": "string", + "description": "Name of the technician" + }, + "assignedById": { + "type": "integer", + "description": "ID of the user who assigned the appointment assignment", + "format": "int64" + }, + "assignedOn": { + "type": "string", + "description": "Date/time (in UTC) when the appointment assignment was assigned", + "format": "date-time" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.JobAppointmentAssignmentStatus" + } + ], + "description": "Status of the appointment assignment" + }, + "isPaused": { + "type": "boolean", + "description": "Whether appointment assignment is paused" + }, + "jobId": { + "type": "integer", + "description": "ID of the job", + "format": "int64" + }, + "appointmentId": { + "type": "integer", + "description": "ID of the appointment", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.GetNonJobAppointmentResponse": { + "required": [ + "id", + "technicianId", + "start", + "name", + "duration", + "timesheetCodeId", + "summary", + "clearDispatchBoard", + "clearTechnicianView", + "removeTechnicianFromCapacityPlanning", + "allDay", + "showOnTechnicianSchedule", + "active", + "createdOn", + "createdById" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "format": "int64" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "name": { + "type": "string" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "timesheetCodeId": { + "type": "integer", + "format": "int64" + }, + "summary": { + "type": "string" + }, + "clearDispatchBoard": { + "type": "boolean" + }, + "clearTechnicianView": { + "type": "boolean" + }, + "removeTechnicianFromCapacityPlanning": { + "type": "boolean" + }, + "allDay": { + "type": "boolean" + }, + "showOnTechnicianSchedule": { + "type": "boolean" + }, + "active": { + "type": "boolean" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Dispatch.V2.NonJobAppointmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.NonJobAppointmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Dispatch.V2.NonJobAppointmentResponse": { + "required": [ + "id", + "technicianId", + "start", + "name", + "duration", + "timesheetCodeId", + "summary", + "clearDispatchBoard", + "clearTechnicianView", + "removeTechnicianFromCapacityPlanning", + "allDay", + "showOnTechnicianSchedule", + "active", + "createdOn", + "createdById" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Non-job appointment id", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Non-job appointment's technician id", + "format": "int64" + }, + "start": { + "type": "string", + "description": "Non-job appointment's start date/time (in UTC)", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Non-job appointment name" + }, + "duration": { + "type": "string", + "description": "Non-job appointment duration", + "format": "duration" + }, + "timesheetCodeId": { + "type": "integer", + "description": "Unique Id of timesheet code", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Non-job appointment summary" + }, + "clearDispatchBoard": { + "type": "boolean", + "description": "Indicate if non-job appointment should be cleared from dispatch board once event is over" + }, + "clearTechnicianView": { + "type": "boolean", + "description": "Indicate if non-job appointment should be cleared from technician's calendar once event is over" + }, + "removeTechnicianFromCapacityPlanning": { + "type": "boolean", + "description": "Indicate if technician availability should be remove from legacy capacity planning" + }, + "allDay": { + "type": "boolean", + "description": "Indicate if non-job appointment is scheduled for whole day" + }, + "showOnTechnicianSchedule": { + "type": "boolean", + "description": "Whether the non-job appointment shows on the technicians schedule even if there is no timesheet" + }, + "active": { + "type": "boolean", + "description": "Indicate if non-job appointment is active" + }, + "createdOn": { + "type": "string", + "description": "When the appointment was created (in UTC)", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user who created the non-job appointment", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Dispatch.Contracts.NonJobAppointment.CreateNonJobAppointmentResult": { + "required": [ + "id", + "technicianId", + "start", + "name", + "duration", + "timesheetCodeId", + "summary", + "clearDispatchBoard", + "clearTechnicianView", + "removeTechnicianFromCapacityPlanning", + "allDay", + "showOnTechnicianSchedule", + "active", + "createdOn", + "createdById", + "daysOfWeek" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Non-job appointment id", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Non-job appointment's technician id", + "format": "int64" + }, + "start": { + "type": "string", + "description": "Non-job appointment's start date/time (in UTC)", + "format": "date-time" + }, + "name": { + "type": "string", + "description": "Non-job appointment name" + }, + "duration": { + "type": "string", + "description": "Non-job appointment duration", + "format": "duration" + }, + "timesheetCodeId": { + "type": "integer", + "description": "Unique Id of timesheet code", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Non-job appointment summary" + }, + "clearDispatchBoard": { + "type": "boolean", + "description": "Indicate if non-job appointment should be cleared from dispatch board once event is over" + }, + "clearTechnicianView": { + "type": "boolean", + "description": "Indicate if non-job appointment should be cleared from technician's calendar once event is over" + }, + "removeTechnicianFromCapacityPlanning": { + "type": "boolean", + "description": "Indicate if technician availability should be remove from legacy capacity planning" + }, + "allDay": { + "type": "boolean", + "description": "Indicate if non-job appointment is scheduled for whole day" + }, + "showOnTechnicianSchedule": { + "type": "boolean", + "description": "Whether the non-job appointment shows on the technicians schedule even if there is no timesheet" + }, + "active": { + "type": "boolean", + "description": "Indicate if non-job appointment is active" + }, + "createdOn": { + "type": "string", + "description": "When the appointment was created (in UTC)", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user who created the non-job appointment", + "format": "int64" + }, + "repeat": { + "type": "boolean", + "description": "Indicate if non-job appointment is repeating", + "nullable": true + }, + "countOccurrences": { + "type": "integer", + "description": "Number of occurrences of the repeating non-job appointment", + "format": "int32", + "nullable": true + }, + "interval": { + "type": "integer", + "description": "Interval of the repeating non-job appointment", + "format": "int32", + "nullable": true + }, + "frequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.RepeatFrequency" + } + ], + "description": "Frequency of the repeating non-job appointment", + "nullable": true + }, + "endType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.RepeatEndType" + } + ], + "description": "End type of the repeating non-job appointment", + "nullable": true + }, + "endOn": { + "type": "string", + "description": "End Date of the repeating non-job appointment", + "format": "date-time", + "nullable": true + }, + "daysOfWeek": { + "type": "string", + "description": "Days of the week of the repeating non-job appointment" + } + }, + "additionalProperties": false + }, + "Dispatch.Contracts.NonJobAppointment.RepeatFrequency": { + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Yearly" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Daily", + "Weekly", + "Monthly", + "Yearly" + ] + }, + "Dispatch.Contracts.NonJobAppointment.RepeatEndType": { + "enum": [ + "Never", + "After", + "On" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Never", + "After", + "On" + ] + }, + "Dispatch.V2.CreateNonJobAppointmentRequest": { + "required": [ + "technicianId", + "start", + "duration", + "name" + ], + "type": "object", + "properties": { + "technicianId": { + "type": "integer", + "format": "int64" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "name": { + "type": "string" + }, + "timesheetCodeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "summary": { + "type": "string", + "nullable": true + }, + "clearDispatchBoard": { + "type": "boolean", + "nullable": true + }, + "clearTechnicianView": { + "type": "boolean", + "nullable": true + }, + "showOnTechnicianSchedule": { + "type": "boolean", + "nullable": true + }, + "removeTechnicianFromCapacityPlanning": { + "type": "boolean", + "nullable": true + }, + "allDay": { + "type": "boolean", + "nullable": true + }, + "repeat": { + "type": "boolean", + "nullable": true + }, + "countOccurrences": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "interval": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "frequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.RepeatFrequency" + } + ], + "nullable": true + }, + "endType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.RepeatEndType" + } + ], + "nullable": true + }, + "endOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "daysOfWeek": { + "type": "string", + "nullable": true, + "example": "Monday, Wednesday, Friday" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.NonJobAppointmentUpdateRequest": { + "required": [ + "technicianId", + "start", + "duration", + "name" + ], + "type": "object", + "properties": { + "technicianId": { + "type": "integer", + "format": "int64" + }, + "start": { + "type": "string", + "format": "date-time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "name": { + "type": "string" + }, + "timesheetCodeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "summary": { + "type": "string", + "nullable": true + }, + "clearDispatchBoard": { + "type": "boolean", + "nullable": true + }, + "clearTechnicianView": { + "type": "boolean", + "nullable": true + }, + "showOnTechnicianSchedule": { + "type": "boolean", + "nullable": true + }, + "removeTechnicianFromCapacityPlanning": { + "type": "boolean", + "nullable": true + }, + "allDay": { + "type": "boolean", + "nullable": true + }, + "repeat": { + "type": "boolean", + "nullable": true + }, + "countOccurrences": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "interval": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "frequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.RepeatFrequency" + } + ], + "nullable": true + }, + "endType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.Contracts.NonJobAppointment.RepeatEndType" + } + ], + "nullable": true + }, + "endOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "daysOfWeek": { + "type": "string", + "nullable": true, + "example": "Monday, Wednesday, Friday" + } + }, + "additionalProperties": false + }, + "Dispatch.Contracts.NonJobAppointment.DeleteNonJobAppointmentResult": { + "required": [ + "message", + "id" + ], + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Dispatch.V2.TeamResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TeamResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Dispatch.V2.TeamResponse": { + "required": [ + "id", + "active", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the team record", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether the team is enabled" + }, + "name": { + "type": "string", + "description": "Descriptive identifier", + "nullable": true + }, + "createdBy": { + "type": "integer", + "description": "Created by User ID", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Created on date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Modified on date", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CreateTeamResponse": { + "required": [ + "id", + "active", + "createdOn", + "modifiedOn", + "created" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the team record", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether the team is enabled" + }, + "name": { + "type": "string", + "description": "Descriptive identifier", + "nullable": true + }, + "createdBy": { + "type": "integer", + "description": "Created by User ID", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Created on date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Modified on date", + "format": "date-time" + }, + "created": { + "type": "boolean", + "description": "Whether the team was created or this is an existing record" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CreateTeamRequest": { + "required": [ + "active" + ], + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Whether the team is enabled" + }, + "name": { + "type": "string", + "description": "Descriptive identifier", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Dispatch.V2.TechnicianShiftResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TechnicianShiftResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Dispatch.V2.TechnicianShiftResponse": { + "required": [ + "id", + "shiftType", + "title", + "active", + "technicianId", + "start", + "end" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the shift record", + "format": "int64" + }, + "shiftType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.ShiftType" + } + ], + "description": "How the shift is displayed and contributes to availability calculations" + }, + "title": { + "type": "string", + "description": "Descriptive identifier" + }, + "note": { + "type": "string", + "description": "Optional detailed explanation of the shift", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether the shift is enabled" + }, + "technicianId": { + "type": "integer", + "description": ">Unique id of the technician this shift applies to", + "format": "int64" + }, + "start": { + "type": "string", + "description": "When the shift begins", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "When the shift ends", + "format": "date-time" + }, + "timesheetCodeId": { + "type": "integer", + "description": "Timesheet code ID of shift", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Dispatch.V2.ShiftType": { + "enum": [ + "Normal", + "OnCall", + "TimeOff" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Normal", + "OnCall", + "TimeOff" + ] + }, + "Dispatch.V2.TechnicianShiftCreateResponse": { + "required": [ + "created", + "technicianShifts" + ], + "type": "object", + "properties": { + "created": { + "type": "boolean" + }, + "technicianShifts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TechnicianShiftResponse" + } + } + }, + "additionalProperties": false + }, + "Dispatch.V2.CreateTechnicianShiftRequest": { + "required": [ + "technicianIds", + "shiftType", + "title", + "start", + "end", + "repeatType" + ], + "type": "object", + "properties": { + "technicianIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "shiftType": { + "$ref": "#/components/schemas/Dispatch.V2.ShiftType" + }, + "title": { + "minLength": 1, + "type": "string" + }, + "start": { + "minLength": 1, + "type": "string", + "description": "When the shift begins", + "format": "date-time" + }, + "end": { + "minLength": 1, + "type": "string", + "description": "When the shift ends", + "format": "date-time" + }, + "note": { + "type": "string", + "description": "Optional detailed explanation of the shift", + "nullable": true + }, + "timesheetCodeId": { + "type": "integer", + "description": "Timesheet code ID of shift", + "format": "int64", + "nullable": true + }, + "repeatType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Dispatch.V2.ShiftRepeatType" + } + ], + "description": "Repeat type of the shift (Never, Daily, Weekly)", + "example": "Weekly" + }, + "repeatEndDate": { + "type": "string", + "description": "Date to stop repeating on", + "format": "date-time", + "nullable": true + }, + "repeatInterval": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "shiftDays": { + "type": "string", + "description": "List of Days to repeat the shift on", + "nullable": true, + "example": "Monday, Wednesday, Friday" + } + }, + "additionalProperties": false + }, + "Dispatch.V2.ShiftRepeatType": { + "enum": [ + "Never", + "Daily", + "Weekly" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Never", + "Daily", + "Weekly" + ] + }, + "Dispatch.V2.TechnicianShiftUpdateResponse": { + "required": [ + "technicianShifts" + ], + "type": "object", + "properties": { + "technicianShifts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.TechnicianShiftResponse" + } + } + }, + "additionalProperties": false + }, + "Dispatch.V2.UpdateTechnicianShiftRequest": { + "type": "object", + "properties": { + "shiftType": { + "$ref": "#/components/schemas/Dispatch.V2.ShiftType" + }, + "title": { + "type": "string" + }, + "start": { + "type": "string", + "description": "When the shift begins", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "When the shift ends", + "format": "date-time" + }, + "note": { + "type": "string", + "description": "Optional detailed explanation of the shift" + }, + "timesheetCodeId": { + "type": "integer", + "description": "Timesheet code ID of shift", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Dispatch.Contracts.TechnicianShift.DeleteTechnicianShiftResult": { + "required": [ + "message", + "id" + ], + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Dispatch.Contracts.TechnicianShift.BulkDeleteTechnicianShiftResult": { + "required": [ + "message", + "deletedIds" + ], + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "deletedIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "additionalProperties": false + }, + "Dispatch.V2.BulkDeleteTechnicianShiftRequest": { + "required": [ + "start", + "end" + ], + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "The start date for the range deletion", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "The end date for the range deletion", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Dispatch.V2.ZoneResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Dispatch.V2.ZoneResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Dispatch.V2.ZoneResponse": { + "required": [ + "id", + "active", + "createdBy", + "createdOn", + "modifiedOn", + "serviceDaysEnabled" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id of the zone record", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether the zone is enabled" + }, + "name": { + "type": "string", + "description": "Descriptive identifier", + "nullable": true + }, + "zips": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of assigned zip codes to the zone", + "nullable": true + }, + "cities": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of assigned cities to the zone", + "nullable": true + }, + "territoryNumbers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of assigned territory numbers to the zone", + "nullable": true + }, + "locnNumbers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of assigned LOCN numbers to the zone", + "nullable": true + }, + "createdBy": { + "type": "integer", + "description": "User ID who created the zone", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) the zone was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the zone was last modified", + "format": "date-time" + }, + "serviceDaysEnabled": { + "type": "boolean", + "description": "Whether the service days option is enabled" + }, + "serviceDays": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of assigned service days", + "nullable": true + }, + "businessUnits": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "A list of assigned business units", + "nullable": true + }, + "technicians": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "A list of assigned technicians", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/equipment-systems-v2.json b/openapi_specs/equipment-systems-v2.json new file mode 100644 index 0000000..99f789a --- /dev/null +++ b/openapi_specs/equipment-systems-v2.json @@ -0,0 +1,1500 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Equipment Systems", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/equipmentsystems/v2" + } + ], + "paths": { + "/tenant/{tenant}/installed-equipment": { + "get": { + "tags": [ + "InstalledEquipment" + ], + "summary": "InstalledEquipment_GetList", + "operationId": "InstalledEquipment_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "locationIds", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, CreatedOn, ModifiedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_EquipmentSystems.V2.InstalledEquipmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "equipmentId": 0, + "locationId": 0, + "customerId": 0, + "invoiceItemId": 0, + "name": "string", + "installedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "serialNumber": "string", + "barcodeId": "string", + "memo": "string", + "manufacturer": "string", + "model": "string", + "cost": 0, + "manufacturerWarrantyStart": "string", + "manufacturerWarrantyEnd": "string", + "serviceProviderWarrantyStart": "string", + "serviceProviderWarrantyEnd": "string", + "tags": [ + { + "id": 0, + "ownerId": 0, + "typeId": 0, + "typeName": "string", + "memo": "string", + "color": "string", + "textColor": "string", + "code": "string" + } + ], + "actualReplacementDate": "string", + "predictedReplacementMonths": 0, + "predictedReplacementDate": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "InstalledEquipment" + ], + "summary": "InstalledEquipment_Create", + "operationId": "InstalledEquipment_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.InstalledEquipmentCreateRequest" + }, + "example": { + "locationId": 0, + "name": "string", + "installedOn": "string", + "actualReplacementDate": "string", + "serialNumber": "string", + "barcodeId": "string", + "memo": "string", + "manufacturer": "string", + "model": "string", + "cost": 0, + "manufacturerWarrantyStart": "string", + "manufacturerWarrantyEnd": "string", + "serviceProviderWarrantyStart": "string", + "serviceProviderWarrantyEnd": "string", + "customFields": [ + { + "id": 0, + "typeId": 0, + "value": "string" + } + ], + "attachments": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "tagTypeIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.InstalledEquipmentDetailedResponse" + }, + "example": { + "id": 0, + "equipmentId": 0, + "locationId": 0, + "customerId": 0, + "invoiceItemId": 0, + "name": "string", + "installedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "serialNumber": "string", + "barcodeId": "string", + "memo": "string", + "manufacturer": "string", + "model": "string", + "cost": 0, + "manufacturerWarrantyStart": "string", + "manufacturerWarrantyEnd": "string", + "serviceProviderWarrantyStart": "string", + "serviceProviderWarrantyEnd": "string", + "tags": [ + { + "id": 0, + "ownerId": 0, + "typeId": 0, + "typeName": "string", + "memo": "string", + "color": "string", + "textColor": "string", + "code": "string" + } + ], + "actualReplacementDate": "string", + "predictedReplacementMonths": 0, + "predictedReplacementDate": "string", + "customFields": [ + { + "id": 0, + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "attachments": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/installed-equipment/{id}": { + "get": { + "tags": [ + "InstalledEquipment" + ], + "summary": "InstalledEquipment_Get", + "operationId": "InstalledEquipment_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.InstalledEquipmentDetailedResponse" + }, + "example": { + "id": 0, + "equipmentId": 0, + "locationId": 0, + "customerId": 0, + "invoiceItemId": 0, + "name": "string", + "installedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "serialNumber": "string", + "barcodeId": "string", + "memo": "string", + "manufacturer": "string", + "model": "string", + "cost": 0, + "manufacturerWarrantyStart": "string", + "manufacturerWarrantyEnd": "string", + "serviceProviderWarrantyStart": "string", + "serviceProviderWarrantyEnd": "string", + "tags": [ + { + "id": 0, + "ownerId": 0, + "typeId": 0, + "typeName": "string", + "memo": "string", + "color": "string", + "textColor": "string", + "code": "string" + } + ], + "actualReplacementDate": "string", + "predictedReplacementMonths": 0, + "predictedReplacementDate": "string", + "customFields": [ + { + "id": 0, + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "attachments": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "InstalledEquipment" + ], + "summary": "InstalledEquipment_Update", + "operationId": "InstalledEquipment_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.InstalledEquipmentUpdateRequest" + }, + "example": { + "name": "string", + "installedOn": "string", + "actualReplacementDate": "string", + "serialNumber": "string", + "barcodeId": "string", + "memo": "string", + "manufacturer": "string", + "model": "string", + "cost": 0, + "manufacturerWarrantyStart": "string", + "manufacturerWarrantyEnd": "string", + "serviceProviderWarrantyStart": "string", + "serviceProviderWarrantyEnd": "string", + "customFields": [ + { + "id": 0, + "typeId": 0, + "value": "string" + } + ], + "attachments": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "tagTypeIds": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.InstalledEquipmentDetailedResponse" + }, + "example": { + "id": 0, + "equipmentId": 0, + "locationId": 0, + "customerId": 0, + "invoiceItemId": 0, + "name": "string", + "installedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "serialNumber": "string", + "barcodeId": "string", + "memo": "string", + "manufacturer": "string", + "model": "string", + "cost": 0, + "manufacturerWarrantyStart": "string", + "manufacturerWarrantyEnd": "string", + "serviceProviderWarrantyStart": "string", + "serviceProviderWarrantyEnd": "string", + "tags": [ + { + "id": 0, + "ownerId": 0, + "typeId": 0, + "typeName": "string", + "memo": "string", + "color": "string", + "textColor": "string", + "code": "string" + } + ], + "actualReplacementDate": "string", + "predictedReplacementMonths": 0, + "predictedReplacementDate": "string", + "customFields": [ + { + "id": 0, + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "attachments": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/installed-equipment/attachments": { + "post": { + "tags": [ + "InstalledEquipment" + ], + "summary": "InstalledEquipment_PostAttachment", + "operationId": "InstalledEquipment_PostAttachment", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + }, + "example": { + "file": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.AttachmentUploadResponse" + }, + "example": { + "path": "string" + } + } + } + }, + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EquipmentSystems.V2.AttachmentUploadResponse" + }, + "example": { + "path": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "InstalledEquipment" + ], + "summary": "InstalledEquipment_Get2", + "operationId": "InstalledEquipment_Get2", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "path", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "302": { + "description": "" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_EquipmentSystems.V2.InstalledEquipmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.InstalledEquipmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "EquipmentSystems.V2.InstalledEquipmentResponse": { + "required": [ + "id", + "locationId", + "customerId", + "name", + "createdOn", + "modifiedOn", + "serialNumber", + "memo", + "manufacturer", + "model", + "cost" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "equipmentId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "format": "int64" + }, + "customerId": { + "type": "integer", + "format": "int64" + }, + "invoiceItemId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string" + }, + "installedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "serialNumber": { + "type": "string" + }, + "barcodeId": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string" + }, + "manufacturer": { + "type": "string" + }, + "model": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "decimal" + }, + "manufacturerWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "manufacturerWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.TagResponseModel" + }, + "nullable": true + }, + "actualReplacementDate": { + "type": "string", + "format": "date", + "nullable": true + }, + "predictedReplacementMonths": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "predictedReplacementDate": { + "type": "string", + "format": "date", + "nullable": true + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.TagResponseModel": { + "required": [ + "id", + "ownerId", + "typeId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "ownerId": { + "type": "integer", + "format": "int64" + }, + "typeId": { + "type": "integer", + "format": "int64" + }, + "typeName": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + }, + "color": { + "type": "string", + "nullable": true + }, + "textColor": { + "type": "string", + "nullable": true + }, + "code": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "EquipmentSystems.V2.InstalledEquipmentDetailedResponse": { + "required": [ + "id", + "locationId", + "customerId", + "name", + "createdOn", + "modifiedOn", + "serialNumber", + "memo", + "manufacturer", + "model", + "cost" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "equipmentId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "format": "int64" + }, + "customerId": { + "type": "integer", + "format": "int64" + }, + "invoiceItemId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string" + }, + "installedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "serialNumber": { + "type": "string" + }, + "barcodeId": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string" + }, + "manufacturer": { + "type": "string" + }, + "model": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "decimal" + }, + "manufacturerWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "manufacturerWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.TagResponseModel" + }, + "nullable": true + }, + "actualReplacementDate": { + "type": "string", + "format": "date", + "nullable": true + }, + "predictedReplacementMonths": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "predictedReplacementDate": { + "type": "string", + "format": "date", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.CustomFieldResponseModel" + }, + "nullable": true + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.AttachmentApiModel" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.CustomFieldResponseModel": { + "required": [ + "id", + "typeId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "typeId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.AttachmentApiModel": { + "required": [ + "type", + "url" + ], + "type": "object", + "properties": { + "alias": { + "type": "string", + "description": "Attachment Alias", + "nullable": true + }, + "fileName": { + "type": "string", + "description": "Attachment file name when downloaded", + "nullable": true + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/EquipmentSystems.V2.AttachmentAssetType" + } + ], + "description": "Attachment type - Image, Video, Document, or Video Link" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.AttachmentAssetType": { + "enum": [ + "Other", + "Image", + "VideoFile", + "VideoLink", + "Document" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Other", + "Image", + "VideoFile", + "VideoLink", + "Document" + ] + }, + "EquipmentSystems.V2.InstalledEquipmentCreateRequest": { + "required": [ + "locationId" + ], + "type": "object", + "properties": { + "locationId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "installedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "actualReplacementDate": { + "type": "string", + "format": "date", + "nullable": true + }, + "serialNumber": { + "type": "string", + "nullable": true + }, + "barcodeId": { + "type": "string", + "nullable": true + }, + "memo": { + "type": "string", + "nullable": true + }, + "manufacturer": { + "type": "string", + "nullable": true + }, + "model": { + "type": "string", + "nullable": true + }, + "cost": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "manufacturerWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "manufacturerWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.CustomFieldRequestModel" + }, + "nullable": true + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EquipmentSystems.V2.AttachmentApiModel" + }, + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.CustomFieldRequestModel": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "typeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.InstalledEquipmentUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "installedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "actualReplacementDate": { + "type": "string", + "format": "date", + "nullable": true + }, + "serialNumber": { + "type": "string" + }, + "barcodeId": { + "type": "string" + }, + "memo": { + "type": "string" + }, + "manufacturer": { + "type": "string" + }, + "model": { + "type": "string" + }, + "cost": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "manufacturerWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "manufacturerWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyStart": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "serviceProviderWarrantyEnd": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/EquipmentSystems.V2.CustomFieldRequestModel" + } + ], + "nullable": true + } + }, + "attachments": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/EquipmentSystems.V2.AttachmentApiModel" + } + ], + "nullable": true + } + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "additionalProperties": false + }, + "EquipmentSystems.V2.AttachmentUploadResponse": { + "required": [ + "path" + ], + "type": "object", + "properties": { + "path": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/forms-v2.json b/openapi_specs/forms-v2.json new file mode 100644 index 0000000..bb95292 --- /dev/null +++ b/openapi_specs/forms-v2.json @@ -0,0 +1,1627 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Forms", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/forms/v2" + } + ], + "paths": { + "/tenant/{tenant}/forms": { + "get": { + "tags": [ + "Form" + ], + "summary": "Retrieve Form data", + "description": "Retrieve Form data", + "operationId": "Form_GetForms", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "hasConditionalLogic", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "hasTriggers", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Values: [Any, Published, Unpublished]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Forms.V2.StatusField" + } + ], + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Values: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Forms.V2.FormResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "published": true, + "hasConditionalLogic": true, + "hasTriggers": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/submissions": { + "get": { + "tags": [ + "FormSubmission" + ], + "summary": "Retrieve Form Submission Data", + "description": "Retrieve Form Submission Data", + "operationId": "FormSubmission_GetFormSubmissions", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "formIds", + "in": "query", + "description": "Form Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Values: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdById", + "in": "query", + "description": "Format - int64. Creator user Id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Values: [Started, Completed, Any]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.SubmissionStatus" + } + ], + "nullable": true + } + }, + { + "name": "submittedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Submission modified date on or after", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "submittedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Submission modified date before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "ownerType", + "in": "query", + "description": "Values: [Job, Call, Customer, Location, Equipment, Technician, JobAppointment, Membership, Truck]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormOwnerType" + } + ], + "nullable": true + } + }, + { + "name": "owners", + "in": "query", + "description": "List of owner object (one of Job,Customer,Location,Equipment,Call,Technician) {'type': 'xxx', 'id': 0000}\\\n\\\nExample: owners[0].type=Location&owners[0].id=2689281&\\\nowners[1].type=Customer&owners[1].id=2703496", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormOwner" + }, + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, SubmittedOn, CreatedBy.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Forms.V2.FormSubmissionResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "formId": 0, + "formName": "string", + "submittedOn": "string", + "createdById": 0, + "status": "Started", + "owners": [ + { + "type": "Job", + "id": 0 + } + ], + "units": [ + { + "id": "string", + "name": "string", + "type": "string", + "description": "string", + "units": [ + { + "id": "string", + "name": "string", + "type": "string", + "comment": "string", + "attachments": [ + { + "fileName": "string", + "createdFrom": "string", + "originalFileName": "string", + "thumbnail": "string" + } + ] + } + ] + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/attachments": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Creates a Attachment on the specified Job", + "description": "Creates a Attachment on the specified Job", + "operationId": "Jobs_CreateAttachment", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Job Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + }, + "example": { + "file": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Forms.V2.AttachmentResponse" + }, + "example": { + "fileName": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{jobId}/attachments": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets Attachments on the specified Job", + "description": "Gets Attachments on the specified Job", + "operationId": "Jobs_GetJobAttachments", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "Format - int64. Job Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/attachment/{id}": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Downloads a specified job attachment.", + "description": "Downloads a specified job attachment.", + "operationId": "Jobs_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The id of the job attachment to retrieve, as returned by other job API endpoints.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Forms.V2.FormResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.V2.FormResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Forms.V2.FormResponse": { + "required": [ + "id", + "active", + "published", + "hasConditionalLogic", + "hasTriggers", + "createdById", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "type": "string", + "nullable": true + }, + "published": { + "type": "boolean" + }, + "hasConditionalLogic": { + "type": "boolean" + }, + "hasTriggers": { + "type": "boolean" + }, + "createdById": { + "type": "integer", + "format": "int64" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "Forms.V2.StatusField": { + "enum": [ + "Any", + "Published", + "Unpublished" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Any", + "Published", + "Unpublished" + ] + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "PaginatedResponse_Of_Forms.V2.FormSubmissionResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.V2.FormSubmissionResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Forms.V2.FormSubmissionResponse": { + "required": [ + "id", + "formId", + "submittedOn", + "createdById", + "status" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "formId": { + "type": "integer", + "format": "int64" + }, + "formName": { + "type": "string", + "nullable": true + }, + "submittedOn": { + "type": "string", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "format": "int64" + }, + "status": { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.SubmissionStatus" + }, + "owners": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormOwner" + }, + "nullable": true + }, + "units": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormSectionApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormStaticElementApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.DropdownFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.NumberFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.TextFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.CheckboxFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.DateFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.PictureFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.RadioFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.SignatureFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.StoplightFieldApiDto" + } + ] + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.SubmissionStatus": { + "enum": [ + "Started", + "Completed", + "Any" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Started", + "Completed", + "Any" + ] + }, + "Forms.Contracts.FormSubmissions.FormOwner": { + "required": [ + "type", + "id" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/Forms.Client.Contracts.OwnerType" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Forms.Client.Contracts.OwnerType": { + "enum": [ + "Job", + "Call", + "Customer", + "Location", + "Equipment", + "Technician", + "JobAppointment", + "Membership", + "Truck", + "Project", + "ServiceAgreement" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Job", + "Call", + "Customer", + "Location", + "Equipment", + "Technician", + "JobAppointment", + "Membership", + "Truck", + "Project", + "ServiceAgreement" + ] + }, + "Forms.Contracts.FormSubmissions.FormUnitApiDto": { + "required": [ + "id", + "name", + "type" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.FormSectionApiDto": { + "required": [ + "id", + "name", + "type", + "description", + "units" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "units": { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.FormStaticElementApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.DropdownFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.NumberFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.TextFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.CheckboxFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.DateFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.PictureFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.RadioFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.SignatureFieldApiDto" + }, + { + "$ref": "#/components/schemas/Forms.Contracts.FormSubmissions.StoplightFieldApiDto" + } + ] + } + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.FormFieldApiDto": { + "required": [ + "id", + "name", + "type", + "comment", + "attachments" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + } + }, + "additionalProperties": false + }, + "Forms.Client.Contracts.FormAttachment": { + "required": [ + "fileName", + "createdFrom", + "originalFileName", + "thumbnail" + ], + "type": "object", + "properties": { + "fileName": { + "type": "string" + }, + "createdFrom": { + "type": "string" + }, + "originalFileName": { + "type": "string" + }, + "thumbnail": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.DropdownFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name", + "options", + "value" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.NumberFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.TextFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name", + "value" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.CheckboxFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name", + "values", + "options" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "values": { + "type": "array", + "items": { + "type": "string" + } + }, + "options": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.DateFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.PictureFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.RadioFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name", + "options", + "value" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "options": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.SignatureFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name", + "value", + "isRefused", + "refusalReason" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "isRefused": { + "type": "boolean" + }, + "refusalReason": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.StoplightFieldApiDto": { + "required": [ + "type", + "comment", + "attachments", + "id", + "name" + ], + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "comment": { + "type": "string" + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Forms.Client.Contracts.FormAttachment" + } + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "$ref": "#/components/schemas/Forms.Client.Contracts.StoplightValue" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Forms.Client.Contracts.StoplightValue": { + "enum": [ + "Red", + "Yellow", + "Green" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Red", + "Yellow", + "Green" + ] + }, + "Forms.Contracts.FormSubmissions.FormStaticElementApiDto": { + "required": [ + "id", + "name", + "type" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Forms.Contracts.FormSubmissions.FormOwnerType": { + "enum": [ + "Job", + "Call", + "Customer", + "Location", + "Equipment", + "Technician", + "JobAppointment", + "Membership", + "Truck" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Job", + "Call", + "Customer", + "Location", + "Equipment", + "Technician", + "JobAppointment", + "Membership", + "Truck" + ] + }, + "Forms.V2.AttachmentResponse": { + "required": [ + "fileName" + ], + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "Original filename" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/inventory-v2.json b/openapi_specs/inventory-v2.json new file mode 100644 index 0000000..4cc2164 --- /dev/null +++ b/openapi_specs/inventory-v2.json @@ -0,0 +1,9773 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Inventory", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/inventory/v2" + } + ], + "paths": { + "/tenant/{tenant}/adjustments": { + "get": { + "tags": [ + "Adjustments" + ], + "summary": "Get a list of inventory adjustments", + "description": "Get a list of inventory adjustments", + "operationId": "Adjustments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "referenceNumber", + "in": "query", + "description": "Reference number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64. BatchId filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "inventoryLocationIds", + "in": "query", + "description": "Filter by a collection of inventory location Ids", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "adjustmentTypes", + "in": "query", + "description": "Filter by a collection of adjustment types", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Filter by a collection of business unit Ids", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "syncStatuses", + "in": "query", + "description": "Filter by a collection of sync statues", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customFields.Fields", + "in": "query", + "description": "Collection of custom field pairs (name, value) to filter by", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customFields.Operator", + "in": "query", + "description": "Can be \"Or\" or \"And\"\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "dateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return adjustments with date on or after certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dateBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return adjustments with date before certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.InventoryAdjustmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "number": "string", + "referenceNumber": "string", + "type": "string", + "inventoryLocationId": 0, + "businessUnitId": 0, + "createdById": 0, + "memo": "string", + "date": "string", + "createdOn": "string", + "modifiedOn": "string", + "batchId": 0, + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "syncStatus": {}, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "items": [ + { + "id": 0, + "skuId": 0, + "name": "string", + "code": "string", + "description": "string", + "quantity": 0 + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/adjustments/{id}": { + "patch": { + "tags": [ + "Adjustments" + ], + "summary": "Update an existing adjustment", + "description": "Update an existing adjustment", + "operationId": "Adjustments_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Adjustment Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update Adjustment Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateAdjustmentRequest" + }, + "example": { + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated Adjustment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/adjustments/custom-fields": { + "patch": { + "tags": [ + "Adjustments" + ], + "summary": "Update custom fields on adjustments", + "description": "Update custom fields on adjustments", + "operationId": "Adjustments_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/purchase-orders": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for purchase orders", + "description": "Provides export feed for purchase orders", + "operationId": "Export_PurchaseOrders", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Inventory.V2.ExportPurchaseOrdersResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "number": "string", + "invoiceId": 0, + "jobId": 0, + "projectId": 0, + "status": "string", + "typeId": 0, + "vendorId": 0, + "technicianId": 0, + "shipTo": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "businessUnitId": 0, + "inventoryLocationId": 0, + "batchId": 0, + "vendorDocumentNumber": "string", + "date": "string", + "requiredOn": "string", + "sentOn": "string", + "receivedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "total": 0, + "tax": 0, + "shipping": 0, + "summary": "string", + "items": [ + { + "id": 0, + "skuId": 0, + "skuName": "string", + "skuCode": "string", + "skuType": "string", + "description": "string", + "vendorPartNumber": "string", + "quantity": 0, + "quantityReceived": 0, + "cost": 0, + "total": 0, + "serialNumbers": [ + { + "id": 0, + "number": "string" + } + ], + "status": "string", + "chargeable": true + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-orders": { + "post": { + "tags": [ + "PurchaseOrders" + ], + "summary": "Create a new purchase order", + "description": "Create a new purchase order", + "operationId": "PurchaseOrders_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CreatePurchaseOrderRequest" + }, + "example": { + "vendorId": 0, + "typeId": 0, + "businessUnitId": 0, + "inventoryLocationId": 0, + "jobId": 0, + "technicianId": 0, + "projectId": 0, + "shipTo": { + "description": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + } + }, + "vendorInvoiceNumber": "string", + "impactsTechnicianPayroll": true, + "memo": "string", + "date": "string", + "requiredOn": "string", + "tax": 0, + "shipping": 0, + "items": [ + { + "skuId": 0, + "description": "string", + "vendorPartNumber": "string", + "quantity": 0, + "cost": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "PurchaseOrders" + ], + "summary": "Get a list of purchase orders", + "description": "Get a list of purchase orders", + "operationId": "PurchaseOrders_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filters by PO status\n\\\nAvailable values are: Pending, Sent, PartiallyReceived, Received, Exported, Canceled", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Filters by PO number ", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Filters by JobId associated with PO", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobIds", + "in": "query", + "description": "Filters by JobIds associated with PO", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. Filter by TechnicianId associated with PO", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "projectId", + "in": "query", + "description": "Format - int64. Filter by ProjectId associated with PO", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return POs with date on or after certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dateBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return POs with date before certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sentOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return POs sent on or after certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sentBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return POs sent before certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.PurchaseOrderResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "number": "string", + "invoiceId": 0, + "jobId": 0, + "projectId": 0, + "status": "string", + "typeId": 0, + "vendorId": 0, + "technicianId": 0, + "shipTo": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "businessUnitId": 0, + "inventoryLocationId": 0, + "batchId": 0, + "vendorDocumentNumber": "string", + "date": "string", + "requiredOn": "string", + "sentOn": "string", + "receivedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "total": 0, + "tax": 0, + "shipping": 0, + "summary": "string", + "items": [ + { + "id": 0, + "skuId": 0, + "skuName": "string", + "skuCode": "string", + "skuType": "string", + "description": "string", + "vendorPartNumber": "string", + "quantity": 0, + "quantityReceived": 0, + "cost": 0, + "total": 0, + "serialNumbers": [ + { + "id": 0, + "number": "string" + } + ], + "status": "string", + "chargeable": true + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-orders/{id}": { + "get": { + "tags": [ + "PurchaseOrders" + ], + "summary": "Get purchase order by Id", + "description": "Get purchase order by Id", + "operationId": "PurchaseOrders_GetById", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.PurchaseOrderResponse" + }, + "example": { + "id": 0, + "number": "string", + "invoiceId": 0, + "jobId": 0, + "projectId": 0, + "status": "string", + "typeId": 0, + "vendorId": 0, + "technicianId": 0, + "shipTo": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "businessUnitId": 0, + "inventoryLocationId": 0, + "batchId": 0, + "vendorDocumentNumber": "string", + "date": "string", + "requiredOn": "string", + "sentOn": "string", + "receivedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "total": 0, + "tax": 0, + "shipping": 0, + "summary": "string", + "items": [ + { + "id": 0, + "skuId": 0, + "skuName": "string", + "skuCode": "string", + "skuType": "string", + "description": "string", + "vendorPartNumber": "string", + "quantity": 0, + "quantityReceived": 0, + "cost": 0, + "total": 0, + "serialNumbers": [ + { + "id": 0, + "number": "string" + } + ], + "status": "string", + "chargeable": true + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "PurchaseOrders" + ], + "summary": "Update an existing purchase order", + "description": "Update an existing purchase order", + "operationId": "PurchaseOrders_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdatePurchaseOrderRequest" + }, + "example": { + "vendorId": 0, + "typeId": 0, + "businessUnitId": 0, + "inventoryLocationId": 0, + "jobId": 0, + "technicianId": 0, + "projectId": 0, + "shipTo": { + "description": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + } + }, + "vendorInvoiceNumber": "string", + "impactsTechnicianPayroll": true, + "memo": "string", + "date": "string", + "requiredOn": "string", + "tax": 0, + "shipping": 0, + "items": [ + { + "id": 0, + "skuId": 0, + "description": "string", + "vendorPartNumber": "string", + "quantity": 0, + "cost": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-orders/{id}/cancellation": { + "patch": { + "tags": [ + "PurchaseOrders" + ], + "summary": "Cancel a purchase order", + "description": "Cancel a purchase order", + "operationId": "PurchaseOrders_Cancel", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Return Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Cancel purchase order Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CancelResourceRequest_Of_Inventory.V2.PurchaseOrderCancellationReason" + }, + "example": { + "canceledReason": {} + } + } + } + }, + "responses": { + "200": { + "description": "Id of the cancelled purchase order", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-order-markups": { + "get": { + "tags": [ + "PurchaseOrdersMarkup" + ], + "summary": "Get a list of purchase order markups", + "description": "Get a list of purchase order markups", + "operationId": "PurchaseOrdersMarkup_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.Markups.PurchaseOrderMarkupResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "from": 0, + "to": 0, + "percent": 0, + "id": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "PurchaseOrdersMarkup" + ], + "summary": "Create a new purchase order markup", + "description": "Create a new purchase order markup", + "operationId": "PurchaseOrdersMarkup_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.Markups.CreatePurchaseOrderMarkupRequest" + }, + "example": { + "from": 0, + "to": 0, + "percent": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.Markups.PurchaseOrderMarkupResponse" + }, + "example": { + "from": 0, + "to": 0, + "percent": 0, + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-order-markups/{id}": { + "get": { + "tags": [ + "PurchaseOrdersMarkup" + ], + "summary": "Get purchase order markup by Id", + "description": "Get purchase order markup by Id", + "operationId": "PurchaseOrdersMarkup_GetById", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.Markups.PurchaseOrderMarkupResponse" + }, + "example": { + "from": 0, + "to": 0, + "percent": 0, + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "PurchaseOrdersMarkup" + ], + "summary": "Update an existing purchase order markup", + "description": "Update an existing purchase order markup", + "operationId": "PurchaseOrdersMarkup_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.Markups.UpdatePurchaseOrderMarkupRequest" + }, + "example": { + "from": 0, + "to": 0, + "percent": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.Markups.PurchaseOrderMarkupResponse" + }, + "example": { + "from": 0, + "to": 0, + "percent": 0, + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "PurchaseOrdersMarkup" + ], + "summary": "Deletes aan existing purchase order markup.", + "description": "Deletes aan existing purchase order markup.", + "operationId": "PurchaseOrdersMarkup_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Markup was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-order-types": { + "post": { + "tags": [ + "PurchaseOrderTypes" + ], + "summary": "Create a new Purchase Order Type", + "description": "Create a new Purchase Order Type", + "operationId": "PurchaseOrderTypes_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Request object to create a Purchase Order Type.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CreatePurchaseOrderTypeRequest" + }, + "example": { + "name": "string", + "active": true, + "includeInPoScreen": true, + "automaticallyReceive": true, + "displayToTechnician": true, + "excludeTaxFromJobCosting": true, + "impactToTechnicianPayroll": true, + "allowTechniciansToSendPo": true, + "defaultRequiredDateDaysOffset": 0, + "skipWeekends": true, + "includeInSalesTax": true, + "isDefault": true, + "copyPurchaseOrderItemsToInvoiceWhenReceived": true, + "isDefaultForConsignment": true, + "alertSettings": { + "sendEmailToTechnicianWhenPoMovedToSend": true, + "sendEmailToTechnicianWhenPoMovedToReceived": true, + "sendEmailToPmWhenPoMovedToSend": true, + "sendEmailToPmWhenPoMovedToReceived": true + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the newly created Purchase Order Type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "PurchaseOrderTypes" + ], + "summary": "Get a list of purchase order types", + "description": "Get a list of purchase order types", + "operationId": "PurchaseOrderTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.PurchaseOrderTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "automaticallyReceive": true, + "displayToTechnician": true, + "impactToTechnicianPayroll": true, + "allowTechniciansToSendPo": true, + "defaultRequiredDateDaysOffset": 0, + "skipWeekends": true, + "excludeTaxFromJobCosting": true, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/purchase-order-types/{id}": { + "patch": { + "tags": [ + "PurchaseOrderTypes" + ], + "summary": "Update an existing purchase order type", + "description": "Update an existing purchase order type", + "operationId": "PurchaseOrderTypes_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdatePurchaseOrderTypeRequest" + }, + "example": { + "active": true, + "name": "string", + "includeInPoScreen": true, + "automaticallyReceive": true, + "displayToTechnician": true, + "excludeTaxFromJobCosting": true, + "impactToTechnicianPayroll": true, + "allowTechniciansToSendPo": true, + "defaultRequiredDateDaysOffset": 0, + "skipWeekends": true, + "includeInSalesTax": true, + "isDefault": true, + "copyPurchaseOrderItemsToInvoiceWhenReceived": true, + "isDefaultForConsignment": true, + "alertSettings": { + "sendEmailToTechnicianWhenPoMovedToSend": true, + "sendEmailToTechnicianWhenPoMovedToReceived": true, + "sendEmailToPmWhenPoMovedToSend": true, + "sendEmailToPmWhenPoMovedToReceived": true + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/receipts": { + "get": { + "tags": [ + "Receipts" + ], + "summary": "Get a list of receipts", + "description": "Get a list of receipts", + "operationId": "Receipts_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "vendorInvoiceNumber", + "in": "query", + "description": "Vendor invoice number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "billId", + "in": "query", + "description": "Format - int64. BillId filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64. BatchId filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "vendorIds", + "in": "query", + "description": "Filter by a collection of vendors", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Filter by a collection of business units", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "inventoryLocationIds", + "in": "query", + "description": "Filter by a collection of inventory locations", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "purchaseOrderIds", + "in": "query", + "description": "Filter by a collection of purchase orders", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "syncStatuses", + "in": "query", + "description": "Filter by a collection of sync statuses", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customFields.Fields", + "in": "query", + "description": "Collection of custom field pairs (name, value) to filter by", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customFields.Operator", + "in": "query", + "description": "Can be \"Or\" or \"And\"\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "receivedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return receipts with received date on or after certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "receivedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return receipts with received date before certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.InventoryReceiptResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "number": "string", + "vendorInvoiceNumber": "string", + "createdById": 0, + "memo": "string", + "purchaseOrderId": 0, + "billId": 0, + "jobId": 0, + "businessUnitId": 0, + "vendorId": 0, + "technicianId": 0, + "inventoryLocationId": 0, + "shipTo": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "shipToDescription": "string", + "receiptAmount": 0, + "taxAmount": 0, + "shippingAmount": 0, + "receivedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "batchId": 0, + "syncStatus": {}, + "items": [ + { + "id": 0, + "skuId": 0, + "name": "string", + "code": "string", + "description": "string", + "quantity": 0, + "cost": 0, + "generalLedgerAccount": { + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + } + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Receipts" + ], + "summary": "Create a receipt for Purchase Order", + "description": "Create a receipt for Purchase Order", + "operationId": "Receipts_CreateReceipt", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Request object to create a Purchase Order Receipt.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.ReceivePurchaseOrderRequest" + }, + "example": { + "purchaseOrderId": 0, + "dateReceived": "string", + "vendorDocumentNumber": "string", + "memo": "string", + "tax": 0, + "shipping": 0, + "items": [ + { + "purchaseOrderItemId": 0, + "skuId": 0, + "description": "string", + "vendorPartNumber": "string", + "quantity": 0, + "cost": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Id of the newly created Receipt", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/receipts/custom-fields": { + "patch": { + "tags": [ + "Receipts" + ], + "summary": "Update custom fields on receipts", + "description": "Update custom fields on receipts", + "operationId": "Receipts_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/receipts/{id}/cancellation": { + "patch": { + "tags": [ + "Receipts" + ], + "summary": "Cancel the receipts", + "description": "Cancel the receipts", + "operationId": "Receipts_CancelReceipts", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CancelResourceRequest_Of_Inventory.V2.ReceiptCancellationReason" + }, + "example": { + "canceledReason": {} + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/returns": { + "get": { + "tags": [ + "Returns" + ], + "summary": "Get a list of returns", + "description": "Get a list of returns", + "operationId": "Returns_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "referenceNumber", + "in": "query", + "description": "Reference number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Job filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "purchaseOrderId", + "in": "query", + "description": "Format - int64. Purchase order filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64. Batch filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "vendorIds", + "in": "query", + "description": "Filter by a collection of vendors", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Filter by a collection of business units", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "inventoryLocationIds", + "in": "query", + "description": "Filter by a collection of inventory locations", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "syncStatuses", + "in": "query", + "description": "Filter by a collection of sync statuses", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customFields.Fields", + "in": "query", + "description": "Collection of custom field pairs (name, value) to filter by", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customFields.Operator", + "in": "query", + "description": "Can be \"Or\" or \"And\"\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "returnDateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Filters by returns with return date on or after certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "returnDateBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Filters by returns with return date before certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.InventoryReturnResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "number": "string", + "referenceNumber": "string", + "status": {}, + "vendorId": 0, + "purchaseOrderId": 0, + "jobId": 0, + "businessUnitId": 0, + "inventoryLocationId": 0, + "createdById": 0, + "memo": "string", + "returnAmount": 0, + "taxAmount": 0, + "shippingAmount": 0, + "returnDate": "string", + "returnedOn": "string", + "creditReceivedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "batchId": 0, + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "syncStatus": {}, + "items": [ + { + "id": 0, + "skuId": 0, + "name": "string", + "code": "string", + "description": "string", + "quantity": 0, + "cost": 0, + "generalLedgerAccount": { + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "costOfSaleAccount": { + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + }, + "assetAccount": { + "name": "string", + "number": "string", + "type": "string", + "detailType": "string" + } + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Returns" + ], + "summary": "Create a Return", + "description": "Create a Return", + "operationId": "Returns_CreateReturn", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Create Return Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CreateInventoryReturnRequest" + }, + "example": { + "vendorId": 0, + "jobId": 0, + "purchaseOrderId": 0, + "returnTypeId": 0, + "businessUnitId": 0, + "referenceNumber": "string", + "inventoryLocationId": 0, + "returnDate": "string", + "memo": "string", + "tax": 0, + "shipping": 0, + "restockingFee": 0, + "items": [ + { + "skuId": 0, + "description": "string", + "quantity": 0, + "cost": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Id of the created Return", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/returns/custom-fields": { + "patch": { + "tags": [ + "Returns" + ], + "summary": "Update custom fields on returns", + "description": "Update custom fields on returns", + "operationId": "Returns_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/returns/{id}": { + "patch": { + "tags": [ + "Returns" + ], + "summary": "Update an existing Return", + "description": "Update an existing Return", + "operationId": "Returns_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Return Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update Return Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateReturnRequest" + }, + "example": { + "returnTypeId": 0, + "businessUnitId": 0, + "referenceNumber": "string", + "inventoryLocationId": 0, + "returnDate": "string", + "memo": "string", + "tax": 0, + "shipping": 0, + "restockingFee": 0, + "items": [ + { + "id": 0, + "skuId": 0, + "itemDescription": "string", + "quantity": 0, + "cost": 0 + } + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated Return", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/returns/{id}/cancellation": { + "patch": { + "tags": [ + "Returns" + ], + "summary": "Cancel a Return", + "description": "Cancel a Return", + "operationId": "Returns_Cancel", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Return Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Cancel Return Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CancelResourceRequest_Of_Inventory.V2.ReturnCancellationReason" + }, + "example": { + "canceledReason": {} + } + } + } + }, + "responses": { + "200": { + "description": "Id of the cancelled Return", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/return-types": { + "post": { + "tags": [ + "ReturnTypes" + ], + "summary": "Create a new Return Type", + "description": "Create a new Return Type", + "operationId": "ReturnTypes_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Request object to create a Return Type.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CreateReturnTypeRequest" + }, + "example": { + "name": "string", + "automaticallyReceiveVendorCredit": true, + "includeInSalesTax": true, + "isDefault": true, + "isDefaultForConsignment": true + } + } + } + }, + "responses": { + "200": { + "description": "Id of the newly created Return Type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "ReturnTypes" + ], + "summary": "Returns the list of Return Types", + "description": "Returns the list of Return Types", + "operationId": "ReturnTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "activeOnly", + "in": "query", + "description": "Filter by active only", + "required": true, + "schema": { + "type": "boolean" + } + }, + { + "name": "name", + "in": "query", + "description": "Filter by name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by specified fields", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Paginated list of the Return Types", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.ListReturnTypesResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "automaticallyReceiveVendorCredit": true, + "includeInSalesTax": true, + "active": true, + "isDefault": true, + "isDefaultForConsignment": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/return-types/{id}": { + "patch": { + "tags": [ + "ReturnTypes" + ], + "summary": "Update an existing Return Type", + "description": "Update an existing Return Type", + "operationId": "ReturnTypes_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Return Type Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Request object to update a Return Type.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateReturnTypeRequest" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "automaticallyReceiveVendorCredit": true, + "includeInSalesTax": true, + "isDefault": true, + "isDefaultForConsignment": true + } + } + } + }, + "responses": { + "200": { + "description": "Id of the newly created Return Type", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/transfers": { + "get": { + "tags": [ + "Transfers" + ], + "summary": "Get a list of transfers", + "description": "Get a list of transfers", + "operationId": "Transfers_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "statuses", + "in": "query", + "description": "Filter by a collection of statuses", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "referenceNumber", + "in": "query", + "description": "Reference number filter", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "batchId", + "in": "query", + "description": "Format - int64. Batch filter", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "transferTypeIds", + "in": "query", + "description": "Filter by a collection of transfer types", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "fromLocationIds", + "in": "query", + "description": "Filter by a collection of From field locations", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "toLocationIds", + "in": "query", + "description": "Filter by a collection of To field locations ", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "syncStatuses", + "in": "query", + "description": "Filter by a collection of sync statuses", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customFields.Fields", + "in": "query", + "description": "Collection of custom field pairs (name, value) to filter by", + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "nullable": true + } + }, + { + "name": "customFields.Operator", + "in": "query", + "description": "Can be \"Or\" or \"And\"\\\nValues: [And, Or]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.LogicalOperator" + } + ], + "nullable": true + } + }, + { + "name": "dateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return transfers with date on or after certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dateBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return transfers with date before certain date/time", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.InventoryTransferResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "transferType": "string", + "status": "string", + "number": "string", + "referenceNumber": "string", + "fromLocationId": 0, + "toLocationId": 0, + "createdById": 0, + "memo": "string", + "date": "string", + "pickedDate": "string", + "receivedDate": "string", + "createdOn": "string", + "modifiedOn": "string", + "batchId": 0, + "batch": { + "id": 0, + "number": "string", + "name": "string" + }, + "syncStatus": {}, + "items": [ + { + "id": 0, + "skuId": 0, + "name": "string", + "code": "string", + "description": "string", + "quantity": 0 + } + ], + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/transfers/custom-fields": { + "patch": { + "tags": [ + "Transfers" + ], + "summary": "Update custom fields on transfers", + "description": "Update custom fields on transfers", + "operationId": "Transfers_UpdateCustomFields", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldUpdateRequest" + }, + "example": { + "operations": [ + { + "objectId": 0, + "customFields": [ + { + "name": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/transfers/{id}": { + "patch": { + "tags": [ + "Transfers" + ], + "summary": "Update an existing Transfer", + "description": "Update an existing Transfer", + "operationId": "Transfers_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Transfer Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update Transfer Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateTransferRequest" + }, + "example": { + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated Transfer", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/trucks": { + "get": { + "tags": [ + "Trucks" + ], + "summary": "Get a list of trucks", + "description": "Get a list of trucks", + "operationId": "Trucks_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.TruckResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "memo": "string", + "warehouseId": 0, + "technicianIds": [ + 0 + ], + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/trucks/{id}": { + "patch": { + "tags": [ + "Trucks" + ], + "summary": "Update an existing truck", + "description": "Update an existing truck", + "operationId": "Trucks_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Truck Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update Truck Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateTruckRequest" + }, + "example": { + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated Truck", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/vendors": { + "post": { + "tags": [ + "Vendors" + ], + "summary": "Create a new vendor", + "description": "Create a new vendor", + "operationId": "Vendors_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.CreateVendorRequest" + }, + "example": { + "name": "string", + "active": true, + "memo": "string", + "firstName": "string", + "lastName": "string", + "phone": "string", + "email": "string", + "fax": "string", + "isTruckReplenishment": true, + "deliveryOption": {}, + "taxRate": 0, + "restrictedMobileCreation": true, + "vendorQuickbooksItem": "string", + "paymentTermId": 0, + "remittanceVendorId": 0, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "tags": [ + { + "tagTypeId": 0 + } + ], + "vendorContacts": [ + { + "name": "string", + "email": "string" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Id of the newly created Vendor", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "Vendors" + ], + "summary": "Get a list of vendors", + "description": "Get a list of vendors", + "operationId": "Vendors_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Ids to filter by", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.VendorResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "isTruckReplenishment": true, + "isMobileCreationRestricted": true, + "memo": "string", + "deliveryOption": "string", + "defaultTaxRate": 0, + "contactInfo": { + "firstName": "string", + "lastName": "string", + "phone": "string", + "email": "string", + "fax": "string" + }, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/vendors/{id}": { + "get": { + "tags": [ + "Vendors" + ], + "summary": "Get vendor by Id", + "description": "Get vendor by Id", + "operationId": "Vendors_GetById", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.VendorResponse" + }, + "example": { + "id": 0, + "name": "string", + "active": true, + "isTruckReplenishment": true, + "isMobileCreationRestricted": true, + "memo": "string", + "deliveryOption": "string", + "defaultTaxRate": 0, + "contactInfo": { + "firstName": "string", + "lastName": "string", + "phone": "string", + "email": "string", + "fax": "string" + }, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Vendors" + ], + "summary": "Update an existing vendor", + "description": "Update an existing vendor", + "operationId": "Vendors_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Vendor Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update Vendor Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateVendorRequest" + }, + "example": { + "name": "string", + "active": true, + "memo": "string", + "firstName": "string", + "lastName": "string", + "phone": "string", + "email": "string", + "fax": "string", + "isTruckReplenishment": true, + "deliveryOption": {}, + "taxRate": 0, + "restrictedMobileCreation": true, + "vendorQuickbooksItem": "string", + "paymentTermId": 0, + "remittanceVendorId": 0, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "tags": [ + { + "tagTypeId": 0 + } + ], + "vendorContacts": [ + { + "id": 0, + "name": "string", + "email": "string" + } + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated Vendor", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/warehouses": { + "get": { + "tags": [ + "Warehouses" + ], + "summary": "Get a list of warehouses", + "description": "Get a list of warehouses", + "operationId": "Warehouses_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Inventory.V2.WarehouseResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/warehouses/{id}": { + "patch": { + "tags": [ + "Warehouses" + ], + "summary": "Update an existing warehouse", + "description": "Update an existing warehouse", + "operationId": "Warehouses_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Warehouse Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update Warehouse Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Inventory.V2.UpdateWarehouseRequest" + }, + "example": { + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated Warehouse", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Inventory.V2.InventoryAdjustmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryAdjustmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.InventoryAdjustmentResponse": { + "required": [ + "id", + "active", + "number", + "referenceNumber", + "type", + "inventoryLocationId", + "memo", + "date", + "createdOn", + "modifiedOn", + "syncStatus", + "externalData", + "items", + "customFields" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Inventory adjustment Id", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Is active" + }, + "number": { + "type": "string", + "description": "Number" + }, + "referenceNumber": { + "type": "string", + "description": "Reference number" + }, + "type": { + "type": "string", + "description": "Inventory Adjustment Type" + }, + "inventoryLocationId": { + "type": "integer", + "description": "Id of Inventory Location for this adjustment", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Business Unit Id", + "format": "int64", + "nullable": true + }, + "createdById": { + "type": "integer", + "description": "Employee who created this adjustment", + "format": "int64", + "nullable": true + }, + "memo": { + "type": "string", + "description": "memo/summary field", + "format": "multiline" + }, + "date": { + "type": "string", + "description": "Adjustment date", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "description": "system created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "last time adjustment was modified date", + "format": "date-time" + }, + "batchId": { + "type": "integer", + "description": "Batch Id (Deprecated - Use Batch instead)", + "format": "int64", + "nullable": true, + "deprecated": true, + "x-deprecatedMessage": "Use Batch instead" + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.BatchResponse" + } + ], + "description": "Batch", + "nullable": true + }, + "syncStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.SyncStatus" + } + ], + "description": "Sync status" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "List of external data attached to this warehouse,\nthat corresponds to the application guid provided in the request." + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryAdjustmentItemResponse" + }, + "description": "Collection of adjustment items" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldResponse" + }, + "description": "Collection of custom fields" + } + }, + "additionalProperties": false, + "description": "Inventory adjustment response" + }, + "Inventory.V2.BatchResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Batch Id", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Batch number", + "nullable": true + }, + "name": { + "type": "string", + "description": "Batch name", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents Batch response" + }, + "Inventory.V2.SyncStatus": { + "enum": [ + "Pending", + "Posted", + "Exported" + ], + "type": "string", + "description": "Sync status enum", + "x-enumNames": [ + "Pending", + "Posted", + "Exported" + ] + }, + "Inventory.V2.ExternalDataModel": { + "required": [ + "key", + "value" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value." + } + }, + "additionalProperties": false + }, + "Inventory.V2.InventoryAdjustmentItemResponse": { + "required": [ + "id", + "skuId", + "name", + "code", + "description", + "quantity" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Item Id", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "Sku Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Item name" + }, + "code": { + "type": "string", + "description": "Item code" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html" + }, + "quantity": { + "type": "number", + "description": "Adjustment quantity", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Inventory adjustment item response" + }, + "Inventory.V2.CustomFieldResponse": { + "required": [ + "typeId", + "name", + "value" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "description": "Id of custom field type", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Custom field name" + }, + "value": { + "type": "string", + "description": "Custom field value" + } + }, + "additionalProperties": false, + "description": "Represents custom field response" + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Inventory.V2.LogicalOperator": { + "enum": [ + "And", + "Or" + ], + "type": "string", + "description": "Logical operator used for querying custom fields", + "x-enumNames": [ + "And", + "Or" + ] + }, + "ModificationResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of created/updated object", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Default response when creating object with a new ID, or updating object by specified ID." + }, + "Inventory.V2.UpdateAdjustmentRequest": { + "type": "object", + "properties": { + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateRequest" + } + ], + "description": "Contains a list of external data items that should be attached to this adjustment" + } + }, + "additionalProperties": false, + "description": "Represents request to update adjustment" + }, + "Inventory.V2.ExternalDataUpdateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "patchMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataPatchMode" + } + ], + "description": "External data patch mode.\\\n\"Replace\" (default) replaces all existing keys with new values. If job A has custom data with keys X and Y and this field only contains an item\nwith a key X, then custom data with a key Y on job A will be removed.\\\n\"Merge\" will only replace key X in the example above. Keys with null value will be deleted.", + "nullable": true + }, + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Inventory.V2.ExternalDataPatchMode": { + "enum": [ + "Replace", + "Merge" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Replace", + "Merge" + ] + }, + "Inventory.V2.ExternalDataUpdateModel": { + "required": [ + "key" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Inventory.V2.CustomFieldUpdateRequest": { + "required": [ + "operations" + ], + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldOperationRequest" + }, + "description": "Collection of custom field update operations" + } + }, + "additionalProperties": false, + "description": "Represents a batch request to update custom fields" + }, + "Inventory.V2.CustomFieldOperationRequest": { + "required": [ + "objectId", + "customFields" + ], + "type": "object", + "properties": { + "objectId": { + "type": "integer", + "description": "Id of inventory transaction where custom fields will be updated", + "format": "int64" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldRequest" + }, + "description": "Collection of custom fields to be updated" + } + }, + "additionalProperties": false, + "description": "Represents a request to update custom fields on a single transaction" + }, + "Inventory.V2.CustomFieldRequest": { + "required": [ + "name", + "value" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Custom field name" + }, + "value": { + "type": "string", + "description": "Custom field value" + } + }, + "additionalProperties": false, + "description": "Request model to update a single custom field" + }, + "ExportResponse_Of_Inventory.V2.ExportPurchaseOrdersResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExportPurchaseOrdersResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Inventory.V2.ExportPurchaseOrdersResponse": { + "required": [ + "id", + "number", + "status", + "typeId", + "vendorId", + "shipTo", + "vendorDocumentNumber", + "date", + "createdOn", + "modifiedOn", + "total", + "tax", + "shipping", + "summary", + "items", + "customFields" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Purchase order Id", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Purchase order number" + }, + "invoiceId": { + "type": "integer", + "description": "Id of invoice associated with PO", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "Id of job associated with PO", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of project associated with PO", + "format": "int64", + "nullable": true + }, + "status": { + "type": "string", + "description": "Status of this PO" + }, + "typeId": { + "type": "integer", + "description": "The purchase order type Id of this PO", + "format": "int64" + }, + "vendorId": { + "type": "integer", + "description": "Id of vendor for this PO", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Id of technician for this PO", + "format": "int64", + "nullable": true + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressResponse" + } + ], + "description": "Shipping address for this PO" + }, + "businessUnitId": { + "type": "integer", + "description": "Id of business unit for this PO", + "format": "int64", + "nullable": true + }, + "inventoryLocationId": { + "type": "integer", + "description": "Inventory location Id of PO", + "format": "int64", + "nullable": true + }, + "batchId": { + "type": "integer", + "description": "Batch Id of PO", + "format": "int64", + "nullable": true + }, + "vendorDocumentNumber": { + "type": "string", + "description": "Vendor document number of PO" + }, + "date": { + "type": "string", + "description": "PO date", + "format": "date-time" + }, + "requiredOn": { + "type": "string", + "description": "PO required on date", + "format": "date-time", + "nullable": true + }, + "sentOn": { + "type": "string", + "description": "PO sent on date", + "format": "date-time", + "nullable": true + }, + "receivedOn": { + "type": "string", + "description": "PO received on date", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When PO was created, system date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When PO was last modified, system date", + "format": "date-time" + }, + "total": { + "type": "number", + "description": "PO total, including items cost, tax and shipping cost", + "format": "decimal" + }, + "tax": { + "type": "number", + "description": "PO tax", + "format": "decimal" + }, + "shipping": { + "type": "number", + "description": "PO shipping cost", + "format": "decimal" + }, + "summary": { + "type": "string", + "description": "PO summary/memo", + "format": "multiline" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.PurchaseOrderItemResponse" + }, + "description": "List of PO items" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldResponse" + }, + "description": "List of custom fields for this PO" + } + }, + "additionalProperties": false + }, + "Inventory.V2.AddressResponse": { + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street", + "nullable": true + }, + "unit": { + "type": "string", + "description": "Unit", + "nullable": true + }, + "city": { + "type": "string", + "description": "City", + "nullable": true + }, + "state": { + "type": "string", + "description": "State", + "nullable": true + }, + "zip": { + "type": "string", + "description": "Zip code", + "nullable": true + }, + "country": { + "type": "string", + "description": "Country code", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents address response" + }, + "Inventory.V2.PurchaseOrderItemResponse": { + "required": [ + "id", + "skuId", + "skuName", + "skuCode", + "skuType", + "description", + "vendorPartNumber", + "quantity", + "quantityReceived", + "cost", + "total", + "serialNumbers", + "status", + "chargeable" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Item Id", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "SKU Id of this item", + "format": "int64" + }, + "skuName": { + "type": "string", + "description": "Item name" + }, + "skuCode": { + "type": "string", + "description": "Item code" + }, + "skuType": { + "type": "string", + "description": "Item type(material or equipment)" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html" + }, + "vendorPartNumber": { + "type": "string", + "description": "Vendor part number for this item" + }, + "quantity": { + "type": "number", + "description": "Item quantity", + "format": "decimal" + }, + "quantityReceived": { + "type": "number", + "description": "Quantity received for this item, PO must have at least one receipt for this to be not 0", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Item cost", + "format": "decimal" + }, + "total": { + "type": "number", + "description": "Item total cost", + "format": "decimal" + }, + "serialNumbers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.SerialNumberResponse" + }, + "description": "List of serial numbers" + }, + "status": { + "type": "string", + "description": "Item status" + }, + "chargeable": { + "type": "boolean", + "description": "Indicates whether item price is charged to customer" + } + }, + "additionalProperties": false, + "description": "Represents purchase order item response" + }, + "Inventory.V2.SerialNumberResponse": { + "required": [ + "id", + "number" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of this serial number", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Serial number value" + } + }, + "additionalProperties": false, + "description": "Represents serial number response" + }, + "Inventory.V2.CreatePurchaseOrderRequest": { + "required": [ + "vendorId", + "typeId", + "businessUnitId", + "inventoryLocationId", + "shipTo", + "impactsTechnicianPayroll", + "date", + "requiredOn", + "tax", + "shipping", + "items" + ], + "type": "object", + "properties": { + "vendorId": { + "type": "integer", + "description": "Id of the vendor for this PO", + "format": "int64" + }, + "typeId": { + "type": "integer", + "description": "Id of the purchase order type for this PO", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Id of the business unit for this PO", + "format": "int64" + }, + "inventoryLocationId": { + "type": "integer", + "description": "Id of the inventory location for this PO", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "Id of the job for this PO, if not specified non-job PO will be created", + "format": "int64", + "nullable": true + }, + "technicianId": { + "type": "integer", + "description": "Id of the technician for this PO", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of the project for this PO", + "format": "int64", + "nullable": true + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.CreateAddressRequest" + } + ], + "description": "Address where PO will be shipped" + }, + "vendorInvoiceNumber": { + "type": "string", + "description": "Optional vendor invoice number, you should provide it for auto-received POs", + "nullable": true + }, + "impactsTechnicianPayroll": { + "type": "boolean", + "description": "Indicates whether this PO will impact technician's payroll" + }, + "memo": { + "type": "string", + "description": "Summary/memo for this PO", + "format": "multiline", + "nullable": true + }, + "date": { + "type": "string", + "description": "PO date", + "format": "date-time" + }, + "requiredOn": { + "type": "string", + "description": "PO Required On date", + "format": "date-time" + }, + "tax": { + "type": "number", + "description": "Tax", + "format": "decimal" + }, + "shipping": { + "type": "number", + "description": "Shipping cost", + "format": "decimal" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CreatePurchaseOrderItemRequest" + }, + "description": "List of PO items" + } + }, + "additionalProperties": false, + "description": "Request model to create PO" + }, + "Inventory.V2.CreateAddressRequest": { + "required": [ + "description", + "address" + ], + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the shipping address, like customer address or technician's truck for example" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressRequest" + } + ], + "description": "Actual shipping address" + } + }, + "additionalProperties": false, + "description": "Request model for address with description" + }, + "Inventory.V2.AddressRequest": { + "required": [ + "street", + "unit", + "city", + "state", + "zip", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street" + }, + "unit": { + "type": "string", + "description": "Unit" + }, + "city": { + "type": "string", + "description": "City" + }, + "state": { + "type": "string", + "description": "State" + }, + "zip": { + "type": "string", + "description": "Zip code" + }, + "country": { + "type": "string", + "description": "Country code" + } + }, + "additionalProperties": false, + "description": "Request model for actual address" + }, + "Inventory.V2.CreatePurchaseOrderItemRequest": { + "required": [ + "skuId", + "description", + "vendorPartNumber", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Id of the SKU from pricebook, can be any active material or equipment", + "format": "int64" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html" + }, + "vendorPartNumber": { + "type": "string", + "description": "Part number of this item for current vendor" + }, + "quantity": { + "type": "number", + "description": "Item quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Item cost", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Request model for new PO item" + }, + "PaginatedResponse_Of_Inventory.V2.PurchaseOrderResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.PurchaseOrderResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.PurchaseOrderResponse": { + "required": [ + "id", + "number", + "status", + "typeId", + "vendorId", + "shipTo", + "vendorDocumentNumber", + "date", + "createdOn", + "modifiedOn", + "total", + "tax", + "shipping", + "summary", + "items", + "customFields" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Purchase order Id", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Purchase order number" + }, + "invoiceId": { + "type": "integer", + "description": "Id of invoice associated with PO", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "Id of job associated with PO", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "Id of project associated with PO", + "format": "int64", + "nullable": true + }, + "status": { + "type": "string", + "description": "Status of this PO" + }, + "typeId": { + "type": "integer", + "description": "The purchase order type Id of this PO", + "format": "int64" + }, + "vendorId": { + "type": "integer", + "description": "Id of vendor for this PO", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Id of technician for this PO", + "format": "int64", + "nullable": true + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressResponse" + } + ], + "description": "Shipping address for this PO" + }, + "businessUnitId": { + "type": "integer", + "description": "Id of business unit for this PO", + "format": "int64", + "nullable": true + }, + "inventoryLocationId": { + "type": "integer", + "description": "Inventory location Id of PO", + "format": "int64", + "nullable": true + }, + "batchId": { + "type": "integer", + "description": "Batch Id of PO", + "format": "int64", + "nullable": true + }, + "vendorDocumentNumber": { + "type": "string", + "description": "Vendor document number of PO" + }, + "date": { + "type": "string", + "description": "PO date", + "format": "date-time" + }, + "requiredOn": { + "type": "string", + "description": "PO required on date", + "format": "date-time", + "nullable": true + }, + "sentOn": { + "type": "string", + "description": "PO sent on date", + "format": "date-time", + "nullable": true + }, + "receivedOn": { + "type": "string", + "description": "PO received on date", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When PO was created, system date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When PO was last modified, system date", + "format": "date-time" + }, + "total": { + "type": "number", + "description": "PO total, including items cost, tax and shipping cost", + "format": "decimal" + }, + "tax": { + "type": "number", + "description": "PO tax", + "format": "decimal" + }, + "shipping": { + "type": "number", + "description": "PO shipping cost", + "format": "decimal" + }, + "summary": { + "type": "string", + "description": "PO summary/memo", + "format": "multiline" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.PurchaseOrderItemResponse" + }, + "description": "List of PO items" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldResponse" + }, + "description": "List of custom fields for this PO" + } + }, + "additionalProperties": false, + "description": "Represents purchase order response" + }, + "Inventory.V2.UpdatePurchaseOrderRequest": { + "type": "object", + "properties": { + "vendorId": { + "type": "integer", + "description": "Id of the vendor for this PO", + "format": "int64" + }, + "typeId": { + "type": "integer", + "description": "Id of the purchase order type for this PO", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Id of the business unit for this PO", + "format": "int64" + }, + "inventoryLocationId": { + "type": "integer", + "description": "Id of the inventory location for this PO", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "Id of the job for this PO, if not specified non-job PO will be created", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Id of the technician for this PO", + "format": "int64" + }, + "projectId": { + "type": "integer", + "description": "Id of the project for this PO", + "format": "int64" + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.UpdateAddressRequest" + } + ], + "description": "Address where PO will be shipped" + }, + "vendorInvoiceNumber": { + "type": "string", + "description": "Vendor invoice number" + }, + "impactsTechnicianPayroll": { + "type": "boolean", + "description": "Indicates whether this PO will impact technician's payroll" + }, + "memo": { + "type": "string", + "description": "Summary/memo for this PO", + "format": "multiline" + }, + "date": { + "type": "string", + "description": "PO date", + "format": "date-time" + }, + "requiredOn": { + "type": "string", + "description": "PO Required On date", + "format": "date-time" + }, + "tax": { + "type": "number", + "description": "Tax", + "format": "decimal" + }, + "shipping": { + "type": "number", + "description": "Shipping cost", + "format": "decimal" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.UpdatePurchaseOrderItemRequest" + }, + "description": "List of new/updated PO items. Every active PO item that is not on this list will be marked as inactive" + } + }, + "additionalProperties": false, + "description": "Represents a request to update single purchase order" + }, + "Inventory.V2.UpdateAddressRequest": { + "required": [ + "description", + "address" + ], + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "Description of the shipping address, like customer address or technician's truck for example" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressRequest" + } + ], + "description": "Actual shipping address" + } + }, + "additionalProperties": false, + "description": "Update address with description request" + }, + "Inventory.V2.UpdatePurchaseOrderItemRequest": { + "required": [ + "id", + "skuId", + "description", + "vendorPartNumber", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of purchase order item to update", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "Id of the SKU from pricebook, can be any active material or equipment", + "format": "int64" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html" + }, + "vendorPartNumber": { + "type": "string", + "description": "Part number of this item for current vendor" + }, + "quantity": { + "type": "number", + "description": "Item quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Item cost", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Update purchase order item request" + }, + "Inventory.V2.CancelResourceRequest_Of_Inventory.V2.PurchaseOrderCancellationReason": { + "type": "object", + "properties": { + "canceledReason": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.PurchaseOrderCancellationReason" + } + ], + "description": "Resource cancellation reason" + } + }, + "additionalProperties": false, + "description": "Cancel Resource Request" + }, + "Inventory.V2.PurchaseOrderCancellationReason": { + "enum": [ + "NotRequired", + "NotRequired", + "Duplicate", + "Accidental", + "VendorIssue", + "Other", + "JobCanceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Default", + "NotRequired", + "Duplicate", + "Accidental", + "VendorIssue", + "Other", + "JobCanceled" + ] + }, + "PaginatedResponse_Of_Inventory.V2.Markups.PurchaseOrderMarkupResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.Markups.PurchaseOrderMarkupResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.Markups.PurchaseOrderMarkupResponse": { + "required": [ + "from", + "to", + "percent", + "id" + ], + "type": "object", + "properties": { + "from": { + "type": "number", + "format": "decimal" + }, + "to": { + "type": "number", + "format": "decimal" + }, + "percent": { + "type": "number", + "format": "decimal" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Represents purchase order markup response" + }, + "Inventory.V2.Markups.CreatePurchaseOrderMarkupRequest": { + "required": [ + "from", + "to", + "percent" + ], + "type": "object", + "properties": { + "from": { + "type": "number", + "format": "decimal" + }, + "to": { + "type": "number", + "format": "decimal" + }, + "percent": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Represents create purchase order markup request" + }, + "Inventory.V2.Markups.UpdatePurchaseOrderMarkupRequest": { + "required": [ + "from", + "to", + "percent" + ], + "type": "object", + "properties": { + "from": { + "type": "number", + "format": "decimal" + }, + "to": { + "type": "number", + "format": "decimal" + }, + "percent": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Represents update purchase order markup request" + }, + "Inventory.V2.CreatePurchaseOrderTypeRequest": { + "required": [ + "name", + "active", + "includeInPoScreen", + "automaticallyReceive", + "displayToTechnician", + "excludeTaxFromJobCosting", + "impactToTechnicianPayroll", + "allowTechniciansToSendPo", + "defaultRequiredDateDaysOffset", + "skipWeekends", + "includeInSalesTax", + "isDefault", + "copyPurchaseOrderItemsToInvoiceWhenReceived", + "isDefaultForConsignment", + "alertSettings" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Purchase Order Type" + }, + "active": { + "type": "boolean", + "description": "Active" + }, + "includeInPoScreen": { + "type": "boolean", + "description": "Include in PO Screen" + }, + "automaticallyReceive": { + "type": "boolean", + "description": "Automatically receive purchase order" + }, + "displayToTechnician": { + "type": "boolean", + "description": "Display purchase order type to technician" + }, + "excludeTaxFromJobCosting": { + "type": "boolean", + "description": "Exclude Tax From Job Costing" + }, + "impactToTechnicianPayroll": { + "type": "boolean", + "description": "Default Selection for Impact to Technician Payroll on Purchase Order" + }, + "allowTechniciansToSendPo": { + "type": "boolean", + "description": "Allow permitted technicians to send and receive POs of this type" + }, + "defaultRequiredDateDaysOffset": { + "type": "integer", + "description": "Default number of days to offset required date", + "format": "int32" + }, + "skipWeekends": { + "type": "boolean", + "description": "Skip weekends" + }, + "includeInSalesTax": { + "type": "boolean", + "description": "Include Purchase Order Total in the Sales Tax Calculation" + }, + "isDefault": { + "type": "boolean", + "description": "Is Purchase Order Type Default" + }, + "copyPurchaseOrderItemsToInvoiceWhenReceived": { + "type": "boolean", + "description": "Copy Purchase Order Items To Invoice When Received" + }, + "isDefaultForConsignment": { + "type": "boolean", + "description": "Is Default For Consignment" + }, + "alertSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.PoTypeAlertSettings" + } + ], + "description": "Alert definition for the Purchase Order Type" + } + }, + "additionalProperties": false, + "description": "Request model to create Purchase Order Types\n " + }, + "Inventory.PoTypeAlertSettings": { + "required": [ + "sendEmailToTechnicianWhenPoMovedToSend", + "sendEmailToTechnicianWhenPoMovedToReceived", + "sendEmailToPmWhenPoMovedToSend", + "sendEmailToPmWhenPoMovedToReceived" + ], + "type": "object", + "properties": { + "sendEmailToTechnicianWhenPoMovedToSend": { + "type": "boolean", + "description": "Send Email To Technician When PO Moved To Send" + }, + "sendEmailToTechnicianWhenPoMovedToReceived": { + "type": "boolean", + "description": "Send Email To Technician When PO Moved To Receive" + }, + "sendEmailToPmWhenPoMovedToSend": { + "type": "boolean", + "description": "Send Email To PM When PO Moved To Send" + }, + "sendEmailToPmWhenPoMovedToReceived": { + "type": "boolean", + "description": "Send Email To PM When PO Moved To Receive" + } + }, + "additionalProperties": false, + "description": "Purchase Order Type Alert settings\n " + }, + "PaginatedResponse_Of_Inventory.V2.PurchaseOrderTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.PurchaseOrderTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.PurchaseOrderTypeResponse": { + "required": [ + "id", + "name", + "active", + "automaticallyReceive", + "displayToTechnician", + "impactToTechnicianPayroll", + "allowTechniciansToSendPo", + "defaultRequiredDateDaysOffset", + "skipWeekends", + "excludeTaxFromJobCosting", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Purchase order type Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Purchase order type Name" + }, + "active": { + "type": "boolean", + "description": "Active" + }, + "automaticallyReceive": { + "type": "boolean", + "description": "Automatically receive purchase order" + }, + "displayToTechnician": { + "type": "boolean", + "description": "Display purchase order type to technicain on mobile" + }, + "impactToTechnicianPayroll": { + "type": "boolean", + "description": "Default Selection for Impact to Technician Payroll on Purchase Order" + }, + "allowTechniciansToSendPo": { + "type": "boolean", + "description": "Allow permitted technicians to send and receive POs of this type" + }, + "defaultRequiredDateDaysOffset": { + "type": "integer", + "description": "Default number of days to offset required date", + "format": "int32" + }, + "skipWeekends": { + "type": "boolean", + "description": "Skip weekends" + }, + "excludeTaxFromJobCosting": { + "type": "boolean", + "description": "Exclude tax from job costing" + }, + "createdOn": { + "type": "string", + "description": "System created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Last time purchase order type was modified date", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "Represents purchase order type response" + }, + "Inventory.V2.UpdatePurchaseOrderTypeRequest": { + "type": "object", + "properties": { + "active": { + "type": "boolean", + "description": "Is the Purchase Order Type Active" + }, + "name": { + "type": "string", + "description": "Name of the Purchase Order Type" + }, + "includeInPoScreen": { + "type": "boolean", + "description": "Should the Purchase Order Type be included in the Purchase Order screen" + }, + "automaticallyReceive": { + "type": "boolean", + "description": "Should the Purchase Order be automatically received" + }, + "displayToTechnician": { + "type": "boolean", + "description": "Should the Purchase Order Type be displayed to the technician on mobile" + }, + "excludeTaxFromJobCosting": { + "type": "boolean", + "description": "Should the Purchase Order Type be excluded from job costing" + }, + "impactToTechnicianPayroll": { + "type": "boolean", + "description": "Should the Purchase Order Type impact technician payroll" + }, + "allowTechniciansToSendPo": { + "type": "boolean", + "description": "Should the Purchase Order Type allow technicians to send POs" + }, + "defaultRequiredDateDaysOffset": { + "type": "integer", + "description": "Default number of days to offset required date", + "format": "int32" + }, + "skipWeekends": { + "type": "boolean", + "description": "Skip weekends" + }, + "includeInSalesTax": { + "type": "boolean", + "description": "Should the Purchase Order Type be included in sales tax" + }, + "isDefault": { + "type": "boolean", + "description": "Should the Purchase Order Type be the default" + }, + "copyPurchaseOrderItemsToInvoiceWhenReceived": { + "type": "boolean", + "description": "Should the Purchase Order Type copy purchase order items to invoice when received" + }, + "isDefaultForConsignment": { + "type": "boolean", + "description": "Should the Purchase Order Type be the default for consignment" + }, + "alertSettings": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.PoTypeAlertSettings" + } + ], + "description": "Alert definition for the Purchase Order Type" + } + }, + "additionalProperties": false, + "description": "Request model to Update Purchase Order Types" + }, + "PaginatedResponse_Of_Inventory.V2.InventoryReceiptResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryReceiptResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.InventoryReceiptResponse": { + "required": [ + "id", + "active", + "number", + "vendorInvoiceNumber", + "memo", + "purchaseOrderId", + "vendorId", + "inventoryLocationId", + "shipToDescription", + "receiptAmount", + "taxAmount", + "shippingAmount", + "createdOn", + "modifiedOn", + "syncStatus", + "items", + "customFields" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Receipt Id", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Is active" + }, + "number": { + "type": "string", + "description": "Number" + }, + "vendorInvoiceNumber": { + "type": "string", + "description": "Vendor invoice number" + }, + "createdById": { + "type": "integer", + "description": "User who created this receipt", + "format": "int64", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo/summary field", + "format": "multiline" + }, + "purchaseOrderId": { + "type": "integer", + "description": "Id of purchase order", + "format": "int64" + }, + "billId": { + "type": "integer", + "description": "Id of bill", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "Id of job", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Id of business unit", + "format": "int64", + "nullable": true + }, + "vendorId": { + "type": "integer", + "description": "Id of vendor", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Id of technician", + "format": "int64", + "nullable": true + }, + "inventoryLocationId": { + "type": "integer", + "description": "Id of inventory location", + "format": "int64" + }, + "shipTo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressResponse" + } + ], + "description": "Ship to address", + "nullable": true + }, + "shipToDescription": { + "type": "string", + "description": "Ship to description" + }, + "receiptAmount": { + "type": "number", + "description": "Receipt total, including tax and shipping", + "format": "decimal" + }, + "taxAmount": { + "type": "number", + "description": "Receipt tax", + "format": "decimal" + }, + "shippingAmount": { + "type": "number", + "description": "Receipt shipping cost", + "format": "decimal" + }, + "receivedOn": { + "type": "string", + "description": "Date received", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "System created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "last time receipt was modified", + "format": "date-time" + }, + "batchId": { + "type": "integer", + "description": "Id of batch", + "format": "int64", + "nullable": true + }, + "syncStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.SyncStatus" + } + ], + "description": "Sync status" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryReceiptItemResponse" + }, + "description": "Collection of receipt items" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldResponse" + }, + "description": "Collection of custom fields" + } + }, + "additionalProperties": false, + "description": "Inventory receipt response" + }, + "Inventory.V2.InventoryReceiptItemResponse": { + "required": [ + "id", + "skuId", + "name", + "code", + "description", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Item Id", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "Sku Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Item Name" + }, + "code": { + "type": "string", + "description": "Item Code" + }, + "description": { + "type": "string", + "description": "Item Description", + "format": "html" + }, + "quantity": { + "type": "number", + "description": "Receipt quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Item cost", + "format": "decimal" + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.GLAccountResponse" + } + ], + "description": "General ledge account information", + "nullable": true + }, + "costOfSaleAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.GLAccountResponse" + } + ], + "description": "Cost of sale account information", + "nullable": true + }, + "assetAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.GLAccountResponse" + } + ], + "description": "Asset account information", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Inventory receipt item response" + }, + "Inventory.V2.GLAccountResponse": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "GL Account name", + "nullable": true + }, + "number": { + "type": "string", + "description": "GL Account number", + "nullable": true + }, + "type": { + "type": "string", + "description": "GL Account type", + "nullable": true + }, + "detailType": { + "type": "string", + "description": "GL Account detail type", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents GL account response" + }, + "Inventory.V2.ReceivePurchaseOrderRequest": { + "required": [ + "purchaseOrderId", + "dateReceived", + "tax", + "shipping", + "items" + ], + "type": "object", + "properties": { + "purchaseOrderId": { + "type": "integer", + "description": "Id of the purchase order for this receipt", + "format": "int64" + }, + "dateReceived": { + "type": "string", + "description": "Receipt date", + "format": "date-time" + }, + "vendorDocumentNumber": { + "type": "string", + "description": "Vendor Document number", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Receipt memo", + "nullable": true + }, + "tax": { + "type": "number", + "description": "Receipt tax", + "format": "decimal" + }, + "shipping": { + "type": "number", + "description": "Receipt shipping cost", + "format": "decimal" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ReceivePurchaseOrderItemRequest" + }, + "description": "List of PO items" + } + }, + "additionalProperties": false, + "description": "Request model to create Purchase Order Receipt" + }, + "Inventory.V2.ReceivePurchaseOrderItemRequest": { + "required": [ + "skuId", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "purchaseOrderItemId": { + "type": "integer", + "description": "Id of purchase order item", + "format": "int64", + "nullable": true + }, + "skuId": { + "type": "integer", + "description": "Id of the SKU from pricebook, can be any active material or equipment", + "format": "int64" + }, + "description": { + "type": "string", + "description": "Item description", + "nullable": true + }, + "vendorPartNumber": { + "type": "string", + "description": "Part number of this item for current vendor", + "nullable": true + }, + "quantity": { + "type": "number", + "description": "Item quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Item cost", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Inventory.V2.CancelResourceRequest_Of_Inventory.V2.ReceiptCancellationReason": { + "type": "object", + "properties": { + "canceledReason": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ReceiptCancellationReason" + } + ], + "description": "Resource cancellation reason" + } + }, + "additionalProperties": false, + "description": "Cancel Resource Request" + }, + "Inventory.V2.ReceiptCancellationReason": { + "enum": [ + "NotRequired", + "NotRequired", + "Duplicate", + "Accidental", + "VendorIssue", + "Other", + "JobCanceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Default", + "NotRequired", + "Duplicate", + "Accidental", + "VendorIssue", + "Other", + "JobCanceled" + ] + }, + "PaginatedResponse_Of_Inventory.V2.InventoryReturnResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryReturnResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.InventoryReturnResponse": { + "required": [ + "id", + "active", + "number", + "referenceNumber", + "status", + "vendorId", + "businessUnitId", + "memo", + "returnAmount", + "taxAmount", + "shippingAmount", + "returnDate", + "createdOn", + "modifiedOn", + "syncStatus", + "items", + "customFields", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Return Id", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Is active" + }, + "number": { + "type": "string", + "description": "Number" + }, + "referenceNumber": { + "type": "string", + "description": "Reference number" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.InventoryReturnStatus" + } + ], + "description": "Status" + }, + "vendorId": { + "type": "integer", + "description": "Vendor", + "format": "int64" + }, + "purchaseOrderId": { + "type": "integer", + "description": "Purchase order", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "Job", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit", + "format": "int64" + }, + "inventoryLocationId": { + "type": "integer", + "description": "Inventory location", + "format": "int64", + "nullable": true + }, + "createdById": { + "type": "integer", + "description": "User who created this return", + "format": "int64", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo/summary field", + "format": "multiline" + }, + "returnAmount": { + "type": "number", + "description": "Return total, including tax and shipping", + "format": "decimal" + }, + "taxAmount": { + "type": "number", + "description": "Return tax", + "format": "decimal" + }, + "shippingAmount": { + "type": "number", + "description": "Return shipping cost", + "format": "decimal" + }, + "returnDate": { + "type": "string", + "description": "Return creation date", + "format": "date-time" + }, + "returnedOn": { + "type": "string", + "description": "Date when return was actually processed", + "format": "date-time", + "nullable": true + }, + "creditReceivedOn": { + "type": "string", + "description": "Date when credit was received", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "System created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Last time return was modified", + "format": "date-time" + }, + "batchId": { + "type": "integer", + "description": "Batch Id (Deprecated - Use Batch instead)", + "format": "int64", + "nullable": true, + "deprecated": true, + "x-deprecatedMessage": "Use Batch instead" + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.BatchResponse" + } + ], + "description": "Batch", + "nullable": true + }, + "syncStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.SyncStatus" + } + ], + "description": "Sync status" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryReturnItemResponse" + }, + "description": "Collection of return items" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldResponse" + }, + "description": "Collection of custom fields" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "List of external data attached to this return,\nthat corresponds to the application guid provided in the request." + } + }, + "additionalProperties": false, + "description": "Inventory return response" + }, + "Inventory.V2.InventoryReturnStatus": { + "enum": [ + "Pending", + "Returned", + "CreditReceived", + "Canceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Pending", + "Returned", + "CreditReceived", + "Canceled" + ] + }, + "Inventory.V2.InventoryReturnItemResponse": { + "required": [ + "id", + "skuId", + "name", + "code", + "description", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Item Id", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "Sku Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Item name" + }, + "code": { + "type": "string", + "description": "Item code" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html" + }, + "quantity": { + "type": "number", + "description": "Return quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Item cost", + "format": "decimal" + }, + "generalLedgerAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.GLAccountResponse" + } + ], + "description": "General ledge account information", + "nullable": true + }, + "costOfSaleAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.GLAccountResponse" + } + ], + "description": "Cost of sale account information", + "nullable": true + }, + "assetAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.GLAccountResponse" + } + ], + "description": "Asset account information", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Inventory return item response" + }, + "Inventory.V2.UpdateReturnRequest": { + "type": "object", + "properties": { + "returnTypeId": { + "type": "integer", + "description": "Return type Id", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit Id", + "format": "int64" + }, + "referenceNumber": { + "type": "string", + "description": "Reference Number" + }, + "inventoryLocationId": { + "type": "integer", + "description": "Inventory location Id", + "format": "int64" + }, + "returnDate": { + "type": "string", + "description": "Return Date", + "format": "date-time" + }, + "memo": { + "type": "string", + "description": "Memo" + }, + "tax": { + "type": "number", + "description": "Tax", + "format": "decimal", + "nullable": true + }, + "shipping": { + "type": "number", + "description": "Shipping", + "format": "decimal", + "nullable": true + }, + "restockingFee": { + "type": "number", + "description": "Restocking Fee", + "format": "decimal", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.UpdateReturnItemModel" + }, + "description": "List of return items" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateRequest" + } + ], + "description": "Contains a list of external data items that should be attached to this return" + } + }, + "additionalProperties": false, + "description": "Represents request to update return" + }, + "Inventory.V2.UpdateReturnItemModel": { + "required": [ + "id", + "skuId", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Item ID", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "SKU ID", + "format": "int64" + }, + "itemDescription": { + "type": "string", + "description": "Item Description", + "format": "html", + "nullable": true + }, + "quantity": { + "type": "number", + "description": "Quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Cost", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Inventory.V2.CancelResourceRequest_Of_Inventory.V2.ReturnCancellationReason": { + "type": "object", + "properties": { + "canceledReason": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ReturnCancellationReason" + } + ], + "description": "Resource cancellation reason" + } + }, + "additionalProperties": false, + "description": "Cancel Resource Request" + }, + "Inventory.V2.ReturnCancellationReason": { + "enum": [ + "NotRequired", + "NotRequired", + "Duplicate", + "Accidental", + "VendorIssue", + "Other", + "JobCanceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Default", + "NotRequired", + "Duplicate", + "Accidental", + "VendorIssue", + "Other", + "JobCanceled" + ] + }, + "Inventory.V2.CreateInventoryReturnRequest": { + "required": [ + "vendorId", + "returnTypeId", + "businessUnitId", + "inventoryLocationId", + "returnDate", + "tax", + "shipping", + "restockingFee" + ], + "type": "object", + "properties": { + "vendorId": { + "type": "integer", + "description": "Vendor Id", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "Job Id", + "format": "int64", + "nullable": true + }, + "purchaseOrderId": { + "type": "integer", + "description": "Purchase order Id", + "format": "int64", + "nullable": true + }, + "returnTypeId": { + "type": "integer", + "description": "Return type Id", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit Id", + "format": "int64" + }, + "referenceNumber": { + "type": "string", + "description": "Reference number", + "nullable": true + }, + "inventoryLocationId": { + "type": "integer", + "description": "Location Id", + "format": "int64" + }, + "returnDate": { + "type": "string", + "description": "Return date", + "format": "date-time" + }, + "memo": { + "type": "string", + "description": "Memo/summary field", + "nullable": true + }, + "tax": { + "type": "number", + "description": "Tax rate", + "format": "decimal" + }, + "shipping": { + "type": "number", + "description": "Shipping cost", + "format": "decimal" + }, + "restockingFee": { + "type": "number", + "description": "Restocking fee", + "format": "decimal" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CreateInventoryReturnItemRequest" + }, + "nullable": true + } + }, + "additionalProperties": false, + "description": "Represents request to create return" + }, + "Inventory.V2.CreateInventoryReturnItemRequest": { + "required": [ + "skuId", + "quantity", + "cost" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Sku Id", + "format": "int64" + }, + "description": { + "type": "string", + "description": "Item description", + "nullable": true + }, + "quantity": { + "type": "number", + "description": "Quantity", + "format": "decimal" + }, + "cost": { + "type": "number", + "description": "Cost", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Inventory return create item request" + }, + "Inventory.V2.CreateReturnTypeRequest": { + "required": [ + "name", + "automaticallyReceiveVendorCredit", + "includeInSalesTax", + "isDefault", + "isDefaultForConsignment" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Return Type" + }, + "automaticallyReceiveVendorCredit": { + "type": "boolean", + "description": "Should the return type allow receiving Vendor Credits automatically." + }, + "includeInSalesTax": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "isDefaultForConsignment": { + "type": "boolean" + } + }, + "additionalProperties": false, + "description": "Request model to create Return Types" + }, + "Inventory.V2.UpdateReturnTypeRequest": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of the Return Type", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Is the Return Type Active" + }, + "name": { + "type": "string", + "description": "Name of the Return Type" + }, + "automaticallyReceiveVendorCredit": { + "type": "boolean", + "description": "Should the return type allow receiving Vendor Credits automatically." + }, + "includeInSalesTax": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "isDefaultForConsignment": { + "type": "boolean" + } + }, + "additionalProperties": false, + "description": "Request model to Update Return Types" + }, + "PaginatedResponse_Of_Inventory.V2.ListReturnTypesResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ListReturnTypesResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.ListReturnTypesResponse": { + "required": [ + "id", + "automaticallyReceiveVendorCredit", + "includeInSalesTax", + "active", + "isDefault", + "isDefaultForConsignment" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Return Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the Return Type", + "nullable": true + }, + "automaticallyReceiveVendorCredit": { + "type": "boolean", + "description": "Should the return type allow receiving Vendor Credits automatically." + }, + "includeInSalesTax": { + "type": "boolean" + }, + "active": { + "type": "boolean" + }, + "isDefault": { + "type": "boolean" + }, + "isDefaultForConsignment": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Inventory.V2.InventoryTransferResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryTransferResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.InventoryTransferResponse": { + "required": [ + "id", + "transferType", + "status", + "number", + "referenceNumber", + "fromLocationId", + "toLocationId", + "memo", + "date", + "createdOn", + "modifiedOn", + "syncStatus", + "items", + "customFields" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Inventory transfer Id", + "format": "int64" + }, + "transferType": { + "type": "string", + "description": "Type" + }, + "status": { + "type": "string", + "description": "Status" + }, + "number": { + "type": "string", + "description": "Number" + }, + "referenceNumber": { + "type": "string", + "description": "Reference number" + }, + "fromLocationId": { + "type": "integer", + "description": "Inventory location to transfer from", + "format": "int64" + }, + "toLocationId": { + "type": "integer", + "description": "Inventory location where transfer is going", + "format": "int64" + }, + "createdById": { + "type": "integer", + "description": "Employee who created this transfer", + "format": "int64", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo/summary field", + "format": "multiline" + }, + "date": { + "type": "string", + "description": "Transfer date", + "format": "date-time" + }, + "pickedDate": { + "type": "string", + "description": "Transfer picked date", + "format": "date-time", + "nullable": true + }, + "receivedDate": { + "type": "string", + "description": "Transfer recevived date", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "system created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "last time transfer was modified date", + "format": "date-time" + }, + "batchId": { + "type": "integer", + "description": "Batch Id (Deprecated - Use Batch instead)", + "format": "int64", + "nullable": true, + "deprecated": true, + "x-deprecatedMessage": "Use Batch instead" + }, + "batch": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.BatchResponse" + } + ], + "description": "Batch", + "nullable": true + }, + "syncStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.SyncStatus" + } + ], + "description": "Sync status" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.InventoryTransferItemResponse" + }, + "description": "Collection of transfer items" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CustomFieldResponse" + }, + "description": "Collection of custom fields" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "List of external data attached to this return,\nthat corresponds to the application guid provided in the request.", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Inventory transfer response" + }, + "Inventory.V2.InventoryTransferItemResponse": { + "required": [ + "id", + "skuId", + "name", + "code", + "description", + "quantity" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Item Id", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "Sku Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Item name" + }, + "code": { + "type": "string", + "description": "Item code" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html" + }, + "quantity": { + "type": "number", + "description": "Transfer quantity", + "format": "decimal" + } + }, + "additionalProperties": false, + "description": "Inventory transfer item response" + }, + "Inventory.V2.UpdateTransferRequest": { + "type": "object", + "properties": { + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateRequest" + } + ], + "description": "Contains a list of external data items that should be attached to this transfer" + } + }, + "additionalProperties": false, + "description": "Represents request to update transfer" + }, + "PaginatedResponse_Of_Inventory.V2.TruckResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.TruckResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.TruckResponse": { + "required": [ + "id", + "name", + "active", + "memo", + "technicianIds", + "createdOn", + "modifiedOn", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Truck Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Truck Name" + }, + "active": { + "type": "boolean", + "description": "Active" + }, + "memo": { + "type": "string", + "description": "Memo", + "format": "multiline" + }, + "warehouseId": { + "type": "integer", + "description": "Warehouse Id for this truck", + "format": "int64", + "nullable": true + }, + "technicianIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Technician Ids associated with this truck" + }, + "createdOn": { + "type": "string", + "description": "System created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Last time truck was modified date", + "format": "date-time" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "List of external data attached to this warehouse,\nthat corresponds to the application guid provided in the request." + } + }, + "additionalProperties": false, + "description": "Represents truck response" + }, + "Inventory.V2.UpdateTruckRequest": { + "type": "object", + "properties": { + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateRequest" + } + ], + "description": "Contains a list of external data items that should be attached to this truck" + } + }, + "additionalProperties": false, + "description": "Represents a request to update truck" + }, + "Inventory.V2.CreateVendorRequest": { + "required": [ + "name", + "active", + "isTruckReplenishment", + "taxRate", + "restrictedMobileCreation", + "address" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "active": { + "type": "boolean", + "description": "Active" + }, + "memo": { + "type": "string", + "description": "Memo", + "format": "multiline", + "nullable": true + }, + "firstName": { + "type": "string", + "description": "Contact First name", + "nullable": true + }, + "lastName": { + "type": "string", + "description": "Contact Last Name", + "nullable": true + }, + "phone": { + "type": "string", + "description": "Contact Phone", + "nullable": true + }, + "email": { + "type": "string", + "description": "Contact Email", + "nullable": true + }, + "fax": { + "type": "string", + "description": "Contact Fax", + "nullable": true + }, + "isTruckReplenishment": { + "type": "boolean", + "description": "Replenishment Vendor" + }, + "deliveryOption": { + "oneOf": [ + { + "$ref": "#/components/schemas/InventoryUnsafe.PurchaseOrderDeliveryOption" + } + ], + "description": "Default PO Delivery Method", + "nullable": true + }, + "taxRate": { + "type": "number", + "description": "Default Tax Rate", + "format": "decimal" + }, + "restrictedMobileCreation": { + "type": "boolean", + "description": "Restrict PO Creation in Mobile" + }, + "vendorQuickbooksItem": { + "type": "string", + "description": "Vendor Quickbooks Item", + "nullable": true + }, + "paymentTermId": { + "type": "integer", + "description": "Payment Term Id", + "format": "int64", + "nullable": true + }, + "remittanceVendorId": { + "type": "integer", + "description": "Remittance Vendor Id", + "format": "int64", + "nullable": true + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressRequest" + } + ], + "description": "Address" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this vendor.", + "nullable": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.TagRequest" + }, + "description": "Tags", + "nullable": true + }, + "vendorContacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.CreateVendorContactRequest" + }, + "description": "Email Recipients", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Request model to create vendor" + }, + "InventoryUnsafe.PurchaseOrderDeliveryOption": { + "enum": [ + "Manual", + "EmailAsExcel", + "EmailAsPdf", + "EmailAsPdfRollupView", + "Electronic", + "MarkAsSent", + "EmailAsExcelAndPdf" + ], + "type": "string", + "description": "How purchase order is sent/delivered to a vendor", + "x-enumNames": [ + "Manual", + "EmailAsExcel", + "EmailAsPdf", + "EmailAsPdfRollupView", + "Electronic", + "MarkAsSent", + "EmailAsExcelAndPdf" + ] + }, + "Inventory.V2.ExternalDataCreateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Inventory.V2.TagRequest": { + "required": [ + "tagTypeId" + ], + "type": "object", + "properties": { + "tagTypeId": { + "type": "integer", + "description": "Tag Type Id", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Represents tag request" + }, + "Inventory.V2.CreateVendorContactRequest": { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "email": { + "type": "string", + "description": "Email" + } + }, + "additionalProperties": false, + "description": "Request model to create vendor contact" + }, + "PaginatedResponse_Of_Inventory.V2.VendorResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.VendorResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.VendorResponse": { + "required": [ + "id", + "name", + "active", + "isTruckReplenishment", + "isMobileCreationRestricted", + "memo", + "deliveryOption", + "defaultTaxRate", + "contactInfo", + "address", + "createdOn", + "modifiedOn", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Vendor Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Vendor name" + }, + "active": { + "type": "boolean", + "description": "Active/Inactive status" + }, + "isTruckReplenishment": { + "type": "boolean", + "description": "Indicates if vendor can be used for replenishment" + }, + "isMobileCreationRestricted": { + "type": "boolean", + "description": "Indicates if vendor can be used for purchasing on mobile" + }, + "memo": { + "type": "string", + "description": "Vendor memo", + "format": "multiline" + }, + "deliveryOption": { + "type": "string", + "description": "Default delivery option" + }, + "defaultTaxRate": { + "type": "number", + "description": "Default tax rate for this vendor", + "format": "decimal" + }, + "contactInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.VendorContactInfoResponse" + } + ], + "description": "Vendor contact information" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressResponse" + } + ], + "description": "Vendor address" + }, + "createdOn": { + "type": "string", + "description": "system created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "last time adjustment was modified date", + "format": "date-time" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "List of external data attached to this vendor,\nthat corresponds to the application guid provided in the request." + } + }, + "additionalProperties": false, + "description": "Vendor response" + }, + "Inventory.V2.VendorContactInfoResponse": { + "required": [ + "firstName", + "lastName", + "phone", + "email", + "fax" + ], + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "Vendor first name" + }, + "lastName": { + "type": "string", + "description": "Vendor last name" + }, + "phone": { + "type": "string", + "description": "Vendor phone" + }, + "email": { + "type": "string", + "description": "Vendor email" + }, + "fax": { + "type": "string", + "description": "Vendor fax" + } + }, + "additionalProperties": false, + "description": "Vendor contact info response" + }, + "Inventory.V2.UpdateVendorRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name" + }, + "active": { + "type": "boolean", + "description": "Active" + }, + "memo": { + "type": "string", + "description": "Memo", + "format": "multiline" + }, + "firstName": { + "type": "string", + "description": "Contact First name" + }, + "lastName": { + "type": "string", + "description": "Contact Last Name" + }, + "phone": { + "type": "string", + "description": "Contact Phone" + }, + "email": { + "type": "string", + "description": "Contact Email" + }, + "fax": { + "type": "string", + "description": "Contact Fax" + }, + "isTruckReplenishment": { + "type": "boolean", + "description": "Replenishment Vendor" + }, + "deliveryOption": { + "oneOf": [ + { + "$ref": "#/components/schemas/InventoryUnsafe.PurchaseOrderDeliveryOption" + } + ], + "description": "Default PO Delivery Method" + }, + "taxRate": { + "type": "number", + "description": "Default Tax Rate", + "format": "decimal" + }, + "restrictedMobileCreation": { + "type": "boolean", + "description": "Restrict PO Creation in Mobile" + }, + "vendorQuickbooksItem": { + "type": "string", + "description": "Vendor Quickbooks Item" + }, + "paymentTermId": { + "type": "integer", + "description": "Payment Term Id", + "format": "int64" + }, + "remittanceVendorId": { + "type": "integer", + "description": "Remittance Vendor Id", + "format": "int64" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressRequest" + } + ], + "description": "Address" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.TagRequest" + }, + "description": "Tags" + }, + "vendorContacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.UpdateVendorContactRequest" + }, + "description": "Email Recipients" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateRequest" + } + ], + "description": "Contains a list of external data items that should be attached to this vendor" + } + }, + "additionalProperties": false, + "description": "Represents request to update vendor" + }, + "Inventory.V2.UpdateVendorContactRequest": { + "required": [ + "name", + "email" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Id of Vendor Contact to update", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string", + "description": "Name" + }, + "email": { + "type": "string", + "description": "Email" + } + }, + "additionalProperties": false, + "description": "Represents request to update vendor contact" + }, + "PaginatedResponse_Of_Inventory.V2.WarehouseResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.WarehouseResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Inventory.V2.WarehouseResponse": { + "required": [ + "id", + "name", + "active", + "address", + "createdOn", + "modifiedOn", + "externalData" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Warehouse Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Warehouse Name" + }, + "active": { + "type": "boolean", + "description": "Active" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.AddressResponse" + } + ], + "description": "Warehouse address" + }, + "createdOn": { + "type": "string", + "description": "System created date", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Last time warehouse was modified date", + "format": "date-time" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataModel" + }, + "description": "List of external data attached to this warehouse,\nthat corresponds to the application guid provided in the request." + } + }, + "additionalProperties": false, + "description": "Represents warehouse response" + }, + "Inventory.V2.UpdateWarehouseRequest": { + "type": "object", + "properties": { + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Inventory.V2.ExternalDataUpdateRequest" + } + ], + "description": "Contains a list of external data items that should be attached to this warehouse" + } + }, + "additionalProperties": false, + "description": "Represents a request to update warehouse" + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/jbce-v2.json b/openapi_specs/jbce-v2.json new file mode 100644 index 0000000..5e25a4a --- /dev/null +++ b/openapi_specs/jbce-v2.json @@ -0,0 +1,340 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Job Booking", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/jbce/v2" + } + ], + "paths": { + "/tenant/{tenant}/call-reasons": { + "get": { + "tags": [ + "CallReasons" + ], + "summary": "Gets a list of call reasons", + "description": "Gets a list of call reasons", + "operationId": "CallReasons_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jbce.V2.CallReasonResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "isLead": true, + "active": true, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Jbce.V2.CallReasonResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jbce.V2.CallReasonResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jbce.V2.CallReasonResponse": { + "required": [ + "id", + "name", + "isLead", + "active", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Call reason ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Call reason name" + }, + "isLead": { + "type": "boolean", + "description": "Indicates that the call is a lead" + }, + "active": { + "type": "boolean", + "description": "Whether the call reason is active" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when job was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/jpm-v2.json b/openapi_specs/jpm-v2.json new file mode 100644 index 0000000..e1464f5 --- /dev/null +++ b/openapi_specs/jpm-v2.json @@ -0,0 +1,10456 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Job Planning and Management", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/jpm/v2" + } + ], + "paths": { + "/tenant/{tenant}/appointments/{id}": { + "get": { + "tags": [ + "Appointments" + ], + "summary": "Gets appointment specified by ID", + "description": "Gets appointment specified by ID", + "operationId": "Appointments_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string", + "customerId": 0, + "unused": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Appointment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Appointments" + ], + "summary": "Deletes appointment with specified id.", + "description": "Deletes appointment with specified id.", + "operationId": "Appointments_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Appointment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Appointment is in the state that doesn't allow deletion", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointments": { + "get": { + "tags": [ + "Appointments" + ], + "summary": "Gets a list of appointments", + "description": "Gets a list of appointments", + "operationId": "Appointments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Return all appointments for this job", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "projectId", + "in": "query", + "description": "Format - int64. Return all appointments for jobs that are part of this project", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Return all appointments with this appointment number", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Return items with specified status AppointmentStatus\\\nValues: [Scheduled, Dispatched, Working, Hold, Done, Canceled]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.AppointmentStatus" + } + ], + "nullable": true + } + }, + { + "name": "startsOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return appointments that start on or after the specified date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "startsBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return appointments that start before the specified date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. Return appointments this technician is assigned to", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Return appointments for the specified Customer", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "unused", + "in": "query", + "description": "Return appointments that are unused", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return appointments modified before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return appointments modified on or after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return appointments created on or after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return appointments created before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.AppointmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string", + "customerId": 0, + "unused": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Appointments" + ], + "summary": "Adds a new appointment to an existing job", + "description": "Adds a new appointment to an existing job", + "operationId": "Appointments_Add", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentAddRequest" + }, + "example": { + "jobId": 0, + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "technicianIds": [ + 0 + ], + "specialInstructions": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string", + "customerId": 0, + "unused": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointments/{id}/reschedule": { + "patch": { + "tags": [ + "Appointments" + ], + "summary": "Reschedule job appointment", + "description": "Reschedule job appointment", + "operationId": "Appointments_Reschedule", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentRescheduleRequest" + }, + "example": { + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string", + "customerId": 0, + "unused": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Job appointment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointments/{id}/hold": { + "put": { + "tags": [ + "Appointments" + ], + "summary": "Puts the appointment on hold", + "description": "Puts the appointment on hold", + "operationId": "Appointments_Hold", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.HoldAppointmentRequest" + }, + "example": { + "reasonId": 0, + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Appointments" + ], + "summary": "Removes hold from the appointment", + "description": "Removes hold from the appointment", + "operationId": "Appointments_RemoveHold", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Appointment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Appointment is not on hold", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointments/{id}/special-instructions": { + "put": { + "tags": [ + "Appointments" + ], + "summary": "Appointments_UpdateSpecialInstructions", + "operationId": "Appointments_UpdateSpecialInstructions", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.UpdateAppointmentSpecialInstructionsRequest" + }, + "example": { + "specialInstructions": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string", + "customerId": 0, + "unused": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/appointments/{id}/confirmation": { + "put": { + "tags": [ + "Appointments" + ], + "summary": "Adds a confirmation to the specified appointment.", + "description": "Adds a confirmation to the specified appointment.", + "operationId": "Appointments_Confirm", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Appointment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Appointment is already confirmed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Appointments" + ], + "summary": "Adds a confirmation to the specified appointment.", + "description": "Adds a confirmation to the specified appointment.", + "operationId": "Appointments_RemoveConfirmation", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Appointment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Appointment was not confirmed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/jobs": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for jobs", + "description": "Provides export feed for jobs", + "operationId": "Export_Jobs", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportJobsResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "customerId": 0, + "locationId": 0, + "jobStatus": "string", + "completedOn": "string", + "businessUnitId": 0, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "summary": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "appointmentCount": 0, + "firstAppointmentId": 0, + "lastAppointmentId": 0, + "recallForId": 0, + "warrantyId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "noCharge": true, + "notificationsEnabled": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "leadCallId": 0, + "bookingId": 0, + "soldById": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "customerPo": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/projects": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for projects", + "description": "Provides export feed for projects", + "operationId": "Export_Projects", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportProjectsResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "number": "string", + "name": "string", + "summary": "string", + "status": "string", + "statusId": 0, + "subStatus": "string", + "subStatusId": 0, + "customerId": 0, + "locationId": 0, + "projectTypeId": 0, + "projectManagerIds": [ + 0 + ], + "businessUnitIds": [ + 0 + ], + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "modifiedOn": "string", + "createdOn": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "jobIds": [ + 0 + ], + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/appointments": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for appointments", + "description": "Provides export feed for appointments", + "operationId": "Export_Appointments", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportAppointmentsResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "jobId": 0, + "appointmentNumber": "string", + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "status": {}, + "specialInstructions": "string", + "createdOn": "string", + "modifiedOn": "string", + "customerId": 0, + "unused": true, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/job-canceled-logs": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for job canceled logs", + "description": "Provides export feed for job canceled logs", + "operationId": "Export_JobCancelReasons", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportJobCanceledLogResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "jobId": 0, + "reasonId": 0, + "memo": "string", + "createdOn": "string", + "createdById": 0, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/job-notes": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for job notes", + "description": "Provides export feed for job notes", + "operationId": "Export_JobNotes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportJobNotesResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "active": true, + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string", + "jobId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/project-notes": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for project notes", + "description": "Provides export feed for project notes", + "operationId": "Export_ProjectNotes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportProjectNotesResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "active": true, + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string", + "projectId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/job-history": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for job canceled logs", + "description": "Provides export feed for job canceled logs", + "operationId": "Export_JobHistory", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Jpm.V2.ExportJobHistoryResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "jobId": 0, + "history": [ + { + "id": 0, + "employeeId": 0, + "eventType": "string", + "date": "string", + "usedSchedulingTool": {} + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/job-cancel-reasons": { + "get": { + "tags": [ + "JobCancelReasons" + ], + "summary": "Gets a list of job cancel reasons", + "description": "Gets a list of job cancel reasons", + "operationId": "JobCancelReasons_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (active and inactive items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.JobCancelReasonResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/job-hold-reasons": { + "get": { + "tags": [ + "JobHoldReasons" + ], + "summary": "Gets a list of job hold reasons", + "description": "Gets a list of job hold reasons", + "operationId": "JobHoldReasons_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (active and inactive items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.JobHoldReasonResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets a job by ID", + "description": "Gets a job by ID", + "operationId": "Jobs_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobResponse" + }, + "example": { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "customerId": 0, + "locationId": 0, + "jobStatus": "string", + "completedOn": "string", + "businessUnitId": 0, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "summary": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "appointmentCount": 0, + "firstAppointmentId": 0, + "lastAppointmentId": 0, + "recallForId": 0, + "warrantyId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "noCharge": true, + "notificationsEnabled": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "leadCallId": 0, + "bookingId": 0, + "soldById": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "customerPo": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Jobs" + ], + "summary": "Updates a job", + "description": "Updates a job", + "operationId": "Jobs_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.UpdateJobRequest" + }, + "example": { + "customerId": 0, + "locationId": 0, + "businessUnitId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "summary": "string", + "shouldUpdateInvoiceItems": true, + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "tagTypeIds": [ + 0 + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "customerPo": "string", + "soldById": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobResponse" + }, + "example": { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "customerId": 0, + "locationId": 0, + "jobStatus": "string", + "completedOn": "string", + "businessUnitId": 0, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "summary": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "appointmentCount": 0, + "firstAppointmentId": 0, + "lastAppointmentId": 0, + "recallForId": 0, + "warrantyId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "noCharge": true, + "notificationsEnabled": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "leadCallId": 0, + "bookingId": 0, + "soldById": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "customerPo": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Creates a job", + "description": "Creates a job", + "operationId": "Jobs_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobCreateRequest" + }, + "example": { + "customerId": 0, + "locationId": 0, + "projectId": 0, + "businessUnitId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "appointments": [ + { + "start": "string", + "end": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "technicianIds": [ + 0 + ] + } + ], + "summary": "string", + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "tagTypeIds": [ + 0 + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "invoiceSignatureIsRequired": true, + "customerPo": "string", + "soldById": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobResponse" + }, + "example": { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "customerId": 0, + "locationId": 0, + "jobStatus": "string", + "completedOn": "string", + "businessUnitId": 0, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "summary": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "appointmentCount": 0, + "firstAppointmentId": 0, + "lastAppointmentId": 0, + "recallForId": 0, + "warrantyId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "noCharge": true, + "notificationsEnabled": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "leadCallId": 0, + "bookingId": 0, + "soldById": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "customerPo": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets a list of jobs", + "description": "Gets a list of jobs", + "operationId": "Jobs_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "number", + "in": "query", + "description": "Filters by job number", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "projectId", + "in": "query", + "description": "Format - int64. Filters by project ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "bookingId", + "in": "query", + "description": "Format - int64. Filters by booking ID that resulted in this job", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobStatus", + "in": "query", + "description": "Filters by job status\\\nValues: [Scheduled, Dispatched, InProgress, Hold, Completed, Canceled]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobStatus" + } + ], + "nullable": true + } + }, + { + "name": "appointmentStatus", + "in": "query", + "description": "Filters by appointment status. Return a job if it has any appointment with the specified status.\\\nValues: [Scheduled, Dispatched, Working, Hold, Done, Canceled]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobAppointmentStatus" + } + ], + "nullable": true + } + }, + { + "name": "priority", + "in": "query", + "description": "Filters by priority. Supported priorities are \"Low\", \"Normal\", \"High\", \"Urgent\"", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "firstAppointmentStartsOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return jobs whose first appointment starts on or after date/time (in UTC). Use with\n\"firstAppointmentStartsBefore\" to find jobs whose first appointment is within the specified date range.", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "firstAppointmentStartsBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return jobs whose first appointment starts before date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "appointmentStartsOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return jobs if any appointment starts after date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "appointmentStartsBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return jobs if any appointment starts after date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. Return jobs if technician is assigned to any appointment", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Filters by job's customer ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "locationId", + "in": "query", + "description": "Format - int64. Filters by job's location ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "soldById", + "in": "query", + "description": "Format - int64. Filters by the technician who sold the job", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobTypeId", + "in": "query", + "description": "Format - int64. Filters by job type ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "campaignId", + "in": "query", + "description": "Format - int64. Filters by job's campaign ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "businessUnitId", + "in": "query", + "description": "Format - int64. Filters by job's business unit ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "invoiceId", + "in": "query", + "description": "Format - int64. Filters by job's invoice ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "completedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return jobs that are completed after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "completedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return jobs that are completed before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "tagTypeIds", + "in": "query", + "description": "Return jobs that have at least one of provided Tag Type assigned", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn, Priority.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "hasUnusedAppointments", + "in": "query", + "description": "If set to true, return jobs that have unused appointments.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.JobResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "customerId": 0, + "locationId": 0, + "jobStatus": "string", + "completedOn": "string", + "businessUnitId": 0, + "jobTypeId": 0, + "priority": "string", + "campaignId": 0, + "summary": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "appointmentCount": 0, + "firstAppointmentId": 0, + "lastAppointmentId": 0, + "recallForId": 0, + "warrantyId": 0, + "jobGeneratedLeadSource": { + "jobId": 0, + "employeeId": 0 + }, + "noCharge": true, + "notificationsEnabled": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "tagTypeIds": [ + 0 + ], + "leadCallId": 0, + "bookingId": 0, + "soldById": 0, + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "customerPo": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/cancel": { + "put": { + "tags": [ + "Jobs" + ], + "summary": "Cancels a job", + "description": "Cancels a job", + "operationId": "Jobs_Cancel", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.CancelJobRequest" + }, + "example": { + "reasonId": 0, + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/remove-cancellation": { + "put": { + "tags": [ + "Jobs" + ], + "summary": "Removes cancellation from a job", + "description": "Removes cancellation from a job", + "operationId": "Jobs_RemoveCancellation", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/hold": { + "put": { + "tags": [ + "Jobs" + ], + "summary": "Puts a job on hold", + "description": "Puts a job on hold", + "operationId": "Jobs_Hold", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.HoldJobRequest" + }, + "example": { + "reasonId": 0, + "memo": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/complete": { + "put": { + "tags": [ + "Jobs" + ], + "summary": "Completes a job", + "description": "Completes a job", + "operationId": "Jobs_Complete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.CompleteJobRequest" + }, + "example": { + "completedOn": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Job not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Job already completed or cancelled or has no assigned technicians", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/notes": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets a list of notes on the specified job", + "description": "Gets a list of notes on the specified job", + "operationId": "Jobs_GetNotes", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.NoteResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Jobs" + ], + "summary": "Creates a note on the specified job", + "description": "Creates a note on the specified job", + "operationId": "Jobs_CreateNote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobNoteCreateRequest" + }, + "example": { + "text": "string", + "pinToTop": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.NoteResponse" + }, + "example": { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/cancel-reasons": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets a list of cancel reasons for specific jobs", + "description": "Gets a list of cancel reasons for specific jobs", + "operationId": "Jobs_GetCancelReasons", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "required": true, + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.CancelReasonResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "jobId": 0, + "reasonId": 0, + "name": "string", + "text": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/history": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets a list of history entries for the specified job", + "description": "Gets a list of history entries for the specified job", + "operationId": "Jobs_GetHistory", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobHistoryResponse" + }, + "example": { + "history": [ + { + "id": 0, + "employeeId": 0, + "eventType": "string", + "date": "string", + "usedSchedulingTool": "Manual" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/messages": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Creates a message on a job", + "description": "Creates a message on a job", + "operationId": "Jobs_CreateMessage", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.MessageCreateRequest" + }, + "example": { + "body": "string", + "recipientIds": [ + 0 + ], + "parentMessageId": 0, + "addParentMessageSenderToRecipients": true, + "createdByEmployeeId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.MessageResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/canceled-log": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Get a list of cancelled logs for the specified job", + "description": "Get a list of cancelled logs for the specified job", + "operationId": "Jobs_GetJobCanceledLogs", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.JobCanceledLogResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "reasonId": 0, + "memo": "string", + "createdOn": "string", + "createdById": 0, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{id}/booked-log": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Get booked log for the specified job", + "description": "Get booked log for the specified job", + "operationId": "Jobs_GetBookedLog", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobBookedLogResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "jobAppointmentId": 0, + "start": "string", + "arrivalWindowStart": "string", + "arrivalWindowEnd": "string", + "createdOn": "string", + "createdById": 0, + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/custom-fields": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Returns a list of custom field types available for projects", + "description": "Returns a list of custom field types available for projects", + "operationId": "Jobs_GetCustomFieldTypes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.CustomFieldTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "dataType": "Text", + "dataTypeOptions": [ + "string" + ], + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/job-types": { + "get": { + "tags": [ + "JobTypes" + ], + "summary": "Gets a list of job types", + "description": "Gets a list of job types", + "operationId": "JobTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "name", + "in": "query", + "description": "Filters by job type name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "minDuration", + "in": "query", + "description": "Format - int32. Minimum length of time for this job type (in seconds)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "maxDuration", + "in": "query", + "description": "Format - int32. Maximum length of time for this job type (in seconds)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "priority", + "in": "query", + "description": "Level of urgency for this type of job", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "description": "Orders results by a field. Supported fields are \"id\", \"modifiedOn\", and \"createdOn\"", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderByDirection", + "in": "query", + "description": "Specifies order direction of results. Supported values are \"asc\"/\"ascending\" and \"desc\"/\"descending\"", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.JobTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "businessUnitIds": [ + 0 + ], + "skills": [ + "string" + ], + "tagTypeIds": [ + 0 + ], + "priority": "string", + "duration": 0, + "soldThreshold": 0, + "class": "string", + "summary": "string", + "noCharge": true, + "enforceRecurringServiceEventSelection": true, + "invoiceSignaturesRequired": true, + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "JobTypes" + ], + "summary": "Creates a job type", + "description": "Creates a job type", + "operationId": "JobTypes_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.CreateJobTypeRequest" + }, + "example": { + "name": "string", + "businessUnitIds": [ + 0 + ], + "skills": [ + "string" + ], + "tagTypeIds": [ + 0 + ], + "priority": "string", + "duration": 0, + "soldThreshold": 0, + "class": "string", + "summary": "string", + "noCharge": true, + "enforceRecurringServiceEventSelection": true, + "invoiceSignaturesRequired": true, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobTypeResponse" + }, + "example": { + "id": 0, + "name": "string", + "businessUnitIds": [ + 0 + ], + "skills": [ + "string" + ], + "tagTypeIds": [ + 0 + ], + "priority": "string", + "duration": 0, + "soldThreshold": 0, + "class": "string", + "summary": "string", + "noCharge": true, + "enforceRecurringServiceEventSelection": true, + "invoiceSignaturesRequired": true, + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/job-types/{id}": { + "get": { + "tags": [ + "JobTypes" + ], + "summary": "Gets a job type by ID", + "description": "Gets a job type by ID", + "operationId": "JobTypes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobTypeResponse" + }, + "example": { + "id": 0, + "name": "string", + "businessUnitIds": [ + 0 + ], + "skills": [ + "string" + ], + "tagTypeIds": [ + 0 + ], + "priority": "string", + "duration": 0, + "soldThreshold": 0, + "class": "string", + "summary": "string", + "noCharge": true, + "enforceRecurringServiceEventSelection": true, + "invoiceSignaturesRequired": true, + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "JobTypes" + ], + "summary": "Update a job type", + "description": "Update a job type", + "operationId": "JobTypes_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.UpdateJobTypeRequest" + }, + "example": { + "name": "string", + "businessUnitIds": [ + 0 + ], + "skills": [ + "string" + ], + "tagTypeIds": [ + 0 + ], + "priority": "string", + "duration": 0, + "soldThreshold": 0, + "class": "string", + "summary": "string", + "noCharge": true, + "enforceRecurringServiceEventSelection": true, + "invoiceSignaturesRequired": true, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.JobTypeResponse" + }, + "example": { + "id": 0, + "name": "string", + "businessUnitIds": [ + 0 + ], + "skills": [ + "string" + ], + "tagTypeIds": [ + 0 + ], + "priority": "string", + "duration": 0, + "soldThreshold": 0, + "class": "string", + "summary": "string", + "noCharge": true, + "enforceRecurringServiceEventSelection": true, + "invoiceSignaturesRequired": true, + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects/{id}": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Gets a project by ID", + "description": "Gets a project by ID", + "operationId": "Projects_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectResponse" + }, + "example": { + "id": 0, + "number": "string", + "name": "string", + "summary": "string", + "status": "string", + "statusId": 0, + "subStatus": "string", + "subStatusId": 0, + "customerId": 0, + "locationId": 0, + "projectTypeId": 0, + "projectManagerIds": [ + 0 + ], + "businessUnitIds": [ + 0 + ], + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "modifiedOn": "string", + "createdOn": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "jobIds": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Projects" + ], + "summary": "Update a project", + "description": "Update a project", + "operationId": "Projects_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.UpdateProjectRequest" + }, + "example": { + "projectManagerIds": [ + 0 + ], + "jobIds": [ + 0 + ], + "name": "string", + "summary": "string", + "statusId": 0, + "subStatusId": 0, + "projectTypeId": 0, + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectResponse" + }, + "example": { + "id": 0, + "number": "string", + "name": "string", + "summary": "string", + "status": "string", + "statusId": 0, + "subStatus": "string", + "subStatusId": 0, + "customerId": 0, + "locationId": 0, + "projectTypeId": 0, + "projectManagerIds": [ + 0 + ], + "businessUnitIds": [ + 0 + ], + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "modifiedOn": "string", + "createdOn": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "jobIds": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Gets a list of projects", + "description": "Gets a list of projects", + "operationId": "Projects_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Filters by customer ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "locationId", + "in": "query", + "description": "Format - int64. Filters by location ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "projectTypeId", + "in": "query", + "description": "Format - int64. Return projects if it contains the specified project type", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "invoiceId", + "in": "query", + "description": "Format - int64. Return projects if it contains the specified invoice", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. Return project if technician is assigned to any appointments on any job in the project", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Return project if it contains the specified job", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "appointmentId", + "in": "query", + "description": "Format - int64. Return project if it contains the specified appointment in the project's jobs", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "projectManagerIds", + "in": "query", + "description": "Filters by id of managers for matching project", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Returns projects which have at least one of the provided business units assigned ", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "startsBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects that start before date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "startsOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects that start on or after date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "completedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects that are completed before date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "completedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects that are completed on or after date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "targetCompletionDateBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects whose target completion date is before date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "targetCompletionDateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects whose target completion date is on or after date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects whose last modification date is before date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return projects whose last modification date is on or after date", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Returns projects which have one of the provided statuses.\n\"None\" could be passed as one of the values to include projects without a status in the resulting collection.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn, Name, TargetCompletionDate.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.ProjectResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "number": "string", + "name": "string", + "summary": "string", + "status": "string", + "statusId": 0, + "subStatus": "string", + "subStatusId": 0, + "customerId": 0, + "locationId": 0, + "projectTypeId": 0, + "projectManagerIds": [ + 0 + ], + "businessUnitIds": [ + 0 + ], + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "modifiedOn": "string", + "createdOn": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "jobIds": [ + 0 + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Projects" + ], + "summary": "Creates a New Project", + "description": "Creates a New Project", + "operationId": "Projects_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.CreateProjectRequest" + }, + "example": { + "locationId": 0, + "customerId": 0, + "projectTypeId": 0, + "projectManagerIds": [ + 0 + ], + "name": "string", + "summary": "string", + "statusId": 0, + "subStatusId": 0, + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectResponse" + }, + "example": { + "id": 0, + "number": "string", + "name": "string", + "summary": "string", + "status": "string", + "statusId": 0, + "subStatus": "string", + "subStatusId": 0, + "customerId": 0, + "locationId": 0, + "projectTypeId": 0, + "projectManagerIds": [ + 0 + ], + "businessUnitIds": [ + 0 + ], + "startDate": "string", + "targetCompletionDate": "string", + "actualCompletionDate": "string", + "modifiedOn": "string", + "createdOn": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "jobIds": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects/{id}/notes": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Gets a list of notes on the specified project", + "description": "Gets a list of notes on the specified project", + "operationId": "Projects_GetNotes", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.NoteResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Projects" + ], + "summary": "Creates a note on the specified project", + "description": "Creates a note on the specified project", + "operationId": "Projects_CreateNote", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectNoteCreateRequest" + }, + "example": { + "text": "string", + "pinToTop": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.NoteResponse" + }, + "example": { + "text": "string", + "isPinned": true, + "createdById": 0, + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects/{id}/attach-job/{jobId}": { + "post": { + "tags": [ + "Projects" + ], + "summary": "Attaches Job to the specified project", + "description": "Attaches Job to the specified project", + "operationId": "Projects_AttachJob", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "jobId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects/detach-job/{jobId}": { + "post": { + "tags": [ + "Projects" + ], + "summary": "Detaches Job from the project", + "description": "Detaches Job from the project", + "operationId": "Projects_DetachJob", + "parameters": [ + { + "name": "jobId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects/{id}/messages": { + "post": { + "tags": [ + "Projects" + ], + "summary": "Creates a message on a project", + "description": "Creates a message on a project", + "operationId": "Projects_CreateMessage", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.MessageCreateRequest" + }, + "example": { + "body": "string", + "recipientIds": [ + 0 + ], + "parentMessageId": 0, + "addParentMessageSenderToRecipients": true, + "createdByEmployeeId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.MessageResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/projects/custom-fields": { + "get": { + "tags": [ + "Projects" + ], + "summary": "Returns a list of custom field types available for projects", + "description": "Returns a list of custom field types available for projects", + "operationId": "Projects_GetCustomFieldTypes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.CustomFieldTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "dataType": "Text", + "dataTypeOptions": [ + "string" + ], + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/project-statuses": { + "get": { + "tags": [ + "ProjectStatuses" + ], + "summary": "Gets a list of project statuses", + "description": "Gets a list of project statuses", + "operationId": "ProjectStatuses_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "name", + "in": "query", + "description": "Filters by project status name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, Order, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.ProjectStatusResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "order": 0, + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/project-statuses/{id}": { + "get": { + "tags": [ + "ProjectStatuses" + ], + "summary": "Gets a project status by ID", + "description": "Gets a project status by ID", + "operationId": "ProjectStatuses_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectStatusResponse" + }, + "example": { + "id": 0, + "name": "string", + "order": 0, + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/project-substatuses": { + "get": { + "tags": [ + "ProjectSubStatuses" + ], + "summary": "Gets a list of project sub statuses", + "description": "Gets a list of project sub statuses", + "operationId": "ProjectSubStatuses_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "name", + "in": "query", + "description": "Filters by project sub status name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "statusId", + "in": "query", + "description": "Format - int64. Filters by parent project status id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, Order, StatusId, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.ProjectSubStatusResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "statusId": 0, + "order": 0, + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/project-substatuses/{id}": { + "get": { + "tags": [ + "ProjectSubStatuses" + ], + "summary": "Gets a project sub status by ID", + "description": "Gets a project sub status by ID", + "operationId": "ProjectSubStatuses_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectSubStatusResponse" + }, + "example": { + "id": 0, + "name": "string", + "statusId": 0, + "order": 0, + "modifiedOn": "string", + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/project-types/{id}": { + "get": { + "tags": [ + "ProjectTypes" + ], + "summary": "Gets a project type by ID", + "description": "Gets a project type by ID", + "operationId": "ProjectTypes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Jpm.V2.ProjectTypeResponse" + }, + "example": { + "id": 0, + "name": "string", + "description": "string", + "createdById": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/project-types": { + "get": { + "tags": [ + "ProjectTypes" + ], + "summary": "Gets a list of project types", + "description": "Gets a list of project types", + "operationId": "ProjectTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Jpm.V2.ProjectTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "description": "string", + "createdById": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Jpm.V2.AppointmentResponse": { + "required": [ + "id", + "jobId", + "start", + "end", + "status", + "createdOn", + "modifiedOn", + "customerId", + "unused" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Appointment ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "ID of the job that the appointment was created for", + "format": "int64" + }, + "appointmentNumber": { + "type": "string", + "description": "Appointment number", + "nullable": true + }, + "start": { + "type": "string", + "description": "Appointment's start date/time (in UTC)", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "Appointment's end date/time (in UTC)", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "Arrival window start date/time (in UTC), if configured", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "Arrival window end date/time (in UTC), if configured", + "format": "date-time", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.AppointmentStatus" + } + ], + "description": "Appointment's status" + }, + "specialInstructions": { + "type": "string", + "description": "Special instructions associated to the appointment", + "format": "multiline", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the appointment was created (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the appointment was modified (in UTC)", + "format": "date-time" + }, + "customerId": { + "type": "integer", + "description": "Id of a customer that the appointment was created for", + "format": "int64" + }, + "unused": { + "type": "boolean", + "description": "Returns true if the appointment is unused" + } + }, + "additionalProperties": false, + "description": "Appointment response model" + }, + "Jpm.V2.AppointmentStatus": { + "enum": [ + "Scheduled", + "Dispatched", + "Working", + "Hold", + "Done", + "Canceled" + ], + "type": "string", + "description": "Indicates the status of a AppointmentResponse.", + "x-enumNames": [ + "Scheduled", + "Dispatched", + "Working", + "Hold", + "Done", + "Canceled" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "PaginatedResponse_Of_Jpm.V2.AppointmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.AppointmentAddRequest": { + "required": [ + "jobId", + "start", + "end" + ], + "type": "object", + "properties": { + "jobId": { + "type": "integer", + "description": "ID of job for new appointment", + "format": "int64" + }, + "start": { + "type": "string", + "description": "Start date/time (in UTC) of new appointment", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "End date/time (in UTC) of new appointment", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "Arrival window start date/time (in UTC) for new appointment, if configured", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "Arrival window end date/time (in UTC) for new appointment, if configured", + "format": "date-time", + "nullable": true + }, + "technicianIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of IDs of technicians to assign to new appointment", + "nullable": true + }, + "specialInstructions": { + "type": "string", + "description": "Special instructions associated to the appointment", + "format": "multiline", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.AppointmentRescheduleRequest": { + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "New start date/time (in UTC) for appointment", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "New end date/time (in UTC) for appointment", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "New arrival window start date/time (in UTC) for appointment, if configured", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "New arrival window end date/time (in UTC) for appointment, if configured", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.HoldAppointmentRequest": { + "required": [ + "reasonId", + "memo" + ], + "type": "object", + "properties": { + "reasonId": { + "type": "integer", + "description": "ID of the hold reason", + "format": "int64" + }, + "memo": { + "type": "string", + "description": "Memo of why the appointment is going on hold", + "format": "multiline" + } + }, + "additionalProperties": false + }, + "Jpm.V2.UpdateAppointmentSpecialInstructionsRequest": { + "required": [ + "specialInstructions" + ], + "type": "object", + "properties": { + "specialInstructions": { + "type": "string", + "description": "New special instructions associated to the appointment", + "format": "multiline" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportJobsResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportJobsResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportJobsResponse": { + "required": [ + "id", + "jobNumber", + "customerId", + "locationId", + "jobStatus", + "businessUnitId", + "jobTypeId", + "priority", + "campaignId", + "customFields", + "appointmentCount", + "firstAppointmentId", + "lastAppointmentId", + "noCharge", + "notificationsEnabled", + "createdOn", + "createdById", + "modifiedOn", + "tagTypeIds", + "externalData", + "customerPo", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job", + "format": "int64" + }, + "jobNumber": { + "type": "string", + "description": "Job number" + }, + "projectId": { + "type": "integer", + "description": "ID of the job's project", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "ID of the job's customer", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "ID of the job's location", + "format": "int64" + }, + "jobStatus": { + "type": "string", + "description": "Status of the job" + }, + "completedOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was completed", + "format": "date-time", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the job's business unit", + "format": "int64" + }, + "jobTypeId": { + "type": "integer", + "description": "ID of job type", + "format": "int64" + }, + "priority": { + "type": "string", + "description": "Priority of the job" + }, + "campaignId": { + "type": "integer", + "description": "ID of the job's campaign", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Job summary", + "format": "html", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldApiModel" + }, + "description": "Custom fields on the job" + }, + "appointmentCount": { + "type": "integer", + "description": "Number of appointments on the job", + "format": "int64" + }, + "firstAppointmentId": { + "type": "integer", + "description": "ID of the first appointment on the job", + "format": "int64" + }, + "lastAppointmentId": { + "type": "integer", + "description": "ID of the last appointment on the job", + "format": "int64" + }, + "recallForId": { + "type": "integer", + "description": "ID of the job for which this job is a recall", + "format": "int64", + "nullable": true + }, + "warrantyId": { + "type": "integer", + "description": "ID of the job for which this job is a warranty", + "format": "int64", + "nullable": true + }, + "jobGeneratedLeadSource": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobGeneratedLeadSource" + } + ], + "description": "Object that contains:\n JobId: ID of the job from which this job was generated\n EmployeeId: ID of the office user or technician\n ", + "nullable": true + }, + "noCharge": { + "type": "boolean", + "description": "Whether the job is a no-charge job" + }, + "notificationsEnabled": { + "type": "boolean", + "description": "Whether notifications will be sent to customers" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user who created the job", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when job was last modified", + "format": "date-time" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tags on the job" + }, + "leadCallId": { + "type": "integer", + "description": "ID of the Call that resulted in this job", + "format": "int64", + "nullable": true + }, + "bookingId": { + "type": "integer", + "description": "ID of the Booking that resulted in this job", + "format": "int64", + "nullable": true + }, + "soldById": { + "type": "integer", + "description": "ID of the Technician that sold this job", + "format": "int64", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job,\nthat corresponds to the application guid provided in the request." + }, + "customerPo": { + "type": "string", + "description": "Customer PO" + }, + "active": { + "type": "boolean", + "description": "Whether this job is active, or not anymore." + } + }, + "additionalProperties": false + }, + "CustomFieldApiModel": { + "required": [ + "typeId", + "name", + "value" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Jpm.V2.JobGeneratedLeadSource": { + "type": "object", + "properties": { + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "employeeId": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.ExternalDataModel": { + "required": [ + "key", + "value" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value." + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportProjectsResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportProjectsResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportProjectsResponse": { + "required": [ + "id", + "number", + "customerId", + "locationId", + "projectManagerIds", + "businessUnitIds", + "createdOn", + "customFields", + "externalData", + "jobIds", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the project", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Project number" + }, + "name": { + "type": "string", + "description": "Project name", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Project summary", + "format": "html", + "nullable": true + }, + "status": { + "type": "string", + "description": "Project status", + "nullable": true + }, + "statusId": { + "type": "integer", + "description": "Project status id", + "format": "int64", + "nullable": true + }, + "subStatus": { + "type": "string", + "description": "Project substatus", + "nullable": true + }, + "subStatusId": { + "type": "integer", + "description": "Project substatus id", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "ID of the project's customer", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "ID of the project's location", + "format": "int64" + }, + "projectTypeId": { + "type": "integer", + "description": "ID of the project's type", + "format": "int64", + "nullable": true + }, + "projectManagerIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of project managers for the project." + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of business units for the project." + }, + "startDate": { + "type": "string", + "description": "Start date of the project", + "format": "date-time", + "nullable": true + }, + "targetCompletionDate": { + "type": "string", + "description": "Target completion date of the project", + "format": "date-time", + "nullable": true + }, + "actualCompletionDate": { + "type": "string", + "description": "Actual completion date of the project", + "format": "date-time", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Projects last modification date", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the project was created", + "format": "date-time" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldApiModel" + }, + "description": "Custom fields on the project" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this project,\nthat corresponds to the application guid provided in the request." + }, + "jobIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of jobs associated with this project." + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportAppointmentsResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportAppointmentsResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportAppointmentsResponse": { + "required": [ + "id", + "jobId", + "start", + "end", + "status", + "createdOn", + "modifiedOn", + "customerId", + "unused", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Appointment ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "ID of the job that the appointment was created for", + "format": "int64" + }, + "appointmentNumber": { + "type": "string", + "description": "Appointment number", + "nullable": true + }, + "start": { + "type": "string", + "description": "Appointment's start date/time (in UTC)", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "Appointment's end date/time (in UTC)", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "Arrival window start date/time (in UTC), if configured", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "Arrival window end date/time (in UTC), if configured", + "format": "date-time", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.AppointmentStatus" + } + ], + "description": "Appointment's status" + }, + "specialInstructions": { + "type": "string", + "description": "Special instructions associated to the appointment", + "format": "multiline", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the appointment was created (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the appointment was modified (in UTC)", + "format": "date-time" + }, + "customerId": { + "type": "integer", + "description": "Id of a customer that the appointment was created for", + "format": "int64" + }, + "unused": { + "type": "boolean", + "description": "Returns true if the appointment is unused" + }, + "active": { + "type": "boolean", + "description": "Whether this appointment is active, or not anymore." + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportJobCanceledLogResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportJobCanceledLogResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportJobCanceledLogResponse": { + "required": [ + "id", + "jobId", + "reasonId", + "createdOn", + "createdById", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job canceled log", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "ID of the job that has been canceled", + "format": "int64" + }, + "reasonId": { + "type": "integer", + "description": "ID of the job cancel reason", + "format": "int64" + }, + "memo": { + "type": "string", + "description": "Job canceled log additional comments", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job canceled log was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of user who canceled the job", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether the job canceled log is active" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportJobNotesResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportJobNotesResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportJobNotesResponse": { + "required": [ + "id", + "active", + "text", + "isPinned", + "createdById", + "createdOn", + "modifiedOn", + "jobId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Note Id.", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether this note is active, or not anymore." + }, + "text": { + "type": "string", + "description": "Text content of a note" + }, + "isPinned": { + "type": "boolean", + "description": "Whether the note is pinned to the top" + }, + "createdById": { + "type": "integer", + "description": "ID of user who created this note", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) the note was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the note was modified", + "format": "date-time" + }, + "jobId": { + "type": "integer", + "description": "Notes Job Id.", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportProjectNotesResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportProjectNotesResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportProjectNotesResponse": { + "required": [ + "id", + "active", + "text", + "isPinned", + "createdById", + "createdOn", + "modifiedOn", + "projectId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Note Id.", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether this note is active, or not anymore." + }, + "text": { + "type": "string", + "description": "Text content of a note" + }, + "isPinned": { + "type": "boolean", + "description": "Whether the note is pinned to the top" + }, + "createdById": { + "type": "integer", + "description": "ID of user who created this note", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) the note was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the note was modified", + "format": "date-time" + }, + "projectId": { + "type": "integer", + "description": "Notes Project Id.", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Jpm.V2.ExportJobHistoryResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportJobHistoryResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Jpm.V2.ExportJobHistoryResponse": { + "required": [ + "jobId", + "history" + ], + "type": "object", + "properties": { + "jobId": { + "type": "integer", + "description": "ID of the job ", + "format": "int64" + }, + "history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExportJobHistoryEntry" + }, + "description": "Job history entries " + } + }, + "additionalProperties": false + }, + "Jpm.V2.ExportJobHistoryEntry": { + "required": [ + "id", + "eventType", + "date", + "usedSchedulingTool" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the log ", + "format": "int64" + }, + "employeeId": { + "type": "integer", + "description": "ID of the employee ", + "format": "int64", + "nullable": true + }, + "eventType": { + "type": "string", + "description": "Type of the job status " + }, + "date": { + "type": "string", + "description": "Date of the log ", + "format": "date-time" + }, + "usedSchedulingTool": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobSchedulingTool" + } + ], + "description": "Scheduling tool used " + } + }, + "additionalProperties": false + }, + "Jpm.V2.JobSchedulingTool": { + "enum": [ + "Manual", + "SmartSchedule", + "SmartDispatch", + "TechnicianRouteOptimization" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Manual", + "SmartSchedule", + "SmartDispatch", + "TechnicianRouteOptimization" + ] + }, + "PaginatedResponse_Of_Jpm.V2.JobCancelReasonResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.JobCancelReasonResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.JobCancelReasonResponse": { + "required": [ + "id", + "name", + "active", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job cancel reason", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the job cancel reason" + }, + "active": { + "type": "boolean", + "description": "Whether the job cancel reason is active" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when job was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "PaginatedResponse_Of_Jpm.V2.JobHoldReasonResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.JobHoldReasonResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.JobHoldReasonResponse": { + "required": [ + "id", + "name", + "active", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Job Hold Reason Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Job Hold Reason Name" + }, + "active": { + "type": "boolean", + "description": "Job Hold Reason Active Status" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when job was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Jpm.V2.JobResponse": { + "required": [ + "id", + "jobNumber", + "customerId", + "locationId", + "jobStatus", + "businessUnitId", + "jobTypeId", + "priority", + "campaignId", + "customFields", + "appointmentCount", + "firstAppointmentId", + "lastAppointmentId", + "noCharge", + "notificationsEnabled", + "createdOn", + "createdById", + "modifiedOn", + "tagTypeIds", + "externalData", + "customerPo" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job", + "format": "int64" + }, + "jobNumber": { + "type": "string", + "description": "Job number" + }, + "projectId": { + "type": "integer", + "description": "ID of the job's project", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "ID of the job's customer", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "ID of the job's location", + "format": "int64" + }, + "jobStatus": { + "type": "string", + "description": "Status of the job" + }, + "completedOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was completed", + "format": "date-time", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the job's business unit", + "format": "int64" + }, + "jobTypeId": { + "type": "integer", + "description": "ID of job type", + "format": "int64" + }, + "priority": { + "type": "string", + "description": "Priority of the job" + }, + "campaignId": { + "type": "integer", + "description": "ID of the job's campaign", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Job summary", + "format": "html", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldApiModel" + }, + "description": "Custom fields on the job" + }, + "appointmentCount": { + "type": "integer", + "description": "Number of appointments on the job", + "format": "int64" + }, + "firstAppointmentId": { + "type": "integer", + "description": "ID of the first appointment on the job", + "format": "int64" + }, + "lastAppointmentId": { + "type": "integer", + "description": "ID of the last appointment on the job", + "format": "int64" + }, + "recallForId": { + "type": "integer", + "description": "ID of the job for which this job is a recall", + "format": "int64", + "nullable": true + }, + "warrantyId": { + "type": "integer", + "description": "ID of the job for which this job is a warranty", + "format": "int64", + "nullable": true + }, + "jobGeneratedLeadSource": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobGeneratedLeadSource" + } + ], + "description": "Object that contains:\n JobId: ID of the job from which this job was generated\n EmployeeId: ID of the office user or technician\n ", + "nullable": true + }, + "noCharge": { + "type": "boolean", + "description": "Whether the job is a no-charge job" + }, + "notificationsEnabled": { + "type": "boolean", + "description": "Whether notifications will be sent to customers" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user who created the job", + "format": "int64" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when job was last modified", + "format": "date-time" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tags on the job" + }, + "leadCallId": { + "type": "integer", + "description": "ID of the Call that resulted in this job", + "format": "int64", + "nullable": true + }, + "bookingId": { + "type": "integer", + "description": "ID of the Booking that resulted in this job", + "format": "int64", + "nullable": true + }, + "soldById": { + "type": "integer", + "description": "ID of the Technician that sold this job", + "format": "int64", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job,\nthat corresponds to the application guid provided in the request." + }, + "customerPo": { + "type": "string", + "description": "Customer PO" + } + }, + "additionalProperties": false + }, + "Jpm.V2.JobCreateRequest": { + "required": [ + "customerId", + "locationId", + "businessUnitId", + "jobTypeId", + "priority", + "campaignId", + "appointments" + ], + "type": "object", + "properties": { + "customerId": { + "type": "integer", + "description": "ID of the job's customer", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "ID of the job's location", + "format": "int64" + }, + "projectId": { + "type": "integer", + "description": "ID of the job's project", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the job's business unit", + "format": "int64" + }, + "jobGeneratedLeadSource": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobGeneratedLeadSource" + } + ], + "description": "Object that contains:\n JobId: ID of the job from which this job was generated\n EmployeeId: ID of the office user or technician\n ", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "ID of job type", + "format": "int64" + }, + "priority": { + "type": "string", + "description": "Priority of the job" + }, + "campaignId": { + "type": "integer", + "description": "ID of the job's campaign", + "format": "int64" + }, + "appointments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.AppointmentInformation" + }, + "description": "List of appointment information" + }, + "summary": { + "type": "string", + "description": "Job summary", + "format": "html", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.CustomFieldModel" + }, + "description": "Custom fields on the job", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of IDs of tags on the job", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this job.", + "nullable": true + }, + "invoiceSignatureIsRequired": { + "type": "boolean", + "description": "Optional model that informs if invoice should requires a signature or not\nif not informed will follow the rules for location and job type", + "nullable": true + }, + "customerPo": { + "type": "string", + "description": "Customer PO", + "nullable": true + }, + "soldById": { + "type": "integer", + "description": "ID of the Technician who sold the job", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.AppointmentInformation": { + "required": [ + "start", + "end" + ], + "type": "object", + "properties": { + "start": { + "type": "string", + "description": "Start date/time (in UTC) for the appointment", + "format": "date-time" + }, + "end": { + "type": "string", + "description": "End date/time (in UTC) for the appointment", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "Start date/time (in UTC) for the arrival window of the appointment", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "End date/time (in UTC) for the arrival window of the appointment", + "format": "date-time", + "nullable": true + }, + "technicianIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of IDs of technicians who will be assigned on the appointment", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.CustomFieldModel": { + "required": [ + "typeId" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "description": "ID of the custom field", + "format": "int64" + }, + "value": { + "type": "string", + "description": "Value of the custom field", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.ExternalDataCreateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Jpm.V2.CancelJobRequest": { + "required": [ + "reasonId", + "memo" + ], + "type": "object", + "properties": { + "reasonId": { + "type": "integer", + "description": "ID of job cancel reason", + "format": "int64" + }, + "memo": { + "type": "string", + "description": "Memo of job cancel reason", + "format": "multiline" + } + }, + "additionalProperties": false + }, + "Jpm.V2.HoldJobRequest": { + "required": [ + "reasonId", + "memo" + ], + "type": "object", + "properties": { + "reasonId": { + "type": "integer", + "description": "ID of job hold reason", + "format": "int64" + }, + "memo": { + "type": "string", + "description": "Memo of job hold reason", + "format": "multiline" + } + }, + "additionalProperties": false + }, + "Jpm.V2.CompleteJobRequest": { + "required": [ + "completedOn" + ], + "type": "object", + "properties": { + "completedOn": { + "type": "string", + "description": "Date on which the job was completed", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Jpm.V2.UpdateJobRequest": { + "type": "object", + "properties": { + "customerId": { + "type": "integer", + "description": "ID of the job's customer", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "ID of the job's location", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "ID of the job's business unit", + "format": "int64" + }, + "jobGeneratedLeadSource": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.JobGeneratedLeadSource" + } + ], + "description": "Object that contains:\n JobId: ID of the job from which this job was generated\n EmployeeId: ID of the office user or technician\n ", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "ID of job type", + "format": "int64" + }, + "priority": { + "type": "string", + "description": "Priority of the job" + }, + "campaignId": { + "type": "integer", + "description": "ID of the job's campaign", + "format": "int64" + }, + "summary": { + "type": "string", + "description": "Job summary", + "format": "html" + }, + "shouldUpdateInvoiceItems": { + "type": "boolean", + "description": "If set to true, update the business unit of invoice items on job's invoice" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.CustomFieldModel" + }, + "description": "List of custom fields and their values. This list must describe the full list of custom fields on the job.\nIf job A has values for custom fields X and Y and this field only contains a model for custom field X, then\nthe value for custom field Y on job A will be removed." + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of tag types. This list must describe the full list of tags on the job. If job A has tags X and Y and\nthis field only contains a ID for tag X, then tag Y on job A will be removed." + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model." + }, + "customerPo": { + "type": "string", + "description": "Customer PO" + }, + "soldById": { + "type": "integer", + "description": "ID of the Technician who sold the job.", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.ExternalDataUpdateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "patchMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataPatchMode" + } + ], + "description": "External data patch mode.\\\n\"Replace\" (default) replaces all existing keys with new values. If job A has custom data with keys X and Y and this field only contains an item\nwith a key X, then custom data with a key Y on job A will be removed.\\\n\"Merge\" will only replace key X in the example above. Keys with null value will be deleted.", + "nullable": true + }, + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataUpdateModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Jpm.V2.ExternalDataPatchMode": { + "enum": [ + "Replace", + "Merge" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Replace", + "Merge" + ] + }, + "Jpm.V2.ExternalDataUpdateModel": { + "required": [ + "key" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value.", + "format": "multiline", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.JobResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.JobResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.JobStatus": { + "enum": [ + "Scheduled", + "Dispatched", + "InProgress", + "Hold", + "Completed", + "Canceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Scheduled", + "Dispatched", + "InProgress", + "Hold", + "Completed", + "Canceled" + ] + }, + "Jpm.V2.JobAppointmentStatus": { + "enum": [ + "Scheduled", + "Dispatched", + "Working", + "Hold", + "Done", + "Canceled" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Scheduled", + "Dispatched", + "Working", + "Hold", + "Done", + "Canceled" + ] + }, + "PaginatedResponse_Of_Jpm.V2.NoteResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.NoteResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.NoteResponse": { + "required": [ + "text", + "isPinned", + "createdById", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Text content of a note" + }, + "isPinned": { + "type": "boolean", + "description": "Whether the note is pinned to the top" + }, + "createdById": { + "type": "integer", + "description": "ID of user who created this note", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) the note was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) the note was modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Jpm.V2.JobNoteCreateRequest": { + "required": [ + "text" + ], + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Text content of job note" + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin job note to the top", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.CancelReasonResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.CancelReasonResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.CancelReasonResponse": { + "required": [ + "jobId", + "reasonId", + "name", + "text" + ], + "type": "object", + "properties": { + "jobId": { + "type": "integer", + "description": "Job ID", + "format": "int64" + }, + "reasonId": { + "type": "integer", + "description": "ID of the reason", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the reason" + }, + "text": { + "type": "string", + "description": "Text of the reason" + } + }, + "additionalProperties": false + }, + "Jpm.V2.JobHistoryResponse": { + "type": "object", + "properties": { + "history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.Jobs.JobHistoryItemModel" + }, + "description": "List of logs for the job", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.Jobs.JobHistoryItemModel": { + "required": [ + "id", + "eventType", + "date", + "usedSchedulingTool" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "employeeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "eventType": { + "type": "string" + }, + "date": { + "type": "string", + "format": "date-time" + }, + "usedSchedulingTool": { + "$ref": "#/components/schemas/Jpm.Jobs.JobSchedulingTool" + } + }, + "additionalProperties": false + }, + "Jpm.Jobs.JobSchedulingTool": { + "enum": [ + "Manual", + "SmartSchedule", + "SmartDispatch", + "TechnicianRouteOptimization" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Manual", + "SmartSchedule", + "SmartDispatch", + "TechnicianRouteOptimization" + ] + }, + "Jpm.V2.MessageResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The unique identifier of the message", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Jpm.V2.MessageCreateRequest": { + "required": [ + "body", + "createdByEmployeeId" + ], + "type": "object", + "properties": { + "body": { + "type": "string", + "description": "Text content of a message" + }, + "recipientIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of Users mentioned in this message", + "nullable": true + }, + "parentMessageId": { + "type": "integer", + "description": "ID of a message this message is a reply to", + "format": "int64", + "nullable": true + }, + "addParentMessageSenderToRecipients": { + "type": "boolean", + "description": "Set this to true if you want the author of Parent Message to be added to Recipients of this message ", + "nullable": true + }, + "createdByEmployeeId": { + "type": "integer", + "description": "ID of an employee who will be marked as author of this message", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.JobCanceledLogResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.JobCanceledLogResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.JobCanceledLogResponse": { + "required": [ + "id", + "jobId", + "reasonId", + "createdOn", + "createdById", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job canceled log", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "ID of the job that has been canceled", + "format": "int64" + }, + "reasonId": { + "type": "integer", + "description": "ID of the job cancel reason", + "format": "int64" + }, + "memo": { + "type": "string", + "description": "Job canceled log additional comments", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job canceled log was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of user who canceled the job", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether the job canceled log is active" + } + }, + "additionalProperties": false, + "description": "JobCanceledLog response model" + }, + "Jpm.V2.JobBookedLogResponse": { + "required": [ + "id", + "jobId", + "jobAppointmentId", + "start", + "createdOn", + "createdById", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job booked log", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "ID of the job that has been booked", + "format": "int64" + }, + "jobAppointmentId": { + "type": "integer", + "description": "ID of the job that has been booked", + "format": "int64" + }, + "start": { + "type": "string", + "description": "Start date/time (in UTC) of the job", + "format": "date-time" + }, + "arrivalWindowStart": { + "type": "string", + "description": "Arrival window start date/time (in UTC) of the job", + "format": "date-time", + "nullable": true + }, + "arrivalWindowEnd": { + "type": "string", + "description": "Arrival window end date/time (in UTC) of the job", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the job booked log was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of user who booked the job", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether the job booked log is active" + } + }, + "additionalProperties": false, + "description": "JobBookedLog response model" + }, + "PaginatedResponse_Of_Jpm.V2.CustomFieldTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.CustomFieldTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.CustomFieldTypeResponse": { + "required": [ + "id", + "name", + "dataType", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "dataType": { + "$ref": "#/components/schemas/Jpm.V2.CustomFieldDataType" + }, + "dataTypeOptions": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Jpm.V2.CustomFieldDataType": { + "enum": [ + "Text", + "Dropdown", + "Numeric" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Text", + "Dropdown", + "Numeric" + ] + }, + "PaginatedResponse_Of_Jpm.V2.JobTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.JobTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.JobTypeResponse": { + "required": [ + "id", + "name", + "businessUnitIds", + "skills", + "tagTypeIds", + "priority", + "duration", + "class", + "summary", + "noCharge", + "invoiceSignaturesRequired", + "modifiedOn", + "externalData", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the job type", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the job type" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Business Unit Ids associated with job type" + }, + "skills": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of skills required to complete this job" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tags here will automatically be applied to jobs booked" + }, + "priority": { + "type": "string", + "description": "Level of urgency for this type of job" + }, + "duration": { + "type": "integer", + "description": "Avg length of time for this job type", + "format": "int64" + }, + "soldThreshold": { + "type": "number", + "description": "A job is considered as converted if subtotal meets or exceeds this threshold", + "format": "decimal", + "nullable": true + }, + "class": { + "type": "string", + "description": "Let’s you group other job types by class" + }, + "summary": { + "type": "string", + "description": "Text that is automatically added to job summary when booked", + "format": "multiline" + }, + "noCharge": { + "type": "boolean", + "description": "When true, all jobs are considered no charge" + }, + "enforceRecurringServiceEventSelection": { + "type": "boolean", + "description": "When true enforce recurring service event", + "nullable": true + }, + "invoiceSignaturesRequired": { + "type": "boolean", + "description": "When true signature is required" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when job type was last modified", + "format": "date-time" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job type,\nthat corresponds to the application guid provided in the request." + }, + "active": { + "type": "boolean", + "description": "When true, job type is active" + } + }, + "additionalProperties": false + }, + "Jpm.V2.CreateJobTypeRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the job type" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Business Unit Ids associated with job type", + "nullable": true + }, + "skills": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of skills required to complete this job", + "nullable": true + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tags here will automatically be applied to jobs booked", + "nullable": true + }, + "priority": { + "type": "string", + "description": "Level of urgency for this type of job", + "nullable": true + }, + "duration": { + "type": "integer", + "description": "Avg length of time for this job type", + "format": "int32", + "nullable": true + }, + "soldThreshold": { + "type": "number", + "description": "A job is considered as converted if subtotal meets or exceeds this threshold", + "format": "decimal", + "nullable": true + }, + "class": { + "type": "string", + "description": "Let’s you group other job types by class", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Text that is automatically added to job summary when booked", + "format": "multiline", + "nullable": true + }, + "noCharge": { + "type": "boolean", + "description": "When true, all jobs are considered no charge", + "nullable": true + }, + "enforceRecurringServiceEventSelection": { + "type": "boolean", + "description": "When true enforce recurring service event", + "nullable": true + }, + "invoiceSignaturesRequired": { + "type": "boolean", + "description": "When true signature is required", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this job type.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.UpdateJobTypeRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the job type" + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Business Unit Ids associated with job type" + }, + "skills": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of skills required to complete this job" + }, + "tagTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Tags here will automatically be applied to jobs booked" + }, + "priority": { + "type": "string", + "description": "Level of urgency for this type of job" + }, + "duration": { + "type": "integer", + "description": "Avg length of time for this job type", + "format": "int32" + }, + "soldThreshold": { + "type": "number", + "description": "A job is considered as converted if subtotal meets or exceeds this threshold", + "format": "decimal", + "nullable": true + }, + "class": { + "type": "string", + "description": "Let’s you group other job types by class" + }, + "summary": { + "type": "string", + "description": "Text that is automatically added to job summary when booked" + }, + "noCharge": { + "type": "boolean", + "description": "When true, all jobs are considered no charge" + }, + "enforceRecurringServiceEventSelection": { + "type": "boolean", + "description": "When true enforce recurring service event" + }, + "invoiceSignaturesRequired": { + "type": "boolean", + "description": "When true signature is required" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model " + } + }, + "additionalProperties": false + }, + "Jpm.V2.ProjectResponse": { + "required": [ + "id", + "number", + "customerId", + "locationId", + "projectManagerIds", + "businessUnitIds", + "createdOn", + "customFields", + "externalData", + "jobIds" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the project", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Project number" + }, + "name": { + "type": "string", + "description": "Project name", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Project summary", + "format": "html", + "nullable": true + }, + "status": { + "type": "string", + "description": "Project status", + "nullable": true + }, + "statusId": { + "type": "integer", + "description": "Project status id", + "format": "int64", + "nullable": true + }, + "subStatus": { + "type": "string", + "description": "Project substatus", + "nullable": true + }, + "subStatusId": { + "type": "integer", + "description": "Project substatus id", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "ID of the project's customer", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "ID of the project's location", + "format": "int64" + }, + "projectTypeId": { + "type": "integer", + "description": "ID of the project's type", + "format": "int64", + "nullable": true + }, + "projectManagerIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of project managers for the project." + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of business units for the project." + }, + "startDate": { + "type": "string", + "description": "Start date of the project", + "format": "date-time", + "nullable": true + }, + "targetCompletionDate": { + "type": "string", + "description": "Target completion date of the project", + "format": "date-time", + "nullable": true + }, + "actualCompletionDate": { + "type": "string", + "description": "Actual completion date of the project", + "format": "date-time", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Projects last modification date", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the project was created", + "format": "date-time" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldApiModel" + }, + "description": "Custom fields on the project" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataModel" + }, + "description": "List of external data attached to this project,\nthat corresponds to the application guid provided in the request." + }, + "jobIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of jobs associated with this project." + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.ProjectResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ProjectResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.CreateProjectRequest": { + "required": [ + "locationId" + ], + "type": "object", + "properties": { + "locationId": { + "type": "integer", + "description": "ID of the project's location", + "format": "int64" + }, + "customerId": { + "type": "integer", + "description": "ID of the project's customer", + "format": "int64", + "nullable": true + }, + "projectTypeId": { + "type": "integer", + "description": "ID of the project's type", + "format": "int64", + "nullable": true + }, + "projectManagerIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the project's managers", + "nullable": true + }, + "name": { + "type": "string", + "description": "Project name", + "nullable": true + }, + "summary": { + "type": "string", + "description": "Project summary", + "format": "html", + "nullable": true + }, + "statusId": { + "type": "integer", + "description": "Project status id", + "format": "int64", + "nullable": true + }, + "subStatusId": { + "type": "integer", + "description": "Project sub status id", + "format": "int64", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "Start date of the project", + "format": "date-time", + "nullable": true + }, + "targetCompletionDate": { + "type": "string", + "description": "Target completion date of the project", + "format": "date-time", + "nullable": true + }, + "actualCompletionDate": { + "type": "string", + "description": "Actual completion date of the project", + "format": "date-time", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.CustomFieldCreateOrUpdateModel" + }, + "description": "Project record’s custom fields", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this project.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Jpm.V2.CustomFieldCreateOrUpdateModel": { + "required": [ + "typeId", + "value" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "description": "ID of the custom field", + "format": "int64" + }, + "value": { + "type": "string", + "description": "Value of the custom field" + } + }, + "additionalProperties": false + }, + "Jpm.V2.UpdateProjectRequest": { + "type": "object", + "properties": { + "projectManagerIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the project's managers" + }, + "jobIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the project's jobs" + }, + "name": { + "type": "string", + "description": "Project name" + }, + "summary": { + "type": "string", + "description": "Project summary", + "format": "html" + }, + "statusId": { + "type": "integer", + "description": "Project status id", + "format": "int64" + }, + "subStatusId": { + "type": "integer", + "description": "Project sub status id", + "format": "int64" + }, + "projectTypeId": { + "type": "integer", + "description": "Project type id", + "format": "int64", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "Start date of the project", + "format": "date-time" + }, + "targetCompletionDate": { + "type": "string", + "description": "Target completion date of the project", + "format": "date-time" + }, + "actualCompletionDate": { + "type": "string", + "description": "Actual completion date of the project", + "format": "date-time" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.CustomFieldCreateOrUpdateModel" + }, + "description": "Project record’s custom fields" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Jpm.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model." + } + }, + "additionalProperties": false + }, + "Jpm.V2.ProjectNoteCreateRequest": { + "required": [ + "text" + ], + "type": "object", + "properties": { + "text": { + "minLength": 1, + "type": "string", + "description": "Text content of job note" + }, + "pinToTop": { + "type": "boolean", + "description": "Whether to pin job note to the top", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.ProjectStatusResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ProjectStatusResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.ProjectStatusResponse": { + "required": [ + "id", + "name", + "order", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the project status", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the project status" + }, + "order": { + "type": "integer", + "description": "Order of the project status", + "format": "int32" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when project status was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.ProjectSubStatusResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ProjectSubStatusResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Jpm.V2.ProjectSubStatusResponse": { + "required": [ + "id", + "name", + "statusId", + "order", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the project sub status", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the project sub status" + }, + "statusId": { + "type": "integer", + "description": "Id of the parent status", + "format": "int64" + }, + "order": { + "type": "integer", + "description": "Order of the project status", + "format": "int32" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when project sub status was last modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "When true, project sub status is active" + } + }, + "additionalProperties": false + }, + "Jpm.V2.ProjectTypeResponse": { + "required": [ + "id", + "name", + "description" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "createdById": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Jpm.V2.ProjectTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Jpm.V2.ProjectTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/marketing-ads-v2.json b/openapi_specs/marketing-ads-v2.json new file mode 100644 index 0000000..d91ad91 --- /dev/null +++ b/openapi_specs/marketing-ads-v2.json @@ -0,0 +1,1611 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Marketing Ads", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/marketingads/v2" + } + ], + "paths": { + "/tenant/{tenant}/attributed-leads": { + "get": { + "tags": [ + "AttributedLeads" + ], + "summary": "Returns attributed leads data.", + "description": "Returns attributed leads data.", + "operationId": "AttributedLeads_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "fromUtc", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Gets or sets the start date and time in UTC for the filtering period.", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "toUtc", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Gets or sets the end date and time in UTC for the filtering period.", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "leadType", + "in": "query", + "description": "Gets or sets the type of lead for filtering purposes. Possible values are:\n\nLeadType.Call\nLeadType.WebBooking\nLeadType.WebLeadForm\nLeadType.ManualJob\n\nIf null, data for all lead types is returned.\\\nValues: [Call, WebBooking, WebLeadForm, ManualJob]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.Client.LeadType" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.Ads.Contracts.AttributedLeads.GetAttributedLeadsResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "dateTime": "string", + "leadType": "Call", + "attribution": { + "utmSource": "string", + "utmMedium": "string", + "utmCampaign": "string", + "landingPageUrl": "string", + "referrerUrl": "string", + "clickId": "string", + "stCampaignId": 0, + "originalCampaign": "string", + "attributionOverwriteType": {}, + "attributionOverwriteId": 0, + "overwrittenBookingJobId": 0, + "adGroupId": "string", + "adGroupName": "string", + "keywordId": "string", + "keywordName": "string" + }, + "job": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "name": "string" + }, + "call": { + "duration": "string", + "id": 0, + "type": "string", + "source": "string", + "callerNumber": "string", + "trackingNumber": "string", + "excusedReason": "string" + }, + "leadForm": { + "leadNumber": 0, + "leadStatus": "string", + "notes": "string" + }, + "booking": { + "id": 0 + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/capacity-warnings": { + "get": { + "tags": [ + "CapacityAwarenessWarning" + ], + "summary": "Returns all capacity awareness warnings.", + "description": "Returns all capacity awareness warnings.", + "operationId": "CapacityAwarenessWarning_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.CapacityAwarenessWarningQueryResult" + }, + "example": { + "tenantId": 0, + "tenantName": "string", + "totalCount": 0, + "data": [ + { + "campaignName": "string", + "warningType": "string", + "businessUnits": [ + "string" + ], + "lookaheadWindow": 0, + "thresholdValue": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/external-call-attributions": { + "post": { + "tags": [ + "ExternalCallAttributions" + ], + "summary": "Attributes an external call (possibly coming from Call Tracking Software) to a web session.", + "description": "Attributes an external call (possibly coming from Call Tracking Software) to a web session.", + "operationId": "ExternalCallAttributions_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.Ads.V2.CreateExternalCallAttributionRequest" + }, + "example": { + "webSessionData": { + "landingPageUrl": "string", + "referrerUrl": "string", + "gclid": "string", + "fbclid": "string", + "msclkid": "string", + "utmSource": "string", + "utmMedium": "string", + "utmCampaign": "string", + "utmAdgroup": "string", + "utmTerm": "string", + "utmContent": "string", + "googleAnalyticsClientId": "string" + }, + "externalCallData": { + "customerPhoneNumber": "string", + "forwardingPhoneNumber": "string", + "trackingPhoneNumber": "string", + "callStartedOnUtc": "string" + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/performance": { + "get": { + "tags": [ + "Performance" + ], + "summary": "Returns performance data.", + "description": "Returns performance data.", + "operationId": "Performance_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "fromUtc", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Gets or sets the start date and time in UTC for the filtering period.", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "toUtc", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Gets or sets the end date and time in UTC for the filtering period.", + "required": true, + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "performanceSegmentationType", + "in": "query", + "description": "Gets or sets the type of performance segmentation for filtering purposes. Possible values are:\n\nPerformanceSegmentationType.Campaign\nPerformanceSegmentationType.AdGroup\nPerformanceSegmentationType.Keyword\\\nValues: [Campaign, AdGroup, Keyword]", + "required": true, + "schema": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.PerformanceSegmentationType" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.Ads.Contracts.Performance.GetPerformanceResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "campaign": { + "id": 0, + "name": "string", + "category": "string", + "launchDate": "string", + "status": "None" + }, + "adGroup": { + "id": "string", + "name": "string", + "status": {} + }, + "keyword": { + "id": "string", + "name": "string", + "status": {} + }, + "digitalStats": { + "impressionShare": 0, + "impressions": 0, + "clicks": 0, + "averageCPC": 0, + "conversions": 0, + "allConversions": 0, + "cost": 0, + "clickRate": 0, + "costPerConversion": 0, + "conversionRate": 0 + }, + "leadStats": { + "leads": 0, + "leadCalls": 0, + "onlineBooking": 0, + "manualBooking": 0, + "bookedJobs": 0, + "ranJobs": 0, + "soldJobs": 0, + "revenue": 0, + "bookingRate": 0, + "avgTicket": 0 + }, + "returnOnInvestment": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/job-attributions": { + "post": { + "tags": [ + "ScheduledJobAttributions" + ], + "summary": "Attributes a job to a web session.", + "description": "Attributes a job to a web session.", + "operationId": "ScheduledJobAttributions_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.Ads.V2.CreateScheduledJobAttributionRequest" + }, + "example": { + "webSessionData": { + "landingPageUrl": "string", + "referrerUrl": "string", + "gclid": "string", + "fbclid": "string", + "msclkid": "string", + "utmSource": "string", + "utmMedium": "string", + "utmCampaign": "string", + "utmAdgroup": "string", + "utmTerm": "string", + "utmContent": "string", + "googleAnalyticsClientId": "string" + }, + "jobId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/web-booking-attributions": { + "post": { + "tags": [ + "WebBookingAttributions" + ], + "summary": "Attributes a web booking to a web session.", + "description": "Attributes a web booking to a web session.", + "operationId": "WebBookingAttributions_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.Ads.V2.CreateWebBookingAttributionRequest" + }, + "example": { + "webSessionData": { + "landingPageUrl": "string", + "referrerUrl": "string", + "gclid": "string", + "fbclid": "string", + "msclkid": "string", + "utmSource": "string", + "utmMedium": "string", + "utmCampaign": "string", + "utmAdgroup": "string", + "utmTerm": "string", + "utmContent": "string", + "googleAnalyticsClientId": "string" + }, + "bookingId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/web-lead-form-attributions": { + "post": { + "tags": [ + "WebLeadFormAttributions" + ], + "summary": "Attributes a web lead form to a web session.", + "description": "Attributes a web lead form to a web session.", + "operationId": "WebLeadFormAttributions_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.Ads.V2.CreateWebLeadFormAttributionRequest" + }, + "example": { + "webSessionData": { + "landingPageUrl": "string", + "referrerUrl": "string", + "gclid": "string", + "fbclid": "string", + "msclkid": "string", + "utmSource": "string", + "utmMedium": "string", + "utmCampaign": "string", + "utmAdgroup": "string", + "utmTerm": "string", + "utmContent": "string", + "googleAnalyticsClientId": "string" + }, + "leadId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Marketing.Ads.Contracts.AttributedLeads.GetAttributedLeadsResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.GetAttributedLeadsResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Marketing.Ads.Contracts.AttributedLeads.GetAttributedLeadsResponse": { + "required": [ + "dateTime", + "leadType", + "attribution", + "job", + "customer", + "call", + "leadForm", + "booking" + ], + "type": "object", + "properties": { + "dateTime": { + "type": "string", + "format": "date-time" + }, + "leadType": { + "$ref": "#/components/schemas/Marketing.Ads.Client.LeadType" + }, + "attribution": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.Attribution" + }, + "job": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.Job" + }, + "customer": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.Customer" + }, + "call": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.Call" + }, + "leadForm": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.LeadForm" + }, + "booking": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.Booking" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Client.LeadType": { + "enum": [ + "Call", + "WebBooking", + "WebLeadForm", + "ManualJob" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Call", + "WebBooking", + "WebLeadForm", + "ManualJob" + ] + }, + "Marketing.Ads.Contracts.AttributedLeads.Attribution": { + "required": [ + "utmSource", + "utmMedium", + "utmCampaign", + "landingPageUrl", + "referrerUrl", + "clickId", + "originalCampaign", + "adGroupId", + "adGroupName", + "keywordId", + "keywordName" + ], + "type": "object", + "properties": { + "utmSource": { + "type": "string" + }, + "utmMedium": { + "type": "string" + }, + "utmCampaign": { + "type": "string" + }, + "landingPageUrl": { + "type": "string" + }, + "referrerUrl": { + "type": "string" + }, + "clickId": { + "type": "string" + }, + "stCampaignId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "originalCampaign": { + "type": "string" + }, + "attributionOverwriteType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.AttributedLeads.EntityType" + } + ], + "nullable": true + }, + "attributionOverwriteId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "overwrittenBookingJobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "adGroupId": { + "type": "string" + }, + "adGroupName": { + "type": "string" + }, + "keywordId": { + "type": "string" + }, + "keywordName": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.AttributedLeads.EntityType": { + "enum": [ + "Call", + "Booking", + "Lead" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Call", + "Booking", + "Lead" + ] + }, + "Marketing.Ads.Contracts.AttributedLeads.Job": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.AttributedLeads.Customer": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.AttributedLeads.Call": { + "required": [ + "duration", + "type", + "source", + "callerNumber", + "trackingNumber", + "excusedReason" + ], + "type": "object", + "properties": { + "duration": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "type": { + "type": "string" + }, + "source": { + "type": "string" + }, + "callerNumber": { + "type": "string" + }, + "trackingNumber": { + "type": "string" + }, + "excusedReason": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.AttributedLeads.LeadForm": { + "required": [ + "leadStatus", + "notes" + ], + "type": "object", + "properties": { + "leadNumber": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "leadStatus": { + "type": "string" + }, + "notes": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.AttributedLeads.Booking": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "Marketing.Ads.Contracts.CapacityAwarenessWarningQueryResult": { + "required": [ + "tenantId", + "tenantName", + "totalCount", + "data" + ], + "type": "object", + "properties": { + "tenantId": { + "type": "integer", + "format": "int64" + }, + "tenantName": { + "type": "string" + }, + "totalCount": { + "type": "integer", + "format": "int32" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.Ads.Client.CapacityAwarenessWarning" + } + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Client.CapacityAwarenessWarning": { + "required": [ + "campaignName", + "warningType", + "businessUnits", + "lookaheadWindow", + "thresholdValue" + ], + "type": "object", + "properties": { + "campaignName": { + "type": "string" + }, + "warningType": { + "type": "string" + }, + "businessUnits": { + "type": "array", + "items": { + "type": "string" + } + }, + "lookaheadWindow": { + "type": "integer", + "format": "int32" + }, + "thresholdValue": { + "type": "integer", + "format": "int32" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.V2.CreateExternalCallAttributionRequest": { + "required": [ + "webSessionData", + "externalCallData" + ], + "type": "object", + "properties": { + "webSessionData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.V2.WebSessionData" + } + ], + "description": "The web session that the entity should be attributed to" + }, + "externalCallData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.V2.ExternalCallData" + } + ], + "description": "The external call." + } + }, + "additionalProperties": false + }, + "Marketing.Ads.V2.WebSessionData": { + "required": [ + "landingPageUrl", + "referrerUrl" + ], + "type": "object", + "properties": { + "landingPageUrl": { + "type": "string", + "description": "The url of the web page that the user first landed on" + }, + "referrerUrl": { + "type": "string", + "description": "The url of the web page that referred to the website" + }, + "gclid": { + "type": "string", + "description": "Google Click Identifier", + "nullable": true + }, + "fbclid": { + "type": "string", + "description": "Facebook Click Identifier", + "nullable": true + }, + "msclkid": { + "type": "string", + "description": "Microsoft Click ID", + "nullable": true + }, + "utmSource": { + "type": "string", + "description": "UTM source", + "nullable": true + }, + "utmMedium": { + "type": "string", + "description": "UTM medium", + "nullable": true + }, + "utmCampaign": { + "type": "string", + "description": "UTM campaign", + "nullable": true + }, + "utmAdgroup": { + "type": "string", + "description": "UTM ad group", + "nullable": true + }, + "utmTerm": { + "type": "string", + "description": "UTM term", + "nullable": true + }, + "utmContent": { + "type": "string", + "description": "UTM content", + "nullable": true + }, + "googleAnalyticsClientId": { + "type": "string", + "description": "An id used by Google Analytics to track unique visitors", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Data from the web session used by the attribution system to determine the marketing campaign that\nled the user to this particular web session." + }, + "Marketing.Ads.V2.ExternalCallData": { + "required": [ + "customerPhoneNumber", + "forwardingPhoneNumber", + "trackingPhoneNumber", + "callStartedOnUtc" + ], + "type": "object", + "properties": { + "customerPhoneNumber": { + "type": "string", + "description": "The phone number of the customer" + }, + "forwardingPhoneNumber": { + "type": "string", + "description": "The ServiceTitan phone number that the external call tracking service will forward to" + }, + "trackingPhoneNumber": { + "type": "string", + "description": "The tracking phone number that the external call tracking service will display to the customer" + }, + "callStartedOnUtc": { + "type": "string", + "description": "Call start time in Utc", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Marketing.Ads.Contracts.Performance.GetPerformanceResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.GetPerformanceResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Marketing.Ads.Contracts.Performance.GetPerformanceResponse": { + "required": [ + "campaign", + "adGroup", + "keyword", + "digitalStats", + "leadStats" + ], + "type": "object", + "properties": { + "campaign": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.Campaign" + }, + "adGroup": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.AdGroup" + }, + "keyword": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.Keyword" + }, + "digitalStats": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.DigitalStats" + }, + "leadStats": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.LeadStats" + }, + "returnOnInvestment": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.Performance.Campaign": { + "required": [ + "name", + "category", + "launchDate", + "status" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string" + }, + "category": { + "type": "string" + }, + "launchDate": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.Status" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.Performance.Status": { + "enum": [ + "None", + "Live", + "Stopped" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "None", + "Live", + "Stopped" + ] + }, + "Marketing.Ads.Contracts.Performance.AdGroup": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.Status" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.Performance.Keyword": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.Contracts.Performance.Status" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.Performance.DigitalStats": { + "required": [ + "impressions", + "clicks", + "averageCPC", + "conversions", + "cost" + ], + "type": "object", + "properties": { + "impressionShare": { + "type": "number", + "format": "double", + "nullable": true + }, + "impressions": { + "type": "integer", + "format": "int64" + }, + "clicks": { + "type": "integer", + "format": "int64" + }, + "averageCPC": { + "type": "number", + "format": "double" + }, + "conversions": { + "type": "integer", + "format": "int64" + }, + "allConversions": { + "type": "number", + "format": "double", + "nullable": true + }, + "cost": { + "type": "number", + "format": "decimal" + }, + "clickRate": { + "type": "number", + "format": "double", + "nullable": true + }, + "costPerConversion": { + "type": "number", + "format": "double", + "nullable": true + }, + "conversionRate": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.Performance.LeadStats": { + "required": [ + "leads", + "leadCalls", + "onlineBooking", + "manualBooking", + "bookedJobs", + "ranJobs", + "soldJobs", + "revenue" + ], + "type": "object", + "properties": { + "leads": { + "type": "integer", + "format": "int32" + }, + "leadCalls": { + "type": "integer", + "format": "int32" + }, + "onlineBooking": { + "type": "integer", + "format": "int32" + }, + "manualBooking": { + "type": "integer", + "format": "int32" + }, + "bookedJobs": { + "type": "integer", + "format": "int32" + }, + "ranJobs": { + "type": "integer", + "format": "int32" + }, + "soldJobs": { + "type": "integer", + "format": "int32" + }, + "revenue": { + "type": "number", + "format": "decimal" + }, + "bookingRate": { + "type": "number", + "format": "double", + "nullable": true + }, + "avgTicket": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.Ads.Contracts.Performance.PerformanceSegmentationType": { + "enum": [ + "Campaign", + "AdGroup", + "Keyword" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Campaign", + "AdGroup", + "Keyword" + ] + }, + "Marketing.Ads.V2.CreateScheduledJobAttributionRequest": { + "required": [ + "webSessionData", + "jobId" + ], + "type": "object", + "properties": { + "webSessionData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.V2.WebSessionData" + } + ], + "description": "The web session that the entity should be attributed to" + }, + "jobId": { + "type": "integer", + "description": "The id of the booking entity in ServiceTitan.", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.V2.CreateWebBookingAttributionRequest": { + "required": [ + "webSessionData", + "bookingId" + ], + "type": "object", + "properties": { + "webSessionData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.V2.WebSessionData" + } + ], + "description": "The web session that the entity should be attributed to" + }, + "bookingId": { + "type": "integer", + "description": "The id of the booking entity in ServiceTitan.", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Marketing.Ads.V2.CreateWebLeadFormAttributionRequest": { + "required": [ + "webSessionData", + "leadId" + ], + "type": "object", + "properties": { + "webSessionData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Ads.V2.WebSessionData" + } + ], + "description": "The web session that the entity should be attributed to" + }, + "leadId": { + "type": "integer", + "description": "The id of the lead entity (captured from a web form) in ServiceTitan.", + "format": "int64" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/marketing-reputation-v2.json b/openapi_specs/marketing-reputation-v2.json new file mode 100644 index 0000000..88823e7 --- /dev/null +++ b/openapi_specs/marketing-reputation-v2.json @@ -0,0 +1,536 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Marketing Reputation", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/marketingreputation/v2" + } + ], + "paths": { + "/tenant/{tenant}/reviews": { + "get": { + "tags": [ + "Reviews" + ], + "summary": "reviews", + "operationId": "reviews", + "parameters": [ + { + "name": "tenant", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32" + } + }, + { + "name": "includeTotal", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "search", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "reportType", + "in": "query", + "description": "Format - int32.", + "schema": { + "$ref": "#/components/schemas/ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewsReportType" + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "fromDate", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "toDate", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time" + } + }, + { + "name": "responseTypes", + "in": "query", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ResponseType" + } + } + }, + { + "name": "locationIds", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "sources", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "reviewStatuses", + "in": "query", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewMatchConfidenceLevel" + } + } + }, + { + "name": "technicianIds", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "campaignIds", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "fromRating", + "in": "query", + "description": "Format - float.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "toRating", + "in": "query", + "description": "Format - float.", + "schema": { + "type": "number", + "format": "float" + } + }, + { + "name": "includeReviewsWithoutLocation", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeReviewsWithoutCampaign", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "includeReviewsWithoutTechnician", + "in": "query", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewReport" + }, + "examples": { + "default": { + "value": null + } + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewReport" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "address": "string", + "platform": "string", + "authorEmail": "string", + "authorName": "string", + "review": "string", + "reviewResponse": "string", + "publishDate": "string", + "rating": 0, + "recommendationStatus": 0, + "verificationStatus": true, + "jobId": 0, + "verifiedByUserId": 0, + "verifiedOn": "string", + "isAutoVerified": true, + "businessUnitId": 0, + "completedDate": "string", + "customerName": "string", + "customerId": 0, + "dispatchedDate": "string", + "jobStatus": 0, + "jobTypeName": "string", + "technicianFullName": "string", + "technicianId": 0 + } + ] + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewReport" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "address": "string", + "platform": "string", + "authorEmail": "string", + "authorName": "string", + "review": "string", + "reviewResponse": "string", + "publishDate": "string", + "rating": 0, + "recommendationStatus": 0, + "verificationStatus": true, + "jobId": 0, + "verifiedByUserId": 0, + "verifiedOn": "string", + "isAutoVerified": true, + "businessUnitId": 0, + "completedDate": "string", + "customerName": "string", + "customerId": 0, + "dispatchedDate": "string", + "jobStatus": 0, + "jobTypeName": "string", + "technicianFullName": "string", + "technicianId": 0 + } + ] + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewReport": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "hasMore": { + "type": "boolean" + }, + "totalCount": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewReport" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.JobStatus": { + "enum": [ + 0, + 2, + 3, + 4, + 5 + ], + "type": "integer", + "format": "int32" + }, + "ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.PulledReviewRecommendationStatus": { + "enum": [ + 0, + 1 + ], + "type": "integer", + "format": "int32" + }, + "ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ResponseType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + }, + "ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewMatchConfidenceLevel": { + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "integer", + "format": "int32" + }, + "ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewReport": { + "type": "object", + "properties": { + "address": { + "type": "string", + "nullable": true + }, + "platform": { + "type": "string", + "nullable": true + }, + "authorEmail": { + "type": "string", + "nullable": true + }, + "authorName": { + "type": "string", + "nullable": true + }, + "review": { + "type": "string", + "nullable": true + }, + "reviewResponse": { + "type": "string", + "nullable": true + }, + "publishDate": { + "type": "string", + "format": "date-time" + }, + "rating": { + "type": "number", + "format": "double", + "nullable": true + }, + "recommendationStatus": { + "$ref": "#/components/schemas/ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.PulledReviewRecommendationStatus" + }, + "verificationStatus": { + "type": "boolean" + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "verifiedByUserId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "verifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "isAutoVerified": { + "type": "boolean", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "completedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "customerName": { + "type": "string", + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "dispatchedDate": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "jobStatus": { + "$ref": "#/components/schemas/ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.JobStatus" + }, + "jobTypeName": { + "type": "string", + "nullable": true + }, + "technicianFullName": { + "type": "string", + "nullable": true + }, + "technicianId": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "ServiceTitan.Marketing.ReviewEngine.Services.Models.Reviews.ReviewsReportType": { + "enum": [ + 0, + 1, + 2 + ], + "type": "integer", + "format": "int32" + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/marketing-v2.json b/openapi_specs/marketing-v2.json new file mode 100644 index 0000000..26690cc --- /dev/null +++ b/openapi_specs/marketing-v2.json @@ -0,0 +1,2195 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Marketing", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/marketing/v2" + } + ], + "paths": { + "/tenant/{tenant}/categories": { + "get": { + "tags": [ + "CampaignCategories" + ], + "summary": "Gets a paginated list of campaign categories", + "description": "Gets a paginated list of campaign categories", + "operationId": "CampaignCategories_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, CreatedOn, Name", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.V2.CampaignCategoryResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "type": "Regular", + "createdOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "CampaignCategories" + ], + "summary": "Creates new campaign category", + "description": "Creates new campaign category", + "operationId": "CampaignCategories_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCategoryCreateRequest" + }, + "example": { + "name": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/categories/{id}": { + "get": { + "tags": [ + "CampaignCategories" + ], + "summary": "Gets campaign category specified by ID", + "description": "Gets campaign category specified by ID", + "operationId": "CampaignCategories_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCategoryResponse" + }, + "example": { + "id": 0, + "name": "string", + "active": true, + "type": "Regular", + "createdOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "CampaignCategories" + ], + "summary": "Updates specified campaign category in \"patch\" mode", + "description": "Updates specified campaign category in \"patch\" mode", + "operationId": "CampaignCategories_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCategoryUpdateRequest" + }, + "example": { + "name": "string", + "active": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/costs": { + "get": { + "tags": [ + "CampaignCosts" + ], + "summary": "Gets a paginated list of campaign costs", + "description": "Gets a paginated list of campaign costs", + "operationId": "CampaignCosts_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "year", + "in": "query", + "description": "Format - int32. Year", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "month", + "in": "query", + "description": "Format - int32. Month", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "campaignId", + "in": "query", + "description": "Format - int64. Campaign ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Date (Year + Month)", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.V2.CampaignCostResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "year": 0, + "month": 0, + "dailyCost": 0, + "campaignId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "CampaignCosts" + ], + "summary": "Creates new campaign cost", + "description": "Creates new campaign cost", + "operationId": "CampaignCosts_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CreateCampaignCostRequest" + }, + "example": { + "campaignId": 0, + "year": 0, + "month": 0, + "dailyCost": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCostResponse" + }, + "example": { + "id": 0, + "year": 0, + "month": 0, + "dailyCost": 0, + "campaignId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/costs/{id}": { + "get": { + "tags": [ + "CampaignCosts" + ], + "summary": "Gets campaign cost specified by ID", + "description": "Gets campaign cost specified by ID", + "operationId": "CampaignCosts_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCostResponse" + }, + "example": { + "id": 0, + "year": 0, + "month": 0, + "dailyCost": 0, + "campaignId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "CampaignCosts" + ], + "summary": "Updates specified campaign cost in \"patch\" mode", + "description": "Updates specified campaign cost in \"patch\" mode", + "operationId": "CampaignCosts_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.UpdateCampaignCostRequest" + }, + "example": { + "dailyCost": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/campaigns": { + "get": { + "tags": [ + "Campaigns" + ], + "summary": "Gets a paginated list of campaigns", + "description": "Gets a paginated list of campaigns", + "operationId": "Campaigns_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Filters records by name (case-insensitive \"contains\" operation)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "campaignPhoneNumber", + "in": "query", + "description": "Filters campaigns by phone number (as string).", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, CreatedOn, ModifiedOn", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.V2.CampaignResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "campaignPhoneNumbers": [ + "string" + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Campaigns" + ], + "summary": "Creates new campaign", + "description": "Creates new campaign", + "operationId": "Campaigns_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignUpsertRequest" + }, + "example": { + "name": "string", + "businessUnitId": 0, + "dnis": "string", + "categoryId": 0, + "active": true, + "source": "string", + "medium": "string", + "otherSource": "string", + "otherMedium": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignResponse" + }, + "example": { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "campaignPhoneNumbers": [ + "string" + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/campaigns/{id}": { + "get": { + "tags": [ + "Campaigns" + ], + "summary": "Gets campaign specified by ID", + "description": "Gets campaign specified by ID", + "operationId": "Campaigns_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignResponse" + }, + "example": { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "campaignPhoneNumbers": [ + "string" + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Campaigns" + ], + "summary": "Updates specified campaign in \"patch\" mode", + "description": "Updates specified campaign in \"patch\" mode", + "operationId": "Campaigns_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignUpsertRequest" + }, + "example": { + "name": "string", + "businessUnitId": 0, + "dnis": "string", + "categoryId": 0, + "active": true, + "source": "string", + "medium": "string", + "otherSource": "string", + "otherMedium": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.CampaignResponse" + }, + "example": { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "campaignPhoneNumbers": [ + "string" + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/campaigns/{id}/costs": { + "get": { + "tags": [ + "Campaigns" + ], + "summary": "Gets a paginated list of campaign costs", + "description": "Gets a paginated list of campaign costs", + "operationId": "Campaigns_GetCosts", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "year", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "month", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Date (Year + Month)", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.V2.CampaignCostResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "year": 0, + "month": 0, + "dailyCost": 0, + "campaignId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/suppressions": { + "get": { + "tags": [ + "Suppressions" + ], + "summary": "Gets a paginated list of suppression", + "description": "Gets a paginated list of suppression", + "operationId": "Suppressions_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Marketing.V2.SuppressionResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "email": "string", + "reason": {} + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/suppressions/{email}": { + "get": { + "tags": [ + "Suppressions" + ], + "summary": "Gets suppression specified by an email", + "description": "Gets suppression specified by an email", + "operationId": "Suppressions_Get", + "parameters": [ + { + "name": "email", + "in": "path", + "description": "Format - email.", + "required": true, + "schema": { + "type": "string", + "format": "email" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.SuppressionResponse" + }, + "example": { + "email": "string", + "reason": {} + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/suppressions/unsuppress": { + "post": { + "tags": [ + "Suppressions" + ], + "summary": "Remove emails from a suppression list", + "description": "Remove emails from a suppression list", + "operationId": "Suppressions_Remove", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.RemoveSuppressionsRequest" + }, + "example": { + "emails": [ + "string" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/suppressions/suppress": { + "post": { + "tags": [ + "Suppressions" + ], + "summary": "Add emails to a suppression list", + "description": "Add emails to a suppression list", + "operationId": "Suppressions_Add", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Marketing.V2.AddSuppressionsRequest" + }, + "example": { + "emails": [ + "string" + ], + "reason": "Unsubscribe" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Marketing.V2.CampaignCategoryResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCategoryResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Marketing.V2.CampaignCategoryResponse": { + "required": [ + "id", + "name", + "active", + "type", + "createdOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCategoryType" + }, + "createdOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Marketing.V2.CampaignCategoryType": { + "enum": [ + "Regular", + "GoogleHomeServices" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Regular", + "GoogleHomeServices" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ModificationResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of created/updated object", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Default response when creating object with a new ID, or updating object by specified ID." + }, + "Marketing.V2.CampaignCategoryUpdateRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "active": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.V2.CampaignCategoryCreateRequest": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Marketing.V2.CampaignCostResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.V2.CampaignCostResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Marketing.V2.CampaignCostResponse": { + "required": [ + "id", + "year", + "month", + "dailyCost", + "campaignId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "year": { + "type": "integer", + "format": "int32" + }, + "month": { + "type": "integer", + "format": "int32" + }, + "dailyCost": { + "type": "number", + "format": "decimal" + }, + "campaignId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Marketing.V2.CreateCampaignCostRequest": { + "required": [ + "campaignId", + "year", + "month", + "dailyCost" + ], + "type": "object", + "properties": { + "campaignId": { + "type": "integer", + "format": "int64" + }, + "year": { + "type": "integer", + "format": "int32" + }, + "month": { + "type": "integer", + "format": "int32" + }, + "dailyCost": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Marketing.V2.UpdateCampaignCostRequest": { + "required": [ + "dailyCost" + ], + "type": "object", + "properties": { + "dailyCost": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Marketing.V2.CampaignResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.V2.CampaignResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Marketing.V2.CampaignResponse": { + "required": [ + "id", + "name", + "modifiedOn", + "createdOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + }, + "category": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.V2.CampaignResponseCategory" + } + ], + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "otherSource": { + "type": "string", + "nullable": true + }, + "businessUnit": { + "type": "string", + "nullable": true + }, + "medium": { + "type": "string", + "nullable": true + }, + "otherMedium": { + "type": "string", + "nullable": true + }, + "campaignPhoneNumbers": { + "type": "array", + "items": { + "type": "string" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.V2.CampaignResponseCategory": { + "required": [ + "id", + "name", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Marketing.V2.CampaignUpsertRequest": { + "required": [ + "name", + "businessUnitId", + "categoryId", + "active" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "businessUnitId": { + "type": "integer", + "format": "int64" + }, + "dnis": { + "type": "string", + "nullable": true + }, + "categoryId": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "source": { + "type": "string", + "nullable": true + }, + "medium": { + "type": "string", + "nullable": true + }, + "otherSource": { + "type": "string", + "nullable": true + }, + "otherMedium": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Marketing.V2.SuppressionResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Marketing.V2.SuppressionResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Marketing.V2.SuppressionResponse": { + "required": [ + "email" + ], + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "reason": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.V2.SuppressionType" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.V2.SuppressionType": { + "enum": [ + "Unsubscribe", + "Bounce", + "SpamReport", + "ManualUnsubscribe", + "NeverEmail" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Unsubscribe", + "Bounce", + "SpamReport", + "ManualUnsubscribe", + "NeverEmail" + ] + }, + "Marketing.V2.RemoveSuppressionsRequest": { + "required": [ + "emails" + ], + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Email addresses to remove from the suppression list, max items: 1000 " + } + }, + "additionalProperties": false + }, + "Marketing.V2.AddSuppressionsRequest": { + "required": [ + "emails", + "reason" + ], + "type": "object", + "properties": { + "emails": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Email addresses to add to the suppression list, max items: 1000 " + }, + "reason": { + "$ref": "#/components/schemas/Marketing.V2.SuppressionType" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/memberships-v2.json b/openapi_specs/memberships-v2.json new file mode 100644 index 0000000..4b22acf --- /dev/null +++ b/openapi_specs/memberships-v2.json @@ -0,0 +1,6553 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Memberships", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/memberships/v2" + } + ], + "paths": { + "/tenant/{tenant}/memberships": { + "get": { + "tags": [ + "CustomerMemberships" + ], + "summary": "Gets a list of customer memberships", + "description": "Gets a list of customer memberships", + "operationId": "CustomerMemberships_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerIds", + "in": "query", + "description": "Filters by customer IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filters by membership status\\\nValues: [Active, Suspended, Expired, Canceled, Deleted]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipStatus" + } + ], + "nullable": true + } + }, + { + "name": "duration", + "in": "query", + "description": "Format - int32. Filters by membership duration (in months); use null for ongoing memberships", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "billingFrequency", + "in": "query", + "description": "Filters by membership billing frequency\\\nValues: [OneTime, Monthly, EveryOtherMonth, Quarterly, BiAnnual, Annual]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Memberships.V2.CustomerMembershipResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "followUpOn": "string", + "cancellationDate": "string", + "from": "string", + "nextScheduledBillDate": "string", + "to": "string", + "billingFrequency": {}, + "renewalBillingFrequency": {}, + "status": {}, + "followUpStatus": {}, + "active": true, + "initialDeferredRevenue": 0, + "duration": 0, + "renewalDuration": 0, + "businessUnitId": 0, + "customerId": 0, + "membershipTypeId": 0, + "activatedById": 0, + "activatedFromId": 0, + "billingTemplateId": 0, + "cancellationBalanceInvoiceId": 0, + "cancellationInvoiceId": 0, + "followUpCustomStatusId": 0, + "locationId": 0, + "paymentMethodId": 0, + "paymentTypeId": 0, + "recurringLocationId": 0, + "renewalMembershipTaskId": 0, + "renewedById": 0, + "soldById": 0, + "customerPo": "string", + "importId": "string", + "memo": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/memberships/{id}": { + "get": { + "tags": [ + "CustomerMemberships" + ], + "summary": "Gets customer membership specified by ID", + "description": "Gets customer membership specified by ID", + "operationId": "CustomerMemberships_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Customer membership ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.CustomerMembershipResponse" + }, + "example": { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "followUpOn": "string", + "cancellationDate": "string", + "from": "string", + "nextScheduledBillDate": "string", + "to": "string", + "billingFrequency": {}, + "renewalBillingFrequency": {}, + "status": {}, + "followUpStatus": {}, + "active": true, + "initialDeferredRevenue": 0, + "duration": 0, + "renewalDuration": 0, + "businessUnitId": 0, + "customerId": 0, + "membershipTypeId": 0, + "activatedById": 0, + "activatedFromId": 0, + "billingTemplateId": 0, + "cancellationBalanceInvoiceId": 0, + "cancellationInvoiceId": 0, + "followUpCustomStatusId": 0, + "locationId": 0, + "paymentMethodId": 0, + "paymentTypeId": 0, + "recurringLocationId": 0, + "renewalMembershipTaskId": 0, + "renewedById": 0, + "soldById": 0, + "customerPo": "string", + "importId": "string", + "memo": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer membership not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "CustomerMemberships" + ], + "summary": "Updates specified customer membership in \"patch\" mode", + "description": "Updates specified customer membership in \"patch\" mode", + "operationId": "CustomerMemberships_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Customer membership ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Customer membership update request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.CustomerMembershipUpdateRequest" + }, + "example": { + "businessUnitId": 0, + "nextScheduledBillDate": "string", + "status": {}, + "memo": "string", + "from": "string", + "to": "string", + "soldById": 0, + "billingTemplateId": 0, + "locationId": 0, + "recurringServiceAction": {}, + "recurringLocationId": 0, + "paymentMethodId": 0, + "paymentTypeId": 0, + "renewalMembershipTaskId": 0, + "initialDeferredRevenue": 0, + "cancellationBalanceInvoiceId": 0, + "cancellationInvoiceId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer membership not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/memberships/{id}/status-changes": { + "get": { + "tags": [ + "CustomerMemberships" + ], + "summary": "Gets status changes for the given customer membership", + "description": "Gets status changes for the given customer membership", + "operationId": "CustomerMemberships_GetStatusChanges", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Customer membership ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.CustomerMembershipStatusChangeItemResponse" + } + }, + "example": [ + { + "id": 0, + "oldStatus": {}, + "newStatus": {}, + "note": "string", + "createdOn": "string", + "createdById": 0 + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Customer membership not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/memberships/sale": { + "post": { + "tags": [ + "CustomerMemberships" + ], + "summary": "Creates membership sale invoice", + "description": "Creates membership sale invoice", + "operationId": "CustomerMemberships_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.MembershipSaleInvoiceCreateRequest" + }, + "example": { + "customerId": 0, + "businessUnitId": 0, + "saleTaskId": 0, + "durationBillingId": 0, + "locationId": 0, + "recurringServiceAction": {}, + "recurringLocationId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.MembershipSaleInvoiceCreateResponse" + }, + "example": { + "invoiceId": 0, + "customerMembershipId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/membership-types": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for membership types", + "description": "Provides export feed for membership types", + "operationId": "Export_MembershipTypes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Memberships.V2.ExportMembershipTypeResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "importId": "string", + "billingTemplateId": 0, + "name": "string", + "active": true, + "discountMode": {}, + "locationTarget": {}, + "revenueRecognitionMode": {}, + "autoCalculateInvoiceTemplates": true, + "useMembershipPricingTable": true, + "showMembershipSavings": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/recurring-service-types": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for recurring service types", + "description": "Provides export feed for recurring service types", + "operationId": "Export_RecurringServiceTypes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Memberships.V2.ExportRecurringServiceTypeResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "active": true, + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "durationType": {}, + "durationLength": 0, + "invoiceTemplateId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "jobSummary": "string", + "name": "string", + "importId": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/memberships": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for customer memberships", + "description": "Provides export feed for customer memberships", + "operationId": "Export_Memberships", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Memberships.V2.ExportCustomerMembershipResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "followUpOn": "string", + "cancellationDate": "string", + "from": "string", + "nextScheduledBillDate": "string", + "to": "string", + "billingFrequency": {}, + "renewalBillingFrequency": {}, + "status": {}, + "followUpStatus": {}, + "active": true, + "initialDeferredRevenue": 0, + "duration": 0, + "renewalDuration": 0, + "businessUnitId": 0, + "customerId": 0, + "membershipTypeId": 0, + "activatedById": 0, + "activatedFromId": 0, + "billingTemplateId": 0, + "cancellationBalanceInvoiceId": 0, + "cancellationInvoiceId": 0, + "followUpCustomStatusId": 0, + "locationId": 0, + "paymentMethodId": 0, + "paymentTypeId": 0, + "recurringLocationId": 0, + "renewalMembershipTaskId": 0, + "renewedById": 0, + "soldById": 0, + "customerPo": "string", + "importId": "string", + "memo": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/invoice-templates": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for invoice templates", + "description": "Provides export feed for invoice templates", + "operationId": "Export_InvoiceTemplates", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Memberships.V2.ExportInvoiceTemplateResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "name": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "active": true, + "total": 0, + "isSettingsTemplate": true, + "importId": "string", + "items": [ + { + "id": 0, + "skuId": 0, + "skuType": {}, + "quantity": 0, + "unitPrice": 0, + "isAddOn": true, + "importId": "string", + "workflowActionItemId": 0, + "description": "string", + "cost": 0, + "hours": 0 + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/recurring-services": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for recurring services", + "description": "Provides export feed for recurring services", + "operationId": "Export_LocationRecurringServices", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Memberships.V2.ExportLocationRecurringServiceResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "importId": "string", + "membershipId": 0, + "locationId": 0, + "recurringServiceTypeId": 0, + "durationType": {}, + "durationLength": 0, + "from": "string", + "to": "string", + "memo": "string", + "invoiceTemplateId": 0, + "invoiceTemplateForFollowingYearsId": 0, + "firstVisitComplete": true, + "activatedFromId": 0, + "allocation": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "campaignId": 0, + "priority": {}, + "jobSummary": "string", + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "recurrenceDaysOfWeek": [ + "Sunday" + ], + "recurrenceWeek": {}, + "recurrenceDayOfNthWeek": {}, + "recurrenceDaysOfMonth": [ + 0 + ], + "jobStartTime": "string", + "estimatedPayrollCost": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/recurring-service-events": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for recurring service events", + "description": "Provides export feed for recurring service events", + "operationId": "Export_LocationRecurringServiceEvents", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Memberships.V2.ExportLocationRecurringServiceEventResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "locationRecurringServiceId": 0, + "locationRecurringServiceName": "string", + "membershipId": 0, + "membershipName": "string", + "status": {}, + "date": "string", + "createdOn": "string", + "jobId": 0, + "createdById": 0, + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoice-templates": { + "get": { + "tags": [ + "InvoiceTemplates" + ], + "summary": "Gets a list of invoice templates by given IDs", + "description": "Please note this endpoint does not allow to enumerate all invoice templates.\nUse the Customer Membership endpoint (for billing template) or\nRecurring Service endpoint (for invoice template) to get invoice template IDs.", + "operationId": "InvoiceTemplates_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "required": true, + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Memberships.V2.InvoiceTemplateResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "active": true, + "total": 0, + "isSettingsTemplate": true, + "importId": "string", + "items": [ + { + "id": 0, + "skuId": 0, + "skuType": {}, + "quantity": 0, + "unitPrice": 0, + "isAddOn": true, + "importId": "string", + "workflowActionItemId": 0, + "description": "string", + "cost": 0, + "hours": 0 + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "InvoiceTemplates" + ], + "summary": "Creates new invoice template", + "description": "Creates new invoice template", + "operationId": "InvoiceTemplates_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateCreateRequest" + }, + "example": { + "items": [ + { + "skuId": 0, + "quantity": 0, + "unitPrice": 0, + "isAddOn": true, + "workflowActionItemId": 0, + "description": "string", + "cost": 0, + "hours": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/invoice-templates/{id}": { + "get": { + "tags": [ + "InvoiceTemplates" + ], + "summary": "Gets invoice template specified by ID", + "description": "Gets invoice template specified by ID", + "operationId": "InvoiceTemplates_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Invoice template ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateResponse" + }, + "example": { + "id": 0, + "name": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "active": true, + "total": 0, + "isSettingsTemplate": true, + "importId": "string", + "items": [ + { + "id": 0, + "skuId": 0, + "skuType": {}, + "quantity": 0, + "unitPrice": 0, + "isAddOn": true, + "importId": "string", + "workflowActionItemId": 0, + "description": "string", + "cost": 0, + "hours": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Invoice template not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "InvoiceTemplates" + ], + "summary": "Updates specified invoice template in \"patch\" mode", + "description": "Updates specified invoice template in \"patch\" mode", + "operationId": "InvoiceTemplates_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Invoice template ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Invoice template update request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateUpdateRequest" + }, + "example": { + "name": "string", + "createdOn": "string", + "createdById": 0, + "active": true, + "items": [ + { + "id": 0, + "skuId": 0, + "quantity": 0, + "unitPrice": 0, + "isAddOn": true, + "description": "string", + "cost": 0, + "hours": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Invoice template not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-service-events": { + "get": { + "tags": [ + "LocationRecurringServiceEvents" + ], + "summary": "Gets a list of recurring service events", + "description": "Gets a list of recurring service events", + "operationId": "LocationRecurringServiceEvents_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "locationId", + "in": "query", + "description": "Format - int64. Location ID ", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Job ID ", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Follow up status \\\nValues: [NotAttempted, Unreachable, Contacted, Won, Dismissed]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.OpportunityStatus" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Memberships.V2.LocationRecurringServiceEventResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "locationRecurringServiceId": 0, + "locationRecurringServiceName": "string", + "membershipId": 0, + "membershipName": "string", + "status": {}, + "date": "string", + "createdOn": "string", + "jobId": 0, + "createdById": 0, + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-service-events/{id}/mark-complete": { + "post": { + "tags": [ + "LocationRecurringServiceEvents" + ], + "summary": "Marks the specified recurring service event as complete", + "description": "Marking an event as complete links the job with provided JobID to the given Location Recurring Service Event.\nIt will also copy over invoice items to the Job Invoice corresponding to the Invoice Template of the\nLocation Recurring Service the Event was generated from.", + "operationId": "LocationRecurringServiceEvents_MarkComplete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Recurring service event ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Recurring service event status update request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.MarkEventCompletedStatusUpdateRequest" + }, + "example": { + "jobId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Recurring service event not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-service-events/{id}/mark-incomplete": { + "post": { + "tags": [ + "LocationRecurringServiceEvents" + ], + "summary": "Marks the specified recurring service event as incomplete", + "description": "Marking an event as incomplete unlinks the job with provided JobID to the given Location Recurring Service\nEvent. It will also delete the invoice items that were copied over when the Location Recurring Service Event\nwas marked as completed on the Job.", + "operationId": "LocationRecurringServiceEvents_MarkIncomplete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Recurring service event ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Recurring service event status update request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.MarkEventCompletedStatusUpdateRequest" + }, + "example": { + "jobId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Recurring service event not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-services": { + "get": { + "tags": [ + "LocationRecurringServices" + ], + "summary": "Gets a list of recurring services", + "description": "Gets a list of recurring services", + "operationId": "LocationRecurringServices_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "membershipIds", + "in": "query", + "description": "Filters by customer membership IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "locationIds", + "in": "query", + "description": "Filters by location IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Memberships.V2.LocationRecurringServiceResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "active": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "importId": "string", + "membershipId": 0, + "locationId": 0, + "recurringServiceTypeId": 0, + "durationType": {}, + "durationLength": 0, + "from": "string", + "to": "string", + "memo": "string", + "invoiceTemplateId": 0, + "invoiceTemplateForFollowingYearsId": 0, + "firstVisitComplete": true, + "activatedFromId": 0, + "allocation": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "campaignId": 0, + "priority": {}, + "jobSummary": "string", + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "recurrenceDaysOfWeek": [ + "Sunday" + ], + "recurrenceWeek": {}, + "recurrenceDayOfNthWeek": {}, + "recurrenceDaysOfMonth": [ + 0 + ], + "jobStartTime": "string", + "estimatedPayrollCost": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-services/{id}": { + "get": { + "tags": [ + "LocationRecurringServices" + ], + "summary": "Gets recurring service specified by ID", + "description": "Gets recurring service specified by ID", + "operationId": "LocationRecurringServices_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Recurring service ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.LocationRecurringServiceResponse" + }, + "example": { + "id": 0, + "name": "string", + "active": true, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "importId": "string", + "membershipId": 0, + "locationId": 0, + "recurringServiceTypeId": 0, + "durationType": {}, + "durationLength": 0, + "from": "string", + "to": "string", + "memo": "string", + "invoiceTemplateId": 0, + "invoiceTemplateForFollowingYearsId": 0, + "firstVisitComplete": true, + "activatedFromId": 0, + "allocation": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "campaignId": 0, + "priority": {}, + "jobSummary": "string", + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "recurrenceDaysOfWeek": [ + "Sunday" + ], + "recurrenceWeek": {}, + "recurrenceDayOfNthWeek": {}, + "recurrenceDaysOfMonth": [ + 0 + ], + "jobStartTime": "string", + "estimatedPayrollCost": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Recurring service not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "LocationRecurringServices" + ], + "summary": "Updates specified recurring service in \"patch\" mode", + "description": "Updates specified recurring service in \"patch\" mode", + "operationId": "LocationRecurringServices_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Recurring service ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Recurring service update request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.LocationRecurringServiceUpdateRequest" + }, + "example": { + "name": "string", + "active": true, + "recurringServiceTypeId": 0, + "durationType": {}, + "durationLength": 0, + "from": "string", + "memo": "string", + "invoiceTemplateId": 0, + "invoiceTemplateForFollowingYearsId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "campaignId": 0, + "priority": {}, + "jobSummary": "string", + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "recurrenceDaysOfWeek": [ + "Sunday" + ], + "recurrenceWeek": {}, + "recurrenceDayOfNthWeek": {}, + "jobStartTime": "string", + "estimatedPayrollCost": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Recurring service not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/membership-types": { + "get": { + "tags": [ + "MembershipTypes" + ], + "summary": "Gets a list of membership types", + "description": "Gets a list of membership types", + "operationId": "MembershipTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "duration", + "in": "query", + "description": "Format - int32. Filters by membership duration (in months); use null for ongoing memberships", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "billingFrequency", + "in": "query", + "description": "Filters by membership billing frequency\\\nValues: [OneTime, Monthly, EveryOtherMonth, Quarterly, BiAnnual, Annual]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Memberships.V2.MembershipTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "name": "string", + "active": true, + "discountMode": {}, + "locationTarget": {}, + "revenueRecognitionMode": {}, + "autoCalculateInvoiceTemplates": true, + "useMembershipPricingTable": true, + "showMembershipSavings": true, + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "importId": "string", + "billingTemplateId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/membership-types/{id}": { + "get": { + "tags": [ + "MembershipTypes" + ], + "summary": "Gets membership type specified by ID", + "description": "Gets membership type specified by ID", + "operationId": "MembershipTypes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Membership type ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.MembershipTypeResponse" + }, + "example": { + "name": "string", + "active": true, + "discountMode": {}, + "locationTarget": {}, + "revenueRecognitionMode": {}, + "autoCalculateInvoiceTemplates": true, + "useMembershipPricingTable": true, + "showMembershipSavings": true, + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "importId": "string", + "billingTemplateId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Membership type not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/membership-types/{id}/recurring-service-items": { + "get": { + "tags": [ + "MembershipTypes" + ], + "summary": "Gets recurring services for the given membership type", + "description": "Gets recurring services for the given membership type", + "operationId": "MembershipTypes_GetRecurringServiceItems", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Membership type ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.MembershipTypeRecurringServiceItemResponse" + } + }, + "example": [ + { + "id": 0, + "membershipTypeId": 0, + "recurringServiceTypeId": 0, + "offset": 0, + "offsetType": {}, + "allocation": 0, + "importId": "string", + "createdOn": "string", + "createdById": 0 + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Membership type not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/membership-types/{id}/discounts": { + "get": { + "tags": [ + "MembershipTypes" + ], + "summary": "Gets discounts for the given membership type", + "description": "Gets discounts for the given membership type", + "operationId": "MembershipTypes_GetDiscountsList", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Membership type ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.MembershipTypeDiscountItemResponse" + } + }, + "example": [ + { + "id": 0, + "targetId": 0, + "discount": 0, + "createdOn": "string", + "createdById": 0 + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Membership type not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/membership-types/{id}/duration-billing-items": { + "get": { + "tags": [ + "MembershipTypes" + ], + "summary": "Gets duration/billing options for the given membership type", + "description": "Gets duration/billing options for the given membership type", + "operationId": "MembershipTypes_GetDurationBillingList", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Membership type ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.MembershipTypeDurationBillingItemResponse" + } + }, + "example": [ + { + "id": 0, + "duration": 0, + "billingFrequency": {}, + "salePrice": 0, + "billingPrice": 0, + "renewalPrice": 0, + "importId": "string", + "active": true, + "createdOn": "string", + "createdById": 0 + } + ] + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Membership type not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-service-types": { + "get": { + "tags": [ + "RecurringServiceTypes" + ], + "summary": "Gets a list of recurring service types", + "description": "Gets a list of recurring service types", + "operationId": "RecurringServiceTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "membershipTypeId", + "in": "query", + "description": "Format - int64. Filters by membership type ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "recurrenceType", + "in": "query", + "description": "Filters by recurrence type\\\nValues: [Weekly, Monthly, Seasonal, Daily, NthWeekdayOfMonth]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceType" + } + ], + "nullable": true + } + }, + { + "name": "durationType", + "in": "query", + "description": "Filters by duration type\\\nValues: [Continuous, NumberOfVisits]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceDuration" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, CreatedOn, ModifiedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Memberships.V2.RecurringServiceTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "active": true, + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "durationType": {}, + "durationLength": 0, + "invoiceTemplateId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "jobSummary": "string", + "name": "string", + "importId": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/recurring-service-types/{id}": { + "get": { + "tags": [ + "RecurringServiceTypes" + ], + "summary": "Gets recurring service type specified by ID", + "description": "Gets recurring service type specified by ID", + "operationId": "RecurringServiceTypes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Recurring service type ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Memberships.V2.RecurringServiceTypeResponse" + }, + "example": { + "id": 0, + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "active": true, + "recurrenceType": {}, + "recurrenceInterval": 0, + "recurrenceMonths": [ + "January" + ], + "durationType": {}, + "durationLength": 0, + "invoiceTemplateId": 0, + "businessUnitId": 0, + "jobTypeId": 0, + "priority": {}, + "campaignId": 0, + "jobSummary": "string", + "name": "string", + "importId": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Recurring service type not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Memberships.V2.CustomerMembershipResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.CustomerMembershipResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Memberships.V2.CustomerMembershipResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "followUpOn", + "billingFrequency", + "status", + "followUpStatus", + "active", + "initialDeferredRevenue", + "businessUnitId", + "customerId", + "membershipTypeId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Customer membership ID", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "When customer membership was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this membership", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When customer membership was last modified", + "format": "date-time" + }, + "followUpOn": { + "type": "string", + "description": "Follow up on date", + "format": "date-time" + }, + "cancellationDate": { + "type": "string", + "description": "When customer membership was or will be cancelled", + "format": "date-time", + "nullable": true + }, + "from": { + "type": "string", + "description": "Beginning date of customer membership", + "format": "date-time", + "nullable": true + }, + "nextScheduledBillDate": { + "type": "string", + "description": "Next scheduled billing date", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "description": "End date of customer membership", + "format": "date-time", + "nullable": true + }, + "billingFrequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "description": "How often the customer membership is billed" + }, + "renewalBillingFrequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "description": "Renewal billing frequency", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipStatus" + } + ], + "description": "Current status of the customer membership" + }, + "followUpStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.OpportunityStatus" + } + ], + "description": "Follow-up status of the customer membership" + }, + "active": { + "type": "boolean", + "description": "Whether customer membership is active" + }, + "initialDeferredRevenue": { + "type": "number", + "description": "Initial deferred revenue", + "format": "decimal" + }, + "duration": { + "type": "integer", + "description": "Duration of customer membership in months", + "format": "int32", + "nullable": true + }, + "renewalDuration": { + "type": "integer", + "description": "Renewal duration", + "format": "int32", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64" + }, + "customerId": { + "type": "integer", + "description": "Customer ID of membership", + "format": "int64" + }, + "membershipTypeId": { + "type": "integer", + "description": "The membership type ID of the customer membership", + "format": "int64" + }, + "activatedById": { + "type": "integer", + "description": "ID of the user that activated this membership", + "format": "int64", + "nullable": true + }, + "activatedFromId": { + "type": "integer", + "description": "ID of the invoice item that is the sale task of this membership", + "format": "int64", + "nullable": true + }, + "billingTemplateId": { + "type": "integer", + "description": "ID of the invoice template used for membership billing", + "format": "int64", + "nullable": true + }, + "cancellationBalanceInvoiceId": { + "type": "integer", + "description": "Cancellation balance invoice ID", + "format": "int64", + "nullable": true + }, + "cancellationInvoiceId": { + "type": "integer", + "description": "ID of the invoice that either charged or refunded the deferred revenue balance of the customer membership", + "format": "int64", + "nullable": true + }, + "followUpCustomStatusId": { + "type": "integer", + "description": "ID of custom followup status", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "ID of location for this customer membership", + "format": "int64", + "nullable": true + }, + "paymentMethodId": { + "type": "integer", + "description": "Preferred payment method ID", + "format": "int64", + "nullable": true + }, + "paymentTypeId": { + "type": "integer", + "description": "ID of payment type", + "format": "int64", + "nullable": true + }, + "recurringLocationId": { + "type": "integer", + "description": "Recurring Location ID", + "format": "int64", + "nullable": true + }, + "renewalMembershipTaskId": { + "type": "integer", + "description": "Task ID that renews this membership", + "format": "int64", + "nullable": true + }, + "renewedById": { + "type": "integer", + "description": "ID of the user that renewed this membership", + "format": "int64", + "nullable": true + }, + "soldById": { + "type": "integer", + "description": "ID of the user that was credited for the sale of this membership", + "format": "int64", + "nullable": true + }, + "customerPo": { + "type": "string", + "description": "Customer Purchase Order", + "nullable": true + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo for customer membership", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.MembershipRecurrenceType": { + "enum": [ + "OneTime", + "Monthly", + "EveryOtherMonth", + "Quarterly", + "BiAnnual", + "Annual" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "OneTime", + "Monthly", + "EveryOtherMonth", + "Quarterly", + "BiAnnual", + "Annual" + ] + }, + "Memberships.V2.MembershipStatus": { + "enum": [ + "Active", + "Suspended", + "Expired", + "Canceled", + "Deleted" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Active", + "Suspended", + "Expired", + "Canceled", + "Deleted" + ] + }, + "Memberships.V2.OpportunityStatus": { + "enum": [ + "NotAttempted", + "Unreachable", + "Contacted", + "Won", + "Dismissed" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "NotAttempted", + "Unreachable", + "Contacted", + "Won", + "Dismissed" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Memberships.V2.CustomerMembershipStatusChangeItemResponse": { + "required": [ + "id", + "oldStatus", + "newStatus", + "createdOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the status change record", + "format": "int64" + }, + "oldStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipStatus" + } + ], + "description": "Previous status value" + }, + "newStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipStatus" + } + ], + "description": "New status value" + }, + "note": { + "type": "string", + "description": "Optional note attached to this status change", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When this status change record was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this status change record", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "ModificationResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of created/updated object", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Default response when creating object with a new ID, or updating object by specified ID." + }, + "Memberships.V2.CustomerMembershipUpdateRequest": { + "type": "object", + "properties": { + "businessUnitId": { + "type": "integer", + "description": "ID of the Business Unit associated with this membership", + "format": "int64" + }, + "nextScheduledBillDate": { + "type": "string", + "description": "Next date that this membership will be billed on", + "format": "date-time", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipStatus" + } + ], + "description": "Status of the membership" + }, + "memo": { + "type": "string", + "description": "Memo text field" + }, + "from": { + "type": "string", + "description": "The starting date of this membership", + "format": "date-time" + }, + "to": { + "type": "string", + "description": "The end date of this membership (null if ongoing)", + "format": "date-time", + "nullable": true + }, + "soldById": { + "type": "integer", + "description": "ID of the user that was credited for the sale of this membership", + "format": "int64", + "nullable": true + }, + "billingTemplateId": { + "type": "integer", + "description": "The ID of the invoice template used to bill this membership.\nCan either be a \"settings template\" (when invoice template is shared – in this case new invoice template will be created),\nor be a new invoice template created specifically for this customer membership.", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "Discount location ID of this membership (null if all locations)", + "format": "int64", + "nullable": true + }, + "recurringServiceAction": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.RecurringServiceAction" + } + ], + "description": "Required if RecurringLocationId is set.\nDetermines how many of the customer's locations that recurring services should be added to: all, single, or none (which deletes existing recurring services)." + }, + "recurringLocationId": { + "type": "integer", + "description": "The location at which recurring services are scheduled (null if all locations)", + "format": "int64", + "nullable": true + }, + "paymentMethodId": { + "type": "integer", + "description": "The ID of the payment method (credit card or bank account) that should be used for this membership. This\nfield is mutually exclusive with payment type. Only one or the other can be set at a time.", + "format": "int64", + "nullable": true + }, + "paymentTypeId": { + "type": "integer", + "description": "The payment type (cash, check, etc) that should be used for this membership. This field is mutually\nexclusive with payment type. Only one or the other can be set at a time. Setting payment type means we will\nnot automatically use a payment method to bill the membership and payment will have to be collected manually.", + "format": "int64", + "nullable": true + }, + "renewalMembershipTaskId": { + "type": "integer", + "description": "The ID of the service that will be used as the default to renew this membership.", + "format": "int64", + "nullable": true + }, + "initialDeferredRevenue": { + "type": "number", + "description": "The amount of deferred revenue that this membership should start with that is not accounted for\nin the sale task.", + "format": "decimal" + }, + "cancellationBalanceInvoiceId": { + "type": "integer", + "description": "The ID of the invoice created upon membership cancellation in order to zero out the deferred revenue balance.", + "format": "int64", + "nullable": true + }, + "cancellationInvoiceId": { + "type": "integer", + "description": "The ID of the invoice optionally created upon membership cancellation in order to charge (or refund) the\ncustomer if deferred revenue balance is not 0.", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.RecurringServiceAction": { + "enum": [ + "None", + "Single", + "All" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "None", + "Single", + "All" + ] + }, + "Memberships.V2.MembershipSaleInvoiceCreateResponse": { + "required": [ + "invoiceId", + "customerMembershipId" + ], + "type": "object", + "properties": { + "invoiceId": { + "type": "integer", + "description": "ID of sale invoice created", + "format": "int64" + }, + "customerMembershipId": { + "type": "integer", + "description": "ID of customer membership that was created", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Memberships.V2.MembershipSaleInvoiceCreateRequest": { + "required": [ + "customerId", + "businessUnitId", + "saleTaskId", + "durationBillingId", + "recurringServiceAction" + ], + "type": "object", + "properties": { + "customerId": { + "type": "integer", + "description": "ID of the customer you are creating the Membership Sale Invoice for", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64" + }, + "saleTaskId": { + "type": "integer", + "description": "ID of the sale task that is creating the membership", + "format": "int64" + }, + "durationBillingId": { + "type": "integer", + "description": "ID of the duration/billing option to be used", + "format": "int64" + }, + "locationId": { + "type": "integer", + "description": "Discount location ID of this membership (null if all locations)", + "format": "int64", + "nullable": true + }, + "recurringServiceAction": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.RecurringServiceAction" + } + ], + "description": "Required if RecurringLocationId is set.\nDetermines how many of the customer's locations that recurring services should be added to: all, single, or none (which deletes existing recurring services)." + }, + "recurringLocationId": { + "type": "integer", + "description": "The location at which recurring services are scheduled (null if all locations)", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Memberships.V2.ExportMembershipTypeResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.ExportMembershipTypeResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Memberships.V2.ExportMembershipTypeResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "name", + "active", + "discountMode", + "locationTarget", + "revenueRecognitionMode", + "autoCalculateInvoiceTemplates", + "useMembershipPricingTable", + "showMembershipSavings" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Membership type ID", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "When membership type was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this membership type", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When membership type was modified", + "format": "date-time" + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "billingTemplateId": { + "type": "integer", + "description": "Billing template ID", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string", + "description": "Membership type name" + }, + "active": { + "type": "boolean", + "description": "Whether membership type is active" + }, + "discountMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.DiscountMode" + } + ], + "description": "Membership discount mode" + }, + "locationTarget": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipLocationTarget" + } + ], + "description": "Membership location target" + }, + "revenueRecognitionMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.RevenueRecognitionMode" + } + ], + "description": "Membership revenue recognition mode" + }, + "autoCalculateInvoiceTemplates": { + "type": "boolean", + "description": "Whether invoice templates should be auto-calculated" + }, + "useMembershipPricingTable": { + "type": "boolean", + "description": "Whether membership pricing table should be used" + }, + "showMembershipSavings": { + "type": "boolean", + "description": "Whether membership savings should be displayed" + } + }, + "additionalProperties": false + }, + "Memberships.V2.DiscountMode": { + "enum": [ + "Basic", + "Units", + "Categories" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Basic", + "Units", + "Categories" + ] + }, + "Memberships.V2.MembershipLocationTarget": { + "enum": [ + "AllLocations", + "SingleLocation" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "AllLocations", + "SingleLocation" + ] + }, + "Memberships.V2.RevenueRecognitionMode": { + "enum": [ + "PointOfSale", + "Deferred" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "PointOfSale", + "Deferred" + ] + }, + "ExportResponse_Of_Memberships.V2.ExportRecurringServiceTypeResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.ExportRecurringServiceTypeResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Memberships.V2.ExportRecurringServiceTypeResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "active", + "recurrenceType", + "recurrenceInterval", + "recurrenceMonths", + "durationType", + "durationLength", + "priority" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Recurring service type ID", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "When recurring service type was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this recurring service type", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When recurring service type was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether recurring service type is active" + }, + "recurrenceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceType" + } + ], + "description": "The recurrence type (e.g. Daily, Weekly, Monthly)" + }, + "recurrenceInterval": { + "type": "integer", + "description": "The recurrence interval for the given recurrence type", + "format": "int32" + }, + "recurrenceMonths": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.Month" + }, + "description": "A list of months when the recurring service occurs, if it is a seasonal recurrence type" + }, + "durationType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceDuration" + } + ], + "description": "The recurrence duration type" + }, + "durationLength": { + "type": "integer", + "description": "The recurrence duration length (number of events)", + "format": "int32" + }, + "invoiceTemplateId": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type ID", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.Priority" + } + ], + "description": "Priority" + }, + "campaignId": { + "type": "integer", + "description": "Campaign ID", + "format": "int64", + "nullable": true + }, + "jobSummary": { + "type": "string", + "description": "Job summary", + "nullable": true + }, + "name": { + "type": "string", + "description": "Recurring service type name", + "nullable": true + }, + "importId": { + "type": "string", + "description": "Import ID", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.ServiceRecurrenceType": { + "enum": [ + "Weekly", + "Monthly", + "Seasonal", + "Daily", + "NthWeekdayOfMonth" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Weekly", + "Monthly", + "Seasonal", + "Daily", + "NthWeekdayOfMonth" + ] + }, + "Memberships.V2.Month": { + "enum": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ], + "type": "string", + "description": "Month name as a string, e.g. \"January\" or \"May\"", + "x-enumNames": [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December" + ] + }, + "Memberships.V2.ServiceRecurrenceDuration": { + "enum": [ + "Continuous", + "NumberOfVisits" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Continuous", + "NumberOfVisits" + ] + }, + "Memberships.V2.Priority": { + "enum": [ + "Low", + "Normal", + "High", + "Urgent" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Low", + "Normal", + "High", + "Urgent" + ] + }, + "ExportResponse_Of_Memberships.V2.ExportCustomerMembershipResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.ExportCustomerMembershipResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Memberships.V2.ExportCustomerMembershipResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "followUpOn", + "billingFrequency", + "status", + "followUpStatus", + "active", + "initialDeferredRevenue", + "businessUnitId", + "customerId", + "membershipTypeId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Customer membership ID", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "When customer membership was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this membership", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When customer membership was last modified", + "format": "date-time" + }, + "followUpOn": { + "type": "string", + "description": "Follow up on date", + "format": "date-time" + }, + "cancellationDate": { + "type": "string", + "description": "When customer membership was or will be cancelled", + "format": "date-time", + "nullable": true + }, + "from": { + "type": "string", + "description": "Beginning date of customer membership", + "format": "date-time", + "nullable": true + }, + "nextScheduledBillDate": { + "type": "string", + "description": "Next scheduled billing date", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "description": "End date of customer membership", + "format": "date-time", + "nullable": true + }, + "billingFrequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "description": "How often the customer membership is billed" + }, + "renewalBillingFrequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "description": "Renewal billing frequency", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipStatus" + } + ], + "description": "Current status of the customer membership" + }, + "followUpStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.OpportunityStatus" + } + ], + "description": "Follow-up status of the customer membership" + }, + "active": { + "type": "boolean", + "description": "Whether customer membership is active" + }, + "initialDeferredRevenue": { + "type": "number", + "description": "Initial deferred revenue", + "format": "decimal" + }, + "duration": { + "type": "integer", + "description": "Duration of customer membership in months", + "format": "int32", + "nullable": true + }, + "renewalDuration": { + "type": "integer", + "description": "Renewal duration", + "format": "int32", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64" + }, + "customerId": { + "type": "integer", + "description": "Customer ID of membership", + "format": "int64" + }, + "membershipTypeId": { + "type": "integer", + "description": "The membership type ID of the customer membership", + "format": "int64" + }, + "activatedById": { + "type": "integer", + "description": "ID of the user that activated this membership", + "format": "int64", + "nullable": true + }, + "activatedFromId": { + "type": "integer", + "description": "ID of the invoice item that is the sale task of this membership", + "format": "int64", + "nullable": true + }, + "billingTemplateId": { + "type": "integer", + "description": "ID of the invoice template used for membership billing", + "format": "int64", + "nullable": true + }, + "cancellationBalanceInvoiceId": { + "type": "integer", + "description": "Cancellation balance invoice ID", + "format": "int64", + "nullable": true + }, + "cancellationInvoiceId": { + "type": "integer", + "description": "ID of the invoice that either charged or refunded the deferred revenue balance of the customer membership", + "format": "int64", + "nullable": true + }, + "followUpCustomStatusId": { + "type": "integer", + "description": "ID of custom followup status", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "ID of location for this customer membership", + "format": "int64", + "nullable": true + }, + "paymentMethodId": { + "type": "integer", + "description": "Preferred payment method ID", + "format": "int64", + "nullable": true + }, + "paymentTypeId": { + "type": "integer", + "description": "ID of payment type", + "format": "int64", + "nullable": true + }, + "recurringLocationId": { + "type": "integer", + "description": "Recurring Location ID", + "format": "int64", + "nullable": true + }, + "renewalMembershipTaskId": { + "type": "integer", + "description": "Task ID that renews this membership", + "format": "int64", + "nullable": true + }, + "renewedById": { + "type": "integer", + "description": "ID of the user that renewed this membership", + "format": "int64", + "nullable": true + }, + "soldById": { + "type": "integer", + "description": "ID of the user that was credited for the sale of this membership", + "format": "int64", + "nullable": true + }, + "customerPo": { + "type": "string", + "description": "Customer Purchase Order", + "nullable": true + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo for customer membership", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Memberships.V2.ExportInvoiceTemplateResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.ExportInvoiceTemplateResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Memberships.V2.ExportInvoiceTemplateResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "active", + "total", + "isSettingsTemplate", + "items" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Invoice template name (used only for shared invoice templates)", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Invoice template creation date", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created invoice template", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Invoice template modification date", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether invoice template is active" + }, + "total": { + "type": "number", + "description": "Invoice template total", + "format": "decimal" + }, + "isSettingsTemplate": { + "type": "boolean", + "description": "Whether invoice template is shared (i.e. visible on the Settings page)" + }, + "importId": { + "type": "string", + "description": "Import ID", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateItemResponse" + }, + "description": "A list of invoice template items" + } + }, + "additionalProperties": false + }, + "Memberships.V2.InvoiceTemplateItemResponse": { + "required": [ + "id", + "skuId", + "skuType", + "quantity", + "unitPrice", + "isAddOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Invoice template item ID", + "format": "int64" + }, + "skuId": { + "type": "integer", + "description": "Linked SKU ID", + "format": "int64" + }, + "skuType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.SkuType" + } + ], + "description": "The type of linked SKU" + }, + "quantity": { + "type": "number", + "description": "Quantity", + "format": "decimal" + }, + "unitPrice": { + "type": "number", + "description": "Unit price", + "format": "decimal" + }, + "isAddOn": { + "type": "boolean", + "description": "Whether invoice item is add-on" + }, + "importId": { + "type": "string", + "description": "Import ID", + "nullable": true + }, + "workflowActionItemId": { + "type": "integer", + "description": "The invoice item ID that created this invoice template item via ModifyMembershipWorkflowAction", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html", + "nullable": true + }, + "cost": { + "type": "number", + "description": "Materials cost", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Sold/billable hours", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.SkuType": { + "enum": [ + "Service", + "Material", + "Equipment", + "PriceModifier" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Service", + "Material", + "Equipment", + "PriceModifier" + ] + }, + "ExportResponse_Of_Memberships.V2.ExportLocationRecurringServiceResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.ExportLocationRecurringServiceResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Memberships.V2.ExportLocationRecurringServiceResponse": { + "required": [ + "id", + "name", + "active", + "createdOn", + "modifiedOn", + "locationId", + "recurringServiceTypeId", + "durationType", + "durationLength", + "firstVisitComplete", + "allocation", + "priority", + "recurrenceType", + "recurrenceInterval", + "recurrenceMonths", + "recurrenceDaysOfWeek", + "recurrenceWeek", + "recurrenceDaysOfMonth" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Recurring service ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Recurring service name" + }, + "active": { + "type": "boolean", + "description": "Whether recurring service is active" + }, + "createdOn": { + "type": "string", + "description": "When recurring service was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this recurring service", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When recurring service was modified", + "format": "date-time" + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "membershipId": { + "type": "integer", + "description": "Customer membership ID", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "Location ID", + "format": "int64" + }, + "recurringServiceTypeId": { + "type": "integer", + "description": "Recurring Service Type ID", + "format": "int64" + }, + "durationType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceDuration" + } + ], + "description": "The recurrence duration type" + }, + "durationLength": { + "type": "integer", + "description": "The duration length for the given duration type", + "format": "int32" + }, + "from": { + "type": "string", + "description": "Beginning date of recurring service", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "description": "End date of recurring service", + "format": "date-time", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo", + "nullable": true + }, + "invoiceTemplateId": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64", + "nullable": true + }, + "invoiceTemplateForFollowingYearsId": { + "type": "integer", + "description": "Invoice template ID for the 2nd year and following (for ongoing memberships)", + "format": "int64", + "nullable": true + }, + "firstVisitComplete": { + "type": "boolean", + "description": "Whether first visit is complete" + }, + "activatedFromId": { + "type": "integer", + "description": "ID of the invoice item that is the sale task of this membership", + "format": "int64", + "nullable": true + }, + "allocation": { + "type": "number", + "description": "Recurring service allocation", + "format": "decimal" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type ID", + "format": "int64", + "nullable": true + }, + "campaignId": { + "type": "integer", + "description": "Campaign ID", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.Priority" + } + ], + "description": "Recurring service priority" + }, + "jobSummary": { + "type": "string", + "description": "Job summary", + "nullable": true + }, + "recurrenceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceType" + } + ], + "description": "The recurrence type (e.g. Daily, Weekly, Monthly, etc.)" + }, + "recurrenceInterval": { + "type": "integer", + "description": "The recurrence interval for the given recurrence type.\nCan be 0 when RecurrenceType is Seasonal.", + "format": "int32" + }, + "recurrenceMonths": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.Month" + }, + "description": "A list of months when the recurring service occurs, if it is a seasonal recurrence type" + }, + "recurrenceDaysOfWeek": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.WeekDay" + }, + "description": "A list specifying which days of the week this recurring service recurs when\nRecurrenceType is Weekly" + }, + "recurrenceWeek": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.WeekOfMonth" + } + ], + "description": "Enum value corresponding to which week of the month this recurring service recurs when\nRecurrenceType is NthWeekdayOfMonth. Used with RecurrenceDayOfNthWeek." + }, + "recurrenceDayOfNthWeek": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.WeekDay" + } + ], + "description": "Enum value corresponding to which day of the week this recurring service recurs when\nRecurrenceType is NthWeekdayOfMonth. Used with RecurrenceWeek.", + "nullable": true + }, + "recurrenceDaysOfMonth": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "A list of days of the month on which this recurring service recurs when\nRecurrenceType is Monthly." + }, + "jobStartTime": { + "type": "string", + "description": "Job start time", + "format": "duration", + "nullable": true + }, + "estimatedPayrollCost": { + "type": "number", + "description": "Estimated payroll cost", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.WeekDay": { + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "type": "string", + "description": "Day of week as a string, e.g. \"Monday\" or \"Thursday\"", + "x-enumNames": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ] + }, + "Memberships.V2.WeekOfMonth": { + "enum": [ + "None", + "First", + "Second", + "Third", + "Fourth", + "Last" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "None", + "First", + "Second", + "Third", + "Fourth", + "Last" + ] + }, + "ExportResponse_Of_Memberships.V2.ExportLocationRecurringServiceEventResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.ExportLocationRecurringServiceEventResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Memberships.V2.ExportLocationRecurringServiceEventResponse": { + "required": [ + "id", + "locationRecurringServiceId", + "status", + "date", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Recurring service event ID ", + "format": "int64" + }, + "locationRecurringServiceId": { + "type": "integer", + "description": "Recurring service ID ", + "format": "int64" + }, + "locationRecurringServiceName": { + "type": "string", + "description": "Recurring service name ", + "nullable": true + }, + "membershipId": { + "type": "integer", + "description": "Membership ID ", + "format": "int64", + "nullable": true + }, + "membershipName": { + "type": "string", + "description": "Membership name ", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.OpportunityStatus" + } + ], + "description": "Opportunity status " + }, + "date": { + "type": "string", + "description": "Event date ", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "description": "Event creation date ", + "format": "date-time" + }, + "jobId": { + "type": "integer", + "description": "ID of the job associated with this event ", + "format": "int64", + "nullable": true + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this event (could happen as a result of\nediting recurring service, selling a new membership, etc.)", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Event modification date ", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether this event still exists, or was deleted already." + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Memberships.V2.InvoiceTemplateResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Memberships.V2.InvoiceTemplateResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "active", + "total", + "isSettingsTemplate", + "items" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Invoice template name (used only for shared invoice templates)", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Invoice template creation date", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created invoice template", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Invoice template modification date", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether invoice template is active" + }, + "total": { + "type": "number", + "description": "Invoice template total", + "format": "decimal" + }, + "isSettingsTemplate": { + "type": "boolean", + "description": "Whether invoice template is shared (i.e. visible on the Settings page)" + }, + "importId": { + "type": "string", + "description": "Import ID", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateItemResponse" + }, + "description": "A list of invoice template items" + } + }, + "additionalProperties": false + }, + "Memberships.V2.InvoiceTemplateCreateRequest": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateItemCreateRequest" + }, + "description": "Invoice template items", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.InvoiceTemplateItemCreateRequest": { + "required": [ + "skuId", + "quantity", + "unitPrice", + "isAddOn" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU ID", + "format": "int64" + }, + "quantity": { + "type": "number", + "description": "Quantity", + "format": "decimal" + }, + "unitPrice": { + "type": "number", + "description": "Unit price", + "format": "decimal" + }, + "isAddOn": { + "type": "boolean", + "description": "Whether invoice item is add-on" + }, + "workflowActionItemId": { + "type": "integer", + "description": "The invoice item ID that created this invoice template item via ModifyMembershipWorkflowAction", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html", + "nullable": true + }, + "cost": { + "type": "number", + "description": "Materials cost", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Sold/billable hours", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.InvoiceTemplateUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Invoice template name (used only for shared invoice templates)" + }, + "createdOn": { + "type": "string", + "description": "Invoice template creation date", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created invoice template", + "format": "int64" + }, + "active": { + "type": "boolean", + "description": "Whether invoice template is active" + }, + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.InvoiceTemplateItemUpdateRequest" + } + ], + "nullable": true + }, + "description": "Invoice template items" + } + }, + "additionalProperties": false + }, + "Memberships.V2.InvoiceTemplateItemUpdateRequest": { + "required": [ + "skuId", + "quantity", + "unitPrice", + "isAddOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Invoice template item ID", + "format": "int64", + "nullable": true + }, + "skuId": { + "type": "integer", + "description": "Linked SKU ID", + "format": "int64" + }, + "quantity": { + "type": "number", + "description": "Quantity", + "format": "decimal" + }, + "unitPrice": { + "type": "number", + "description": "Unit price", + "format": "decimal" + }, + "isAddOn": { + "type": "boolean", + "description": "Whether invoice item is add-on" + }, + "description": { + "type": "string", + "description": "Item description", + "format": "html", + "nullable": true + }, + "cost": { + "type": "number", + "description": "Materials cost", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Sold/billable hours", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Memberships.V2.LocationRecurringServiceEventResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.LocationRecurringServiceEventResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Memberships.V2.LocationRecurringServiceEventResponse": { + "required": [ + "id", + "locationRecurringServiceId", + "status", + "date", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Recurring service event ID ", + "format": "int64" + }, + "locationRecurringServiceId": { + "type": "integer", + "description": "Recurring service ID ", + "format": "int64" + }, + "locationRecurringServiceName": { + "type": "string", + "description": "Recurring service name ", + "nullable": true + }, + "membershipId": { + "type": "integer", + "description": "Membership ID ", + "format": "int64", + "nullable": true + }, + "membershipName": { + "type": "string", + "description": "Membership name ", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.OpportunityStatus" + } + ], + "description": "Opportunity status " + }, + "date": { + "type": "string", + "description": "Event date ", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "description": "Event creation date ", + "format": "date-time" + }, + "jobId": { + "type": "integer", + "description": "ID of the job associated with this event ", + "format": "int64", + "nullable": true + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this event (could happen as a result of\nediting recurring service, selling a new membership, etc.)", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Event modification date ", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Memberships.V2.MarkEventCompletedStatusUpdateRequest": { + "required": [ + "jobId" + ], + "type": "object", + "properties": { + "jobId": { + "type": "integer", + "description": "The job ID that the event is marked as completed/incompleted on ", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Memberships.V2.LocationRecurringServiceResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.LocationRecurringServiceResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Memberships.V2.LocationRecurringServiceResponse": { + "required": [ + "id", + "name", + "active", + "createdOn", + "modifiedOn", + "locationId", + "recurringServiceTypeId", + "durationType", + "durationLength", + "firstVisitComplete", + "allocation", + "priority", + "recurrenceType", + "recurrenceInterval", + "recurrenceMonths", + "recurrenceDaysOfWeek", + "recurrenceWeek", + "recurrenceDaysOfMonth" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Recurring service ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Recurring service name" + }, + "active": { + "type": "boolean", + "description": "Whether recurring service is active" + }, + "createdOn": { + "type": "string", + "description": "When recurring service was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this recurring service", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When recurring service was modified", + "format": "date-time" + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "membershipId": { + "type": "integer", + "description": "Customer membership ID", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "Location ID", + "format": "int64" + }, + "recurringServiceTypeId": { + "type": "integer", + "description": "Recurring Service Type ID", + "format": "int64" + }, + "durationType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceDuration" + } + ], + "description": "The recurrence duration type" + }, + "durationLength": { + "type": "integer", + "description": "The duration length for the given duration type", + "format": "int32" + }, + "from": { + "type": "string", + "description": "Beginning date of recurring service", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "description": "End date of recurring service", + "format": "date-time", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo", + "nullable": true + }, + "invoiceTemplateId": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64", + "nullable": true + }, + "invoiceTemplateForFollowingYearsId": { + "type": "integer", + "description": "Invoice template ID for the 2nd year and following (for ongoing memberships)", + "format": "int64", + "nullable": true + }, + "firstVisitComplete": { + "type": "boolean", + "description": "Whether first visit is complete" + }, + "activatedFromId": { + "type": "integer", + "description": "ID of the invoice item that is the sale task of this membership", + "format": "int64", + "nullable": true + }, + "allocation": { + "type": "number", + "description": "Recurring service allocation", + "format": "decimal" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type ID", + "format": "int64", + "nullable": true + }, + "campaignId": { + "type": "integer", + "description": "Campaign ID", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.Priority" + } + ], + "description": "Recurring service priority" + }, + "jobSummary": { + "type": "string", + "description": "Job summary", + "nullable": true + }, + "recurrenceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceType" + } + ], + "description": "The recurrence type (e.g. Daily, Weekly, Monthly, etc.)" + }, + "recurrenceInterval": { + "type": "integer", + "description": "The recurrence interval for the given recurrence type.\nCan be 0 when RecurrenceType is Seasonal.", + "format": "int32" + }, + "recurrenceMonths": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.Month" + }, + "description": "A list of months when the recurring service occurs, if it is a seasonal recurrence type" + }, + "recurrenceDaysOfWeek": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.WeekDay" + }, + "description": "A list specifying which days of the week this recurring service recurs when\nRecurrenceType is Weekly" + }, + "recurrenceWeek": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.WeekOfMonth" + } + ], + "description": "Enum value corresponding to which week of the month this recurring service recurs when\nRecurrenceType is NthWeekdayOfMonth. Used with RecurrenceDayOfNthWeek." + }, + "recurrenceDayOfNthWeek": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.WeekDay" + } + ], + "description": "Enum value corresponding to which day of the week this recurring service recurs when\nRecurrenceType is NthWeekdayOfMonth. Used with RecurrenceWeek.", + "nullable": true + }, + "recurrenceDaysOfMonth": { + "type": "array", + "items": { + "type": "integer", + "format": "int32" + }, + "description": "A list of days of the month on which this recurring service recurs when\nRecurrenceType is Monthly." + }, + "jobStartTime": { + "type": "string", + "description": "Job start time", + "format": "duration", + "nullable": true + }, + "estimatedPayrollCost": { + "type": "number", + "description": "Estimated payroll cost", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.LocationRecurringServiceUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Recurring service name" + }, + "active": { + "type": "boolean", + "description": "Whether recurring service is active" + }, + "recurringServiceTypeId": { + "type": "integer", + "description": "Recurring Service Type ID", + "format": "int64" + }, + "durationType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceDuration" + } + ], + "description": "The recurrence duration type" + }, + "durationLength": { + "type": "integer", + "description": "The duration length for the given duration type", + "format": "int32" + }, + "from": { + "type": "string", + "description": "Beginning date of recurring service", + "format": "date-time" + }, + "memo": { + "type": "string", + "description": "Memo" + }, + "invoiceTemplateId": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64", + "nullable": true + }, + "invoiceTemplateForFollowingYearsId": { + "type": "integer", + "description": "Invoice template ID for the 2nd year and following (for ongoing memberships)", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64" + }, + "jobTypeId": { + "type": "integer", + "description": "Job type ID", + "format": "int64" + }, + "campaignId": { + "type": "integer", + "description": "Campaign ID", + "format": "int64" + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.Priority" + } + ], + "description": "Recurring service priority" + }, + "jobSummary": { + "type": "string", + "description": "Job summary" + }, + "recurrenceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceType" + } + ], + "description": "The recurrence type (e.g. Daily, Weekly, Monthly, etc.)" + }, + "recurrenceInterval": { + "type": "integer", + "description": "The recurrence interval for the given recurrence type.\nCan be 0 when RecurrenceType is Seasonal.", + "format": "int32" + }, + "recurrenceMonths": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.Month" + }, + "description": "A list of months when the recurring service occurs, if it is a seasonal recurrence type" + }, + "recurrenceDaysOfWeek": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.WeekDay" + }, + "description": "A list specifying which days of the week this recurring service recurs when\nRecurrenceType is Weekly" + }, + "recurrenceWeek": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.WeekOfMonth" + } + ], + "description": "Enum value corresponding to which week of the month this recurring service recurs when\nRecurrenceType is NthWeekdayOfMonth. Used with RecurrenceDayOfNthWeek." + }, + "recurrenceDayOfNthWeek": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.WeekDay" + } + ], + "description": "Enum value corresponding to which day of the week this recurring service recurs when\nRecurrenceType is NthWeekdayOfMonth. Used with RecurrenceWeek.", + "nullable": true + }, + "jobStartTime": { + "type": "string", + "description": "Job start time", + "format": "duration", + "nullable": true + }, + "estimatedPayrollCost": { + "type": "number", + "description": "Estimated payroll cost", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Memberships.V2.MembershipTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.MembershipTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Memberships.V2.MembershipTypeResponse": { + "required": [ + "name", + "active", + "discountMode", + "locationTarget", + "revenueRecognitionMode", + "autoCalculateInvoiceTemplates", + "useMembershipPricingTable", + "showMembershipSavings", + "id", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Membership type name" + }, + "active": { + "type": "boolean", + "description": "Whether membership type is active" + }, + "discountMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.DiscountMode" + } + ], + "description": "Membership discount mode" + }, + "locationTarget": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipLocationTarget" + } + ], + "description": "Membership location target" + }, + "revenueRecognitionMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.RevenueRecognitionMode" + } + ], + "description": "Membership revenue recognition mode" + }, + "autoCalculateInvoiceTemplates": { + "type": "boolean", + "description": "Whether invoice templates should be auto-calculated" + }, + "useMembershipPricingTable": { + "type": "boolean", + "description": "Whether membership pricing table should be used" + }, + "showMembershipSavings": { + "type": "boolean", + "description": "Whether membership savings should be displayed" + }, + "id": { + "type": "integer", + "description": "Membership type ID", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "When membership type was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this membership type", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When membership type was modified", + "format": "date-time" + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "billingTemplateId": { + "type": "integer", + "description": "Billing template ID", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.MembershipTypeRecurringServiceItemResponse": { + "required": [ + "id", + "membershipTypeId", + "recurringServiceTypeId", + "offset", + "offsetType", + "allocation", + "createdOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the recurring service item", + "format": "int64" + }, + "membershipTypeId": { + "type": "integer", + "description": "Membership type ID associated with the item", + "format": "int64" + }, + "recurringServiceTypeId": { + "type": "integer", + "description": "Recurring service type ID associated with the item", + "format": "int64" + }, + "offset": { + "type": "integer", + "description": "Number of weeks or months (depending on offset type) between membership start and recurring service start", + "format": "int32" + }, + "offsetType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.OffsetType" + } + ], + "description": "Offset type of the recurring service type associated with this item, can be weeks (0) or months (1)" + }, + "allocation": { + "type": "number", + "description": "The percentage of deferred revenue allocated to the recurring service item", + "format": "decimal" + }, + "importId": { + "type": "string", + "description": "Import ID", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When recurring service item was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this recurring service item", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.OffsetType": { + "enum": [ + "Weeks", + "Months" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Weeks", + "Months" + ] + }, + "Memberships.V2.MembershipTypeDiscountItemResponse": { + "required": [ + "id", + "targetId", + "discount", + "createdOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the discount item", + "format": "int64" + }, + "targetId": { + "type": "integer", + "description": "ID of the discount's target, which can be either a business unit or pricebook category", + "format": "int64" + }, + "discount": { + "type": "number", + "description": "Percentage discount (0 to 100)", + "format": "decimal" + }, + "createdOn": { + "type": "string", + "description": "When discount item was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this discount item", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Memberships.V2.MembershipTypeDurationBillingItemResponse": { + "required": [ + "id", + "billingFrequency", + "salePrice", + "billingPrice", + "renewalPrice", + "active", + "createdOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the duration/billing option", + "format": "int64" + }, + "duration": { + "type": "integer", + "description": "Duration of the entry ", + "format": "int32", + "nullable": true + }, + "billingFrequency": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.MembershipRecurrenceType" + } + ], + "description": "Billing frequency of the entry" + }, + "salePrice": { + "type": "number", + "description": "Sale price of the entry", + "format": "decimal" + }, + "billingPrice": { + "type": "number", + "description": "Billing price of the entry", + "format": "decimal" + }, + "renewalPrice": { + "type": "number", + "description": "Renewal price of the entry", + "format": "decimal" + }, + "importId": { + "type": "string", + "description": "Import ID of the entry", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether the duration/billing option is active" + }, + "createdOn": { + "type": "string", + "description": "When duration/billing option was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this duration/billing option", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Memberships.V2.RecurringServiceTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.RecurringServiceTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Memberships.V2.RecurringServiceTypeResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "active", + "recurrenceType", + "recurrenceInterval", + "recurrenceMonths", + "durationType", + "durationLength", + "priority" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Recurring service type ID", + "format": "int64" + }, + "createdOn": { + "type": "string", + "description": "When recurring service type was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this recurring service type", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When recurring service type was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether recurring service type is active" + }, + "recurrenceType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceType" + } + ], + "description": "The recurrence type (e.g. Daily, Weekly, Monthly)" + }, + "recurrenceInterval": { + "type": "integer", + "description": "The recurrence interval for the given recurrence type", + "format": "int32" + }, + "recurrenceMonths": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.V2.Month" + }, + "description": "A list of months when the recurring service occurs, if it is a seasonal recurrence type" + }, + "durationType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.ServiceRecurrenceDuration" + } + ], + "description": "The recurrence duration type" + }, + "durationLength": { + "type": "integer", + "description": "The recurrence duration length (number of events)", + "format": "int32" + }, + "invoiceTemplateId": { + "type": "integer", + "description": "Invoice template ID", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type ID", + "format": "int64", + "nullable": true + }, + "priority": { + "oneOf": [ + { + "$ref": "#/components/schemas/Memberships.V2.Priority" + } + ], + "description": "Priority" + }, + "campaignId": { + "type": "integer", + "description": "Campaign ID", + "format": "int64", + "nullable": true + }, + "jobSummary": { + "type": "string", + "description": "Job summary", + "nullable": true + }, + "name": { + "type": "string", + "description": "Recurring service type name", + "nullable": true + }, + "importId": { + "type": "string", + "description": "Import ID", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/payroll-v2.json b/openapi_specs/payroll-v2.json new file mode 100644 index 0000000..e400987 --- /dev/null +++ b/openapi_specs/payroll-v2.json @@ -0,0 +1,5889 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Payroll", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/payroll/v2" + } + ], + "paths": { + "/tenant/{tenant}/export/jobs/splits": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for job splits", + "description": "Provides export feed for job splits", + "operationId": "Export_JobSplits", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Payroll.V2.JobSplits.JobSplitExportResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "jobId": 0, + "technicianId": 0, + "split": 0, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/payroll-adjustments": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for payroll adjustments", + "description": "Provides export feed for payroll adjustments", + "operationId": "Export_PayrollAdjustments", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Payroll.V2.PayrollAdjustments.PayrollAdjustmentExportResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "employeeType": {}, + "employeeId": 0, + "postedOn": "string", + "amount": 0, + "memo": "string", + "activityCodeId": 0, + "invoiceId": 0, + "hours": 0, + "rate": 0, + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/jobs/timesheets": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for job timesheets", + "description": "Provides export feed for job timesheets", + "operationId": "Export_Timesheets", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Payroll.V2.Timesheets.JobTimesheetExportResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "jobId": 0, + "appointmentId": 0, + "technicianId": 0, + "dispatchedOn": "string", + "arrivedOn": "string", + "canceledOn": "string", + "doneOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/activity-codes": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for activity codes", + "description": "Provides export feed for activity codes", + "operationId": "Export_ActivityCodes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Payroll.V2.PayrollActivityCodes.PayrollActivityCodeExportResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "name": "string", + "code": "string", + "earningCategory": {}, + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/timesheet-codes": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for timesheet codes", + "description": "Provides export feed for timesheet codes", + "operationId": "Export_TimesheetCodes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Payroll.V2.TimesheetCodes.TimesheetCodeExportResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "code": "string", + "description": "string", + "type": {}, + "applicableEmployeeType": {}, + "rateInfo": { + "hourlyRate": {}, + "customHourlyRate": 0, + "rateMultiplier": 0 + }, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/gross-pay-items": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for gross pay items", + "description": "Provides export feed for gross pay items", + "operationId": "Export_GrossPayItems", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Payroll.V2.GrossPayItems.GrossPayItemExportResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "employeeId": 0, + "employeeType": {}, + "businessUnitName": "string", + "payrollId": 0, + "employeePayrollId": "string", + "date": "string", + "activity": "string", + "activityCodeId": 0, + "activityCode": "string", + "amount": 0, + "amountAdjustment": 0, + "payoutBusinessUnitName": "string", + "grossPayItemType": {}, + "startedOn": "string", + "endedOn": "string", + "paidDurationHours": 0, + "paidTimeType": {}, + "jobId": 0, + "jobNumber": "string", + "jobTypeName": "string", + "projectNumber": "string", + "projectId": 0, + "invoiceId": 0, + "invoiceNumber": "string", + "invoiceItemId": 0, + "customerId": 0, + "customerName": "string", + "locationId": 0, + "locationName": "string", + "locationAddress": "string", + "locationZip": "string", + "zoneName": "string", + "taxZoneName": "string", + "laborTypeId": 0, + "laborTypeCode": "string", + "isPrevailingWageJob": true, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/gross-pay-items": { + "post": { + "tags": [ + "GrossPayItems" + ], + "summary": "Creates new gross pay item", + "description": "Creates new gross pay item", + "operationId": "GrossPayItems_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "The gross pay item model to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.GrossPayItems.GrossPayItemCreateRequest" + }, + "example": { + "payrollId": 0, + "amount": 0, + "activityCodeId": 0, + "date": "string", + "invoiceId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "GrossPayItems" + ], + "summary": "Gets a list of gross pay items", + "description": "Gets a list of gross pay items", + "operationId": "GrossPayItems_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "employeeType", + "in": "query", + "description": "The type of employee\\\nValues: [Technician, Employee]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "nullable": true + } + }, + { + "name": "employeeId", + "in": "query", + "description": "Format - int64. The Employee ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "payrollIds", + "in": "query", + "description": "The payroll ID", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "dateOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having date after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "dateOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having date before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.GrossPayItems.GrossPayItemResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "employeeId": 0, + "employeeType": {}, + "businessUnitName": "string", + "payrollId": 0, + "employeePayrollId": "string", + "date": "string", + "activity": "string", + "activityCodeId": 0, + "activityCode": "string", + "amount": 0, + "amountAdjustment": 0, + "payoutBusinessUnitName": "string", + "grossPayItemType": {}, + "startedOn": "string", + "endedOn": "string", + "paidDurationHours": 0, + "paidTimeType": {}, + "jobId": 0, + "jobNumber": "string", + "jobTypeName": "string", + "projectNumber": "string", + "projectId": 0, + "invoiceId": 0, + "invoiceNumber": "string", + "invoiceItemId": 0, + "customerId": 0, + "customerName": "string", + "locationId": 0, + "locationName": "string", + "locationAddress": "string", + "locationZip": "string", + "zoneName": "string", + "taxZoneName": "string", + "laborTypeId": 0, + "laborTypeCode": "string", + "isPrevailingWageJob": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/gross-pay-items/{id}": { + "put": { + "tags": [ + "GrossPayItems" + ], + "summary": "Update specified gross pay item", + "description": "Update specified gross pay item", + "operationId": "GrossPayItems_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The gross pay item ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "The gross pay item model to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.GrossPayItems.GrossPayItemUpdateRequest" + }, + "example": { + "payrollId": 0, + "amount": 0, + "activityCodeId": 0, + "date": "string", + "invoiceId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "GrossPayItems" + ], + "summary": "Delete specified gross pay item", + "description": "Delete specified gross pay item", + "operationId": "GrossPayItems_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The gross pay item ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{job}/splits": { + "get": { + "tags": [ + "JobSplits" + ], + "summary": "Gets a list of job splits", + "description": "Gets a list of job splits", + "operationId": "JobSplits_GetList", + "parameters": [ + { + "name": "job", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns job split created on or after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return job splits created before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns job split modified on or after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns job split modified before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Returns job split by active status\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.JobSplits.JobSplitResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "technicianId": 0, + "split": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Unknown job ID was specified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/splits": { + "get": { + "tags": [ + "JobSplits" + ], + "summary": "Gets a list of job splits by multiple jobs", + "description": "Gets a list of job splits by multiple jobs", + "operationId": "JobSplits_GetListByJobs", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "jobIds", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns job split created on or after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return job splits created before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns job split modified on or after a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Returns job split modified before a certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Returns job split by active status\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.JobSplits.JobSplitResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "technicianId": 0, + "split": 0, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Unknown job ID was specified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/locations/rates": { + "get": { + "tags": [ + "LocationLaborType" + ], + "summary": "Gets a list of location hourly rates by multiple locations", + "description": "Gets a list of location hourly rates by multiple locations", + "operationId": "LocationLaborType_GetListByLocations", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "locationIds", + "in": "query", + "description": "Returns location rates for the specified location IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Location (sorts by locations Id), CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.LocationLaborTypes.LocationLaborTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "locationId": 0, + "hourlyRate": 0, + "laborTypeName": "string", + "laborTypeCode": "string", + "createdOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Unknown location ID was specified", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/activity-codes": { + "get": { + "tags": [ + "ActivityCodes" + ], + "summary": "Gets a list of payroll activity codes", + "description": "Gets a list of payroll activity codes", + "operationId": "ActivityCodes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.PayrollActivityCodes.PayrollActivityCodeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "code": "string", + "earningCategory": {} + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/activity-codes/{id}": { + "get": { + "tags": [ + "ActivityCodes" + ], + "summary": "Gets payroll activity code specified by ID", + "description": "Gets payroll activity code specified by ID", + "operationId": "ActivityCodes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. ID of the payroll activity code", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.PayrollActivityCodes.PayrollActivityCodeResponse" + }, + "example": { + "id": 0, + "name": "string", + "code": "string", + "earningCategory": {} + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Payroll activity code was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payroll-adjustments": { + "post": { + "tags": [ + "PayrollAdjustments" + ], + "summary": "Creates new payroll adjustment", + "description": "Creates new payroll adjustment", + "operationId": "PayrollAdjustments_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "The payroll adjustment model to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.PayrollAdjustments.PayrollAdjustmentCreateRequest" + }, + "example": { + "employeeType": {}, + "employeeId": 0, + "postedOn": "string", + "amount": 0, + "memo": "string", + "activityCodeId": 0, + "invoiceId": 0, + "hours": 0, + "rate": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "get": { + "tags": [ + "PayrollAdjustments" + ], + "summary": "Gets a list of payroll adjustments", + "description": "Gets a list of payroll adjustments", + "operationId": "PayrollAdjustments_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "employeeIds", + "in": "query", + "description": "The comma separated list of employee IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "postedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return payroll adjustments posted on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "postedOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return payroll adjustments posted on or before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.PayrollAdjustments.PayrollAdjustmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "employeeType": {}, + "employeeId": 0, + "postedOn": "string", + "amount": 0, + "memo": "string", + "activityCodeId": 0, + "invoiceId": 0, + "hours": 0, + "rate": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payroll-adjustments/{id}": { + "get": { + "tags": [ + "PayrollAdjustments" + ], + "summary": "Gets payroll adjustment specified by ID", + "description": "Gets payroll adjustment specified by ID", + "operationId": "PayrollAdjustments_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The ID of payroll adjustment", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "employeeType", + "in": "query", + "description": "The employee type\\\nValues: [Technician, Employee]", + "schema": { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.PayrollAdjustments.PayrollAdjustmentResponse" + }, + "example": { + "id": 0, + "employeeType": {}, + "employeeId": 0, + "postedOn": "string", + "amount": 0, + "memo": "string", + "activityCodeId": 0, + "invoiceId": 0, + "hours": 0, + "rate": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Payroll adjustment was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/payrolls": { + "get": { + "tags": [ + "Payrolls" + ], + "summary": "Gets a list of payrolls", + "description": "Gets a list of payrolls", + "operationId": "Payrolls_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "employeeType", + "in": "query", + "description": "The type of employee\\\nValues: [Technician, Employee]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "startedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having start date after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "endedOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having end date before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "approvedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items approved on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Return items of the specified payroll status\\\nValues: [Pending, Expired, Approved, Paid]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PayrollStatus" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.Payrolls.PayrollResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "startedOn": "string", + "endedOn": "string", + "employeeId": 0, + "employeeType": {}, + "status": {}, + "burdenRate": 0, + "modifiedOn": "string", + "managerApprovedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technicians/{technician}/payrolls": { + "get": { + "tags": [ + "Payrolls" + ], + "summary": "Gets a list of technician payrolls", + "description": "Gets a list of technician payrolls", + "operationId": "Payrolls_GetTechnicianPayrolls", + "parameters": [ + { + "name": "technician", + "in": "path", + "description": "Format - int64. The technician ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "startedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having start date after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "endedOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having end date before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "approvedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items approved on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Return items of the specified payroll status\\\nValues: [Pending, Expired, Approved, Paid]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PayrollStatus" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.Payrolls.PayrollResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "startedOn": "string", + "endedOn": "string", + "employeeId": 0, + "employeeType": {}, + "status": {}, + "burdenRate": 0, + "modifiedOn": "string", + "managerApprovedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/employees/{employee}/payrolls": { + "get": { + "tags": [ + "Payrolls" + ], + "summary": "Gets a list of employee payrolls", + "description": "Gets a list of employee payrolls", + "operationId": "Payrolls_GetEmployeePayrolls", + "parameters": [ + { + "name": "employee", + "in": "path", + "description": "Format - int64. The employee ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "startedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having start date after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "endedOnOrBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having end date before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "approvedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items approved on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Return items of the specified payroll status\\\nValues: [Pending, Expired, Approved, Paid]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PayrollStatus" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.Payrolls.PayrollResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "startedOn": "string", + "endedOn": "string", + "employeeId": 0, + "employeeType": {}, + "status": {}, + "burdenRate": 0, + "modifiedOn": "string", + "managerApprovedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "409": { + "description": "Some conflict occurred while executing the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/timesheet-codes": { + "get": { + "tags": [ + "TimesheetCodes" + ], + "summary": "Gets a list of timesheet codes", + "description": "Gets a list of timesheet codes", + "operationId": "TimesheetCodes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.TimesheetCodes.TimesheetCodeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "code": "string", + "description": "string", + "type": {}, + "applicableEmployeeType": {}, + "rateInfo": { + "hourlyRate": {}, + "customHourlyRate": 0, + "rateMultiplier": 0 + }, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/timesheet-codes/{id}": { + "get": { + "tags": [ + "TimesheetCodes" + ], + "summary": "Gets timesheet code specified by ID", + "description": "Gets timesheet code specified by ID", + "operationId": "TimesheetCodes_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The timesheet code ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodes.TimesheetCodeResponse" + }, + "example": { + "id": 0, + "code": "string", + "description": "string", + "type": {}, + "applicableEmployeeType": {}, + "rateInfo": { + "hourlyRate": {}, + "customHourlyRate": 0, + "rateMultiplier": 0 + }, + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Timesheet code was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{job}/timesheets": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "Gets a list of job timesheets", + "description": "Gets a list of job timesheets", + "operationId": "Timesheets_GetJobTimesheets", + "parameters": [ + { + "name": "job", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. The technician ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "startedOn", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having dispatch, arrive, cancel or done dates after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "endedOn", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having dispatch, arrive, cancel or done dates before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.Timesheets.JobTimesheetResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "appointmentId": 0, + "technicianId": 0, + "dispatchedOn": "string", + "arrivedOn": "string", + "canceledOn": "string", + "doneOn": "string", + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Timesheets" + ], + "summary": "Creates new job timesheet", + "description": "Creates new job timesheet", + "operationId": "Timesheets_CreateJobTimesheet", + "parameters": [ + { + "name": "job", + "in": "path", + "description": "Format - int64. The job ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "The job timesheet model to create", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.Timesheets.JobTimesheetCreateRequest" + }, + "example": { + "appointmentId": 0, + "technicianId": 0, + "dispatchedOn": "string", + "arrivedOn": "string", + "canceledOn": "string", + "doneOn": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/non-job-timesheets": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "Gets a list of non job timesheets for employee", + "description": "Gets a list of non job timesheets for employee", + "operationId": "Timesheets_GetNonJobTimesheets", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "employeeId", + "in": "query", + "description": "Format - int64. The employee ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "employeeType", + "in": "query", + "description": "The employee type\\\nValues: [Technician, Employee]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.Timesheets.NonJobTimesheetResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "employeeId": 0, + "employeeType": {}, + "timesheetCodeId": 0, + "startedOn": "string", + "endedOn": "string", + "createdOn": "string", + "modifiedOn": "string", + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/timesheets": { + "get": { + "tags": [ + "Timesheets" + ], + "summary": "Gets a list of job timesheets by multiple jobs", + "description": "Gets a list of job timesheets by multiple jobs", + "operationId": "Timesheets_GetJobTimesheetsByJobs", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "jobIds", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "technicianId", + "in": "query", + "description": "Format - int64. The technician ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "startedOn", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having dispatch, arrive, cancel or done dates after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "endedOn", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items having dispatch, arrive, cancel or done dates before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, ModifiedOn, CreatedOn.", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Payroll.V2.Timesheets.JobTimesheetResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "appointmentId": 0, + "technicianId": 0, + "dispatchedOn": "string", + "arrivedOn": "string", + "canceledOn": "string", + "doneOn": "string", + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/jobs/{job}/timesheets/{id}": { + "put": { + "tags": [ + "Timesheets" + ], + "summary": "Update specified job timesheet", + "description": "Update specified job timesheet", + "operationId": "Timesheets_UpdateJobTimesheet", + "parameters": [ + { + "name": "job", + "in": "path", + "description": "Format - int64. The job ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "description": "Format - int64. The job timesheet ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "The job timesheet model to update", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Payroll.V2.Timesheets.JobTimesheetUpdateRequest" + }, + "example": { + "appointmentId": 0, + "technicianId": 0, + "dispatchedOn": "string", + "arrivedOn": "string", + "canceledOn": "string", + "doneOn": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ExportResponse_Of_Payroll.V2.JobSplits.JobSplitExportResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.JobSplits.JobSplitExportResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Payroll.V2.JobSplits.JobSplitExportResponse": { + "required": [ + "id", + "jobId", + "technicianId", + "split", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The job split ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "Job ID", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Technician ID", + "format": "int64" + }, + "split": { + "type": "number", + "description": "The split", + "format": "decimal" + }, + "createdOn": { + "type": "string", + "description": "The job split creation date/time (on UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (on UTC) when the job split was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether job split is active" + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ExportResponse_Of_Payroll.V2.PayrollAdjustments.PayrollAdjustmentExportResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.PayrollAdjustments.PayrollAdjustmentExportResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Payroll.V2.PayrollAdjustments.PayrollAdjustmentExportResponse": { + "required": [ + "id", + "employeeType", + "employeeId", + "postedOn", + "amount", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the payroll adjustment", + "format": "int64" + }, + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "Employee type of the payroll adjustment" + }, + "employeeId": { + "type": "integer", + "description": "Employee ID of the payroll adjustment", + "format": "int64" + }, + "postedOn": { + "type": "string", + "description": "Posted date/time (UTC) of the payroll adjustment", + "format": "date-time" + }, + "amount": { + "type": "number", + "description": "Amount of the payroll adjustment", + "format": "decimal" + }, + "memo": { + "type": "string", + "description": "Memo of the payroll adjustment", + "nullable": true + }, + "activityCodeId": { + "type": "integer", + "description": "Activity code ID of the payroll adjustment", + "format": "int64", + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "ID of the payroll adjustment invoice", + "format": "int64", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Hours of the payroll adjustment", + "format": "decimal", + "nullable": true + }, + "rate": { + "type": "number", + "description": "Rate of the payroll adjustment", + "format": "decimal", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (on UTC) when the payroll adjustment was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether payroll adjustment is active" + } + }, + "additionalProperties": false + }, + "Payroll.V2.EmployeeType": { + "enum": [ + "Technician", + "Employee" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Technician", + "Employee" + ] + }, + "ExportResponse_Of_Payroll.V2.Timesheets.JobTimesheetExportResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.Timesheets.JobTimesheetExportResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Payroll.V2.Timesheets.JobTimesheetExportResponse": { + "required": [ + "id", + "jobId", + "appointmentId", + "technicianId", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The timesheet ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "The job ID", + "format": "int64" + }, + "appointmentId": { + "type": "integer", + "description": "The appointment ID", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "The technician ID", + "format": "int64" + }, + "dispatchedOn": { + "type": "string", + "description": "the dispatch date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "arrivedOn": { + "type": "string", + "description": "The arrive date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "canceledOn": { + "type": "string", + "description": "The cancel date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "doneOn": { + "type": "string", + "description": "The done date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "The created date/time (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "The modified date/time (in UTC)", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether job timesheet is active" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Payroll.V2.PayrollActivityCodes.PayrollActivityCodeExportResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.PayrollActivityCodes.PayrollActivityCodeExportResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Payroll.V2.PayrollActivityCodes.PayrollActivityCodeExportResponse": { + "required": [ + "id", + "name", + "code", + "earningCategory", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the payroll activity code", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the payroll activity code" + }, + "code": { + "type": "string", + "description": "Code of the payroll activity code" + }, + "earningCategory": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PayrollEarningCategory" + } + ], + "description": "Earning category of the payroll activity code" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (on UTC) when the activity code was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether payroll activity code is active" + } + }, + "additionalProperties": false + }, + "Payroll.V2.PayrollEarningCategory": { + "enum": [ + "Timesheet", + "Commission", + "Reimbursement" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Timesheet", + "Commission", + "Reimbursement" + ] + }, + "ExportResponse_Of_Payroll.V2.TimesheetCodes.TimesheetCodeExportResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodes.TimesheetCodeExportResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Payroll.V2.TimesheetCodes.TimesheetCodeExportResponse": { + "required": [ + "id", + "code", + "type", + "applicableEmployeeType", + "rateInfo", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the timesheet code", + "format": "int64" + }, + "code": { + "type": "string", + "description": "Code of the timesheet code" + }, + "description": { + "type": "string", + "description": "Description of the timesheet code", + "nullable": true + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodeType" + } + ], + "description": "Type of the timesheet code" + }, + "applicableEmployeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodeEmployeeType" + } + ], + "description": "Application employee type of the timesheet code" + }, + "rateInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodes.TimesheetCodeRateInfoResponse" + } + ], + "description": "Rate info of the timesheet code" + }, + "createdOn": { + "type": "string", + "description": "The date when the timesheet code was created (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "The last date when the timesheet code was modified (in UTC)", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Indicates whether the timesheet code is active or not" + } + }, + "additionalProperties": false + }, + "Payroll.V2.TimesheetCodeType": { + "enum": [ + "Unpaid", + "Paid", + "ClockInOut", + "PaidTimeOff" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Unpaid", + "Paid", + "ClockInOut", + "PaidTimeOff" + ] + }, + "Payroll.V2.TimesheetCodeEmployeeType": { + "enum": [ + "Technician", + "Employee", + "All" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Technician", + "Employee", + "All" + ] + }, + "Payroll.V2.TimesheetCodes.TimesheetCodeRateInfoResponse": { + "required": [ + "hourlyRate", + "rateMultiplier" + ], + "type": "object", + "properties": { + "hourlyRate": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetHourlyRateType" + } + ], + "description": "The hourly rate" + }, + "customHourlyRate": { + "type": "number", + "description": "The custom hourly rate", + "format": "decimal", + "nullable": true + }, + "rateMultiplier": { + "type": "number", + "description": "The rate multiplier", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Payroll.V2.TimesheetHourlyRateType": { + "enum": [ + "EmployeeHourlyRate", + "CustomHourlyRate" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "EmployeeHourlyRate", + "CustomHourlyRate" + ] + }, + "ExportResponse_Of_Payroll.V2.GrossPayItems.GrossPayItemExportResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.GrossPayItems.GrossPayItemExportResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Payroll.V2.GrossPayItems.GrossPayItemExportResponse": { + "required": [ + "payrollId", + "date", + "amount", + "grossPayItemType", + "jobId", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The gross pay item ID", + "format": "int64", + "nullable": true + }, + "employeeId": { + "type": "integer", + "description": "The employee/technician ID", + "format": "int64", + "nullable": true + }, + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "The employee type", + "nullable": true + }, + "businessUnitName": { + "type": "string", + "description": "The business unit name", + "nullable": true + }, + "payrollId": { + "type": "integer", + "description": "The payroll ID", + "format": "int64" + }, + "employeePayrollId": { + "type": "string", + "description": "Employee/Technician payroll ID", + "nullable": true + }, + "date": { + "type": "string", + "description": "The date (UTC) of the gross pay item", + "format": "date-time" + }, + "activity": { + "type": "string", + "description": "The activity", + "nullable": true + }, + "activityCodeId": { + "type": "integer", + "description": "The payroll activity code ID", + "format": "int64", + "nullable": true + }, + "activityCode": { + "type": "string", + "description": "The payroll activity code name", + "nullable": true + }, + "amount": { + "type": "number", + "description": "The amount", + "format": "decimal" + }, + "amountAdjustment": { + "type": "number", + "description": "The amount adjustment", + "format": "decimal", + "nullable": true + }, + "payoutBusinessUnitName": { + "type": "string", + "description": "The payout business unit name", + "nullable": true + }, + "grossPayItemType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.GrossPayItemType" + } + ], + "description": "Type of the gross pay item" + }, + "startedOn": { + "type": "string", + "description": "The start time (UTC)", + "format": "date-time", + "nullable": true + }, + "endedOn": { + "type": "string", + "description": "The end time (UTC)", + "format": "date-time", + "nullable": true + }, + "paidDurationHours": { + "type": "number", + "description": "The paid duration in hours", + "format": "decimal", + "nullable": true + }, + "paidTimeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PaidTimeType" + } + ], + "description": "Type of the paid time", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "The job ID", + "format": "int64" + }, + "jobNumber": { + "type": "string", + "description": "The job number", + "nullable": true + }, + "jobTypeName": { + "type": "string", + "description": "Name of the job type", + "nullable": true + }, + "projectNumber": { + "type": "string", + "description": "The project number", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "The project ID", + "format": "int64", + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "The invoice ID", + "format": "int64", + "nullable": true + }, + "invoiceNumber": { + "type": "string", + "description": "The invoice number", + "nullable": true + }, + "invoiceItemId": { + "type": "integer", + "description": "The invoice item ID", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "The customer ID", + "format": "int64", + "nullable": true + }, + "customerName": { + "type": "string", + "description": "The customer name", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "The location ID", + "format": "int64", + "nullable": true + }, + "locationName": { + "type": "string", + "description": "The location name", + "nullable": true + }, + "locationAddress": { + "type": "string", + "description": "The location address", + "nullable": true + }, + "locationZip": { + "type": "string", + "description": "The location zip", + "nullable": true + }, + "zoneName": { + "type": "string", + "description": "The zone name", + "nullable": true + }, + "taxZoneName": { + "type": "string", + "description": "The tax zone name", + "nullable": true + }, + "laborTypeId": { + "type": "integer", + "description": "ID of the labor type", + "format": "int64", + "nullable": true + }, + "laborTypeCode": { + "type": "string", + "description": "Code of the labor type", + "nullable": true + }, + "isPrevailingWageJob": { + "type": "boolean", + "description": "Defines whether it's a prevailing wage job", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "Date/time (on UTC) when the gross pay item was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (on UTC) when the gross pay item was modified", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether gross pay item is active" + } + }, + "additionalProperties": false + }, + "Payroll.V2.GrossPayItemType": { + "enum": [ + "InvoiceRelatedBonus", + "TimesheetTime", + "CustomBonus", + "Salary", + "Reimbursement" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "InvoiceRelatedBonus", + "TimesheetTime", + "CustomBonus", + "Salary", + "Reimbursement" + ] + }, + "Payroll.V2.PaidTimeType": { + "enum": [ + "Regular", + "Overtime", + "DoubleOvertime", + "PaidTimeOff" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Regular", + "Overtime", + "DoubleOvertime", + "PaidTimeOff" + ] + }, + "ModificationResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of created/updated object", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Default response when creating object with a new ID, or updating object by specified ID." + }, + "Payroll.V2.GrossPayItems.GrossPayItemCreateRequest": { + "required": [ + "payrollId", + "amount", + "activityCodeId", + "date" + ], + "type": "object", + "properties": { + "payrollId": { + "type": "integer", + "description": "The payroll ID", + "format": "int64" + }, + "amount": { + "type": "number", + "description": "Amount of the gross pay item", + "format": "decimal" + }, + "activityCodeId": { + "type": "integer", + "description": "The ID of the activity code", + "format": "int64" + }, + "date": { + "type": "string", + "description": "Date of the gross pay item", + "format": "date-time" + }, + "invoiceId": { + "type": "integer", + "description": "The invoice ID", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "Payroll.V2.GrossPayItems.GrossPayItemUpdateRequest": { + "required": [ + "payrollId", + "amount", + "activityCodeId", + "date" + ], + "type": "object", + "properties": { + "payrollId": { + "type": "integer", + "description": "The payroll ID", + "format": "int64" + }, + "amount": { + "type": "number", + "description": "Amount of the gross pay item", + "format": "decimal" + }, + "activityCodeId": { + "type": "integer", + "description": "The ID of the activity code", + "format": "int64" + }, + "date": { + "type": "string", + "description": "Date of the gross pay item", + "format": "date-time" + }, + "invoiceId": { + "type": "integer", + "description": "The invoice ID", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.GrossPayItems.GrossPayItemResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.GrossPayItems.GrossPayItemResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.GrossPayItems.GrossPayItemResponse": { + "required": [ + "payrollId", + "date", + "amount", + "grossPayItemType", + "jobId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The gross pay item ID", + "format": "int64", + "nullable": true + }, + "employeeId": { + "type": "integer", + "description": "The employee/technician ID", + "format": "int64", + "nullable": true + }, + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "The employee type", + "nullable": true + }, + "businessUnitName": { + "type": "string", + "description": "The business unit name", + "nullable": true + }, + "payrollId": { + "type": "integer", + "description": "The payroll ID", + "format": "int64" + }, + "employeePayrollId": { + "type": "string", + "description": "Employee/Technician payroll ID", + "nullable": true + }, + "date": { + "type": "string", + "description": "The date (UTC) of the gross pay item", + "format": "date-time" + }, + "activity": { + "type": "string", + "description": "The activity", + "nullable": true + }, + "activityCodeId": { + "type": "integer", + "description": "The payroll activity code ID", + "format": "int64", + "nullable": true + }, + "activityCode": { + "type": "string", + "description": "The payroll activity code name", + "nullable": true + }, + "amount": { + "type": "number", + "description": "The amount", + "format": "decimal" + }, + "amountAdjustment": { + "type": "number", + "description": "The amount adjustment", + "format": "decimal", + "nullable": true + }, + "payoutBusinessUnitName": { + "type": "string", + "description": "The payout business unit name", + "nullable": true + }, + "grossPayItemType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.GrossPayItemType" + } + ], + "description": "Type of the gross pay item" + }, + "startedOn": { + "type": "string", + "description": "The start time (UTC)", + "format": "date-time", + "nullable": true + }, + "endedOn": { + "type": "string", + "description": "The end time (UTC)", + "format": "date-time", + "nullable": true + }, + "paidDurationHours": { + "type": "number", + "description": "The paid duration in hours", + "format": "decimal", + "nullable": true + }, + "paidTimeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PaidTimeType" + } + ], + "description": "Type of the paid time", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "The job ID", + "format": "int64" + }, + "jobNumber": { + "type": "string", + "description": "The job number", + "nullable": true + }, + "jobTypeName": { + "type": "string", + "description": "Name of the job type", + "nullable": true + }, + "projectNumber": { + "type": "string", + "description": "The project number", + "nullable": true + }, + "projectId": { + "type": "integer", + "description": "The project ID", + "format": "int64", + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "The invoice ID", + "format": "int64", + "nullable": true + }, + "invoiceNumber": { + "type": "string", + "description": "The invoice number", + "nullable": true + }, + "invoiceItemId": { + "type": "integer", + "description": "The invoice item ID", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "description": "The customer ID", + "format": "int64", + "nullable": true + }, + "customerName": { + "type": "string", + "description": "The customer name", + "nullable": true + }, + "locationId": { + "type": "integer", + "description": "The location ID", + "format": "int64", + "nullable": true + }, + "locationName": { + "type": "string", + "description": "The location name", + "nullable": true + }, + "locationAddress": { + "type": "string", + "description": "The location address", + "nullable": true + }, + "locationZip": { + "type": "string", + "description": "The location zip", + "nullable": true + }, + "zoneName": { + "type": "string", + "description": "The zone name", + "nullable": true + }, + "taxZoneName": { + "type": "string", + "description": "The tax zone name", + "nullable": true + }, + "laborTypeId": { + "type": "integer", + "description": "ID of the labor type", + "format": "int64", + "nullable": true + }, + "laborTypeCode": { + "type": "string", + "description": "Code of the labor type", + "nullable": true + }, + "isPrevailingWageJob": { + "type": "boolean", + "description": "Defines whether it's a prevailing wage job", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.JobSplits.JobSplitResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.JobSplits.JobSplitResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.JobSplits.JobSplitResponse": { + "required": [ + "id", + "jobId", + "technicianId", + "split", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The job split ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "Job ID", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "Technician ID", + "format": "int64" + }, + "split": { + "type": "number", + "description": "The split", + "format": "decimal" + }, + "createdOn": { + "type": "string", + "description": "The job split creation date/time (on UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (on UTC) when the job split was modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "PaginatedResponse_Of_Payroll.V2.LocationLaborTypes.LocationLaborTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.LocationLaborTypes.LocationLaborTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.LocationLaborTypes.LocationLaborTypeResponse": { + "required": [ + "locationId", + "hourlyRate", + "laborTypeName", + "laborTypeCode", + "createdOn", + "active" + ], + "type": "object", + "properties": { + "locationId": { + "type": "integer", + "description": "Location ID", + "format": "int64" + }, + "hourlyRate": { + "type": "number", + "description": "The hourly rate of the location", + "format": "decimal" + }, + "laborTypeName": { + "type": "string", + "description": "The labor type name of the location" + }, + "laborTypeCode": { + "type": "string", + "description": "The labor type code of the location" + }, + "createdOn": { + "type": "string", + "description": "The location rate creation date/time (on UTC)", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Whether the location rate is active" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.PayrollActivityCodes.PayrollActivityCodeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.PayrollActivityCodes.PayrollActivityCodeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.PayrollActivityCodes.PayrollActivityCodeResponse": { + "required": [ + "id", + "name", + "code", + "earningCategory" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the payroll activity code", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the payroll activity code" + }, + "code": { + "type": "string", + "description": "Code of the payroll activity code" + }, + "earningCategory": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PayrollEarningCategory" + } + ], + "description": "Earning category of the payroll activity code" + } + }, + "additionalProperties": false + }, + "Payroll.V2.PayrollAdjustments.PayrollAdjustmentCreateRequest": { + "required": [ + "employeeType", + "employeeId", + "postedOn" + ], + "type": "object", + "properties": { + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "The employee type" + }, + "employeeId": { + "type": "integer", + "description": "ID of the employee", + "format": "int64" + }, + "postedOn": { + "type": "string", + "description": "The posted on date/time (in UTC)", + "format": "date-time" + }, + "amount": { + "type": "number", + "description": "The payroll adjustment amount", + "format": "decimal", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo of the payroll adjustment", + "nullable": true + }, + "activityCodeId": { + "type": "integer", + "description": "ID of the payroll adjustment activity code", + "format": "int64", + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "ID of the payroll adjustment invoice", + "format": "int64", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Hours of the payroll adjustment", + "format": "decimal", + "nullable": true + }, + "rate": { + "type": "number", + "description": "Rate of the payroll adjustment", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.PayrollAdjustments.PayrollAdjustmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.PayrollAdjustments.PayrollAdjustmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.PayrollAdjustments.PayrollAdjustmentResponse": { + "required": [ + "id", + "employeeType", + "employeeId", + "postedOn", + "amount" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the payroll adjustment", + "format": "int64" + }, + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "Employee type of the payroll adjustment" + }, + "employeeId": { + "type": "integer", + "description": "Employee ID of the payroll adjustment", + "format": "int64" + }, + "postedOn": { + "type": "string", + "description": "Posted date/time (UTC) of the payroll adjustment", + "format": "date-time" + }, + "amount": { + "type": "number", + "description": "Amount of the payroll adjustment", + "format": "decimal" + }, + "memo": { + "type": "string", + "description": "Memo of the payroll adjustment", + "nullable": true + }, + "activityCodeId": { + "type": "integer", + "description": "Activity code ID of the payroll adjustment", + "format": "int64", + "nullable": true + }, + "invoiceId": { + "type": "integer", + "description": "ID of the payroll adjustment invoice", + "format": "int64", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Hours of the payroll adjustment", + "format": "decimal", + "nullable": true + }, + "rate": { + "type": "number", + "description": "Rate of the payroll adjustment", + "format": "decimal", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.Payrolls.PayrollResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.Payrolls.PayrollResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.Payrolls.PayrollResponse": { + "required": [ + "id", + "startedOn", + "endedOn", + "employeeId", + "employeeType", + "status", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the payroll", + "format": "int64" + }, + "startedOn": { + "type": "string", + "description": "Started on date (UTC) of the payroll", + "format": "date-time" + }, + "endedOn": { + "type": "string", + "description": "Ended on date (UTC) of the payroll", + "format": "date-time" + }, + "employeeId": { + "type": "integer", + "description": "Employee ID of the payroll", + "format": "int64" + }, + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "Employee type of the payroll" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.PayrollStatus" + } + ], + "description": "Status of the payroll" + }, + "burdenRate": { + "type": "number", + "description": "Burden rate of employee", + "format": "decimal", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (on UTC) when the payroll was modified", + "format": "date-time" + }, + "managerApprovedOn": { + "type": "string", + "description": "Date/time (on UTC) when the payroll was approved", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "Payroll.V2.PayrollStatus": { + "enum": [ + "Pending", + "Expired", + "Approved", + "Paid" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Pending", + "Expired", + "Approved", + "Paid" + ] + }, + "PaginatedResponse_Of_Payroll.V2.TimesheetCodes.TimesheetCodeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodes.TimesheetCodeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.TimesheetCodes.TimesheetCodeResponse": { + "required": [ + "id", + "code", + "type", + "applicableEmployeeType", + "rateInfo", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the timesheet code", + "format": "int64" + }, + "code": { + "type": "string", + "description": "Code of the timesheet code" + }, + "description": { + "type": "string", + "description": "Description of the timesheet code", + "nullable": true + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodeType" + } + ], + "description": "Type of the timesheet code" + }, + "applicableEmployeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodeEmployeeType" + } + ], + "description": "Application employee type of the timesheet code" + }, + "rateInfo": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.TimesheetCodes.TimesheetCodeRateInfoResponse" + } + ], + "description": "Rate info of the timesheet code" + }, + "createdOn": { + "type": "string", + "description": "The date when the timesheet code was created (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "The last date when the timesheet code was modified (in UTC)", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Indicates whether the timesheet code is active or not" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.Timesheets.JobTimesheetResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.Timesheets.JobTimesheetResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.Timesheets.JobTimesheetResponse": { + "required": [ + "id", + "jobId", + "appointmentId", + "technicianId", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The timesheet ID", + "format": "int64" + }, + "jobId": { + "type": "integer", + "description": "The job ID", + "format": "int64" + }, + "appointmentId": { + "type": "integer", + "description": "The appointment ID", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "The technician ID", + "format": "int64" + }, + "dispatchedOn": { + "type": "string", + "description": "the dispatch date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "arrivedOn": { + "type": "string", + "description": "The arrive date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "canceledOn": { + "type": "string", + "description": "The cancel date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "doneOn": { + "type": "string", + "description": "The done date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "The created date/time (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "The modified date/time (in UTC)", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Payroll.V2.Timesheets.NonJobTimesheetResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Payroll.V2.Timesheets.NonJobTimesheetResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Payroll.V2.Timesheets.NonJobTimesheetResponse": { + "required": [ + "id", + "employeeId", + "employeeType", + "timesheetCodeId", + "startedOn", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The timesheet ID", + "format": "int64" + }, + "employeeId": { + "type": "integer", + "description": "The employee/technician ID", + "format": "int64" + }, + "employeeType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Payroll.V2.EmployeeType" + } + ], + "description": "The type of the employee" + }, + "timesheetCodeId": { + "type": "integer", + "description": "The timesheet code ID", + "format": "int64" + }, + "startedOn": { + "type": "string", + "description": "The start time of the timesheet (in UTC)", + "format": "date-time" + }, + "endedOn": { + "type": "string", + "description": "The end time of the timesheet (in UTC)", + "format": "date-time", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "The created date/time (in UTC)", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "The modified date/time (in UTC)", + "format": "date-time" + }, + "active": { + "type": "boolean", + "description": "Indicates whether the timesheet is active or not" + } + }, + "additionalProperties": false + }, + "Payroll.V2.Timesheets.JobTimesheetCreateRequest": { + "required": [ + "appointmentId", + "technicianId", + "dispatchedOn", + "arrivedOn" + ], + "type": "object", + "properties": { + "appointmentId": { + "type": "integer", + "description": "The appointment ID", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "The technician ID", + "format": "int64" + }, + "dispatchedOn": { + "type": "string", + "description": "the dispatch date/time (in UTC)", + "format": "date-time" + }, + "arrivedOn": { + "type": "string", + "description": "The arrive date/time (in UTC)", + "format": "date-time" + }, + "canceledOn": { + "type": "string", + "description": "The cancel date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "doneOn": { + "type": "string", + "description": "The done date/time (in UTC)", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + }, + "Payroll.V2.Timesheets.JobTimesheetUpdateRequest": { + "required": [ + "appointmentId", + "technicianId", + "dispatchedOn", + "arrivedOn" + ], + "type": "object", + "properties": { + "appointmentId": { + "type": "integer", + "description": "The appointment ID", + "format": "int64" + }, + "technicianId": { + "type": "integer", + "description": "The technician ID", + "format": "int64" + }, + "dispatchedOn": { + "type": "string", + "description": "the dispatch date/time (in UTC)", + "format": "date-time" + }, + "arrivedOn": { + "type": "string", + "description": "The arrive date/time (in UTC)", + "format": "date-time" + }, + "canceledOn": { + "type": "string", + "description": "The cancel date/time (in UTC)", + "format": "date-time", + "nullable": true + }, + "doneOn": { + "type": "string", + "description": "The done date/time (in UTC)", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/pricebook-v2.json b/openapi_specs/pricebook-v2.json new file mode 100644 index 0000000..d93ff0d --- /dev/null +++ b/openapi_specs/pricebook-v2.json @@ -0,0 +1,10815 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Pricebook", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/pricebook/v2" + } + ], + "paths": { + "/tenant/{tenant}/clientspecificpricing": { + "get": { + "tags": [ + "ClientSpecificPricing" + ], + "summary": "ClientSpecificPricing_GetAllRateSheets", + "operationId": "ClientSpecificPricing_GetAllRateSheets", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "searchTerm", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Values: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Estimates.V2.ClientSpecificPricingResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "exceptions": [ + { + "skuId": 0, + "skuType": "Service", + "value": 0, + "valueType": "Percent" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/clientspecificpricing/{rateSheetId}": { + "patch": { + "tags": [ + "ClientSpecificPricing" + ], + "summary": "ClientSpecificPricing_UpdateRateSheet", + "operationId": "ClientSpecificPricing_UpdateRateSheet", + "parameters": [ + { + "name": "rateSheetId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.UpdateClientSpecificPricingRequest" + }, + "example": { + "exceptions": [ + { + "skuId": 0, + "value": 0, + "valueType": "Percent" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.UpdateClientSpecificPricingResponse" + }, + "example": { + "exceptions": [ + { + "skuId": 0, + "value": 0, + "valueType": "Percent" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/categories": { + "get": { + "tags": [ + "Categories" + ], + "summary": "GET the categories in your pricebook", + "description": "GET the categories in your pricebook", + "operationId": "Categories_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "categoryType", + "in": "query", + "description": "Category type\\\nValues: [Services, Materials]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.CategoryType" + } + ], + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Pricebook.V2.CategoryResponse" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Categories" + ], + "summary": "Post to add a new category to your pricebook", + "description": "Post to add a new category to your pricebook", + "operationId": "Categories_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryCreateRequest" + }, + "example": { + "name": "string", + "active": true, + "description": "string", + "parentId": 0, + "position": 0, + "image": "string", + "categoryType": {}, + "businessUnitIds": [ + 0 + ], + "skuImages": [ + "string" + ], + "skuVideos": [ + "string" + ] + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryResponse" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/categories/{id}": { + "get": { + "tags": [ + "Categories" + ], + "summary": "Gets category details", + "description": "Gets category details", + "operationId": "Categories_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The id of the service you are requesting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryResponse" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Categories" + ], + "summary": "Edits an existing category in your pricebook", + "description": "Edits an existing category in your pricebook", + "operationId": "Categories_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Unique id for the SKU is modified", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryUpdateRequest" + }, + "example": { + "name": "string", + "active": true, + "description": "string", + "parentId": 0, + "position": 0, + "image": "string", + "categoryType": {}, + "businessUnitIds": [ + 0 + ], + "skuImages": [ + "string" + ], + "skuVideos": [ + "string" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryResponse" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Categories" + ], + "summary": "Deletes an existing category from your pricebook", + "description": "Deletes an existing category from your pricebook", + "operationId": "Categories_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the SKU you are deleting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "The request has succeeded, no content to return" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/discounts-and-fees": { + "get": { + "tags": [ + "DiscountAndFees" + ], + "summary": "Get data on all of the discounts or fees in the pricebook.", + "description": "Get data on all of the discounts or fees in the pricebook.", + "operationId": "DiscountAndFees_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Code, DisplayName, CreatedOn, ModifiedOn, Price, MemberPrice, AddOnPrice, AddOnMemberPrice, MaterialsCost, PrimaryVendor, Cost, Manufacturer, Priority.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Allows filtering by external data key", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Allows filtering by external data values", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Pricebook.V2.DiscountAndFeesResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "account": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "DiscountAndFees" + ], + "summary": "Post to add a new discount or fee to your pricebook", + "description": "Post to add a new discount or fee to your pricebook", + "operationId": "DiscountAndFees_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesCreateRequest" + }, + "example": { + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "account": "string", + "intacctGlGroupAccount": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesResponse" + }, + "example": { + "id": 0, + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "account": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/discounts-and-fees/{id}": { + "get": { + "tags": [ + "DiscountAndFees" + ], + "summary": "Get details if a discount or fees in the pricebook.", + "description": "Get details if a discount or fees in the pricebook.", + "operationId": "DiscountAndFees_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The id of the discount and fee you are requesting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesResponse" + }, + "example": { + "id": 0, + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "account": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "DiscountAndFees" + ], + "summary": "Edit an existing item in your pricebook", + "description": "Edit an existing item in your pricebook", + "operationId": "DiscountAndFees_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Unique id for the SKU is modified", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesUpdateRequest" + }, + "example": { + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "intacctGlGroupAccount": "string", + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "account": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesResponse" + }, + "example": { + "id": 0, + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "account": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "DiscountAndFees" + ], + "summary": "Deletes a discount or fee from your pricebook", + "description": "Deletes a discount or fee from your pricebook", + "operationId": "DiscountAndFees_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the SKU you are deleting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "The request has succeeded, no content to return" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/equipment": { + "get": { + "tags": [ + "Equipment" + ], + "summary": "Get data on all of the equipment in the pricebook.", + "description": "Get data on all of the equipment in the pricebook.", + "operationId": "Equipment_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Code, DisplayName, CreatedOn, ModifiedOn, Price, MemberPrice, AddOnPrice, AddOnMemberPrice, MaterialsCost, PrimaryVendor, Cost, Manufacturer, Priority.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Allows filtering by external data key", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Allows filtering by external data values", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Pricebook.V2.EquipmentResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "recommendations": [ + { + "skuId": 0, + "type": {} + } + ], + "upgrades": [ + 0 + ], + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableEquipment": true, + "variationsOrConfigurableEquipment": [ + 0 + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Equipment" + ], + "summary": "Post to add a new equipment to your pricebook", + "description": "Post to add a new equipment to your pricebook", + "operationId": "Equipment_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentCreateRequest" + }, + "example": { + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "recommendations": [ + { + "skuId": 0, + "type": "Service" + } + ], + "upgrades": [ + 0 + ], + "code": "string", + "displayName": "string", + "description": "string", + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "active": true, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "categories": [ + 0 + ], + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableEquipment": true, + "variationEquipment": [ + 0 + ] + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "recommendations": [ + { + "skuId": 0, + "type": {} + } + ], + "upgrades": [ + 0 + ], + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableEquipment": true, + "variationsOrConfigurableEquipment": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/equipment/{id}": { + "get": { + "tags": [ + "Equipment" + ], + "summary": "Get details a equipment in the pricebook.", + "description": "Get details a equipment in the pricebook.", + "operationId": "Equipment_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The id of the equipment you are requesting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "recommendations": [ + { + "skuId": 0, + "type": {} + } + ], + "upgrades": [ + 0 + ], + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableEquipment": true, + "variationsOrConfigurableEquipment": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Equipment" + ], + "summary": "Edit an existing item in your pricebook", + "description": "Edit an existing item in your pricebook", + "operationId": "Equipment_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Unique id for the SKU is modified", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentUpdateRequest" + }, + "example": { + "code": "string", + "displayName": "string", + "description": "string", + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "active": true, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "recommendations": [ + { + "skuId": 0, + "type": "Service" + } + ], + "upgrades": [ + 0 + ], + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "categories": [ + 0 + ], + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableEquipment": true, + "variationEquipment": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "recommendations": [ + { + "skuId": 0, + "type": {} + } + ], + "upgrades": [ + 0 + ], + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableEquipment": true, + "variationsOrConfigurableEquipment": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Equipment" + ], + "summary": "Deletes an equipment from your pricebook", + "description": "Deletes an equipment from your pricebook", + "operationId": "Equipment_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the SKU you are deleting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "The request has succeeded, no content to return" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/images": { + "get": { + "tags": [ + "Images" + ], + "summary": "Downloads a specified pricebook image.", + "description": "Downloads a specified pricebook image.", + "operationId": "Images_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "path", + "in": "query", + "description": "The storage path of the pricebook image to retrieve, as returned by other pricebook API endpoints.\nThe path is case sensitive and must begin with \"Images/\".", + "schema": { + "type": "string" + } + } + ], + "responses": { + "302": { + "description": "" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Images" + ], + "summary": "Uploads a specified image to temporary storage.\nTo associate the image with a pricebook item, send a separate request to update that item.", + "description": "Uploads a specified image to temporary storage.\nTo associate the image with a pricebook item, send a separate request to update that item.", + "operationId": "Images_Post", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + } + }, + "example": { + "file": "string" + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.ImageUploadResponse" + }, + "example": { + "path": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/materials": { + "get": { + "tags": [ + "Materials" + ], + "summary": "Get details on materials in the pricebook.", + "description": "Get details on materials in the pricebook.", + "operationId": "Materials_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Code, DisplayName, CreatedOn, ModifiedOn, Price, MemberPrice, AddOnPrice, AddOnMemberPrice, MaterialsCost, PrimaryVendor, Cost, Manufacturer, Priority.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Allows filtering by external data key", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Allows filtering by external data values", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Pricebook.V2.MaterialResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "taxable": true, + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationsOrConfigurableMaterials": [ + 0 + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Materials" + ], + "summary": "Add a new Materials to your pricebook", + "description": "Add a new Materials to your pricebook", + "operationId": "Materials_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialCreateRequest" + }, + "example": { + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "taxable": true, + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "categories": [ + 0 + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationMaterials": [ + 0 + ] + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "taxable": true, + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationsOrConfigurableMaterials": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/materials/{id}": { + "get": { + "tags": [ + "Materials" + ], + "summary": "Get details on a material in the pricebook.", + "description": "Get details on a material in the pricebook.", + "operationId": "Materials_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The id of the material you are requesting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "taxable": true, + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationsOrConfigurableMaterials": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Materials" + ], + "summary": "Edit an existing item in your pricebook", + "description": "Edit an existing item in your pricebook", + "operationId": "Materials_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Unique id for the SKU is modified", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialUpdateRequest" + }, + "example": { + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "taxable": true, + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "categories": [ + 0 + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationMaterials": [ + 0 + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "taxable": true, + "primaryVendor": { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "id": 0, + "vendorName": "string", + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "id": 0, + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "id": 0, + "cost": 0, + "accountName": "string" + } + ] + } + ], + "categories": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ], + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationsOrConfigurableMaterials": [ + 0 + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Materials" + ], + "summary": "Deletes a material from your pricebook", + "description": "Deletes a material from your pricebook", + "operationId": "Materials_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the SKU you are deleting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "The request has succeeded, no content to return" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/materialsmarkup": { + "get": { + "tags": [ + "MaterialsMarkup" + ], + "summary": "Get materials markup collection", + "description": "Get materials markup collection", + "operationId": "MaterialsMarkup_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Materials Markup collection", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionResult_Of_Pricebook.V2.MaterialsMarkupResponse" + }, + "example": { + "data": [ + { + "id": 0, + "from": 0, + "to": 0, + "percent": 0 + } + ], + "page": 0, + "pageSize": 0, + "totalCount": 0, + "hasMore": true + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "MaterialsMarkup" + ], + "summary": "Create materials markup item", + "description": "Create materials markup item", + "operationId": "MaterialsMarkup_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Materials markup data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialsMarkupRequest" + }, + "example": { + "id": 0, + "from": 0, + "to": 0, + "percent": 0 + } + } + } + }, + "responses": { + "201": { + "description": "Created materials markup item", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_Of_Pricebook.V2.MaterialsMarkupResponse" + }, + "example": { + "data": { + "id": 0, + "from": 0, + "to": 0, + "percent": 0 + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/materialsmarkup/{id}": { + "get": { + "tags": [ + "MaterialsMarkup" + ], + "summary": "Get materials markup item", + "description": "Get materials markup item", + "operationId": "MaterialsMarkup_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Materials markup id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Materials markup item", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_Of_Pricebook.V2.MaterialsMarkupResponse" + }, + "example": { + "data": { + "id": 0, + "from": 0, + "to": 0, + "percent": 0 + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "put": { + "tags": [ + "MaterialsMarkup" + ], + "summary": "Update materials markup item", + "description": "Update materials markup item", + "operationId": "MaterialsMarkup_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Materials markup id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Materials markup data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialsMarkupRequest" + }, + "example": { + "id": 0, + "from": 0, + "to": 0, + "percent": 0 + } + } + } + }, + "responses": { + "200": { + "description": "Updated materials markup item", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Result_Of_Pricebook.V2.MaterialsMarkupResponse" + }, + "example": { + "data": { + "id": 0, + "from": 0, + "to": 0, + "percent": 0 + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/pricebook": { + "post": { + "tags": [ + "PricebookBulk" + ], + "summary": "PricebookBulk_Create", + "operationId": "PricebookBulk_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.PricebookBulkCreateRequest" + }, + "example": { + "services": [ + { + "serviceMaterials": [ + { + "skuId": 0, + "customId": "string", + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "customId": "string", + "quantity": 0 + } + ], + "recommendations": [ + { + "skuId": 0, + "customId": "string" + } + ], + "upgrades": [ + { + "skuId": 0, + "customId": "string" + } + ], + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "intacctGlGroupAccount": "string", + "hours": 0, + "isLabor": true, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "customId": "string" + } + ], + "equipment": [ + { + "equipmentMaterials": [ + { + "skuId": 0, + "customId": "string", + "quantity": 0 + } + ], + "recommendations": [ + { + "skuId": 0, + "customId": "string", + "type": "Service" + } + ], + "upgrades": [ + { + "skuId": 0, + "customId": "string" + } + ], + "code": "string", + "displayName": "string", + "description": "string", + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "active": true, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "categories": [ + 0 + ], + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableEquipment": true, + "variationEquipment": [ + 0 + ], + "customId": "string" + } + ], + "materials": [ + { + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "taxable": true, + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "categories": [ + 0 + ], + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationMaterials": [ + 0 + ], + "customId": "string" + } + ], + "discountAndFees": [ + { + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "account": "string", + "intacctGlGroupAccount": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "customId": "string" + } + ] + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.PricebookBulkCreateResponse" + }, + "example": { + "services": [ + { + "customId": "string", + "id": 0 + } + ], + "equipment": [ + { + "customId": "string", + "id": 0 + } + ], + "materials": [ + { + "customId": "string", + "id": 0 + } + ], + "discountAndFees": [ + { + "customId": "string", + "id": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "PricebookBulk" + ], + "summary": "PricebookBulk_Update", + "operationId": "PricebookBulk_Update", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.PricebookBulkUpdateRequest" + }, + "example": { + "services": [ + { + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "intacctGlGroupAccount": "string", + "hours": 0, + "isLabor": true, + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "id": 0 + } + ], + "equipment": [ + { + "code": "string", + "displayName": "string", + "description": "string", + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "active": true, + "manufacturer": "string", + "model": "string", + "manufacturerWarranty": { + "duration": 0, + "description": "string" + }, + "serviceProviderWarranty": { + "duration": 0, + "description": "string" + }, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "recommendations": [ + { + "skuId": 0, + "type": "Service" + } + ], + "upgrades": [ + 0 + ], + "equipmentMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "categories": [ + 0 + ], + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "hours": 0, + "taxable": true, + "cost": 0, + "unitOfMeasure": "string", + "isInventory": true, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableEquipment": true, + "variationEquipment": [ + 0 + ], + "id": 0 + } + ], + "materials": [ + { + "code": "string", + "displayName": "string", + "description": "string", + "cost": 0, + "active": true, + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "hours": 0, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "deductAsJobCost": true, + "unitOfMeasure": "string", + "isInventory": true, + "account": "string", + "costOfSaleAccount": "string", + "assetAccount": "string", + "intacctGlGroupAccount": "string", + "taxable": true, + "primaryVendor": { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + }, + "otherVendors": [ + { + "vendorId": 0, + "memo": "string", + "vendorPart": "string", + "cost": 0, + "active": true, + "primarySubAccount": { + "cost": 0, + "accountName": "string" + }, + "otherSubAccounts": [ + { + "cost": 0, + "accountName": "string" + } + ] + } + ], + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "categories": [ + 0 + ], + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "isConfigurableMaterial": true, + "chargeableByDefault": true, + "variationMaterials": [ + 0 + ], + "id": 0 + } + ], + "discountAndFees": [ + { + "type": {}, + "code": "string", + "displayName": "string", + "description": "string", + "amountType": {}, + "amount": 0, + "intacctGlGroupAccount": "string", + "limit": 0, + "taxable": true, + "categories": [ + 0 + ], + "hours": 0, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "account": "string", + "crossSaleGroup": "string", + "active": true, + "bonus": 0, + "commissionBonus": 0, + "paysCommission": true, + "excludeFromPayroll": true, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + }, + "id": 0 + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/services": { + "get": { + "tags": [ + "Services" + ], + "summary": "Get data on all of the services in the pricebook.", + "description": "Get data on all of the services in the pricebook.", + "operationId": "Services_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Code, DisplayName, CreatedOn, ModifiedOn, Price, MemberPrice, AddOnPrice, AddOnMemberPrice, MaterialsCost, PrimaryVendor, Cost, Manufacturer, Priority.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + }, + { + "name": "externalDataKey", + "in": "query", + "description": "Allows filtering by external data key", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "externalDataValues", + "in": "query", + "description": "Allows filtering by external data values", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Pricebook.V2.ServiceResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + { + "id": 0, + "name": "string", + "active": true + } + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "hours": 0, + "isLabor": true, + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Services" + ], + "summary": "Post to add a new service to your pricebook", + "description": "Post to add a new service to your pricebook", + "operationId": "Services_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceCreateRequest" + }, + "example": { + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "intacctGlGroupAccount": "string", + "hours": 0, + "isLabor": true, + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "externalData": { + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "201": { + "description": "The entity has been created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + { + "id": 0, + "name": "string", + "active": true + } + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "hours": 0, + "isLabor": true, + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/services/{id}": { + "get": { + "tags": [ + "Services" + ], + "summary": "Get details a service in the pricebook.", + "description": "Get details a service in the pricebook.", + "operationId": "Services_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. The id of the service you are requesting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + { + "id": 0, + "name": "string", + "active": true + } + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "hours": 0, + "isLabor": true, + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Services" + ], + "summary": "Edit an existing item in your pricebook", + "description": "Edit an existing item in your pricebook", + "operationId": "Services_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Unique id for the SKU is modified", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceUpdateRequest" + }, + "example": { + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + 0 + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "intacctGlGroupAccount": "string", + "hours": 0, + "isLabor": true, + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "assets": [ + { + "type": {}, + "alias": "string", + "url": "string" + } + ], + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceResponse" + }, + "example": { + "id": 0, + "code": "string", + "displayName": "string", + "description": "string", + "warranty": { + "duration": 0, + "description": "string" + }, + "categories": [ + { + "id": 0, + "name": "string", + "active": true + } + ], + "price": 0, + "memberPrice": 0, + "addOnPrice": 0, + "addOnMemberPrice": 0, + "taxable": true, + "account": "string", + "hours": 0, + "isLabor": true, + "recommendations": [ + 0 + ], + "upgrades": [ + 0 + ], + "assets": [ + { + "alias": "string", + "fileName": "string", + "type": {}, + "url": "string" + } + ], + "serviceMaterials": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "serviceEquipment": [ + { + "skuId": 0, + "quantity": 0 + } + ], + "active": true, + "crossSaleGroup": "string", + "paysCommission": true, + "bonus": 0, + "commissionBonus": 0, + "modifiedOn": "string", + "source": "string", + "externalId": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "delete": { + "tags": [ + "Services" + ], + "summary": "Deletes a service from your pricebook", + "description": "Deletes a service from your pricebook", + "operationId": "Services_Delete", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the SKU you are deleting", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "204": { + "description": "The request has succeeded, no content to return" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Estimates.V2.ClientSpecificPricingResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ClientSpecificPricingResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Estimates.V2.ClientSpecificPricingResponse": { + "required": [ + "id", + "exceptions" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "exceptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ClientSpecificPricingExceptionResponse" + } + } + }, + "additionalProperties": false + }, + "Estimates.V2.ClientSpecificPricingExceptionResponse": { + "required": [ + "skuId", + "skuType", + "value", + "valueType" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "format": "int64" + }, + "skuType": { + "$ref": "#/components/schemas/Pricebook.SkuType" + }, + "value": { + "type": "number", + "format": "decimal" + }, + "valueType": { + "$ref": "#/components/schemas/Pricing.RateSheets.Services.MarkupType" + } + }, + "additionalProperties": false + }, + "Pricebook.SkuType": { + "enum": [ + "Service", + "Material", + "Equipment", + "PriceModifier" + ], + "type": "string", + "description": "The type of ISku entity", + "x-enumNames": [ + "Service", + "Material", + "Equipment", + "PriceModifier" + ] + }, + "Pricing.RateSheets.Services.MarkupType": { + "enum": [ + "Percent", + "Dollar", + "Multiplier", + "FlatPrice", + "DiscountPercent" + ], + "type": "string", + "description": "Equipment and Material markup type for rateSheets", + "x-enumNames": [ + "Percent", + "Dollar", + "Multiplier", + "FlatPrice", + "DiscountPercent" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Estimates.V2.UpdateClientSpecificPricingResponse": { + "required": [ + "exceptions" + ], + "type": "object", + "properties": { + "exceptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.UpdateClientSpecificPricingExceptionResponse" + } + } + }, + "additionalProperties": false + }, + "Estimates.V2.UpdateClientSpecificPricingExceptionResponse": { + "required": [ + "skuId", + "value", + "valueType" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "number", + "format": "decimal" + }, + "valueType": { + "$ref": "#/components/schemas/Pricing.RateSheets.Services.MarkupType" + } + }, + "additionalProperties": false + }, + "Estimates.V2.UpdateClientSpecificPricingRequest": { + "type": "object", + "properties": { + "exceptions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ClientSpecificPricingExceptionRequest" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Estimates.V2.ClientSpecificPricingExceptionRequest": { + "required": [ + "skuId", + "value", + "valueType" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "number", + "format": "decimal" + }, + "valueType": { + "$ref": "#/components/schemas/Pricing.RateSheets.Services.MarkupType" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Pricebook.V2.CategoryResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Pricebook.V2.CategoryResponse": { + "required": [ + "id", + "name", + "active", + "position", + "categoryType" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The id for the category", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the category" + }, + "active": { + "type": "boolean", + "description": "Active shows if this category is currently active" + }, + "description": { + "type": "string", + "description": "A description that described the category", + "nullable": true + }, + "image": { + "type": "string", + "description": "The image to display as the category", + "nullable": true + }, + "parentId": { + "type": "integer", + "description": "The id of the category that is the parent of this item", + "format": "int64", + "nullable": true + }, + "position": { + "type": "integer", + "description": "The position location of this item", + "format": "int32" + }, + "categoryType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.CategoryType" + } + ], + "description": "The category type. This field can be Service or Material." + }, + "subcategories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.CategoryResponse" + }, + "description": "The array of the subcategories", + "nullable": true + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The business units that are associated with this category", + "nullable": true + }, + "skuImages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The images that will be used for the SKUs under this category", + "nullable": true + }, + "skuVideos": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The videos that will be used for the videos under this category", + "nullable": true + }, + "source": { + "type": "string", + "description": "The source of the category if it was imported from a catalog", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External id is the id of the original source of the item when it comes from a catalog", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.CategoryType": { + "enum": [ + "Services", + "Materials" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Services", + "Materials" + ] + }, + "Pricebook.V2.CategoryCreateRequest": { + "required": [ + "name", + "categoryType" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the category" + }, + "active": { + "type": "boolean", + "description": "Active shows if this category is currently active", + "nullable": true + }, + "description": { + "type": "string", + "description": "A description that described the category", + "nullable": true + }, + "parentId": { + "type": "integer", + "description": "The id of the category that is the parent of this item", + "format": "int64", + "nullable": true + }, + "position": { + "type": "integer", + "description": "The position location of this item", + "format": "int32", + "nullable": true + }, + "image": { + "type": "string", + "description": "The image to display as the category", + "nullable": true + }, + "categoryType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.CategoryType" + } + ], + "description": "The category type. This field can be Service or Material." + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The business units that are associated with this category", + "nullable": true + }, + "skuImages": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The images that will be used for the SKUs under this category", + "nullable": true + }, + "skuVideos": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The videos that will be used for the videos under this category", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.CategoryUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the category" + }, + "active": { + "type": "boolean", + "description": "Active shows if this category is currently active" + }, + "description": { + "type": "string", + "description": "A description that described the category" + }, + "parentId": { + "type": "integer", + "description": "The id of the category that is the parent of this item", + "format": "int64", + "nullable": true + }, + "position": { + "type": "integer", + "description": "The position location of this item", + "format": "int32" + }, + "image": { + "type": "string", + "description": "The image to display as the category" + }, + "categoryType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.CategoryType" + } + ], + "description": "The category type. This field can be Service or Material." + }, + "businessUnitIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The business units that are associated with this category" + }, + "skuImages": { + "type": "array", + "items": { + "type": "string", + "nullable": true + }, + "description": "The images that will be used for the SKUs under this category" + }, + "skuVideos": { + "type": "array", + "items": { + "type": "string", + "nullable": true + }, + "description": "The videos that will be used for the videos under this category" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Pricebook.V2.DiscountAndFeesResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Pricebook.V2.DiscountAndFeesResponse": { + "required": [ + "id", + "type", + "code", + "description", + "amountType", + "amount", + "limit", + "taxable", + "hours", + "active", + "bonus", + "commissionBonus", + "paysCommission", + "excludeFromPayroll" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the discount or fee", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierType" + } + ], + "description": "Type should be entered as Discount or Fee to show the type" + }, + "code": { + "type": "string", + "description": "Code used for the discount or fee" + }, + "displayName": { + "type": "string", + "description": "Name for the discount of fee", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description for the item", + "format": "html" + }, + "amountType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierAmountType" + } + ], + "description": "The amount type takes either \"percentage\" or \"flat \" and apply the \"amount\" field accordingly" + }, + "amount": { + "type": "number", + "description": "Amount is either the flat amount or percentage you want discounted/added", + "format": "decimal" + }, + "limit": { + "type": "number", + "description": "The maximum amount that can be applied for this item", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Should tax be applied when the item is added on an estimate or invoice" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The category technicians will use to find the item", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the SKU", + "format": "decimal" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetResponse" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if this item is currently active" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this item", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this item", + "format": "decimal" + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "excludeFromPayroll": { + "type": "boolean", + "description": "Exclude from payroll" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job,\nthat corresponds to the application guid provided in the request.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.PriceModifierType": { + "enum": [ + "Discount", + "Fee" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Discount", + "Fee" + ] + }, + "Pricebook.V2.PriceModifierAmountType": { + "enum": [ + "Percentage", + "Fixed" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Percentage", + "Fixed" + ] + }, + "Pricebook.V2.SkuAssetResponse": { + "required": [ + "type", + "url" + ], + "type": "object", + "properties": { + "alias": { + "type": "string", + "description": "Asset alias", + "nullable": true + }, + "fileName": { + "type": "string", + "description": "Asset file name when downloaded", + "nullable": true + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetType" + } + ], + "description": "Asset type - image, video or PDF" + }, + "url": { + "type": "string", + "description": "Asset URL" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuAssetType": { + "enum": [ + "Other", + "Image", + "Video", + "Attachment", + "VideoFile" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Other", + "Image", + "Video", + "Attachment", + "VideoFile" + ] + }, + "Pricebook.V2.ExternalDataModel": { + "required": [ + "key", + "value" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value." + } + }, + "additionalProperties": false + }, + "Pricebook.V2.DiscountAndFeesCreateRequest": { + "required": [ + "type", + "code", + "description", + "amountType", + "amount" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierType" + } + ], + "description": "Type should be entered as Discount or Fee to show the type" + }, + "code": { + "type": "string", + "description": "Code used for the discount or fee" + }, + "displayName": { + "type": "string", + "description": "Name for the discount of fee", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description for the item", + "format": "html" + }, + "amountType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierAmountType" + } + ], + "description": "The amount type takes either \"percentage\" or \"flat \" and apply the \"amount\" field accordingly" + }, + "amount": { + "type": "number", + "description": "Amount is either the flat amount or percentage you want discounted/added", + "format": "decimal" + }, + "limit": { + "type": "number", + "description": "The maximum amount that can be applied for this item", + "format": "decimal", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Should tax be applied when the item is added on an estimate or invoice", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The category technicians will use to find the item", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the SKU", + "format": "decimal", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if this item is currently active", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this item", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this item", + "format": "decimal", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if for this item commission payed", + "nullable": true + }, + "excludeFromPayroll": { + "type": "boolean", + "description": "Exclude from payroll", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuAssetRequest": { + "required": [ + "type", + "url" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetType" + } + ], + "description": "Attached asset type - Image, Video, PDF" + }, + "alias": { + "type": "string", + "description": "Asset file name. Useful when downloading PDFs", + "nullable": true + }, + "url": { + "type": "string", + "description": "Asset URL to download from" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ExternalDataCreateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Pricebook.V2.DiscountAndFeesUpdateRequest": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierType" + } + ], + "description": "Type should be entered as Discount or Fee to show the type" + }, + "code": { + "type": "string", + "description": "Code used for the discount or fee" + }, + "displayName": { + "type": "string", + "description": "Name for the discount of fee" + }, + "description": { + "type": "string", + "description": "Description for the item", + "format": "html" + }, + "amountType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierAmountType" + } + ], + "description": "The amount type takes either \"percentage\" or \"flat \" and apply the \"amount\" field accordingly" + }, + "amount": { + "type": "number", + "description": "Amount is either the flat amount or percentage you want discounted/added", + "format": "decimal" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "limit": { + "type": "number", + "description": "The maximum amount that can be applied for this item", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Should tax be applied when the item is added on an estimate or invoice" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The category technicians will use to find the item" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the SKU", + "format": "decimal" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU" + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board." + }, + "active": { + "type": "boolean", + "description": "Active shows if this item is currently active" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this item", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this item", + "format": "decimal" + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if for this item commission payed" + }, + "excludeFromPayroll": { + "type": "boolean", + "description": "Exclude from payroll" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ExternalDataUpdateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "patchMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataPatchMode" + } + ], + "description": "External data patch mode.\\\n\"Replace\" (default) replaces all existing keys with new values. If job A has custom data with keys X and Y and this field only contains an item\nwith a key X, then custom data with a key Y on job A will be removed.\\\n\"Merge\" will only replace key X in the example above. Keys with null value will be deleted.", + "nullable": true + }, + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ExternalDataPatchMode": { + "enum": [ + "Replace", + "Merge" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Replace", + "Merge" + ] + }, + "Pricebook.V2.ExternalDataUpdateModel": { + "required": [ + "key" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value.", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Pricebook.V2.EquipmentResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Pricebook.V2.EquipmentResponse": { + "required": [ + "id", + "code", + "description", + "active", + "price", + "memberPrice", + "addOnPrice", + "addOnMemberPrice", + "manufacturerWarranty", + "serviceProviderWarranty", + "categories", + "assets", + "recommendations", + "upgrades", + "equipmentMaterials", + "paysCommission", + "bonus", + "commissionBonus", + "hours", + "taxable", + "cost", + "isInventory", + "modifiedOn", + "isConfigurableEquipment" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the SKU", + "format": "int64" + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "manufacturer": { + "type": "string", + "description": "Name of the manufactures", + "nullable": true + }, + "model": { + "type": "string", + "description": "The model of the equipment", + "nullable": true + }, + "manufacturerWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyResponse" + } + ], + "description": "Description of the manufacturer warranty included in this SKU" + }, + "serviceProviderWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyResponse" + } + ], + "description": "Description of the manufacturer warranty included in this SKU" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetResponse" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationResponse" + }, + "description": "Recommended services and materials to include with this SKU" + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU" + }, + "equipmentMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkResponse" + }, + "description": "Array of materials used with this equipment" + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorResponse" + } + ], + "description": "The primary vendor you use to acquire this SKU", + "nullable": true + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorResponse" + }, + "description": "Other vendors that you might go to acquire this SKU", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU", + "nullable": true + }, + "costOfSaleAccount": { + "type": "string", + "nullable": true + }, + "assetAccount": { + "type": "string", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the equipment", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal" + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU", + "nullable": true + }, + "isInventory": { + "type": "boolean", + "description": "Is this equipment a part of your inventory" + }, + "modifiedOn": { + "type": "string", + "description": "Timestamp where the item was last modified", + "format": "date-time" + }, + "source": { + "type": "string", + "description": "The source catalog for this SKU.", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External id is the id of the original source of the item when it comes from a catalog", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job,\nthat corresponds to the application guid provided in the request.", + "nullable": true + }, + "isConfigurableEquipment": { + "type": "boolean", + "description": "Shows if is a Configurable Equipment" + }, + "variationsOrConfigurableEquipment": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of added Variations if is a Configurable Equipment, or else the List of Configurable Equipment assigned to", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuWarrantyResponse": { + "required": [ + "duration" + ], + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Warranty duration", + "format": "int32" + }, + "description": { + "type": "string", + "description": "Description of the warranty included in this SKU", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentRecommendationResponse": { + "required": [ + "skuId", + "type" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "SKU unique identifier", + "format": "int64" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationType" + } + ], + "description": "Recommended SKU type (Service or Material)" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentRecommendationType": { + "enum": [ + "Service", + "Material" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Service", + "Material" + ] + }, + "Pricebook.V2.SkuLinkResponse": { + "required": [ + "skuId", + "quantity" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU unique id", + "format": "int64" + }, + "quantity": { + "type": "number", + "description": "Quantity of linked SKUs", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuVendorResponse": { + "required": [ + "id", + "vendorName", + "vendorId", + "cost", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "vendorName": { + "type": "string" + }, + "vendorId": { + "type": "integer", + "format": "int64" + }, + "memo": { + "type": "string", + "nullable": true + }, + "vendorPart": { + "type": "string", + "nullable": true + }, + "cost": { + "type": "number", + "format": "decimal" + }, + "active": { + "type": "boolean" + }, + "primarySubAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorSubAccountResponse" + } + ], + "nullable": true + }, + "otherSubAccounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorSubAccountResponse" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuVendorSubAccountResponse": { + "required": [ + "id", + "cost", + "accountName" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "cost": { + "type": "number", + "format": "decimal" + }, + "accountName": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentCreateRequest": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "equipmentMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of materials used with this equipment", + "nullable": true + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationRequest" + }, + "description": "Recommended services and materials to include with this SKU", + "nullable": true + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU", + "nullable": true + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal", + "nullable": true + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal", + "nullable": true + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal", + "nullable": true + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive", + "nullable": true + }, + "manufacturer": { + "type": "string", + "description": "Name of the manufactures", + "nullable": true + }, + "model": { + "type": "string", + "description": "The model of the equipment", + "nullable": true + }, + "manufacturerWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU", + "nullable": true + }, + "serviceProviderWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to", + "nullable": true + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU", + "nullable": true + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "costOfSaleAccount": { + "type": "string", + "nullable": true + }, + "assetAccount": { + "type": "string", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the equipment", + "format": "decimal", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal", + "nullable": true + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU", + "nullable": true + }, + "isInventory": { + "type": "boolean", + "description": "Is this equipment a part of your inventory", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + }, + "isConfigurableEquipment": { + "type": "boolean", + "description": "Is this a Configurable Equipment", + "nullable": true + }, + "variationEquipment": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Variations to add", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuLinkRequest": { + "required": [ + "skuId", + "quantity" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU unique Id", + "format": "int64" + }, + "quantity": { + "type": "number", + "description": "Linked SKUs quantity", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentRecommendationRequest": { + "required": [ + "skuId", + "type" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "format": "int64" + }, + "type": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationType" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuWarrantyRequest": { + "required": [ + "duration" + ], + "type": "object", + "properties": { + "duration": { + "type": "integer", + "description": "Warranty duration", + "format": "int32" + }, + "description": { + "type": "string", + "description": "Description of the warranty included in this SKU", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuVendorRequest": { + "required": [ + "vendorId", + "cost", + "active" + ], + "type": "object", + "properties": { + "vendorId": { + "type": "integer", + "format": "int64" + }, + "memo": { + "type": "string", + "nullable": true + }, + "vendorPart": { + "type": "string", + "nullable": true + }, + "cost": { + "type": "number", + "format": "decimal" + }, + "active": { + "type": "boolean" + }, + "primarySubAccount": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorSubAccountRequest" + } + ], + "nullable": true + }, + "otherSubAccounts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorSubAccountRequest" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuVendorSubAccountRequest": { + "required": [ + "cost", + "accountName" + ], + "type": "object", + "properties": { + "cost": { + "type": "number", + "format": "decimal" + }, + "accountName": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentUpdateRequest": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU" + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "manufacturer": { + "type": "string", + "description": "Name of the manufactures" + }, + "model": { + "type": "string", + "description": "The model of the equipment" + }, + "manufacturerWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU" + }, + "serviceProviderWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationRequest" + }, + "description": "Recommended services and materials to include with this SKU" + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU" + }, + "equipmentMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of materials used with this equipment" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU" + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU" + }, + "costOfSaleAccount": { + "type": "string" + }, + "assetAccount": { + "type": "string" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board." + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the equipment", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal" + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU" + }, + "isInventory": { + "type": "boolean", + "description": "Is this equipment a part of your inventory" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + }, + "isConfigurableEquipment": { + "type": "boolean", + "description": "Is this a Configurable Equipment" + }, + "variationEquipment": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Added Variations" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ImageUploadResponse": { + "required": [ + "path" + ], + "type": "object", + "properties": { + "path": { + "type": "string", + "description": "The storage path where the image was uploaded" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Pricebook.V2.MaterialResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Pricebook.V2.MaterialResponse": { + "required": [ + "id", + "code", + "description", + "cost", + "active", + "price", + "memberPrice", + "addOnPrice", + "addOnMemberPrice", + "hours", + "bonus", + "commissionBonus", + "paysCommission", + "deductAsJobCost", + "isInventory", + "categories", + "assets", + "modifiedOn", + "isConfigurableMaterial", + "chargeableByDefault" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the SKU", + "format": "int64" + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the material", + "format": "decimal" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "deductAsJobCost": { + "type": "boolean", + "description": "Is this deducted as job cost" + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU", + "nullable": true + }, + "isInventory": { + "type": "boolean", + "description": "Is this material a part of your inventory" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU", + "nullable": true + }, + "costOfSaleAccount": { + "type": "string", + "nullable": true + }, + "assetAccount": { + "type": "string", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorResponse" + } + ], + "description": "The primary vendor you use to acquire this SKU", + "nullable": true + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorResponse" + }, + "description": "Other vendors that you might go to acquire this SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetResponse" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "modifiedOn": { + "type": "string", + "description": "Timestamp where the item was last modified", + "format": "date-time" + }, + "source": { + "type": "string", + "description": "The source catalog for this SKU.", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External id is the id of the original source of the item when it comes from a catalog", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job,\nthat corresponds to the application guid provided in the request.", + "nullable": true + }, + "isConfigurableMaterial": { + "type": "boolean", + "description": "Shows if is a Configurable Material" + }, + "chargeableByDefault": { + "type": "boolean", + "description": "Shows if material is going to be chargeable by default on Estimate or Invoice" + }, + "variationsOrConfigurableMaterials": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "List of added Variations if is a Configurable Material, or else the List of Configurable Materials assigned to", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.MaterialCreateRequest": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive", + "nullable": true + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal", + "nullable": true + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal", + "nullable": true + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal", + "nullable": true + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the material", + "format": "decimal", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission", + "nullable": true + }, + "deductAsJobCost": { + "type": "boolean", + "description": "Is this deducted as job cost", + "nullable": true + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU", + "nullable": true + }, + "isInventory": { + "type": "boolean", + "description": "Is this material a part of your inventory", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "costOfSaleAccount": { + "type": "string", + "nullable": true + }, + "assetAccount": { + "type": "string", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU", + "nullable": true + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + }, + "isConfigurableMaterial": { + "type": "boolean", + "description": "Is this a Configurable Material", + "nullable": true + }, + "chargeableByDefault": { + "type": "boolean", + "description": "Is this Chargeable by default", + "nullable": true + }, + "variationMaterials": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Variations to add", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.MaterialUpdateRequest": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU" + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the material", + "format": "decimal" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "deductAsJobCost": { + "type": "boolean", + "description": "Is this deducted as job cost" + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU" + }, + "isInventory": { + "type": "boolean", + "description": "Is this material a part of your inventory" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU" + }, + "costOfSaleAccount": { + "type": "string" + }, + "assetAccount": { + "type": "string" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU" + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + }, + "isConfigurableMaterial": { + "type": "boolean", + "description": "Is this a Configurable Material" + }, + "chargeableByDefault": { + "type": "boolean", + "description": "Is this Chargeable by default" + }, + "variationMaterials": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Added Variations" + } + }, + "additionalProperties": false + }, + "CollectionResult_Of_Pricebook.V2.MaterialsMarkupResponse": { + "required": [ + "data", + "page", + "pageSize", + "totalCount", + "hasMore" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialsMarkupResponse" + } + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "format": "int32" + }, + "hasMore": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.MaterialsMarkupResponse": { + "required": [ + "id", + "from", + "to", + "percent" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "from": { + "type": "number", + "format": "decimal" + }, + "to": { + "type": "number", + "format": "decimal" + }, + "percent": { + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Result_Of_Pricebook.V2.MaterialsMarkupResponse": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialsMarkupResponse" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.MaterialsMarkupRequest": { + "required": [ + "id", + "from", + "to", + "percent" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "from": { + "maximum": 2147483647, + "minimum": 0, + "type": "number", + "format": "decimal" + }, + "to": { + "maximum": 2147483647, + "minimum": 0, + "type": "number", + "format": "decimal" + }, + "percent": { + "maximum": 100, + "minimum": 0, + "type": "number", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.PricebookBulkCreateResponse": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.CustomIdMappingModel" + }, + "nullable": true + }, + "equipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.CustomIdMappingModel" + }, + "nullable": true + }, + "materials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.CustomIdMappingModel" + }, + "nullable": true + }, + "discountAndFees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.CustomIdMappingModel" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.CustomIdMappingModel": { + "required": [ + "customId", + "id" + ], + "type": "object", + "properties": { + "customId": { + "type": "string" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.PricebookBulkCreateRequest": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceBulkCreateRequest" + }, + "nullable": true + }, + "equipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentBulkCreateRequest" + }, + "nullable": true + }, + "materials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialBulkCreateRequest" + }, + "nullable": true + }, + "discountAndFees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesBulkCreateRequest" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ServiceBulkCreateRequest": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "serviceMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkBulkCreateRequest" + }, + "description": "Array of materials linked to the service", + "nullable": true + }, + "serviceEquipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkBulkCreateRequest" + }, + "description": "Array of equipment linked to the service", + "nullable": true + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceRecommendationBulkCreateRequest" + }, + "description": "Recommended services and materials to include with this SKU", + "nullable": true + }, + "upgrades": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuUpgradeBulkCreateRequest" + }, + "description": "Upgrades that can be sold for this SKU", + "nullable": true + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "warranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the warranty included in this SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to", + "nullable": true + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal", + "nullable": true + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal", + "nullable": true + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal", + "nullable": true + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Hours needed to complete this service", + "format": "decimal", + "nullable": true + }, + "isLabor": { + "type": "boolean", + "description": "Is a labor service", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "True if this task pays commission", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + }, + "customId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuLinkBulkCreateRequest": { + "required": [ + "quantity" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU unique Id", + "format": "int64", + "nullable": true + }, + "customId": { + "type": "string", + "description": "Linked SKU custom Id", + "nullable": true + }, + "quantity": { + "type": "number", + "description": "Linked SKUs quantity", + "format": "decimal" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ServiceRecommendationBulkCreateRequest": { + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU unique Id", + "format": "int64", + "nullable": true + }, + "customId": { + "type": "string", + "description": "Linked SKU custom Id", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuUpgradeBulkCreateRequest": { + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU unique Id", + "format": "int64", + "nullable": true + }, + "customId": { + "type": "string", + "description": "Linked SKU custom Id", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentBulkCreateRequest": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "equipmentMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkBulkCreateRequest" + }, + "description": "Array of materials used with this equipment", + "nullable": true + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationBulkCreateRequest" + }, + "description": "Recommended services and materials to include with this SKU", + "nullable": true + }, + "upgrades": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuUpgradeBulkCreateRequest" + }, + "description": "Upgrades that can be sold for this SKU", + "nullable": true + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal", + "nullable": true + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal", + "nullable": true + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal", + "nullable": true + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive", + "nullable": true + }, + "manufacturer": { + "type": "string", + "description": "Name of the manufactures", + "nullable": true + }, + "model": { + "type": "string", + "description": "The model of the equipment", + "nullable": true + }, + "manufacturerWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU", + "nullable": true + }, + "serviceProviderWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to", + "nullable": true + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU", + "nullable": true + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "costOfSaleAccount": { + "type": "string", + "nullable": true + }, + "assetAccount": { + "type": "string", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the equipment", + "format": "decimal", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal", + "nullable": true + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU", + "nullable": true + }, + "isInventory": { + "type": "boolean", + "description": "Is this equipment a part of your inventory", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + }, + "isConfigurableEquipment": { + "type": "boolean", + "description": "Is this a Configurable Equipment", + "nullable": true + }, + "variationEquipment": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Variations to add", + "nullable": true + }, + "customId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentRecommendationBulkCreateRequest": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "skuId": { + "type": "integer", + "description": "Linked SKU unique Id", + "format": "int64", + "nullable": true + }, + "customId": { + "type": "string", + "description": "Linked SKU custom Id", + "nullable": true + }, + "type": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationType" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.MaterialBulkCreateRequest": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive", + "nullable": true + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal", + "nullable": true + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal", + "nullable": true + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal", + "nullable": true + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the material", + "format": "decimal", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission", + "nullable": true + }, + "deductAsJobCost": { + "type": "boolean", + "description": "Is this deducted as job cost", + "nullable": true + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU", + "nullable": true + }, + "isInventory": { + "type": "boolean", + "description": "Is this material a part of your inventory", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "costOfSaleAccount": { + "type": "string", + "nullable": true + }, + "assetAccount": { + "type": "string", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU", + "nullable": true + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + }, + "isConfigurableMaterial": { + "type": "boolean", + "description": "Is this a Configurable Material", + "nullable": true + }, + "chargeableByDefault": { + "type": "boolean", + "description": "Is this Chargeable by default", + "nullable": true + }, + "variationMaterials": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Variations to add", + "nullable": true + }, + "customId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.DiscountAndFeesBulkCreateRequest": { + "required": [ + "type", + "code", + "description", + "amountType", + "amount" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierType" + } + ], + "description": "Type should be entered as Discount or Fee to show the type" + }, + "code": { + "type": "string", + "description": "Code used for the discount or fee" + }, + "displayName": { + "type": "string", + "description": "Name for the discount of fee", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description for the item", + "format": "html" + }, + "amountType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierAmountType" + } + ], + "description": "The amount type takes either \"percentage\" or \"flat \" and apply the \"amount\" field accordingly" + }, + "amount": { + "type": "number", + "description": "Amount is either the flat amount or percentage you want discounted/added", + "format": "decimal" + }, + "limit": { + "type": "number", + "description": "The maximum amount that can be applied for this item", + "format": "decimal", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Should tax be applied when the item is added on an estimate or invoice", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The category technicians will use to find the item", + "nullable": true + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the SKU", + "format": "decimal", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if this item is currently active", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this item", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this item", + "format": "decimal", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if for this item commission payed", + "nullable": true + }, + "excludeFromPayroll": { + "type": "boolean", + "description": "Exclude from payroll", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + }, + "customId": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.PricebookBulkUpdateRequest": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceBulkUpdateRequest" + }, + "nullable": true + }, + "equipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentBulkUpdateRequest" + }, + "nullable": true + }, + "materials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.MaterialBulkUpdateRequest" + }, + "nullable": true + }, + "discountAndFees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.DiscountAndFeesBulkUpdateRequest" + }, + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ServiceBulkUpdateRequest": { + "required": [ + "code", + "displayName", + "description", + "warranty", + "categories", + "price", + "memberPrice", + "addOnPrice", + "addOnMemberPrice", + "taxable", + "account", + "intacctGlGroupAccount", + "hours", + "isLabor", + "recommendations", + "upgrades", + "assets", + "serviceMaterials", + "serviceEquipment", + "active", + "crossSaleGroup", + "paysCommission", + "bonus", + "commissionBonus", + "id" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU" + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "warranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the warranty included in this SKU" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "hours": { + "type": "number", + "description": "Hours needed to complete this service", + "format": "decimal" + }, + "isLabor": { + "type": "boolean", + "description": "Is a labor service" + }, + "recommendations": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Recommended other services to include with this SKU" + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "serviceMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of materials linked to the service" + }, + "serviceEquipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of equipment linked to the service" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board." + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.EquipmentBulkUpdateRequest": { + "required": [ + "code", + "displayName", + "description", + "price", + "memberPrice", + "addOnPrice", + "addOnMemberPrice", + "active", + "manufacturer", + "model", + "manufacturerWarranty", + "serviceProviderWarranty", + "assets", + "recommendations", + "upgrades", + "equipmentMaterials", + "categories", + "primaryVendor", + "otherVendors", + "account", + "costOfSaleAccount", + "assetAccount", + "intacctGlGroupAccount", + "crossSaleGroup", + "paysCommission", + "bonus", + "commissionBonus", + "hours", + "taxable", + "cost", + "unitOfMeasure", + "isInventory", + "isConfigurableEquipment", + "variationEquipment", + "id" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU" + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "manufacturer": { + "type": "string", + "description": "Name of the manufactures" + }, + "model": { + "type": "string", + "description": "The model of the equipment" + }, + "manufacturerWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU" + }, + "serviceProviderWarranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the manufacturer warranty included in this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "recommendations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.EquipmentRecommendationRequest" + }, + "description": "Recommended services and materials to include with this SKU" + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU" + }, + "equipmentMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of materials used with this equipment" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU" + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU" + }, + "costOfSaleAccount": { + "type": "string" + }, + "assetAccount": { + "type": "string" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board." + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the equipment", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal" + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU" + }, + "isInventory": { + "type": "boolean", + "description": "Is this equipment a part of your inventory" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + }, + "isConfigurableEquipment": { + "type": "boolean", + "description": "Is this a Configurable Equipment" + }, + "variationEquipment": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Added Variations" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.MaterialBulkUpdateRequest": { + "required": [ + "code", + "displayName", + "description", + "cost", + "active", + "price", + "memberPrice", + "addOnPrice", + "addOnMemberPrice", + "hours", + "bonus", + "commissionBonus", + "paysCommission", + "deductAsJobCost", + "unitOfMeasure", + "isInventory", + "account", + "costOfSaleAccount", + "assetAccount", + "intacctGlGroupAccount", + "taxable", + "primaryVendor", + "otherVendors", + "assets", + "categories", + "isConfigurableMaterial", + "chargeableByDefault", + "variationMaterials", + "id" + ], + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU" + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "cost": { + "type": "number", + "description": "The cost paid to acquire the material", + "format": "decimal" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the installing the material", + "format": "decimal" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "deductAsJobCost": { + "type": "boolean", + "description": "Is this deducted as job cost" + }, + "unitOfMeasure": { + "type": "string", + "description": "The unit of measure used for this SKU" + }, + "isInventory": { + "type": "boolean", + "description": "Is this material a part of your inventory" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU" + }, + "costOfSaleAccount": { + "type": "string" + }, + "assetAccount": { + "type": "string" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "primaryVendor": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + } + ], + "description": "The primary vendor you use to acquire this SKU" + }, + "otherVendors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuVendorRequest" + }, + "description": "Other vendors that you might go to acquire this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + }, + "isConfigurableMaterial": { + "type": "boolean", + "description": "Is this a Configurable Material" + }, + "chargeableByDefault": { + "type": "boolean", + "description": "Is this Chargeable by default" + }, + "variationMaterials": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Added Variations" + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.DiscountAndFeesBulkUpdateRequest": { + "required": [ + "type", + "code", + "displayName", + "description", + "amountType", + "amount", + "intacctGlGroupAccount", + "limit", + "taxable", + "categories", + "hours", + "assets", + "account", + "crossSaleGroup", + "active", + "bonus", + "commissionBonus", + "paysCommission", + "excludeFromPayroll", + "id" + ], + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierType" + } + ], + "description": "Type should be entered as Discount or Fee to show the type" + }, + "code": { + "type": "string", + "description": "Code used for the discount or fee" + }, + "displayName": { + "type": "string", + "description": "Name for the discount of fee" + }, + "description": { + "type": "string", + "description": "Description for the item", + "format": "html" + }, + "amountType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.PriceModifierAmountType" + } + ], + "description": "The amount type takes either \"percentage\" or \"flat \" and apply the \"amount\" field accordingly" + }, + "amount": { + "type": "number", + "description": "Amount is either the flat amount or percentage you want discounted/added", + "format": "decimal" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "limit": { + "type": "number", + "description": "The maximum amount that can be applied for this item", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Should tax be applied when the item is added on an estimate or invoice" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "The category technicians will use to find the item" + }, + "hours": { + "type": "number", + "description": "The number of hours associated with the SKU", + "format": "decimal" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to the SKU" + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board." + }, + "active": { + "type": "boolean", + "description": "Active shows if this item is currently active" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this item", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this item", + "format": "decimal" + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if for this item commission payed" + }, + "excludeFromPayroll": { + "type": "boolean", + "description": "Exclude from payroll" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Pricebook.V2.ServiceResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ServiceResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Pricebook.V2.ServiceResponse": { + "required": [ + "id", + "code", + "description", + "categories", + "price", + "memberPrice", + "addOnPrice", + "addOnMemberPrice", + "taxable", + "hours", + "recommendations", + "upgrades", + "assets", + "serviceMaterials", + "serviceEquipment", + "active", + "paysCommission", + "bonus", + "commissionBonus", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique id for the SKU", + "format": "int64" + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "warranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyResponse" + } + ], + "description": "Description of the warranty included in this SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuCategoryResponse" + }, + "description": "Categories that this SKU belongs to" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Hours needed to complete this service", + "format": "decimal" + }, + "isLabor": { + "type": "boolean", + "description": "Is a labor service", + "nullable": true + }, + "recommendations": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Recommended other service or materials to include with this SKU" + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetResponse" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "serviceMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkResponse" + }, + "description": "Array of materials that is used with this service" + }, + "serviceEquipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkResponse" + }, + "description": "Array of equipment used with this service" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "modifiedOn": { + "type": "string", + "description": "Timestamp when the item was last modified", + "format": "date-time" + }, + "source": { + "type": "string", + "description": "The source catalog for this SKU.", + "nullable": true + }, + "externalId": { + "type": "string", + "description": "External id is the id of the original source of the item when it comes from a catalog", + "nullable": true + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataModel" + }, + "description": "List of external data attached to this job,\nthat corresponds to the application guid provided in the request.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.SkuCategoryResponse": { + "required": [ + "id", + "name", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Unique Category Id", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Category name" + }, + "active": { + "type": "boolean", + "description": "Active shows if the Category is active or inactive" + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ServiceCreateRequest": { + "required": [ + "code", + "description" + ], + "type": "object", + "properties": { + "serviceMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of materials linked to the service", + "nullable": true + }, + "serviceEquipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of equipment linked to the service", + "nullable": true + }, + "recommendations": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Recommended services and materials to include with this SKU", + "nullable": true + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU", + "nullable": true + }, + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU", + "nullable": true + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "warranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the warranty included in this SKU", + "nullable": true + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to", + "nullable": true + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal", + "nullable": true + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal", + "nullable": true + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal", + "nullable": true + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal", + "nullable": true + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable", + "nullable": true + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU", + "nullable": true + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n ", + "nullable": true + }, + "hours": { + "type": "number", + "description": "Hours needed to complete this service", + "format": "decimal", + "nullable": true + }, + "isLabor": { + "type": "boolean", + "description": "Is a labor service", + "nullable": true + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive", + "nullable": true + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board.", + "nullable": true + }, + "paysCommission": { + "type": "boolean", + "description": "True if this task pays commission", + "nullable": true + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal", + "nullable": true + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataCreateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this entity.", + "nullable": true + } + }, + "additionalProperties": false + }, + "Pricebook.V2.ServiceUpdateRequest": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Code for the SKU" + }, + "displayName": { + "type": "string", + "description": "Name that displays with the SKU" + }, + "description": { + "type": "string", + "description": "Description on the SKU that is displayed with the item", + "format": "html" + }, + "warranty": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.SkuWarrantyRequest" + } + ], + "description": "Description of the warranty included in this SKU" + }, + "categories": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Categories that this SKU belongs to" + }, + "price": { + "type": "number", + "description": "Price of this SKU sold", + "format": "decimal" + }, + "memberPrice": { + "type": "number", + "description": "The price if the item is sold to a member", + "format": "decimal" + }, + "addOnPrice": { + "type": "number", + "description": "The price of the SKU is sold as an add-on item", + "format": "decimal" + }, + "addOnMemberPrice": { + "type": "number", + "description": "The price if the SKU is sold to a member as an add-on item", + "format": "decimal" + }, + "taxable": { + "type": "boolean", + "description": "Is this SKU taxable" + }, + "account": { + "type": "string", + "description": "The accounting account assigned to this SKU" + }, + "intacctGlGroupAccount": { + "type": "string", + "description": "Intacct GL Group Name\n " + }, + "hours": { + "type": "number", + "description": "Hours needed to complete this service", + "format": "decimal" + }, + "isLabor": { + "type": "boolean", + "description": "Is a labor service" + }, + "recommendations": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Recommended other services to include with this SKU" + }, + "upgrades": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Upgrades that can be sold for this SKU" + }, + "assets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuAssetRequest" + }, + "description": "Images, videos or PDFs attached to SKU" + }, + "serviceMaterials": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of materials linked to the service" + }, + "serviceEquipment": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pricebook.V2.SkuLinkRequest" + }, + "description": "Array of equipment linked to the service" + }, + "active": { + "type": "boolean", + "description": "Active shows if the SKU is active or inactive" + }, + "crossSaleGroup": { + "type": "string", + "description": "A grouping of similar items that you'll then be able to track as a separate columns on the Technical Performance Board." + }, + "paysCommission": { + "type": "boolean", + "description": "PaysCommissions shows if this task pays commission" + }, + "bonus": { + "type": "number", + "description": "Flat rate bonus paid for this task", + "format": "decimal" + }, + "commissionBonus": { + "type": "number", + "description": "Percentage rate bonus paid for this task", + "format": "decimal" + }, + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/Pricebook.V2.ExternalDataUpdateRequest" + } + ], + "description": "External data update model.", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/reporting-v2.json b/openapi_specs/reporting-v2.json new file mode 100644 index 0000000..bb7b906 --- /dev/null +++ b/openapi_specs/reporting-v2.json @@ -0,0 +1,1143 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Reporting", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/reporting/v2" + } + ], + "paths": { + "/tenant/{tenant}/dynamic-value-sets/{dynamicSetId}": { + "get": { + "tags": [ + "DynamicValueSets" + ], + "summary": "List values of given dynamic set including key and display name", + "description": "List values of given dynamic set including key and display name", + "operationId": "DynamicValueSets_GetDynamicSet", + "parameters": [ + { + "name": "dynamicSetId", + "in": "path", + "description": "ID of dynamic set taken from a report description ", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Reporting.V2.DynamicSetResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + [ + {} + ] + ], + "fields": [ + { + "name": "string", + "label": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "There is no such dynamic value set", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/report-categories": { + "get": { + "tags": [ + "ReportCategories" + ], + "summary": "List categories for existing reports", + "description": "List categories for existing reports", + "operationId": "ReportCategories_GetCategories", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Reporting.V2.ReportCategoryListItem" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": "string", + "name": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/report-category/{report_category}/reports": { + "get": { + "tags": [ + "ReportCategoryReports" + ], + "summary": "List reports within given category", + "description": "List reports within given category", + "operationId": "ReportCategoryReports_GetReports", + "parameters": [ + { + "name": "report_category", + "in": "path", + "description": "ID of category taken from the category list endpoint ", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Reporting.V2.ReportListItem" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "description": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "There is no such category", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/report-category/{report_category}/reports/{reportId}": { + "get": { + "tags": [ + "ReportCategoryReports" + ], + "summary": "Get report description including input parameters and output fields etc.\nTake a note that the report description isn't fixed and may be changed by the report owner.", + "description": "Get report description including input parameters and output fields etc.\nTake a note that the report description isn't fixed and may be changed by the report owner.", + "operationId": "ReportCategoryReports_Get", + "parameters": [ + { + "name": "report_category", + "in": "path", + "description": "ID of category taken from the category list endpoint ", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "in": "path", + "description": "Format - int64. ID of report within the category ", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Reporting.V2.ReportResponse" + }, + "example": { + "id": 0, + "name": "string", + "description": "string", + "modifiedOn": "string", + "parameters": [ + { + "name": "string", + "label": "string", + "dataType": {}, + "isArray": true, + "isRequired": true, + "acceptValues": { + "fields": [ + { + "name": "string", + "label": "string" + } + ], + "dynamicSetId": "string", + "values": [ + [ + {} + ] + ] + } + } + ], + "fields": [ + { + "name": "string", + "label": "string", + "dataType": {} + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "There is no such category / There is no such report with the category", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/report-category/{report_category}/reports/{reportId}/data": { + "post": { + "tags": [ + "ReportCategoryReports" + ], + "summary": "Get report data. The result is based on current report description which isn't constant in general.\nBeware that report columns may be changed. Result field names are listed alongside the data in the response\nto validate that all the requested columns are there.", + "description": "Get report data. The result is based on current report description which isn't constant in general.\nBeware that report columns may be changed. Result field names are listed alongside the data in the response\nto validate that all the requested columns are there.", + "operationId": "ReportCategoryReports_GetData", + "parameters": [ + { + "name": "report_category", + "in": "path", + "description": "ID of category taken from the category list endpoint ", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "reportId", + "in": "path", + "description": "Format - int64. ID of report within the category ", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (1000 by default)", + "schema": { + "maximum": 25000, + "minimum": 1, + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "requestBody": { + "description": "Report input parameter values ", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Reporting.V2.ReportDataRequest" + }, + "example": { + "parameters": [ + { + "name": "string", + "value": {} + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Reporting.V2.ReportDataResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + [ + {} + ] + ], + "fields": [ + { + "name": "string", + "label": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "There is no such category / There is no such report with the category", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Reporting.V2.DynamicSetResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data", + "fields" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "type": "array", + "items": {} + }, + "description": "The collection of result items, will never have more than PageSize items" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.HeaderField" + }, + "description": "Describes header row of data " + } + }, + "additionalProperties": false, + "description": "Rows of corresponding standard dynamic set. Types of columns are generally arbitrary\nand defined by the dynamic set (may be number or string etc)" + }, + "Reporting.V2.HeaderField": { + "required": [ + "name", + "label" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Unique name of the field " + }, + "label": { + "type": "string", + "description": "Display name of the field " + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "PaginatedResponse_Of_Reporting.V2.ReportCategoryListItem": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.ReportCategoryListItem" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Reporting.V2.ReportCategoryListItem": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "ID of report catogory for safe use in report endpoints " + }, + "name": { + "type": "string", + "description": "Display name of the report category " + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_Reporting.V2.ReportListItem": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.ReportListItem" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Reporting.V2.ReportListItem": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Report unique identifier.\nUse this value to request detailed report information, the actual data, etc.\nOnce the report is created the ID cannot be changed", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Display name of the report.\nDo not use the name as the report identifier because it can be modified\nand any references based on the old value would stop working" + }, + "description": { + "type": "string", + "description": "Description about the report ", + "nullable": true + } + }, + "additionalProperties": false + }, + "Reporting.V2.ReportResponse": { + "required": [ + "id", + "name", + "modifiedOn", + "parameters", + "fields" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Report unique identifier ", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Display name of the report " + }, + "description": { + "type": "string", + "description": "Description about the report ", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "Time when the report structure was changed ", + "format": "date-time" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.ReportParameter" + }, + "description": "Defines the parameters that the report expects when requesting data " + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.ReportField" + }, + "description": "Describes fields/columns returned by the report when requesting data " + } + }, + "additionalProperties": false + }, + "Reporting.V2.ReportParameter": { + "required": [ + "name", + "label", + "dataType", + "isArray", + "isRequired" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Unique name " + }, + "label": { + "type": "string", + "description": "Display name " + }, + "dataType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Reporting.V2.DataType" + } + ], + "description": "Data type of element for the parameter " + }, + "isArray": { + "type": "boolean", + "description": "Determines whether the filter expects array of elements " + }, + "isRequired": { + "type": "boolean", + "description": "Indicater if the parameter has to be specified of not " + }, + "acceptValues": { + "oneOf": [ + { + "$ref": "#/components/schemas/Reporting.V2.ParameterPossibleValues" + } + ], + "description": "If the filter accepts only certain values as the input this object defines what those values should be", + "nullable": true + } + }, + "additionalProperties": false + }, + "Reporting.V2.DataType": { + "enum": [ + "String", + "Number", + "Boolean", + "Date", + "Time" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "String", + "Number", + "Boolean", + "Date", + "Time" + ] + }, + "Reporting.V2.ParameterPossibleValues": { + "required": [ + "fields" + ], + "type": "object", + "properties": { + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.HeaderField" + }, + "description": "Describes key column and then value column of possible value rows " + }, + "dynamicSetId": { + "type": "string", + "description": "If values are based on a dynamic list (e.g. a list of the existing Business Units or Technicians)\nthen this object defines identifier of the value set to get from the corresponding endpoint", + "nullable": true + }, + "values": { + "type": "array", + "items": { + "type": "array", + "items": {} + }, + "description": "A predefined list of the values accepted ", + "nullable": true + } + }, + "additionalProperties": false + }, + "Reporting.V2.ReportField": { + "required": [ + "name", + "label", + "dataType" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Field unique identifier " + }, + "label": { + "type": "string", + "description": "Display name of the field. This is the same label that is displayed in the reporting UI " + }, + "dataType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Reporting.V2.DataType" + } + ], + "description": "Value data type for the field/column " + } + }, + "additionalProperties": false + }, + "Reporting.V2.ReportDataResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data", + "fields" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "type": "array", + "items": {} + }, + "description": "The collection of result items, will never have more than PageSize items" + }, + "fields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.HeaderField" + }, + "description": "Describes row headers/columns of returned rows " + } + }, + "additionalProperties": false, + "description": "Rows of the requested report. Types of columns are defined by the report fields' definition." + }, + "Reporting.V2.ReportDataRequest": { + "required": [ + "parameters" + ], + "type": "object", + "properties": { + "parameters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Reporting.V2.ReportDataParameter" + }, + "description": "List of name/value for input parameters of the report " + } + }, + "additionalProperties": false + }, + "Reporting.V2.ReportDataParameter": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "minLength": 1, + "type": "string", + "description": "Parameter name " + }, + "value": { + "description": "Value of the parameter based of its descrition (data type etc.) ", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/salestech-v2.json b/openapi_specs/salestech-v2.json new file mode 100644 index 0000000..c59d035 --- /dev/null +++ b/openapi_specs/salestech-v2.json @@ -0,0 +1,2402 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Sales & Estimates", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/sales/v2" + } + ], + "paths": { + "/tenant/{tenant}/estimates/{id}": { + "get": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_Get", + "operationId": "Estimates_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.EstimateResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "projectId": 0, + "locationId": 0, + "customerId": 0, + "name": "string", + "jobNumber": "string", + "status": { + "value": 0, + "name": "string" + }, + "reviewStatus": "None", + "summary": "string", + "createdOn": "string", + "modifiedOn": "string", + "soldOn": "string", + "soldBy": 0, + "active": true, + "items": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "subtotal": 0, + "tax": 0, + "businessUnitId": 0, + "businessUnitName": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "put": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_Update", + "operationId": "Estimates_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.UpdateEstimateRequest" + }, + "example": { + "name": "string", + "summary": "string", + "tax": 0, + "status": {}, + "reviewStatus": {}, + "soldBy": 0, + "items": [ + { + "id": 0, + "skuId": 0, + "skuName": "string", + "parentItemId": 0, + "description": "string", + "isAddOn": true, + "quantity": 0, + "unitPrice": 0, + "skipUpdatingMembershipPrices": true, + "itemGroupName": "string", + "itemGroupRootId": 0, + "chargeable": true, + "useDefaultProjectLabels": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "useDefaultProjectLabels": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.EstimateResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "projectId": 0, + "locationId": 0, + "customerId": 0, + "name": "string", + "jobNumber": "string", + "status": { + "value": 0, + "name": "string" + }, + "reviewStatus": "None", + "summary": "string", + "createdOn": "string", + "modifiedOn": "string", + "soldOn": "string", + "soldBy": 0, + "active": true, + "items": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "subtotal": 0, + "tax": 0, + "businessUnitId": 0, + "businessUnitName": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates": { + "get": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_GetList", + "operationId": "Estimates_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "projectId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobNumber", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "totalGreater", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "totalLess", + "in": "query", + "description": "Format - decimal.", + "schema": { + "type": "number", + "format": "decimal", + "nullable": true + } + }, + { + "name": "soldById", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "soldByEmployeeId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "soldAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "soldBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "orderByDirection", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "locationId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Estimates.V2.EstimateResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobId": 0, + "projectId": 0, + "locationId": 0, + "customerId": 0, + "name": "string", + "jobNumber": "string", + "status": { + "value": 0, + "name": "string" + }, + "reviewStatus": "None", + "summary": "string", + "createdOn": "string", + "modifiedOn": "string", + "soldOn": "string", + "soldBy": 0, + "active": true, + "items": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "subtotal": 0, + "tax": 0, + "businessUnitId": 0, + "businessUnitName": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_Create", + "operationId": "Estimates_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.CreateEstimateRequest" + }, + "example": { + "name": "string", + "summary": "string", + "tax": 0, + "status": {}, + "reviewStatus": {}, + "soldBy": 0, + "items": [ + { + "id": 0, + "skuId": 0, + "skuName": "string", + "parentItemId": 0, + "description": "string", + "isAddOn": true, + "quantity": 0, + "unitPrice": 0, + "skipUpdatingMembershipPrices": true, + "itemGroupName": "string", + "itemGroupRootId": 0, + "chargeable": true, + "useDefaultProjectLabels": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "useDefaultProjectLabels": true, + "jobId": 0, + "projectId": 0, + "locationId": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.EstimateResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "projectId": 0, + "locationId": 0, + "customerId": 0, + "name": "string", + "jobNumber": "string", + "status": { + "value": 0, + "name": "string" + }, + "reviewStatus": "None", + "summary": "string", + "createdOn": "string", + "modifiedOn": "string", + "soldOn": "string", + "soldBy": 0, + "active": true, + "items": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "subtotal": 0, + "tax": 0, + "businessUnitId": 0, + "businessUnitName": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/items": { + "get": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_GetItems", + "operationId": "Estimates_GetItems", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "estimateId", + "in": "query", + "description": "Format - int64.", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Estimates.V2.EstimateItemResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/{id}/sell": { + "put": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_Sell", + "operationId": "Estimates_Sell", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.SellRequest" + }, + "example": { + "soldBy": 0 + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.EstimateResponse" + }, + "example": { + "id": 0, + "jobId": 0, + "projectId": 0, + "locationId": 0, + "customerId": 0, + "name": "string", + "jobNumber": "string", + "status": { + "value": 0, + "name": "string" + }, + "reviewStatus": "None", + "summary": "string", + "createdOn": "string", + "modifiedOn": "string", + "soldOn": "string", + "soldBy": 0, + "active": true, + "items": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "subtotal": 0, + "tax": 0, + "businessUnitId": 0, + "businessUnitName": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/{id}/unsell": { + "put": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_Unsell", + "operationId": "Estimates_Unsell", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/{id}/dismiss": { + "put": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_Dismiss", + "operationId": "Estimates_Dismiss", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/{id}/items": { + "put": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_PutItem", + "operationId": "Estimates_PutItem", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemCreateUpdateRequest" + }, + "example": { + "id": 0, + "skuId": 0, + "skuName": "string", + "parentItemId": 0, + "description": "string", + "isAddOn": true, + "quantity": 0, + "unitPrice": 0, + "skipUpdatingMembershipPrices": true, + "itemGroupName": "string", + "itemGroupRootId": 0, + "chargeable": true, + "useDefaultProjectLabels": true + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemUpdateResponse" + }, + "example": { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true, + "estimateId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/{id}/items/{itemId}": { + "delete": { + "tags": [ + "Estimates" + ], + "summary": "Estimates_DeleteItem", + "operationId": "Estimates_DeleteItem", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "itemId", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded" + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/estimates/export": { + "get": { + "tags": [ + "EstimatesExport" + ], + "summary": "Provides export feed for estimates", + "description": "Provides export feed for estimates", + "operationId": "EstimatesExport_Estimates", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Estimates.V2.ExportEstimatesResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "jobId": 0, + "projectId": 0, + "locationId": 0, + "customerId": 0, + "name": "string", + "jobNumber": "string", + "status": { + "value": 0, + "name": "string" + }, + "reviewStatus": "None", + "summary": "string", + "createdOn": "string", + "modifiedOn": "string", + "soldOn": "string", + "soldBy": 0, + "active": true, + "items": [ + { + "id": 0, + "sku": { + "id": 0, + "name": "string", + "displayName": "string", + "type": "string", + "soldHours": 0, + "generalLedgerAccountId": 0, + "generalLedgerAccountName": "string", + "modifiedOn": "string" + }, + "skuAccount": "string", + "description": "string", + "membershipTypeId": 0, + "qty": 0, + "unitRate": 0, + "total": 0, + "unitCost": 0, + "totalCost": 0, + "itemGroupName": "string", + "itemGroupRootId": 0, + "createdOn": "string", + "modifiedOn": "string", + "chargeable": true + } + ], + "externalLinks": [ + { + "name": "string", + "url": "string" + } + ], + "subtotal": 0, + "tax": 0, + "businessUnitId": 0, + "businessUnitName": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Estimates.V2.EstimateResponse": { + "required": [ + "id", + "reviewStatus", + "createdOn", + "modifiedOn", + "active", + "subtotal", + "tax" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "jobNumber": { + "type": "string", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Estimates.V2.EstimateStatusModel" + } + ], + "nullable": true + }, + "reviewStatus": { + "$ref": "#/components/schemas/Estimates.Types.EstimateReviewStatus" + }, + "summary": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "soldOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "soldBy": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "active": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemResponse" + }, + "nullable": true + }, + "externalLinks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ExternalLinkResponse" + }, + "nullable": true + }, + "subtotal": { + "type": "number", + "format": "decimal" + }, + "tax": { + "type": "number", + "format": "decimal" + }, + "businessUnitId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "businessUnitName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Estimates.V2.EstimateStatusModel": { + "required": [ + "value", + "name" + ], + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int32" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Estimates.Types.EstimateReviewStatus": { + "enum": [ + "None", + "NeedsApproval", + "Approved", + "NotApproved" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "None", + "NeedsApproval", + "Approved", + "NotApproved" + ] + }, + "Estimates.V2.EstimateItemResponse": { + "required": [ + "id", + "sku", + "skuAccount", + "description", + "qty", + "unitRate", + "total", + "unitCost", + "totalCost", + "itemGroupName", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "sku": { + "$ref": "#/components/schemas/Estimates.V2.SkuModel" + }, + "skuAccount": { + "type": "string" + }, + "description": { + "type": "string", + "format": "html" + }, + "membershipTypeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "qty": { + "type": "number", + "format": "decimal" + }, + "unitRate": { + "type": "number", + "format": "decimal" + }, + "total": { + "type": "number", + "format": "decimal" + }, + "unitCost": { + "type": "number", + "format": "decimal" + }, + "totalCost": { + "type": "number", + "format": "decimal" + }, + "itemGroupName": { + "type": "string" + }, + "itemGroupRootId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "chargeable": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "Estimates.V2.SkuModel": { + "required": [ + "id", + "name", + "displayName", + "type", + "soldHours", + "generalLedgerAccountId", + "generalLedgerAccountName", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "type": { + "type": "string" + }, + "soldHours": { + "type": "number", + "format": "decimal" + }, + "generalLedgerAccountId": { + "type": "integer", + "format": "int64" + }, + "generalLedgerAccountName": { + "type": "string" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Estimates.V2.ExternalLinkResponse": { + "required": [ + "name", + "url" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "PaginatedResponse_Of_Estimates.V2.EstimateResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.EstimateResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "PaginatedResponse_Of_Estimates.V2.EstimateItemResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Estimates.V2.CreateEstimateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string", + "nullable": true + }, + "tax": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/EstimateStatus" + } + ], + "nullable": true + }, + "reviewStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Estimates.Types.EstimateReviewStatus" + } + ], + "nullable": true + }, + "soldBy": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemCreateUpdateRequest" + }, + "nullable": true + }, + "externalLinks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ExternalLinkInModel" + }, + "nullable": true + }, + "useDefaultProjectLabels": { + "type": "boolean", + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "EstimateStatus": { + "enum": [ + "Open", + "Sold", + "Dismissed" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Open", + "Sold", + "Dismissed" + ] + }, + "Estimates.V2.EstimateItemCreateUpdateRequest": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "skuId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "skuName": { + "type": "string", + "nullable": true + }, + "parentItemId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "format": "html", + "nullable": true + }, + "isAddOn": { + "type": "boolean", + "nullable": true + }, + "quantity": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "unitPrice": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "skipUpdatingMembershipPrices": { + "type": "boolean", + "nullable": true + }, + "itemGroupName": { + "type": "string", + "nullable": true + }, + "itemGroupRootId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "chargeable": { + "type": "boolean", + "nullable": true + }, + "useDefaultProjectLabels": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "Estimates.V2.ExternalLinkInModel": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Estimates.V2.UpdateEstimateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "summary": { + "type": "string", + "nullable": true + }, + "tax": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/EstimateStatus" + } + ], + "nullable": true + }, + "reviewStatus": { + "oneOf": [ + { + "$ref": "#/components/schemas/Estimates.Types.EstimateReviewStatus" + } + ], + "nullable": true + }, + "soldBy": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemCreateUpdateRequest" + }, + "nullable": true + }, + "externalLinks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ExternalLinkInModel" + }, + "nullable": true + }, + "useDefaultProjectLabels": { + "type": "boolean", + "nullable": true + } + }, + "additionalProperties": false + }, + "Estimates.V2.SellRequest": { + "required": [ + "soldBy" + ], + "type": "object", + "properties": { + "soldBy": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Estimates.V2.EstimateItemUpdateResponse": { + "required": [ + "id", + "sku", + "skuAccount", + "description", + "qty", + "unitRate", + "total", + "unitCost", + "totalCost", + "itemGroupName", + "createdOn", + "modifiedOn", + "estimateId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "sku": { + "$ref": "#/components/schemas/Estimates.V2.SkuModel" + }, + "skuAccount": { + "type": "string" + }, + "description": { + "type": "string", + "format": "html" + }, + "membershipTypeId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "qty": { + "type": "number", + "format": "decimal" + }, + "unitRate": { + "type": "number", + "format": "decimal" + }, + "total": { + "type": "number", + "format": "decimal" + }, + "unitCost": { + "type": "number", + "format": "decimal" + }, + "totalCost": { + "type": "number", + "format": "decimal" + }, + "itemGroupName": { + "type": "string" + }, + "itemGroupRootId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "chargeable": { + "type": "boolean", + "nullable": true + }, + "estimateId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Estimates.V2.ExportEstimatesResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ExportEstimatesResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Estimates.V2.ExportEstimatesResponse": { + "required": [ + "id", + "reviewStatus", + "createdOn", + "modifiedOn", + "active", + "subtotal", + "tax" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "locationId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "jobNumber": { + "type": "string", + "nullable": true + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Estimates.V2.EstimateStatusModel" + } + ], + "nullable": true + }, + "reviewStatus": { + "$ref": "#/components/schemas/Estimates.Types.EstimateReviewStatus" + }, + "summary": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "soldOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "soldBy": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "active": { + "type": "boolean" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.EstimateItemResponse" + }, + "nullable": true + }, + "externalLinks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Estimates.V2.ExternalLinkResponse" + }, + "nullable": true + }, + "subtotal": { + "type": "number", + "format": "decimal" + }, + "tax": { + "type": "number", + "format": "decimal" + }, + "businessUnitId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "businessUnitName": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/scheduling-pro-v2.json b/openapi_specs/scheduling-pro-v2.json new file mode 100644 index 0000000..2506f2c --- /dev/null +++ b/openapi_specs/scheduling-pro-v2.json @@ -0,0 +1,852 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Scheduling Pro", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/schedulingpro/v2" + } + ], + "paths": { + "/tenant/{tenant}/schedulers": { + "get": { + "tags": [ + "Scheduler" + ], + "summary": "Gets a list schedulers", + "description": "Gets a list schedulers", + "operationId": "Scheduler_Sessions", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_SchedulingPro.V2.SchedulerResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": "string", + "name": "string", + "companyName": "string", + "createdOn": "string", + "modifiedOn": "string", + "schedulerStatus": "string", + "dataApiKey": "string", + "isDefault": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/schedulers/{id}/sessions": { + "get": { + "tags": [ + "Scheduler" + ], + "summary": "Gets a paginated list of sessions for scheduler", + "description": "Gets a paginated list of sessions for scheduler", + "operationId": "Scheduler_SchedulerSessions", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_SchedulingPro.V2.SchedulerSessionResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": "string", + "createdOn": "string", + "modifiedOn": "string", + "lastCheckinDate": "string", + "sessionOutcome": "string", + "jobId": 0, + "bookingId": 0, + "timeslotStart": "string", + "timeslotEnd": "string", + "category": "string", + "jobTypeId": 0, + "businessUnitId": 0, + "customer": { + "isNewCustomer": true, + "id": 0, + "firstName": "string", + "lastName": "string", + "email": "string", + "phone": "string", + "isNewLocation": true, + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + } + }, + "zoneId": 0, + "customerResponses": [ + "string" + ], + "notes": "string", + "sourceTracking": { + "isRWGSession": true, + "campaignId": "string", + "landingPageUrl": "string", + "gclid": "string", + "fbclid": "string", + "msclkid": "string", + "utmSource": "string", + "utmMedium": "string", + "utmCampaign": "string", + "utmAdgroup": "string", + "utmTerm": "string", + "utmContent": "string", + "googleAnalyticsClientId": "string" + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "PaginatedResponse_Of_SchedulingPro.V2.SchedulerResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulingPro.V2.SchedulerResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "SchedulingPro.V2.SchedulerResponse": { + "required": [ + "id", + "name", + "companyName", + "createdOn", + "modifiedOn", + "schedulerStatus", + "dataApiKey", + "isDefault" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Scheduler ID" + }, + "name": { + "type": "string", + "description": "Scheduler name" + }, + "companyName": { + "type": "string", + "description": "Company Name" + }, + "createdOn": { + "type": "string", + "description": "When this scheduler was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When this scheduler was last modified", + "format": "date-time" + }, + "schedulerStatus": { + "type": "string", + "description": "Scheduler Status" + }, + "dataApiKey": { + "type": "string", + "description": "Scheduler Data API Key used for embedding the Scheduler" + }, + "isDefault": { + "type": "boolean", + "description": "Denotes if this is the default scheduler" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_SchedulingPro.V2.SchedulerSessionResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SchedulingPro.V2.SchedulerSessionResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "SchedulingPro.V2.SchedulerSessionResponse": { + "required": [ + "id", + "createdOn", + "modifiedOn", + "lastCheckinDate", + "customer", + "sourceTracking" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Session ID" + }, + "createdOn": { + "type": "string", + "description": "When this session was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When this session was last modified", + "format": "date-time" + }, + "lastCheckinDate": { + "type": "string", + "description": "When the customer last interacted with the session", + "format": "date-time" + }, + "sessionOutcome": { + "type": "string", + "description": "The outcome of the session", + "nullable": true + }, + "jobId": { + "type": "integer", + "description": "Job ID if a job was created from this session", + "format": "int64", + "nullable": true + }, + "bookingId": { + "type": "integer", + "description": "Booking ID if a booking was created from this session", + "format": "int64", + "nullable": true + }, + "timeslotStart": { + "type": "string", + "description": "Timeslot start", + "format": "date-time", + "nullable": true + }, + "timeslotEnd": { + "type": "string", + "description": "Timeslot end", + "format": "date-time", + "nullable": true + }, + "category": { + "type": "string", + "description": "Category of the job", + "nullable": true + }, + "jobTypeId": { + "type": "integer", + "description": "Job type ID", + "format": "int64", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID", + "format": "int64", + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/SchedulingPro.V2.Customer" + } + ], + "description": "Customer information" + }, + "zoneId": { + "type": "integer", + "description": "Zone ID", + "format": "int64", + "nullable": true + }, + "customerResponses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Customer Responses", + "nullable": true + }, + "notes": { + "type": "string", + "description": "Customer customer", + "nullable": true + }, + "sourceTracking": { + "oneOf": [ + { + "$ref": "#/components/schemas/SchedulingPro.V2.SourceTracking" + } + ], + "description": "Source tracking information" + } + }, + "additionalProperties": false + }, + "SchedulingPro.V2.Customer": { + "required": [ + "isNewCustomer", + "isNewLocation", + "address" + ], + "type": "object", + "properties": { + "isNewCustomer": { + "type": "boolean", + "description": "Whether this is a new customer" + }, + "id": { + "type": "integer", + "description": "Customer ID", + "format": "int64", + "nullable": true + }, + "firstName": { + "type": "string", + "description": "Customer first name", + "nullable": true + }, + "lastName": { + "type": "string", + "description": "Customer last name", + "nullable": true + }, + "email": { + "type": "string", + "description": "Customer email", + "nullable": true + }, + "phone": { + "type": "string", + "description": "Customer phone", + "nullable": true + }, + "isNewLocation": { + "type": "boolean", + "description": "Whether this is a new Location" + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/SchedulingPro.V2.Address" + } + ], + "description": "Customer Address Information" + } + }, + "additionalProperties": false + }, + "SchedulingPro.V2.Address": { + "type": "object", + "properties": { + "street": { + "type": "string", + "description": "Street", + "nullable": true + }, + "unit": { + "type": "string", + "description": "Unit", + "nullable": true + }, + "city": { + "type": "string", + "description": "City", + "nullable": true + }, + "state": { + "type": "string", + "description": "State", + "nullable": true + }, + "zip": { + "type": "string", + "description": "Zip", + "nullable": true + }, + "country": { + "type": "string", + "description": "Country", + "nullable": true + } + }, + "additionalProperties": false + }, + "SchedulingPro.V2.SourceTracking": { + "type": "object", + "properties": { + "isRWGSession": { + "type": "boolean", + "description": "Whether the session came from Reserve with Google", + "nullable": true + }, + "campaignId": { + "type": "string", + "description": "Campaign ID", + "nullable": true + }, + "landingPageUrl": { + "type": "string", + "description": "Campaign Name", + "nullable": true + }, + "gclid": { + "type": "string", + "description": "Google Click ID", + "nullable": true + }, + "fbclid": { + "type": "string", + "description": "Facebook Click ID", + "nullable": true + }, + "msclkid": { + "type": "string", + "description": "Microsoft Click ID", + "nullable": true + }, + "utmSource": { + "type": "string", + "description": "UTM Source", + "nullable": true + }, + "utmMedium": { + "type": "string", + "description": "UTM Medium", + "nullable": true + }, + "utmCampaign": { + "type": "string", + "description": "UTM Campaign", + "nullable": true + }, + "utmAdgroup": { + "type": "string", + "description": "UTM Content", + "nullable": true + }, + "utmTerm": { + "type": "string", + "description": "UTM Term", + "nullable": true + }, + "utmContent": { + "type": "string", + "description": "UTM Content", + "nullable": true + }, + "googleAnalyticsClientId": { + "type": "string", + "description": "Google Analytics Client ID", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/service-agreements-v2.json b/openapi_specs/service-agreements-v2.json new file mode 100644 index 0000000..0880eb4 --- /dev/null +++ b/openapi_specs/service-agreements-v2.json @@ -0,0 +1,1323 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Service Agreements", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/service-agreements/v2" + } + ], + "paths": { + "/tenant/{tenant}/export/service-agreements": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for service agreements", + "description": "Provides export feed for service agreements", + "operationId": "Export_ServiceAgreements", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_ServiceAgreements.V2.ExportServiceAgreementResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "name": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "modifiedById": 0, + "templateFields": { + "originalTemplateId": 0, + "revenueRecognitionMode": {}, + "generalLedgerAccountId": 0, + "invoiceCancellationMode": {}, + "billingServiceId": 0, + "negativeLiabilityServiceId": 0, + "positiveIncomeServiceId": 0, + "defaultLaborCostPerHour": 0, + "defaultExtraTravelCostPerHour": 0, + "defaultLaborMarkupPercentage": 0, + "defaultMaterialMarkupPercentage": 0, + "defaultLaborSurcharge": 0, + "defaultMaterialSurcharge": 0, + "defaultRateSheetId": 0, + "defaultCampaignId": 0 + }, + "customerId": 0, + "businessUnitId": 0, + "status": {}, + "locationIds": [ + 0 + ], + "origin": {}, + "summary": "string", + "importId": "string", + "importedDeferredAmount": 0, + "importedRecognizedAmount": 0, + "durationMonths": 0, + "autoRenew": true, + "renewalAgreementId": 0, + "startDate": "string", + "endDate": "string", + "billingSchedule": {}, + "paymentTermId": 0, + "paymentMethodId": 0, + "estimatedTravelCost": 0, + "estimatedLaborCost": 0, + "estimatedMaterialCost": 0, + "laborMarkupPercentage": 0, + "materialMarkupPercentage": 0, + "laborSurcharge": 0, + "materialSurcharge": 0, + "totalAgreementPrice": 0, + "estimatedGrossMarginAmount": 0, + "estimatedGrossMarginPercentage": 0, + "rateSheetId": 0, + "accountManagerId": 0, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/service-agreements": { + "get": { + "tags": [ + "ServiceAgreements" + ], + "summary": "Gets a list of service agreements", + "description": "Gets a list of service agreements", + "operationId": "ServiceAgreements_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerIds", + "in": "query", + "description": "Filters by customer IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Filters by business unit IDs", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "status", + "in": "query", + "description": "Filters by service agreement status\\\nValues: [Draft, Sent, Rejected, Accepted, Activated, Canceled, Expired, AutoRenew]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.AgreementStatus" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, Name, CreatedOn, ModifiedOn, StartDate, EndDate", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_ServiceAgreements.V2.ServiceAgreementResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "modifiedById": 0, + "templateFields": { + "originalTemplateId": 0, + "revenueRecognitionMode": {}, + "generalLedgerAccountId": 0, + "invoiceCancellationMode": {}, + "billingServiceId": 0, + "negativeLiabilityServiceId": 0, + "positiveIncomeServiceId": 0, + "defaultLaborCostPerHour": 0, + "defaultExtraTravelCostPerHour": 0, + "defaultLaborMarkupPercentage": 0, + "defaultMaterialMarkupPercentage": 0, + "defaultLaborSurcharge": 0, + "defaultMaterialSurcharge": 0, + "defaultRateSheetId": 0, + "defaultCampaignId": 0 + }, + "customerId": 0, + "businessUnitId": 0, + "status": {}, + "locationIds": [ + 0 + ], + "origin": {}, + "summary": "string", + "importId": "string", + "importedDeferredAmount": 0, + "importedRecognizedAmount": 0, + "durationMonths": 0, + "autoRenew": true, + "renewalAgreementId": 0, + "startDate": "string", + "endDate": "string", + "billingSchedule": {}, + "paymentTermId": 0, + "paymentMethodId": 0, + "estimatedTravelCost": 0, + "estimatedLaborCost": 0, + "estimatedMaterialCost": 0, + "laborMarkupPercentage": 0, + "materialMarkupPercentage": 0, + "laborSurcharge": 0, + "materialSurcharge": 0, + "totalAgreementPrice": 0, + "estimatedGrossMarginAmount": 0, + "estimatedGrossMarginPercentage": 0, + "rateSheetId": 0, + "accountManagerId": 0 + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/service-agreements/{id}": { + "get": { + "tags": [ + "ServiceAgreements" + ], + "summary": "Gets service agreement specified by ID", + "description": "Gets service agreement specified by ID", + "operationId": "ServiceAgreements_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Service agreement ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAgreements.V2.ServiceAgreementResponse" + }, + "example": { + "id": 0, + "name": "string", + "createdOn": "string", + "createdById": 0, + "modifiedOn": "string", + "modifiedById": 0, + "templateFields": { + "originalTemplateId": 0, + "revenueRecognitionMode": {}, + "generalLedgerAccountId": 0, + "invoiceCancellationMode": {}, + "billingServiceId": 0, + "negativeLiabilityServiceId": 0, + "positiveIncomeServiceId": 0, + "defaultLaborCostPerHour": 0, + "defaultExtraTravelCostPerHour": 0, + "defaultLaborMarkupPercentage": 0, + "defaultMaterialMarkupPercentage": 0, + "defaultLaborSurcharge": 0, + "defaultMaterialSurcharge": 0, + "defaultRateSheetId": 0, + "defaultCampaignId": 0 + }, + "customerId": 0, + "businessUnitId": 0, + "status": {}, + "locationIds": [ + 0 + ], + "origin": {}, + "summary": "string", + "importId": "string", + "importedDeferredAmount": 0, + "importedRecognizedAmount": 0, + "durationMonths": 0, + "autoRenew": true, + "renewalAgreementId": 0, + "startDate": "string", + "endDate": "string", + "billingSchedule": {}, + "paymentTermId": 0, + "paymentMethodId": 0, + "estimatedTravelCost": 0, + "estimatedLaborCost": 0, + "estimatedMaterialCost": 0, + "laborMarkupPercentage": 0, + "materialMarkupPercentage": 0, + "laborSurcharge": 0, + "materialSurcharge": 0, + "totalAgreementPrice": 0, + "estimatedGrossMarginAmount": 0, + "estimatedGrossMarginPercentage": 0, + "rateSheetId": 0, + "accountManagerId": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Service agreement not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "ExportResponse_Of_ServiceAgreements.V2.ExportServiceAgreementResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceAgreements.V2.ExportServiceAgreementResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "ServiceAgreements.V2.ExportServiceAgreementResponse": { + "required": [ + "id", + "name", + "createdOn", + "modifiedOn", + "templateFields", + "customerId", + "businessUnitId", + "status", + "locationIds", + "origin", + "importedDeferredAmount", + "importedRecognizedAmount", + "autoRenew", + "laborSurcharge", + "materialSurcharge", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Service agreement ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Service agreement name" + }, + "createdOn": { + "type": "string", + "description": "When the service agreement was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this agreement", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When the service agreement was last modified", + "format": "date-time" + }, + "modifiedById": { + "type": "integer", + "description": "ID of the user that modified this agreement", + "format": "int64", + "nullable": true + }, + "templateFields": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.ServiceAgreementTemplateFieldsResponse" + } + ], + "description": "Data fields that were populated from the template" + }, + "customerId": { + "type": "integer", + "description": "Customer ID of the agreement", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID to which this agreement is assigned", + "format": "int64" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.AgreementStatus" + } + ], + "description": "Current status of the agreement" + }, + "locationIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Location IDs covered by the agreement" + }, + "origin": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.AgreementOrigin" + } + ], + "description": "The method used to create the agreement" + }, + "summary": { + "type": "string", + "description": "Optional text summary of the agreement", + "nullable": true + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "importedDeferredAmount": { + "type": "number", + "description": "Imported amount already billed for this agreement", + "format": "decimal" + }, + "importedRecognizedAmount": { + "type": "number", + "description": "Imported amount of recognized revenue for this agreement", + "format": "decimal" + }, + "durationMonths": { + "type": "integer", + "description": "Duration of the agreement in months (can be absent when the agreement is still being built)", + "format": "int32", + "nullable": true + }, + "autoRenew": { + "type": "boolean", + "description": "Determines if the agreement automatically renews or expires on its end date" + }, + "renewalAgreementId": { + "type": "integer", + "description": "Indicates the next agreement ID that renews the current agreement (null means the agreement was not renewed)", + "format": "int64", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "The start date of the agreement (can be absent when the agreement is still being built)", + "format": "date", + "nullable": true + }, + "endDate": { + "type": "string", + "description": "The end date of the agreement (can be absent when the agreement is still being built)", + "format": "date", + "nullable": true + }, + "billingSchedule": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.BillingScheduleType" + } + ], + "description": "The billing schedule of the agreement (can be absent when the agreement is still being built)", + "nullable": true + }, + "paymentTermId": { + "type": "integer", + "description": "ID of the payment terms of the agreement (can be absent when the agreement is still being built)", + "format": "int64", + "nullable": true + }, + "paymentMethodId": { + "type": "integer", + "description": "ID of the payment method of the agreement (can be absent when the agreement is still being built).\nNote there is a special hardcoded value of -1 that means \"Cash or Check\".", + "format": "int64", + "nullable": true + }, + "estimatedTravelCost": { + "type": "number", + "description": "The dollar amount of estimated travel cost for all visits (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedLaborCost": { + "type": "number", + "description": "The dollar amount of estimated labor cost for all visits (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedMaterialCost": { + "type": "number", + "description": "The dollar amount of estimated material cost for all visits (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "laborMarkupPercentage": { + "type": "number", + "description": "The markup percentage applied to labor cost of the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "materialMarkupPercentage": { + "type": "number", + "description": "The markup percentage applied to material cost of the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "laborSurcharge": { + "type": "number", + "description": "The dollar amount added to labor cost of the agreement", + "format": "decimal" + }, + "materialSurcharge": { + "type": "number", + "description": "The dollar amount added to material cost of the agreement", + "format": "decimal" + }, + "totalAgreementPrice": { + "type": "number", + "description": "The total price of the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedGrossMarginAmount": { + "type": "number", + "description": "The estimated gross margin in dollars for the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedGrossMarginPercentage": { + "type": "number", + "description": "The estimated gross margin as a percentage of the Total Agreement Price (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "rateSheetId": { + "type": "integer", + "description": "ID of a rate sheet (Client-Specific Pricing Rule) assigned to the service agreement", + "format": "int64", + "nullable": true + }, + "accountManagerId": { + "type": "integer", + "description": "ID of the employee assigned to the agreement", + "format": "int64", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether this agreement still exists, or was deleted already." + } + }, + "additionalProperties": false + }, + "ServiceAgreements.V2.ServiceAgreementTemplateFieldsResponse": { + "required": [ + "originalTemplateId", + "revenueRecognitionMode", + "billingServiceId" + ], + "type": "object", + "properties": { + "originalTemplateId": { + "type": "integer", + "description": "ID of the template originally used to create this service agreement.\nNote that the content of the original template may have changed since the agreement's creation.\nThe template fields in this object represent the current state of the service agreement, as they were captured at the time of creation.", + "format": "int64" + }, + "revenueRecognitionMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.RevenueRecognitionMode" + } + ], + "description": "Revenue recognition mode to be used for a new service agreement" + }, + "generalLedgerAccountId": { + "type": "integer", + "description": "General ledger account that will hold funds until recognition\n(this is only used for the Deferred revenue recognition)", + "format": "int64", + "nullable": true + }, + "invoiceCancellationMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.CancellationInvoiceMode" + } + ], + "description": "How to resolve the difference with the customer when service agreement is cancelled\n(this is only used for the Deferred revenue recognition)", + "nullable": true + }, + "billingServiceId": { + "type": "integer", + "description": "Used for both revenue recognition modes:\nwhen Immediate, the service will be displayed in customer-facing invoices;\nwhen Deferred, the service is tied to the general ledger account chosen for this agreement.", + "format": "int64" + }, + "negativeLiabilityServiceId": { + "type": "integer", + "description": "Negative liability services draw money from liability account when services are delivered\n(this is only used for the Deferred revenue recognition)", + "format": "int64", + "nullable": true + }, + "positiveIncomeServiceId": { + "type": "integer", + "description": "Positive income services transfer money into the income account when services are delivered\n(this is only used for the Deferred revenue recognition)", + "format": "int64", + "nullable": true + }, + "defaultLaborCostPerHour": { + "type": "number", + "description": "The default labor cost / hour to be used in the UI when adding service agreement visits", + "format": "decimal", + "nullable": true + }, + "defaultExtraTravelCostPerHour": { + "type": "number", + "description": "The default extra travel cost / hour to be used in the UI when adding service agreement locations", + "format": "decimal", + "nullable": true + }, + "defaultLaborMarkupPercentage": { + "type": "number", + "description": "The default percentage value of the labor markup to be used in the UI when creating a service agreement", + "format": "decimal", + "nullable": true + }, + "defaultMaterialMarkupPercentage": { + "type": "number", + "description": "The default percentage value of the material markup to be used in the UI when creating a service agreement", + "format": "decimal", + "nullable": true + }, + "defaultLaborSurcharge": { + "type": "number", + "description": "The default labor surcharge amount to be used in the UI when creating a service agreement", + "format": "decimal", + "nullable": true + }, + "defaultMaterialSurcharge": { + "type": "number", + "description": "The default material surcharge amount to be used in the UI when creating a service agreement", + "format": "decimal", + "nullable": true + }, + "defaultRateSheetId": { + "type": "integer", + "description": "The default rate sheet ID (Client-Specific Pricing Rule) to be used in the UI when creating a service agreement", + "format": "int64", + "nullable": true + }, + "defaultCampaignId": { + "type": "integer", + "description": "The ID of the marketing campaign to be used by default when booking jobs for service agreement visits", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "ServiceAgreements.V2.RevenueRecognitionMode": { + "enum": [ + "Immediate", + "Deferred", + "DeferredStraightLine" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Immediate", + "Deferred", + "DeferredStraightLine" + ] + }, + "ServiceAgreements.V2.CancellationInvoiceMode": { + "enum": [ + "AskToCreateInvoice", + "AlwaysCreateInvoice", + "NeverCreateInvoice" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "AskToCreateInvoice", + "AlwaysCreateInvoice", + "NeverCreateInvoice" + ] + }, + "ServiceAgreements.V2.AgreementStatus": { + "enum": [ + "Draft", + "Sent", + "Rejected", + "Accepted", + "Activated", + "Canceled", + "Expired", + "AutoRenew" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Draft", + "Sent", + "Rejected", + "Accepted", + "Activated", + "Canceled", + "Expired", + "AutoRenew" + ] + }, + "ServiceAgreements.V2.AgreementOrigin": { + "enum": [ + "Initial", + "AutoRenew", + "ManualRenew" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Initial", + "AutoRenew", + "ManualRenew" + ] + }, + "ServiceAgreements.V2.BillingScheduleType": { + "enum": [ + "Upfront", + "Monthly", + "EveryOtherMonth", + "Quarterly", + "Biannual", + "Annual", + "TimeOfService" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Upfront", + "Monthly", + "EveryOtherMonth", + "Quarterly", + "Biannual", + "Annual", + "TimeOfService" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "PaginatedResponse_Of_ServiceAgreements.V2.ServiceAgreementResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceAgreements.V2.ServiceAgreementResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "ServiceAgreements.V2.ServiceAgreementResponse": { + "required": [ + "id", + "name", + "createdOn", + "modifiedOn", + "templateFields", + "customerId", + "businessUnitId", + "status", + "locationIds", + "origin", + "importedDeferredAmount", + "importedRecognizedAmount", + "autoRenew", + "laborSurcharge", + "materialSurcharge" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Service agreement ID", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Service agreement name" + }, + "createdOn": { + "type": "string", + "description": "When the service agreement was created", + "format": "date-time" + }, + "createdById": { + "type": "integer", + "description": "ID of the user that created this agreement", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "description": "When the service agreement was last modified", + "format": "date-time" + }, + "modifiedById": { + "type": "integer", + "description": "ID of the user that modified this agreement", + "format": "int64", + "nullable": true + }, + "templateFields": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.ServiceAgreementTemplateFieldsResponse" + } + ], + "description": "Data fields that were populated from the template" + }, + "customerId": { + "type": "integer", + "description": "Customer ID of the agreement", + "format": "int64" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit ID to which this agreement is assigned", + "format": "int64" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.AgreementStatus" + } + ], + "description": "Current status of the agreement" + }, + "locationIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "Location IDs covered by the agreement" + }, + "origin": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.AgreementOrigin" + } + ], + "description": "The method used to create the agreement" + }, + "summary": { + "type": "string", + "description": "Optional text summary of the agreement", + "nullable": true + }, + "importId": { + "type": "string", + "description": "Internal import ID label", + "nullable": true + }, + "importedDeferredAmount": { + "type": "number", + "description": "Imported amount already billed for this agreement", + "format": "decimal" + }, + "importedRecognizedAmount": { + "type": "number", + "description": "Imported amount of recognized revenue for this agreement", + "format": "decimal" + }, + "durationMonths": { + "type": "integer", + "description": "Duration of the agreement in months (can be absent when the agreement is still being built)", + "format": "int32", + "nullable": true + }, + "autoRenew": { + "type": "boolean", + "description": "Determines if the agreement automatically renews or expires on its end date" + }, + "renewalAgreementId": { + "type": "integer", + "description": "Indicates the next agreement ID that renews the current agreement (null means the agreement was not renewed)", + "format": "int64", + "nullable": true + }, + "startDate": { + "type": "string", + "description": "The start date of the agreement (can be absent when the agreement is still being built)", + "format": "date", + "nullable": true + }, + "endDate": { + "type": "string", + "description": "The end date of the agreement (can be absent when the agreement is still being built)", + "format": "date", + "nullable": true + }, + "billingSchedule": { + "oneOf": [ + { + "$ref": "#/components/schemas/ServiceAgreements.V2.BillingScheduleType" + } + ], + "description": "The billing schedule of the agreement (can be absent when the agreement is still being built)", + "nullable": true + }, + "paymentTermId": { + "type": "integer", + "description": "ID of the payment terms of the agreement (can be absent when the agreement is still being built)", + "format": "int64", + "nullable": true + }, + "paymentMethodId": { + "type": "integer", + "description": "ID of the payment method of the agreement (can be absent when the agreement is still being built).\nNote there is a special hardcoded value of -1 that means \"Cash or Check\".", + "format": "int64", + "nullable": true + }, + "estimatedTravelCost": { + "type": "number", + "description": "The dollar amount of estimated travel cost for all visits (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedLaborCost": { + "type": "number", + "description": "The dollar amount of estimated labor cost for all visits (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedMaterialCost": { + "type": "number", + "description": "The dollar amount of estimated material cost for all visits (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "laborMarkupPercentage": { + "type": "number", + "description": "The markup percentage applied to labor cost of the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "materialMarkupPercentage": { + "type": "number", + "description": "The markup percentage applied to material cost of the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "laborSurcharge": { + "type": "number", + "description": "The dollar amount added to labor cost of the agreement", + "format": "decimal" + }, + "materialSurcharge": { + "type": "number", + "description": "The dollar amount added to material cost of the agreement", + "format": "decimal" + }, + "totalAgreementPrice": { + "type": "number", + "description": "The total price of the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedGrossMarginAmount": { + "type": "number", + "description": "The estimated gross margin in dollars for the agreement (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "estimatedGrossMarginPercentage": { + "type": "number", + "description": "The estimated gross margin as a percentage of the Total Agreement Price (can be absent when the agreement is still being built)", + "format": "decimal", + "nullable": true + }, + "rateSheetId": { + "type": "integer", + "description": "ID of a rate sheet (Client-Specific Pricing Rule) assigned to the service agreement", + "format": "int64", + "nullable": true + }, + "accountManagerId": { + "type": "integer", + "description": "ID of the employee assigned to the agreement", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/settings-v2.json b/openapi_specs/settings-v2.json new file mode 100644 index 0000000..114e2b8 --- /dev/null +++ b/openapi_specs/settings-v2.json @@ -0,0 +1,4866 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Settings", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/settings/v2" + } + ], + "paths": { + "/tenant/{tenant}/employees": { + "get": { + "tags": [ + "Employees" + ], + "summary": "Gets a list of employees", + "description": "Gets a list of employees", + "operationId": "Employees_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "userIds", + "in": "query", + "description": "Perform lookup by multiple User Ids (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Filters records by name (case-insensitive \"contains\" operation)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_TenantSettings.V2.EmployeeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "userId": 0, + "name": "string", + "role": {}, + "roleIds": [ + 0 + ], + "businessUnitId": 0, + "createdOn": "string", + "modifiedOn": "string", + "email": "string", + "phoneNumber": "string", + "loginName": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "active": true, + "aadUserId": "string", + "permissions": [ + { + "id": 0, + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Employees" + ], + "summary": "Creates new employee", + "description": "Creates new employee", + "operationId": "Employees_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeCreateRequest" + }, + "example": { + "name": "string", + "mobilePhoneNumber": "string", + "phoneNumber": "string", + "email": "string", + "login": "string", + "password": "string", + "accountCreationMethod": {}, + "businessUnitId": 0, + "roleId": 0, + "positions": [ + "CSR" + ], + "aadUserId": "string", + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeCreateResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/employees/{id}": { + "get": { + "tags": [ + "Employees" + ], + "summary": "Gets a employee by ID", + "description": "Gets a employee by ID", + "operationId": "Employees_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeResponse" + }, + "example": { + "id": 0, + "userId": 0, + "name": "string", + "role": {}, + "roleIds": [ + 0 + ], + "businessUnitId": 0, + "createdOn": "string", + "modifiedOn": "string", + "email": "string", + "phoneNumber": "string", + "loginName": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "active": true, + "aadUserId": "string", + "permissions": [ + { + "id": 0, + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Employee not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Employees" + ], + "summary": "Updates employee", + "description": "Updates employee", + "operationId": "Employees_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeUpdateRequest" + }, + "example": { + "name": "string", + "mobilePhoneNumber": "string", + "phoneNumber": "string", + "email": "string", + "login": "string", + "businessUnitId": 0, + "roleId": 0, + "positions": [ + "CSR" + ], + "aadUserId": "string", + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeUpdateResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/employees/{id}/account-actions": { + "post": { + "tags": [ + "Employees" + ], + "summary": "Performs standard actions with the account", + "description": "Performs standard actions with the account", + "operationId": "Employees_AccountActions", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.AccountActionRequest" + }, + "example": { + "action": {} + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.AccountActionResponse" + }, + "example": { + "status": {} + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/employees": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for employees", + "description": "Provides export feed for employees", + "operationId": "Export_Employees", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_TenantSettings.V2.ExportEmployeeResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "userId": 0, + "name": "string", + "role": {}, + "roleIds": [ + 0 + ], + "businessUnitId": 0, + "createdOn": "string", + "modifiedOn": "string", + "email": "string", + "phoneNumber": "string", + "loginName": "string", + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "active": true, + "aadUserId": "string", + "permissions": [ + { + "id": 0, + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/technicians": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for technicians", + "description": "Provides export feed for technicians", + "operationId": "Export_Technicians", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_TenantSettings.V2.ExportTechnicianResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "userId": 0, + "name": "string", + "roleIds": [ + 0 + ], + "businessUnitId": 0, + "mainZoneId": 0, + "zoneIds": [ + 0 + ], + "createdOn": "string", + "modifiedOn": "string", + "email": "string", + "phoneNumber": "string", + "loginName": "string", + "home": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "streetAddress": "string", + "latitude": 0, + "longitude": 0 + }, + "dailyGoal": 0, + "isManagedTech": true, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "active": true, + "aadUserId": "string", + "burdenRate": 0, + "team": "string", + "jobFilter": {}, + "permissions": [ + { + "id": 0, + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technicians": { + "get": { + "tags": [ + "Technicians" + ], + "summary": "Gets a list of technicians", + "description": "Gets a list of technicians", + "operationId": "Technicians_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "userIds", + "in": "query", + "description": "Perform lookup by multiple User Ids (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Filters records by name (case-insensitive \"contains\" operation)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_TenantSettings.V2.TechnicianResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "userId": 0, + "name": "string", + "roleIds": [ + 0 + ], + "businessUnitId": 0, + "mainZoneId": 0, + "zoneIds": [ + 0 + ], + "createdOn": "string", + "modifiedOn": "string", + "email": "string", + "phoneNumber": "string", + "loginName": "string", + "home": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "streetAddress": "string", + "latitude": 0, + "longitude": 0 + }, + "dailyGoal": 0, + "isManagedTech": true, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "active": true, + "aadUserId": "string", + "burdenRate": 0, + "team": "string", + "jobFilter": {}, + "permissions": [ + { + "id": 0, + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Technicians" + ], + "summary": "Creates new technician", + "description": "Creates new technician", + "operationId": "Technicians_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianCreateRequest" + }, + "example": { + "name": "string", + "phoneNumber": "string", + "email": "string", + "login": "string", + "password": "string", + "accountCreationMethod": {}, + "businessUnitId": 0, + "roleId": 0, + "positions": [ + "Installer" + ], + "aadUserId": "string", + "licenseType": {}, + "team": "string", + "dailyGoal": 0, + "burdenRate": 0, + "bio": "string", + "memo": "string", + "jobFilter": {}, + "jobHistoryDateFilter": {}, + "home": { + "unit": "string", + "street": "string", + "city": "string", + "state": "string", + "country": "string", + "zip": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianCreateResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technicians/{id}": { + "get": { + "tags": [ + "Technicians" + ], + "summary": "Gets a technician by ID", + "description": "Gets a technician by ID", + "operationId": "Technicians_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianResponse" + }, + "example": { + "id": 0, + "userId": 0, + "name": "string", + "roleIds": [ + 0 + ], + "businessUnitId": 0, + "mainZoneId": 0, + "zoneIds": [ + 0 + ], + "createdOn": "string", + "modifiedOn": "string", + "email": "string", + "phoneNumber": "string", + "loginName": "string", + "home": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "streetAddress": "string", + "latitude": 0, + "longitude": 0 + }, + "dailyGoal": 0, + "isManagedTech": true, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "active": true, + "aadUserId": "string", + "burdenRate": 0, + "team": "string", + "jobFilter": {}, + "permissions": [ + { + "id": 0, + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Technician not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "Technicians" + ], + "summary": "Updates technician", + "description": "Updates technician", + "operationId": "Technicians_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianUpdateRequest" + }, + "example": { + "name": "string", + "phoneNumber": "string", + "email": "string", + "login": "string", + "businessUnitId": 0, + "roleId": 0, + "positions": [ + "Installer" + ], + "aadUserId": "string", + "licenseType": {}, + "team": "string", + "dailyGoal": 0, + "burdenRate": 0, + "bio": "string", + "memo": "string", + "jobFilter": {}, + "jobHistoryDateFilter": {}, + "home": { + "unit": "string", + "street": "string", + "city": "string", + "state": "string", + "country": "string", + "zip": "string", + "latitude": 0, + "longitude": 0 + }, + "customFields": [ + { + "typeId": 0, + "value": "string" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianUpdateResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/technicians/{id}/account-actions": { + "post": { + "tags": [ + "Technicians" + ], + "summary": "Performs standard actions with the account", + "description": "Performs standard actions with the account", + "operationId": "Technicians_AccountActions", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.AccountActionRequest" + }, + "example": { + "action": {} + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.AccountActionResponse" + }, + "example": { + "status": {} + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/user-roles": { + "get": { + "tags": [ + "UserRoles" + ], + "summary": "Gets a list of user roles", + "description": "Gets a list of user roles", + "operationId": "UserRoles_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Filters records by name (case-insensitive \"contains\" operation)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "employeeType", + "in": "query", + "description": "Filter roles by employee type\\\nValues: [None, Employee, Technician, All]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.RequestedEmployeeTypeArg" + } + ], + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_TenantSettings.V2.UserRoleResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "createdOn": "string", + "employeeType": "Employee" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/business-units": { + "get": { + "tags": [ + "BusinessUnits" + ], + "summary": "Gets a list of business units", + "description": "Gets a list of business units", + "operationId": "BusinessUnits_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Filters records by name (case-insensitive \"contains\" operation)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid. If this guid is provided, external data corresponding to\nthis application guid will be returned.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_TenantSettings.V2.BusinessUnitResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "officialName": "string", + "email": "string", + "currency": "string", + "phoneNumber": "string", + "invoiceHeader": "string", + "invoiceMessage": "string", + "defaultTaxRate": 0, + "authorizationParagraph": "string", + "acknowledgementParagraph": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "materialSku": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "corporateContractNumber": "string", + "tenant": { + "id": 0, + "name": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "modifiedOn": "string" + }, + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/business-units/{id}": { + "get": { + "tags": [ + "BusinessUnits" + ], + "summary": "Gets a business unit by ID", + "description": "Gets a business unit by ID", + "operationId": "BusinessUnits_Get", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "externalDataApplicationGuid", + "in": "query", + "description": "Format - guid.", + "schema": { + "type": "string", + "format": "guid", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.BusinessUnitResponse" + }, + "example": { + "id": 0, + "active": true, + "name": "string", + "officialName": "string", + "email": "string", + "currency": "string", + "phoneNumber": "string", + "invoiceHeader": "string", + "invoiceMessage": "string", + "defaultTaxRate": 0, + "authorizationParagraph": "string", + "acknowledgementParagraph": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "materialSku": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "corporateContractNumber": "string", + "tenant": { + "id": 0, + "name": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "modifiedOn": "string" + }, + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "Business unit not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "patch": { + "tags": [ + "BusinessUnits" + ], + "summary": "Update an existing BusinessUnit", + "description": "Update an existing BusinessUnit", + "operationId": "BusinessUnits_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. BusinessUnit Id", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "Update BusinessUnit Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TenantSettings.V2.UpdateBusinessUnitRequest" + }, + "example": { + "externalData": { + "patchMode": {}, + "applicationGuid": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Id of the updated BusinessUnit", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ModificationResponse" + }, + "example": { + "id": 0 + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/business-units": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for business units", + "description": "Provides export feed for business units", + "operationId": "Export_BusinessUnits", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_TenantSettings.V2.ExportBusinessUnitResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "active": true, + "name": "string", + "officialName": "string", + "email": "string", + "currency": "string", + "phoneNumber": "string", + "invoiceHeader": "string", + "invoiceMessage": "string", + "defaultTaxRate": 0, + "authorizationParagraph": "string", + "acknowledgementParagraph": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "materialSku": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "corporateContractNumber": "string", + "tenant": { + "id": 0, + "name": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "modifiedOn": "string" + }, + "createdOn": "string", + "modifiedOn": "string", + "externalData": [ + { + "key": "string", + "value": "string" + } + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/export/tag-types": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for tag types", + "description": "Provides export feed for tag types", + "operationId": "Export_TagTypes", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_TenantSettings.V2.ExportTagTypeResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "name": "string", + "color": "string", + "code": "string", + "importance": {}, + "isConversionOpportunity": true, + "active": true, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/tag-types": { + "get": { + "tags": [ + "TagTypes" + ], + "summary": "Gets a list of tag types", + "description": "Gets a list of tag types", + "operationId": "TagTypes_GetList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_TenantSettings.V2.TagTypeResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "name": "string", + "color": "string", + "code": "string", + "importance": {}, + "isConversionOpportunity": true, + "active": true, + "createdOn": "string", + "modifiedOn": "string" + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_TenantSettings.V2.EmployeeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "TenantSettings.V2.EmployeeResponse": { + "required": [ + "id", + "userId", + "name", + "role", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the employee", + "format": "int64" + }, + "userId": { + "type": "integer", + "description": "ID of the user that belongs to the employee", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Employee's name" + }, + "role": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeUserRole" + } + ], + "description": "[DEPRECATED] Please, use field RoleIds> instead.\nBuilt in user role. Built in role is a template for creating user role." + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the user roles assigned to the technician.", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of business unit employee belongs to", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the employee was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the employee was modified", + "format": "date-time" + }, + "email": { + "type": "string", + "description": "Email address of the employee", + "format": "email", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "description": "Phone number of the employee", + "format": "phone", + "nullable": true + }, + "loginName": { + "type": "string", + "description": "Login name of the employee", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeCustomFieldResponse" + }, + "description": "Custom fields", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether the employee is active" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id", + "nullable": true + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeePermissionResponse" + }, + "description": "List of the all availible permissions for this user.", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.EmployeeUserRole": { + "enum": [ + "Unspecified", + "Technician", + "Dispatch", + "Accounting", + "FieldManager", + "DisplayUser", + "DisplayUserWithBillingAccess", + "SalesManager", + "CSR", + "GeneralOffice", + "TechnicianHelper", + "TechnicianMaintenance", + "TechnicianInstaller", + "Admin", + "TechnicianService", + "TechnicianSales", + "Owner", + "EmptyEmployee", + "EmptyTechnician" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Unspecified", + "Technician", + "Dispatch", + "Accounting", + "FieldManager", + "DisplayUser", + "DisplayUserWithBillingAccess", + "SalesManager", + "CSR", + "GeneralOffice", + "TechnicianHelper", + "TechnicianMaintenance", + "TechnicianInstaller", + "Admin", + "TechnicianService", + "TechnicianSales", + "Owner", + "EmptyEmployee", + "EmptyTechnician" + ] + }, + "TenantSettings.V2.EmployeeCustomFieldResponse": { + "required": [ + "typeId" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.EmployeePermissionResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "TenantSettings.V2.EmployeeCreateResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Employee Id", + "format": "int64" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.EmployeeCreateRequest": { + "required": [ + "name", + "email", + "accountCreationMethod", + "roleId", + "positions" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Employee name" + }, + "mobilePhoneNumber": { + "type": "string", + "description": "Mobile phone", + "format": "phone", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "description": "Office phone", + "format": "phone", + "nullable": true + }, + "email": { + "type": "string", + "description": "Email", + "format": "email" + }, + "login": { + "type": "string", + "description": "Login (Username)", + "nullable": true + }, + "password": { + "type": "string", + "description": "Password", + "format": "password", + "nullable": true + }, + "accountCreationMethod": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.AccountCreationMethod" + } + ], + "description": "Account creation method" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit Id", + "format": "int64", + "nullable": true + }, + "roleId": { + "type": "integer", + "description": "User role Id", + "format": "int64" + }, + "positions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeePosition" + }, + "description": "List of company positions" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeCustomFieldCreateOrUpdateRequest" + }, + "description": "List of employee's custom fields", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.AccountCreationMethod": { + "enum": [ + "CreateLater", + "SendInvite", + "AssignLoginAndPassword" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "CreateLater", + "SendInvite", + "AssignLoginAndPassword" + ] + }, + "TenantSettings.V2.EmployeePosition": { + "enum": [ + "CSR", + "Dispatcher", + "CsrManager", + "DispatchManager", + "InstallProductionManager", + "ServiceManager", + "SalesManager", + "MarketingManager", + "Administrator", + "PayrollManager", + "Bookkeeper", + "PurchasingManager", + "WarehouseManager", + "OfficeManager", + "GeneralManager", + "BusinessOwner", + "AnsweringService", + "InsideSales", + "GeneralOfficeNonManagement" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "CSR", + "Dispatcher", + "CsrManager", + "DispatchManager", + "InstallProductionManager", + "ServiceManager", + "SalesManager", + "MarketingManager", + "Administrator", + "PayrollManager", + "Bookkeeper", + "PurchasingManager", + "WarehouseManager", + "OfficeManager", + "GeneralManager", + "BusinessOwner", + "AnsweringService", + "InsideSales", + "GeneralOfficeNonManagement" + ] + }, + "TenantSettings.V2.EmployeeCustomFieldCreateOrUpdateRequest": { + "required": [ + "typeId" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.EmployeeUpdateResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Employee Id", + "format": "int64" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.EmployeeUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Employee name" + }, + "mobilePhoneNumber": { + "type": "string", + "description": "Mobile phone", + "format": "phone" + }, + "phoneNumber": { + "type": "string", + "description": "Office phone", + "format": "phone" + }, + "email": { + "type": "string", + "description": "Email", + "format": "email" + }, + "login": { + "type": "string", + "description": "Login (Username)" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit Id", + "format": "int64", + "nullable": true + }, + "roleId": { + "type": "integer", + "description": "User role Id", + "format": "int64" + }, + "positions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeePosition" + }, + "description": "List of company positions" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeCustomFieldCreateOrUpdateRequest" + }, + "description": "List of employee's custom fields" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.AccountActionResponse": { + "required": [ + "status" + ], + "type": "object", + "properties": { + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.AccountActionStatus" + } + ], + "description": "Status" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.AccountActionStatus": { + "enum": [ + "Success" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Success" + ] + }, + "TenantSettings.V2.AccountActionRequest": { + "required": [ + "action" + ], + "type": "object", + "properties": { + "action": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.AccountAction" + } + ], + "description": "Action name" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.AccountAction": { + "enum": [ + "Activate", + "Deactivate", + "SendInvite", + "SendPasswordResetLink" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Activate", + "Deactivate", + "SendInvite", + "SendPasswordResetLink" + ] + }, + "ExportResponse_Of_TenantSettings.V2.ExportEmployeeResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExportEmployeeResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "TenantSettings.V2.ExportEmployeeResponse": { + "required": [ + "id", + "userId", + "name", + "role", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the employee", + "format": "int64" + }, + "userId": { + "type": "integer", + "description": "ID of the user that belongs to the employee", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Employee's name" + }, + "role": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeUserRole" + } + ], + "description": "[DEPRECATED] Please, use field RoleIds> instead.\nBuilt in user role. Built in role is a template for creating user role." + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the user roles assigned to the technician.", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of business unit employee belongs to", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the employee was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the employee was modified", + "format": "date-time" + }, + "email": { + "type": "string", + "description": "Email address of the employee", + "format": "email", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "description": "Phone number of the employee", + "format": "phone", + "nullable": true + }, + "loginName": { + "type": "string", + "description": "Login name of the employee", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeCustomFieldResponse" + }, + "description": "Custom fields", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether the employee is active" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id", + "nullable": true + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeePermissionResponse" + }, + "description": "List of the all availible permissions for this user.", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_TenantSettings.V2.ExportTechnicianResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExportTechnicianResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "TenantSettings.V2.ExportTechnicianResponse": { + "required": [ + "id", + "userId", + "name", + "createdOn", + "modifiedOn", + "dailyGoal", + "isManagedTech", + "active", + "burdenRate" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the technician", + "format": "int64" + }, + "userId": { + "type": "integer", + "description": "ID of the user that belongs to the technician", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Technician's name" + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the user roles assigned to the technician.", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of business unit technician belongs to", + "format": "int64", + "nullable": true + }, + "mainZoneId": { + "type": "integer", + "description": "ID of the main technician's zone", + "format": "int64", + "nullable": true + }, + "zoneIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of all technician's zones", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the technician was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the technician was modified", + "format": "date-time" + }, + "email": { + "type": "string", + "description": "Email address of the technician", + "format": "email", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "description": "Phone number of the technician", + "format": "phone", + "nullable": true + }, + "loginName": { + "type": "string", + "description": "Login name of the technician", + "nullable": true + }, + "home": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianAddressResponse" + } + ], + "description": "Technician's home address", + "nullable": true + }, + "dailyGoal": { + "type": "number", + "description": "Technician's daily goal", + "format": "decimal" + }, + "isManagedTech": { + "type": "boolean", + "description": "Whether the technician is managed" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianCustomFieldResponse" + }, + "description": "Custom fields", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether the technician is active" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id", + "nullable": true + }, + "burdenRate": { + "type": "number", + "description": "Technician's burden rate", + "format": "decimal" + }, + "team": { + "type": "string", + "description": "Team of the technician", + "nullable": true + }, + "jobFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.JobFilter" + } + ], + "description": "Job Filter of the technician", + "nullable": true + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianPermissionResponse" + }, + "description": "List of the all availible permissions for this user.", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianAddressResponse": { + "type": "object", + "properties": { + "street": { + "type": "string", + "nullable": true + }, + "unit": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "state": { + "type": "string", + "nullable": true + }, + "zip": { + "type": "string", + "nullable": true + }, + "streetAddress": { + "type": "string", + "nullable": true + }, + "latitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianCustomFieldResponse": { + "required": [ + "typeId" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.JobFilter": { + "enum": [ + "AllScheduledDispatchedWorking", + "NextScheduledDispatchedWorking", + "DispatchedWorking", + "NextScheduledDispatchedWorkingToday", + "AllScheduledDispatchedWorkingToday", + "AllScheduledDispatchedWorkingFiveDays", + "NextScheduledDispatchedWorkingTodayTomorrow", + "AllScheduledDispatchedWorkingTodayTomorrow", + "Next2ScheduledDispatchedWorkingToday" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "AllScheduledDispatchedWorking", + "NextScheduledDispatchedWorking", + "DispatchedWorking", + "NextScheduledDispatchedWorkingToday", + "AllScheduledDispatchedWorkingToday", + "AllScheduledDispatchedWorkingFiveDays", + "NextScheduledDispatchedWorkingTodayTomorrow", + "AllScheduledDispatchedWorkingTodayTomorrow", + "Next2ScheduledDispatchedWorkingToday" + ] + }, + "TenantSettings.V2.TechnicianPermissionResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_TenantSettings.V2.TechnicianResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "TenantSettings.V2.TechnicianResponse": { + "required": [ + "id", + "userId", + "name", + "createdOn", + "modifiedOn", + "dailyGoal", + "isManagedTech", + "active", + "burdenRate" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the technician", + "format": "int64" + }, + "userId": { + "type": "integer", + "description": "ID of the user that belongs to the technician", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Technician's name" + }, + "roleIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of the user roles assigned to the technician.", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "description": "ID of business unit technician belongs to", + "format": "int64", + "nullable": true + }, + "mainZoneId": { + "type": "integer", + "description": "ID of the main technician's zone", + "format": "int64", + "nullable": true + }, + "zoneIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "description": "IDs of all technician's zones", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "When the technician was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "When the technician was modified", + "format": "date-time" + }, + "email": { + "type": "string", + "description": "Email address of the technician", + "format": "email", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "description": "Phone number of the technician", + "format": "phone", + "nullable": true + }, + "loginName": { + "type": "string", + "description": "Login name of the technician", + "nullable": true + }, + "home": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianAddressResponse" + } + ], + "description": "Technician's home address", + "nullable": true + }, + "dailyGoal": { + "type": "number", + "description": "Technician's daily goal", + "format": "decimal" + }, + "isManagedTech": { + "type": "boolean", + "description": "Whether the technician is managed" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianCustomFieldResponse" + }, + "description": "Custom fields", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Whether the technician is active" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id", + "nullable": true + }, + "burdenRate": { + "type": "number", + "description": "Technician's burden rate", + "format": "decimal" + }, + "team": { + "type": "string", + "description": "Team of the technician", + "nullable": true + }, + "jobFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.JobFilter" + } + ], + "description": "Job Filter of the technician", + "nullable": true + }, + "permissions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianPermissionResponse" + }, + "description": "List of the all availible permissions for this user.", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianCreateResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Technician Id", + "format": "int64" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianCreateRequest": { + "required": [ + "name", + "accountCreationMethod", + "roleId", + "positions", + "licenseType" + ], + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Technician name" + }, + "phoneNumber": { + "type": "string", + "description": "Technician's phone number", + "format": "phone", + "nullable": true + }, + "email": { + "type": "string", + "description": "Email", + "format": "email", + "nullable": true + }, + "login": { + "type": "string", + "description": "Login (Username)", + "nullable": true + }, + "password": { + "type": "string", + "description": "Password", + "format": "password", + "nullable": true + }, + "accountCreationMethod": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.AccountCreationMethod" + } + ], + "description": "Account creation method" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit Id", + "format": "int64", + "nullable": true + }, + "roleId": { + "type": "integer", + "description": "User role Id", + "format": "int64" + }, + "positions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianPosition" + }, + "description": "List of company positions" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id", + "nullable": true + }, + "licenseType": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.LicenseType" + } + ], + "description": "License type" + }, + "team": { + "type": "string", + "description": "Team name", + "nullable": true + }, + "dailyGoal": { + "type": "number", + "description": "Daily revenue goal", + "format": "decimal", + "nullable": true + }, + "burdenRate": { + "type": "number", + "description": "Burden rate (hourly)", + "format": "decimal", + "nullable": true + }, + "bio": { + "type": "string", + "description": "Biography", + "format": "html", + "nullable": true + }, + "memo": { + "type": "string", + "description": "Memo", + "format": "html", + "nullable": true + }, + "jobFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.JobFilter" + } + ], + "description": "Upcoming appointment visibility", + "nullable": true + }, + "jobHistoryDateFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.JobHistoryDateFilter" + } + ], + "description": "Appointment history visibility", + "nullable": true + }, + "home": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.CreateOrUpdateAddressRequest" + } + ], + "description": "Home address", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianCustomFieldCreateOrUpdateRequest" + }, + "description": "List of Technician's custom fields", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianPosition": { + "enum": [ + "Installer", + "Service", + "Sales", + "Maintenance", + "Helper", + "InstallProductionManager", + "ServiceManager", + "SalesManager", + "PartRunner", + "DummyTech" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Installer", + "Service", + "Sales", + "Maintenance", + "Helper", + "InstallProductionManager", + "ServiceManager", + "SalesManager", + "PartRunner", + "DummyTech" + ] + }, + "TenantSettings.V2.LicenseType": { + "enum": [ + "NonManagedTech", + "ManagedTech", + "ManagedInstaller" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "NonManagedTech", + "ManagedTech", + "ManagedInstaller" + ] + }, + "TenantSettings.V2.JobHistoryDateFilter": { + "enum": [ + "AllJobs", + "LastThreeDays", + "LastSevenDays", + "LastMonth" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "AllJobs", + "LastThreeDays", + "LastSevenDays", + "LastMonth" + ] + }, + "TenantSettings.V2.CreateOrUpdateAddressRequest": { + "required": [ + "street", + "city" + ], + "type": "object", + "properties": { + "unit": { + "type": "string", + "nullable": true + }, + "street": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + }, + "zip": { + "type": "string", + "nullable": true + }, + "latitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianCustomFieldCreateOrUpdateRequest": { + "required": [ + "typeId" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "value": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianUpdateResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Technician Id", + "format": "int64" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TechnicianUpdateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Technician name" + }, + "phoneNumber": { + "type": "string", + "description": "Technician's phone number", + "format": "phone" + }, + "email": { + "type": "string", + "description": "Email", + "format": "email" + }, + "login": { + "type": "string", + "description": "Login (Username)" + }, + "businessUnitId": { + "type": "integer", + "description": "Business unit Id", + "format": "int64", + "nullable": true + }, + "roleId": { + "type": "integer", + "description": "User role Id", + "format": "int64" + }, + "positions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianPosition" + }, + "description": "List of company positions" + }, + "aadUserId": { + "type": "string", + "description": "Azure Active Directory User Id" + }, + "licenseType": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.LicenseType" + } + ], + "description": "License type" + }, + "team": { + "type": "string", + "description": "Team name" + }, + "dailyGoal": { + "type": "number", + "description": "Daily revenue goal", + "format": "decimal", + "nullable": true + }, + "burdenRate": { + "type": "number", + "description": "Burden rate (hourly)", + "format": "decimal", + "nullable": true + }, + "bio": { + "type": "string", + "description": "Biography", + "format": "html" + }, + "memo": { + "type": "string", + "description": "Memo", + "format": "html" + }, + "jobFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.JobFilter" + } + ], + "description": "Upcoming appointment visibility", + "nullable": true + }, + "jobHistoryDateFilter": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.JobHistoryDateFilter" + } + ], + "description": "Appointment history visibility", + "nullable": true + }, + "home": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.CreateOrUpdateAddressRequest" + } + ], + "description": "Home address" + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TechnicianCustomFieldCreateOrUpdateRequest" + }, + "description": "List of Technician's custom fields" + } + }, + "additionalProperties": false + }, + "PaginatedResponse_Of_TenantSettings.V2.UserRoleResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.UserRoleResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "TenantSettings.V2.UserRoleResponse": { + "required": [ + "id", + "active", + "name", + "createdOn", + "employeeType" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "employeeType": { + "$ref": "#/components/schemas/TenantSettings.V2.EmployeeType" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.EmployeeType": { + "enum": [ + "Employee", + "Technician" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Employee", + "Technician" + ] + }, + "TenantSettings.V2.RequestedEmployeeTypeArg": { + "enum": [ + "None", + "Employee", + "Technician", + "All" + ], + "type": "string", + "description": "", + "x-enumFlags": true, + "x-enumNames": [ + "None", + "Employee", + "Technician", + "All" + ] + }, + "PaginatedResponse_Of_TenantSettings.V2.BusinessUnitResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.BusinessUnitResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "TenantSettings.V2.BusinessUnitResponse": { + "required": [ + "id", + "active", + "name", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "officialName": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "currency": { + "type": "string", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "format": "phone", + "nullable": true + }, + "invoiceHeader": { + "type": "string", + "format": "html", + "nullable": true + }, + "invoiceMessage": { + "type": "string", + "format": "html", + "nullable": true + }, + "defaultTaxRate": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "authorizationParagraph": { + "type": "string", + "format": "html", + "nullable": true + }, + "acknowledgementParagraph": { + "type": "string", + "format": "html", + "nullable": true + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.BusinessUnitAddressResponse" + } + ], + "nullable": true + }, + "materialSku": { + "type": "string", + "nullable": true + }, + "quickbooksClass": { + "type": "string", + "nullable": true + }, + "accountCode": { + "type": "string", + "nullable": true + }, + "franchiseId": { + "type": "string", + "nullable": true + }, + "conceptCode": { + "type": "string", + "nullable": true + }, + "corporateContractNumber": { + "type": "string", + "nullable": true + }, + "tenant": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.BusinessUnitTenantResponse" + } + ], + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExternalDataModel" + }, + "description": "Optional model that contains a list of external data items\nthat should be attached to this business unit.", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.BusinessUnitAddressResponse": { + "type": "object", + "properties": { + "street": { + "type": "string", + "nullable": true + }, + "unit": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string", + "nullable": true + }, + "state": { + "type": "string", + "nullable": true + }, + "zip": { + "type": "string", + "nullable": true + }, + "country": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.BusinessUnitTenantResponse": { + "required": [ + "id", + "name", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "accountCode": { + "type": "string", + "nullable": true + }, + "franchiseId": { + "type": "string", + "nullable": true + }, + "conceptCode": { + "type": "string", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.ExternalDataModel": { + "required": [ + "key", + "value" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value." + } + }, + "additionalProperties": false + }, + "ModificationResponse": { + "required": [ + "id" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of created/updated object", + "format": "int64" + } + }, + "additionalProperties": false, + "description": "Default response when creating object with a new ID, or updating object by specified ID." + }, + "TenantSettings.V2.UpdateBusinessUnitRequest": { + "type": "object", + "properties": { + "externalData": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.ExternalDataUpdateRequest" + } + ], + "description": "Optional model that contains a list of external data items\nthat should be attached to this business unit." + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.ExternalDataUpdateRequest": { + "required": [ + "applicationGuid", + "externalData" + ], + "type": "object", + "properties": { + "patchMode": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.ExternalDataPatchMode" + } + ], + "description": "External data patch mode.\\\n\"Replace\" (default) replaces all existing keys with new values. If job A has custom data with keys X and Y and this field only contains an item\nwith a key X, then custom data with a key Y on job A will be removed.\\\n\"Merge\" will only replace key X in the example above. Keys with null value will be deleted.", + "nullable": true + }, + "applicationGuid": { + "type": "string", + "description": "Items that are created with a specific guid, could be fetched/updated/removed\nonly when the same application guid is provided.", + "format": "guid" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExternalDataUpdateModel" + }, + "description": "External data list." + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.ExternalDataPatchMode": { + "enum": [ + "Replace", + "Merge" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Replace", + "Merge" + ] + }, + "TenantSettings.V2.ExternalDataUpdateModel": { + "required": [ + "key" + ], + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "External data key." + }, + "value": { + "type": "string", + "description": "External data value.", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_TenantSettings.V2.ExportBusinessUnitResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExportBusinessUnitResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "TenantSettings.V2.ExportBusinessUnitResponse": { + "required": [ + "id", + "active", + "name", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "officialName": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "format": "email", + "nullable": true + }, + "currency": { + "type": "string", + "nullable": true + }, + "phoneNumber": { + "type": "string", + "format": "phone", + "nullable": true + }, + "invoiceHeader": { + "type": "string", + "format": "html", + "nullable": true + }, + "invoiceMessage": { + "type": "string", + "format": "html", + "nullable": true + }, + "defaultTaxRate": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "authorizationParagraph": { + "type": "string", + "format": "html", + "nullable": true + }, + "acknowledgementParagraph": { + "type": "string", + "format": "html", + "nullable": true + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.BusinessUnitAddressResponse" + } + ], + "nullable": true + }, + "materialSku": { + "type": "string", + "nullable": true + }, + "quickbooksClass": { + "type": "string", + "nullable": true + }, + "accountCode": { + "type": "string", + "nullable": true + }, + "franchiseId": { + "type": "string", + "nullable": true + }, + "conceptCode": { + "type": "string", + "nullable": true + }, + "corporateContractNumber": { + "type": "string", + "nullable": true + }, + "tenant": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.BusinessUnitTenantResponse" + } + ], + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "externalData": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExternalDataModel" + }, + "description": "Optional model that contains a list of external data items\nthat should be attached to this business unit.", + "nullable": true + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_TenantSettings.V2.ExportTagTypeResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.ExportTagTypeResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "TenantSettings.V2.ExportTagTypeResponse": { + "required": [ + "id", + "name", + "color", + "code", + "isConversionOpportunity", + "active", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the tag type", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the tag type" + }, + "color": { + "type": "string", + "description": "Color hex string of the tag type" + }, + "code": { + "type": "string", + "description": "Code associated with the tag type" + }, + "importance": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.TagImportance" + } + ], + "description": "The TagImportance of the tag type", + "nullable": true + }, + "isConversionOpportunity": { + "type": "boolean", + "description": "Indicates whether tags of this type should be considered as an opportunity" + }, + "active": { + "type": "boolean", + "description": "Whether the tag type is active" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the tag type was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when the tag type was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "TenantSettings.V2.TagImportance": { + "enum": [ + "Medium", + "High" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Medium", + "High" + ] + }, + "PaginatedResponse_Of_TenantSettings.V2.TagTypeResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TenantSettings.V2.TagTypeResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "TenantSettings.V2.TagTypeResponse": { + "required": [ + "id", + "name", + "color", + "code", + "isConversionOpportunity", + "active", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID of the tag type", + "format": "int64" + }, + "name": { + "type": "string", + "description": "Name of the tag type" + }, + "color": { + "type": "string", + "description": "Color hex string of the tag type" + }, + "code": { + "type": "string", + "description": "Code associated with the tag type" + }, + "importance": { + "oneOf": [ + { + "$ref": "#/components/schemas/TenantSettings.V2.TagImportance" + } + ], + "description": "The TagImportance of the tag type", + "nullable": true + }, + "isConversionOpportunity": { + "type": "boolean", + "description": "Indicates whether tags of this type should be considered as an opportunity" + }, + "active": { + "type": "boolean", + "description": "Whether the tag type is active" + }, + "createdOn": { + "type": "string", + "description": "Date/time (in UTC) when the tag type was created", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "Date/time (in UTC) when the tag type was last modified", + "format": "date-time" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/task-management-v2.json b/openapi_specs/task-management-v2.json new file mode 100644 index 0000000..72d225f --- /dev/null +++ b/openapi_specs/task-management-v2.json @@ -0,0 +1,1888 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Task Management", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/taskmanagement/v2" + } + ], + "paths": { + "/tenant/{tenant}/data": { + "get": { + "tags": [ + "ClientSideData" + ], + "summary": "ClientSideData_Get", + "operationId": "ClientSideData_Get", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideDataResponse" + }, + "example": { + "employees": [ + { + "id": 0, + "name": "string", + "active": true + } + ], + "businessUnits": [ + { + "name": "string", + "value": 0 + } + ], + "taskPriorities": [ + { + "name": "string" + } + ], + "taskResolutionTypes": [ + { + "name": "string" + } + ], + "taskStatuses": [ + { + "name": "string" + } + ], + "taskTypes": [ + { + "id": 0, + "name": "string", + "active": true, + "excludedTaskResolutionIds": [ + 0 + ] + } + ], + "taskSources": [ + { + "id": 0, + "name": "string", + "active": true + } + ], + "taskResolutions": [ + { + "id": 0, + "name": "string", + "type": "Custom", + "active": true, + "excludedTaskTypeIds": [ + 0 + ] + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/tasks": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a list of tasks", + "description": "Get a list of tasks", + "operationId": "Tasks_GetTasks", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "Values: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Created date before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Created date on or after", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Modified date before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Modified date on or after", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "reportedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Reported date before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "reportedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Reported On or After", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "completeBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Completed Before", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "completeOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Completed On or After", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "isClosed", + "in": "query", + "description": "Is Closed", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Task Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "name", + "in": "query", + "description": "Name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeSubtasks", + "in": "query", + "description": "Include Subtasks", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "businessUnitIds", + "in": "query", + "description": "Business Unit Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "employeeTaskTypeIds", + "in": "query", + "description": "EmployeeTaskType Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "employeeTaskSourceIds", + "in": "query", + "description": "EmployeeTaskSource Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "employeeTaskResolutionIds", + "in": "query", + "description": "EmployeeTaskResolution Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "reportedById", + "in": "query", + "description": "Format - int64. Reported By Id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "assignedToId", + "in": "query", + "description": "Format - int64. Assigned to Id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "involvedEmployeeIdList", + "in": "query", + "description": "Involved Employee Ids (comma separated Ids)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "customerId", + "in": "query", + "description": "Format - int64. Customer Id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobId", + "in": "query", + "description": "Format - int64. Job Id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "projectId", + "in": "query", + "description": "Format - int64. Project Id", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "priorities", + "in": "query", + "description": "Priorities (comma separated values)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "taskNumber", + "in": "query", + "description": "Format - int64. Task Number", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "jobNumber", + "in": "query", + "description": "Job Number", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "Applies sorting by the specified field:\\\n\"?sort=+FieldName\" for ascending order,\\\n\"?sort=-FieldName\" for descending order.\\\n\\\nAvailable fields are: Id, CreatedOn, ModifiedOn, CompletedBy, Priority", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_TaskManagement.V2.TaskGetResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "reportedById": 0, + "assignedToId": 0, + "active": true, + "isClosed": true, + "closedOn": "string", + "name": "string", + "businessUnitId": 0, + "employeeTaskTypeId": 0, + "employeeTaskSourceId": 0, + "employeeTaskResolutionId": 0, + "reportedOn": "string", + "completeBy": "string", + "involvedEmployeeIdList": [ + 0 + ], + "customerId": 0, + "jobId": 0, + "projectId": 0, + "description": "string", + "priority": "string", + "id": 0, + "taskNumber": 0, + "customerName": "string", + "jobNumber": "string", + "refundIssued": 0, + "descriptionModifiedOn": "string", + "descriptionModifiedById": 0, + "createdOn": "string", + "modifiedOn": "string", + "comments": [ + { + "employeeId": 0, + "comment": "string", + "createdOn": "string" + } + ], + "attachments": [ + { + "createdOn": "string", + "createdBy": 0, + "count": 0, + "files": [ + { + "url": "string", + "filename": "string" + } + ] + } + ], + "subTasksData": { + "count": 0, + "subTasks": [ + { + "assignedToId": 0, + "reportedById": 0, + "active": true, + "isClosed": true, + "closedOn": "string", + "name": "string", + "createdOn": "string", + "dueDateTime": "string", + "subtaskNumber": 0, + "isViewed": true, + "assignedDateTime": "string", + "comments": [ + { + "employeeId": 0, + "comment": "string", + "createdOn": "string" + } + ] + } + ] + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "Tasks" + ], + "summary": "Tasks_Create", + "operationId": "Tasks_Create", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskCreateRequest" + }, + "example": { + "reportedById": 0, + "assignedToId": 0, + "isClosed": true, + "name": "string", + "businessUnitId": 0, + "employeeTaskTypeId": 0, + "employeeTaskSourceId": 0, + "employeeTaskResolutionId": 0, + "reportedDate": "string", + "completeBy": "string", + "involvedEmployeeIdList": [ + 0 + ], + "customerId": 0, + "jobId": 0, + "projectId": 0, + "description": "string", + "priority": "Low" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskCreateResponse" + }, + "example": { + "reportedById": 0, + "assignedToId": 0, + "isClosed": true, + "name": "string", + "businessUnitId": 0, + "employeeTaskTypeId": 0, + "employeeTaskSourceId": 0, + "employeeTaskResolutionId": 0, + "reportedDate": "string", + "completeBy": "string", + "involvedEmployeeIdList": [ + 0 + ], + "customerId": 0, + "jobId": 0, + "projectId": 0, + "description": "string", + "priority": "Low", + "id": 0, + "taskNumber": 0, + "customerName": "string", + "jobNumber": "string", + "refundIssued": 0, + "descriptionModifiedOn": "string", + "descriptionModifiedBy": "string", + "createdOn": "string", + "modifiedOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/tasks/{id}": { + "get": { + "tags": [ + "Tasks" + ], + "summary": "Get a Task by Id", + "description": "Get a Task by Id", + "operationId": "Tasks_GetTask", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "includeSubtasks", + "in": "query", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskGetResponse" + }, + "example": { + "reportedById": 0, + "assignedToId": 0, + "active": true, + "isClosed": true, + "closedOn": "string", + "name": "string", + "businessUnitId": 0, + "employeeTaskTypeId": 0, + "employeeTaskSourceId": 0, + "employeeTaskResolutionId": 0, + "reportedOn": "string", + "completeBy": "string", + "involvedEmployeeIdList": [ + 0 + ], + "customerId": 0, + "jobId": 0, + "projectId": 0, + "description": "string", + "priority": "string", + "id": 0, + "taskNumber": 0, + "customerName": "string", + "jobNumber": "string", + "refundIssued": 0, + "descriptionModifiedOn": "string", + "descriptionModifiedById": 0, + "createdOn": "string", + "modifiedOn": "string", + "comments": [ + { + "employeeId": 0, + "comment": "string", + "createdOn": "string" + } + ], + "attachments": [ + { + "createdOn": "string", + "createdBy": 0, + "count": 0, + "files": [ + { + "url": "string", + "filename": "string" + } + ] + } + ], + "subTasksData": { + "count": 0, + "subTasks": [ + { + "assignedToId": 0, + "reportedById": 0, + "active": true, + "isClosed": true, + "closedOn": "string", + "name": "string", + "createdOn": "string", + "dueDateTime": "string", + "subtaskNumber": 0, + "isViewed": true, + "assignedDateTime": "string", + "comments": [ + { + "employeeId": 0, + "comment": "string", + "createdOn": "string" + } + ] + } + ] + } + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + }, + "404": { + "description": "The requested entity was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/tenant/{tenant}/tasks/{id}/subtasks": { + "post": { + "tags": [ + "Tasks" + ], + "summary": "Tasks_CreateSubtask", + "operationId": "Tasks_CreateSubtask", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskManagement.V2.SubtaskCreateRequest" + }, + "example": { + "isClosed": true, + "name": "string", + "assignedToId": 0, + "dueDateTime": "string" + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TaskManagement.V2.SubtaskCreateResponse" + }, + "example": { + "isClosed": true, + "name": "string", + "assignedToId": 0, + "dueDateTime": "string", + "parentTaskId": 0, + "subtaskNumber": "string", + "isViewed": true, + "assignedDateTime": "string", + "createdOn": "string" + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "TaskManagement.V2.ClientSideDataResponse": { + "required": [ + "employees", + "businessUnits", + "taskPriorities", + "taskResolutionTypes", + "taskStatuses", + "taskTypes", + "taskSources", + "taskResolutions" + ], + "type": "object", + "properties": { + "employees": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideEmployeeResponse" + } + }, + "businessUnits": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideBusinessUnitResponse" + } + }, + "taskPriorities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideTaskPriorityResponse" + } + }, + "taskResolutionTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideTaskResolutionTypeResponse" + } + }, + "taskStatuses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideTaskStatusResponse" + } + }, + "taskTypes": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideTaskTypeResponse" + } + }, + "taskSources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideTaskSourceResponse" + } + }, + "taskResolutions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.ClientSideTaskResolutionResponse" + } + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideEmployeeResponse": { + "required": [ + "id", + "name", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideBusinessUnitResponse": { + "required": [ + "name", + "value" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideTaskPriorityResponse": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideTaskResolutionTypeResponse": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideTaskStatusResponse": { + "required": [ + "name" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideTaskTypeResponse": { + "required": [ + "id", + "name", + "active", + "excludedTaskResolutionIds" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "excludedTaskResolutionIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideTaskSourceResponse": { + "required": [ + "id", + "name", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.ClientSideTaskResolutionResponse": { + "required": [ + "id", + "name", + "type", + "active", + "excludedTaskTypeIds" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskResolutionType" + }, + "active": { + "type": "boolean" + }, + "excludedTaskTypeIds": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.TaskResolutionType": { + "enum": [ + "Custom", + "Refund" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Custom", + "Refund" + ] + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "PaginatedResponse_Of_TaskManagement.V2.TaskGetResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskGetResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "TaskManagement.V2.TaskGetResponse": { + "required": [ + "reportedById", + "assignedToId", + "active", + "isClosed", + "businessUnitId", + "employeeTaskTypeId", + "employeeTaskSourceId", + "employeeTaskResolutionId", + "reportedOn", + "id", + "taskNumber", + "createdOn" + ], + "type": "object", + "properties": { + "reportedById": { + "type": "integer", + "format": "int64" + }, + "assignedToId": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "isClosed": { + "type": "boolean" + }, + "closedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + }, + "businessUnitId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskTypeId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskSourceId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskResolutionId": { + "type": "integer", + "format": "int64" + }, + "reportedOn": { + "type": "string", + "format": "date-time" + }, + "completeBy": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "involvedEmployeeIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "priority": { + "type": "string", + "nullable": true + }, + "id": { + "type": "integer", + "format": "int64" + }, + "taskNumber": { + "type": "integer", + "format": "int64" + }, + "customerName": { + "type": "string", + "nullable": true + }, + "jobNumber": { + "type": "string", + "nullable": true + }, + "refundIssued": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "descriptionModifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "descriptionModifiedById": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.Contracts.ApiModels.Tasks.TaskComment" + }, + "nullable": true + }, + "attachments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.Contracts.ApiModels.Tasks.TaskAttachmentGroup" + }, + "nullable": true + }, + "subTasksData": { + "oneOf": [ + { + "$ref": "#/components/schemas/TaskManagement.Contracts.ApiModels.Tasks.SubTasksInfo" + } + ], + "nullable": true + } + }, + "additionalProperties": false + }, + "TaskManagement.Contracts.ApiModels.Tasks.TaskComment": { + "required": [ + "employeeId", + "comment", + "createdOn" + ], + "type": "object", + "properties": { + "employeeId": { + "type": "integer", + "format": "int64" + }, + "comment": { + "type": "string" + }, + "createdOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "TaskManagement.Contracts.ApiModels.Tasks.TaskAttachmentGroup": { + "required": [ + "createdOn", + "createdBy", + "count", + "files" + ], + "type": "object", + "properties": { + "createdOn": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "integer", + "format": "int64" + }, + "count": { + "type": "integer", + "format": "int64" + }, + "files": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.Contracts.ApiModels.Tasks.TaskAttachment" + } + } + }, + "additionalProperties": false + }, + "TaskManagement.Contracts.ApiModels.Tasks.TaskAttachment": { + "required": [ + "url", + "filename" + ], + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "filename": { + "type": "string" + } + }, + "additionalProperties": false + }, + "TaskManagement.Contracts.ApiModels.Tasks.SubTasksInfo": { + "required": [ + "count", + "subTasks" + ], + "type": "object", + "properties": { + "count": { + "type": "integer", + "format": "int32" + }, + "subTasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.Contracts.ApiModels.Tasks.SubTaskGet" + } + } + }, + "additionalProperties": false + }, + "TaskManagement.Contracts.ApiModels.Tasks.SubTaskGet": { + "required": [ + "active", + "isClosed", + "name", + "createdOn", + "subtaskNumber", + "isViewed", + "assignedDateTime", + "comments" + ], + "type": "object", + "properties": { + "assignedToId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "reportedById": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "active": { + "type": "boolean" + }, + "isClosed": { + "type": "boolean" + }, + "closedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "name": { + "type": "string" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "dueDateTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "subtaskNumber": { + "type": "integer", + "format": "int64" + }, + "isViewed": { + "type": "boolean" + }, + "assignedDateTime": { + "type": "string", + "format": "date-time" + }, + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TaskManagement.Contracts.ApiModels.Tasks.TaskComment" + } + } + }, + "additionalProperties": false + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "TaskManagement.V2.TaskCreateResponse": { + "required": [ + "reportedById", + "assignedToId", + "isClosed", + "name", + "businessUnitId", + "employeeTaskTypeId", + "employeeTaskSourceId", + "reportedDate", + "priority", + "id", + "taskNumber", + "createdOn", + "modifiedOn" + ], + "type": "object", + "properties": { + "reportedById": { + "type": "integer", + "format": "int64" + }, + "assignedToId": { + "type": "integer", + "format": "int64" + }, + "isClosed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "businessUnitId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskTypeId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskSourceId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskResolutionId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "reportedDate": { + "type": "string", + "format": "date-time" + }, + "completeBy": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "involvedEmployeeIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "priority": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskPriority" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "taskNumber": { + "type": "integer", + "format": "int64" + }, + "customerName": { + "type": "string", + "nullable": true + }, + "jobNumber": { + "type": "string", + "nullable": true + }, + "refundIssued": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "descriptionModifiedOn": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "descriptionModifiedBy": { + "type": "string", + "nullable": true + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.TaskPriority": { + "enum": [ + "Low", + "Normal", + "High", + "Urgent" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Low", + "Normal", + "High", + "Urgent" + ] + }, + "TaskManagement.V2.TaskCreateRequest": { + "required": [ + "reportedById", + "assignedToId", + "isClosed", + "name", + "businessUnitId", + "employeeTaskTypeId", + "employeeTaskSourceId", + "reportedDate", + "priority" + ], + "type": "object", + "properties": { + "reportedById": { + "type": "integer", + "format": "int64" + }, + "assignedToId": { + "type": "integer", + "format": "int64" + }, + "isClosed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "businessUnitId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskTypeId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskSourceId": { + "type": "integer", + "format": "int64" + }, + "employeeTaskResolutionId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "reportedDate": { + "type": "string", + "format": "date-time" + }, + "completeBy": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "involvedEmployeeIdList": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "nullable": true + }, + "customerId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "projectId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "priority": { + "$ref": "#/components/schemas/TaskManagement.V2.TaskPriority" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.SubtaskCreateResponse": { + "required": [ + "isClosed", + "name", + "assignedToId", + "parentTaskId", + "subtaskNumber", + "isViewed", + "assignedDateTime", + "createdOn" + ], + "type": "object", + "properties": { + "isClosed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "assignedToId": { + "type": "integer", + "format": "int64" + }, + "dueDateTime": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "parentTaskId": { + "type": "integer", + "format": "int64" + }, + "subtaskNumber": { + "type": "string" + }, + "isViewed": { + "type": "boolean" + }, + "assignedDateTime": { + "type": "string", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "TaskManagement.V2.SubtaskCreateRequest": { + "required": [ + "isClosed", + "name", + "assignedToId" + ], + "type": "object", + "properties": { + "isClosed": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "assignedToId": { + "type": "integer", + "format": "int64" + }, + "dueDateTime": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file diff --git a/openapi_specs/telecom.json b/openapi_specs/telecom.json new file mode 100644 index 0000000..b04ee01 --- /dev/null +++ b/openapi_specs/telecom.json @@ -0,0 +1,3424 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Telecom", + "version": "1.0" + }, + "servers": [ + { + "url": "https://api-integration.servicetitan.io/telecom" + } + ], + "paths": { + "/v3/tenant/{tenant}/calls": { + "get": { + "tags": [ + "Calls" + ], + "summary": "Provides a feed for telecom calls", + "description": "Provides a feed for telecom calls", + "operationId": "Calls_Calls", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32. The logical number of page to return, starting from 1", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32. How many records to return (50 by default)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "includeTotal", + "in": "query", + "description": "Whether total count should be returned", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "description": "Perform lookup by multiple IDs (maximum 50)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified before certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified on or after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "active", + "in": "query", + "description": "What kind of items should be returned (only active items will be returned by default)\\\nValues: [True, Any, False]", + "schema": { + "type": "string", + "oneOf": [ + { + "$ref": "#/components/schemas/ActiveRequestArg" + } + ], + "nullable": true + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items created after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Return items modified after certain date/time (in UTC)", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "campaignId", + "in": "query", + "description": "Format - int64. Campaign ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "agentId", + "in": "query", + "description": "Format - int64. Agent ID (number)", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "minDuration", + "in": "query", + "description": "Format - int32. Minimum call duration (number of seconds)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "phoneNumberCalled", + "in": "query", + "description": "The phone number that was called (string)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "callerPhoneNumber", + "in": "query", + "description": "The caller's phone number (string)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "agentName", + "in": "query", + "description": "Agent name (string)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "agentIsExternal", + "in": "query", + "description": "Is agent external flag (boolean)", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "agentExternalId", + "in": "query", + "description": "Format - int64. Agent external ID (number)", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "sort", + "in": "query", + "description": "The Sorting field, possible values: Id, CreatedOn, ModifiedOn.\nThe Sorting is ascending by default, add the '-' character to use descending (for example -Id)", + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaginatedResponse_Of_Telecom.V3.CallResponse" + }, + "example": { + "page": 0, + "pageSize": 0, + "hasMore": true, + "totalCount": 0, + "data": [ + { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "businessUnit": { + "id": 0, + "name": "string" + }, + "type": { + "id": 0, + "name": "string", + "modifiedOn": "string" + }, + "leadCall": { + "createdOn": "string", + "active": true, + "id": 0, + "receivedOn": "string", + "duration": "string", + "from": "string", + "to": "string", + "direction": "Inbound", + "callType": {}, + "reason": { + "id": 0, + "name": "string", + "lead": true, + "active": true + }, + "recordingUrl": "string", + "voiceMailUrl": "string", + "createdBy": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "name": "string" + }, + "campaign": { + "id": 0, + "name": "string" + }, + "modifiedOn": "string", + "agent": { + "id": 0, + "name": "string", + "externalId": 0 + } + } + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/v3/tenant/{tenant}/optinouts/optouts": { + "get": { + "tags": [ + "OptInOut" + ], + "summary": "Returns all opt-outs for the tenant", + "description": "Numbers are returned in E.164 format.", + "operationId": "OptInOut_GetAllOptOuts", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Telecom.V3.OptOutListResponse" + }, + "example": { + "data": [ + { + "contactNumber": "string", + "optOutType": {} + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + }, + "post": { + "tags": [ + "OptInOut" + ], + "summary": "Adds opt-outs for the specified phone numbers", + "description": "Has to have at least one phone number in the request (use the dedicated endpoint if you need to get all the opt-outs).\nAll numbers in the request must be valid, otherwise the request will fail.\nIf a number is opted-out globally, you can't opt it out for marketing.", + "operationId": "OptInOut_CreateOptOutList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Telecom.V3.CreateOptOutListRequest" + }, + "example": { + "optOutType": {}, + "contactNumbers": [ + "string" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Telecom.V3.CreateOptOutListResponse" + }, + "example": { + "data": [ + { + "contactNumber": "string", + "status": {} + } + ] + } + } + } + }, + "400": { + "description": "At least one number in the request couldn't be parsed, or there were no numbers in the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/v3/tenant/{tenant}/optinouts/optouts/getlist": { + "post": { + "tags": [ + "OptInOut" + ], + "summary": "For each phone number in the request, returns the opt-out status, if it exists", + "description": "Has to have at least one phone number in the request (use the dedicated endpoint if you need to get all the opt-outs).\nIf there's no opt-out info for a phone number, it won't be included in the response.\nAll numbers in the request must be valid (E.164 format is preferred, but not required), otherwise the request will fail.\nThe numbers in the response will be in E.164 format.", + "operationId": "OptInOut_GetOptOutList", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Telecom.V3.GetOptOutListRequest" + }, + "example": { + "contactNumbers": [ + "string" + ] + } + } + } + }, + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Telecom.V3.OptOutListResponse" + }, + "example": { + "data": [ + { + "contactNumber": "string", + "optOutType": {} + } + ] + } + } + } + }, + "400": { + "description": "At least one number in the request couldn't be parsed, or there were no numbers in the request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + }, + "/v2/tenant/{tenant}/calls/{id}": { + "get": { + "tags": [ + "Calls" + ], + "summary": "Get call's details.", + "description": "Get call's details.", + "operationId": "Calls_GetDetails", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the call.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "DetailedBundleCallModel with the following fields:\nlong Id;\nstring JobNumber;\nlong ProjectId;\nBusinessUnitModel BusinessUnit;\nJobTypeModel Type;\nDetailedCallModel LeadCall;", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Module.Telecom.Shared.DetailedBundleCallModel" + }, + "example": { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "businessUnit": { + "id": 0, + "active": true, + "name": "string", + "officialName": "string", + "email": "string", + "currency": "string", + "phoneNumber": "string", + "invoiceHeader": "string", + "invoiceMessage": "string", + "defaultTaxRate": 0, + "authorizationParagraph": "string", + "acknowledgementParagraph": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "materialSku": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "corporateContractNumber": "string", + "tenant": { + "id": 0, + "name": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "modifiedOn": "string" + }, + "modifiedOn": "string" + }, + "type": { + "id": 0, + "name": "string", + "modifiedOn": "string" + }, + "leadCall": { + "id": 0, + "receivedOn": "string", + "duration": "string", + "from": "string", + "to": "string", + "direction": "Inbound", + "callType": {}, + "reason": { + "id": 0, + "name": "string", + "lead": true, + "active": true + }, + "recordingUrl": "string", + "voiceMailUrl": "string", + "createdBy": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "active": true, + "name": "string", + "email": "string", + "balance": 0, + "doNotMail": true, + "address": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "streetAddress": "string", + "latitude": 0, + "longitude": 0 + }, + "importId": "string", + "doNotService": true, + "type": "Residential", + "contacts": [ + { + "id": 0, + "type": "string", + "value": "string", + "memo": "string", + "active": true, + "modifiedOn": "string" + } + ], + "mergedToId": 0, + "modifiedOn": "string", + "memberships": [ + { + "id": 0, + "active": true, + "type": { + "id": 0, + "active": true, + "name": "string" + }, + "status": "string", + "from": "string", + "to": "string", + "locationId": 0 + } + ], + "hasActiveMembership": true, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdBy": 0, + "phoneSettings": [ + { + "phoneNumber": "string", + "doNotText": true + } + ] + }, + "campaign": { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "dnis": "string" + }, + "modifiedOn": "string", + "agent": { + "id": 0, + "name": "string", + "externalId": 0 + } + } + } + } + } + } + } + }, + "put": { + "tags": [ + "Calls" + ], + "summary": "Update existing call.", + "description": "Update existing call.", + "operationId": "Calls_Update", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of updating call.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "description": "DateTime? CreatedOn;\nTimeSpan? Duration;\nCallDirection? Direction;\nCallStatus? Status;\nCallType? CallType;\nstring ExcuseMemo;\nlong? CampaignId;\nlong? JobId;\nlong? AgentId;\nstring RecordingUrl;\nstring RecordingId;\nReasonInModel Reason;\nCustomerInModel Customer;\nLocationInModel Location;", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Module.Telecom.Shared.CallInUpdateModelV2" + }, + "example": { + "callId": 0, + "callType": {}, + "excuseMemo": "string", + "campaignId": 0, + "jobId": 0, + "agentId": 0, + "reason": { + "name": "string", + "lead": true + }, + "customer": { + "id": 0, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "latitude": 0, + "longitude": 0 + }, + "contacts": [ + { + "id": 0, + "type": "string", + "value": "string", + "memo": "string" + } + ] + }, + "location": { + "id": 0, + "name": "string", + "address": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "latitude": 0, + "longitude": 0 + }, + "contacts": [ + { + "id": 0, + "type": "string", + "value": "string", + "memo": "string" + } + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "DetailedCallModel", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Module.Telecom.Shared.DetailedCallModel" + }, + "example": { + "id": 0, + "receivedOn": "string", + "duration": "string", + "from": "string", + "to": "string", + "direction": "Inbound", + "callType": {}, + "reason": { + "id": 0, + "name": "string", + "lead": true, + "active": true + }, + "recordingUrl": "string", + "voiceMailUrl": "string", + "createdBy": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "active": true, + "name": "string", + "email": "string", + "balance": 0, + "doNotMail": true, + "address": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "streetAddress": "string", + "latitude": 0, + "longitude": 0 + }, + "importId": "string", + "doNotService": true, + "type": "Residential", + "contacts": [ + { + "id": 0, + "type": "string", + "value": "string", + "memo": "string", + "active": true, + "modifiedOn": "string" + } + ], + "mergedToId": 0, + "modifiedOn": "string", + "memberships": [ + { + "id": 0, + "active": true, + "type": { + "id": 0, + "active": true, + "name": "string" + }, + "status": "string", + "from": "string", + "to": "string", + "locationId": 0 + } + ], + "hasActiveMembership": true, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdBy": 0, + "phoneSettings": [ + { + "phoneNumber": "string", + "doNotText": true + } + ] + }, + "campaign": { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "dnis": "string" + }, + "modifiedOn": "string", + "agent": { + "id": 0, + "name": "string", + "externalId": 0 + } + } + } + } + } + } + } + }, + "/v2/tenant/{tenant}/calls": { + "get": { + "tags": [ + "Calls (Deprecated)" + ], + "summary": "Get filtered calls.", + "description": "Get filtered calls.", + "operationId": "Calls_GetCalls", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "modifiedBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Modified before a certain date/time (as date-time in RFC3339), not inclusive", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Modified on or after a certain date/time (as date-time in RFC3339), inclusive", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdOnOrAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Created on or after a certain date/time (as date-time in RFC3339), inclusive", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "modifiedAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339). Modified after a certain date/time (as date-time in RFC3339), not inclusive", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "minDuration", + "in": "query", + "description": "Format - int32. Minimum call duration (number)", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "phoneNumberCalled", + "in": "query", + "description": "The phone number that was called (string)", + "schema": { + "type": "string" + } + }, + { + "name": "campaignId", + "in": "query", + "description": "Format - int64. Campaign ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "agentId", + "in": "query", + "description": "Format - int64. Agent ID (number)", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "agentName", + "in": "query", + "description": "Agent name (string)", + "schema": { + "type": "string" + } + }, + { + "name": "agentIsExternal", + "in": "query", + "description": "Is agent external flag (boolean)", + "schema": { + "type": "boolean", + "nullable": true + } + }, + { + "name": "agentExternalId", + "in": "query", + "description": "Format - int64. Agent external ID (number)", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "orderBy", + "in": "query", + "description": "Sorting (string with possible values \"Id\" (default), \"createdOn\", or \"modifiedOn\")", + "schema": { + "type": "string" + } + }, + { + "name": "orderByDirection", + "in": "query", + "description": "Sorting direction (string with possible values \"asc\" (default) or \"desc\")", + "schema": { + "type": "string" + } + }, + { + "name": "activeOnly", + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "createdAfter", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "createdBefore", + "in": "query", + "description": "Format - date-time (as date-time in RFC3339).", + "schema": { + "type": "string", + "format": "date-time", + "nullable": true + } + }, + { + "name": "ids", + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "page", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + }, + { + "name": "pageSize", + "in": "query", + "description": "Format - int32.", + "schema": { + "type": "integer", + "format": "int32", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Array of BundleCallModels with the following fields:\nlong Id;\nstring JobNumber;\nlong ProjectId;\nBusinessUnitModel BusinessUnit;\nJobTypeModel Type;\nCallModel LeadCall;", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CollectionResult_Of_Module.Telecom.Shared.V2.BundleCallModel" + }, + "example": { + "data": [ + { + "id": 0, + "jobNumber": "string", + "projectId": 0, + "businessUnit": { + "id": 0, + "active": true, + "name": "string", + "officialName": "string", + "email": "string", + "currency": "string", + "phoneNumber": "string", + "invoiceHeader": "string", + "invoiceMessage": "string", + "defaultTaxRate": 0, + "authorizationParagraph": "string", + "acknowledgementParagraph": "string", + "address": { + "street": "string", + "unit": "string", + "city": "string", + "state": "string", + "zip": "string", + "country": "string" + }, + "materialSku": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "corporateContractNumber": "string", + "tenant": { + "id": 0, + "name": "string", + "quickbooksClass": "string", + "accountCode": "string", + "franchiseId": "string", + "conceptCode": "string", + "modifiedOn": "string" + }, + "modifiedOn": "string" + }, + "type": { + "id": 0, + "name": "string", + "modifiedOn": "string" + }, + "leadCall": { + "id": 0, + "receivedOn": "string", + "duration": "string", + "from": "string", + "to": "string", + "direction": "Inbound", + "callType": {}, + "reason": { + "id": 0, + "name": "string", + "lead": true, + "active": true + }, + "recordingUrl": "string", + "voiceMailUrl": "string", + "createdBy": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "active": true, + "name": "string", + "email": "string", + "balance": 0, + "doNotMail": true, + "address": { + "street": "string", + "unit": "string", + "country": "string", + "city": "string", + "state": "string", + "zip": "string", + "streetAddress": "string", + "latitude": 0, + "longitude": 0 + }, + "importId": "string", + "doNotService": true, + "type": "Residential", + "contacts": [ + { + "id": 0, + "type": "string", + "value": "string", + "memo": "string", + "active": true, + "modifiedOn": "string" + } + ], + "mergedToId": 0, + "modifiedOn": "string", + "memberships": [ + { + "id": 0, + "active": true, + "type": { + "id": 0, + "active": true, + "name": "string" + }, + "status": "string", + "from": "string", + "to": "string", + "locationId": 0 + } + ], + "hasActiveMembership": true, + "customFields": [ + { + "typeId": 0, + "name": "string", + "value": "string" + } + ], + "createdOn": "string", + "createdBy": 0, + "phoneSettings": [ + { + "phoneNumber": "string", + "doNotText": true + } + ] + }, + "campaign": { + "id": 0, + "name": "string", + "modifiedOn": "string", + "createdOn": "string", + "active": true, + "category": { + "id": 0, + "name": "string", + "active": true + }, + "source": "string", + "otherSource": "string", + "businessUnit": "string", + "medium": "string", + "otherMedium": "string", + "dnis": "string" + }, + "modifiedOn": "string", + "agent": { + "id": 0, + "name": "string", + "externalId": 0 + }, + "createdOn": "string", + "active": true + } + } + ], + "page": 0, + "pageSize": 0, + "totalCount": 0, + "hasMore": true + } + } + } + } + } + } + }, + "/v2/tenant/{tenant}/calls/{id}/recording": { + "get": { + "tags": [ + "Calls" + ], + "summary": "Get recording of the call.", + "description": "Get recording of the call.", + "operationId": "Calls_GetRecording", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the call.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "\"audio/mpeg\" stream with call recording.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + }, + "examples": { + "default": { + "value": null + } + } + } + } + } + } + } + }, + "/v2/tenant/{tenant}/calls/{id}/voicemail": { + "get": { + "tags": [ + "Calls" + ], + "summary": "Get voicemail of the call.", + "description": "Get voicemail of the call.", + "operationId": "Calls_GetVoiceMail", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Format - int64. Id of the call.", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "\"audio/mpeg\" stream with call voicemail.", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + }, + "examples": { + "default": { + "value": null + } + } + } + } + } + } + } + }, + "/v2/tenant/{tenant}/export/calls": { + "get": { + "tags": [ + "Export" + ], + "summary": "Provides export feed for telecom calls", + "description": "Provides export feed for telecom calls", + "operationId": "Export_Calls", + "parameters": [ + { + "name": "tenant", + "in": "path", + "description": "Format - int64. Tenant ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "from", + "in": "query", + "description": "Continuation token received from previous export request in \"continueFrom\" field.\nWhen not specified, the export process starts from the beginning.\\\nUse custom date strings, e.g. \"2020-01-01\" to start the export process from the certain point in time.", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "includeRecentChanges", + "in": "query", + "description": "Use \"true\" to start receiving the most recent changes quicker.\nNote this may cause the same results appearing multiple times on consecutive requests.", + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExportResponse_Of_Telecom.V2.ExportCallResponse" + }, + "example": { + "hasMore": true, + "continueFrom": "string", + "data": [ + { + "id": 0, + "duration": "string", + "from": "string", + "to": "string", + "direction": {}, + "status": {}, + "type": {}, + "recordingUrl": "string", + "voiceMailPath": "string", + "createdOn": "string", + "modifiedOn": "string", + "reason": { + "id": 0, + "name": "string" + }, + "customer": { + "id": 0, + "name": "string" + }, + "location": { + "id": 0, + "name": "string" + }, + "campaign": { + "id": 0, + "name": "string" + }, + "job": { + "id": 0, + "number": "string" + }, + "agent": { + "id": 0, + "name": "string" + }, + "createdBy": { + "id": 0, + "name": "string" + }, + "active": true + } + ] + } + } + } + }, + "400": { + "description": "The request cannot be processed, check validation errors or request format", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiErrorResponse" + }, + "example": { + "type": "string", + "title": "string", + "status": 0, + "traceId": "string", + "errors": {}, + "data": {} + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PaginatedResponse_Of_Telecom.V3.CallResponse": { + "required": [ + "page", + "pageSize", + "hasMore", + "data" + ], + "type": "object", + "properties": { + "page": { + "type": "integer", + "description": "From which page this output has started", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "description": "Page size for this query (i.e. how many records were requested to return)", + "format": "int32" + }, + "hasMore": { + "type": "boolean", + "description": "True if there are more records in the query than returned in this result" + }, + "totalCount": { + "type": "integer", + "description": "Total count of records for this query (can optionally be populated)", + "format": "int32", + "nullable": true + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Telecom.V3.CallResponse" + }, + "description": "The collection of result items, will never have more than PageSize items" + } + }, + "additionalProperties": false, + "description": "Represents paginated API response." + }, + "Telecom.V3.CallResponse": { + "required": [ + "id", + "jobNumber", + "projectId", + "businessUnit", + "type", + "leadCall" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "jobNumber": { + "type": "string" + }, + "projectId": { + "type": "integer", + "format": "int64" + }, + "businessUnit": { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + }, + "type": { + "$ref": "#/components/schemas/Telecom.V3.JobTypeModel" + }, + "leadCall": { + "$ref": "#/components/schemas/Telecom.V3.CallModelResponse" + } + }, + "additionalProperties": false + }, + "Telecom.V2.NamedModel": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the entity", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the entity" + } + }, + "additionalProperties": false + }, + "Telecom.V3.JobTypeModel": { + "required": [ + "id", + "name", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the entity", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the entity" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Telecom.V3.CallModelResponse": { + "required": [ + "createdOn", + "active", + "id", + "receivedOn", + "duration", + "from", + "to", + "direction", + "reason", + "recordingUrl", + "voiceMailUrl", + "createdBy", + "customer", + "campaign", + "modifiedOn", + "agent" + ], + "type": "object", + "properties": { + "createdOn": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + }, + "id": { + "type": "integer", + "format": "int64" + }, + "receivedOn": { + "type": "string", + "format": "date-time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "direction": { + "$ref": "#/components/schemas/Telecom.V3.CallDirection" + }, + "callType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V3.CallType" + } + ], + "nullable": true + }, + "reason": { + "$ref": "#/components/schemas/Telecom.V3.CallReasonModel" + }, + "recordingUrl": { + "type": "string" + }, + "voiceMailUrl": { + "type": "string" + }, + "createdBy": { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + }, + "customer": { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + }, + "campaign": { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "agent": { + "$ref": "#/components/schemas/Telecom.V3.CallAgentModel" + } + }, + "additionalProperties": false + }, + "Telecom.V3.CallDirection": { + "enum": [ + "Inbound", + "Outbound" + ], + "type": "string", + "description": "Indicates the direction of a call", + "x-enumNames": [ + "Inbound", + "Outbound" + ] + }, + "Telecom.V3.CallType": { + "enum": [ + "Abandoned", + "Unbooked", + "Excused", + "Booked", + "NotLead" + ], + "type": "string", + "description": "Specifies the type (classification) of the call. If null, the call was not classified yet. Also,\n outbound calls don't have classification and CallType is always null for outbound calls", + "x-enumNames": [ + "Abandoned", + "Unbooked", + "Excused", + "Booked", + "NotLead" + ] + }, + "Telecom.V3.CallReasonModel": { + "required": [ + "id", + "name", + "lead", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the entity", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the entity" + }, + "lead": { + "type": "boolean" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Telecom.V3.CallAgentModel": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the entity", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the entity" + }, + "externalId": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "ApiErrorResponse": { + "required": [ + "type", + "title", + "status", + "traceId", + "errors", + "data" + ], + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "A URI reference that identifies the problem type" + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the problem type" + }, + "status": { + "type": "integer", + "description": "The HTTP status code generated by server", + "format": "int32" + }, + "traceId": { + "type": "string", + "description": "Internal trace ID for advanced diagnostics" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Provides more details about errors occurred, which can potentially be used for visual display" + }, + "data": { + "type": "object", + "additionalProperties": {}, + "description": "Provides additional data, intended for programmatical usage" + } + }, + "additionalProperties": false, + "description": "Detailed error response, following RFC 7807 recommendations (https://tools.ietf.org/html/rfc7807)." + }, + "ActiveRequestArg": { + "enum": [ + "True", + "Any", + "False" + ], + "type": "string", + "description": "Represents possible HTTP query argument values, when applying filters based on active status.", + "x-enumNames": [ + "True", + "Any", + "False" + ] + }, + "Telecom.V3.OptOutListResponse": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Telecom.V3.OptOutResponse" + }, + "description": "The list of opt-out responses." + } + }, + "additionalProperties": false, + "description": "List of opt-outs" + }, + "Telecom.V3.OptOutResponse": { + "required": [ + "contactNumber", + "optOutType" + ], + "type": "object", + "properties": { + "contactNumber": { + "type": "string", + "description": "Contact number in E.164 format" + }, + "optOutType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V3.OptOutType" + } + ], + "description": "Opt-out type" + } + }, + "additionalProperties": false, + "description": "Single contact number opt-out status" + }, + "Telecom.V3.OptOutType": { + "enum": [ + "Unknown", + "Global", + "Marketing", + "Other" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Unknown", + "Global", + "Marketing", + "Other" + ] + }, + "Telecom.V3.GetOptOutListRequest": { + "required": [ + "contactNumbers" + ], + "type": "object", + "properties": { + "contactNumbers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Contact numbers (must be valid parseable phone numbers, E.164 format is recommended)" + } + }, + "additionalProperties": false, + "description": "List of phone numbers to get opt-out status for" + }, + "Telecom.V3.CreateOptOutListResponse": { + "required": [ + "data" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Telecom.V3.CreateOptOutResponse" + }, + "description": "Individual results for each number" + } + }, + "additionalProperties": false, + "description": "Result of creating the opt-outs" + }, + "Telecom.V3.CreateOptOutResponse": { + "required": [ + "contactNumber", + "status" + ], + "type": "object", + "properties": { + "contactNumber": { + "type": "string", + "description": "Contact number in E.164 format" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V3.CreateOptOutStatus" + } + ], + "description": "Result of opt-out creation" + } + }, + "additionalProperties": false, + "description": "Result of creating a single opt-out" + }, + "Telecom.V3.CreateOptOutStatus": { + "enum": [ + "Ok", + "RetryableError", + "LogicalError" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Ok", + "RetryableError", + "LogicalError" + ] + }, + "Telecom.V3.CreateOptOutListRequest": { + "required": [ + "optOutType", + "contactNumbers" + ], + "type": "object", + "properties": { + "optOutType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V3.OptOutType" + } + ], + "description": "Type of opt-out to create" + }, + "contactNumbers": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Contact numbers (must be valid parseable phone numbers, E.164 format is recommended)" + } + }, + "additionalProperties": false, + "description": "List of phone numbers to create the opt-out status for" + }, + "Module.Telecom.Shared.DetailedBundleCallModel": { + "required": [ + "id", + "jobNumber", + "projectId", + "businessUnit", + "type", + "leadCall" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "jobNumber": { + "type": "string" + }, + "projectId": { + "type": "integer", + "format": "int64" + }, + "businessUnit": { + "$ref": "#/components/schemas/Module.Admin.Shared.BusinessUnitModel" + }, + "type": { + "$ref": "#/components/schemas/JobTypeModel" + }, + "leadCall": { + "$ref": "#/components/schemas/Module.Telecom.Shared.DetailedCallModel" + } + }, + "additionalProperties": false + }, + "Module.Admin.Shared.BusinessUnitModel": { + "required": [ + "id", + "name", + "active", + "officialName", + "email", + "currency", + "phoneNumber", + "invoiceHeader", + "invoiceMessage", + "defaultTaxRate", + "authorizationParagraph", + "acknowledgementParagraph", + "address", + "materialSku", + "quickbooksClass", + "accountCode", + "franchiseId", + "conceptCode", + "corporateContractNumber", + "tenant", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "officialName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "phoneNumber": { + "type": "string" + }, + "invoiceHeader": { + "type": "string" + }, + "invoiceMessage": { + "type": "string" + }, + "defaultTaxRate": { + "type": "number", + "format": "decimal" + }, + "authorizationParagraph": { + "type": "string" + }, + "acknowledgementParagraph": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Module.Admin.Shared.BusinessUnitAddressModel" + }, + "materialSku": { + "type": "string" + }, + "quickbooksClass": { + "type": "string" + }, + "accountCode": { + "type": "string" + }, + "franchiseId": { + "type": "string" + }, + "conceptCode": { + "type": "string" + }, + "corporateContractNumber": { + "type": "string" + }, + "tenant": { + "$ref": "#/components/schemas/Module.Admin.Shared.BusinessUnitTenantModel" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Module.Admin.Shared.BusinessUnitAddressModel": { + "required": [ + "street", + "unit", + "city", + "state", + "zip", + "country" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + }, + "unit": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string" + }, + "zip": { + "type": "string" + }, + "country": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Module.Admin.Shared.BusinessUnitTenantModel": { + "required": [ + "id", + "name", + "quickbooksClass", + "accountCode", + "franchiseId", + "conceptCode", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "quickbooksClass": { + "type": "string" + }, + "accountCode": { + "type": "string" + }, + "franchiseId": { + "type": "string" + }, + "conceptCode": { + "type": "string" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "JobTypeModel": { + "required": [ + "id", + "name", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Module.Telecom.Shared.DetailedCallModel": { + "required": [ + "id", + "receivedOn", + "duration", + "from", + "to", + "direction", + "reason", + "recordingUrl", + "voiceMailUrl", + "createdBy", + "customer", + "campaign", + "modifiedOn", + "agent" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "receivedOn": { + "type": "string", + "format": "date-time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "direction": { + "$ref": "#/components/schemas/Telecom.CallDirection" + }, + "callType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.CallType" + } + ], + "nullable": true + }, + "reason": { + "$ref": "#/components/schemas/Module.Telecom.Shared.CallReasonModel" + }, + "recordingUrl": { + "type": "string" + }, + "voiceMailUrl": { + "type": "string" + }, + "createdBy": { + "$ref": "#/components/schemas/Services.NamedModel" + }, + "customer": { + "$ref": "#/components/schemas/Crm.Contracts.Customers.CustomerModel" + }, + "campaign": { + "$ref": "#/components/schemas/Marketing.Core.CampaignModel" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "agent": { + "$ref": "#/components/schemas/Module.Telecom.Shared.CallAgentModel" + } + }, + "additionalProperties": false + }, + "Telecom.CallDirection": { + "enum": [ + "Inbound", + "Outbound" + ], + "type": "string", + "description": "Indicates the direction of a call.", + "x-enumNames": [ + "Inbound", + "Outbound" + ] + }, + "Telecom.CallType": { + "enum": [ + "Abandoned", + "Unbooked", + "Excused", + "Booked", + "NotLead" + ], + "type": "string", + "description": "See MasterModel.CallType. It should have the same values", + "x-enumNames": [ + "Abandoned", + "Unbooked", + "Excused", + "Booked", + "NotLead" + ] + }, + "Module.Telecom.Shared.CallReasonModel": { + "required": [ + "id", + "name", + "lead", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "lead": { + "type": "boolean" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Services.NamedModel": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Crm.Contracts.Customers.CustomerModel": { + "required": [ + "id", + "name", + "address", + "active", + "email", + "doNotMail", + "importId", + "doNotService", + "type", + "contacts", + "modifiedOn", + "memberships", + "customFields", + "createdOn", + "phoneSettings" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "email": { + "type": "string" + }, + "balance": { + "type": "number", + "format": "decimal", + "nullable": true + }, + "doNotMail": { + "type": "boolean" + }, + "address": { + "$ref": "#/components/schemas/AddressOutput" + }, + "importId": { + "type": "string" + }, + "doNotService": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/Crm.Customers.CustomerType" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Contacts.Contracts.ContactOutputModel" + } + }, + "mergedToId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "memberships": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Memberships.MembershipModel" + } + }, + "hasActiveMembership": { + "type": "boolean", + "nullable": true + }, + "customFields": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CustomFieldApiModel" + } + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "phoneSettings": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Crm.Contracts.Customers.CustomerPhoneModel" + } + } + }, + "additionalProperties": false + }, + "AddressOutput": { + "required": [ + "street", + "unit", + "country", + "city", + "state", + "zip", + "streetAddress" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + }, + "unit": { + "type": "string" + }, + "country": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string" + }, + "zip": { + "type": "string" + }, + "streetAddress": { + "type": "string" + }, + "latitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "Crm.Customers.CustomerType": { + "enum": [ + "Residential", + "Commercial" + ], + "type": "string", + "description": "", + "x-enumNames": [ + "Residential", + "Commercial" + ] + }, + "Contacts.Contracts.ContactOutputModel": { + "required": [ + "type", + "value", + "memo", + "active", + "modifiedOn" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + }, + "memo": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": false + }, + "Memberships.MembershipModel": { + "required": [ + "id", + "active", + "type", + "status", + "locationId" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/Memberships.MembershipTypeModel" + }, + "status": { + "type": "string" + }, + "from": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "to": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "locationId": { + "type": "integer", + "format": "int64" + } + }, + "additionalProperties": false + }, + "Memberships.MembershipTypeModel": { + "required": [ + "id", + "active", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "active": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CustomFieldApiModel": { + "required": [ + "typeId", + "name", + "value" + ], + "type": "object", + "properties": { + "typeId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Crm.Contracts.Customers.CustomerPhoneModel": { + "required": [ + "phoneNumber", + "doNotText" + ], + "type": "object", + "properties": { + "phoneNumber": { + "type": "string" + }, + "doNotText": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Marketing.Core.CampaignModel": { + "required": [ + "id", + "name", + "modifiedOn", + "createdOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + }, + "category": { + "oneOf": [ + { + "$ref": "#/components/schemas/Marketing.Core.CampaignCategoryModel" + } + ], + "nullable": true + }, + "source": { + "type": "string", + "nullable": true + }, + "otherSource": { + "type": "string", + "nullable": true + }, + "businessUnit": { + "type": "string", + "nullable": true + }, + "medium": { + "type": "string", + "nullable": true + }, + "otherMedium": { + "type": "string", + "nullable": true + }, + "dnis": { + "type": "string", + "nullable": true + } + }, + "additionalProperties": false + }, + "Marketing.Core.CampaignCategoryModel": { + "required": [ + "id", + "name", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Module.Telecom.Shared.CallAgentModel": { + "required": [ + "id", + "name" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "externalId": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + "additionalProperties": false + }, + "CollectionResult_Of_Module.Telecom.Shared.V2.BundleCallModel": { + "required": [ + "data", + "page", + "pageSize", + "totalCount", + "hasMore" + ], + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Module.Telecom.Shared.V2.BundleCallModel" + } + }, + "page": { + "type": "integer", + "format": "int32" + }, + "pageSize": { + "type": "integer", + "format": "int32" + }, + "totalCount": { + "type": "integer", + "format": "int32" + }, + "hasMore": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Module.Telecom.Shared.V2.BundleCallModel": { + "required": [ + "id", + "jobNumber", + "projectId", + "businessUnit", + "type", + "leadCall" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "jobNumber": { + "type": "string" + }, + "projectId": { + "type": "integer", + "format": "int64" + }, + "businessUnit": { + "$ref": "#/components/schemas/Module.Admin.Shared.BusinessUnitModel" + }, + "type": { + "$ref": "#/components/schemas/JobTypeModel" + }, + "leadCall": { + "$ref": "#/components/schemas/Module.Telecom.Shared.V2.CallModel" + } + }, + "additionalProperties": false + }, + "Module.Telecom.Shared.V2.CallModel": { + "required": [ + "id", + "receivedOn", + "duration", + "from", + "to", + "direction", + "reason", + "recordingUrl", + "voiceMailUrl", + "createdBy", + "customer", + "campaign", + "modifiedOn", + "agent", + "createdOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "receivedOn": { + "type": "string", + "format": "date-time" + }, + "duration": { + "type": "string", + "format": "duration" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "direction": { + "$ref": "#/components/schemas/Telecom.CallDirection" + }, + "callType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.CallType" + } + ], + "nullable": true + }, + "reason": { + "$ref": "#/components/schemas/Module.Telecom.Shared.CallReasonModel" + }, + "recordingUrl": { + "type": "string" + }, + "voiceMailUrl": { + "type": "string" + }, + "createdBy": { + "$ref": "#/components/schemas/Services.NamedModel" + }, + "customer": { + "$ref": "#/components/schemas/Crm.Contracts.Customers.CustomerModel" + }, + "campaign": { + "$ref": "#/components/schemas/Marketing.Core.CampaignModel" + }, + "modifiedOn": { + "type": "string", + "format": "date-time" + }, + "agent": { + "$ref": "#/components/schemas/Module.Telecom.Shared.CallAgentModel" + }, + "createdOn": { + "type": "string", + "format": "date-time" + }, + "active": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "Module.Telecom.Shared.CallInUpdateModelV2": { + "required": [ + "excuseMemo", + "reason", + "customer", + "location" + ], + "type": "object", + "properties": { + "callId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "callType": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.CallType" + } + ], + "nullable": true + }, + "excuseMemo": { + "type": "string" + }, + "campaignId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "jobId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "agentId": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "reason": { + "$ref": "#/components/schemas/Module.Telecom.Shared.ReasonInModel" + }, + "customer": { + "$ref": "#/components/schemas/CustomerInModel" + }, + "location": { + "$ref": "#/components/schemas/LocationInModel" + } + }, + "additionalProperties": false + }, + "Module.Telecom.Shared.ReasonInModel": { + "required": [ + "name", + "lead" + ], + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "lead": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "CustomerInModel": { + "required": [ + "id", + "name", + "address", + "contacts" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/AddressInput" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInputModel" + } + } + }, + "additionalProperties": false + }, + "AddressInput": { + "required": [ + "street", + "unit", + "country", + "city", + "state", + "zip" + ], + "type": "object", + "properties": { + "street": { + "type": "string" + }, + "unit": { + "type": "string" + }, + "country": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string" + }, + "zip": { + "type": "string" + }, + "latitude": { + "type": "number", + "format": "double", + "nullable": true + }, + "longitude": { + "type": "number", + "format": "double", + "nullable": true + } + }, + "additionalProperties": false + }, + "ContactInputModel": { + "required": [ + "type", + "value", + "memo" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "type": { + "type": "string" + }, + "value": { + "type": "string" + }, + "memo": { + "type": "string" + } + }, + "additionalProperties": false + }, + "LocationInModel": { + "required": [ + "id", + "name", + "address", + "contacts" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/AddressInput" + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactInputModel" + } + } + }, + "additionalProperties": false + }, + "ExportResponse_Of_Telecom.V2.ExportCallResponse": { + "required": [ + "hasMore", + "continueFrom", + "data" + ], + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Indicates whether the export feed has reached its logical \"end\", or if there is more to export.\nTrue means the consumer can invoke another request right away using new continuation token value.\nFalse means there is now new data for the export, and the consumer should wait for some time (5-10 minutes)\nbefore making another request." + }, + "continueFrom": { + "type": "string", + "description": "Continuation token used to resume the export operation. The value should be used in \"from\" query parameter of the following request." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Telecom.V2.ExportCallResponse" + }, + "description": "The collection of exported items, usually sorted chronologically based on modification date" + } + }, + "additionalProperties": false, + "description": "Represents export API response." + }, + "Telecom.V2.ExportCallResponse": { + "required": [ + "id", + "duration", + "from", + "to", + "direction", + "status", + "createdOn", + "modifiedOn", + "active" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the call", + "format": "int64" + }, + "duration": { + "type": "string", + "description": "The duration of the call", + "format": "duration" + }, + "from": { + "type": "string", + "description": "The caller's phone" + }, + "to": { + "type": "string", + "description": "The called party's phone" + }, + "direction": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.CallDirection" + } + ], + "description": "The direction of the call" + }, + "status": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.CallStatus" + } + ], + "description": "The current status of the call" + }, + "type": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.CallType" + } + ], + "description": "The type (classification) of the call. Null if the inbound call was not classified yet or this is\n an outbound call", + "nullable": true + }, + "recordingUrl": { + "type": "string", + "description": "The URL for call recording. Can be null if the call hasn't a recording", + "nullable": true + }, + "voiceMailPath": { + "type": "string", + "description": "The URL for call voicemail. Can be null if the call hasn't a voicemail. This field may have value only for\nPhones Pro tenants", + "nullable": true + }, + "createdOn": { + "type": "string", + "description": "The time the call was created (i.e. inbound call was received or outbound call was initiated)\n ", + "format": "date-time" + }, + "modifiedOn": { + "type": "string", + "description": "The last time the call properties were updated", + "format": "date-time" + }, + "reason": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + } + ], + "description": "The info about the call reason linked to the call", + "nullable": true + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + } + ], + "description": "The info about the customer linked to the call", + "nullable": true + }, + "location": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + } + ], + "description": "The info about the location linked to the call", + "nullable": true + }, + "campaign": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + } + ], + "description": "The info about the phone advertising campaign linked to the call", + "nullable": true + }, + "job": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.JobModel" + } + ], + "description": "The info about the job linked to the call", + "nullable": true + }, + "agent": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + } + ], + "description": "The info about the user agent who was assigned to the call. For inbound calls this is the user who\n clicked the call bubble last time, or outbound calls this is a user who initiated the call. For Phones Pro,\n this may differ to CreatedBy for outbound calls if the outbound call was transferred between users\n ", + "nullable": true + }, + "createdBy": { + "oneOf": [ + { + "$ref": "#/components/schemas/Telecom.V2.NamedModel" + } + ], + "description": "The info about the user who created the outbound call", + "nullable": true + }, + "active": { + "type": "boolean", + "description": "Gets or sets whether the entity is active." + } + }, + "additionalProperties": false + }, + "Telecom.V2.CallDirection": { + "enum": [ + "Inbound", + "Outbound" + ], + "type": "string", + "description": "Indicates the direction of a call", + "x-enumNames": [ + "Inbound", + "Outbound" + ] + }, + "Telecom.V2.CallStatus": { + "enum": [ + "Ringing", + "Answered", + "Completed", + "Initiated" + ], + "type": "string", + "description": "Indicates the status of a call", + "x-enumNames": [ + "Ringing", + "Answered", + "Completed", + "Initiated" + ] + }, + "Telecom.V2.CallType": { + "enum": [ + "Abandoned", + "Unbooked", + "Excused", + "Booked", + "NotLead" + ], + "type": "string", + "description": "Specifies the type (classification) of the call. If null, the call was not classified yet. Also,\n outbound calls don't have classification and CallType is always null for outbound calls", + "x-enumNames": [ + "Abandoned", + "Unbooked", + "Excused", + "Booked", + "NotLead" + ] + }, + "Telecom.V2.JobModel": { + "required": [ + "id", + "number" + ], + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "The ID of the job", + "format": "int64" + }, + "number": { + "type": "string", + "description": "Human readable number of the job" + } + }, + "additionalProperties": false + } + }, + "securitySchemes": { + "apiKeyHeader": { + "type": "apiKey", + "name": "ST-App-Key", + "in": "header" + }, + "apiKeyQuery": { + "type": "apiKey", + "name": "servicetitanapplicationkey", + "in": "query" + } + } + }, + "security": [ + { + "apiKeyHeader": [] + }, + { + "apiKeyQuery": [] + } + ] +} \ No newline at end of file