openapi: 3.2.0 info: version: v1 title: Datto|Autotask PSA Rest Billing Items API servers: - url: https://webservices2.autotask.net/ATServicesRest tags: - name: BillingItems paths: /V1.0/BillingItems/query: get: tags: - BillingItems operationId: BillingItems_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_BillingItemModel_BillingItem' text/json: schema: $ref: '#/components/schemas/QueryActionResult_BillingItemModel_BillingItem' '401': description: Unauthorized '403': description: Forbidden post: tags: - BillingItems operationId: BillingItems_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_BillingItemModel_BillingItem' text/json: schema: $ref: '#/components/schemas/QueryActionResult_BillingItemModel_BillingItem' '401': description: Unauthorized '403': description: Forbidden requestBody: content: application/json: schema: $ref: '#/components/schemas/QueryModel' required: true /V1.0/BillingItems/{id}: get: tags: - BillingItems operationId: BillingItems_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_BillingItemModel_BillingItem' text/json: schema: $ref: '#/components/schemas/ItemQueryResultModel_BillingItemModel_BillingItem' '401': description: Unauthorized '403': description: Forbidden /V1.0/BillingItems/query/count: get: tags: - BillingItems operationId: BillingItems_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: - BillingItems operationId: BillingItems_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/BillingItems: put: tags: - BillingItems operationId: BillingItems_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/BillingItemModel' required: true patch: tags: - BillingItems operationId: BillingItems_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/BillingItemModel' required: true /V1.0/BillingItems/entityInformation: get: tags: - BillingItems operationId: BillingItems_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/BillingItems/entityInformation/fields: get: tags: - BillingItems operationId: BillingItems_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/BillingItems/entityInformation/userDefinedFields: get: tags: - BillingItems operationId: BillingItems_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: ItemQueryResultModel_BillingItemModel_BillingItem: type: object properties: item: $ref: '#/components/schemas/BillingItemModel' BillingItemModel: type: object properties: id: format: int64 type: integer accountManagerWhenApprovedID: format: int32 type: integer billingCodeID: format: int32 type: integer taxCategoryID: format: int32 type: integer billingItemType: format: int32 type: integer companyID: format: int32 type: integer configurationItemID: format: int64 type: integer contractBlockID: format: int32 type: integer contractChargeID: format: int64 type: integer contractID: format: int32 type: integer contractServiceAdjustmentID: format: int32 type: integer contractServiceBundleAdjustmentID: format: int32 type: integer contractServiceBundleID: format: int32 type: integer contractServiceBundlePeriodID: format: int32 type: integer contractServiceID: format: int32 type: integer contractServicePeriodID: format: int32 type: integer description: type: string expenseItemID: format: int32 type: integer extendedPrice: format: double type: number internalCurrencyExtendedPrice: format: double type: number internalCurrencyRate: format: double type: number internalCurrencyTaxDollars: format: double type: number internalCurrencyTotalAmount: format: double type: number invoiceID: format: int32 type: integer itemApproverID: format: int32 type: integer itemDate: format: date-time type: string itemName: type: string lineItemFullDescription: type: string lineItemGroupDescription: type: string milestoneID: format: int64 type: integer nonBillable: format: int32 type: integer organizationalLevelAssociationID: format: int32 type: integer ourCost: format: double type: number postedDate: format: date-time type: string postedOnTime: format: date-time type: string projectChargeID: format: int64 type: integer projectID: format: int32 type: integer purchaseOrderNumber: type: string quantity: format: double type: number rate: format: double type: number roleID: format: int32 type: integer serviceBundleID: format: int64 type: integer serviceID: format: int64 type: integer sortOrderID: format: int64 type: integer subType: format: int32 type: integer taskID: format: int32 type: integer taxDollars: format: double type: number ticketChargeID: format: int64 type: integer ticketID: format: int32 type: integer timeEntryID: format: int32 type: integer totalAmount: format: double type: number vendorID: format: int64 type: integer webServiceDate: format: date-time type: string 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 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: [] QueryActionResult_BillingItemModel_BillingItem: type: object properties: items: type: array items: $ref: '#/components/schemas/BillingItemModel' pageDetails: $ref: '#/components/schemas/PagingModel' Object: type: object properties: {} 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