{
  "openapi": "3.1.0",
  "info": {
    "title": "CRM",
    "description": "Bookings, bookings provider tags, contacts, customers, leads, locations, tags",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.servicetitan.io/crm/v2",
      "description": "Production"
    },
    {
      "url": "https://api-integration.servicetitan.io/crm/v2",
      "description": "Integration"
    }
  ],
  "paths": {
    "/tenant/{tenant}/booking-provider-tags": {
      "post": {
        "tags": [
          "BookingProviderTags"
        ],
        "summary": "Create a booking provider tag",
        "operationId": "BookingProviderTags_Create",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookingprovidertags:w"
            ]
          }
        ]
      },
      "get": {
        "tags": [
          "BookingProviderTags"
        ],
        "summary": "Gets a list of booking provider tags",
        "operationId": "BookingProviderTags_GetList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Name of the booking provider tag",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Perform lookup by multiple IDs (maximum 50)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "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"
            }
          }
        ],
        "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookingprovidertags:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/booking-provider-tags/{id}": {
      "get": {
        "tags": [
          "BookingProviderTags"
        ],
        "summary": "Gets a single booking provider tag by ID",
        "operationId": "BookingProviderTags_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookingprovidertags:r"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "BookingProviderTags"
        ],
        "summary": "Update a booking provider tag",
        "operationId": "BookingProviderTags_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookingprovidertags:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/bookings/{id}": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "summary": "Gets a booking by ID",
        "operationId": "Bookings_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                  "campaignId": 0,
                  "businessUnitId": 0,
                  "isFirstTimeClient": true,
                  "uploadedImages": [
                    "string"
                  ],
                  "isSendConfirmationEmail": true,
                  "status": {},
                  "dismissingReasonId": 0,
                  "jobId": 0,
                  "externalId": "string",
                  "priority": {},
                  "jobTypeId": 0,
                  "bookingProviderId": 0,
                  "modifiedOn": "string",
                  "summary": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/bookings": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "summary": "Gets a list of bookings",
        "operationId": "Bookings_GetList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Perform lookup by multiple IDs (maximum 50)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "description": "Filters by booking's external ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "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"
            }
          }
        ],
        "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",
                      "campaignId": 0,
                      "businessUnitId": 0,
                      "isFirstTimeClient": true,
                      "uploadedImages": [
                        "string"
                      ],
                      "isSendConfirmationEmail": true,
                      "status": {},
                      "dismissingReasonId": 0,
                      "jobId": 0,
                      "externalId": "string",
                      "priority": {},
                      "jobTypeId": 0,
                      "bookingProviderId": 0,
                      "modifiedOn": "string",
                      "summary": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/bookings/{id}/contacts": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "summary": "Get a list of contacts for a booking",
        "operationId": "Bookings_GetContactList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "summary": "Gets a booking by ID for a booking provider",
        "operationId": "Bookings_GetForProvider",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                  "campaignId": 0,
                  "businessUnitId": 0,
                  "isFirstTimeClient": true,
                  "uploadedImages": [
                    "string"
                  ],
                  "isSendConfirmationEmail": true,
                  "status": {},
                  "dismissingReasonId": 0,
                  "jobId": 0,
                  "externalId": "string",
                  "priority": {},
                  "jobTypeId": 0,
                  "bookingProviderId": 0,
                  "modifiedOn": "string",
                  "summary": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Bookings"
        ],
        "summary": "Updates a booking for a booking provider",
        "operationId": "Bookings_Update",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                  "campaignId": 0,
                  "businessUnitId": 0,
                  "isFirstTimeClient": true,
                  "uploadedImages": [
                    "string"
                  ],
                  "isSendConfirmationEmail": true,
                  "status": {},
                  "dismissingReasonId": 0,
                  "jobId": 0,
                  "externalId": "string",
                  "priority": {},
                  "jobTypeId": 0,
                  "bookingProviderId": 0,
                  "modifiedOn": "string",
                  "summary": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/booking-provider/{booking_provider}/bookings": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "summary": "Gets a list of bookings for a booking provider",
        "operationId": "Bookings_GetList2",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Perform lookup by multiple IDs (maximum 50)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "description": "Filters by booking's external ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "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"
            }
          }
        ],
        "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",
                      "campaignId": 0,
                      "businessUnitId": 0,
                      "isFirstTimeClient": true,
                      "uploadedImages": [
                        "string"
                      ],
                      "isSendConfirmationEmail": true,
                      "status": {},
                      "dismissingReasonId": 0,
                      "jobId": 0,
                      "externalId": "string",
                      "priority": {},
                      "jobTypeId": 0,
                      "bookingProviderId": 0,
                      "modifiedOn": "string",
                      "summary": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Bookings"
        ],
        "summary": "Creates a booking for a booking provider",
        "operationId": "Bookings_Create",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                  "campaignId": 0,
                  "businessUnitId": 0,
                  "isFirstTimeClient": true,
                  "uploadedImages": [
                    "string"
                  ],
                  "isSendConfirmationEmail": true,
                  "status": {},
                  "dismissingReasonId": 0,
                  "jobId": 0,
                  "externalId": "string",
                  "priority": {},
                  "jobTypeId": 0,
                  "bookingProviderId": 0,
                  "modifiedOn": "string",
                  "summary": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}/contacts": {
      "post": {
        "tags": [
          "Bookings"
        ],
        "summary": "Creates a contact on the specified booking for a booking provider",
        "operationId": "Bookings_CreateContact",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:w"
            ]
          }
        ]
      },
      "get": {
        "tags": [
          "Bookings"
        ],
        "summary": "Get a list of contacts for a booking for a booking provider",
        "operationId": "Bookings_GetContactList2",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}/contacts/{contactId}": {
      "patch": {
        "tags": [
          "Bookings"
        ],
        "summary": "Updates a single booking contact for a booking provider",
        "operationId": "Bookings_UpdateBookingContact",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:w"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Bookings"
        ],
        "summary": "Removes a contact from a booking for a booking provider",
        "operationId": "Bookings_DeleteContact",
        "parameters": [
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/booking-provider/{booking_provider}/bookings/{id}/dismiss": {
      "post": {
        "tags": [
          "Bookings"
        ],
        "operationId": "Bookings_DismissBooking",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "booking_provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.DismissBookingModel"
              },
              "example": {
                "callReasonId": 0,
                "dismissingMemo": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/tags": {
      "put": {
        "tags": [
          "BulkTags"
        ],
        "summary": "Add multiple tags to more than 1 customer",
        "operationId": "BulkTags_AddTags",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.tags:w"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "BulkTags"
        ],
        "summary": "Remove multiple tags to more than 1 customer",
        "operationId": "BulkTags_RemoveTags",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.tags:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{contactId}/contact-methods": {
      "get": {
        "tags": [
          "ContactMethods"
        ],
        "summary": "Gets a list of contact methods for a specified contact ID",
        "operationId": "ContactMethods_GetContactMethods",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "referenceId",
            "in": "query",
            "description": "Filters by reference ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filters by contact method type",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "query",
            "description": "Filters by contact method value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.ContactMethodResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": "string",
                      "contactId": "string",
                      "referenceId": "string",
                      "type": {},
                      "value": "string",
                      "memo": "string",
                      "createdOn": "string",
                      "createdBy": 0,
                      "modifiedOn": "string",
                      "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "ContactMethods"
        ],
        "summary": "Creates a new contact method",
        "operationId": "ContactMethods_CreateContactMethod",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.CreateContactMethodRequest"
              },
              "example": {
                "referenceId": "string",
                "type": {},
                "value": "string",
                "memo": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactMethodResponse"
                },
                "example": {
                  "id": "string",
                  "contactId": "string",
                  "referenceId": "string",
                  "type": {},
                  "value": "string",
                  "memo": "string",
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{contactId}/contact-methods/{contactMethodId}": {
      "get": {
        "tags": [
          "ContactMethods"
        ],
        "summary": "Gets a contact method specified by ID",
        "operationId": "ContactMethods_GetContactMethod",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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.ContactMethodResponse"
                },
                "example": {
                  "id": "string",
                  "contactId": "string",
                  "referenceId": "string",
                  "type": {},
                  "value": "string",
                  "memo": "string",
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact/Contact Method not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      },
      "put": {
        "tags": [
          "ContactMethods"
        ],
        "summary": "Replaces a contact method",
        "operationId": "ContactMethods_UpsertContactMethod",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.UpsertContactMethodRequest"
              },
              "example": {
                "referenceId": "string",
                "type": {},
                "value": "string",
                "memo": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactMethodResponse"
                },
                "example": {
                  "id": "string",
                  "contactId": "string",
                  "referenceId": "string",
                  "type": {},
                  "value": "string",
                  "memo": "string",
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "ContactMethods"
        ],
        "summary": "Updates a contact method",
        "operationId": "ContactMethods_UpdateContactMethod",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.UpdateContactMethodRequest"
              },
              "example": {
                "value": "string",
                "memo": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactMethodResponse"
                },
                "example": {
                  "id": "string",
                  "contactId": "string",
                  "referenceId": "string",
                  "type": {},
                  "value": "string",
                  "memo": "string",
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact/Contact Method not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "ContactMethods"
        ],
        "summary": "Deletes a contact method",
        "operationId": "ContactMethods_DeleteContactMethod",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact/Contact Method not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{contactId}/contact-methods/{contactMethodId}/preferences": {
      "get": {
        "tags": [
          "ContactPreferences"
        ],
        "summary": "Gets a list of contact preferences for a specified contact method ID",
        "operationId": "ContactPreferences_GetContactMethodPreferences",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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/Crm.V2.ContactPreferenceResponse"
                  }
                },
                "example": [
                  {
                    "name": "string",
                    "dataType": "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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact / Contact Method not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{contactId}/contact-methods/{contactMethodId}/preferences/{preferenceName}": {
      "get": {
        "tags": [
          "ContactPreferences"
        ],
        "summary": "Gets a contact preference specified by preference name",
        "operationId": "ContactPreferences_GetContactMethodPreference",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "preferenceName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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.ContactPreferenceResponse"
                },
                "example": {
                  "name": "string",
                  "dataType": "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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact / Contact Method / Preference not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "ContactPreferences"
        ],
        "summary": "Updates a contact preference",
        "operationId": "ContactPreferences_UpdateContactMethodPreference",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "contactMethodId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "preferenceName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.UpdateContactMethodPreferenceRequest"
              },
              "example": {
                "value": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactPreferenceResponse"
                },
                "example": {
                  "name": "string",
                  "dataType": "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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact / Contact Method not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{id}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Gets a contact specified by ID",
        "operationId": "Contacts_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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.ContactResponse"
                },
                "example": {
                  "id": "string",
                  "referenceId": "string",
                  "name": "string",
                  "title": "string",
                  "isArchived": true,
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      },
      "put": {
        "tags": [
          "Contacts"
        ],
        "summary": "Replaces a contact",
        "operationId": "Contacts_Replace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.ReplaceContactRequest"
              },
              "example": {
                "name": "string",
                "title": "string",
                "referenceId": "string",
                "isArchived": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactResponse"
                },
                "example": {
                  "id": "string",
                  "referenceId": "string",
                  "name": "string",
                  "title": "string",
                  "isArchived": true,
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Deletes a contact",
        "operationId": "Contacts_DeleteContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Contacts"
        ],
        "summary": "Updates a contact",
        "operationId": "Contacts_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.UpdateContactRequest"
              },
              "example": {
                "name": "string",
                "title": "string",
                "referenceId": "string",
                "isArchived": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactResponse"
                },
                "example": {
                  "id": "string",
                  "referenceId": "string",
                  "name": "string",
                  "title": "string",
                  "isArchived": true,
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/relationships/{relationshipId}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Gets a list of contacts for a specified relationship ID",
        "operationId": "Contacts_GetByRelationshipId",
        "parameters": [
          {
            "name": "relationshipId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filters by contact name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Filters by contact title",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referenceId",
            "in": "query",
            "description": "Filters by external reference ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isArchived",
            "in": "query",
            "description": "Filters by contact archive status",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.ContactResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": "string",
                      "referenceId": "string",
                      "name": "string",
                      "title": "string",
                      "isArchived": true,
                      "createdOn": "string",
                      "createdBy": 0,
                      "modifiedOn": "string",
                      "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Contact not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Gets a list of contacts",
        "operationId": "Contacts_GetList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filters by contact name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "Filters by contact title",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "referenceId",
            "in": "query",
            "description": "Filters by external reference ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isArchived",
            "in": "query",
            "description": "Filters by contact archive status",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.ContactResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": "string",
                      "referenceId": "string",
                      "name": "string",
                      "title": "string",
                      "isArchived": true,
                      "createdOn": "string",
                      "createdBy": 0,
                      "modifiedOn": "string",
                      "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Creates a new contact",
        "operationId": "Contacts_Create",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Crm.V2.CreateContactRequest"
              },
              "example": {
                "name": "string",
                "title": "string",
                "referenceId": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.ContactResponse"
                },
                "example": {
                  "id": "string",
                  "referenceId": "string",
                  "name": "string",
                  "title": "string",
                  "isArchived": true,
                  "createdOn": "string",
                  "createdBy": 0,
                  "modifiedOn": "string",
                  "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{contactId}/relationships/{relatedEntityId}/{typeSlug}": {
      "delete": {
        "tags": [
          "Contacts"
        ],
        "summary": "Removes a relationship from a contact",
        "operationId": "Contacts_DeleteContactRelationship",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "description": "Contact Id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "relatedEntityId",
            "in": "path",
            "description": "Related Entity ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "typeSlug",
            "in": "path",
            "description": "Relationship type: customer, location, booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded"
          },
          "400": {
            "description": "Invalid args",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Invalid url parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "409": {
            "description": "Contact not found, Contact Relationship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a contact relationship",
        "operationId": "Contacts_CreateContactRelationship",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "description": "Contact Id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "relatedEntityId",
            "in": "path",
            "description": "Related Entity ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "typeSlug",
            "in": "path",
            "description": "Relationship type slug: customer, location, booking",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded"
          },
          "400": {
            "description": "Invalid args",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Invalid url parameter, External entity not found, Contact Relationship Type not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "409": {
            "description": "Contact not found, Unknown Contact Relationship Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/{contactId}/relationships": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Gets a list of contact relationships",
        "operationId": "Contacts_GetContactRelationshipList",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "relatedEntityId",
            "in": "query",
            "description": "Filters by related entity id",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "typeSlug",
            "in": "query",
            "description": "Relationship type slug: customer, location, booking",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "typeName",
            "in": "query",
            "description": "Relationship type name: Customer, Location, Booking",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.ContactRelationshipResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": "string",
                      "relatedEntityId": 0,
                      "typeName": "string",
                      "typeSlug": "string",
                      "createdOn": "string",
                      "createdBy": 0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter args",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "404": {
            "description": "Invalid url parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          },
          "409": {
            "description": "Contact not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/preferences": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Gets a list of preferences metadata",
        "operationId": "Contacts_GetPreferenceMetadataList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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/Crm.V2.ContactPreferenceTypeResponse"
                  }
                },
                "example": [
                  {
                    "id": "string",
                    "name": "string",
                    "description": "string",
                    "dataType": "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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/contacts/contact-methods": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Search for contact methods",
        "operationId": "Contacts_SearchContactMethods",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "referenceId",
            "in": "query",
            "description": "Filters by reference ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Filters by contact method type",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "query",
            "description": "Filters by contact method value",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.ContactMethodResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": "string",
                      "contactId": "string",
                      "referenceId": "string",
                      "type": {},
                      "value": "string",
                      "memo": "string",
                      "createdOn": "string",
                      "createdBy": 0,
                      "modifiedOn": "string",
                      "modifiedBy": 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": {}
                }
              }
            }
          },
          "403": {
            "description": "Provided authentication is insufficient to grant access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.contacts:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/{id}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Gets a Customer specified by ID",
        "operationId": "Customers_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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,
                  "taxExempt": true,
                  "tagTypeIds": [
                    0
                  ],
                  "doNotMail": true,
                  "doNotService": true,
                  "nationalAccount": true,
                  "createdOn": "string",
                  "createdById": 0,
                  "modifiedOn": "string",
                  "mergedToId": 0,
                  "paymentTermId": 0,
                  "creditLimit": 0,
                  "creditLimitBalance": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Update a customer",
        "operationId": "Customers_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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,
                "nationalAccount": true,
                "active": true,
                "tagTypeIds": [
                  0
                ],
                "taxExempt": true,
                "paymentTermId": 0,
                "creditLimit": 0,
                "creditLimitBalance": 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,
                  "taxExempt": true,
                  "tagTypeIds": [
                    0
                  ],
                  "doNotMail": true,
                  "doNotService": true,
                  "nationalAccount": true,
                  "createdOn": "string",
                  "createdById": 0,
                  "modifiedOn": "string",
                  "mergedToId": 0,
                  "paymentTermId": 0,
                  "creditLimit": 0,
                  "creditLimitBalance": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Gets a list of Customers",
        "operationId": "Customers_GetList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Returns specific customer records by customer ID.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Returns customer records created before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Returns customer records created on or after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Returns customer records modified before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Returns customer records modified after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "excludeAccountingChangesFromModifiedDateRange",
            "in": "query",
            "description": "Excludes accounting changes such as balance adjustments from the modified date range.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Returns customer records by name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "street",
            "in": "query",
            "description": "Returns customer records by street.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "description": "Returns customer records by unit.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "Returns customer records by city.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Returns customer records by state.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zip",
            "in": "query",
            "description": "Returns customer records by zip.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Returns customer records by country.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latitude",
            "in": "query",
            "description": "Returns customer records by latitude.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "description": "Returns customer records by longitude.",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "description": "Returns customer records by phone number of contacts.",
            "schema": {
              "type": "string"
            }
          },
          {
            "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"
                }
              ]
            }
          },
          {
            "name": "externalDataApplicationGuid",
            "in": "query",
            "description": "Returns customer records with external data for a particular GUID",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "externalDataKey",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalDataValues",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "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,
                      "taxExempt": true,
                      "tagTypeIds": [
                        0
                      ],
                      "doNotMail": true,
                      "doNotService": true,
                      "nationalAccount": true,
                      "createdOn": "string",
                      "createdById": 0,
                      "modifiedOn": "string",
                      "mergedToId": 0,
                      "paymentTermId": 0,
                      "creditLimit": 0,
                      "creditLimitBalance": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Creates a New Customer",
        "operationId": "Customers_Create",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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,
                "nationalAccount": 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"
                        }
                      ]
                    },
                    "coordinatesSource": {},
                    "coordinatesVerificationStatus": {},
                    "taxZoneId": 0
                  }
                ],
                "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"
                    }
                  ]
                },
                "taxExempt": true,
                "paymentTermId": 0,
                "creditLimit": 0,
                "creditLimitBalance": 0
              }
            }
          }
        },
        "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,
                  "taxExempt": true,
                  "tagTypeIds": [
                    0
                  ],
                  "doNotMail": true,
                  "doNotService": true,
                  "nationalAccount": true,
                  "createdOn": "string",
                  "createdById": 0,
                  "modifiedOn": "string",
                  "mergedToId": 0,
                  "paymentTermId": 0,
                  "creditLimit": 0,
                  "creditLimitBalance": 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,
                      "taxExempt": true,
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/{id}/notes": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Gets a list of notes for a customer",
        "operationId": "Customers_GetNotes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Returns notes created before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Returns notes created on or after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Returns notes modified before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Returns notes modified after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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": [
                    {
                      "id": 0,
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Creates a New Note",
        "operationId": "Customers_CreateNote",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {
                  "id": 0,
                  "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/{id}/notes/{noteId}": {
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Deletes a note on the specified customer",
        "operationId": "Customers_DeleteNote",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "noteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/{id}/contacts": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Gets a list of contacts for the specified customer",
        "operationId": "Customers_GetContactList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "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
                      },
                      "createdOn": "string",
                      "preferences": {
                        "jobRemindersEnabled": true,
                        "marketingUpdatesEnabled": true,
                        "invoiceStatementNotification": true,
                        "invoiceNotification": true,
                        "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Creates a contact on the customer",
        "operationId": "Customers_CreateContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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
                  },
                  "createdOn": "string",
                  "preferences": {
                    "jobRemindersEnabled": true,
                    "marketingUpdatesEnabled": true,
                    "invoiceStatementNotification": true,
                    "invoiceNotification": true,
                    "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/{id}/contacts/{contactId}": {
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Removes a contact from a customer",
        "operationId": "Customers_DeleteContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Customers"
        ],
        "summary": "Updates a contact on the customer",
        "operationId": "Customers_UpdateContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                "preferences": {
                  "jobRemindersEnabled": true,
                  "marketingUpdatesEnabled": true,
                  "invoiceStatementNotification": true,
                  "invoiceNotification": true,
                  "statementNotification": true
                }
              }
            }
          }
        },
        "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
                  },
                  "createdOn": "string",
                  "preferences": {
                    "jobRemindersEnabled": true,
                    "marketingUpdatesEnabled": true,
                    "invoiceStatementNotification": true,
                    "invoiceNotification": true,
                    "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/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",
        "operationId": "Customers_GetModifiedContactsList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on/after certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "customerIds",
            "in": "query",
            "description": "Returns specific contact records by customer IDs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Returns items created before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Returns items created on or after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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
                      },
                      "createdOn": "string",
                      "preferences": {
                        "jobRemindersEnabled": true,
                        "marketingUpdatesEnabled": true,
                        "invoiceStatementNotification": true,
                        "invoiceNotification": true,
                        "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/{id}/tags/{tagTypeId}": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Adds a Tag to a Customer",
        "operationId": "Customers_CreateTag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tagTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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.CreateCustomerTagResponse"
                },
                "example": {
                  "customerId": 0,
                  "tagTypeIds": [
                    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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Removes a Tag from a Customer",
        "operationId": "Customers_DeleteTag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tagTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/customers/custom-fields": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Gets a list of custom field types available for customers",
        "operationId": "Customers_GetCustomFieldTypes",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filters records by name (case-insensitive \"contains\" operation)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.Customers.CustomFieldTypeResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": 0,
                      "name": "string",
                      "dataType": "string",
                      "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": {}
                }
              }
            }
          },
          "404": {
            "description": "Customer not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/export/bookings": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Provides export feed for bookings",
        "operationId": "ExportBookings_Get",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
            }
          },
          {
            "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"
            }
          }
        ],
        "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": [
                    {
                      "summary": "string",
                      "id": 0,
                      "source": "string",
                      "createdOn": "string",
                      "name": "string",
                      "address": {
                        "street": "string",
                        "unit": "string",
                        "city": "string",
                        "state": "string",
                        "zip": "string",
                        "country": "string"
                      },
                      "customerType": {},
                      "start": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.bookings:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/export/customers/contacts": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Provides export feed for customer contacts",
        "operationId": "ExportContacts_CustomersContacts",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
            }
          },
          {
            "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"
            }
          }
        ],
        "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
                      },
                      "createdOn": "string",
                      "preferences": {
                        "jobRemindersEnabled": true,
                        "marketingUpdatesEnabled": true,
                        "invoiceStatementNotification": true,
                        "invoiceNotification": true,
                        "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/export/locations/contacts": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Provides export feed for locations contacts",
        "operationId": "ExportContacts_LocationsContacts",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
            }
          },
          {
            "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"
            }
          }
        ],
        "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",
                      "createdOn": "string",
                      "preferences": {
                        "jobRemindersEnabled": true,
                        "marketingUpdatesEnabled": true,
                        "invoiceStatementNotification": true,
                        "invoiceNotification": true,
                        "statementNotification": true
                      },
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/export/customers": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Provides export feed for customers",
        "operationId": "ExportCustomers_GetCustomers",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
            }
          },
          {
            "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"
            }
          }
        ],
        "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,
                      "taxExempt": true,
                      "tagTypeIds": [
                        0
                      ],
                      "doNotMail": true,
                      "doNotService": true,
                      "nationalAccount": true,
                      "createdOn": "string",
                      "createdById": 0,
                      "modifiedOn": "string",
                      "mergedToId": 0,
                      "paymentTermId": 0,
                      "creditLimit": 0,
                      "creditLimitBalance": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.customers:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/export/leads": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Provides export feed for leads",
        "operationId": "ExportLeads_Leads",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
            }
          },
          {
            "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"
            }
          }
        ],
        "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": [
                    {
                      "summary": "string",
                      "callReasonId": 0,
                      "callId": 0,
                      "bookingId": 0,
                      "manualCallId": 0,
                      "leadUrl": "string",
                      "leadCustomerName": "string",
                      "leadPhone": "string",
                      "leadEmail": "string",
                      "leadStreet": "string",
                      "leadUnit": "string",
                      "leadCity": "string",
                      "leadState": "string",
                      "leadZip": "string",
                      "leadCountry": "string",
                      "captureSource": "string",
                      "id": 0,
                      "status": {},
                      "priority": {},
                      "customerId": 0,
                      "locationId": 0,
                      "businessUnitId": 0,
                      "jobTypeId": 0,
                      "campaignId": 0,
                      "followUpDate": "string",
                      "createdById": 0,
                      "createdOn": "string",
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/export/locations": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Provides export feed for locations",
        "operationId": "ExportLocations_Locations",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
            }
          },
          {
            "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"
            }
          }
        ],
        "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,
                      "taxExempt": true,
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/leads/{id}": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Gets a lead specified by ID",
        "operationId": "Leads_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {},
                  "priority": {},
                  "customerId": 0,
                  "locationId": 0,
                  "businessUnitId": 0,
                  "jobTypeId": 0,
                  "campaignId": 0,
                  "followUpDate": "string",
                  "createdById": 0,
                  "createdOn": "string",
                  "modifiedOn": "string",
                  "tagTypeIds": [
                    0
                  ],
                  "dismissingReasonId": 0,
                  "summary": "string",
                  "callReasonId": 0,
                  "callId": 0,
                  "bookingId": 0,
                  "manualCallId": 0,
                  "leadUrl": "string",
                  "leadCustomerName": "string",
                  "leadPhone": "string",
                  "leadEmail": "string",
                  "leadStreet": "string",
                  "leadUnit": "string",
                  "leadCity": "string",
                  "leadState": "string",
                  "leadZip": "string",
                  "leadCountry": "string",
                  "captureSource": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:r"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Leads"
        ],
        "summary": "Updates a lead",
        "operationId": "Leads_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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,
                "summary": "string",
                "leadCustomerName": "string",
                "leadPhone": "string",
                "leadEmail": "string",
                "leadStreet": "string",
                "leadUnit": "string",
                "leadCity": "string",
                "leadState": "string",
                "leadZip": "string",
                "leadCountry": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.LeadResponse"
                },
                "example": {
                  "id": 0,
                  "status": {},
                  "priority": {},
                  "customerId": 0,
                  "locationId": 0,
                  "businessUnitId": 0,
                  "jobTypeId": 0,
                  "campaignId": 0,
                  "followUpDate": "string",
                  "createdById": 0,
                  "createdOn": "string",
                  "modifiedOn": "string",
                  "tagTypeIds": [
                    0
                  ],
                  "dismissingReasonId": 0,
                  "summary": "string",
                  "callReasonId": 0,
                  "callId": 0,
                  "bookingId": 0,
                  "manualCallId": 0,
                  "leadUrl": "string",
                  "leadCustomerName": "string",
                  "leadPhone": "string",
                  "leadEmail": "string",
                  "leadStreet": "string",
                  "leadUnit": "string",
                  "leadCity": "string",
                  "leadState": "string",
                  "leadZip": "string",
                  "leadCountry": "string",
                  "captureSource": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/leads": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Gets a list of leads",
        "operationId": "Leads_GetList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Perform lookup by multiple IDs (maximum 50)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Filters by associated customer",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "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"
            }
          },
          {
            "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"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filters by status\\\nValues: [Open, Dismissed, Converted]",
            "schema": {
              "type": "string",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Crm.V2.LeadStatus"
                }
              ]
            }
          },
          {
            "name": "customerCity",
            "in": "query",
            "description": "Filters by customer city",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerState",
            "in": "query",
            "description": "Filters by customer state",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerZip",
            "in": "query",
            "description": "Filters by customer zip",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerCreatedOnOrAfter",
            "in": "query",
            "description": "Returns customers who were created on or before a certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "customerCreatedBefore",
            "in": "query",
            "description": "Returns customers who were created after a certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "customerModifiedOnOrAfter",
            "in": "query",
            "description": "Returns customers who were modified on or before a certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "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"
            }
          },
          {
            "name": "genPermUrl",
            "in": "query",
            "description": "If true, generates a permanent URL for the lead",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "leadCustomerName",
            "in": "query",
            "description": "Filters by customer name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "leadPhone",
            "in": "query",
            "description": "Filters by phone",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isCaptureSourceForm",
            "in": "query",
            "description": "Filters by capture source",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "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": {},
                      "priority": {},
                      "customerId": 0,
                      "locationId": 0,
                      "businessUnitId": 0,
                      "jobTypeId": 0,
                      "campaignId": 0,
                      "followUpDate": "string",
                      "createdById": 0,
                      "createdOn": "string",
                      "modifiedOn": "string",
                      "tagTypeIds": [
                        0
                      ],
                      "dismissingReasonId": 0,
                      "summary": "string",
                      "callReasonId": 0,
                      "callId": 0,
                      "bookingId": 0,
                      "manualCallId": 0,
                      "leadUrl": "string",
                      "leadCustomerName": "string",
                      "leadPhone": "string",
                      "leadEmail": "string",
                      "leadStreet": "string",
                      "leadUnit": "string",
                      "leadCity": "string",
                      "leadState": "string",
                      "leadZip": "string",
                      "leadCountry": "string",
                      "captureSource": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Creates a lead",
        "operationId": "Leads_Create",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                "bookingId": 0,
                "leadCustomerName": "string",
                "leadPhone": "string",
                "leadEmail": "string",
                "leadStreet": "string",
                "leadUnit": "string",
                "leadCity": "string",
                "leadState": "string",
                "leadZip": "string",
                "leadCountry": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Crm.V2.LeadResponse"
                },
                "example": {
                  "id": 0,
                  "status": {},
                  "priority": {},
                  "customerId": 0,
                  "locationId": 0,
                  "businessUnitId": 0,
                  "jobTypeId": 0,
                  "campaignId": 0,
                  "followUpDate": "string",
                  "createdById": 0,
                  "createdOn": "string",
                  "modifiedOn": "string",
                  "tagTypeIds": [
                    0
                  ],
                  "dismissingReasonId": 0,
                  "summary": "string",
                  "callReasonId": 0,
                  "callId": 0,
                  "bookingId": 0,
                  "manualCallId": 0,
                  "leadUrl": "string",
                  "leadCustomerName": "string",
                  "leadPhone": "string",
                  "leadEmail": "string",
                  "leadStreet": "string",
                  "leadUnit": "string",
                  "leadCity": "string",
                  "leadState": "string",
                  "leadZip": "string",
                  "leadCountry": "string",
                  "captureSource": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": []
          }
        ]
      }
    },
    "/tenant/{tenant}/leads/{id}/follow-up": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Creates a follow-up",
        "operationId": "Leads_CreateFollowUp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/leads/{id}/notes": {
      "get": {
        "tags": [
          "Leads"
        ],
        "summary": "Gets notes for a lead",
        "operationId": "Leads_GetNotes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Returns notes created before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Returns notes created on or after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Returns notes modified before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Returns notes modified after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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": [
                    {
                      "id": 0,
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Creates a note on the specified lead",
        "operationId": "Leads_CreateNote",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {
                  "id": 0,
                  "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/leads/{id}/dismiss": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Dismisses a lead specified by ID",
        "operationId": "Leads_Dismiss",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/leads/form": {
      "post": {
        "tags": [
          "Leads"
        ],
        "summary": "Submits a lead form",
        "operationId": "Leads_SubmitLeadForm",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "id",
            "in": "query",
            "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.leads:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Gets a location specified by ID",
        "operationId": "Locations_Get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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,
                  "taxExempt": true,
                  "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Locations"
        ],
        "summary": "Updates a location",
        "operationId": "Locations_Update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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,
                  "taxExempt": true,
                  "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations": {
      "post": {
        "tags": [
          "Locations"
        ],
        "summary": "Creates a new location",
        "operationId": "Locations_Create",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "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"
                    }
                  ]
                },
                "coordinatesSource": {},
                "coordinatesVerificationStatus": {},
                "taxZoneId": 0,
                "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,
                  "taxExempt": true,
                  "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      },
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Gets a list of locations",
        "operationId": "Locations_GetList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Perform lookup by multiple IDs (maximum 50)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filters by customer's name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "description": "Filters by customer ID",
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "street",
            "in": "query",
            "description": "Filters by customer's street",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "description": "Filters by customer's unit",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "description": "Filters by customer's city",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Filters by customer's state",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "zip",
            "in": "query",
            "description": "Filters by customer's zip",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "description": "Filters by customer's country",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "latitude",
            "in": "query",
            "description": "Filters by customer's latitude",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "description": "Filters by customer's longitude",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "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"
                }
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "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"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "externalDataApplicationGuid",
            "in": "query",
            "description": "Returns location records with external data for a particular GUID",
            "schema": {
              "type": "string",
              "format": "guid"
            }
          },
          {
            "name": "externalDataKey",
            "in": "query",
            "description": "Performs lookup by external data key, 'externalDataValues' must also be provided.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "externalDataValues",
            "in": "query",
            "description": "Performs lookup by external data values (maximum 50), 'externalDataKey' must also be provided.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "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,
                      "taxExempt": true,
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/notes": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Gets a list of notes on the specified location",
        "operationId": "Locations_GetNotes",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Returns notes created before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Returns notes created on or after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Returns notes modified before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Returns notes modified after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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": [
                    {
                      "id": 0,
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Locations"
        ],
        "summary": "Creates a note on the specified location",
        "operationId": "Locations_CreateNote",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {
                  "id": 0,
                  "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/notes/{noteId}": {
      "delete": {
        "tags": [
          "Locations"
        ],
        "summary": "Deletes a note on the specified location",
        "operationId": "Locations_DeleteNote",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "noteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/contacts": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Gets a list of contacts for the specified location",
        "operationId": "Locations_GetContactList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "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",
                      "createdOn": "string",
                      "preferences": {
                        "jobRemindersEnabled": true,
                        "marketingUpdatesEnabled": true,
                        "invoiceStatementNotification": true,
                        "invoiceNotification": true,
                        "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Locations"
        ],
        "summary": "Creates a contact on the location",
        "operationId": "Locations_CreateContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                  "createdOn": "string",
                  "preferences": {
                    "jobRemindersEnabled": true,
                    "marketingUpdatesEnabled": true,
                    "invoiceStatementNotification": true,
                    "invoiceNotification": true,
                    "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/contacts": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Gets a list of contacts for a specific ModifiedOn date range, CreatedOn date range or by their Location IDs. Either LocationIds, modifiedOn, modifiedOnOrAfter, createdBefore or createdOnOrAfter parameter must be specified.",
        "operationId": "Locations_GetLocationsContactsList",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on/after certain date/time (in UTC). Either modifiedBefore or modifiedOnOrAfter parameter must be specified",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "locationIds",
            "in": "query",
            "description": "Returns specific contact records by location IDs.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Returns items created before the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Returns items created on or after the requested date (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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",
                      "createdOn": "string",
                      "preferences": {
                        "jobRemindersEnabled": true,
                        "marketingUpdatesEnabled": true,
                        "invoiceStatementNotification": true,
                        "invoiceNotification": true,
                        "statementNotification": true
                      },
                      "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/contacts/{contactId}": {
      "delete": {
        "tags": [
          "Locations"
        ],
        "summary": "Removes a contact from a location",
        "operationId": "Locations_DeleteContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      },
      "patch": {
        "tags": [
          "Locations"
        ],
        "summary": "Updates a contact on the location",
        "operationId": "Locations_UpdateContact",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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",
                "preferences": {
                  "jobRemindersEnabled": true,
                  "marketingUpdatesEnabled": true,
                  "invoiceStatementNotification": true,
                  "invoiceNotification": true,
                  "statementNotification": true
                }
              }
            }
          }
        },
        "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",
                  "createdOn": "string",
                  "preferences": {
                    "jobRemindersEnabled": true,
                    "marketingUpdatesEnabled": true,
                    "invoiceStatementNotification": true,
                    "invoiceNotification": true,
                    "statementNotification": 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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/tags/{tagTypeId}": {
      "post": {
        "tags": [
          "Locations"
        ],
        "summary": "Adds a Tag to a Location",
        "operationId": "Locations_CreateTag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tagTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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.CreateLocationTagResponse"
                },
                "example": {
                  "locationId": 0,
                  "tagTypeIds": [
                    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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Locations"
        ],
        "summary": "Removes a Tag from a Location",
        "operationId": "Locations_DeleteTag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tagTypeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/custom-fields": {
      "get": {
        "tags": [
          "Locations"
        ],
        "summary": "Gets a list of custom field types available for locations",
        "operationId": "Locations_GetCustomFieldTypes",
        "parameters": [
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "The logical number of page to return, starting from 1",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "How many records to return (50 by default)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "includeTotal",
            "in": "query",
            "description": "Whether total count should be returned",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filters records by name (case-insensitive \"contains\" operation)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "description": "Return items created before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdOnOrAfter",
            "in": "query",
            "description": "Return items created on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedBefore",
            "in": "query",
            "description": "Return items modified before certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "modifiedOnOrAfter",
            "in": "query",
            "description": "Return items modified on or after certain date/time (in UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Of_Crm.V2.Locations.CustomFieldTypeResponse"
                },
                "example": {
                  "page": 0,
                  "pageSize": 0,
                  "hasMore": true,
                  "totalCount": 0,
                  "data": [
                    {
                      "id": 0,
                      "name": "string",
                      "dataType": "string",
                      "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": {}
                }
              }
            }
          },
          "404": {
            "description": "Location not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                },
                "example": {
                  "type": "string",
                  "title": "string",
                  "status": 0,
                  "traceId": "string",
                  "errors": {},
                  "data": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/preferredtechnician/{preferredTechnicianId}": {
      "post": {
        "tags": [
          "Locations"
        ],
        "operationId": "Locations_UpdatePreferredTechnician",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "preferredTechnicianId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:w"
            ]
          }
        ]
      }
    },
    "/tenant/{tenant}/locations/{id}/preferredtechnician": {
      "get": {
        "tags": [
          "Locations"
        ],
        "operationId": "Locations_GetPreferredTechnician",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "tenant",
            "in": "path",
            "description": "Tenant ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request has succeeded",
            "content": {
              "application/json": {
                "schema": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "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": {}
                }
              }
            }
          },
          "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": {}
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKeyHeader": [],
            "oauth": [
              "tn.crm.locations:r"
            ]
          }
        ]
      }
    }
  },
  "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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"
              },
              {
                "type": "null"
              }
            ],
            "description": "Address of the booking"
          },
          "customerType": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.CustomerType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of customer (Residential/Commercial)"
          },
          "start": {
            "type": "string",
            "description": "Booking's start date time, in UTC",
            "format": "date-time"
          },
          "campaignId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's campaign",
            "format": "int64"
          },
          "businessUnitId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's business unit",
            "format": "int64"
          },
          "isFirstTimeClient": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Returns true if first time client"
          },
          "uploadedImages": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Uploaded images"
          },
          "isSendConfirmationEmail": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Returns true if customer should receive email when booking is created"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.BookingStatus"
              }
            ],
            "description": "Booking status"
          },
          "dismissingReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the reason booking was dismissed",
            "format": "int64"
          },
          "jobId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the job booked from the booking",
            "format": "int64"
          },
          "externalId": {
            "type": "string",
            "description": "External ID of booking"
          },
          "priority": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Priority"
              },
              {
                "type": "null"
              }
            ],
            "description": "Booking priority"
          },
          "jobTypeId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's job type",
            "format": "int64"
          },
          "bookingProviderId": {
            "type": "integer",
            "description": "Booking provider id",
            "format": "int64"
          },
          "modifiedOn": {
            "type": "string",
            "description": "When the booking was modified",
            "format": "date-time"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Booking summary"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.AddressModel": {
        "required": [
          "street",
          "city",
          "state",
          "zip",
          "country"
        ],
        "type": "object",
        "properties": {
          "street": {
            "type": "string",
            "description": "Booking address street"
          },
          "unit": {
            "type": [
              "string",
              "null"
            ],
            "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.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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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"
              },
              {
                "type": "null"
              }
            ],
            "description": "Address of the booking"
          },
          "contacts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.BookingContactModel"
            },
            "description": "Contacts for the booking"
          },
          "customerType": {
            "type": [
              "string",
              "null"
            ],
            "description": "Type of the customer (Residential/Commercial)"
          },
          "start": {
            "type": [
              "string",
              "null"
            ],
            "description": "Booking's start Date(time) in UTC",
            "format": "date-time"
          },
          "summary": {
            "type": "string",
            "description": "Summary of the booking"
          },
          "campaignId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's campaign",
            "format": "int64"
          },
          "businessUnitId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's business unit",
            "format": "int64"
          },
          "jobTypeId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's job type",
            "format": "int64"
          },
          "priority": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Priority"
              },
              {
                "type": "null"
              }
            ],
            "description": "Booking priority"
          },
          "isFirstTimeClient": {
            "type": "boolean",
            "description": "True if first time client"
          },
          "uploadedImages": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Uploaded images"
          },
          "isSendConfirmationEmail": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Returns true if customer should receive email when booking is created"
          },
          "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",
              "null"
            ]
          }
        },
        "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",
              "null"
            ],
            "description": "Memo of contact"
          }
        },
        "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.DismissBookingModel": {
        "type": "object",
        "properties": {
          "callReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Call reason ID for dismissing the booking",
            "format": "int64"
          },
          "dismissingMemo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Memo for dismissing the booking"
          }
        },
        "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."
      },
      "PaginatedResponse_Of_Crm.V2.ContactMethodResponse": {
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Crm.V2.ContactMethodResponse"
            },
            "description": "The collection of result items, will never have more than PageSize items"
          }
        },
        "additionalProperties": false,
        "description": "Represents paginated API response."
      },
      "Crm.V2.ContactMethodResponse": {
        "required": [
          "type",
          "value",
          "id",
          "contactId",
          "createdOn",
          "createdBy",
          "modifiedOn",
          "modifiedBy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the contact method",
            "format": "guid"
          },
          "contactId": {
            "type": "string",
            "description": "ID of the contact",
            "format": "guid"
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference ID of the contact method"
          },
          "type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.ContactType"
              }
            ],
            "description": "Contact method type"
          },
          "value": {
            "type": "string",
            "description": "Value of the contact method"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Memo for the contact method"
          },
          "createdOn": {
            "type": "string",
            "description": "DateTime (UTC) that customer record was created",
            "format": "date-time"
          },
          "createdBy": {
            "type": "integer",
            "description": "User ID who created the record.",
            "format": "int64"
          },
          "modifiedOn": {
            "type": "string",
            "description": "Modified on (UTC) for the record.",
            "format": "date-time"
          },
          "modifiedBy": {
            "type": "integer",
            "description": "User ID who modified the record.",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.CreateContactMethodRequest": {
        "required": [
          "type",
          "value"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference ID of the contact method"
          },
          "type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.ContactType"
              }
            ],
            "description": "Type of the contact method"
          },
          "value": {
            "type": "string",
            "description": "Value of the contact method"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Memo for the contact method"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.UpsertContactMethodRequest": {
        "required": [
          "type",
          "value"
        ],
        "type": "object",
        "properties": {
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference ID of the contact method"
          },
          "type": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.ContactType"
              }
            ],
            "description": "Type of the contact method"
          },
          "value": {
            "type": "string",
            "description": "Value of the contact method"
          },
          "memo": {
            "type": [
              "string",
              "null"
            ],
            "description": "Memo for the contact method"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.UpdateContactMethodRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Value of the contact method"
          },
          "memo": {
            "type": "string",
            "description": "Memo for the contact method"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.ContactPreferenceResponse": {
        "required": [
          "name",
          "dataType"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Contact preference name"
          },
          "dataType": {
            "type": "string",
            "description": "Contact preference data type"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Value of the contact preference"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.UpdateContactMethodPreferenceRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Value of the contact method"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.ContactResponse": {
        "required": [
          "id",
          "isArchived",
          "createdOn",
          "createdBy",
          "modifiedOn",
          "modifiedBy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the contact",
            "format": "guid"
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "External reference ID of the contact"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the contact"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the contact"
          },
          "isArchived": {
            "type": "boolean",
            "description": "Whether the contact has been archived."
          },
          "createdOn": {
            "type": "string",
            "description": "When the contact was created",
            "format": "date-time"
          },
          "createdBy": {
            "type": "integer",
            "description": "User ID who created this contact",
            "format": "int64"
          },
          "modifiedOn": {
            "type": "string",
            "description": "When the contact was modified",
            "format": "date-time"
          },
          "modifiedBy": {
            "type": "integer",
            "description": "User ID who modified this contact",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "PaginatedResponse_Of_Crm.V2.ContactResponse": {
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Crm.V2.ContactResponse"
            },
            "description": "The collection of result items, will never have more than PageSize items"
          }
        },
        "additionalProperties": false,
        "description": "Represents paginated API response."
      },
      "Crm.V2.ReplaceContactRequest": {
        "required": [
          "isArchived"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the contact"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the contact"
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "External reference ID of the contact"
          },
          "isArchived": {
            "type": "boolean",
            "description": "Sets whether the contact has been archived."
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.CreateContactRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the contact"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the contact"
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "External reference ID of the contact"
          }
        },
        "additionalProperties": false
      },
      "PaginatedResponse_Of_Crm.V2.ContactRelationshipResponse": {
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Crm.V2.ContactRelationshipResponse"
            },
            "description": "The collection of result items, will never have more than PageSize items"
          }
        },
        "additionalProperties": false,
        "description": "Represents paginated API response."
      },
      "Crm.V2.ContactRelationshipResponse": {
        "required": [
          "id",
          "relatedEntityId",
          "typeName",
          "typeSlug",
          "createdOn",
          "createdBy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the contact relationship",
            "format": "guid"
          },
          "relatedEntityId": {
            "type": "integer",
            "description": "ID of the related entity",
            "format": "int64"
          },
          "typeName": {
            "type": "string",
            "description": "Relationship type name: Customer, Location, Booking"
          },
          "typeSlug": {
            "type": "string",
            "description": "Relationship type slug: customer, location, booking"
          },
          "createdOn": {
            "type": "string",
            "description": "When the contact relationship was created",
            "format": "date-time"
          },
          "createdBy": {
            "type": "integer",
            "description": "User ID who created this contact relationship",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.UpdateContactRequest": {
        "required": [
          "isArchived"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the contact"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Title of the contact"
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "External reference ID of the contact"
          },
          "isArchived": {
            "type": "boolean",
            "description": "Sets whether the contact has been archived."
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.ContactPreferenceTypeResponse": {
        "required": [
          "id",
          "name",
          "dataType"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID of the Preference Type",
            "format": "guid"
          },
          "name": {
            "type": "string",
            "description": "Preference Name"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Preference Description"
          },
          "dataType": {
            "type": "string",
            "description": "Preference Data Type: Bool, only Bool supported for now"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.Customers.CustomerResponse": {
        "required": [
          "id",
          "active",
          "name",
          "type",
          "address",
          "customFields",
          "balance",
          "taxExempt",
          "tagTypeIds",
          "doNotMail",
          "doNotService",
          "nationalAccount",
          "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"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Tax Exempt status of the customer."
          },
          "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”"
          },
          "nationalAccount": {
            "type": "boolean",
            "description": "Customer has been flagged as National Account"
          },
          "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",
              "null"
            ],
            "description": "The customer ID of the record that this record was previously merged to.",
            "format": "int64"
          },
          "paymentTermId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The Payment Term ID.",
            "format": "int64"
          },
          "creditLimit": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit for the customer.",
            "format": "decimal"
          },
          "creditLimitBalance": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit Balance for the customer.",
            "format": "decimal"
          },
          "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",
              "null"
            ],
            "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",
              "null"
            ],
            "description": "Latitude",
            "format": "double"
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Longitude",
            "format": "double"
          }
        },
        "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",
              "null"
            ],
            "description": "Name/label of the custom field"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Value of the custom field"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
          "taxExempt",
          "tagTypeIds",
          "doNotMail",
          "doNotService",
          "nationalAccount",
          "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"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Tax Exempt status of the customer."
          },
          "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”"
          },
          "nationalAccount": {
            "type": "boolean",
            "description": "Customer has been flagged as National Account"
          },
          "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",
              "null"
            ],
            "description": "The customer ID of the record that this record was previously merged to.",
            "format": "int64"
          },
          "paymentTermId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The Payment Term ID.",
            "format": "int64"
          },
          "creditLimit": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit for the customer.",
            "format": "decimal"
          },
          "creditLimitBalance": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit Balance for the customer.",
            "format": "decimal"
          },
          "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",
          "taxExempt",
          "tagTypeIds",
          "externalData",
          "contacts"
        ],
        "type": "object",
        "properties": {
          "taxZoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the location tax zone",
            "format": "int64"
          },
          "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",
              "null"
            ],
            "description": "Tells you which location record this record was merged into.",
            "format": "int64"
          },
          "zoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the location's Zone",
            "format": "int64"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Tax Exempt status of the location."
          },
          "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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”"
          }
        },
        "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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”"
          }
        },
        "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"
              },
              {
                "type": "null"
              }
            ],
            "description": "Residential or commercial"
          },
          "doNotMail": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Customer has been flagged as “do not mail”"
          },
          "doNotService": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Customer has been flagged as “do not service”"
          },
          "nationalAccount": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Customer has been flagged as National Account"
          },
          "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",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.NewCustomerContact"
            },
            "description": "Contacts for the customer"
          },
          "customFields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel"
            },
            "description": "Customer record’s custom fields"
          },
          "tagTypeIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Tag Type IDs to be associated with the customer"
          },
          "externalData": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.ExternalDataCreateRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional model that contains a list of external data items\nthat should be attached to this Customer."
          },
          "taxExempt": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Optional Tax Exempt."
          },
          "paymentTermId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional Payment Term ID.",
            "format": "int64"
          },
          "creditLimit": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit for the customer.",
            "format": "decimal"
          },
          "creditLimitBalance": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit for the customer.",
            "format": "decimal"
          }
        },
        "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",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.NewCustomerContact"
            },
            "description": "Contacts for the location"
          },
          "customFields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel"
            },
            "description": "Location record’s custom fields"
          },
          "tagTypeIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Tag type ids for the location"
          },
          "externalData": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.ExternalDataCreateRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional model that contains a list of external data items\nthat should be attached to this Location."
          },
          "coordinatesSource": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GeolocationCoordinatesSource"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gets or sets the source of the coordinates."
          },
          "coordinatesVerificationStatus": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GeolocationVerificationStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gets or sets the verification status of the coordinates."
          },
          "taxZoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional tax zone id to use for the location. When provided, this tax zone is used instead of being\nautomatically resolved from the location’s address.",
            "format": "int64"
          }
        },
        "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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”"
          }
        },
        "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
      },
      "GeolocationCoordinatesSource": {
        "enum": [
          "None",
          "System",
          "User",
          "Imported"
        ],
        "type": "string",
        "description": "Specifies the source of geolocation coordinates.",
        "x-enumNames": [
          "None",
          "System",
          "User",
          "Imported"
        ]
      },
      "GeolocationVerificationStatus": {
        "enum": [
          "Unverified",
          "InProgress",
          "Failed",
          "Verified"
        ],
        "type": "string",
        "description": "Represents the status of geolocation verification for a set of coordinates.",
        "x-enumNames": [
          "Unverified",
          "InProgress",
          "Failed",
          "Verified"
        ]
      },
      "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”"
          },
          "nationalAccount": {
            "type": "boolean",
            "description": "Customer has been flagged as National Account"
          },
          "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"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Customer has been flagged as Tax Exempt"
          },
          "paymentTermId": {
            "type": "integer",
            "description": "Payment Term ID",
            "format": "int64"
          },
          "creditLimit": {
            "type": "number",
            "description": "Credit Limit for the customer.",
            "format": "decimal"
          },
          "creditLimitBalance": {
            "type": "number",
            "description": "Credit Limit Balance for the customer.",
            "format": "decimal"
          }
        },
        "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"
              },
              {
                "type": "null"
              }
            ],
            "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."
          },
          "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",
              "null"
            ],
            "description": "External data value.",
            "format": "multiline"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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": [
          "id",
          "text",
          "isPinned",
          "createdById",
          "createdOn",
          "modifiedOn"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id of the note",
            "format": "int64"
          },
          "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",
              "null"
            ],
            "description": "Whether to pin customer note to the top"
          },
          "addToLocations": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to add the same note to the customer's active locations"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
          "createdOn"
        ],
        "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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”"
          },
          "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"
          },
          "createdOn": {
            "type": "string",
            "description": "Created On (UTC) for the record",
            "format": "date-time"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact Preferences"
          }
        },
        "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.ContactPreferencesResponse": {
        "required": [
          "jobRemindersEnabled",
          "marketingUpdatesEnabled",
          "invoiceStatementNotification",
          "invoiceNotification",
          "statementNotification"
        ],
        "type": "object",
        "properties": {
          "jobRemindersEnabled": {
            "type": "boolean",
            "description": "Job Reminders Enabled"
          },
          "marketingUpdatesEnabled": {
            "type": "boolean",
            "description": "Marketing Updates Enabled"
          },
          "invoiceStatementNotification": {
            "type": "boolean",
            "description": "Invoice Statement Notification (legacy combined field, true only if both InvoiceNotification AND StatementNotification are true)"
          },
          "invoiceNotification": {
            "type": "boolean",
            "description": "Invoice Notification - whether this contact receives invoice notifications"
          },
          "statementNotification": {
            "type": "boolean",
            "description": "Statement Notification - whether this contact receives statement 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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly”"
          }
        },
        "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”"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesRequest"
              }
            ],
            "description": "Contact preference setting for Job Reminders and Marketing Updates"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.Customers.ContactPreferencesRequest": {
        "required": [
          "jobRemindersEnabled",
          "marketingUpdatesEnabled",
          "invoiceStatementNotification",
          "invoiceNotification",
          "statementNotification"
        ],
        "type": "object",
        "properties": {
          "jobRemindersEnabled": {
            "type": "boolean",
            "description": "Job Reminders Enabled"
          },
          "marketingUpdatesEnabled": {
            "type": "boolean",
            "description": "Marketing Updates Enabled"
          },
          "invoiceStatementNotification": {
            "type": "boolean",
            "description": "Invoice Statement Notification (legacy combined field - setting this will update both InvoiceNotification and StatementNotification)"
          },
          "invoiceNotification": {
            "type": "boolean",
            "description": "Invoice Notification - whether this contact receives invoice notifications"
          },
          "statementNotification": {
            "type": "boolean",
            "description": "Statement Notification - whether this contact receives statement notifications"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
          "createdOn",
          "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"
          },
          "createdOn": {
            "type": "string",
            "description": "Created On (UTC) for the record",
            "format": "date-time"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact Preferences"
          },
          "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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”"
          },
          "customerId": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.Customers.CreateCustomerTagResponse": {
        "required": [
          "customerId",
          "tagTypeIds"
        ],
        "type": "object",
        "properties": {
          "customerId": {
            "type": "integer",
            "format": "int64"
          },
          "tagTypeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "additionalProperties": false
      },
      "PaginatedResponse_Of_Crm.V2.Customers.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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldTypeResponse"
            },
            "description": "The collection of result items, will never have more than PageSize items"
          }
        },
        "additionalProperties": false,
        "description": "Represents paginated API response."
      },
      "Crm.V2.Customers.CustomFieldTypeResponse": {
        "required": [
          "id",
          "createdOn",
          "modifiedOn"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the custom field type",
            "format": "int64"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the custom field type"
          },
          "dataType": {
            "type": [
              "string",
              "null"
            ],
            "description": "The type custom field type (e.g. Text, Dropdown, or Numeric)"
          },
          "dataTypeOptions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The type custom field type (e.g. Text, Dropdown, or Numeric)"
          },
          "createdOn": {
            "type": "string",
            "description": "DateTime (UTC) that customer record was created",
            "format": "date-time"
          },
          "modifiedOn": {
            "type": "string",
            "description": "Modified on (UTC) for the record.",
            "format": "date-time"
          }
        },
        "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": {
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Booking summary"
          },
          "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"
              },
              {
                "type": "null"
              }
            ],
            "description": "Address of the booking"
          },
          "customerType": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.CustomerType"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of customer (Residential/Commercial)"
          },
          "start": {
            "type": "string",
            "description": "Booking's start date time, in UTC",
            "format": "date-time"
          },
          "campaignId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's campaign",
            "format": "int64"
          },
          "businessUnitId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's business unit",
            "format": "int64"
          },
          "isFirstTimeClient": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Returns true if first time client"
          },
          "uploadedImages": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Uploaded images"
          },
          "isSendConfirmationEmail": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Returns true if customer should receive email when booking is created"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.BookingStatus"
              }
            ],
            "description": "Booking status"
          },
          "dismissingReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the reason booking was dismissed",
            "format": "int64"
          },
          "jobId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the job booked from the booking",
            "format": "int64"
          },
          "externalId": {
            "type": "string",
            "description": "External ID of booking"
          },
          "priority": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Priority"
              },
              {
                "type": "null"
              }
            ],
            "description": "Booking priority"
          },
          "jobTypeId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the booking's job type",
            "format": "int64"
          },
          "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",
          "createdOn",
          "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"
          },
          "createdOn": {
            "type": "string",
            "description": "Created On (UTC) for the record",
            "format": "date-time"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact Preferences"
          },
          "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",
              "null"
            ],
            "description": "Short description about this contact, for example, “work #” or “Owner’s daughter - Kelly.”"
          },
          "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",
          "createdOn",
          "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",
              "null"
            ],
            "description": "Memo of contact"
          },
          "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"
          },
          "createdOn": {
            "type": "string",
            "description": "Date/time (in UTC) the contact was created",
            "format": "date-time"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact Preferences"
          },
          "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",
          "taxExempt",
          "tagTypeIds",
          "doNotMail",
          "doNotService",
          "nationalAccount",
          "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"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Tax Exempt status of the customer."
          },
          "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”"
          },
          "nationalAccount": {
            "type": "boolean",
            "description": "Customer has been flagged as National Account"
          },
          "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",
              "null"
            ],
            "description": "The customer ID of the record that this record was previously merged to.",
            "format": "int64"
          },
          "paymentTermId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The Payment Term ID.",
            "format": "int64"
          },
          "creditLimit": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit for the customer.",
            "format": "decimal"
          },
          "creditLimitBalance": {
            "type": [
              "number",
              "null"
            ],
            "description": "Credit Limit Balance for the customer.",
            "format": "decimal"
          },
          "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",
          "createdById",
          "createdOn",
          "modifiedOn",
          "active"
        ],
        "type": "object",
        "properties": {
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Summary of the lead"
          },
          "callReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Call reason ID used to classify the lead by the user",
            "format": "int64"
          },
          "callId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Call ID used to classify the lead",
            "format": "int64"
          },
          "bookingId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Booking ID used to classify the lead",
            "format": "int64"
          },
          "manualCallId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Manual Call ID used to classify the lead",
            "format": "int64"
          },
          "leadUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Permanent URL for the lead"
          },
          "leadCustomerName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Customer name provided for the lead"
          },
          "leadPhone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number provided for the lead"
          },
          "leadEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email provided for the lead"
          },
          "leadStreet": {
            "type": [
              "string",
              "null"
            ],
            "description": "Street provided for the lead"
          },
          "leadUnit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit provided for the lead"
          },
          "leadCity": {
            "type": [
              "string",
              "null"
            ],
            "description": "City provided for the lead"
          },
          "leadState": {
            "type": [
              "string",
              "null"
            ],
            "description": "State provided for the lead"
          },
          "leadZip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Zip provided for the lead"
          },
          "leadCountry": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country provided for the lead"
          },
          "captureSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capture source of the lead"
          },
          "id": {
            "type": "integer",
            "description": "ID of the lead",
            "format": "int64"
          },
          "status": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.LeadStatus"
              }
            ],
            "description": "Status of the lead"
          },
          "priority": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Priority"
              }
            ],
            "description": "Priority of the lead"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Customer associated to the lead",
            "format": "int64"
          },
          "locationId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Location associated to the lead",
            "format": "int64"
          },
          "businessUnitId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Business unit associated to the lead",
            "format": "int64"
          },
          "jobTypeId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Job type associated to the lead",
            "format": "int64"
          },
          "campaignId": {
            "type": "integer",
            "description": "Campaign associated to the lead",
            "format": "int64"
          },
          "followUpDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next time someone is supposed to follow up on this lead",
            "format": "date-time"
          },
          "createdById": {
            "type": "integer",
            "description": "User ID who created this lead",
            "format": "int64"
          },
          "createdOn": {
            "type": "string",
            "description": "When the lead was created",
            "format": "date-time"
          },
          "modifiedOn": {
            "type": "string",
            "description": "When the lead was modified",
            "format": "date-time"
          },
          "tagTypeIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "List of IDs of tags on the lead"
          },
          "dismissingReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the reason booking was dismissed",
            "format": "int64"
          },
          "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",
          "taxExempt",
          "tagTypeIds",
          "externalData"
        ],
        "type": "object",
        "properties": {
          "taxZoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the location tax zone",
            "format": "int64"
          },
          "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",
              "null"
            ],
            "description": "Tells you which location record this record was merged into.",
            "format": "int64"
          },
          "zoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the location's Zone",
            "format": "int64"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Tax Exempt status of the location."
          },
          "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",
          "createdById",
          "createdOn",
          "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"
          },
          "priority": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Priority"
              }
            ],
            "description": "Priority of the lead"
          },
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Customer associated to the lead",
            "format": "int64"
          },
          "locationId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Location associated to the lead",
            "format": "int64"
          },
          "businessUnitId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Business unit associated to the lead",
            "format": "int64"
          },
          "jobTypeId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Job type associated to the lead",
            "format": "int64"
          },
          "campaignId": {
            "type": "integer",
            "description": "Campaign associated to the lead",
            "format": "int64"
          },
          "followUpDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "The next time someone is supposed to follow up on this lead",
            "format": "date-time"
          },
          "createdById": {
            "type": "integer",
            "description": "User ID who created this lead",
            "format": "int64"
          },
          "createdOn": {
            "type": "string",
            "description": "When the lead was created",
            "format": "date-time"
          },
          "modifiedOn": {
            "type": "string",
            "description": "When the lead was modified",
            "format": "date-time"
          },
          "tagTypeIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "List of IDs of tags on the lead"
          },
          "dismissingReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the reason booking was dismissed",
            "format": "int64"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Summary of the lead"
          },
          "callReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Call reason ID used to classify the lead by the user",
            "format": "int64"
          },
          "callId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Call ID used to classify the lead",
            "format": "int64"
          },
          "bookingId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Booking ID used to classify the lead",
            "format": "int64"
          },
          "manualCallId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Manual Call ID used to classify the lead",
            "format": "int64"
          },
          "leadUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Permanent URL for the lead"
          },
          "leadCustomerName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Customer name provided for the lead"
          },
          "leadPhone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number provided for the lead"
          },
          "leadEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email provided for the lead"
          },
          "leadStreet": {
            "type": [
              "string",
              "null"
            ],
            "description": "Street provided for the lead"
          },
          "leadUnit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit provided for the lead"
          },
          "leadCity": {
            "type": [
              "string",
              "null"
            ],
            "description": "City provided for the lead"
          },
          "leadState": {
            "type": [
              "string",
              "null"
            ],
            "description": "State provided for the lead"
          },
          "leadZip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Zip provided for the lead"
          },
          "leadCountry": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country provided for the lead"
          },
          "captureSource": {
            "type": [
              "string",
              "null"
            ],
            "description": "Capture source of the lead"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
              "null"
            ],
            "description": "Text of follow-up note"
          },
          "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",
              "null"
            ],
            "description": "Text of follow-up note"
          },
          "pinToTop": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to pin follow-up note to the top"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.LeadCreateRequest": {
        "required": [
          "campaignId",
          "summary"
        ],
        "type": "object",
        "properties": {
          "customerId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the customer",
            "format": "int64"
          },
          "locationId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the location",
            "format": "int64"
          },
          "campaignId": {
            "type": "integer",
            "description": "ID of the campaign",
            "format": "int64"
          },
          "businessUnitId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the business unit",
            "format": "int64"
          },
          "jobTypeId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of job type",
            "format": "int64"
          },
          "summary": {
            "type": "string",
            "description": "Lead summary"
          },
          "tagTypeIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "List of IDs of tags on the lead"
          },
          "priority": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Priority"
              },
              {
                "type": "null"
              }
            ],
            "description": "Priority of the lead"
          },
          "callReasonId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the call reason. Required if follow up date is not provided.",
            "format": "int64"
          },
          "followUpDate": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date of when to follow up. Required if call reason ID is not provided.",
            "format": "date-time"
          },
          "bookingId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The associated Booking Id to use for creating the Lead.\nThis Booking will be dismissed and a Lead will get created associated to this Booking.",
            "format": "int64"
          },
          "leadCustomerName": {
            "type": [
              "string",
              "null"
            ],
            "description": "Customer name provided for the lead"
          },
          "leadPhone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Phone number provided for the lead"
          },
          "leadEmail": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email provided for the lead"
          },
          "leadStreet": {
            "type": [
              "string",
              "null"
            ],
            "description": "Street provided for the lead"
          },
          "leadUnit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unit provided for the lead"
          },
          "leadCity": {
            "type": [
              "string",
              "null"
            ],
            "description": "City provided for the lead"
          },
          "leadState": {
            "type": [
              "string",
              "null"
            ],
            "description": "State provided for the lead"
          },
          "leadZip": {
            "type": [
              "string",
              "null"
            ],
            "description": "Zip provided for the lead"
          },
          "leadCountry": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country provided for the lead"
          }
        },
        "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"
          },
          "summary": {
            "type": "string",
            "description": "Lead summary"
          },
          "leadCustomerName": {
            "type": "string",
            "description": "Customer name provided for the lead"
          },
          "leadPhone": {
            "type": "string",
            "description": "Phone number provided for the lead"
          },
          "leadEmail": {
            "type": "string",
            "description": "Email provided for the lead"
          },
          "leadStreet": {
            "type": "string",
            "description": "Street provided for the lead"
          },
          "leadUnit": {
            "type": "string",
            "description": "Unit provided for the lead"
          },
          "leadCity": {
            "type": "string",
            "description": "City provided for the lead"
          },
          "leadState": {
            "type": "string",
            "description": "State provided for the lead"
          },
          "leadZip": {
            "type": "string",
            "description": "Zip provided for the lead"
          },
          "leadCountry": {
            "type": "string",
            "description": "Country provided for the lead"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.LeadNoteCreateRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text content of lead note"
          },
          "pinToTop": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to pin lead note to the top"
          }
        },
        "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",
              "null"
            ],
            "description": "The email of the customer"
          },
          "phoneNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "The phone number of the customer"
          },
          "address": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.CustomerAddress"
              },
              {
                "type": "null"
              }
            ],
            "description": "The address of the customer"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "Summary submitted in the form"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.Locations.LocationResponse": {
        "required": [
          "id",
          "customerId",
          "active",
          "name",
          "address",
          "customFields",
          "createdOn",
          "createdById",
          "modifiedOn",
          "taxExempt",
          "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",
              "null"
            ],
            "description": "Tells you which location record this record was merged into.",
            "format": "int64"
          },
          "zoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the location's Zone",
            "format": "int64"
          },
          "taxExempt": {
            "type": "boolean",
            "description": "Tax Exempt status of the location."
          },
          "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",
              "null"
            ],
            "description": "ID of the location tax zone",
            "format": "int64"
          }
        },
        "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",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.NewCustomerContact"
            },
            "description": "Contacts for the location"
          },
          "customFields": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Customers.CustomFieldUpdateModel"
            },
            "description": "Location record’s custom fields"
          },
          "tagTypeIds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "format": "int64"
            },
            "description": "Tag type ids for the location"
          },
          "externalData": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.ExternalDataCreateRequest"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional model that contains a list of external data items\nthat should be attached to this Location."
          },
          "coordinatesSource": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GeolocationCoordinatesSource"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gets or sets the source of the coordinates."
          },
          "coordinatesVerificationStatus": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GeolocationVerificationStatus"
              },
              {
                "type": "null"
              }
            ],
            "description": "Gets or sets the verification status of the coordinates."
          },
          "taxZoneId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Optional tax zone id to use for the location. When provided, this tax zone is used instead of being\nautomatically resolved from the location’s address.",
            "format": "int64"
          },
          "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
              "null"
            ],
            "description": "Latitude",
            "format": "double"
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Longitude",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.LocationNoteCreateRequest": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text content of location note"
          },
          "pinToTop": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to pin location note to the top"
          },
          "addToCustomer": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether to add the same note to the location's customer"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
          "createdOn"
        ],
        "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",
              "null"
            ],
            "description": "Memo of contact"
          },
          "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"
          },
          "createdOn": {
            "type": "string",
            "description": "Date/time (in UTC) the contact was created",
            "format": "date-time"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact Preferences"
          }
        },
        "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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "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",
          "createdOn",
          "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",
              "null"
            ],
            "description": "Memo of contact"
          },
          "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"
          },
          "createdOn": {
            "type": "string",
            "description": "Date/time (in UTC) the contact was created",
            "format": "date-time"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact Preferences"
          },
          "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",
              "null"
            ],
            "description": "Memo of contact"
          }
        },
        "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"
          },
          "preferences": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Crm.V2.Customers.ContactPreferencesRequest"
              }
            ],
            "description": "Contact preference setting for Job Reminders and Marketing Updates"
          }
        },
        "additionalProperties": false
      },
      "Crm.V2.Locations.CreateLocationTagResponse": {
        "required": [
          "locationId",
          "tagTypeIds"
        ],
        "type": "object",
        "properties": {
          "locationId": {
            "type": "integer",
            "format": "int64"
          },
          "tagTypeIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int64"
            }
          }
        },
        "additionalProperties": false
      },
      "PaginatedResponse_Of_Crm.V2.Locations.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",
              "null"
            ],
            "description": "Total count of records for this query (can optionally be populated)",
            "format": "int32"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Crm.V2.Locations.CustomFieldTypeResponse"
            },
            "description": "The collection of result items, will never have more than PageSize items"
          }
        },
        "additionalProperties": false,
        "description": "Represents paginated API response."
      },
      "Crm.V2.Locations.CustomFieldTypeResponse": {
        "required": [
          "id",
          "createdOn",
          "modifiedOn"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the custom field type",
            "format": "int64"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the custom field type"
          },
          "dataType": {
            "type": [
              "string",
              "null"
            ],
            "description": "The type custom field type (e.g. Text, Dropdown, or Numeric)"
          },
          "dataTypeOptions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The type custom field type (e.g. Text, Dropdown, or Numeric)"
          },
          "createdOn": {
            "type": "string",
            "description": "DateTime (UTC) that customer record was created",
            "format": "date-time"
          },
          "modifiedOn": {
            "type": "string",
            "description": "Modified on (UTC) for the record.",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "apiKeyHeader": {
        "type": "apiKey",
        "name": "ST-App-Key",
        "in": "header",
        "description": "ServiceTitan App Key Header"
      },
      "oauth": {
        "type": "oauth2",
        "description": "OAuth 2.0 Client Credentials Flow",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://auth.servicetitan.io/connect/token",
            "scopes": {
              "tn.crm.bookingprovidertags:w": "CRM → Booking Provider Tags (Write)",
              "tn.crm.bookingprovidertags:r": "CRM → Booking Provider Tags (Read)",
              "tn.crm.bookings:r": "CRM → Bookings (Read)",
              "tn.crm.bookings:w": "CRM → Bookings (Write)",
              "tn.crm.tags:w": "CRM → Tags (Write)",
              "tn.crm.contacts:r": "CRM → Contacts (Read)",
              "tn.crm.contacts:w": "CRM → Contacts (Write)",
              "tn.crm.customers:r": "CRM → Customers (Read)",
              "tn.crm.customers:w": "CRM → Customers (Write)",
              "tn.crm.locations:r": "CRM → Locations (Read)",
              "tn.crm.leads:r": "CRM → Leads (Follow Up) (Read)",
              "tn.crm.leads:w": "CRM → Leads (Follow Up) (Write)",
              "tn.crm.locations:w": "CRM → Locations (Write)"
            }
          }
        }
      }
    }
  }
}