openapi: 3.2.0 info: version: v1 title: Datto|Autotask PSA Rest Companies API servers: - url: https://webservices2.autotask.net/ATServicesRest tags: - name: Companies paths: /V1.0/Companies/query: get: tags: - Companies operationId: Companies_UrlParameterQuery parameters: - name: search in: query required: true schema: type: string - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/QueryActionResult_CompanyModel_Account' text/json: schema: $ref: '#/components/schemas/QueryActionResult_CompanyModel_Account' '401': description: Unauthorized '403': description: Forbidden post: tags: - Companies operationId: Companies_Query parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/QueryActionResult_CompanyModel_Account' text/json: schema: $ref: '#/components/schemas/QueryActionResult_CompanyModel_Account' '401': description: Unauthorized '403': description: Forbidden requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryModel' required: true /V1.0/Companies/{id}: get: tags: - Companies operationId: Companies_QueryItem parameters: - name: id in: path required: true schema: type: integer format: int64 - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ItemQueryResultModel_CompanyModel_Account' text/json: schema: $ref: '#/components/schemas/ItemQueryResultModel_CompanyModel_Account' '401': description: Unauthorized '403': description: Forbidden /V1.0/Companies/query/count: get: tags: - Companies operationId: Companies_UrlParameterQueryCount parameters: - name: search in: query required: true schema: type: string - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/QueryCountResultModel' text/json: schema: $ref: '#/components/schemas/QueryCountResultModel' '401': description: Unauthorized '403': description: Forbidden post: tags: - Companies operationId: Companies_QueryCount parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/QueryCountResultModel' text/json: schema: $ref: '#/components/schemas/QueryCountResultModel' '401': description: Unauthorized '403': description: Forbidden requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryModel' required: true /V1.0/Companies: put: tags: - Companies operationId: Companies_UpdateEntity parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OperationResultModel' text/json: schema: $ref: '#/components/schemas/OperationResultModel' '401': description: Unauthorized '403': description: Forbidden requestBody: content: application/json: schema: $ref: '#/components/schemas/CompanyModel' required: true post: tags: - Companies operationId: Companies_CreateEntity parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OperationResultModel' text/json: schema: $ref: '#/components/schemas/OperationResultModel' '401': description: Unauthorized '403': description: Forbidden requestBody: content: application/json: schema: $ref: '#/components/schemas/CompanyModel' required: true patch: tags: - Companies operationId: Companies_PatchEntity parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/OperationResultModel' text/json: schema: $ref: '#/components/schemas/OperationResultModel' '401': description: Unauthorized '403': description: Forbidden requestBody: content: application/json: schema: $ref: '#/components/schemas/CompanyModel' required: true /V1.0/Companies/entityInformation: get: tags: - Companies operationId: Companies_QueryEntityInformation parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/EntityInformationResultModel' text/json: schema: $ref: '#/components/schemas/EntityInformationResultModel' '401': description: Unauthorized '403': description: Forbidden /V1.0/Companies/entityInformation/fields: get: tags: - Companies operationId: Companies_QueryFieldDefinitions parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/FieldInformationResultModel' text/json: schema: $ref: '#/components/schemas/FieldInformationResultModel' '401': description: Unauthorized '403': description: Forbidden /V1.0/Companies/entityInformation/userDefinedFields: get: tags: - Companies operationId: Companies_QueryUserDefinedFieldDefinitions parameters: - name: ApiIntegrationCode in: header description: API Integration Code required: true schema: type: string - name: UserName in: header description: User Name required: true schema: type: string - name: Secret in: header description: Secret required: true schema: type: string - name: ImpersonationResourceId in: header description: Impersonation Resource Key required: false schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/UserDefinedFieldInformationResultModel' text/json: schema: $ref: '#/components/schemas/UserDefinedFieldInformationResultModel' '401': description: Unauthorized '403': description: Forbidden components: schemas: QueryActionResult_CompanyModel_Account: type: object properties: items: type: array items: $ref: '#/components/schemas/CompanyModel' pageDetails: $ref: '#/components/schemas/PagingModel' UserDefinedFieldInformationResultModel: type: object properties: fields: type: array items: $ref: '#/components/schemas/Field' readOnly: true EntityInformationResultModel: type: object properties: info: $ref: '#/components/schemas/EntityInformationModel' readOnly: true FieldInformationModel: type: object properties: name: type: string dataType: type: string length: format: int32 type: integer isRequired: type: boolean isReadOnly: type: boolean isQueryable: type: boolean isReference: type: boolean referenceEntityType: type: string isPickList: type: boolean picklistValues: type: array items: $ref: '#/components/schemas/PickListValue' picklistParentValueField: type: string isSupportedWebhookField: $ref: '#/components/schemas/Object' FieldInformationResultModel: type: object properties: fields: type: array items: $ref: '#/components/schemas/FieldInformationModel' readOnly: true QueryCountResultModel: type: object properties: queryCount: format: int32 type: integer UserDefinedField: type: object properties: name: type: string value: type: string PickListValue: type: object properties: value: type: string label: type: string isDefaultValue: type: boolean sortOrder: format: int32 type: integer parentValue: type: string isActive: type: boolean isSystem: type: boolean QueryModel: type: object properties: maxRecords: format: int32 type: integer includeFields: type: array items: type: string filter: type: array items: $ref: '#/components/schemas/Filter' example: MaxRecords: 10 IncludeFields: [] Filter: - op: gt field: id value: 0 udf: false items: [] Object: type: object properties: {} ItemQueryResultModel_CompanyModel_Account: type: object properties: item: $ref: '#/components/schemas/CompanyModel' CompanyModel: type: object properties: id: format: int64 type: integer additionalAddressInformation: type: string address1: type: string address2: type: string alternatePhone1: type: string alternatePhone2: type: string apiVendorID: format: int32 type: integer assetValue: format: double type: number billToCompanyLocationID: format: int32 type: integer billToAdditionalAddressInformation: type: string billingAddress1: type: string billingAddress2: type: string billToAddressToUse: format: int32 type: integer billToAttention: type: string billToCity: type: string billToCountryID: format: int32 type: integer billToState: type: string billToZipCode: type: string city: type: string classification: format: int32 type: integer companyCategoryID: format: int32 type: integer companyName: type: string companyNumber: type: string companyType: format: int32 type: integer competitorID: format: int32 type: integer countryID: format: int32 type: integer createDate: format: date-time type: string createdByResourceID: format: int32 type: integer currencyID: format: int32 type: integer fax: type: string impersonatorCreatorResourceID: format: int32 type: integer invoiceEmailMessageID: format: int32 type: integer invoiceMethod: format: int32 type: integer invoiceNonContractItemsToParentCompany: type: boolean invoiceTemplateID: format: int32 type: integer isActive: type: boolean isClientPortalActive: type: boolean isEnabledForComanaged: type: boolean isSample: type: boolean isTaskFireActive: type: boolean isTaxExempt: type: boolean lastActivityDate: format: date-time type: string lastTrackedModifiedDateTime: format: date-time type: string marketSegmentID: format: int32 type: integer ownerResourceID: format: int32 type: integer parentCompanyID: format: int32 type: integer phone: type: string postalCode: type: string purchaseOrderTemplateID: format: int32 type: integer quoteEmailMessageID: format: int32 type: integer quoteTemplateID: format: int32 type: integer sicCode: type: string state: type: string stockMarket: type: string stockSymbol: type: string surveyCompanyRating: format: double type: number taxID: type: string taxRegionID: format: int32 type: integer territoryID: format: int32 type: integer webAddress: type: string userDefinedFields: type: array items: $ref: '#/components/schemas/UserDefinedField' Field: type: object properties: name: type: string label: type: string type: type: string length: format: int32 type: integer description: type: string isRequired: type: boolean isReadOnly: type: boolean isQueryable: type: boolean isReference: type: boolean referenceEntityType: type: string isPickList: type: boolean picklistValues: type: array items: $ref: '#/components/schemas/PickListValue' picklistParentValueField: type: string defaultValue: type: string isSupportedWebhookField: $ref: '#/components/schemas/Object' RestUserAccessLevel: type: object properties: {} EntityInformationModel: type: object properties: name: type: string readOnly: true canCreate: type: boolean readOnly: true canDelete: type: boolean readOnly: true canQuery: type: boolean readOnly: true canUpdate: type: boolean readOnly: true userAccessForCreate: $ref: '#/components/schemas/RestUserAccessLevel' readOnly: true userAccessForDelete: $ref: '#/components/schemas/RestUserAccessLevel' readOnly: true userAccessForQuery: $ref: '#/components/schemas/RestUserAccessLevel' readOnly: true userAccessForUpdate: $ref: '#/components/schemas/RestUserAccessLevel' readOnly: true hasUserDefinedFields: type: boolean readOnly: true supportsWebhookCallouts: type: boolean readOnly: true Filter: type: object properties: op: type: string field: type: string udf: type: boolean value: description: 'Can be either an Integer, String, Boolean, an Array of Integers, or an Array of Strings. ' type: object properties: {} items: description: An Array of Filter objects type: array items: $ref: '#/components/schemas/Filter' OperationResultModel: type: object properties: itemId: $ref: '#/components/schemas/Object' PagingModel: type: object properties: count: format: int32 type: integer requestCount: format: int32 type: integer readOnly: true prevPageUrl: type: string nextPageUrl: type: string