{"swagger":"2.0","info":{"version":"v1","title":"Avaza API Documentation","description":"Welcome to the autogenerated documentation & test tool for Avaza's API. <br/><br/><strong>API Security & Authentication</strong><br/>Authentication options include OAuth 2.0 Authorization Code flow (with optional PKCE support for enhanced security), OAuth 2.0 Implicit flow, and Personal Access Tokens. All connections must be encrypted over SSL/TLS. <br/><br/>You can set up and manage your api authentication credentials from within your Avaza account. (requires Administrator permissions on your Avaza account).<br/><br/> OAuth2 Authorization endpoint: https://any.avaza.com/oauth2/authorize  <br/>OAuth2 Token endpoint: https://any.avaza.com/oauth2/token<br/>Base URL for subsequent API Requests: https://api.avaza.com/ <br/><br/>Blogpost about authenticating with Avaza's API:  https://www.avaza.com/avaza-api-oauth2-authentication/ <br/>Blogpost on using Avaza's webhooks: https://www.avaza.com/avaza-api-webhook-notifications/<br/>The OAuth flow currently issues Access Tokens that last 1 day, and Refresh tokens that last 180 days<br/>The Api respects the security Roles assigned to the authenticating Avaza user and filters the data return appropriately. <br/><br><strong>Support</strong><br/>For API Support, and to request access please contact Avaza Support Team via our support chat. <br/><br/><strong>Swagger/OpenAPI Specification</strong><br/>Swagger Specification URL: <a target='blank' href='https://api.avaza.com/swagger/docs/v1'>https://api.avaza.com/swagger/docs/v1</a>"},"host":"api.avaza.com","schemes":["https"],"paths":{"/api/Account":{"get":{"tags":["Account"],"summary":"Retrieves configuration details for the authenticated Avaza account, including timesheet settings, currency, branding, and feature flags.","operationId":"Account_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the account configuration details.","schema":{"$ref":"#/definitions/AccountDetails"}}},"security":[{"oauth2":["read_account"]}]}},"/api/Bill":{"get":{"tags":["Bill"],"summary":"Retrieves a paginated list of supplier bills with line items, status, and address details. Supports filtering by company, status, date ranges, and updated date.","description":"TransactionStatusCode values are: \"Draft\", \"Verified\", \"Late\", \"Paid\", \"Partial\", \"Void\"","operationId":"Bill_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return bills updated after this date-time (ISO 8601). Useful for incremental sync.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of results per page. Maximum 1000, default 20.","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"1-based page number to retrieve. Default 1.","required":false,"type":"integer","format":"int32"},{"name":"TransactionStatusCode","in":"query","description":"Filter by bill status code","required":false,"type":"string"},{"name":"IssueDateFrom","in":"query","description":"Filter by issue date start range","required":false,"type":"string","format":"date-time"},{"name":"IssueDateTo","in":"query","description":"Filter by issue date end range","required":false,"type":"string","format":"date-time"},{"name":"DueDateFrom","in":"query","description":"Filter by due date start range","required":false,"type":"string","format":"date-time"},{"name":"DueDateTo","in":"query","description":"Filter by due date end range","required":false,"type":"string","format":"date-time"},{"name":"Sort","in":"query","description":"Sort results by: DateUpdated, DateCreated (append ' desc' for descending).","required":false,"type":"string"},{"name":"CompanyIDFK","in":"query","description":"Filter bills to a specific supplier company by Company ID.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of bills with line items and address details.","schema":{"$ref":"#/definitions/BillList"}}},"security":[{"oauth2":["read_financials"]}]},"post":{"tags":["Bill"],"summary":"Creates a new draft supplier bill (purchase invoice). Optionally creates a new supplier company and contact if no matching company is found.","operationId":"Bill_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new bill details including supplier, line items, and dates.","required":true,"schema":{"$ref":"#/definitions/NewBill"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created bill with assigned Transaction ID and line items.","schema":{"$ref":"#/definitions/Bill"}}},"security":[{"oauth2":["write_financials"]}]}},"/api/Bill/{id}":{"get":{"tags":["Bill"],"summary":"Retrieves a single supplier bill by its Transaction ID, including line items, issuer/recipient address details, and web links.","operationId":"Bill_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Bill Transaction ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the bill details with line items, issuer/recipient, and links.","schema":{"$ref":"#/definitions/Bill"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/BillPayment":{"get":{"tags":["BillPayment"],"summary":"Retrieves a paginated list of supplier bill payments, including payment allocations to specific bills.","operationId":"BillPayment_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return records updated after this UTC date-time (ISO 8601 format). Useful for incremental sync.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of results per page. Maximum 1000, default 20.","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"1-based page number to retrieve. Default 1.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of bill payments with allocations.","schema":{"$ref":"#/definitions/BillPaymentList"}}},"security":[{"oauth2":["read_financials"]}]},"post":{"tags":["BillPayment"],"summary":"Records a new supplier bill payment. Optionally include allocations to apply the payment against specific bills.","operationId":"BillPayment_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new bill payment details including amount, supplier, and optional allocations.","required":true,"schema":{"$ref":"#/definitions/NewBillPayment"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created bill payment with allocations.","schema":{"$ref":"#/definitions/BillPayment"}}},"security":[{"oauth2":["write_financials"]}]}},"/api/BillPayment/{id}":{"get":{"tags":["BillPayment"],"summary":"Retrieves a single supplier bill payment by its Transaction ID, including allocations to bills.","operationId":"BillPayment_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The Bill Payment Transaction ID to retrieve.","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the bill payment details with allocations.","schema":{"$ref":"#/definitions/BillPayment"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Company/Lookup":{"get":{"tags":["Company"],"summary":"Retrieves a paginated dropdown list of companies. Admins see all companies; non-admins see only companies from projects they are a member of.","operationId":"CompanyLookup","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"pageSize","in":"query","description":"Number of results per page. Maximum 1000, default 20.","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"1-based page number to retrieve. Default 1.","required":false,"type":"integer","format":"int32"},{"name":"search","in":"query","description":"Search string to match against Company name.","required":false,"type":"string"}],"responses":{"200":{"description":"Returns a paginated list of minimal company records (ID and name).","schema":{"$ref":"#/definitions/CompanyDropdownList"}}},"security":[{"oauth2":["read_contacts"]}]}},"/api/Company":{"get":{"tags":["Company"],"summary":"Retrieves a paginated list of customer companies with full details including contacts, billing address, and financial settings.","operationId":"Company_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return companies updated after this date-time (ISO 8601). Useful for incremental sync.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of results per page. Maximum 1000, default 20.","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"1-based page number to retrieve. Default 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Sort results by: DateUpdated, DateCreated (append ' desc' for descending).","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of companies with full details including contacts.","schema":{"$ref":"#/definitions/CompanyList"}}},"security":[{"oauth2":["read_contacts"]}]},"put":{"tags":["Company"],"summary":"Updates an existing company record. Only fields listed in the FieldsToUpdate array will be modified.","operationId":"Company_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the CompanyID, the list of field names to update, and the new field values.","required":true,"schema":{"$ref":"#/definitions/UpdateCompany"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the updated company details.","schema":{"$ref":"#/definitions/Company"}}},"security":[{"oauth2":["write_contacts"]}]},"post":{"tags":["Company"],"summary":"Creates a new customer company record in Avaza.","operationId":"Company_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new company details. CompanyName is required.","required":true,"schema":{"$ref":"#/definitions/NewCompany"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created company with assigned Company ID.","schema":{"$ref":"#/definitions/Company"}}},"security":[{"oauth2":["write_contacts"]}]}},"/api/Company/{id}":{"get":{"tags":["Company"],"summary":"Retrieves a single customer company by its Company ID, including contacts and billing address details.","operationId":"Company_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The Company ID to retrieve.","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the company details with contacts and billing address.","schema":{"$ref":"#/definitions/Company"}}},"security":[{"oauth2":["read_contacts"]}]}},"/api/Contact":{"get":{"tags":["Contact"],"summary":"Retrieves a paginated list of external contacts (customer contacts) with company association details.","operationId":"Contact_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return contacts updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of results per page. Maximum 1000, default 20.","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"1-based page number to retrieve. Default 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Sort results by: DateUpdated, DateCreated (append ' desc' for descending).","required":false,"type":"string"},{"name":"CompanyIDFK","in":"query","description":"Filter contacts to a specific company by Company ID.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of contacts with company association.","schema":{"$ref":"#/definitions/ContactList"}}},"security":[{"oauth2":["read_contacts"]}]},"post":{"tags":["Contact"],"summary":"Creates a new external contact, optionally linked to an existing company. If CompanyName is provided and not matched, a new company is created.","operationId":"Contact_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new contact details. Firstname, Lastname, and ContactEmail are required.","required":true,"schema":{"$ref":"#/definitions/NewCompanyContact"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created contact with assigned Contact ID.","schema":{"$ref":"#/definitions/CompanyContact"}}},"security":[{"oauth2":["write_contacts"]}]}},"/api/Contact/{id}":{"get":{"tags":["Contact"],"summary":"Retrieves a single external contact by their Contact ID.","operationId":"Contact_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The Contact ID to retrieve.","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the contact details.","schema":{"$ref":"#/definitions/CompanyContact"}}},"security":[{"oauth2":["read_contacts"]}]}},"/api/CreditNote":{"get":{"tags":["CreditNote"],"summary":"Retrieves a paginated list of customer credit notes, including line items and allocations against invoices.","operationId":"CreditNote_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return records updated after this UTC date-time (ISO 8601 format). Useful for incremental sync.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of credit notes with line items and allocations.","schema":{"$ref":"#/definitions/CreditNoteList"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/CreditNote/{id}":{"get":{"tags":["CreditNote"],"summary":"Retrieves a single credit note by its Transaction ID, including line items and invoice allocations.","operationId":"CreditNote_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Credit Note ID Number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the credit note details with line items and allocations.","schema":{"$ref":"#/definitions/CreditNote"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Currency":{"get":{"tags":["Currency"],"summary":"Retrieves the list of currencies configured in the Avaza account, including currency codes, names, symbols, and decimal places.","operationId":"Currency_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"Returns the list of configured currencies.","schema":{"$ref":"#/definitions/CurrencyList"}}}}},"/api/Estimate":{"get":{"tags":["Estimate"],"summary":"Gets list of Estimates","description":"EstimateStatusCode values are: \"Draft\", \"Sent\", \"Accepted\", \"Converted\", \"Expired\", \"Rejected\"","operationId":"Estimate_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return estimates updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"EstimateStatusCode","in":"query","description":"Filter by estimate status code","required":false,"type":"string"},{"name":"CompanyIDFK","in":"query","description":"Filter estimates to a specific customer company by Company ID.","required":false,"type":"integer","format":"int32"},{"name":"IssueDateFrom","in":"query","description":"Filter by issue date start range","required":false,"type":"string","format":"date-time"},{"name":"IssueDateTo","in":"query","description":"Filter by issue date end range","required":false,"type":"string","format":"date-time"},{"name":"ExpiryDateFrom","in":"query","description":"Filter by expiry date start range","required":false,"type":"string","format":"date-time"},{"name":"ExpiryDateTo","in":"query","description":"Filter by expiry date end range","required":false,"type":"string","format":"date-time"},{"name":"Sort","in":"query","description":"Sort results by: DateUpdated, DateCreated (append ' desc' for descending).","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of estimates with line items.","schema":{"$ref":"#/definitions/EstimateList"}}},"security":[{"oauth2":["read_financials"]}]},"post":{"tags":["Estimate"],"summary":"Creates a new draft estimate (quote). Optionally creates a new customer company and contact if no matching company is found.","operationId":"Estimate_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new estimate details, line items, and optional company/contact information.","required":true,"schema":{"$ref":"#/definitions/NewEstimate"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created estimate with assigned Estimate ID and line items.","schema":{"$ref":"#/definitions/EstimateDetails"}}},"security":[{"oauth2":["write_financials"]}]}},"/api/Estimate/{id}":{"get":{"tags":["Estimate"],"summary":"Retrieves a single estimate by its Estimate ID, including line items, issuer/recipient details, and web links.","operationId":"Estimate_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Estimate Estimate ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the estimate details with line items, issuer/recipient, and links.","schema":{"$ref":"#/definitions/EstimateDetails"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Expense/Attachment":{"post":{"tags":["Expense"],"summary":"Uploads a file attachment for an expense. Accepts multipart/form-data with the file content. Returns the uploaded file details including ID and URL.","operationId":"ExpenseAttachment","consumes":["application/form-data"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"File","in":"formData","description":"Upload software package","required":true,"type":"file"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the uploaded file attachment details including File Attachment ID and URL.","schema":{"$ref":"#/definitions/ExpenseAttachmentUploadResult"}}},"security":[{"oauth2":["write_expenses"]}]}},"/api/ExpenseApproval/Submit":{"post":{"tags":["Expense"],"summary":"Submit Expenses for Approval.","operationId":"ExpenseApproval","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"ExpenseIDs","in":"body","description":"A collection of ExpenseID's that should be submitted for approval. If not provided, submits all verified expenses for approval.","required":true,"schema":{"type":"array","items":{"format":"int64","type":"integer"}}},{"name":"UserID","in":"query","description":"The user to submit the Expenses for. Defaults to current user. Only allowed to be different from the current user when the current user has rights to Impersonate other users.","required":false,"type":"integer","format":"int32"},{"name":"SendNotifications","in":"query","description":"Send email alerts to expense approvers. Defaults to true","required":false,"type":"boolean"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"type":"object"}}},"security":[{"oauth2":["write_expenses"]}]}},"/api/Expense":{"get":{"tags":["Expense"],"summary":"Retrieves a paginated list of expense entries with rich filtering by date range, user, project, category, chargeable/invoiced status, approval status, and merchant.","operationId":"Expense_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return expenses updated after this date-time. Format: MM/dd/yyyy hh:mm:ss tt","required":false,"type":"string","format":"date-time"},{"name":"ExpenseDateFrom","in":"query","description":"Filter expenses with an ExpenseDate on or after this date. Format: MM/dd/yyyy hh:mm:ss tt","required":false,"type":"string","format":"date-time"},{"name":"ExpenseDateTo","in":"query","description":"Filter expenses with an ExpenseDate on or before this date. Format: MM/dd/yyyy hh:mm:ss tt","required":false,"type":"string","format":"date-time"},{"name":"UserEmail","in":"query","description":"Filter expenses by the email address of the expense user.","required":false,"type":"string"},{"name":"UserID","in":"query","description":"Filter expenses by the UserID of the expense user.","required":false,"type":"integer","format":"int32"},{"name":"CategoryName","in":"query","description":"Filter expenses by expense category name (exact match).","required":false,"type":"string"},{"name":"CustomerID","in":"query","description":"Filter expenses by Customer/Company ID.","required":false,"type":"integer","format":"int32"},{"name":"ProjectID","in":"query","description":"Filter expenses by Project ID.","required":false,"type":"integer","format":"int32"},{"name":"isChargeable","in":"query","description":"Filter by chargeable (billable) status: true for chargeable, false for non-chargeable.","required":false,"type":"boolean"},{"name":"isInvoiced","in":"query","description":"Filter by invoiced status: true for invoiced expenses, false for uninvoiced.","required":false,"type":"boolean"},{"name":"ExpenseReimbursementIDFK","in":"query","description":"Filter expenses by a specific reimbursement batch ID.","required":false,"type":"integer","format":"int64"},{"name":"ExpensePaymentMethodIDFK","in":"query","description":"Filter expenses by payment method ID.","required":false,"type":"integer","format":"int32"},{"name":"ExpenseApprovalStatusCode","in":"query","description":"Filter by approval status. Values: Draft, Rejected, Approved, AutoApproved, Pending, Verified.","required":false,"type":"string"},{"name":"Search","in":"query","description":"Search expenses by matching against Merchant name and Expense Category Name.","required":false,"type":"string"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Sort by: DateUpdated, DateCreated, ExpenseDate (append ' desc' for descending).","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of expense entries with full details.","schema":{"$ref":"#/definitions/ExpenseList"}}},"security":[{"oauth2":["read_expenses"]}]},"put":{"tags":["Expense"],"summary":"Updates an existing expense entry. Only fields listed in the FieldsToUpdate array will be modified. Requires the ExpenseID and FieldsToUpdate properties.","operationId":"Expense_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The update request containing the ExpenseID, FieldsToUpdate list, and new field values.","required":true,"schema":{"$ref":"#/definitions/UpdateExpense"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the updated expense details.","schema":{"$ref":"#/definitions/ExpenseDetails"}}},"security":[{"oauth2":["write_expenses"]}]},"post":{"tags":["Expense"],"summary":"Creates a new expense entry. Requires at minimum an expense date, amount, and expense category (by ID or name).","operationId":"Expense_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The new expense details.","required":true,"schema":{"$ref":"#/definitions/NewExpense"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created expense with assigned Expense ID.","schema":{"$ref":"#/definitions/ExpenseDetails"}}},"security":[{"oauth2":["write_expenses"]}]},"delete":{"tags":["Expense"],"summary":"Deletes one or more expense entries by their Expense IDs. Returns a result set indicating success or failure for each expense.","operationId":"Expense_Delete","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"ExpenseIDs","in":"body","description":"A collection of Expense IDs to delete.","required":true,"schema":{"type":"array","items":{"format":"int64","type":"integer"}}},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a result set with success/failure status for each deleted expense.","schema":{"$ref":"#/definitions/ExpenseDeleteResultSet"}}},"security":[{"oauth2":["write_expenses"]}]}},"/api/Expense/{id}":{"get":{"tags":["Expense"],"summary":"Retrieves a single expense entry by its Expense ID, including category, project, tax, attachment, and approval details.","operationId":"Expense_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Expense ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the expense entry details including category, tax, and attachments.","schema":{"$ref":"#/definitions/ExpenseDetails"}}},"security":[{"oauth2":["read_expenses"]}]}},"/api/ExpenseCategory":{"get":{"tags":["ExpenseCategory"],"summary":"Retrieves the list of expense categories configured in the account, including unit price settings for per-unit expense tracking.","description":"The default sort order is by Name asc","operationId":"ExpenseCategory_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"isEnabled","in":"query","description":"Optional filter on for enabled/disabled categories. Defaults to true.","required":false,"type":"boolean"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the list of expense categories with unit price configuration.","schema":{"$ref":"#/definitions/ExpenseCategoryList"}}},"security":[{"oauth2":["read_expenses"]}]}},"/api/ExpenseGroup/Lookup":{"get":{"tags":["ExpenseGroup"],"summary":"Retrieves a paginated list of expense group/trip names for categorising expenses, with optional search filtering.","description":"Expense Groups are for adhoc grouping of reported expenses. e.g. for expenses incurred on a Trip","operationId":"ExpenseGroupLookup","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"search","in":"query","description":"Search string to match against Expense Group Name","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of expense group/trip names.","schema":{"$ref":"#/definitions/ExpenseGroupDropdownList"}}},"security":[{"oauth2":["read_expenses"]}]}},"/api/ExpenseMerchant/Lookup":{"get":{"tags":["ExpenseMerchant"],"summary":"Retrieves a minimal dropdown list of expense merchant names for search/autocomplete.","operationId":"ExpenseMerchangeLookup","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"search","in":"query","description":"Search string to match against Expense Merchant Name","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of expense merchant names.","schema":{"$ref":"#/definitions/ExpenseMerchantDropdownList"}}},"security":[{"oauth2":["read_expenses"]}]}},"/api/ExpensePaymentMethod/Lookup":{"get":{"tags":["ExpensePaymentMethod"],"summary":"Retrieves the list of expense payment methods configured in the Avaza account.","operationId":"ExpensePaymentMethodLookup","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the list of expense payment methods.","schema":{"$ref":"#/definitions/ExpensePaymentMethodDropdownList"}}},"security":[{"oauth2":["read_expenses"]}]}},"/api/ExpenseSummary":{"get":{"tags":["ExpenseSummary"],"summary":"Retrieves aggregated expense statistics for a date range, with optional grouping by up to three dimensions (e.g. Category, Project, User, Month). Requires ExpenseDateFrom and ExpenseDateTo.","operationId":"ExpenseSummary_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model.groupBy","in":"query","description":"(Optional) Combine one, two or three levels of Grouping. Combine these possible grouping values: \"Category\", \"ChargeableStatus\", \"Merchant\", \"ApprovalStatus\", \"ReimbursementStatus\", \"Customer\", \"Project\", \"User\", \"Task\", \"Year\", \"Month\", \"Day\", \"Week\".","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"model.expenseDateFrom","in":"query","description":"(Required) Filter for expenses with expense dates greater or equal to the specified date. e.g. 2019-01-25.","required":false,"type":"string","format":"date-time"},{"name":"model.expenseDateTo","in":"query","description":"(Required) Filter for expenses with an expense date smaller or equal to the specified  date. e.g. 2019-01-25.","required":false,"type":"string","format":"date-time"},{"name":"model.userID","in":"query","description":"(Optional) Defaults to the current user. Provide one or more UserIDs of Users whose expenses should be retrieved. If the current user doesn't have impersonation rights, then they will only see their own data.","required":false,"type":"array","items":{"type":"integer","format":"int32"},"collectionFormat":"multi"},{"name":"model.projectID","in":"query","description":"(Optional) Filter by Project","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns aggregated expense totals with optional grouping.","schema":{"$ref":"#/definitions/ExpenseSummaryResult"}}},"security":[{"oauth2":["read_expenses"]}]}},"/api/FileAttachment":{"post":{"tags":["FileAttachment"],"summary":"Uploads a single file via multipart/form-data. Send the file in a \"file\" form field.\r\nOptional query parameters linkToEntityType + linkToEntityId inline-link the upload to a Task, Expense, Estimate, or Invoice in the same call.\r\nWhen no link is supplied, the row is inserted as AttachmentType=\"Draft\" and reaped by the cleanup job after 24 hours if never linked.","operationId":"FileAttachmentUpload","consumes":["multipart/form-data"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"linkToEntityType","in":"query","description":"Optional. One of: \"Task\", \"Expense\", \"Estimate\", \"Invoice\". When supplied, linkToEntityId must also be supplied.","required":false,"type":"string"},{"name":"linkToEntityId","in":"query","description":"Optional. The target entity's primary key. Required when linkToEntityType is supplied.","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"The file to upload (multipart/form-data).","required":true,"type":"file"}],"responses":{"200":{"description":"Returns the uploaded file attachment details.","schema":{"$ref":"#/definitions/FileAttachmentUploadResult"}},"400":{"description":"Bad request (missing file, oversize, malformed payload, unknown entity)."},"401":{"description":"Unauthorized."},"403":{"description":"Caller lacks the required scope or right."},"507":{"description":"Insufficient storage allowance on the account."}},"security":[{"oauth2":["upload_attachment"]}]}},"/api/FileAttachment/Base64":{"post":{"tags":["FileAttachment"],"summary":"Uploads a single file as a base64-encoded JSON body. Designed for MCP clients and other JSON-only callers that can't easily build multipart/form-data requests.\r\nWhen body.LinkTo is supplied (entityType in {Task, Expense, Estimate, Invoice}), the row is linked in the same transaction; otherwise it is inserted as AttachmentType=\"Draft\" for later linking.","operationId":"FileAttachmentUploadBase64","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"body","in":"body","description":"Filename, Base64Data, optional ContentType, optional LinkTo.","required":true,"schema":{"$ref":"#/definitions/FileAttachmentBase64Request"}}],"responses":{"200":{"description":"Returns the uploaded file attachment details.","schema":{"$ref":"#/definitions/FileAttachmentUploadResult"}},"400":{"description":"Bad request (missing/invalid base64, oversize, malformed payload, unknown entity)."},"401":{"description":"Unauthorized."},"403":{"description":"Caller lacks the required scope or right."},"507":{"description":"Insufficient storage allowance on the account."}},"security":[{"oauth2":["upload_attachment"]}]}},"/api/FileAttachment/FromUrl":{"post":{"tags":["FileAttachment"],"summary":"Uploads a single file by giving the server a public https URL to fetch from. The server downloads the file (capped at 50 MB, SSRF-protected: blocks RFC1918, loopback, link-local, AWS metadata IPs, and IPv6 ULA).\r\nWhen body.LinkTo is supplied (entityType in {Task, Expense, Estimate, Invoice}), the row is linked in the same transaction; otherwise it is inserted as AttachmentType=\"Draft\" for later linking.","operationId":"FileAttachmentUploadFromUrl","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"body","in":"body","description":"SourceUrl, optional Filename, optional ContentType, optional LinkTo.","required":true,"schema":{"$ref":"#/definitions/FileAttachmentSourceUrlRequest"}}],"responses":{"200":{"description":"Returns the uploaded file attachment details.","schema":{"$ref":"#/definitions/FileAttachmentUploadResult"}},"400":{"description":"Bad request (missing/invalid URL, oversize, blocked source URL, unknown entity)."},"401":{"description":"Unauthorized."},"403":{"description":"Caller lacks the required scope or right."},"507":{"description":"Insufficient storage allowance on the account."}},"security":[{"oauth2":["upload_attachment"]}]}},"/api/FixedAmount":{"get":{"tags":["FixedAmount"],"summary":"Retrieves a paginated list of fixed-amount billing entries used for fixed-price project invoicing. Can filter by project, task, invoiced status, and updated date.","operationId":"FixedAmount_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return fixed amounts updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"ProjectID","in":"query","description":"(Optional) The ProjectID of a Project to filter Fixed Amounts for","required":false,"type":"integer","format":"int32"},{"name":"TaskID","in":"query","description":"(Optional) The TaskID of a Task to filter Fixed Amounts for","required":false,"type":"integer","format":"int32"},{"name":"isInvoiced","in":"query","description":"Filter by invoiced status: true for invoiced, false for uninvoiced.","required":false,"type":"boolean"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Optional sorting instruction. Currently possible values: \"DateUpdated\", \"DateCreated\", \"DateUpdated desc\", \"DateCreated desc\"","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of fixed-amount billing entries.","schema":{"$ref":"#/definitions/FixedAmountList"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Inventory":{"get":{"tags":["Inventory"],"summary":"Retrieves a paginated list of inventory/product items configured in the account, used as line items on invoices, bills, and estimates.","operationId":"Inventory_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return inventory items updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of inventory/product items.","schema":{"$ref":"#/definitions/InventoryList"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Inventory/{id}":{"get":{"tags":["Inventory"],"summary":"Retrieves a single inventory/product item by its Inventory Item ID.","operationId":"Inventory_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"InventoryItem ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the inventory item details.","schema":{"$ref":"#/definitions/InventoryItem"}},"404":{"description":"Not Found"}},"security":[{"oauth2":["read_financials"]}]}},"/api/Invoice":{"get":{"tags":["Invoice"],"summary":"Gets list of Invoices","description":"TransactionStatusCode values are: \"Draft\", \"Sent\", \"Late\", \"Paid\", \"Partial\", \"Void\"","operationId":"Invoice_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return invoices updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"TransactionStatusCode","in":"query","description":"Filter by invoice status. Values: Draft, Sent, Late, Paid, Partial, Void.","required":false,"type":"string"},{"name":"IssueDateFrom","in":"query","description":"Filter invoices issued on or after this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"IssueDateTo","in":"query","description":"Filter invoices issued before this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"DueDateFrom","in":"query","description":"Filter invoices due on or after this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"DueDateTo","in":"query","description":"Filter invoices due before this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"Sort","in":"query","description":"Sort results by: DateUpdated, DateCreated (append ' desc' for descending).","required":false,"type":"string"},{"name":"CompanyIDFK","in":"query","description":"Filter invoices to a specific customer company by Company ID.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of invoices with line items.","schema":{"$ref":"#/definitions/InvoiceList"}}},"security":[{"oauth2":["read_financials"]}]},"put":{"tags":["Invoice"],"summary":"Updates an existing draft invoice. Only fields listed in the FieldsToUpdate array will be modified. When LineItems is included in FieldsToUpdate, all existing line items not present in the array are deleted.","operationId":"Invoice_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the fields to update and their new values.","required":true,"schema":{"$ref":"#/definitions/UpdatedInvoice"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the updated invoice details.","schema":{"$ref":"#/definitions/Invoice"}}},"security":[{"oauth2":["write_financials"]}]},"post":{"tags":["Invoice"],"summary":"Creates a new draft invoice. Optionally creates a new customer company and contact if no matching company is found.","operationId":"Invoice_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new invoice details, line items, and optional company/contact information.","required":true,"schema":{"$ref":"#/definitions/NewInvoice"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created invoice with assigned Transaction ID and line items.","schema":{"$ref":"#/definitions/Invoice"}}},"security":[{"oauth2":["write_financials"]}]}},"/api/Invoice/{id}":{"get":{"tags":["Invoice"],"summary":"Retrieves a single invoice by its Transaction ID, including line items, issuer/recipient address details, and web links.","operationId":"Invoice_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Invoice Transaction ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the invoice details with line items, issuer/recipient, and links.","schema":{"$ref":"#/definitions/Invoice"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Payment":{"get":{"tags":["Payment"],"summary":"Retrieves a paginated list of customer payments, including allocations to specific invoices. Can filter by invoice or updated date.","operationId":"Payment_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"InvoiceTransactionID","in":"query","description":"Filter for Payments that have at least one allocation against a given Invoice Transaction ID","required":false,"type":"integer","format":"int64"},{"name":"UpdatedAfter","in":"query","description":"Only return records updated after this UTC date-time (ISO 8601 format). Useful for incremental sync.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of customer payments with allocations.","schema":{"$ref":"#/definitions/PaymentList"}}},"security":[{"oauth2":["read_financials"]}]},"post":{"tags":["Payment"],"summary":"Records a new customer payment. Optionally include allocations to apply the payment against specific invoices.","operationId":"Payment_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the new payment details and optional invoice allocations.","required":true,"schema":{"$ref":"#/definitions/NewPayment"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created payment with allocations.","schema":{"$ref":"#/definitions/Payment"}}},"security":[{"oauth2":["write_financials"]}]}},"/api/Payment/{id}":{"get":{"tags":["Payment"],"summary":"Retrieves a single customer payment by its Transaction ID, including allocations to invoices.","operationId":"Payment_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Invoice Transaction ID Number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the payment details with invoice allocations.","schema":{"$ref":"#/definitions/Payment"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Project/Lookup":{"get":{"tags":["Project"],"summary":"Retrieves a minimal dropdown list of active projects grouped by customer company, for search/autocomplete. Supports filtering by user timesheet access, company, project code, and search term.","operationId":"ProjectLookup","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"TimesheetUserID","in":"query","description":"Filter to the projects that the supplied UserID can add timesheets to.","required":false,"type":"integer","format":"int32"},{"name":"CompanyIDFK","in":"query","description":"Filter projects by customer company ID.","required":false,"type":"integer","format":"int32"},{"name":"search","in":"query","description":"Search term to filter projects by title.","required":false,"type":"string"},{"name":"ProjectCode","in":"query","description":"Filter by project code.","required":false,"type":"string"}],"responses":{"200":{"description":"Returns a paginated list of projects grouped by customer company.","schema":{"$ref":"#/definitions/ProjectDropdownList"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/Project":{"get":{"tags":["Project"],"summary":"Retrieves a paginated list of projects with details including status, billing type, budget, category, and date range. Supports filtering by company, category, owner, status, billable type, budget type, and creation date.","operationId":"Project_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return projects updated after this UTC date-time (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"A column to sort on. Current possible values: \"DateUpdated\", \"DateCreated\", \"DateUpdated desc\", \"DateCreated desc\"","required":false,"type":"string"},{"name":"TimesheetUserID","in":"query","description":"Filter to the projects that the supplied UserID can add timesheets to.","required":false,"type":"integer","format":"int32"},{"name":"CompanyID","in":"query","description":"Filter projects belonging to a specific customer company by Company ID.","required":false,"type":"integer","format":"int32"},{"name":"ProjectCategoryID","in":"query","description":"Filter projects by project category ID.","required":false,"type":"integer","format":"int32"},{"name":"ProjectOwnerUserID","in":"query","description":"Filter projects owned by a specific user by User ID.","required":false,"type":"integer","format":"int32"},{"name":"ProjectStatusCode","in":"query","description":"Filter by project status code. Per-account configurable; default codes are NotStarted, InProgress, Complete, OnHold (seeded for every account); admins may add custom codes.","required":false,"type":"string"},{"name":"ProjectBillableTypeCode","in":"query","description":"Filter by billing type. Values: CategoryHourly, NoRate, NotBillable, PersonHourly, ProjectHourly.","required":false,"type":"string"},{"name":"ProjectBudgetTypeCode","in":"query","description":"Filter by budget type. Values: CategoryHours, NoBudget, PersonHours, ProjectFees, ProjectHours.","required":false,"type":"string"},{"name":"DateCreatedFrom","in":"query","description":"Filter projects created on or after this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"DateCreatedTo","in":"query","description":"Filter projects created on or before this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"includeArchived","in":"query","description":"Include Archived Projects in the results.","required":false,"type":"boolean"}],"responses":{"200":{"description":"Returns a paginated list of projects with details.","schema":{"$ref":"#/definitions/ProjectList"}}},"security":[{"oauth2":["read_projects"]}]},"put":{"tags":["Project"],"summary":"Updates an existing project. Only fields listed in the FieldsToUpdate array will be modified. When ProjectBillableTypeCode is updated, use ScheduleRateUpdateOption and TimesheetRateUpdateOption to control whether rate changes cascade to existing schedule bookings and timesheet entries respectively.","operationId":"Project_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the fields to update and their new values.","required":true,"schema":{"$ref":"#/definitions/UpdateProjectModel"}}],"responses":{"200":{"description":"Returns the updated project details.","schema":{"$ref":"#/definitions/ProjectDetails"}}},"security":[{"oauth2":["write_projects"]}]},"post":{"tags":["Project"],"summary":"Creates a new project in Avaza, linked to a customer company. Optionally creates a new company if CompanyName is provided and not matched.","operationId":"Project_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the data for the new project.","required":true,"schema":{"$ref":"#/definitions/NewProjectModel"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created project with assigned Project ID.","schema":{"$ref":"#/definitions/ProjectDetails"}}},"security":[{"oauth2":["write_projects"]}]}},"/api/Project/{id}":{"get":{"tags":["Project"],"summary":"Retrieves full project details by Project ID, including sections, team members with rates and permissions, and project tags.","operationId":"Project_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Project ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns full project details including sections, members, and tags.","schema":{"$ref":"#/definitions/ProjectDetails"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/ProjectMember":{"get":{"tags":["ProjectMember"],"summary":"Retrieves a list of project members with rates and permissions. Include at least one of ProjectID or UserID parameters.","description":"Include at least one of ProjectID or UserID parameters.","operationId":"ProjectMember_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"ProjectID","in":"query","description":"Get Project members filtered by ProjectID","required":false,"type":"integer","format":"int32"},{"name":"UserID","in":"query","description":"Get Project members filtered by UserID","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the list of project members with rates and permissions.","schema":{"$ref":"#/definitions/ProjectMemberList"}}},"security":[{"oauth2":["read_projects"]}]},"put":{"tags":["ProjectMember"],"summary":"Updates a project member's rates, budget, or permissions. Only fields listed in the FieldsToUpdate array will be modified.","description":"Fields are only updated if their field name is in the FieldsToUpdate string collection. The Amount columns for Cost, Budget, Rates if specified should be a decimal. Financial amounts assume the currency of the parent Company. Budget units depend on the Budget method set on the Project. Use ScheduleRateUpdateOption to cascade rate changes to existing schedule bookings, and TimesheetRateUpdateOption to cascade to existing timesheet entries, when RateAmount or CostAmount is updated.","operationId":"ProjectMember_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the fields to update and their new values.","required":true,"schema":{"$ref":"#/definitions/UpdateProjectMember"}}],"responses":{"200":{"description":"Returns the updated project member details.","schema":{"$ref":"#/definitions/ProjectMemberDetails"}}},"security":[{"oauth2":["write_projects"]}]},"post":{"tags":["ProjectMember"],"summary":"Adds a user as a member of a project, setting their rates, budget, and permissions.","description":"the Amount columns for Cost, Budget, Rates should be specified as a decimal. Financial amounts assume the currency of the Customer company. Budget units depend on the Budget method set on the Project.","operationId":"ProjectMember_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the project ID, user ID, and optional rates and permissions.","required":true,"schema":{"$ref":"#/definitions/NewProjectMember"}}],"responses":{"200":{"description":"Returns the new project member assignment details.","schema":{"$ref":"#/definitions/ProjectMemberDetails"}}},"security":[{"oauth2":["write_projects"]}]}},"/api/ProjectTimesheetCategory":{"get":{"tags":["ProjectTimesheetCategory"],"summary":"Retrieves the list of timesheet/billing categories assigned to projects.","description":"The default sort order is by isBillable desc, Name asc","operationId":"ProjectTimesheetCategory_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"ProjectID","in":"query","description":"Get categories filtered by ProjectID","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the list of timesheet categories assigned to projects.","schema":{"$ref":"#/definitions/ProjectTimesheetCategoryList"}}},"security":[{"oauth2":["read_timesheets"]}]},"put":{"tags":["ProjectTimesheetCategory"],"summary":"Updates an existing project timesheet category assignment, including billable status, rate, and budget hours. Optionally cascades rate changes to existing schedule bookings via ScheduleRateUpdateOption and to existing timesheet entries via TimesheetRateUpdateOption.","operationId":"ProjectTimesheetCategory_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the project ID, category ID, and fields to update. Use ScheduleRateUpdateOption to control schedule booking cascade and TimesheetRateUpdateOption to control timesheet entry cascade.","required":true,"schema":{"$ref":"#/definitions/AssignProjectTimesheetCategory"}}],"responses":{"200":{"description":"Returns the updated timesheet category assignment.","schema":{"$ref":"#/definitions/ProjectTimesheetCategoryDetails"}}},"security":[{"oauth2":["write_projects"]}]},"post":{"tags":["ProjectTimesheetCategory"],"summary":"Assigns a timesheet/billing category to a project, specifying billable status, rate, and budget hours.","operationId":"ProjectTimesheetCategory_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the project ID, category ID, and optional rate and budget settings.","required":true,"schema":{"$ref":"#/definitions/AssignProjectTimesheetCategory"}}],"responses":{"200":{"description":"Returns the new timesheet category assignment.","schema":{"$ref":"#/definitions/ProjectTimesheetCategoryDetails"}}},"security":[{"oauth2":["write_projects"]}]}},"/api/RecurringInvoice":{"get":{"tags":["RecurringInvoice"],"summary":"Gets list of Recurring Invoices","operationId":"RecurringInvoice_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return recurring invoice profiles updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Sort results by: DateUpdated, DateCreated (append ' desc' for descending).","required":false,"type":"string"},{"name":"CompanyIDFK","in":"query","description":"Filter recurring invoices to a specific customer company by Company ID.","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of recurring invoice profiles.","schema":{"$ref":"#/definitions/RecurringInvoiceList"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/RecurringInvoice/{id}":{"get":{"tags":["RecurringInvoice"],"summary":"Retrieves a single recurring invoice profile by its ID, including line items, schedule configuration, and next invoice date.","operationId":"RecurringInvoice_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Recurring Invoice Profile ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the recurring invoice profile with line items and schedule.","schema":{"$ref":"#/definitions/RecurringInvoice"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/ScheduleAssignment":{"get":{"tags":["ScheduleAssignment"],"summary":"Gets list of Schedule Assignments.","description":"Schedule assignments are per-day, and link to a parent Schedule Series.","operationId":"ScheduleAssignment_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Limit results to records updated after the specified date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleDateFrom","in":"query","description":"Filter for schedule assignement  that are  on or after a specific date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleDateTo","in":"query","description":"Filter for schedules that are on or before a specific date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleSeriesID","in":"query","description":"Filter to records for a particular Schedule Series","required":false,"type":"integer","format":"int64"},{"name":"UserID","in":"query","description":"The UserID of a schedule user to filter assignments for. Only api users with Admin role can see all schedules across all users. Users with ScheduleUser role can access their own ScheduleSeries.","required":false,"type":"integer","format":"int32"},{"name":"UserEmail","in":"query","description":"The email of the user who has been scheduled","required":false,"type":"string"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Optional sorting instruction. Currently possible values: \"DateUpdated\", \"DateCreated\", \"DateUpdated desc\", \"DateCreated desc\"","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of per-day schedule assignments.","schema":{"$ref":"#/definitions/ScheduleAssignmentList"}}},"security":[{"oauth2":["read_schedule"]}]}},"/api/ScheduleSeries/AddBooking":{"post":{"tags":["ScheduleSeries"],"summary":"Creates a new project work schedule booking for a user over a date range with specified hours per day or total duration.","operationId":"ScheduleSeries_AddBooking","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The booking details including user, project, category, date range, and hours.","required":true,"schema":{"$ref":"#/definitions/CreateBooking"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created schedule booking with assigned Series ID.","schema":{"$ref":"#/definitions/ScheduleSeriesDetails"}}},"security":[{"oauth2":["write_schedule"]}]}},"/api/ScheduleSeries/AddLeave":{"post":{"tags":["ScheduleSeries"],"summary":"Creates a new leave/time-off schedule booking for a user over a date range.","operationId":"ScheduleSeries_AddLeave","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The leave details including user, leave type, date range, and hours per day.","required":true,"schema":{"$ref":"#/definitions/CreateLeave"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the created leave booking with assigned Series ID.","schema":{"$ref":"#/definitions/ScheduleSeriesDetails"}}},"security":[{"oauth2":["write_schedule"]}]}},"/api/ScheduleSeries/EditLeave":{"put":{"tags":["ScheduleSeries"],"summary":"Updates an existing leave schedule booking.","operationId":"ScheduleSeries_EditLeave","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The updated leave details. ScheduleSeriesID is required.","required":true,"schema":{"$ref":"#/definitions/EditLeave"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the updated leave booking details.","schema":{"$ref":"#/definitions/ScheduleSeriesDetails"}}},"security":[{"oauth2":["write_schedule"]}]}},"/api/ScheduleSeries/EditBooking":{"put":{"tags":["ScheduleSeries"],"summary":"Updates an existing project work schedule booking.","operationId":"ScheduleSeries_EditBooking","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The updated booking details. ScheduleSeriesID is required.","required":true,"schema":{"$ref":"#/definitions/EditBooking"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the updated schedule booking details.","schema":{"$ref":"#/definitions/ScheduleSeriesDetails"}}},"security":[{"oauth2":["write_schedule"]}]}},"/api/ScheduleSeries":{"get":{"tags":["ScheduleSeries"],"summary":"Gets list of Schedule Series","description":"Schedule Series represents a strip of time assigned to a user over a date range, for a certain number of hours per day. They can be for Leave or for project work Bookings.","operationId":"ScheduleSeries_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Limit results to records updated after the specified date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleStartDateFrom","in":"query","description":"Filter for schedules that start on or after a specific date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleStartDateTo","in":"query","description":"Filter for schedules that start on or before a specific date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleEndDateFrom","in":"query","description":"Filter for schedules that end on or after a specific date","required":false,"type":"string","format":"date-time"},{"name":"ScheduleEndDateTo","in":"query","description":"Filter for schedules that end on or before a specific date","required":false,"type":"string","format":"date-time"},{"name":"UserID","in":"query","description":"The UserID of a schedule user to filter assignments for. Only api users with Admin role can see all schedules across all users. Users with ScheduleUser role can access their own ScheduleSeries.","required":false,"type":"integer","format":"int32"},{"name":"UserEmail","in":"query","description":"The email of the user who has been scheduled","required":false,"type":"string"},{"name":"TimeSheetCategoryID","in":"query","description":"Filter for schedule records linked to a specific timesheeet category","required":false,"type":"integer","format":"int32"},{"name":"TimeSheetCategoryName","in":"query","description":"Filter for schedule records with a specific timesheeet category name (exact string match)","required":false,"type":"string"},{"name":"LeaveTypeID","in":"query","description":"Filter to records of a particular leave type","required":false,"type":"integer","format":"int32"},{"name":"ProjectID","in":"query","description":"Filter to only include books linked to a specific project","required":false,"type":"integer","format":"int32"},{"name":"CompanyID","in":"query","description":"Filter to only include records linked to projects, where that project belongs to a specific customer company","required":false,"type":"integer","format":"int32"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Optional sorting instruction. Currently possible values: \"DateUpdated\", \"DateCreated\", \"DateUpdated desc\", \"DateCreated desc\"","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of schedule series (bookings and leave).","schema":{"$ref":"#/definitions/ScheduleSeriesList"}}},"security":[{"oauth2":["read_schedule"]}]},"post":{"tags":["ScheduleSeries"],"summary":"Retrieves a paginated list of schedule series matching the provided filter criteria. POST body contains filter parameters.","description":"Schedule Series represents a strip of time assigned to a user over a date range, for a certain number of hours per day. They can be for Leave or for project work Bookings.","operationId":"ScheduleSeries_GetByFilter","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"seriesFilter","in":"body","description":"A filter object containing criteria for retrieving schedule series records, including date ranges, user, project, and category filters.","required":true,"schema":{"$ref":"#/definitions/ScheduleSeriesFilterRequest"}}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns schedule series matching the filter criteria.","schema":{"$ref":"#/definitions/ScheduleSeriesList"}}},"security":[{"oauth2":["read_schedule"]}]}},"/api/ScheduleSeries/{id}":{"delete":{"tags":["ScheduleSeries"],"summary":"Deletes a schedule series (booking or leave) by its Schedule Series ID. Also removes all associated daily schedule assignments.","operationId":"ScheduleSeries_Delete","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The ID of the Schedule Series to delete","required":true,"type":"integer","format":"int64"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns confirmation of the schedule series deletion.","schema":{"type":"object"}}},"security":[{"oauth2":["write_schedule"]}]}},"/api/Section":{"get":{"tags":["Section"],"summary":"Retrieves a list of sections (task groups) within a project. Requires a ProjectID query parameter.","operationId":"Section_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"ProjectID","in":"query","description":"Get sections for Project with ProjectID","required":true,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the list of sections for the specified project.","schema":{"$ref":"#/definitions/SectionList"}}},"security":[{"oauth2":["read_projects"]}]},"post":{"tags":["Section"],"summary":"Creates a new section (task group) within a project.","operationId":"Section_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the project ID and section title.","required":true,"schema":{"$ref":"#/definitions/NewSection"}}],"responses":{"200":{"description":"Returns the created section with assigned Section ID.","schema":{"$ref":"#/definitions/SectionDetails"}}},"security":[{"oauth2":["write_projects"]}]},"delete":{"tags":["Section"],"summary":"Deletes a section by its Section ID. Cannot delete a Section that contains Tasks.","operationId":"Section_Delete","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"SectionID","in":"query","description":"The ID of the section to delete.","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Returns confirmation of the section deletion.","schema":{"type":"object"}}},"security":[{"oauth2":["write_projects"]}]}},"/api/Task/Lookup":{"get":{"tags":["Task"],"summary":"Retrieves tasks grouped by section within a project for dropdown/autocomplete use. Requires a projectID parameter.","description":"Groups Tasks by Section. Default sort is by Section Title followed by Task Title","operationId":"TaskLookup","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"projectID","in":"query","description":"The Project ID to retrieve tasks for. Required.","required":true,"type":"integer","format":"int32"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"hideCompleted","in":"query","description":"(optional) true/false to hide completed tasks. Defaults false","required":false,"type":"boolean"},{"name":"search","in":"query","description":"(optional) Search string to match against Task title. Performs begins-with match","required":false,"type":"string"},{"name":"hideSubtasks","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"Returns tasks grouped by section for the specified project.","schema":{"$ref":"#/definitions/TaskDropdownList"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/Task":{"get":{"tags":["Task"],"summary":"Retrieves a paginated list of tasks with details including assignees, dates, status, priority, tags, and time tracking. Supports filtering by project, section, status, priority, due date range, assigned user, completion state, and parent task / hierarchy.","operationId":"Task_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Optional filter to records updated after a specific date.","required":false,"type":"string","format":"date-time"},{"name":"pageSize","in":"query","description":"Number of items per page. Defaults to 20.","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1. Defaults to 1","required":false,"type":"integer","format":"int32"},{"name":"Sort","in":"query","description":"Optional sorting instruction. Currently possible values: \"DateUpdated\", \"DateCreated\", \"DateUpdated desc\", \"DateCreated desc\", \"SectionTitle\", \"Title\"","required":false,"type":"string"},{"name":"isComplete","in":"query","description":"Optional filter to only display tasks linked to a Task Status where isComplete=false, or where isComplete=true","required":false,"type":"boolean"},{"name":"ProjectID","in":"query","description":"Optional filter to only display tasks belonging to a specific ProjectID","required":false,"type":"integer","format":"int32"},{"name":"TaskStatusCode","in":"query","description":"Optional filter to only display tasks with a specific status","required":false,"type":"string"},{"name":"TaskPriorityCode","in":"query","description":"Optional filter to only display tasks with a specific priority","required":false,"type":"string"},{"name":"DueDateFrom","in":"query","description":"Optional filter to only display tasks with a Due Date after DueDateFrom","required":false,"type":"string","format":"date-time"},{"name":"DueDateTo","in":"query","description":"Optional filter to only display tasks with a Due Date before DueDateTo","required":false,"type":"string","format":"date-time"},{"name":"AssignedToUserIDs","in":"query","description":"Optional filter to only display tasks with at least one of the provided UserIDs set as the Assigned User.","required":false,"type":"array","items":{"type":"integer","format":"int32"},"collectionFormat":"multi"},{"name":"ParentTaskIDFK","in":"query","description":"Optional filter to only display subtasks of the given parent task ID (i.e. tasks where ParentTaskIDFK = value).","required":false,"type":"integer","format":"int32"},{"name":"isRootLevel","in":"query","description":"Optional filter on task hierarchy. true = only root-level tasks (ParentTaskIDFK IS NULL); false = only subtasks (ParentTaskIDFK IS NOT NULL); omitted = no filter.","required":false,"type":"boolean"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of tasks with full details.","schema":{"$ref":"#/definitions/TaskList"}}},"security":[{"oauth2":["read_projects"]}]},"put":{"tags":["Task"],"summary":"Update a Task.","description":"Requires TaskID and a list of field names to update. The FieldsToUpdate field accepts a string array containing field names that should be updated.","operationId":"Task_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the task ID, fields to update, and updated values.","required":true,"schema":{"$ref":"#/definitions/UpdateTask"}}],"responses":{"200":{"description":"Returns the updated task details.","schema":{"$ref":"#/definitions/TaskDetails"}}},"security":[{"oauth2":["write_projects"]}]},"post":{"tags":["Task"],"summary":"Creates a new task in a project section. Requires ProjectIDFK, SectionIDFK, and Title. Optionally assign users, set dates, priority, estimated effort, and tags.","operationId":"Task_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the data for the new task.","required":true,"schema":{"$ref":"#/definitions/NewTask"}}],"responses":{"200":{"description":"Returns the created task with assigned Task ID.","schema":{"$ref":"#/definitions/TaskDetails"}}},"security":[{"oauth2":["write_projects"]}]},"delete":{"tags":["Task"],"summary":"Deletes a task by its Task ID.","operationId":"Task_Delete","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"TaskID","in":"query","description":"The ID of the task to delete.","required":true,"type":"integer","format":"int64"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"Returns confirmation of the task deletion.","schema":{"type":"object"}}},"security":[{"oauth2":["write_projects"]}]}},"/api/Task/{id}":{"get":{"tags":["Task"],"summary":"Retrieves full task details by Task ID, including project context, section, assignees, dates, status, priority, tags, and time tracking information.","operationId":"Task_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Task ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the task details including assignees, tags, and status.","schema":{"$ref":"#/definitions/TaskDetails"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/TaskDiscussion":{"get":{"tags":["TaskDiscussion"],"summary":"Retrieves discussion/comment messages for a specific task, including replies, attachments, and system messages. Supports pagination via startItem.","operationId":"TaskDiscussion_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"TaskID","in":"query","description":"The TaskID of the Task to retrieve messages for","required":true,"type":"integer","format":"int64"},{"name":"pageSize","in":"query","description":"The max number of responses to return in this page","required":false,"type":"integer","format":"int32"},{"name":"startItem","in":"query","description":"the ReponseID of the comment from which the page of results should start.","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Returns discussion messages with replies and attachments for the task.","schema":{"$ref":"#/definitions/TaskDiscussion"}}},"security":[{"oauth2":["read_projects"]}]},"put":{"tags":["TaskDiscussion"],"summary":"Edit an existing task comment (body + attachments). Author-only. Internal-note flag,\r\nreply-to context, identity, and DateCreated are locked. Edits are silent (no new comment\r\nnotification re-fires); only NEWLY-added @mentions trigger their mention notification.","description":"FileAttachmentIDs is the FINAL canonical attachment set after edit — both previously\r\nlinked IDs to keep and newly uploaded Draft IDs to add. Existing attachments not\r\nincluded are hard-deleted (S3 blob + DB row). Optimistic concurrency: pass\r\nExpectedDateUpdated equal to the row's last-known DateUpdated to get a 409 on conflict.","operationId":"TaskDiscussion_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","required":true,"schema":{"$ref":"#/definitions/EditTaskDiscussion"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/TaskDiscussionResponse"}}},"security":[{"oauth2":["write_projects"]}]},"post":{"tags":["TaskDiscussion"],"summary":"Post a new comment / discussion message to a task. Supports plain comments, internal notes, replies to existing messages, and file attachments.","description":"To attach files, first upload each file via POST /api/FileAttachment (without a LinkTo) — that returns a FileAttachmentID with AttachmentType='Draft'. Then pass those IDs in FileAttachmentIDs here. Each ID must be owned by the current user and not already linked to another entity. Maximum 8 attachments per message; ResponseBody is capped at 16,000 characters.","operationId":"TaskDiscussion_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"Discussion message payload.","required":true,"schema":{"$ref":"#/definitions/NewTaskDiscussion"}}],"responses":{"200":{"description":"The newly created discussion message in the same shape used inside the Get TaskDiscussion responses[] array.","schema":{"$ref":"#/definitions/TaskDiscussionResponse"}}},"security":[{"oauth2":["write_projects"]}]}},"/api/TaskPriority":{"get":{"tags":["TaskPriority"],"summary":"Retrieves all task priority definitions configured in the account. Includes priority code, display name, color, and sort order. Results are ordered by DisplayOrder ascending.","operationId":"TaskPriority_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"Returns all task priority definitions.","schema":{"$ref":"#/definitions/TaskPriorityList"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/TaskStatus":{"get":{"tags":["TaskStatus"],"summary":"Retrieves all task status definitions configured in the account, grouped by task type. Includes status codes, display names, colors, sort order, and whether the status represents a completed state.","operationId":"TaskStatus_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"Returns all task status definitions grouped by task type.","schema":{"$ref":"#/definitions/TaskStatusList"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/TaskType":{"get":{"tags":["TaskType"],"summary":"Retrieves all task type definitions (workflow types) configured in the account, including name, icon, and whether it is the default type.","operationId":"TaskType_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"Returns all task type definitions.","schema":{"$ref":"#/definitions/TaskTypeList"}}},"security":[{"oauth2":["read_projects"]}]}},"/api/Tax":{"get":{"tags":["Tax"],"summary":"Retrieves all tax rates configured in the Avaza account, including tax components for compound taxes.","operationId":"Tax_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"Returns all tax rates with components.","schema":{"$ref":"#/definitions/TaxList"}}},"security":[{"oauth2":["read_financials"]}]}},"/api/Timesheet/deleted":{"get":{"tags":["Timesheet"],"summary":"Retrieves deleted (tombstone) timesheet entries for synchronisation purposes. Admin access only. Supports filtering by deletion date, entry date range, and user.","operationId":"Timesheet_GetDeletedTimesheets","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UserID","in":"query","description":"Filter by user ID","required":false,"type":"integer","format":"int32"},{"name":"DeletedAfter","in":"query","description":"Filter entries deleted after this UTC date","required":false,"type":"string","format":"date-time"},{"name":"EntryDateFrom","in":"query","description":"Filter by original timesheet entry date (start)","required":false,"type":"string","format":"date-time"},{"name":"EntryDateTo","in":"query","description":"Filter by original timesheet entry date (end)","required":false,"type":"string","format":"date-time"},{"name":"Sort","in":"query","description":"Sort expression (e.g. 'DeletedDate desc', 'EntryDate')","required":false,"type":"string"},{"name":"PageSize","in":"query","description":"Number of items per page","required":false,"type":"integer","format":"int32"},{"name":"PageNumber","in":"query","description":"Page number (starts from 1)","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"403":{"description":"Forbidden - Admin access only"},"200":{"description":"Returns a paginated list of deleted timesheet entries for sync.","schema":{"$ref":"#/definitions/DeletedTimesheetList"}}},"security":[{"oauth2":["read_timesheets"]}]}},"/api/Timesheet":{"get":{"tags":["Timesheet"],"summary":"Retrieves a paginated list of timesheet entries with rich filtering by date range, user, project, task, category, billable/invoiced status, approval status, and running timer state.","operationId":"Timesheet_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UpdatedAfter","in":"query","description":"Only return timesheets updated after this date-time.","required":false,"type":"string","format":"date-time"},{"name":"EntryDateFrom","in":"query","description":"Filter timesheets with an entry date on or after this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"EntryDateTo","in":"query","description":"Filter timesheets with an entry date on or before this date (ISO 8601).","required":false,"type":"string","format":"date-time"},{"name":"UserID","in":"query","description":"The UserID of a timesheet user to filter timesheets for. Only api users with certain higher roles can see timesheets across multiple users.","required":false,"type":"integer","format":"int32"},{"name":"UserEmail","in":"query","description":"Filter timesheets by the email address of the timesheet user.","required":false,"type":"string"},{"name":"CategoryName","in":"query","description":"Filter timesheets by category name.","required":false,"type":"string"},{"name":"TimesheetEntryApprovalStatusCode","in":"query","description":"Filter by approval status. Values: Draft, Pending, AutoApproved, Approved, Rejected.","required":false,"type":"string"},{"name":"ProjectID","in":"query","description":"Filter timesheets by Project ID.","required":false,"type":"integer","format":"int32"},{"name":"TaskID","in":"query","description":"Filter timesheets by Task ID.","required":false,"type":"integer","format":"int32"},{"name":"isBillable","in":"query","description":"Filter by billable status: true or false.","required":false,"type":"boolean"},{"name":"isInvoiced","in":"query","description":"Filter by invoiced status: true or false.","required":false,"type":"boolean"},{"name":"isTimerRunning","in":"query","description":"Filter to only entries that currently have a running timer (true) or not (false).","required":false,"type":"boolean"},{"name":"pageSize","in":"query","description":"Number of items per page (max 1000)","required":false,"type":"integer","format":"int32"},{"name":"pageNumber","in":"query","description":"Page to display. Starts from 1.","required":false,"type":"integer","format":"int32"},{"name":"includeInvoiceDetails","in":"query","description":"When true, includes invoice Transaction ID and line item ID for invoiced entries.","required":false,"type":"boolean"},{"name":"Sort","in":"query","description":"Optional sorting instruction. Currently possible values: \"DateUpdated\", \"DateCreated\", \"DateUpdated desc\", \"DateCreated desc\",\"EntryDate\", \"EntryDate desc\", \"StartTimeLocal\",\"StartTimeLocal desc\", \"TimeSheetEntryID\", \"TimeSheetEntryID desc\"","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns a paginated list of timesheet entries with full details.","schema":{"$ref":"#/definitions/TimesheetList"}}},"security":[{"oauth2":["read_timesheets"]}]},"put":{"tags":["Timesheet"],"summary":"Updates an existing timesheet entry. Only fields listed in FieldsToUpdate will be modified. ProjectIDFK is always required.","operationId":"Timesheet_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the updated timesheet fields. Must include TimeSheetEntryID, ProjectIDFK, and FieldsToUpdate.","required":true,"schema":{"$ref":"#/definitions/UpdateTimesheetModel"}}],"responses":{"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"200":{"description":"Returns the updated timesheet entry details.","schema":{"$ref":"#/definitions/TimesheetDetails"}}},"security":[{"oauth2":["write_timesheets"]}]},"post":{"tags":["Timesheet"],"summary":"Creates a new timesheet entry. If Duration is null or 0, a timer will be started automatically. Requires ProjectIDFK and TimesheetCategoryIDFK.","operationId":"Timesheet_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the data for the new timesheet entry.","required":true,"schema":{"$ref":"#/definitions/NewTimesheet"}}],"responses":{"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"200":{"description":"Returns the created timesheet entry. If Duration was 0 or null, a timer is started.","schema":{"$ref":"#/definitions/TimesheetDetails"}}},"security":[{"oauth2":["write_timesheets"]}]}},"/api/Timesheet/{id}":{"get":{"tags":["Timesheet"],"summary":"Retrieves a single timesheet entry by its Timesheet Entry ID, including user, project, category, approval, and timer details.","operationId":"Timesheet_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"Timesheet Entry ID number","required":true,"type":"integer","format":"int64"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the timesheet entry details with user, project, and approval info.","schema":{"$ref":"#/definitions/TimesheetDetails"}}},"security":[{"oauth2":["read_timesheets"]}]},"delete":{"tags":["Timesheet"],"summary":"Deletes a timesheet entry by its Timesheet Entry ID.","operationId":"Timesheet_Delete","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The Timesheet Entry ID of the entry to be deleted.","required":true,"type":"integer","format":"int64"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns confirmation of the timesheet entry deletion.","schema":{"type":"object"}}},"security":[{"oauth2":["write_timesheets"]}]}},"/api/Timesheets/Approve":{"post":{"tags":["TimesheetApproval"],"summary":"Approves a batch of pending timesheet entries by their TimeSheetEntryIDs. Caller must have the Timesheet Approver role and permission to approve each specific entry. Mixed-eligibility batches return per-entry results.","operationId":"ApproveTimesheets","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the list of TimeSheetEntryIDs to approve and an optional approval note.","required":true,"schema":{"$ref":"#/definitions/TimesheetApprovalRequest"}}],"responses":{"400":{"description":"Bad Request - missing/invalid TimeSheetEntryIDs or note too long."},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden - caller lacks the Timesheet Approver role."},"200":{"description":"Returns a summary and per-entry results.","schema":{"$ref":"#/definitions/TimesheetApprovalBatchResponse"}}},"security":[{"oauth2":["write_timesheets"]}]}},"/api/Timesheets/Reject":{"post":{"tags":["TimesheetApproval"],"summary":"Rejects a batch of pending or approved timesheet entries by their TimeSheetEntryIDs. Invoiced or paid entries cannot be rejected. Caller must have the Timesheet Approver role and permission to reject each specific entry. By default sends a rejection notification email per affected timesheet user; set SendNotifications=false to suppress.","operationId":"RejectTimesheets","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The request body containing the list of TimeSheetEntryIDs to reject, an optional rejection reason, and an optional SendNotifications flag (default true).","required":true,"schema":{"$ref":"#/definitions/TimesheetRejectionRequest"}}],"responses":{"400":{"description":"Bad Request - missing/invalid TimeSheetEntryIDs or reason too long."},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden - caller lacks the Timesheet Approver role."},"200":{"description":"Returns a summary and per-entry results.","schema":{"$ref":"#/definitions/TimesheetApprovalBatchResponse"}}},"security":[{"oauth2":["write_timesheets"]}]}},"/api/TimesheetSubmission":{"post":{"tags":["TimesheetSubmission"],"summary":"Submits timesheet entries for approval. Either provide a specific day (WholeDayOf) or any day within a week (WholeWeekOf) to submit all draft timesheets in that day or week.","operationId":"TimesheetSubmission_Post","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"SendNotifications","in":"query","description":"Send email alerts to timesheet approvers. Defaults to true","required":false,"type":"boolean"},{"name":"WholeWeekOf","in":"query","description":"A date (yyyy-MM-dd) that falls within a week to have all timesheets in that week submitted. Respects the First Day of Week setting in your account Timesheet Settings to determine the week range.","required":false,"type":"string","format":"date-time"},{"name":"WholeDayOf","in":"query","description":"A date (yyyy-MM-dd) to submit all timesheets on this day","required":false,"type":"string","format":"date-time"},{"name":"UserID","in":"query","description":"The user to submit timesheets for. Defaults to current user. Only allowed to be different from the current user when the current user has rights to Impersonate other users.","required":false,"type":"integer","format":"int32"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"400":{"description":"Bad Request - WholeDayOf or WholeWeekOf must be provided"},"401":{"description":"Unauthorized"},"200":{"description":"Returns confirmation that timesheets were submitted for approval.","schema":{"type":"object"}}},"security":[{"oauth2":["write_timesheets"]}]}},"/api/TimesheetSummary":{"get":{"tags":["TimesheetSummary"],"summary":"Retrieves aggregated timesheet statistics for a date range, with optional grouping by up to three dimensions (e.g. Project, User, Category, Task, Month). Requires EntryDateFrom and EntryDateTo.","operationId":"TimesheetSummary_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model.groupBy","in":"query","description":"(Optional) Combine one, two or three levels of Grouping. Combine these possible grouping values: \"Customer\", \"Project\", \"Category\", \"User\", \"Task\", \"Year\", \"Month\", \"Day\", \"Week\".","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"},{"name":"model.entryDateFrom","in":"query","description":"(Required) Filter for timesheets greater or equal to the specified date. e.g. 2019-01-25. You can optionally include a time component, otherwise it assumes 00:00","required":false,"type":"string","format":"date-time"},{"name":"model.entryDateTo","in":"query","description":"(Required) Filter for timesheets with an entry date smaller or equal to the specified  date. e.g. 2019-01-25. You can optionally include a time component, otherwise it assumes 00:00","required":false,"type":"string","format":"date-time"},{"name":"model.userID","in":"query","description":"(Optional) Defaults to the current user. Provide one or more UserIDs of Users whose timesheets should be retrieved. If the current user doesn't have impersonation rights, then they will only see their own data.","required":false,"type":"array","items":{"type":"integer","format":"int32"},"collectionFormat":"multi"},{"name":"model.projectID","in":"query","description":"(Optional) Filter by Project","required":false,"type":"integer","format":"int32"},{"name":"model.isBillable","in":"query","description":"(Optional) Filter by the billable status of Timesheets.","required":false,"type":"boolean"},{"name":"model.isInvoiced","in":"query","description":"(Optional) Filter for timesheets by whether they have been Invoiced or not.","required":false,"type":"boolean"},{"name":"model.timesheetEntryApprovalStatusCode","in":"query","description":"(Optional) Filter for timesheets that belong to one of the specified statuses (Draft, Pending, Approved, AutoApproved, Rejected)","required":false,"type":"array","items":{"type":"string"},"collectionFormat":"multi"}],"responses":{"400":{"description":"Bad Request - EntryDateFrom and EntryDateTo are required"},"401":{"description":"Unauthorized"},"200":{"description":"Returns aggregated timesheet totals with optional grouping.","schema":{"$ref":"#/definitions/TimesheetSummaryResult"}}},"security":[{"oauth2":["read_timesheets"]}]}},"/api/TimesheetTimer":{"get":{"tags":["TimesheetTimer"],"summary":"Checks if there is a currently running timer for the authenticated user (or an impersonated user). Returns timer start time, timesheet entry ID, and server time for clock synchronisation.","operationId":"TimesheetTimer_GetRunningTimer","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"UserID","in":"query","description":"Optional - User ID number if impersonating a different user. Otherwise assumes the current user. Only users with certain security roles have permission to impersonate other users","required":false,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the running timer status including start time and timesheet entry ID.","schema":{"type":"object"}}},"security":[{"oauth2":["read_timesheets"]}]}},"/api/TimesheetTimer/{id}":{"post":{"tags":["TimesheetTimer"],"summary":"Starts a timer on an existing timesheet entry. If the entry is not on the current day or start/end times are enabled, a new timesheet entry is created for the timer.","operationId":"TimesheetTimer_StartTimer","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"ID of the timesheet entry that should be used as the basis for running a timer. If the existing timesheet is not on the current day, or start/end times are enabled, a new timesheet will be created for the timer.","required":true,"type":"integer","format":"int64"},{"name":"UserID","in":"query","description":"Optional - User ID number if impersonating a different user. Otherwise assumes the current user. Only users with certain security roles have permission to impersonate other users","required":false,"type":"integer","format":"int32"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the timer start result including timer start time and timesheet entry ID.","schema":{"type":"object"}}},"security":[{"oauth2":["write_timesheets"]}]},"delete":{"tags":["TimesheetTimer"],"summary":"Stops the running timer on a timesheet entry. The elapsed time is added to the entry's duration.","operationId":"TimesheetTimer_StopTimer","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The ID of the existing timesheet entry that needs its timer stopped","required":true,"type":"integer","format":"int64"},{"name":"UserID","in":"query","description":"Optional - User ID number if impersonating a different user. Otherwise assumes the current user. Only users with certain security roles have permission to impersonate other users","required":false,"type":"integer","format":"int32"},{"name":"SendWebhooks","in":"query","required":false,"type":"boolean"}],"responses":{"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"200":{"description":"Returns the timer stop result including final duration.","schema":{"type":"object"}}},"security":[{"oauth2":["write_timesheets"]}]}},"/api/UserProfile/Archive":{"post":{"tags":["UserProfile"],"summary":"Archive an existing user. Sets isArchived=true, deletes all role assignments, and disables all ProjectMember rows (freeing any consumed paid-role seats).","description":"Admin role only. Archiving an already-archived user is a no-op and returns the current record. You cannot archive yourself.","operationId":"UserProfile_Archive","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"{ UserID }","required":true,"schema":{"$ref":"#/definitions/UserProfileIDRequest"}}],"responses":{"400":{"description":"Validation error or attempt to archive self."},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden — caller is not an Admin."},"200":{"description":"Returns the archived user (IsArchived = true).","schema":{"$ref":"#/definitions/UserDetails"}}},"security":[{"oauth2":["write_users"]}]}},"/api/UserProfile/Unarchive":{"post":{"tags":["UserProfile"],"summary":"Unarchive a previously archived user. Does NOT restore roles or ProjectMember records — those must be re-added explicitly.","description":"Admin role only. Unarchiving an already-active user is a no-op and returns the current record.","operationId":"UserProfile_Unarchive","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"{ UserID }","required":true,"schema":{"$ref":"#/definitions/UserProfileIDRequest"}}],"responses":{"400":{"description":"Validation error."},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden — caller is not an Admin."},"200":{"description":"Returns the active user (IsArchived = false).","schema":{"$ref":"#/definitions/UserDetails"}}},"security":[{"oauth2":["write_users"]}]}},"/api/UserProfile":{"get":{"tags":["UserProfile"],"summary":"Get Collection of Users who have roles in the current Avaza account.","description":"Admin and Finance Managers can see all. Other users are limited to seeing their own profile.","operationId":"UserProfile_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"Roles","in":"query","description":"Optional list of comma separated role codes to filter users by (e.g. \"TimesheetUser,Admin\")","required":false,"type":"string"},{"name":"Tags","in":"query","description":"Comma-separated list of user tag names to filter users by.","required":false,"type":"string"},{"name":"CurrentUserOnly","in":"query","description":"Optional boolean (true/false) to filter to only show current authenticated user (always true for non Admin/Finance Manager users)","required":false,"type":"boolean"},{"name":"CompanyIDFK","in":"query","description":"Optionally filter by Company ID","required":false,"type":"integer","format":"int32"},{"name":"Email","in":"query","description":"Optionally filter by user email address","required":false,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the list of users/team members with roles and tags.","schema":{"$ref":"#/definitions/UserList"}}},"security":[{"oauth2":["read_users"]}]},"put":{"tags":["UserProfile"],"summary":"Update one or more fields on an existing user. Only fields named in FieldsToUpdate are written; fields listed but null in the payload are ignored.","description":"Admin role only. An existing user cannot change between team member and customer contact; CompanyIDFK cannot be updated. When Roles is in FieldsToUpdate, the supplied array fully replaces the existing role set (pass [] to clear) and paid-role quotas are checked against the post-update state.","operationId":"UserProfile_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"UserID, FieldsToUpdate allowlist, and the fields to change.","required":true,"schema":{"$ref":"#/definitions/UpdateUserProfile"}}],"responses":{"400":{"description":"Validation error."},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden — caller is not an Admin."},"412":{"description":"Precondition failed — paid-role license quota would be exceeded."},"200":{"description":"Returns the updated user.","schema":{"$ref":"#/definitions/UserDetails"}}},"security":[{"oauth2":["write_users"]}]},"post":{"tags":["UserProfile"],"summary":"Create a new user (team member or customer contact) in the current Avaza account.","description":"Admin role only. If CompanyIDFK is provided the user is created as a Customer Contact, otherwise as a Team Member. Paid-role seat quotas are enforced. If Email already exists in the central GlobalUser table the new UserProfile is linked to that GlobalUser, otherwise a new GlobalUser is created.","operationId":"UserProfile_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","description":"The new user details.","required":true,"schema":{"$ref":"#/definitions/NewUserProfile"}}],"responses":{"400":{"description":"Validation error (missing/invalid field, email already exists, invalid RoleCode for user type)."},"401":{"description":"Unauthorized."},"403":{"description":"Forbidden — caller is not an Admin."},"412":{"description":"Precondition failed — paid-role license quota would be exceeded."},"200":{"description":"Returns the created user.","schema":{"$ref":"#/definitions/UserDetails"}}},"security":[{"oauth2":["write_users"]}]}},"/api/Webhook":{"get":{"tags":["Webhook"],"summary":"Retrieves all active webhook subscriptions for the authenticated account.","operationId":"Webhook_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns all active webhook subscriptions.","schema":{"$ref":"#/definitions/WebhookList"}}},"security":[{"oauth2":["webhook_notifications"]}]},"post":{"tags":["Webhook"],"summary":"Creates a new webhook subscription. On success, returns the ID of the new webhook subscription.","description":"When you receive a webhook, you should respond with Http 200 OK Status Code, otherwise we will retry. To create a webhook, you need both the webhook_notifications scope, as well as the scope for the required entity being monitored.  Event values are: \"company_created\", \"company_deleted\", \"company_updated\", \"contact_created\", \"contact_deleted\", \"contact_updated\", \"invoice_created\", \"invoice_sent\",\"invoice_updated\",\"invoice_deleted\", \"project_created\", \"project_deleted\", \"project_updated\", \"task_created\", \"task_updated\",\"task_deleted\", \"timesheet_created\", \"timesheet_deleted\", \"timesheet_updated, \"bill_created\", \"bill_updated\", \"estimate_created\", \"estimate_updated\", \"estimate_deleted\", \"expense_created\", \"expense_updated\", \"expense_deleted\", \"scheduleseries_created\", \"scheduleseries_updated\", \"scheduleseries_deleted\".  You can subscribe to any webhook, but you will only receive notifications for data appropriate to the roles of your user account. There is an optional  Secret parameter (string 255 char max). This allows for webhook authentication. If provided, the Secret will be BASE 64 encoded and passed with notications as a basic authentication http header. i.e. Authorization Basic [BASE64 of Secret]\"","operationId":"Webhook_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"model","in":"body","required":true,"schema":{"$ref":"#/definitions/CreateSubscription"}}],"responses":{"401":{"description":"Unauthorized"},"201":{"description":"Subscription created","schema":{"$ref":"#/definitions/SubscribeResult"}},"409":{"description":"Duplicate subscription already exists"}},"security":[{"oauth2":["webhook_notifications","read_contacts","read_account","read_users","read_financials","read_projects","read_schedule","read_timesheets","read_expenses","write_contacts","write_account","write_users","write_financials","write_projects","write_schedule","write_timesheets","write_expenses"]}]},"delete":{"tags":["Webhook"],"summary":"Deletes a webhook subscription by its callback URL.","operationId":"Webhook_DeleteByUrl","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"target_url","in":"query","description":"The callback URL of the webhook subscription to delete.","required":true,"type":"string"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns confirmation of the webhook deletion.","schema":{"type":"object"}}},"security":[{"oauth2":["webhook_notifications"]}]}},"/api/Webhook/{id}":{"get":{"tags":["Webhook"],"summary":"Retrieves a single webhook subscription by its Subscription ID.","operationId":"Webhook_GetByID","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The numeric Subscription ID of the webhook to retrieve.","required":true,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns the webhook subscription details.","schema":{"$ref":"#/definitions/WebhookList"}}},"security":[{"oauth2":["webhook_notifications"]}]},"delete":{"tags":["Webhook"],"summary":"Deletes a webhook subscription by its Subscription ID.","operationId":"Webhook_Delete","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","description":"The numeric Subscription ID of the webhook to delete.","required":true,"type":"integer","format":"int32"}],"responses":{"401":{"description":"Unauthorized"},"200":{"description":"Returns confirmation of the webhook deletion.","schema":{"type":"object"}}},"security":[{"oauth2":["webhook_notifications"]}]}}},"definitions":{"AccountDetails":{"description":"Account-level configuration details including timesheet settings, currency, and branding options.","type":"object","properties":{"AccountID":{"format":"int32","description":"Unique identifier for the Avaza account.","type":"integer"},"CompanyName":{"description":"The registered company/organisation name for the account.","type":"string"},"Subdomain":{"description":"The unique subdomain for the account (e.g. 'mycompany' in mycompany.avaza.com).","type":"string"},"AccountEmail":{"description":"The primary email address associated with the account.","type":"string"},"hasStartEndTimesheets":{"description":"Whether the account is configured to track start and end times on timesheet entries.","type":"boolean"},"has24HourTimesheetFormat":{"description":"Whether the account displays times in 24-hour format (true) or 12-hour format (false).","type":"boolean"},"WeeklyTimesheetReminder":{"description":"Whether weekly timesheet reminder emails are enabled for the account.","type":"boolean"},"LockApprovedTimesheets":{"description":"Whether approved timesheets are locked from further editing by standard users.","type":"boolean"},"TimesheetDayOfWeek":{"format":"int32","description":"The day of the week that starts the timesheet week (0=Sunday, 1=Monday, etc.).","type":"integer"},"TimesheetDisplayFormatCode":{"description":"The display format for timesheets (e.g. decimal hours vs hours:minutes).","type":"string"},"AllowHidingCompletedTasksOnTimesheet":{"description":"Whether users can hide completed tasks when selecting tasks on timesheets.","type":"boolean"},"CurrentServerTimeISO":{"description":"Format: ISO \"YYYY-MM-DD HH:mm:ss.SSS\"","type":"string"},"SC":{"type":"string"},"DefaultCurrencyCode":{"description":"ISO 3 letter base Currency Code for the account","type":"string"},"ExpenseApprovalRequired":{"description":"Whether the account requires expenses be approved.","type":"boolean"},"LockApprovedExpenses":{"description":"Approved expenses get locked from subsequent editing by standard expense users.","type":"boolean"},"BrandPrimaryColor":{"description":"A custom branding color for the account. Available on paid accounts.","type":"string"},"BrandPrimaryColorLuminance":{"description":"A determination of the luminance of the Brand Primary Color (possible values: 'Dark', 'Medium', 'Light'). This can be used to determine appropriate font colors to sit on top of the brand color.","type":"string"}}},"BillList":{"description":"Paginated collection of supplier bills.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of bills matching the filter criteria.","type":"integer"},"PageNumber":{"format":"int32","description":"Current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page.","type":"integer"},"Bills":{"description":"The list of bills for this page.","type":"array","items":{"$ref":"#/definitions/Bill"}}}},"Bill":{"description":"A supplier bill (purchase invoice) including line items, status, amounts, and issuer/recipient details.","type":"object","properties":{"TransactionID":{"format":"int64","description":"Unique identifier for the bill transaction.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this bill belongs to.","type":"integer"},"TransactionPrefix":{"description":"The prefix used in the bill number (e.g. 'BILL').","type":"string"},"BillNumber":{"description":"The full bill/invoice number including prefix.","type":"string"},"CompanyIDFK":{"format":"int32","description":"The supplier company ID this bill is from.","type":"integer"},"CompanyName":{"description":"The name of the supplier company.","type":"string"},"Subject":{"description":"Subject line or description for the bill.","type":"string"},"DateIssued":{"format":"date-time","description":"The date the bill was issued.","type":"string"},"DateVerified":{"format":"date-time","description":"The date the bill was verified/approved.","type":"string"},"DueDate":{"format":"date-time","description":"The payment due date for the bill.","type":"string"},"TransactionStatusCode":{"description":"Current status of the bill. Values: Draft, Verified, Late, Paid, Partial, Void.","type":"string"},"TaxAmount":{"format":"double","description":"Total tax amount across all line items.","type":"number"},"TransactionTaxConfigCode":{"description":"Tax configuration: 'EX' (tax exclusive) or 'INC' (tax inclusive).","type":"string"},"Balance":{"format":"double","description":"Outstanding balance remaining on the bill.","type":"number"},"CurrencyCode":{"description":"ISO 3-character currency code for the bill.","type":"string"},"TotalAmount":{"format":"double","description":"Total amount of the bill including tax.","type":"number"},"ExchangeRate":{"format":"double","description":"Exchange rate to the account's base currency. 1.0 if same currency.","type":"number"},"Notes":{"description":"Additional notes or comments on the bill.","type":"string"},"SupplierPONumber":{"description":"Supplier purchase order number reference.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"LineItems":{"description":"Line items on this bill.","type":"array","items":{"$ref":"#/definitions/BillLineItem"}},"Links":{"$ref":"#/definitions/BillLinks","description":"URLs for viewing and editing this bill in the Avaza web application."},"Issuer":{"$ref":"#/definitions/BillIssuerDetails","description":"Billing address details for the supplier who issued the bill."},"Recipient":{"$ref":"#/definitions/BillRecipientDetails","description":"Billing address details for the Avaza account (the recipient of the bill)."}}},"BillLineItem":{"description":"A line item on a supplier bill, specifying the inventory item, quantity, unit price, tax, and amount.","type":"object","properties":{"TransactionLineItemID":{"format":"int64","description":"Unique identifier for the line item.","type":"integer"},"InventoryItemIDFK":{"format":"int64","description":"The inventory/product item ID for this line item.","type":"integer"},"InventoryItemName":{"description":"Name of the inventory/product item.","type":"string"},"InventoryItemSKU":{"description":"Stock Keeping Unit code for the inventory item.","type":"string"},"Description":{"description":"Text description for the line item.","type":"string"},"Quantity":{"format":"double","description":"Quantity of items on this line.","type":"number"},"UnitPrice":{"format":"double","description":"Price per unit for this line item.","type":"number"},"TaxAmount":{"format":"double","description":"Total tax amount for this line item.","type":"number"},"TaxIDFK":{"format":"int32","description":"The tax rate ID applied to this line item.","type":"integer"},"TaxCode":{"description":"Short code for the applied tax rate.","type":"string"},"TaxName":{"description":"Name of the applied tax rate.","type":"string"},"ProjectIDFK":{"format":"int32","description":"Optional project ID this line item is attributed to for reporting.","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"Amount":{"format":"double","description":"Calculated line total (Quantity x UnitPrice less Discount).","type":"number"},"Discount":{"format":"double","description":"Discount percentage applied to this line item.","type":"number"}}},"BillLinks":{"description":"URLs for viewing and editing a bill in the Avaza web application.","type":"object","properties":{"WebView":{"description":"URL for viewing the bill in a web browser.","type":"string"},"View":{"description":"URL for viewing the bill in the Avaza application.","type":"string"},"Edit":{"description":"URL for editing the bill in the Avaza application.","type":"string"}}},"BillIssuerDetails":{"description":"Billing address details for the supplier who issued the bill.","type":"object","properties":{"CompanyIDFK":{"format":"int32","description":"The supplier company ID this bill is from.","type":"integer"},"CompanyName":{"description":"The name of the supplier company.","type":"string"},"BillingAddress":{"description":"Formatted multi-line billing address.","type":"string"},"BillingAddressLine":{"description":"Street address line of the billing address.","type":"string"},"BillingAddressCity":{"description":"City/suburb of the billing address.","type":"string"},"BillingAddressState":{"description":"State/province of the billing address.","type":"string"},"BillingAddressPostCode":{"description":"Postal/ZIP code of the billing address.","type":"string"},"BillingCountryCode":{"description":"ISO 3166-1 alpha-2 country code of the billing address.","type":"string"}}},"BillRecipientDetails":{"description":"Billing address details for the Avaza account (the recipient of the bill).","type":"object","properties":{"RecipientFormattedBillingAddress":{"description":"Pre-formatted multi-line billing address for the recipient.","type":"string"},"RecipientBillingAddressLine":{"description":"Street address line for the recipient.","type":"string"},"RecipientBillingAddressCity":{"description":"City/suburb for the recipient.","type":"string"},"RecipientBillingAddressState":{"description":"State/province for the recipient.","type":"string"},"RecipientBillingAddressPostCode":{"description":"Postal/ZIP code for the recipient.","type":"string"},"RecipientBillingAddressCountryCode":{"description":"ISO country code for the recipient.","type":"string"}}},"NewBill":{"description":"Request model for creating a new supplier bill. Supports automatic company/contact creation.","type":"object","properties":{"TransactionPrefix":{"description":"A prefix for the Invoice number. e.g. 'INV'. If left blank it will be set to the account default. Max length 20 characters.","type":"string"},"BillNumber":{"description":"Pass any string. If left blank it will use the next number in the auto incrementing sequence. If an integer is passed then the largest integer will be use as the seed to auto generate the next invoice number in the sequence.","type":"string"},"CompanyIDFK":{"format":"int32","description":"If left blank then you must specify Company Name.","type":"integer"},"CompanyName":{"description":"If left blank then you must specify Company ID. Specified Name will be used to match existing customer record. If not matched then it will be used to create a new customer. First Name, Last Name and Email will only be used if it is a new company. If the Company name appears multiple times we will check the email address to find a matching company. If email address doesn't identify a matching company then the invoice creation will be rejected.","type":"string"},"Firstname":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"Lastname":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"Email":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"CurrencyCode":{"description":"Expects ISO Standard 3 character currency code. If left blank the currency will default to account's currency in general setting. For existing companies this field will be ignored and the invoice will use the currency of the customer. For new customers if the currency is not specified then account currency will be used otherwise the specified currency will be used.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate is only valid for invoices in currency other than default account currency. If not specified it will get the market rate based on the Date Issued.","type":"number"},"BillTemplateIDFK":{"format":"int32","description":"If left blank the account default invoice template will be used.","type":"integer"},"Subject":{"description":"Plain UTF8 text. (no HTML). 255 characters max","type":"string"},"SupplierPONumber":{"description":"Plain UTF8 text. 100 characters max","type":"string"},"DateIssued":{"format":"date-time","description":"If not specified it will use today's date. The date should be specified as local date.","type":"string"},"PaymentTerms":{"format":"int32","description":" \"If left blank we will set it to customer default. If specified then it must match one of your existing pre configured payment term periods. Your account starts with:\r\n(-1 --- Custom, 0 --- Upon Receipt, 7 --- 7 Days, 15 --- 15 Days, 30 --- 30 Days, 45 --- 45 Days, 60 --- 60 Days)","type":"integer"},"DueDate":{"format":"date-time","description":"It will be auto calculated based on the payment term and issue date. Due Date must be greater than or equal to Issue Date. If the Due Date is specified then Payment Terms will be set to -1 (Custom)","type":"string"},"TransactionTaxConfigCode":{"description":"Possible values are (EX --- Tax Exclusive, INC --- Tax Inclusive). If left empty it will use the account default.","type":"string"},"Notes":{"description":"Plain UTF8 text. (no HTML). Max 2000 characters","type":"string"},"LineItems":{"description":"Line items to include on the bill. At least one line item is required.","type":"array","items":{"$ref":"#/definitions/NewBillLineItem"}},"SendWebhooks":{"description":"If true, fires the bill_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"NewBillLineItem":{"description":"A line item to be added to a new supplier bill.","required":["Quantity","UnitPrice"],"type":"object","properties":{"InventoryItemIDFK":{"format":"int32","description":"If not specified then Inventory Item Name must be specified.","type":"integer"},"InventoryItemName":{"description":"If not specified then Inventory item ID must be specified. If specified and not matched to any existing inventory items then a new inventory item will be created. Max 200 characters.","type":"string"},"Description":{"description":"Plain UTF8 text. (no HTML)","type":"string"},"Quantity":{"format":"double","description":"The quantity for the line item","type":"number"},"UnitPrice":{"format":"double","description":"The unit price for the lineitem.","type":"number"},"TaxIDFK":{"format":"int32","description":"If specified then it must match an existing Tax ID. If not specified then Tax Name and Tax Percent must be specified.","type":"integer"},"TaxName":{"description":"Must be specified if the Tax ID is blank. If the Tax Name is specified it will be matched to an existing Tax Name or else a new Tax will be created.","type":"string"},"TaxPercent":{"format":"double","description":"The Tax Percent will only be used if a new tax is being created.","type":"number"},"Discount":{"format":"double","description":"Enter 10.5 to give a 10.5% discount","type":"number"},"ProjectIDFK":{"format":"int32","description":"Optional. Project ID of an Avaza Project that belongs to this customer, so line item is attributed to that Project for reporting.","type":"integer"}}},"BillPaymentList":{"description":"Paginated collection of supplier bill payments.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of payments matching the filter criteria.","type":"integer"},"PageNumber":{"format":"int32","description":"Current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page.","type":"integer"},"Payments":{"description":"The list of bill payments for this page.","type":"array","items":{"$ref":"#/definitions/BillPayment"}}}},"BillPayment":{"description":"A payment made to a supplier, including allocations to specific bills.","type":"object","properties":{"TransactionID":{"format":"int64","description":"Unique identifier for the payment transaction.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this payment belongs to.","type":"integer"},"TransactionPrefix":{"description":"The prefix used in the payment number.","type":"string"},"PaymentNumber":{"description":"The full payment number including prefix.","type":"string"},"TransactionReference":{"description":"External reference number (e.g. cheque number or bank reference).","type":"string"},"SupplierIDFK":{"format":"int32","description":"The supplier company ID this payment is made to.","type":"integer"},"DateIssued":{"format":"date-time","description":"The date the payment was made.","type":"string"},"TransactionStatusCode":{"description":"Current status of the payment.","type":"string"},"PaymentProviderCode":{"description":"Code identifying the payment provider/method used.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate to the account's base currency.","type":"number"},"Balance":{"format":"double","description":"Unallocated balance remaining on the payment.","type":"number"},"CurrencyCode":{"description":"ISO 3-character currency code for the payment.","type":"string"},"TotalAmount":{"format":"double","description":"Total payment amount.","type":"number"},"Notes":{"description":"Additional notes on the payment.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"PaymentAllocations":{"description":"List of allocations applying this payment to specific bills.","type":"array","items":{"$ref":"#/definitions/BillPaymentAllocation"}},"ViewBillPaymentURL":{"description":"URL to view this bill payment in the Avaza web application.","type":"string"}}},"BillPaymentAllocation":{"description":"An allocation record linking a bill payment to a specific supplier bill.","type":"object","properties":{"TransactionAllocationID":{"format":"int64","description":"Unique identifier for this payment allocation.","type":"integer"},"BillTransactionIDFK":{"format":"int64","description":"The bill Transaction ID this payment is allocated against.","type":"integer"},"PaymentTransactionIDFK":{"format":"int64","description":"The payment Transaction ID this allocation belongs to.","type":"integer"},"AllocationDate":{"format":"date-time","description":"The date this allocation was applied.","type":"string"},"AllocationAmount":{"format":"double","description":"The amount allocated from the payment to the bill.","type":"number"}}},"NewBillPayment":{"description":"Request model for creating a new supplier bill payment.","type":"object","properties":{"Amount":{"format":"double","description":"The total amount of the payment.","type":"number"},"PaymentNumber":{"description":"Optional. If not specified will be automatically generated","type":"string"},"DateIssued":{"format":"date-time","description":"Date of Payment. If not specified, assumes today.","type":"string"},"TransactionPrefix":{"description":"Optional to override the default prefix added to Payment Numbers","type":"string"},"CompanyIDFK":{"format":"int32","description":"Only required if no invoice allocations specified.","type":"integer"},"ExchangeRate":{"format":"double","description":"Optional. Only used when the Company's currency is different from the Avaza account's base currency. Specifies the exchange rate that should apply between the Company currency and base currency. If not provided we will obtain an up to date exchange rate for the Payment Issue Date.","type":"number"},"TransactionReference":{"description":"Optional for storing the reference # of the payment method.","type":"string"},"Notes":{"description":"Additional notes on the payment.","type":"string"},"PaymentProviderCode":{"description":"Optional for storing the payment provider who was the source of funds.","type":"string"},"CurrencyCode":{"description":"Optional for specifying the Bill Payment's Currency (3 letter ISO Currency Code).","type":"string"},"PaymentAllocations":{"description":"List of amounts within this payment that are allocated to invoices. The sum of these be less than or equal to the payment amount.","type":"array","items":{"$ref":"#/definitions/NewBillPaymentAllocation"}},"SendWebhooks":{"description":"If true, fires the bill_updated webhook event to any subscribed endpoints for each bill that was allocated against. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"NewBillPaymentAllocation":{"description":"An allocation entry for applying a bill payment to a specific bill.","type":"object","properties":{"BillTransactionIDFK":{"format":"int64","description":"The Avaza Bill TransactionID that is having a payment amount allocated to it.","type":"integer"},"AllocationAmount":{"format":"double","description":"The Amount being allocated to the bill. Expects same currency as bill currency","type":"number"},"AllocationDate":{"format":"date-time","description":"Optional. Defaults to the current time in the Avaza account's timezone. The date the allocation is applied to the bill. Can be different from the Payment Date when doing prepayments etc.","type":"string"}}},"CompanyDropdownList":{"description":"Paginated list of minimal company records for dropdown/autocomplete use.","type":"object","properties":{"Companies":{"description":"The list of minimal company records for the current page.","type":"array","items":{"$ref":"#/definitions/CompanyMinimal"}},"TotalCount":{"format":"int32","description":"Total number of companies matching the query.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of results per page.","type":"integer"}}},"CompanyMinimal":{"description":"A minimal company record containing only the Company ID and name.","type":"object","properties":{"CompanyID":{"format":"int64","description":"The unique identifier of the company.","type":"integer"},"CompanyName":{"description":"The display name of the company.","type":"string"}}},"CompanyList":{"description":"Paginated collection of customer companies with full details.","type":"object","properties":{"Companies":{"description":"The list of companies for the current page.","type":"array","items":{"$ref":"#/definitions/Company"}},"TotalCount":{"format":"int32","description":"Total number of companies matching the query.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of results per page.","type":"integer"}}},"Company":{"description":"A customer or supplier company record with billing address, contacts, and financial settings.","type":"object","properties":{"CompanyID":{"format":"int32","description":"The unique identifier of the company.","type":"integer"},"CompanyName":{"description":"The display name of the company.","type":"string"},"BillingAddressLine":{"description":"The first line of the company's billing address (street address).","type":"string"},"BillingAddressCity":{"description":"The city of the company's billing address.","type":"string"},"BillingAddressState":{"description":"The state or province of the company's billing address.","type":"string"},"BillingAddressPostCode":{"description":"The postcode or ZIP code of the company's billing address.","type":"string"},"BillingCountryCode":{"description":"The ISO 2-letter country code for the company's billing address.","type":"string"},"BillingAddress":{"description":"The full formatted billing address string. If set, overrides the individual address fields.","type":"string"},"Phone":{"description":"The company's primary phone number.","type":"string"},"Fax":{"description":"The company's fax number.","type":"string"},"website":{"description":"The company's website URL.","type":"string"},"TaxNumber":{"description":"The company's tax registration number.","type":"string"},"Comments":{"description":"Internal notes or comments about the company.","type":"string"},"CurrencyCode":{"description":"The default currency code used for invoices and transactions with this company.","type":"string"},"DefaultTradingTermIDFK":{"format":"int32","description":"The ID of the default trading terms applied to invoices for this company.","type":"integer"},"DateCreated":{"format":"date-time","description":"The UTC date and time when the company record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"The UTC date and time when the company record was last updated.","type":"string"},"Contacts":{"description":"The list of external contacts associated with this company.","type":"array","items":{"$ref":"#/definitions/CompanyContact"}},"ViewCompanyURL":{"description":"URL to view this company in the Avaza web application.","type":"string"}}},"CompanyContact":{"description":"An external contact associated with a customer company.","type":"object","properties":{"ContactID":{"format":"int32","description":"The unique identifier of the contact.","type":"integer"},"CompanyIDFK":{"format":"int32","description":"The ID of the company this contact belongs to.","type":"integer"},"CompanyName":{"description":"The name of the company this contact belongs to.","type":"string"},"Firstname":{"description":"The contact's first name.","type":"string"},"Lastname":{"description":"The contact's last name.","type":"string"},"Email":{"description":"The contact's email address.","type":"string"},"Phone":{"description":"The contact's phone number.","type":"string"},"Mobile":{"description":"The contact's mobile phone number.","type":"string"},"PositionTitle":{"description":"The contact's job title or position.","type":"string"},"TimeZone":{"description":"The contact's time zone identifier.","type":"string"},"DateCreated":{"format":"date-time","description":"The UTC date and time when the contact record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"The UTC date and time when the contact record was last updated.","type":"string"}}},"NewCompany":{"description":"Request model for creating a new customer company.","required":["CompanyName"],"type":"object","properties":{"CompanyName":{"type":"string"},"CurrencyCode":{"description":"The default currency code for this company. Defaults to the account's default currency if not provided.","type":"string"},"BillingAddressLine":{"description":"The street address line for the company's billing address.","type":"string"},"BillingAddressCity":{"description":"The city for the company's billing address.","type":"string"},"BillingAddressState":{"description":"The state or province for the company's billing address.","type":"string"},"BillingAddressPostCode":{"description":"The postcode or ZIP code for the company's billing address.","type":"string"},"BillingCountryCode":{"description":"The ISO 2-letter country code for the company's billing address.","type":"string"},"BillingAddress":{"description":"The full formatted billing address string. If set, overrides the individual address fields.","type":"string"},"Phone":{"description":"The company's primary phone number.","type":"string"},"Fax":{"description":"The company's fax number.","type":"string"},"website":{"description":"The company's website URL.","type":"string"},"TaxNumber":{"description":"The company's tax registration number.","type":"string"},"Comments":{"description":"Internal notes or comments about the company.","type":"string"},"SendWebhooks":{"description":"If true, fires the company_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"UpdateCompany":{"description":"Request model for updating an existing company. Only fields in FieldsToUpdate are modified.","type":"object","properties":{"CompanyID":{"format":"int32","description":"The ID of the company to update. Required.","type":"integer"},"FieldsToUpdate":{"description":"A list of field names that should be updated. Only the fields named here will be changed.","type":"array","items":{"type":"string"}},"CompanyName":{"description":"The new name for the company.","type":"string"},"BillingAddressLine":{"description":"The updated street address line for the company's billing address.","type":"string"},"BillingAddressCity":{"description":"The updated city for the company's billing address.","type":"string"},"BillingAddressState":{"description":"The updated state or province for the company's billing address.","type":"string"},"BillingAddressPostCode":{"description":"The updated postcode or ZIP code for the company's billing address.","type":"string"},"BillingCountryCode":{"description":"The updated ISO 2-letter country code for the company's billing address.","type":"string"},"BillingAddress":{"description":"The updated full formatted billing address string. If set, overrides the individual address fields.","type":"string"},"Phone":{"description":"The company's updated primary phone number.","type":"string"},"Fax":{"description":"The company's updated fax number.","type":"string"},"website":{"description":"The company's updated website URL.","type":"string"},"TaxNumber":{"description":"The company's updated tax registration number.","type":"string"},"Comments":{"description":"Updated internal notes or comments about the company.","type":"string"},"SendWebhooks":{"description":"If true, fires the company_updated webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ContactList":{"description":"Paginated collection of external contacts.","type":"object","properties":{"Contacts":{"description":"The list of contacts for the current page.","type":"array","items":{"$ref":"#/definitions/CompanyContact"}},"TotalCount":{"format":"int32","description":"Total number of contacts matching the query.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of results per page.","type":"integer"}}},"NewCompanyContact":{"description":"Request model for creating a new external contact. Optionally creates a new company if one doesn't exist.","required":["ContactEmail","Firstname","Lastname"],"type":"object","properties":{"CompanyIDFK":{"format":"int32","description":"The ID of an existing company to associate the contact with. If omitted, CompanyName is used to find or create a company.","type":"integer"},"CompanyName":{"description":"The name of the company to associate the contact with. Used to find an existing company or create a new one if not found.","type":"string"},"CurrencyCode":{"description":"The currency code for a newly created company. Defaults to the account's default currency if not provided.","type":"string"},"CompanyBillingAddress":{"description":"The full formatted billing address string for a newly created company.","type":"string"},"CompanyBillingAddressLine":{"description":"The street address line for the billing address of a newly created company.","type":"string"},"CompanyBillingAddressCity":{"description":"The city for the billing address of a newly created company.","type":"string"},"CompanyBillingAddressState":{"description":"The state or province for the billing address of a newly created company.","type":"string"},"CompanyBillingAddressPostCode":{"description":"The postcode or ZIP code for the billing address of a newly created company.","type":"string"},"CompanyBillingAddressCountryCode":{"description":"The ISO 2-letter country code for the billing address of a newly created company.","type":"string"},"ContactEmail":{"type":"string"},"Firstname":{"type":"string"},"Lastname":{"type":"string"},"PositionTitle":{"description":"The contact's job title or position.","type":"string"},"Mobile":{"description":"The contact's mobile phone number.","type":"string"},"Phone":{"description":"The contact's phone number.","type":"string"},"UpdateExisting":{"description":"If true, updates an existing contact with the same email address instead of creating a duplicate. Defaults to true.","type":"boolean"},"SendWebhooks":{"description":"If true, fires the contact_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"CreditNoteList":{"description":"Paginated collection of customer credit notes.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"CreditNotes":{"description":"The list of credit notes on this page.","type":"array","items":{"$ref":"#/definitions/CreditNote"}}}},"CreditNote":{"description":"A customer credit note with line items and allocations to invoices.","type":"object","properties":{"TransactionID":{"format":"int64","description":"Unique identifier for the credit note transaction.","type":"integer"},"TransactionPrefix":{"description":"Prefix used in the credit note number.","type":"string"},"CreditNoteNumber":{"description":"The full credit note number including prefix.","type":"string"},"CustomerIDFK":{"format":"int32","description":"The customer company ID this credit note is issued to.","type":"integer"},"DateIssued":{"format":"date-time","description":"The date the credit note was issued.","type":"string"},"TransactionStatusCode":{"description":"Current status of the credit note.","type":"string"},"Balance":{"format":"double","description":"Unallocated balance remaining on the credit note.","type":"number"},"CurrencyCode":{"description":"ISO 3-character currency code for the credit note.","type":"string"},"TotalAmount":{"format":"double","description":"Total credit note amount.","type":"number"},"Notes":{"description":"Additional notes on the credit note.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"CreditNoteAllocations":{"description":"List of allocations applying this credit note against invoices.","type":"array","items":{"$ref":"#/definitions/CreditNoteAllocation"}},"CreditNoteLineItems":{"description":"Line items on this credit note.","type":"array","items":{"$ref":"#/definitions/CreditNoteLineItem"}},"ViewCreditNoteURL":{"description":"URL to view this credit note in the Avaza web application.","type":"string"}}},"CreditNoteAllocation":{"description":"An allocation record linking a credit note to a specific invoice.","type":"object","properties":{"TransactionAllocationID":{"format":"int64","description":"Unique identifier for this allocation.","type":"integer"},"InvoiceTransactionIDFK":{"format":"int64","description":"The invoice Transaction ID this credit note is allocated against.","type":"integer"},"CreditNoteTransactionIDFK":{"format":"int64","description":"The credit note Transaction ID this allocation belongs to.","type":"integer"},"AllocationDate":{"format":"date-time","description":"The date this allocation was applied.","type":"string"},"AllocationAmount":{"format":"double","description":"The amount allocated from the credit note to the invoice.","type":"number"}}},"CreditNoteLineItem":{"description":"A line item on a credit note.","type":"object","properties":{"TransactionLineItemID":{"format":"int64","description":"Unique identifier for the line item.","type":"integer"},"Description":{"description":"Text description for the line item.","type":"string"},"Quantity":{"format":"double","description":"Quantity of items on this line.","type":"number"},"UnitPrice":{"format":"double","description":"Price per unit for this line item.","type":"number"},"TaxAmount":{"format":"double","description":"Calculated tax amount on this line item.","type":"number"},"TaxIDFK":{"format":"int32","description":"The tax rate ID applied to this line item.","type":"integer"},"Amount":{"format":"double","description":"Calculated line total (Quantity x UnitPrice less Discount).","type":"number"},"Discount":{"format":"double","description":"Discount percentage applied to this line item.","type":"number"}}},"CurrencyList":{"description":"Collection of currencies configured in the account.","type":"object","properties":{"Currencies":{"description":"The list of currencies configured in the Avaza account.","type":"array","items":{"$ref":"#/definitions/Currency"}}}},"Currency":{"type":"object","properties":{"CurrencyCode":{"type":"string"},"Name":{"type":"string"},"Symbol":{"type":"string"},"Symbol2":{"type":"string"},"DecimalPlaces":{"format":"int32","type":"integer"}}},"EstimateList":{"description":"Paginated collection of estimates/quotes.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"Estimates":{"description":"The list of estimates on this page.","type":"array","items":{"$ref":"#/definitions/EstimateDetails"}}}},"EstimateDetails":{"description":"An estimate (quote) including line items, status, amounts, and issuer/recipient details.","type":"object","properties":{"EstimateID":{"format":"int64","description":"Unique identifier for the estimate.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this estimate belongs to.","type":"integer"},"EstimatePrefix":{"description":"Prefix used in the estimate number.","type":"string"},"EstimateItemNumber":{"description":"The estimate number (without prefix).","type":"string"},"CompanyIDFK":{"format":"int32","description":"The customer company ID this estimate is for.","type":"integer"},"CompanyName":{"description":"Name of the customer company.","type":"string"},"Subject":{"description":"Subject line for the estimate.","type":"string"},"DateIssued":{"format":"date-time","description":"Date the estimate was created/issued.","type":"string"},"DateSent":{"format":"date-time","description":"Date the estimate was sent to the customer.","type":"string"},"DueDate":{"format":"date-time","description":"Expiry date for the estimate.","type":"string"},"EstimateStatusCode":{"description":"Current status. Values: Draft, Sent, Accepted, Converted, Expired, Rejected.","type":"string"},"TaxAmount":{"format":"double","description":"Total tax amount across all line items.","type":"number"},"EstimateTaxConfigCode":{"description":"Tax configuration: 'EX' (exclusive) or 'INC' (inclusive).","type":"string"},"Balance":{"format":"double","description":"Remaining balance on the estimate.","type":"number"},"CurrencyCode":{"description":"ISO 3-character currency code for the estimate.","type":"string"},"TotalAmount":{"format":"double","description":"Total estimate amount including tax.","type":"number"},"ExchangeRate":{"format":"double","description":"Exchange rate to the account's base currency.","type":"number"},"Notes":{"description":"Additional notes on the estimate.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"LineItems":{"description":"Line items on this estimate.","type":"array","items":{"$ref":"#/definitions/EstimateLineItemDetails"}},"Links":{"$ref":"#/definitions/EstimateLinks","description":"URLs for viewing and editing the estimate in the Avaza web application."},"Issuer":{"$ref":"#/definitions/IssuerDetails","description":"Billing address and tax details for the Avaza account issuing this estimate."},"Recipient":{"$ref":"#/definitions/RecipientDetails","description":"Billing address details for the customer receiving this estimate."}}},"EstimateLineItemDetails":{"description":"A line item on an estimate, specifying the inventory item, quantity, unit price, tax, and amount.","type":"object","properties":{"EstimateLineItemID":{"format":"int64","description":"Unique identifier for the estimate line item.","type":"integer"},"InventoryItemIDFK":{"format":"int64","description":"The inventory/product item ID for this line item.","type":"integer"},"InventoryItemName":{"description":"Name of the inventory/product item.","type":"string"},"InventoryItemSKU":{"description":"Stock Keeping Unit code for the inventory item.","type":"string"},"Description":{"description":"Text description for the line item.","type":"string"},"Quantity":{"format":"double","description":"Quantity of items on this line.","type":"number"},"UnitPrice":{"format":"double","description":"Price per unit for this line item.","type":"number"},"TaxAmount":{"format":"double","description":"Calculated tax amount on this line item.","type":"number"},"TaxIDFK":{"format":"int32","description":"The tax rate ID applied to this line item.","type":"integer"},"TaxCode":{"description":"Short code for the applied tax rate.","type":"string"},"TaxName":{"description":"Name of the applied tax rate.","type":"string"},"Amount":{"format":"double","description":"Calculated line total (Quantity x UnitPrice less Discount).","type":"number"},"Discount":{"format":"double","description":"Discount percentage applied to this line item.","type":"number"}}},"EstimateLinks":{"description":"URLs for client-facing view, internal view, and editing an estimate in Avaza.","type":"object","properties":{"ClientView":{"description":"URL for the customer to view the estimate online.","type":"string"},"View":{"description":"URL for viewing the estimate in the Avaza application.","type":"string"},"Edit":{"description":"URL for editing the estimate in the Avaza application.","type":"string"}}},"IssuerDetails":{"description":"Billing address and tax details for the Avaza account (the party issuing an invoice or estimate).","type":"object","properties":{"BillingAddress":{"description":"Formatted multi-line billing address.","type":"string"},"BillingAddressLine":{"description":"Street address line of the billing address.","type":"string"},"BillingAddressCity":{"description":"City/suburb of the billing address.","type":"string"},"BillingAddressState":{"description":"State/province of the billing address.","type":"string"},"BillingAddressPostCode":{"description":"Postal/ZIP code of the billing address.","type":"string"},"BillingCountryCode":{"description":"ISO 3166-1 alpha-2 country code of the billing address.","type":"string"},"TaxNumber":{"description":"Tax registration number (e.g. VAT number, ABN, EIN).","type":"string"}}},"RecipientDetails":{"description":"Billing address details for the customer receiving an invoice or estimate.","type":"object","properties":{"CompanyIDFK":{"format":"int32","description":"The customer company ID.","type":"integer"},"CompanyName":{"description":"Name of the customer company.","type":"string"},"RecipientFormattedBillingAddress":{"description":"Pre-formatted multi-line billing address for the recipient.","type":"string"},"RecipientBillingAddressLine":{"description":"Street address line for the recipient.","type":"string"},"RecipientBillingAddressCity":{"description":"City/suburb for the recipient.","type":"string"},"RecipientBillingAddressState":{"description":"State/province for the recipient.","type":"string"},"RecipientBillingAddressPostCode":{"description":"Postal/ZIP code for the recipient.","type":"string"},"RecipientBillingAddressCountryCode":{"description":"ISO country code for the recipient.","type":"string"}}},"NewEstimate":{"description":"Request model for creating a new estimate/quote. Supports automatic company/contact creation.","type":"object","properties":{"EstimatePrefix":{"description":"A prefix for the Estimate number. e.g. 'INV'. If left blank it will be set to the account default. Max length 20 characters.","type":"string"},"EstimateNumber":{"description":"Pass any string. If left blank it will use the next number in the auto incrementing sequence. If an integer is passed then the largest integer will be use as the seed to auto generate the next Estimate number in the sequence.","type":"string"},"CompanyIDFK":{"format":"int32","description":"If left blank then you must specify Company Name.","type":"integer"},"CompanyName":{"description":"If left blank then you must specify Company ID. Specified Name will be used to match existing customer record. If not matched then it will be used to create a new customer. First Name, Last Name and Email will only be used if it is a new company. If the Company name appears multiple times we will check the email address to find a matching company. If email address doesn't identify a matching company then the Estimate creation will be rejected.","type":"string"},"Firstname":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"Lastname":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"Email":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"CurrencyCode":{"description":"Expects ISO Standard 3 character currency code. If left blank the currency will default to account's currency in general setting. For existing companies this field will be ignored and the Estimate will use the currency of the customer. For new customers if the currency is not specified then account currency will be used otherwise the specified currency will be used.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate is only valid for Estimates in currency other than default account currency. If not specified it will get the market rate based on the Date Issued.","type":"number"},"InvoiceTemplateIDFK":{"format":"int32","description":"If left blank the account default Estimate template will be used.","type":"integer"},"Subject":{"description":"Plain UTF8 text. (no HTML). 255 characters max","type":"string"},"CustomerPONumber":{"description":"Plain UTF8 text. 100 characters max","type":"string"},"DateIssued":{"format":"date-time","description":"If not specified it will use today's date. The date should be specified as local date.","type":"string"},"DueDate":{"format":"date-time","description":"It will be auto calculated based on the payment term and issue date. Due Date must be greater than or equal to Issue Date. If the Due Date is specified then Payment Terms will be set to -1 (Custom)","type":"string"},"EstimateTaxConfigCode":{"description":"Possible values are (EX --- Tax Exclusive, INC --- Tax Inclusive). If left empty it will use the account default.","type":"string"},"Notes":{"description":"Plain UTF8 text. (no HTML). Max 2000 characters","type":"string"},"LineItems":{"type":"array","items":{"$ref":"#/definitions/NewEstimateLineItem"}},"SendWebhooks":{"description":"If true, fires the estimate_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"NewEstimateLineItem":{"description":"A line item to be included on a new estimate.","required":["Quantity","UnitPrice"],"type":"object","properties":{"InventoryItemIDFK":{"format":"int32","description":"If not specified then Inventory Item Name must be specified.","type":"integer"},"InventoryItemName":{"description":"If not specified then Inventory item ID must be specified. If specified and not matched to any existing inventory items then a new inventory item will be created. Max 200 characters.","type":"string"},"Description":{"description":"Plain UTF8 text. (no HTML)","type":"string"},"Quantity":{"format":"double","description":"The quantity for the line item","type":"number"},"UnitPrice":{"format":"double","description":"The unit price for the lineitem.","type":"number"},"TaxIDFK":{"format":"int32","description":"If specified then it must match an existing Tax ID. If not specified then Tax Name and Tax Percent must be specified.","type":"integer"},"TaxName":{"description":"Must be specified if the Tax ID is blank. If the Tax Name is specified it will be matched to an existing Tax Name or else a new Tax will be created.","type":"string"},"TaxPercent":{"format":"double","description":"The Tax Percent will only be used if a new tax is being created.","type":"number"},"Discount":{"format":"double","description":"Enter 10.5 to give a 10.5% discount","type":"number"}}},"ExpenseAttachmentUploadResult":{"description":"Result of uploading an expense file attachment, containing the file details.","type":"object","properties":{"FileAttachments":{"description":"List of uploaded file attachment details.","type":"array","items":{"$ref":"#/definitions/FileAttachmentDetails"}}}},"FileAttachmentDetails":{"description":"Details of an uploaded file attachment including ID, size, filename, and public URL.","type":"object","properties":{"FileAttachmentID":{"format":"int64","description":"Unique identifier for the file attachment.","type":"integer"},"SizeBytes":{"format":"int64","description":"File size in bytes.","type":"integer"},"OriginalFilename":{"description":"Original filename as uploaded.","type":"string"},"PublicFileURL":{"description":"Public URL to access the uploaded file.","type":"string"},"PreviewBaseURL":{"description":"URL for a preview/thumbnail of the file.","type":"string"}}},"ExpenseList":{"description":"Paginated collection of expense entries.","type":"object","properties":{"Expenses":{"description":"The list of expense entries for the current page.","type":"array","items":{"$ref":"#/definitions/ExpenseDetails"}},"TotalCount":{"format":"int32","description":"Total number of expenses matching the filter criteria.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of results per page.","type":"integer"}}},"ExpenseDetails":{"description":"A detailed expense entry including user, project, category, amount, tax, approval status, and attachment.","type":"object","properties":{"ExpenseID":{"format":"int64","description":"Unique identifier for the expense entry.","type":"integer"},"UserIDFK":{"format":"int32","description":"The user ID who created/owns this expense.","type":"integer"},"Firstname":{"description":"First name of the expense user.","type":"string"},"Lastname":{"description":"Last name of the expense user.","type":"string"},"Email":{"description":"Email address of the expense user.","type":"string"},"CustomerIDFK":{"format":"int32","description":"The customer/company ID the expense is associated with.","type":"integer"},"CustomerName":{"description":"Name of the associated customer/company.","type":"string"},"ProjectIDFK":{"format":"int32","description":"The project ID the expense is linked to.","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"ProjectCode":{"description":"Short code of the associated project.","type":"string"},"TaskIDFK":{"format":"int32","description":"The task ID the expense is linked to.","type":"integer"},"TaskTitle":{"description":"Title of the associated task.","type":"string"},"ExpenseCategoryIDFK":{"format":"int32","description":"The expense category ID.","type":"integer"},"ExpenseCategoryName":{"description":"Name of the expense category.","type":"string"},"ExpenseCategoryHasUnitPrice":{"description":"Whether the expense category has a predefined unit price (e.g. mileage rate).","type":"boolean"},"ExpenseCategoryUnitPrice":{"format":"double","description":"The unit price for the expense category, if applicable.","type":"number"},"ExpenseCategoryUnitName":{"description":"The unit label (e.g. 'miles', 'km') for unit-priced categories.","type":"string"},"CurrencyCode":{"description":"ISO 3-character currency code for the expense.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate from expense currency to account base currency.","type":"number"},"Quantity":{"format":"double","description":"Quantity for unit-priced expenses (e.g. number of miles).","type":"number"},"Amount":{"format":"double","description":"The expense amount in the expense currency.","type":"number"},"TaxAmount":{"format":"double","description":"Calculated tax amount on the expense.","type":"number"},"TaxIDFK":{"format":"int32","description":"The tax rate ID applied to this expense.","type":"integer"},"TaxName":{"description":"Name of the applied tax rate.","type":"string"},"TransactionTaxConfigCode":{"description":"Tax configuration: 'EX' (exclusive) or 'INC' (inclusive).","type":"string"},"TransactionTaxConfigName":{"description":"Display name for the tax configuration.","type":"string"},"isOfficialExchangeRate":{"description":"Whether the exchange rate is from an official/market source.","type":"boolean"},"ExpenseApprovalStatusCode":{"description":"Approval status. Values: Draft, Pending, Approved, AutoApproved, Rejected, Verified.","type":"string"},"ExpensePaymentMethodIDFK":{"format":"int32","description":"The payment method ID used for this expense.","type":"integer"},"ExpensePaymentMethodName":{"description":"Name of the payment method.","type":"string"},"isChargeable":{"description":"Whether the expense is billable to the customer.","type":"boolean"},"ChargeableStatusCode":{"description":"Detailed chargeable status code.","type":"string"},"isReimbursable":{"description":"Whether the expense is reimbursable to the employee.","type":"boolean"},"ExpenseReimbursementStatusCode":{"description":"Reimbursement processing status.","type":"string"},"ExpenseReimbursementIDFK":{"format":"int64","description":"The reimbursement batch ID this expense belongs to, if reimbursed.","type":"integer"},"ExpenseDate":{"format":"date-time","description":"The date the expense was incurred.","type":"string"},"FileAttachmentIDFK":{"format":"int64","description":"ID of the receipt/file attachment, if any.","type":"integer"},"AttachmentURL":{"description":"Public URL of the expense receipt attachment.","type":"string"},"AttachmentPreviewURL":{"description":"URL for a preview/thumbnail of the expense attachment.","type":"string"},"Merchant":{"description":"Name of the merchant/vendor.","type":"string"},"MerchantTaxNumber":{"description":"Tax registration number of the merchant.","type":"string"},"Notes":{"description":"Additional notes on the expense.","type":"string"},"ExpenseReportIDFK":{"format":"int64","description":"ID of the expense report/group this expense belongs to.","type":"integer"},"ExpenseReportName":{"description":"Name of the expense report/group.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the expense record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the expense record was last updated.","type":"string"},"ViewExpenseURL":{"description":"Url to view the Expense in Avaza","type":"string"}}},"NewExpense":{"description":"Request model for creating a new expense entry. Requires expense date, amount, and category.","type":"object","properties":{"ExpenseDate":{"format":"date-time","description":"The date of the expense entry (Required)","type":"string"},"UserIDFK":{"format":"int32","description":"UserID for a Timesheet/Expense user in Avaza. If not provided, UserEmail field must be provided","type":"integer"},"UserEmail":{"description":"The email address of a Timesheet/Expense user in Avaza. If not provided, UserIDFK field must be provided.","type":"string"},"ExpenseCategoryIDFK":{"format":"int32","description":"The expense category to link the Expense to. If not provided, ExpenseCategoryName must be provided","type":"integer"},"ExpenseCategoryName":{"description":"Must match an existing expense category name otherwise a new category will be created. If left blank Expense Category ID must be provided.","type":"string"},"isChargeable":{"description":"aka Billable. Defaults to false if not provided. If set to true, a CustomerIDFK or CustomerName must be provided.","type":"boolean"},"isReimbursable":{"description":"Defaults to false if not provided.","type":"boolean"},"Quantity":{"format":"double","description":"Conditional - available for expenses that are assigned a unit priced based expense category. e.g Mileage","type":"number"},"CustomerIDFK":{"format":"int32","description":"The Avaza Customer ID to associate the Expense with. Either this field or CustomerName can be provided.","type":"integer"},"CustomerName":{"description":"The name of an existing customer in Avaza. Must be an exact (case insensitive) match.","type":"string"},"ProjectIDFK":{"format":"int32","description":"The Avaza project ID to associate the Expense with.","type":"integer"},"ProjectName":{"description":"Can work for matching an expense to a project, but only if it's an exact match for a single project under the customer.","type":"string"},"TaskIDFK":{"format":"int32","description":"(optional) TaskID of a Task to link the new Expense to. A Customer and Project must be provided also.","type":"integer"},"CurrencyCode":{"description":"A 3-letter ISO CurrencyCode for the expense currency. (e.g. USD). If not provided, defaults to the Account base currency.","type":"string"},"ExchangeRate":{"format":"double","description":"Optional (Only relevant if the expense currency is different to your account currency. If not provided we will look up the market exchange rate for you based on the expense date.) Exchange Rate = Expense Currency Amount / Base Currency Amount (e.g. if Expense currency is in AUD, and Base Currency is in USD, Exchange Rate = AUD $140 / USD $100 = 1.4)","type":"number"},"Amount":{"format":"double","description":"Expense Amount (Required). Must be &gt;= 0","type":"number"},"TaxIDFK":{"format":"int32","description":"Avaza Tax ID the expense belongs to. If left blank then Tax Name must be provided.","type":"integer"},"TaxName":{"description":"Must exactly match an existing Tax Name that you have configured in Avaza Tax settings. If left blank then Tax ID must be provided.","type":"string"},"TransactionTaxConfigCode":{"description":"Optional - Enter \"INC\" if the tax amount is included in the expense amount otherwise enter \"EX\" when the amount exlcudes the tax. Defaults to \"Ex\". The tax amount on the expense will be autocalculated.","type":"string"},"GroupTripName":{"description":"Links the expense to a Grouping/Trip report. If no matching name found, creates a new Group/Trip Report name.","type":"string"},"ExpensePaymentMethodIDFK":{"format":"int32","description":"(Optional) ID of Expense Payment Method.","type":"integer"},"Merchant":{"description":"The name of the merchant.","type":"string"},"MerchantTaxNumber":{"description":"A Tax number identifier for the merchant.","type":"string"},"Notes":{"description":"Expense Notes","type":"string"},"VerifyAndSave":{"description":"Pass false if creating a draft expense. True otherwise.","type":"boolean"},"FileAttachmentIDs":{"description":"Array of File Attachment IDs to associate with this expense. The files need to have already been uploaded. Currently only accepts a single file.","type":"array","items":{"format":"int64","type":"integer"}},"SendWebhooks":{"description":"If true, fires the expense_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ExpenseDeleteResultSet":{"description":"Collection of deletion results for a batch expense delete operation.","type":"object","properties":{"Results":{"description":"List of individual deletion results, one per requested Expense ID.","type":"array","items":{"$ref":"#/definitions/ExpenseDeleteResult"}}}},"ExpenseDeleteResult":{"description":"Result of deleting a single expense, indicating success or the error encountered.","type":"object","properties":{"ExpenseID":{"format":"int64","description":"The Expense ID for this deletion result.","type":"integer"},"Success":{"description":"Whether the deletion was successful.","type":"boolean"},"ErrorMessage":{"description":"Error message if the deletion failed, otherwise null.","type":"string"}}},"UpdateExpense":{"description":"Request model for updating an existing expense entry. Only fields in FieldsToUpdate are modified.","required":["ExpenseID","FieldsToUpdate"],"type":"object","properties":{"ExpenseID":{"format":"int64","description":"The ID of the expense to update (required).","type":"integer"},"FieldsToUpdate":{"description":"Array of field names to update. Only listed fields will be modified.","type":"array","items":{"type":"string"}},"ExpenseDate":{"format":"date-time","description":"The date of the expense entry","type":"string"},"ExpenseCategoryIDFK":{"format":"int32","description":"The expense category to link the Expense to.","type":"integer"},"isChargeable":{"description":"aka Billable. Defaults to false if not provided. If set to true, a CustomerIDFK or CustomerName must be provided.","type":"boolean"},"isReimbursable":{"description":"Defaults to false if not provided.","type":"boolean"},"Quantity":{"format":"double","description":"Conditional - available for expenses that are assigned a unit priced based expense category. e.g Mileage","type":"number"},"CustomerIDFK":{"format":"int32","description":"The Avaza Customer ID to associate the Expense with.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The Avaza project ID to associate the Expense with.","type":"integer"},"TaskIDFK":{"format":"int32","description":"(optional) TaskID of a Task to link the new Expense to. A Customer and Project must be provided also.","type":"integer"},"CurrencyCode":{"description":"A 3-letter ISO CurrencyCode for the expense currency. (e.g. USD). If not provided, defaults to the Account base currency.","type":"string"},"ExchangeRate":{"format":"double","description":"Optional (Only relevant if the expense currency is different to your account currency. If not provided we will look up the market exchange rate for you based on the expense date.) Exchange Rate = Expense Currency Amount / Base Currency Amount (e.g. if Expense currency is in AUD, and Base Currency is in USD, Exchange Rate = AUD $140 / USD $100 = 1.4)","type":"number"},"Amount":{"format":"double","description":"Expense Amount (Required). Must be &gt;= 0","type":"number"},"TaxIDFK":{"format":"int32","description":"Avaza Tax ID the expense belongs to.","type":"integer"},"TransactionTaxConfigCode":{"description":"Optional - Enter \"INC\" if the tax amount is included in the expense amount otherwise enter \"EX\" when the amount exlcudes the tax. Defaults to \"Ex\". The tax amount on the expense will be autocalculated.","type":"string"},"GroupTripName":{"description":"Links the expense to a Grouping/Trip report. If no matching name found, creates a new Group/Trip Report name.","type":"string"},"ExpensePaymentMethodIDFK":{"format":"int32","description":"(Optional) ID of Expense Payment Method.","type":"integer"},"Merchant":{"description":"The name of the merchant.","type":"string"},"MerchantTaxNumber":{"description":"A Tax number identifier for the merchant.","type":"string"},"Notes":{"description":"Expense Notes","type":"string"},"VerifyAndSave":{"description":"Pass false if creating a draft expense. True otherwise.","type":"boolean"},"FileAttachmentIDs":{"description":"Array of File Attachment IDs to associate with this expense. The files need to have already been uploaded. Currently only accepts a single file.","type":"array","items":{"format":"int64","type":"integer"}},"SendWebhooks":{"description":"If true, fires the expense_updated webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ExpenseCategoryList":{"description":"Collection of expense categories configured in the account.","type":"object","properties":{"Categories":{"description":"List of expense categories.","type":"array","items":{"$ref":"#/definitions/ExpenseCategoryDetails"}}}},"ExpenseCategoryDetails":{"description":"An expense category with unit price configuration for per-unit expense tracking (e.g. mileage).","type":"object","properties":{"ExpenseCategoryID":{"format":"int32","description":"Unique identifier for the expense category.","type":"integer"},"Name":{"description":"Name of the expense category.","type":"string"},"Enabled":{"description":"Whether this category is currently active and available for use.","type":"boolean"},"hasUnitPrice":{"description":"Whether this category uses unit pricing (e.g. mileage rate per km/mile).","type":"boolean"},"UnitPrice":{"format":"double","description":"The predefined price per unit, if hasUnitPrice is true.","type":"number"},"UnitName":{"description":"The unit label (e.g. 'mile', 'km'), if hasUnitPrice is true.","type":"string"}}},"ExpenseGroupDropdownList":{"description":"Paginated list of expense group/trip names for dropdown/autocomplete use.","type":"object","properties":{"ExpenseGroups":{"description":"List of expense group records.","type":"array","items":{"$ref":"#/definitions/ExpenseGroupMinimal"}},"TotalCount":{"format":"int32","description":"Total number of expense groups matching the filter.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of results per page.","type":"integer"}}},"ExpenseGroupMinimal":{"description":"A minimal expense group record containing only the Group ID and name.","type":"object","properties":{"ExpenseGroupID":{"format":"int64","description":"Unique identifier for the expense group.","type":"integer"},"Name":{"description":"Name of the expense group/trip.","type":"string"}}},"ExpenseMerchantDropdownList":{"description":"Paginated list of expense merchant names for dropdown/autocomplete use.","type":"object","properties":{"ExpenseMerchants":{"description":"List of expense merchant records.","type":"array","items":{"$ref":"#/definitions/ExpenseMerchantMinimal"}},"TotalCount":{"format":"int32","description":"Total number of distinct merchants matching the filter.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of results per page.","type":"integer"}}},"ExpenseMerchantMinimal":{"description":"A minimal expense merchant record containing only the merchant name.","type":"object","properties":{"MerchantName":{"description":"The merchant/vendor name.","type":"string"}}},"ExpensePaymentMethodDropdownList":{"description":"Collection of expense payment methods configured in the account.","type":"object","properties":{"ExpensePaymentMethods":{"description":"List of expense payment methods.","type":"array","items":{"$ref":"#/definitions/ExpensePaymentMethodMinimal"}}}},"ExpensePaymentMethodMinimal":{"description":"A minimal expense payment method record with ID and name.","type":"object","properties":{"ExpensePaymentMethodID":{"format":"int64","description":"Unique identifier for the expense payment method.","type":"integer"},"Name":{"description":"Name of the expense payment method.","type":"string"}}},"ExpenseSummaryRequest":{"description":"Request parameters for generating aggregated expense statistics with optional multi-level grouping.","type":"object","properties":{"GroupBy":{"description":"(Optional) Combine one, two or three levels of Grouping. Combine these possible grouping values: \"Category\", \"ChargeableStatus\", \"Merchant\", \"ApprovalStatus\", \"ReimbursementStatus\", \"Customer\", \"Project\", \"User\", \"Task\", \"Year\", \"Month\", \"Day\", \"Week\".","type":"array","items":{"type":"string"}},"ExpenseDateFrom":{"format":"date-time","description":"(Required) Filter for expenses with expense dates greater or equal to the specified date. e.g. 2019-01-25.","type":"string"},"ExpenseDateTo":{"format":"date-time","description":"(Required) Filter for expenses with an expense date smaller or equal to the specified  date. e.g. 2019-01-25.","type":"string"},"UserID":{"description":"(Optional) Defaults to the current user. Provide one or more UserIDs of Users whose expenses should be retrieved. If the current user doesn't have impersonation rights, then they will only see their own data.","type":"array","items":{"format":"int32","type":"integer"}},"ProjectID":{"format":"int32","description":"(Optional) Filter by Project","type":"integer"}}},"ExpenseSummaryResult":{"description":"Aggregated expense statistics for a date range, including total amounts and grouped sub-totals.","type":"object","properties":{"ExpenseDateFrom":{"format":"date-time","description":"Start date for the summary period.","type":"string"},"ExpenseDateTo":{"format":"date-time","description":"End date for the summary period.","type":"string"},"TotalAmount":{"format":"double","description":"Total expense amount for the period.","type":"number"},"UserID":{"description":"Optional user ID(s) the summary is filtered by.","type":"array","items":{"format":"int32","type":"integer"}},"GroupingLevels":{"description":"The grouping dimensions applied to the summary data.","type":"array","items":{"type":"string"}},"GroupData":{"description":"Grouped summary data, nested by grouping levels.","type":"array","items":{"$ref":"#/definitions/ExpenseSummaryGroup"}}}},"ExpenseSummaryGroup":{"description":"A group within aggregated expense data, representing totals for one grouping dimension (e.g. a specific category or project).","type":"object","properties":{"GroupID":{"description":"Identifier for this group (e.g. project ID, user ID, month number).","type":"string"},"GroupName":{"description":"Display name for this group (e.g. project name, user name, month name).","type":"string"},"TotalAmount":{"format":"double","description":"Total expense amount for this group.","type":"number"},"GroupData":{"description":"Nested group data for the next grouping level, if applicable.","type":"array","items":{"$ref":"#/definitions/ExpenseSummaryGroup"}}}},"FileAttachmentUploadResult":{"description":"Response from the /api/FileAttachment* endpoints. Mirrors the shape of /api/Expense/Attachment with an optional LinkedTo echo when an inline link was requested.","type":"object","properties":{"FileAttachments":{"description":"List of uploaded file attachment details.","type":"array","items":{"$ref":"#/definitions/FileAttachmentDetails"}},"LinkedTo":{"$ref":"#/definitions/FileAttachmentLinkTarget","description":"The entity the uploaded file was linked to in the same call. Null when the upload was unlinked (Draft)."}}},"FileAttachmentLinkTarget":{"description":"Identifies an entity to inline-link an uploaded attachment to. Supported entityType values: \"Task\", \"Expense\", \"Estimate\", \"Invoice\".","type":"object","properties":{"EntityType":{"description":"Entity kind. One of: \"Task\", \"Expense\", \"Estimate\", \"Invoice\".","type":"string"},"EntityId":{"format":"int64","description":"The target entity's primary key.","type":"integer"}}},"FileAttachmentBase64Request":{"description":"JSON body for POST /api/FileAttachment/Base64. Provide the file as base64-encoded bytes plus its filename.","type":"object","properties":{"Filename":{"description":"Original filename including extension. Required.","type":"string"},"ContentType":{"description":"Optional MIME type. Inferred from extension if omitted.","type":"string"},"Base64Data":{"description":"Base64-encoded file content. Required.","type":"string"},"LinkTo":{"$ref":"#/definitions/FileAttachmentLinkTarget","description":"Optional inline link target. Omit to upload as Draft."}}},"FileAttachmentSourceUrlRequest":{"description":"JSON body for POST /api/FileAttachment/FromUrl. Server fetches the file from the supplied https URL.","type":"object","properties":{"SourceUrl":{"description":"Public https URL the server will fetch to obtain the file. Required.","type":"string"},"Filename":{"description":"Optional original filename. If omitted, derived from Content-Disposition or the URL path.","type":"string"},"ContentType":{"description":"Optional MIME type. Falls back to the response Content-Type header.","type":"string"},"LinkTo":{"$ref":"#/definitions/FileAttachmentLinkTarget","description":"Optional inline link target. Omit to upload as Draft."}}},"FixedAmountList":{"description":"Paginated collection of fixed-amount billing entries.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"FixedAmounts":{"description":"The list of fixed-amount entries for this page.","type":"array","items":{"$ref":"#/definitions/FixedAmountDetails"}}}},"FixedAmountDetails":{"description":"A fixed-amount billing entry for fixed-price project invoicing, linked to a project, task, and inventory item.","type":"object","properties":{"FixedAmountID":{"format":"int32","description":"Unique identifier for the fixed amount entry.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project this fixed amount is linked to.","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"ProjectCode":{"description":"Short code of the associated project.","type":"string"},"TaskIDFK":{"format":"int32","description":"The task this fixed amount is linked to, if any.","type":"integer"},"TaskTitle":{"description":"Title of the associated task.","type":"string"},"InventoryItemIDFK":{"format":"int64","description":"The inventory item used for this fixed amount.","type":"integer"},"InventoryItemName":{"description":"Name of the inventory item.","type":"string"},"Amount":{"format":"double","description":"The fixed billing amount.","type":"number"},"Notes":{"description":"Additional notes on the fixed amount.","type":"string"},"isInvoiced":{"description":"Whether this fixed amount has been included on an invoice.","type":"boolean"},"DateCreated":{"format":"date-time","description":"Date the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date the record was last updated.","type":"string"},"UpdatedByUserIDFK":{"format":"int32","description":"User ID of the last person to update this record.","type":"integer"}}},"InventoryList":{"description":"Paginated collection of inventory/product items.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"Inventory":{"description":"The list of inventory items for this page.","type":"array","items":{"$ref":"#/definitions/InventoryItem"}}}},"InventoryItem":{"description":"An inventory/product item used on invoices, bills, and estimates, with cost price, sale price, and tax defaults.","type":"object","properties":{"InventoryItemID":{"format":"int64","description":"Unique identifier for the inventory/product item.","type":"integer"},"Name":{"description":"Name of the inventory item.","type":"string"},"Description":{"description":"Detailed description of the item.","type":"string"},"SKU":{"description":"Stock Keeping Unit code.","type":"string"},"CostPrice":{"format":"double","description":"The cost/purchase price of the item.","type":"number"},"SalePrice":{"format":"double","description":"The default sale price of the item.","type":"number"},"SaleTaxIDFK":{"format":"int32","description":"The default tax rate ID applied when selling this item.","type":"integer"},"isHidden":{"description":"Whether this item is hidden from selection in the UI.","type":"boolean"},"DateCreated":{"format":"date-time","description":"Date the item was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date the item was last updated.","type":"string"}}},"InvoiceList":{"description":"Paginated collection of customer invoices.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"Invoices":{"description":"The list of invoices on this page.","type":"array","items":{"$ref":"#/definitions/Invoice"}}}},"Invoice":{"description":"A customer invoice including line items, status, amounts, issuer/recipient details, and web links.","type":"object","properties":{"TransactionID":{"format":"int64","description":"Unique identifier for the invoice transaction.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this invoice belongs to.","type":"integer"},"TransactionPrefix":{"description":"Prefix used in the invoice number (e.g. 'INV').","type":"string"},"InvoiceNumber":{"description":"The full invoice number including prefix.","type":"string"},"CompanyIDFK":{"format":"int32","description":"The customer company ID this invoice is for.","type":"integer"},"CompanyName":{"description":"Name of the customer company.","type":"string"},"ExternalContactUserIDFK":{"format":"int32","description":"The external contact user ID associated with this invoice.","type":"integer"},"Subject":{"description":"Subject line for the invoice.","type":"string"},"DateIssued":{"format":"date-time","description":"Date the invoice was issued.","type":"string"},"DateSent":{"format":"date-time","description":"Date the invoice was sent to the customer.","type":"string"},"DueDate":{"format":"date-time","description":"Payment due date.","type":"string"},"TransactionStatusCode":{"description":"Current status. Values: Draft, Sent, Late, Paid, Partial, Void.","type":"string"},"TaxAmount":{"format":"double","description":"Total tax amount across all line items.","type":"number"},"TransactionTaxConfigCode":{"description":"Tax configuration: 'EX' (exclusive) or 'INC' (inclusive).","type":"string"},"Balance":{"format":"double","description":"Outstanding balance remaining on the invoice.","type":"number"},"CurrencyCode":{"description":"ISO 3-character currency code for the invoice.","type":"string"},"TotalAmount":{"format":"double","description":"Total amount of the invoice including tax.","type":"number"},"ExchangeRate":{"format":"double","description":"Exchange rate to the account's base currency. 1.0 if same currency.","type":"number"},"Notes":{"description":"Additional notes or comments on the invoice.","type":"string"},"CustomerPONumber":{"description":"Customer's purchase order number for reference.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"LineItems":{"description":"Line items on this invoice.","type":"array","items":{"$ref":"#/definitions/InvoiceLineItem"}},"Links":{"$ref":"#/definitions/InvoiceLinks","description":"URLs for viewing and editing the invoice in the Avaza web application."},"Issuer":{"$ref":"#/definitions/IssuerDetails","description":"Billing address and tax details for the Avaza account issuing this invoice."},"Recipient":{"$ref":"#/definitions/RecipientDetails","description":"Billing address details for the customer receiving this invoice."}}},"InvoiceLineItem":{"description":"A line item on an invoice, specifying the inventory item, quantity, unit price, tax, project, and calculated amount.","type":"object","properties":{"TransactionLineItemID":{"format":"int64","description":"Unique identifier for the line item.","type":"integer"},"InventoryItemIDFK":{"format":"int64","description":"The inventory/product item ID for this line item.","type":"integer"},"InventoryItemName":{"description":"Name of the inventory/product item.","type":"string"},"InventoryItemSKU":{"description":"Stock Keeping Unit code for the inventory item.","type":"string"},"Description":{"description":"Text description for the line item.","type":"string"},"Quantity":{"format":"double","description":"Quantity of items on this line.","type":"number"},"UnitPrice":{"format":"double","description":"Price per unit for this line item.","type":"number"},"TaxAmount":{"format":"double","description":"Calculated tax amount on this line item.","type":"number"},"TaxIDFK":{"format":"int32","description":"The tax rate ID applied to this line item.","type":"integer"},"TaxCode":{"description":"Short code for the applied tax rate.","type":"string"},"TaxName":{"description":"Name of the applied tax rate.","type":"string"},"ProjectIDFK":{"format":"int32","description":"Optional project ID this line item is attributed to for reporting.","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"Amount":{"format":"double","description":"Calculated line total (Quantity x UnitPrice less Discount).","type":"number"},"Discount":{"format":"double","description":"Discount percentage applied to this line item.","type":"number"}}},"InvoiceLinks":{"description":"URLs for client-facing view, internal view, and editing an invoice in the Avaza web application.","type":"object","properties":{"ClientView":{"description":"URL for the customer to view and pay the invoice online.","type":"string"},"View":{"description":"URL for viewing the invoice in the Avaza application.","type":"string"},"Edit":{"description":"URL for editing the invoice in the Avaza application.","type":"string"}}},"NewInvoice":{"description":"Request model for creating a new customer invoice. Supports automatic company/contact creation.","type":"object","properties":{"TransactionPrefix":{"description":"A prefix for the Invoice number. e.g. 'INV'. If left blank it will be set to the account default. Max length 20 characters.","type":"string"},"InvoiceNumber":{"description":"Pass any string. If left blank it will use the next number in the auto incrementing sequence. If an integer is passed then the largest integer will be use as the seed to auto generate the next invoice number in the sequence.","type":"string"},"CompanyIDFK":{"format":"int32","description":"If left blank then you must specify Company Name.","type":"integer"},"CompanyName":{"description":"If left blank then you must specify Company ID. Specified Name will be used to match existing customer record. If not matched then it will be used to create a new customer. First Name, Last Name and Email will only be used if it is a new company. If the Company name appears multiple times we will check the email address to find a matching company. If email address doesn't identify a matching company then the invoice creation will be rejected.","type":"string"},"Firstname":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"Lastname":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"Email":{"description":"Specified value will be used to create a new customer contact only if a new customer is being created.","type":"string"},"CurrencyCode":{"description":"Expects ISO Standard 3 character currency code. If left blank the currency will default to account's currency in general setting. For existing companies this field will be ignored and the invoice will use the currency of the customer. For new customers if the currency is not specified then account currency will be used otherwise the specified currency will be used.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate is only valid for invoices in currency other than default account currency. If not specified it will get the market rate based on the Date Issued.","type":"number"},"InvoiceTemplateIDFK":{"format":"int32","description":"If left blank the account default invoice template will be used.","type":"integer"},"Subject":{"description":"Plain UTF8 text. (no HTML). 255 characters max","type":"string"},"CustomerPONumber":{"description":"Plain UTF8 text. 100 characters max","type":"string"},"DateIssued":{"format":"date-time","description":"If not specified it will use today's date. The date should be specified as local date.","type":"string"},"PaymentTerms":{"format":"int32","description":" \"If left blank we will set it to customer default. If specified then it must match one of your existing pre configured payment term periods. Your account starts with:\r\n(-1 --- Custom, 0 --- Upon Receipt, 7 --- 7 Days, 15 --- 15 Days, 30 --- 30 Days, 45 --- 45 Days, 60 --- 60 Days)","type":"integer"},"DueDate":{"format":"date-time","description":"It will be auto calculated based on the payment term and issue date. Due Date must be greater than or equal to Issue Date. If the Due Date is specified then Payment Terms will be set to -1 (Custom)","type":"string"},"TransactionTaxConfigCode":{"description":"Possible values are (EX --- Tax Exclusive, INC --- Tax Inclusive). If left empty it will use the account default.","type":"string"},"Notes":{"description":"Plain UTF8 text. (no HTML). Max 2000 characters","type":"string"},"LineItems":{"type":"array","items":{"$ref":"#/definitions/NewInvoiceLineItem"}},"SendWebhooks":{"description":"If true, fires the invoice_created webhook event to any subscribed endpoints (and timesheet_updated for any timesheets pulled into the invoice). Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"NewInvoiceLineItem":{"description":"A line item to be included on a new invoice.","required":["Quantity","UnitPrice"],"type":"object","properties":{"InventoryItemIDFK":{"format":"int32","description":"If not specified then Inventory Item Name must be specified.","type":"integer"},"InventoryItemName":{"description":"If not specified then Inventory item ID must be specified. If specified and not matched to any existing inventory items then a new inventory item will be created. Max 200 characters.","type":"string"},"Description":{"description":"Plain UTF8 text. (no HTML)","type":"string"},"Quantity":{"format":"double","description":"The quantity for the line item","type":"number"},"UnitPrice":{"format":"double","description":"The unit price for the lineitem.","type":"number"},"TaxIDFK":{"format":"int32","description":"If specified then it must match an existing Tax ID. If not specified then Tax Name and Tax Percent must be specified.","type":"integer"},"TaxName":{"description":"Must be specified if the Tax ID is blank. If the Tax Name is specified it will be matched to an existing Tax Name or else a new Tax will be created.","type":"string"},"TaxPercent":{"format":"double","description":"The Tax Percent will only be used if a new tax is being created.","type":"number"},"Discount":{"format":"double","description":"Enter 10.5 to give a 10.5% discount","type":"number"},"ProjectIDFK":{"format":"int32","description":"Optional. Project ID of an Avaza Project that belongs to this customer, so line item is attributed to that Project for reporting.","type":"integer"}}},"UpdatedInvoice":{"description":"Request model for updating an existing invoice. Only fields in FieldsToUpdate are modified. When LineItems is included, existing lines not in the array are deleted.","required":["FieldsToUpdate","TransactionID"],"type":"object","properties":{"FieldsToUpdate":{"description":"Required: The collection of Field Names you wish to update. Possible Values: CustomerPONumber, DateIssued, PaymentTerms, DueDate, Subject, Notes, TransactionTaxConfigCode, ExchangeRate, InvoiceTemplateIDFK, InvoiceNumber, LineItems","type":"array","items":{"type":"string"}},"TransactionID":{"format":"int64","description":"The ID of the Invoice to update","type":"integer"},"CustomerPONumber":{"description":"Plain UTF8 text. 100 characters max","type":"string"},"DateIssued":{"format":"date-time","description":"The Date the Invoice is issued. Date should be specified as local date.","type":"string"},"PaymentTerms":{"format":"int32","type":"integer"},"DueDate":{"format":"date-time","description":"If the Due Date is specified then Payment Terms will be set to -1 (Custom). Otherwise DueDate will be auto calculated based on the provided IssueDate and Payment Term. Due Date must be greater than or equal to Issue Date.","type":"string"},"Subject":{"description":"Invoice Subject in plain UTF8 text. (no HTML). 255 characters max","type":"string"},"Notes":{"description":"Invoice Notes in plain UTF8 text. (no HTML). Max 2000 characters","type":"string"},"TransactionTaxConfigCode":{"description":"Possible values are (EX --- Tax Exclusive, INC --- Tax Inclusive). If left set to null/emptystring it will use the account default.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate is only valid for invoices in currency other than default account currency. If not specified it will get the market rate based on the Date Issued.","type":"number"},"InvoiceTemplateIDFK":{"format":"int32","description":"And id for an invoice template in the account. If set to Null the account default invoice template will be used.","type":"integer"},"InvoiceNumber":{"description":"Pass a string or integer. If an integer is passed then the largest integer will be use as the seed to auto generate the next invoice number in the sequence.","type":"string"},"LineItems":{"type":"array","items":{"$ref":"#/definitions/UpdatedInvoiceLineItem"}},"SendWebhooks":{"description":"If true, fires the invoice_updated webhook event to any subscribed endpoints (and timesheet_updated for any timesheet rows whose invoice link changed). Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"UpdatedInvoiceLineItem":{"description":"A line item to be included when updating an invoice.","required":["InventoryItemIDFK","Quantity","UnitPrice"],"type":"object","properties":{"TransactionLineItemID":{"format":"int64","description":"Optional ID of exisiting TransactionLineItem that should be retained and updated","type":"integer"},"InventoryItemIDFK":{"format":"int64","description":"The ID of the InventoryItem this line item is linked to","type":"integer"},"Description":{"description":"Plain UTF8 text. (no HTML)","type":"string"},"Quantity":{"format":"double","description":"The quantity for the line item","type":"number"},"UnitPrice":{"format":"double","description":"The unit price for the lineitem.","type":"number"},"TaxIDFK":{"format":"int32","description":"Must match an existing Tax ID.","type":"integer"},"Discount":{"format":"double","description":"Enter 10.5 to give a 10.5% discount","type":"number"},"ProjectIDFK":{"format":"int32","description":"Optional. Project ID of an Avaza Project that belongs to this customer, so line item is attributed to that Project for reporting.","type":"integer"}}},"PaymentList":{"description":"Paginated collection of customer payments.","type":"object","properties":{"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"Payments":{"description":"The list of payments on this page.","type":"array","items":{"$ref":"#/definitions/Payment"}}}},"Payment":{"description":"A customer payment including allocations to specific invoices.","type":"object","properties":{"TransactionID":{"format":"int64","description":"Unique identifier for the payment transaction.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this payment belongs to.","type":"integer"},"TransactionPrefix":{"description":"The prefix used in the payment number.","type":"string"},"PaymentNumber":{"description":"The full payment number including prefix.","type":"string"},"TransactionReference":{"description":"External reference number (e.g. cheque number or bank reference).","type":"string"},"CustomerIDFK":{"format":"int32","description":"The customer company ID this payment is from.","type":"integer"},"DateIssued":{"format":"date-time","description":"The date the payment was made.","type":"string"},"TransactionStatusCode":{"description":"Current status of the payment.","type":"string"},"PaymentProviderCode":{"description":"Code identifying the payment provider/method used.","type":"string"},"ExchangeRate":{"format":"double","description":"Exchange rate to the account's base currency.","type":"number"},"Balance":{"format":"double","description":"Unallocated balance remaining on the payment.","type":"number"},"CurrencyCode":{"description":"ISO 3-character currency code for the payment.","type":"string"},"TotalAmount":{"format":"double","description":"Total payment amount.","type":"number"},"Notes":{"description":"Additional notes on the payment.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"PaymentAllocations":{"description":"List of allocations applying this payment against specific invoices.","type":"array","items":{"$ref":"#/definitions/PaymentAllocation"}},"ViewPaymentURL":{"description":"URL to view this payment in the Avaza web application.","type":"string"}}},"PaymentAllocation":{"description":"An allocation record linking a customer payment to a specific invoice.","type":"object","properties":{"TransactionAllocationID":{"format":"int64","description":"Unique identifier for this payment allocation.","type":"integer"},"InvoiceTransactionIDFK":{"format":"int64","description":"The invoice Transaction ID this payment is allocated against.","type":"integer"},"PaymentTransactionIDFK":{"format":"int64","description":"The payment Transaction ID this allocation belongs to.","type":"integer"},"AllocationDate":{"format":"date-time","description":"The date this allocation was applied.","type":"string"},"AllocationAmount":{"format":"double","description":"The amount allocated from the payment to the invoice.","type":"number"}}},"NewPayment":{"description":"Request model for creating a new customer payment. Optionally include allocations to invoices.","type":"object","properties":{"Amount":{"format":"double","description":"Total amount of the payment.","type":"number"},"PaymentNumber":{"description":"Optional. If not specified will be automatically generated","type":"string"},"DateIssued":{"format":"date-time","description":"Date of Payment. If not specified, assumes today.","type":"string"},"TransactionPrefix":{"description":"Optional to override the default prefix added to Payment Numbers","type":"string"},"CustomerIDFK":{"format":"int32","description":"Only required if no invoice allocations specified.","type":"integer"},"ExchangeRate":{"format":"double","description":"Optional. Only used when the Customer's currecy is different from the Avaza account's base currency. Specifies the exchange rate that should apply between the customer currency and base currency. If not provided we will obtain an up to date exchange rate for the Payment Issue Date.","type":"number"},"TransactionReference":{"description":"Optional for storing the reference # of the payment method.","type":"string"},"Notes":{"type":"string"},"PaymentProviderCode":{"description":"Optional for storing the payment provider who was the source of funds.","type":"string"},"PaymentAllocations":{"description":"List of amounts within this payment that are allocated to invoices. The sum of these be less than or equal to the payment amount.","type":"array","items":{"$ref":"#/definitions/NewPaymentAllocation"}},"SendWebhooks":{"description":"If true, fires the invoice_updated webhook event for each invoice that was allocated against. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"NewPaymentAllocation":{"description":"An allocation entry for applying a customer payment to a specific invoice.","type":"object","properties":{"InvoiceTransactionIDFK":{"format":"int64","description":"The Avaza Invoice TransactionID that is having a payment amount allocated to it.","type":"integer"},"AllocationAmount":{"format":"double","description":"The Amount being allocated to the invoice. Expects same currency as invoice currency","type":"number"},"AllocationDate":{"format":"date-time","description":"Optional. Defaults to the current time in the Avaza account's timezone. The date the allocation is applied to the invoice. Can be difference from the Payment Date when doing prepayments etc.","type":"string"}}},"ProjectDropdownList":{"description":"Paginated list of active projects grouped by customer company, for dropdown/autocomplete use.","type":"object","properties":{"companies":{"description":"List of Projects grouped by Customer Name","type":"array","items":{"$ref":"#/definitions/ProjectCompanyGroup"}},"pageNumber":{"format":"int32","description":"Current page number (1 based)","type":"integer"},"PageSize":{"format":"int32","description":"Current page size","type":"integer"},"hasMore":{"description":"More records probably exist","type":"boolean"}}},"ProjectCompanyGroup":{"description":"A customer company and its associated projects, used in the project dropdown list.","type":"object","properties":{"CompanyID":{"format":"int64","description":"The customer company ID.","type":"integer"},"CompanyName":{"description":"Name of the customer company.","type":"string"},"projects":{"description":"Projects belonging to this company.","type":"array","items":{"$ref":"#/definitions/ProjectDropdownSelection"}}}},"ProjectDropdownSelection":{"description":"A minimal project record containing Project ID, project code, and title for dropdown selection.","type":"object","properties":{"ProjectID":{"format":"int64","description":"Unique identifier for the project.","type":"integer"},"ProjectCode":{"description":"Short reference code for the project.","type":"string"},"Title":{"description":"Project title/name.","type":"string"},"isTaskRequiredOnTimesheet":{"description":"Whether a task must be selected when logging a timesheet entry against this project.","type":"boolean"}}},"ProjectList":{"description":"Paginated collection of projects with summary details.","type":"object","properties":{"Projects":{"description":"List of projects in this page.","type":"array","items":{"$ref":"#/definitions/ProjectListDetails"}},"TotalCount":{"format":"int32","description":"Total number of projects matching the query.","type":"integer"},"PageNumber":{"format":"int32","description":"Current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page.","type":"integer"}}},"ProjectListDetails":{"description":"Summary details of a project including status, billing type, budget, category, and owner.","type":"object","properties":{"ProjectID":{"format":"int32","description":"Unique identifier for the project.","type":"integer"},"ProjectCode":{"description":"Short reference code for the project.","type":"string"},"Title":{"description":"Project title/name.","type":"string"},"isArchived":{"description":"Whether the project is archived. Archived projects are hidden from default views.","type":"boolean"},"Notes":{"description":"Project description or notes.","type":"string"},"CompanyName":{"description":"Name of the customer company this project belongs to.","type":"string"},"CompanyIDFK":{"format":"int32","description":"The customer company ID this project is linked to.","type":"integer"},"ProjectCategoryIDFK":{"format":"int64","description":"The project category ID, if categorised.","type":"integer"},"ProjectCategoryName":{"description":"Name of the project category.","type":"string"},"isTaskRequiredOnTimesheet":{"description":"Whether users must select a task when logging time to this project.","type":"boolean"},"DefaultAccountTaskTypeIDFK":{"format":"int32","description":"The default task type ID used for new tasks in this project.","type":"integer"},"DefaultAccountTaskTypeName":{"description":"Name of the default task type.","type":"string"},"ProjectOwnerUserIDFK":{"format":"int64","description":"User ID of the project owner/manager.","type":"integer"},"DateCreated":{"format":"date-time","description":"Date the project was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date the project was last updated.","type":"string"},"ProjectStatusCode":{"description":"Project status code. Per-account configurable. Default codes (NotStarted, InProgress, Complete, OnHold) are seeded for every account; admins may add custom codes via the Project Statuses settings panel. Codes are unique within an account and stable once created.","type":"string"},"ProjectStatusName":{"description":"Display name of the project status (e.g. \"In Progress\", \"At Risk\").","type":"string"},"ProjectStatusColor":{"description":"Hex colour assigned to the project status (e.g. \"#F0AD4E\").","type":"string"},"ProjectStatusIsNotStarted":{"description":"True if this is the account's default-for-new-projects status (one row per account).","type":"boolean"},"ProjectStatusIsComplete":{"description":"True if this status marks the project as complete (one row per account).","type":"boolean"},"ProjectBillableTypeCode":{"description":"Billing configuration. Values: CategoryHourly, NoRate, NotBillable, PersonHourly, ProjectHourly.","type":"string"},"ProjectBudgetTypeCode":{"description":"Budget configuration. Values: CategoryHours, NoBudget, PersonHours, ProjectFees, ProjectHours.","type":"string"},"BudgetAmount":{"format":"double","description":"Monetary budget allocated to the project.","type":"number"},"BudgetHours":{"format":"double","description":"Hours budget allocated to the project.","type":"number"},"ProjectHourlyRate":{"format":"double","description":"The project-level hourly rate (when billing type is ProjectHourly).","type":"number"},"StartDate":{"format":"date-time","description":"Planned start date for the project.","type":"string"},"EndDate":{"format":"date-time","description":"Planned end date for the project.","type":"string"},"ViewProjectURL":{"description":"URL to view this project in the Avaza web application.","type":"string"}}},"NewProjectModel":{"description":"Request model for creating a new project. Requires a project title and company association.","required":["ProjectTitle"],"type":"object","properties":{"CompanyIDFK":{"format":"int32","description":"An ID of a company in Avaza to create the Project under. You must provide either a CompanyID, or a CompanyName","type":"integer"},"CompanyName":{"description":"The name for a Company to create the project under. Will create company unless it matches an existing company name","type":"string"},"CurrencyCode":{"description":"The ISO 3 letter currency code to use when creating a new Company. If not provided, the account's default currency will be used.","type":"string"},"ProjectTitle":{"description":"The title of the new project. (255 characters max)","type":"string"},"ProjectCode":{"description":"Used when Manual Project Codes are enabled","type":"string"},"ProjectNotes":{"description":"Any descriptive notes about the project. (2000 characters max)","type":"string"},"TimesheetApprovalRequiredbyDefault":{"description":"Whether timesheet approval should be required by default for newly added project members.","type":"boolean"},"PopulateDefaultProjectMembers":{"description":"Defaults to true.","type":"boolean"},"isTaskRequiredOnTimesheet":{"description":"Whether users must select a task when logging time to this project.","type":"boolean"},"StartDate":{"format":"date-time","description":"Planned start date for the project.","type":"string"},"EndDate":{"format":"date-time","description":"Planned end date for the project.","type":"string"},"BudgetAmount":{"format":"double","description":"Monetary budget allocated to the project.","type":"number"},"BudgetHours":{"format":"double","description":"Hours budget allocated to the project.","type":"number"},"ProjectStatusCode":{"description":"Project status. Values: Active, Completed, Pending, Cancelled.","type":"string"},"ProjectCategoryIDFK":{"format":"int32","description":"The project category ID, if categorised.","type":"integer"},"SendWebhooks":{"description":"If true, fires the project_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ProjectDetails":{"description":"Full project details including sections, team members with rates/permissions, and project tags.","type":"object","properties":{"ProjectID":{"format":"int32","description":"Unique identifier for the project.","type":"integer"},"Title":{"description":"Project title/name.","type":"string"},"ProjectCode":{"description":"Short reference code for the project.","type":"string"},"Notes":{"description":"Project description or notes.","type":"string"},"CompanyName":{"description":"Name of the customer company this project belongs to.","type":"string"},"CompanyIDFK":{"format":"int32","description":"The customer company ID this project is linked to.","type":"integer"},"ProjectOwnerUserIDFK":{"format":"int32","description":"User ID of the project owner/manager.","type":"integer"},"ProjectStatusCode":{"description":"Project status code. Per-account configurable. Default codes (NotStarted, InProgress, Complete, OnHold) are seeded for every account; admins may add custom codes via the Project Statuses settings panel. Codes are unique within an account and stable once created.","type":"string"},"ProjectStatusName":{"description":"Display name of the project status (e.g. \"In Progress\", \"At Risk\").","type":"string"},"ProjectStatusColor":{"description":"Hex colour assigned to the project status (e.g. \"#F0AD4E\").","type":"string"},"ProjectStatusIsNotStarted":{"description":"True if this is the account's default-for-new-projects status (one row per account).","type":"boolean"},"ProjectStatusIsComplete":{"description":"True if this status marks the project as complete (one row per account).","type":"boolean"},"isArchived":{"description":"Whether the project is archived. Archived projects are hidden from default views.","type":"boolean"},"ProjectBillableTypeCode":{"description":"Possible values: CategoryHourly, NoRate, NotBillable, PersonHourly, ProjectHourly","type":"string"},"ProjectBudgetTypeCode":{"description":"Possible Values: CategoryHours, NoBudget, PersonHours, ProjectFees, ProjectHours","type":"string"},"BudgetAmount":{"format":"double","description":"Monetary budget allocated to the project.","type":"number"},"BudgetHours":{"format":"double","description":"Hours budget allocated to the project.","type":"number"},"ProjectHourlyRate":{"format":"double","description":"The project-level hourly rate (when billing type is ProjectHourly).","type":"number"},"ProjectCategoryIDFK":{"format":"int32","description":"The project category ID, if categorised.","type":"integer"},"ProjectCategoryName":{"description":"Name of the project category.","type":"string"},"isTaskRequiredOnTimesheet":{"description":"Whether users must select a task when logging time to this project.","type":"boolean"},"DefaultAccountTaskTypeIDFK":{"format":"int32","description":"The default task type ID used for new tasks in this project.","type":"integer"},"DefaultAccountTaskTypeName":{"description":"Name of the default task type.","type":"string"},"ProjectCategoryColor":{"description":"Html Hex Color Code starting with #","type":"string"},"StartDate":{"format":"date-time","description":"Planned start date for the project.","type":"string"},"EndDate":{"format":"date-time","description":"Planned end date for the project.","type":"string"},"Sections":{"description":"List of sections (task groups) within this project.","type":"array","items":{"$ref":"#/definitions/ProjectSectionDetails"}},"Members":{"description":"List of team members assigned to this project.","type":"array","items":{"$ref":"#/definitions/ProjectMemberDetails"}},"ProjectTags":{"description":"List of tags applied to this project.","type":"array","items":{"$ref":"#/definitions/ProjectTagItem"}},"DateCreated":{"format":"date-time","description":"Date the project was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date the project was last updated.","type":"string"},"ViewProjectURL":{"description":"URL to view this project in the Avaza web application.","type":"string"}}},"ProjectSectionDetails":{"description":"A section (task group) within a project, with title, date range, and display order.","type":"object","properties":{"SectionID":{"format":"int32","description":"Unique identifier for the section.","type":"integer"},"Title":{"description":"Section title/name.","type":"string"},"StartDate":{"format":"date-time","description":"Planned start date for the section.","type":"string"},"EndDate":{"format":"date-time","description":"Planned end date for the section.","type":"string"},"DisplayOrder":{"format":"int32","description":"Sort order position for display.","type":"integer"}}},"ProjectMemberDetails":{"description":"A project team member with their role permissions, rates, budget, and timesheet settings.","type":"object","properties":{"UserIDFK":{"format":"int32","description":"The user ID of the project member.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project this membership belongs to.","type":"integer"},"Firstname":{"description":"Member's first name.","type":"string"},"Lastname":{"description":"Member's last name.","type":"string"},"Fullname":{"description":"Member's full display name.","type":"string"},"Email":{"description":"Member's email address.","type":"string"},"CostAmount":{"format":"double","description":"Cost rate per hour for this member on this project.","type":"number"},"RateAmount":{"format":"double","description":"Bill rate per hour for this member on this project.","type":"number"},"BudgetAmount":{"format":"double","description":"Budget amount allocated to this member on this project.","type":"number"},"isMemberDisabled":{"description":"Whether this member's access to the project is disabled.","type":"boolean"},"isTimesheetAllowed":{"description":"Whether this member can log timesheets to this project.","type":"boolean"},"isTimesheetApprover":{"description":"Whether this member can approve timesheets on this project.","type":"boolean"},"isTimesheetApprovalRequired":{"description":"Whether this member's timesheets require approval.","type":"boolean"},"canCreateTasks":{"description":"Whether this member can create tasks in this project.","type":"boolean"},"canDeleteTasks":{"description":"Whether this member can delete tasks in this project.","type":"boolean"},"canCommentOnTasks":{"description":"Whether this member can comment on tasks in this project.","type":"boolean"},"canUpdateTasks":{"description":"Whether this member can update tasks in this project.","type":"boolean"}}},"ProjectTagItem":{"description":"A tag applied to a project, with ID and name.","type":"object","properties":{"ProjectTagID":{"format":"int32","description":"Unique identifier for the project tag.","type":"integer"},"Name":{"description":"Tag name.","type":"string"}}},"UpdateProjectModel":{"description":"Request model for updating an existing project. Only fields in FieldsToUpdate are modified.","type":"object","properties":{"ProjectID":{"format":"int32","description":"The ID of the Project to update","type":"integer"},"FieldsToUpdate":{"description":"A string array of field names to be updated. Only listed fields will be modified.","type":"array","items":{"type":"string"}},"ProjectTitle":{"description":"(optional) An updated project title. (255 characters max)","type":"string"},"ProjectNotes":{"description":"(optional) Any descriptive notes about the project. (2000 characters max)","type":"string"},"TimesheetApprovalRequiredbyDefault":{"description":"Whether timesheet approval should be required by default for newly added project members.","type":"boolean"},"isTaskRequiredOnTimesheet":{"description":"Whether timesheets entered against this project require a task to be selected.","type":"boolean"},"StartDate":{"format":"date-time","description":"Planned start date for the project.","type":"string"},"EndDate":{"format":"date-time","description":"Planned end date for the project.","type":"string"},"BudgetAmount":{"format":"double","description":"Monetary budget allocated to the project.","type":"number"},"BudgetHours":{"format":"double","description":"Hours budget allocated to the project.","type":"number"},"ProjectStatusCode":{"description":"Update the project status (string, optional): (Possible values: NotStarted, InProgress, Complete, OnHold)","type":"string"},"ProjectCategoryIDFK":{"format":"int32","description":"The project category ID, if categorised.","type":"integer"},"ProjectBillableTypeCode":{"description":"The billing method of the project. (string, optional) Possible values: CategoryHourly, NoRate, NotBillable, PersonHourly, ProjectHourly","type":"string"},"ProjectBudgetTypeCode":{"description":"The project budgeting type. (string, optional) Possible values: NoBudget, PersonHours, ProjectFees, ProjectHours, CategoryHours","type":"string"},"ScheduleRateUpdateOption":{"description":"Controls whether updated rates are applied to existing schedule bookings when ProjectBillableTypeCode changes.\r\nPossible values: \"new\" (default, only new bookings), \"all\" (all existing bookings), \"active\" (bookings with end date in the future).\r\nOnly applies when ProjectBillableTypeCode is included in FieldsToUpdate.","type":"string"},"TimesheetRateUpdateOption":{"description":"Controls whether updated rates are applied to existing timesheet entries when ProjectBillableTypeCode changes.\r\nPossible values: \"new\" (do not update existing timesheets), \"uninvoiced\" (update all existing uninvoiced timesheets).\r\nDefaults to \"uninvoiced\" if not specified, to preserve backwards compatibility.\r\nOnly applies when ProjectBillableTypeCode is included in FieldsToUpdate.","type":"string"},"SendWebhooks":{"description":"If true, fires the project_updated webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ProjectMemberList":{"description":"Collection of project member records.","type":"object","properties":{"ProjectMembers":{"description":"List of project members.","type":"array","items":{"$ref":"#/definitions/ProjectMemberDetails"}}}},"NewProjectMember":{"description":"Request model for adding a user as a member of a project, with rate, budget, and permission settings.","type":"object","properties":{"isTimesheetAllowed":{"type":"boolean"},"isTimesheetApprover":{"type":"boolean"},"isExpenseApprover":{"type":"boolean"},"isTimesheetApprovalRequired":{"type":"boolean"},"canCreateTasks":{"type":"boolean"},"canDeleteTasks":{"type":"boolean"},"canCommentOnTasks":{"type":"boolean"},"canUpdateTasks":{"type":"boolean"},"ProjectIDFK":{"format":"int32","description":"Required. The ProjectID","type":"integer"},"UserIDFK":{"format":"int32","description":"Required. The UserID to assign","type":"integer"},"CostAmount":{"format":"double","description":"Optional. If not provided, defaults to the User's default Cost Amount.","type":"number"},"RateAmount":{"format":"double","description":"Optional. If not provided, defaults to the User's default Rate Amount.","type":"number"},"BudgetAmount":{"format":"double","description":"Optional","type":"number"}}},"UpdateProjectMember":{"description":"Request model for updating a project member's rates, budget, or permissions. Only fields in FieldsToUpdate are modified.","required":["ProjectIDFK","UserIDFK","FieldsToUpdate"],"type":"object","properties":{"isTimesheetAllowed":{"type":"boolean"},"isTimesheetApprover":{"type":"boolean"},"isExpenseApprover":{"type":"boolean"},"isTimesheetApprovalRequired":{"type":"boolean"},"canCreateTasks":{"type":"boolean"},"canDeleteTasks":{"type":"boolean"},"canCommentOnTasks":{"type":"boolean"},"canUpdateTasks":{"type":"boolean"},"ProjectIDFK":{"format":"int32","description":"Required. The ProjectID","type":"integer"},"UserIDFK":{"format":"int32","description":"Required. The UserID","type":"integer"},"FieldsToUpdate":{"description":"A string array of field names to be updated.","type":"array","items":{"type":"string"}},"CostAmount":{"format":"double","description":"A new Cost Amount. Defaults to null.","type":"number"},"RateAmount":{"format":"double","description":"A new Rate Amount. Defaults to null.","type":"number"},"BudgetAmount":{"format":"double","description":"A new Budget Amount. Defaults to null.","type":"number"},"ScheduleRateUpdateOption":{"description":"Controls whether updated rates are applied to existing schedule bookings for this member.\r\nPossible values: \"new\" (default, only new bookings), \"all\" (all existing bookings), \"active\" (bookings with end date in the future).\r\nOnly applies when RateAmount or CostAmount is included in FieldsToUpdate.","type":"string"},"TimesheetRateUpdateOption":{"description":"Controls whether updated rates are applied to existing timesheet entries for this member.\r\nPossible values: \"new\" (default, do not update existing timesheets), \"uninvoiced\" (update all existing uninvoiced timesheets).\r\nOnly applies when RateAmount or CostAmount is included in FieldsToUpdate.","type":"string"}}},"ProjectTimesheetCategoryList":{"description":"Collection of timesheet categories assigned to a project.","type":"object","properties":{"Categories":{"description":"List of timesheet category assignments.","type":"array","items":{"$ref":"#/definitions/ProjectTimesheetCategoryDetails"}}}},"ProjectTimesheetCategoryDetails":{"description":"A timesheet/billing category assigned to a project, with billable status, rate, and budget hours.","type":"object","properties":{"TimeSheetCategoryIDFK":{"format":"int32","description":"The timesheet category ID.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this category belongs to.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project this category is assigned to.","type":"integer"},"Name":{"description":"Name of the timesheet category.","type":"string"},"isBillable":{"description":"Whether time logged under this category is billable.","type":"boolean"},"isPayable":{"description":"Whether time logged under this category is payable.","type":"boolean"},"isDisabled":{"description":"Whether this category assignment is disabled.","type":"boolean"},"RateAmount":{"format":"double","description":"The billing rate per hour for this category on this project.","type":"number"},"BudgetHours":{"format":"double","description":"Hours budget for this category on this project.","type":"number"},"CostAmount":{"format":"double","description":"The cost rate per hour for this category on this project.","type":"number"}}},"AssignProjectTimesheetCategory":{"description":"Request model for assigning or updating a timesheet category on a project.","type":"object","properties":{"ProjectIDFK":{"format":"int32","description":"The project ID to assign the category to.","type":"integer"},"TimesheetCategoryIDFK":{"format":"int32","description":"The timesheet category ID to assign to the project.","type":"integer"},"isBillable":{"description":"Whether time logged under this category is billable.","type":"boolean"},"isPayable":{"description":"Whether time logged under this category is payable.","type":"boolean"},"RateAmount":{"format":"double","description":"The billing rate per hour for this category on this project.","type":"number"},"BudgetHours":{"format":"double","description":"Hours budget for this category on this project.","type":"number"},"CostAmount":{"format":"double","description":"The cost rate per hour for this category on this project.","type":"number"},"ScheduleRateUpdateOption":{"description":"Controls whether updated rates are applied to existing schedule bookings for this category.\r\nPossible values: \"new\" (default, only new bookings), \"all\" (all existing bookings), \"active\" (bookings with end date in the future).","type":"string"},"TimesheetRateUpdateOption":{"description":"Controls whether updated rates are applied to existing timesheet entries for this category.\r\nPossible values: \"new\" (default, do not update existing timesheets), \"uninvoiced\" (update all existing uninvoiced timesheets).","type":"string"}}},"RecurringInvoiceList":{"description":"Paginated collection of recurring invoice profiles.","type":"object","properties":{"TotalCount":{"format":"int32","description":"The total number of recurring invoice profiles matching the query.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number of the result set.","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"},"RecurringInvoices":{"description":"The recurring invoice profiles for the current page.","type":"array","items":{"$ref":"#/definitions/RecurringInvoice"}}}},"RecurringInvoice":{"description":"A recurring invoice profile defining automatic invoice generation on a schedule, with line items and configuration.","type":"object","properties":{"RecurringInvoiceID":{"format":"int64","description":"Unique identifier for the recurring invoice profile.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The account this recurring invoice profile belongs to.","type":"integer"},"ProfileName":{"description":"A friendly name for the recurring invoice profile.","type":"string"},"CompanyIDFK":{"format":"int32","description":"The ID of the customer company this recurring invoice is billed to.","type":"integer"},"CompanyName":{"description":"The name of the customer company this recurring invoice is billed to.","type":"string"},"RecurringProfileStatusCode":{"description":"Status of the recurring profile (e.g. Active, Paused, Completed).","type":"string"},"RecurringProfileFrequencyCode":{"description":"The frequency at which invoices are generated (e.g. Weekly, Monthly, Yearly).","type":"string"},"CustomFrequencyNumber":{"format":"int32","description":"For custom frequency profiles, the number of units between invoice generations.","type":"integer"},"StartDate":{"format":"date-time","description":"The date the recurring profile first generates an invoice.","type":"string"},"NumberOfCycles":{"format":"int32","description":"The total number of invoice cycles configured for this profile. Null if the profile never expires.","type":"integer"},"NumberOfCyclesRemaining":{"format":"int32","description":"The number of invoice cycles remaining before the profile completes. Null if the profile never expires.","type":"integer"},"LastInvoiceDate":{"format":"date-time","description":"The date the most recent invoice was generated from this profile.","type":"string"},"NextInvoiceDate":{"format":"date-time","description":"The date the next invoice will be generated from this profile.","type":"string"},"NeverExpires":{"description":"Whether the profile continues generating invoices indefinitely with no expiry.","type":"boolean"},"TransactionTaxConfigCode":{"description":"Specifies whether generated invoices are tax exclusive or tax inclusive (e.g. EX, INC).","type":"string"},"Subject":{"description":"The subject/title text that appears on generated invoices.","type":"string"},"Notes":{"description":"Additional notes or terms that appear on generated invoices.","type":"string"},"TaxAmount":{"format":"double","description":"The total tax amount on the recurring invoice profile.","type":"number"},"SubtotalAmount":{"format":"double","description":"The subtotal amount before tax and discounts.","type":"number"},"DiscountAmount":{"format":"double","description":"The total discount amount applied to the profile.","type":"number"},"TotalAmount":{"format":"double","description":"The total amount including tax and after discounts.","type":"number"},"CurrencyCode":{"description":"The ISO 3-letter currency code for the generated invoices.","type":"string"},"ExchangeRate":{"format":"double","description":"The exchange rate applied when the invoice currency differs from the account default currency.","type":"number"},"DateCreated":{"format":"date-time","description":"The date and time this recurring invoice profile was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"The date and time this recurring invoice profile was last updated.","type":"string"},"isAutoChargeEnabled":{"description":"Whether automatic charging is enabled for this recurring profile.","type":"boolean"},"LineItems":{"description":"The line items that will appear on each generated invoice.","type":"array","items":{"$ref":"#/definitions/RecurringInvoiceLineItem"}},"ViewRecurringInvoiceURL":{"description":"URL to view this recurring invoice in the Avaza web application.","type":"string"}}},"RecurringInvoiceLineItem":{"description":"A line item on a recurring invoice profile.","type":"object","properties":{"RecurringInvoiceLineItemID":{"format":"int64","description":"Unique identifier for the recurring invoice line item.","type":"integer"},"InventoryItemIDFK":{"format":"int64","description":"The ID of the inventory item associated with this line item.","type":"integer"},"InventoryItemName":{"description":"The name of the inventory item for this line item.","type":"string"},"InventoryItemSKU":{"description":"The SKU code of the inventory item for this line item.","type":"string"},"Description":{"description":"A description for the line item as it appears on generated invoices.","type":"string"},"Quantity":{"format":"double","description":"The quantity for the line item.","type":"number"},"UnitPrice":{"format":"double","description":"The unit price for the line item.","type":"number"},"TaxAmount":{"format":"double","description":"The tax amount calculated for the line item.","type":"number"},"TaxIDFK":{"format":"int32","description":"The ID of the tax rate applied to this line item.","type":"integer"},"TaxCode":{"description":"The tax code of the tax rate applied to this line item.","type":"string"},"TaxName":{"description":"The display name of the tax rate applied to this line item.","type":"string"},"ProjectIDFK":{"format":"int32","description":"The ID of the project associated with this line item for reporting purposes.","type":"integer"},"ProjectTitle":{"description":"The title of the project associated with this line item.","type":"string"},"Amount":{"format":"double","description":"The total amount for the line item (quantity multiplied by unit price, after discount, before tax).","type":"number"},"Discount":{"format":"double","description":"The discount percentage applied to this line item.","type":"number"}}},"ScheduleAssignmentList":{"description":"Paginated collection of per-day schedule assignments.","type":"object","properties":{"ScheduleAssignments":{"description":"The list of schedule assignment records for this page.","type":"array","items":{"$ref":"#/definitions/ScheduleAssignmentDetails"}},"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"}}},"ScheduleAssignmentDetails":{"description":"A single-day schedule assignment representing hours allocated to a user on a specific date, derived from a schedule series.","type":"object","properties":{"ScheduleAssignmentID":{"format":"int64","description":"Unique identifier for the daily schedule assignment.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this schedule belongs to.","type":"integer"},"UserIDFK":{"format":"int32","description":"The user this schedule is assigned to.","type":"integer"},"ScheduleSeriesIDFK":{"format":"int64","description":"The parent schedule series this assignment belongs to.","type":"integer"},"ScheduleDate":{"format":"date-time","description":"The specific date this assignment is for.","type":"string"},"Duration":{"format":"double","description":"Hours allocated for this specific day.","type":"number"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"}}},"CreateBooking":{"description":"Request model for creating a new project work schedule booking over a date range.","type":"object","properties":{"UserIDFK":{"format":"int32","description":"The user ID to schedule the booking for.","type":"integer"},"HoursPerDay":{"format":"double","description":"Hours to allocate per working day.","type":"number"},"TotalDuration":{"format":"double","description":"Total hours across the booking (alternative to HoursPerDay).","type":"number"},"DurationType":{"description":"Possible values are \"HoursPerDay\" or \"TotalDuration\"","type":"string"},"ScheduleOnDaysOff":{"description":"Whether to include weekends and holidays.","type":"boolean"},"ProjectIDFK":{"format":"int32","description":"The project to book time against.","type":"integer"},"CategoryIDFK":{"format":"int32","description":"The timesheet category for the booking.","type":"integer"},"TaskIDFK":{"format":"int32","description":"Optional task to link the booking to.","type":"integer"},"Notes":{"description":"Additional notes for the booking.","type":"string"},"StartDate":{"format":"date-time","description":"Start date of the booking period.","type":"string"},"EndDate":{"format":"date-time","description":"End date of the booking period.","type":"string"},"StartTime":{"description":"Optional start time of day for the booking.","type":"string"},"SendWebhooks":{"description":"If true, fires the scheduleseries_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ScheduleSeriesDetails":{"description":"A schedule series record representing a continuous booking or leave allocation for a user over a date range.","type":"object","properties":{"ScheduleSeriesID":{"format":"int64","description":"Unique identifier for the schedule series.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this schedule belongs to.","type":"integer"},"UserIDFK":{"format":"int32","description":"The user this schedule is assigned to.","type":"integer"},"Firstname":{"description":"Scheduled user's first name.","type":"string"},"Lastname":{"description":"Scheduled user's last name.","type":"string"},"ProjectIDFK":{"format":"int32","description":"The project this booking is for (null for leave).","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"CompanyIDFK":{"format":"int32","description":"The customer company of the associated project.","type":"integer"},"CompanyName":{"description":"Name of the customer company.","type":"string"},"TimeSheetCategoryIDFK":{"format":"int32","description":"The timesheet category for this booking.","type":"integer"},"TimeSheetCategoryName":{"description":"Name of the timesheet category.","type":"string"},"LeaveTypeIDFK":{"format":"int32","description":"The leave type ID (for leave schedule entries).","type":"integer"},"LeaveTypeName":{"description":"Name of the leave type.","type":"string"},"StartDate":{"format":"date-time","description":"Start date of the schedule series.","type":"string"},"EndDate":{"format":"date-time","description":"End date of the schedule series.","type":"string"},"HoursPerDay":{"format":"double","description":"Hours allocated per working day.","type":"number"},"TotalDuration":{"format":"double","description":"Total hours across the entire schedule series.","type":"number"},"ScheduleOnDaysOff":{"description":"Whether to include weekends and holidays in the schedule.","type":"boolean"},"Notes":{"description":"Additional notes on the schedule.","type":"string"},"TaskIDFK":{"format":"int32","description":"The task this booking is linked to, if any.","type":"integer"},"TaskTitle":{"description":"Title of the associated task.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated.","type":"string"},"UpdatedByUserIDFK":{"format":"int32","description":"User ID of the person who last updated this schedule.","type":"integer"},"StartTime":{"description":"Optional start time of day for the scheduled work.","type":"string"},"EndTime":{"description":"Optional end time of day for the scheduled work.","type":"string"},"isBillable":{"description":"Whether this booking is billable, based on project billing method and category settings.","type":"boolean"},"RateAmount":{"format":"double","description":"The applicable billing rate per hour for this booking.","type":"number"},"CostAmount":{"format":"double","description":"The applicable cost rate per hour for this booking.","type":"number"}}},"CreateLeave":{"description":"Request model for creating a new leave/time-off schedule entry for a user.","type":"object","properties":{"LeaveUserIDFK":{"format":"int32","description":"The user ID to create leave for.","type":"integer"},"LeaveNotify":{"description":"Whether to send an email notification about the leave.","type":"boolean"},"LeaveHoursPerDay":{"format":"double","description":"Hours of leave per day.","type":"number"},"LeaveTypeIDFK":{"format":"int32","description":"The leave type ID (e.g. Annual Leave, Sick Leave).","type":"integer"},"LeaveNotes":{"description":"Additional notes for the leave entry.","type":"string"},"LeaveStartDate":{"format":"date-time","description":"Start date of the leave period.","type":"string"},"LeaveEndDate":{"format":"date-time","description":"End date of the leave period.","type":"string"},"LeaveStartTime":{"description":"Optional start time for partial-day leave.","type":"string"},"SendWebhooks":{"description":"If true, fires the scheduleseries_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"EditLeave":{"description":"Request model for updating an existing leave schedule booking.","type":"object","properties":{"ScheduleSeriesID":{"format":"int64","description":"The Schedule Series ID to update.","type":"integer"},"UserIDFK":{"format":"int32","description":"The user ID this leave is for.","type":"integer"},"HoursPerDay":{"format":"double","description":"Hours of leave per day.","type":"number"},"LeaveTypeIDFK":{"format":"int32","description":"The leave type ID (e.g. Annual Leave, Sick Leave).","type":"integer"},"Notes":{"description":"Additional notes for the leave entry.","type":"string"},"StartDate":{"format":"date-time","description":"Start date of the leave period.","type":"string"},"EndDate":{"format":"date-time","description":"End date of the leave period.","type":"string"},"StartTime":{"description":"Optional start time for partial-day leave.","type":"string"},"SendWebhooks":{"description":"If true, fires the scheduleseries_updated webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"EditBooking":{"description":"Request model for updating an existing project work schedule booking.","type":"object","properties":{"ScheduleSeriesID":{"format":"int64","description":"The Schedule Series ID to update.","type":"integer"},"UserIDFK":{"format":"int32","description":"The user ID to schedule the booking for.","type":"integer"},"HoursPerDay":{"format":"double","description":"Hours to allocate per working day.","type":"number"},"TotalDuration":{"format":"double","description":"Total hours across the booking (alternative to HoursPerDay).","type":"number"},"DurationType":{"description":"Possible values are \"HoursPerDay\" or \"TotalDuration\"","type":"string"},"ScheduleOnDaysOff":{"description":"Whether to include weekends and holidays.","type":"boolean"},"ProjectIDFK":{"format":"int32","description":"The project to book time against.","type":"integer"},"CategoryIDFK":{"format":"int32","description":"The timesheet category for the booking.","type":"integer"},"TaskIDFK":{"format":"int32","description":"Optional task to link the booking to.","type":"integer"},"Notes":{"description":"Additional notes for the booking.","type":"string"},"StartDate":{"format":"date-time","description":"Start date of the booking period.","type":"string"},"EndDate":{"format":"date-time","description":"End date of the booking period.","type":"string"},"StartTime":{"description":"Optional start time of day for the booking.","type":"string"},"SendWebhooks":{"description":"If true, fires the scheduleseries_updated webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"ScheduleSeriesList":{"description":"Paginated collection of schedule series (bookings and leave).","type":"object","properties":{"ScheduleSeries":{"description":"The list of schedule series records for this page.","type":"array","items":{"$ref":"#/definitions/ScheduleSeriesDetails"}},"TotalCount":{"format":"int32","description":"Total number of records matching the query across all pages.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"The number of records per page.","type":"integer"}}},"ScheduleSeriesFilterRequest":{"description":"Request model for filtering schedule series with criteria including date ranges, user, project, and category.","type":"object","properties":{"ScheduleSeriesIDs":{"description":"Optional list of specific Schedule Series IDs to retrieve.","type":"array","items":{"format":"int64","type":"integer"}},"UpdatedAfter":{"format":"date-time","description":"Filter to records updated after this date-time.","type":"string"},"ScheduleStartDateFrom":{"format":"date-time","description":"Filter series starting on or after this date.","type":"string"},"ScheduleStartDateTo":{"format":"date-time","description":"Filter series starting on or before this date.","type":"string"},"ScheduleEndDateFrom":{"format":"date-time","description":"Filter series ending on or after this date.","type":"string"},"ScheduleEndDateTo":{"format":"date-time","description":"Filter series ending on or before this date.","type":"string"},"UserID":{"format":"int32","description":"Filter by the scheduled user's ID.","type":"integer"},"UserEmail":{"description":"Filter by the scheduled user's email address.","type":"string"},"TimeSheetCategoryID":{"format":"int32","description":"Filter by timesheet category ID.","type":"integer"},"TimeSheetCategoryName":{"description":"Filter by exact timesheet category name.","type":"string"},"LeaveTypeID":{"format":"int32","description":"Filter by leave type ID.","type":"integer"},"ProjectID":{"format":"int32","description":"Filter by project ID.","type":"integer"},"CompanyID":{"format":"int32","description":"Filter by the customer company ID of the associated project.","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page. Default 20, maximum 1000.","type":"integer"},"PageNumber":{"format":"int32","description":"1-based page number. Default 1.","type":"integer"},"Sort":{"description":"Sort order. Values: DateUpdated, DateCreated (append ' desc' for descending).","type":"string"}}},"SectionList":{"description":"Collection of sections within a project.","type":"object","properties":{"Sections":{"description":"List of sections in this project.","type":"array","items":{"$ref":"#/definitions/SectionDetails"}},"TotalCount":{"format":"int32","description":"Total number of sections in the project.","type":"integer"}}},"SectionDetails":{"description":"A section (task group) within a project, with title, dates, display order, and project association.","type":"object","properties":{"SectionID":{"format":"int32","description":"Unique identifier for the section.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project this section belongs to.","type":"integer"},"Title":{"description":"Section title/name.","type":"string"},"DisplayOrder":{"format":"int32","description":"Sort order position for display within the project.","type":"integer"},"StartDateUTC":{"format":"date-time","description":"Section start date in UTC.","type":"string"},"StartDate":{"format":"date-time","description":"Section start date in local time.","type":"string"},"EndDateUTC":{"format":"date-time","description":"Section end date in UTC.","type":"string"},"EndDate":{"format":"date-time","description":"Section end date in local time.","type":"string"}}},"NewSection":{"description":"Request model for creating a new section within a project.","type":"object","properties":{"ProjectIDFK":{"format":"int32","description":"The project this section should be created in.","type":"integer"},"Title":{"description":"Section title/name.","type":"string"},"StartDateUTC":{"format":"date-time","description":"Optional start date for the section (UTC).","type":"string"},"EndDateUTC":{"format":"date-time","description":"Optional end date for the section (UTC).","type":"string"}}},"TaskDropdownList":{"type":"object","properties":{"sections":{"description":"List of Task grouped by Section","type":"array","items":{"$ref":"#/definitions/TaskSectionGroup"}},"pageNumber":{"format":"int32","description":"Current page number (1 based)","type":"integer"},"PageSize":{"format":"int32","description":"Current page size","type":"integer"},"hasMore":{"description":"More records probably exist","type":"boolean"}}},"TaskSectionGroup":{"type":"object","properties":{"SectionTitle":{"type":"string"},"tasks":{"type":"array","items":{"$ref":"#/definitions/TaskDropdownSelection"}}}},"TaskDropdownSelection":{"type":"object","properties":{"TaskID":{"type":"string"},"Title":{"type":"string"}}},"TaskList":{"description":"Paginated collection of tasks.","type":"object","properties":{"Tasks":{"description":"List of task records for this page.","type":"array","items":{"$ref":"#/definitions/TaskDetails"}},"TotalCount":{"format":"int32","description":"Total number of tasks matching the filter criteria.","type":"integer"},"PageNumber":{"format":"int32","description":"Current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page.","type":"integer"}}},"TaskDetails":{"description":"Full task details including project context, section, assignees, dates, status, priority, tags, estimated/actual effort, and web link.","type":"object","properties":{"TaskID":{"format":"int32","description":"Unique identifier for the task.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project this task belongs to.","type":"integer"},"ProjectTitle":{"description":"Title of the parent project.","type":"string"},"ProjectCode":{"description":"Short code of the parent project.","type":"string"},"SectionTitle":{"description":"Title of the section this task is in.","type":"string"},"SectionIDFK":{"format":"int32","description":"The section (task group) this task belongs to.","type":"integer"},"Title":{"description":"Task title/name.","type":"string"},"Description":{"description":"Task description (may contain HTML).","type":"string"},"DescriptionNoHTML":{"description":"Task description with HTML tags stripped.","type":"string"},"AssignedToUsers":{"description":"List of users assigned to this task.","type":"array","items":{"$ref":"#/definitions/AssignedToUser"}},"DateStart":{"format":"date-time","description":"Task start date.","type":"string"},"DateDue":{"format":"date-time","description":"Task due date.","type":"string"},"DateCompleted":{"format":"date-time","description":"Date the task was marked as completed.","type":"string"},"EstimatedEffort":{"format":"double","description":"Estimated effort in decimal hours.","type":"number"},"ActualTime":{"format":"double","description":"Actual time logged against this task in decimal hours.","type":"number"},"Tags":{"description":"List of tags applied to this task.","type":"array","items":{"$ref":"#/definitions/TagItem"}},"AccountTaskTypeIDFK":{"format":"int32","description":"The task type (workflow) ID for this task.","type":"integer"},"TaskStatusCode":{"description":"Current task status code.","type":"string"},"TaskStatusName":{"description":"Display name of the current task status.","type":"string"},"isCompleteStatus":{"description":"Whether the current status represents a completed state.","type":"boolean"},"PercentComplete":{"format":"double","description":"Task completion percentage (0-100).","type":"number"},"TaskPriorityCode":{"description":"Task priority. Values: None, Low, Medium, High, Urgent.","type":"string"},"TaskPriorityName":{"description":"Display name of the task priority.","type":"string"},"ViewTaskURL":{"description":"URL to view this task in the Avaza web application.","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the task was created.","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the task was last updated.","type":"string"},"ParentTaskIDFK":{"format":"int32","description":"Parent task ID if this is a subtask. NULL for root-level tasks.","type":"integer"},"ParentTaskTitle":{"description":"Title of the parent task (denormalized for display). NULL for root-level tasks.","type":"string"},"SubtaskCount":{"format":"int32","description":"Number of immediate subtasks under this task.","type":"integer"},"SubtaskProgress":{"format":"int32","description":"Percentage of subtasks in a complete status (0-100).","type":"integer"},"FileAttachments":{"description":"File attachments currently linked to this task.","type":"array","items":{"$ref":"#/definitions/TaskFileAttachmentItem"}}}},"AssignedToUser":{"description":"A user assigned to a task, with their user ID, email, first name, and last name.","type":"object","properties":{"AssignedToUserIDFK":{"format":"int32","description":"User ID of the assigned user.","type":"integer"},"AssignedToEmail":{"description":"Email of the assigned user.","type":"string"},"AssignedToFirstname":{"description":"First name of the assigned user.","type":"string"},"AssignedToLastname":{"description":"Last name of the assigned user.","type":"string"}}},"TagItem":{"description":"A tag applied to a task, with ID, name, and hex color code.","type":"object","properties":{"TagID":{"format":"int64","description":"Unique identifier for the tag.","type":"integer"},"Name":{"description":"Tag name.","type":"string"},"Color":{"description":"Hex color code for the tag (e.g. '#FF5733').","type":"string"}}},"TaskFileAttachmentItem":{"description":"A file attachment linked to a task.","type":"object","properties":{"FileAttachmentIDFK":{"format":"int64","description":"Foreign key to the FileAttachment record.","type":"integer"},"AttachmentURL":{"description":"Public URL to download the file.","type":"string"},"AttachmentPreviewURL":{"description":"URL for in-browser preview of the file. Empty for non-previewable file types.","type":"string"}}},"UpdateTask":{"description":"Request model for updating an existing task. Only fields in FieldsToUpdate are modified.","required":["TaskID","FieldsToUpdate"],"type":"object","properties":{"TaskID":{"format":"int32","type":"integer"},"FieldsToUpdate":{"type":"array","items":{"type":"string"}},"SectionIDFK":{"format":"int32","description":"The section (task group) this task belongs to.","type":"integer"},"Title":{"description":"Task title/name.","type":"string"},"Description":{"description":"Task description (may contain HTML).","type":"string"},"AssignedToUserIDFK":{"description":"List of user IDs to assign to this task.","type":"array","items":{"format":"int32","type":"integer"}},"DateStart":{"format":"date-time","description":"Task start date.","type":"string"},"DateDue":{"format":"date-time","description":"Task due date.","type":"string"},"TaskPriorityCode":{"description":"Task priority. Values: None, Low, Medium, High, Urgent.","type":"string"},"EstimatedEffort":{"format":"double","description":"Decimal hours","type":"number"},"TaskStatusCode":{"description":"Current task status code.","type":"string"},"PercentComplete":{"format":"int32","description":"Task completion percentage (0-100).","type":"integer"},"Tags":{"description":"List of tags to apply to this task.","type":"array","items":{"$ref":"#/definitions/NewTag"}},"FileAttachmentIDsToAdd":{"description":"FileAttachmentIDs (returned from prior /api/FileAttachment uploads) to newly link to this task. Each ID must have been created by the current user and not yet linked to any entity.","type":"array","items":{"format":"int64","type":"integer"}},"SendWebhooks":{"description":"If true, fires the matching webhook event (e.g. task_updated) to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"NewTag":{"description":"A tag to apply to a task, specifying name and hex color code.","type":"object","properties":{"Name":{"description":"Tag name.","type":"string"},"Color":{"description":"Hex color code in format #000000","type":"string"}}},"NewTask":{"description":"Request model for creating a new task in a project section. Requires ProjectIDFK, SectionIDFK, and Title.","required":["ProjectIDFK","SectionIDFK","Title"],"type":"object","properties":{"ProjectIDFK":{"format":"int32","type":"integer"},"SectionIDFK":{"format":"int32","type":"integer"},"AccountTaskTypeIDFK":{"format":"int32","description":"The task type (workflow) ID for this task.","type":"integer"},"Title":{"type":"string"},"Description":{"description":"Task description (may contain HTML).","type":"string"},"AssignedToUserIDFKs":{"description":"List of user IDs to assign to this task.","type":"array","items":{"format":"int32","type":"integer"}},"TaskPriorityCode":{"description":"Task priority. Values: None, Low, Medium, High, Urgent.","type":"string"},"DateStart":{"format":"date-time","description":"Task start date.","type":"string"},"DateDue":{"format":"date-time","description":"Task due date.","type":"string"},"EstimatedEffort":{"format":"double","description":"Decimal hours","type":"number"},"Tags":{"description":"Collection of tags specifying Name and Color (Hex)","type":"array","items":{"$ref":"#/definitions/NewTag"}},"ParentTaskIDFK":{"format":"int32","description":"Parent task ID to create this as a subtask. NULL creates a root-level task.","type":"integer"},"FileAttachmentIDs":{"description":"FileAttachmentIDs (returned from prior /api/FileAttachment uploads) to link to the new task. Each ID must have been created by the current user and not yet linked to any entity.","type":"array","items":{"format":"int64","type":"integer"}},"SendWebhooks":{"description":"If true, fires the task_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"TaskDiscussion":{"description":"Discussion thread for a task, containing paginated comment/response messages.","type":"object","properties":{"TaskID":{"format":"int32","description":"The task this discussion belongs to.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project containing this task.","type":"integer"},"responses":{"description":"List of discussion messages/comments.","type":"array","items":{"$ref":"#/definitions/TaskDiscussionResponse"}},"pageSize":{"format":"int32","description":"Number of messages returned per page.","type":"integer"},"startItem":{"format":"int64","description":"The starting response ID for pagination.","type":"integer"}}},"TaskDiscussionResponse":{"description":"A single message in a task discussion, including author, body text, timestamps, attachments, and reply context.","type":"object","properties":{"TaskResponseID":{"format":"int64","description":"Unique identifier for this discussion message.","type":"integer"},"CreatedByName":{"description":"Display name of the message author.","type":"string"},"isActive":{"description":"Whether this message is active (not deleted).","type":"boolean"},"CreatedByUserIDFK":{"format":"int32","description":"User ID of the message author.","type":"integer"},"ResponseBody":{"description":"The message content (may contain HTML).","type":"string"},"DateCreatedString":{"description":"Formatted creation date string.","type":"string"},"canDelete":{"description":"Whether the current user can delete this message.","type":"boolean"},"canEdit":{"description":"Whether the current user can edit this message (author + not system + active membership).","type":"boolean"},"attachments":{"description":"List of file attachments on this message.","type":"array","items":{"$ref":"#/definitions/TaskDiscussionResponseAttachment"}},"isInternalNote":{"description":"Whether this is an internal note (not visible to external contacts).","type":"boolean"},"Unread":{"description":"Whether this message is unread by the current user.","type":"string"},"isSystem":{"description":"Whether this is a system-generated message (e.g. status change notification).","type":"boolean"},"isEdited":{"description":"True if the author has edited this message after posting; drives the (edited) UI indicator.","type":"boolean"},"DateLastEditedUtc":{"format":"date-time","description":"Timestamp (UTC) of the most recent user edit. Null if never edited. Distinct from DateUpdated.","type":"string"},"ReplyToMessageID":{"format":"int64","description":"The message ID this is a reply to, if any.","type":"integer"},"ReplyToDateCreated":{"format":"date-time","description":"Creation date of the message being replied to.","type":"string"},"ReplyToCreatedByUserIDFK":{"format":"int64","description":"User ID of the author of the message being replied to.","type":"integer"},"ReplyToUserName":{"description":"Author name of the message being replied to.","type":"string"},"ReplyToBody":{"description":"Body of the message being replied to.","type":"string"},"ReplyToFileID1":{"format":"int64","type":"integer"},"ReplyToFilePreview1":{"type":"string"},"ReplyToFileProvider1":{"type":"string"},"ReplyToFileName1":{"type":"string"},"ReplyToFileType1":{"type":"string"}}},"TaskDiscussionResponseAttachment":{"description":"A file attachment on a task discussion message.","type":"object","properties":{"FileAttachmentID":{"format":"int64","description":"Unique identifier for the file attachment.","type":"integer"},"Filename":{"description":"Storage filename of the attachment.","type":"string"},"DateCreatedString":{"description":"Formatted creation date of the attachment.","type":"string"},"provider":{"description":"Storage provider code for the attachment.","type":"string"},"FileExtension":{"description":"File extension (e.g. '.pdf', '.png').","type":"string"},"PublicFileURL":{"description":"Public URL to download the attachment.","type":"string"},"PreviewURL":{"description":"URL for a preview/thumbnail of the attachment.","type":"string"},"CanPreview":{"description":"Whether a preview is available for this attachment.","type":"boolean"},"Type":{"description":"MIME type or category of the attachment.","type":"string"},"URL":{"description":"Direct URL to the attachment.","type":"string"},"Preview":{"description":"Preview image URL.","type":"string"},"Name":{"description":"Attachment name.","type":"string"},"Size":{"description":"File size in human-readable format.","type":"string"}}},"NewTaskDiscussion":{"description":"Request payload for posting a new comment / discussion message to a task. Use POST /api/FileAttachment first to upload any attachments and pass the resulting FileAttachmentIDs here.","type":"object","properties":{"TaskID":{"format":"int32","description":"The TaskID to post the discussion message to. Required.","type":"integer"},"ResponseBody":{"description":"The message body. May contain a limited HTML subset (sanitised on save). Required unless FileAttachmentIDs is non-empty.","type":"string"},"isInternalNote":{"description":"True to post as an internal note (not visible to external/customer users). Only team members may post internal notes. Default: false.","type":"boolean"},"ReplyToMessageID":{"format":"int64","description":"Optional. The TaskResponseID of an existing message on the same task being replied to. Set null/0/omit for a top-level message.","type":"integer"},"FileAttachmentIDs":{"description":"Optional. List of FileAttachmentIDs returned from prior /api/FileAttachment uploads to attach to this message. Each must be owned by the current user and not already linked (AttachmentType='Draft'). Maximum 8 per message.","type":"array","items":{"format":"int64","type":"integer"}}}},"EditTaskDiscussion":{"type":"object","properties":{"TaskResponseID":{"format":"int64","description":"The TaskResponseID of the comment to edit. Must be authored by the current user.","type":"integer"},"ResponseBody":{"description":"The new message body. Required (non-empty after sanitisation) if FileAttachmentIDs is empty.","type":"string"},"FileAttachmentIDs":{"description":"Final canonical attachment set after edit: existing IDs to KEEP plus new draft IDs to ADD. Existing IDs omitted from this list are hard-deleted. Maximum 8.","type":"array","items":{"format":"int64","type":"integer"}},"ExpectedDateUpdated":{"format":"date-time","description":"Optional optimistic-concurrency guard. If supplied and differs from the row's current DateUpdated, the edit is rejected with 409.","type":"string"}}},"TaskPriorityList":{"description":"Collection of task priority definitions.","type":"object","properties":{"priorities":{"description":"List of task priority definitions configured in the account.","type":"array","items":{"$ref":"#/definitions/TaskPriorityDetails"}}}},"TaskPriorityDetails":{"description":"A task priority definition including code, display name, color, and sort order.","type":"object","properties":{"TaskPriorityID":{"format":"int32","description":"Unique identifier for the task priority.","type":"integer"},"PriorityCode":{"description":"Short code identifying this priority (e.g. \"High\", \"Low\").","type":"string"},"Name":{"description":"Display name of the priority.","type":"string"},"Color":{"description":"Hex color code for priority badge rendering.","type":"string"},"DisplayOrder":{"format":"int32","description":"Sort order position for display (ascending).","type":"integer"}}},"TaskStatusList":{"description":"Collection of task status definitions.","type":"object","properties":{"statuses":{"description":"List of task status definitions configured in the account.","type":"array","items":{"$ref":"#/definitions/TaskStatusDetails"}}}},"TaskStatusDetails":{"description":"A task status definition including status code, display name, color, sort order, associated task type, and whether it represents completion.","type":"object","properties":{"TaskStatusCode":{"description":"Unique code identifying this task status.","type":"string"},"Name":{"description":"Display name of the status.","type":"string"},"Color":{"description":"Hex color code for the status display.","type":"string"},"DisplayOrder":{"format":"int32","description":"Sort order position for display.","type":"integer"},"isComplete":{"description":"Whether this status represents a completed/done state.","type":"boolean"},"AccountTaskTypeIDFK":{"format":"int32","description":"The task type this status belongs to.","type":"integer"},"TaskTypeName":{"description":"Name of the parent task type.","type":"string"}}},"TaskTypeList":{"description":"Collection of task type (workflow) definitions.","type":"object","properties":{"tasktypes":{"description":"List of task type definitions configured in the account.","type":"array","items":{"$ref":"#/definitions/AccountTaskTypeDetails"}}}},"AccountTaskTypeDetails":{"description":"A task type definition (workflow type) with name, icon, and default flag.","type":"object","properties":{"AccountTaskTypeID":{"format":"int32","description":"Unique identifier for the task type.","type":"integer"},"Name":{"description":"Display name of the task type.","type":"string"},"Icon":{"description":"Icon identifier for the task type.","type":"string"},"IconType":{"description":"Type/category of the icon.","type":"string"},"isDefault":{"description":"Whether this is the default task type for new tasks.","type":"boolean"}}},"TaxList":{"description":"Collection of tax rates configured in the account.","type":"object","properties":{"Taxes":{"description":"The list of tax rates configured in the Avaza account.","type":"array","items":{"$ref":"#/definitions/TaxItem"}}}},"TaxItem":{"description":"A tax rate with code, name, calculated percentage, and component breakdown for compound taxes.","type":"object","properties":{"TaxID":{"format":"int32","description":"Unique identifier for the tax rate.","type":"integer"},"TaxCode":{"description":"Short code identifying the tax rate.","type":"string"},"Name":{"description":"Display name of the tax rate.","type":"string"},"CalculatedPercent":{"format":"double","description":"The effective tax percentage, calculated from all components for compound taxes.","type":"number"},"TaxComponents":{"description":"The individual components that make up a compound tax rate.","type":"array","items":{"$ref":"#/definitions/TaxComponent"}}}},"TaxComponent":{"description":"A component of a compound tax rate, with its own code, name, percentage, and compound flag.","type":"object","properties":{"TaxComponentID":{"format":"int32","description":"Unique identifier for the tax component.","type":"integer"},"TaxIDFK":{"format":"int32","description":"The ID of the parent TaxItem this component belongs to.","type":"integer"},"ComponentTaxCode":{"description":"Short code identifying this tax component.","type":"string"},"Name":{"description":"Display name of the tax component.","type":"string"},"Percentage":{"format":"double","description":"The percentage rate for this individual tax component.","type":"number"},"isCompound":{"description":"Whether this component is compounded on top of the previous components (true) or applied to the original amount (false).","type":"boolean"}}},"DeletedTimesheetList":{"description":"Paginated collection of deleted timesheet entries for sync purposes.","type":"object","properties":{"DeletedTimesheets":{"description":"The list of deleted timesheet entries for the current page.","type":"array","items":{"$ref":"#/definitions/DeletedTimeSheetEntryDetails"}},"TotalCount":{"format":"int32","description":"Total number of deleted timesheet entries matching the filter criteria.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page.","type":"integer"}}},"DeletedTimeSheetEntryDetails":{"description":"A deleted timesheet entry record including all original field values, useful for external system synchronisation.","type":"object","properties":{"TimeSheetEntryID":{"format":"int64","description":"Unique identifier of the deleted timesheet entry.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this entry belonged to.","type":"integer"},"UserIDFK":{"format":"int32","description":"The user ID who owned this timesheet entry.","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project ID this entry was associated with.","type":"integer"},"TimeSheetCategoryIDFK":{"format":"int32","description":"The timesheet category ID applied to this entry.","type":"integer"},"Duration":{"format":"double","description":"Duration of the entry in decimal hours.","type":"number"},"TimesheetEntryApprovalStatusCode":{"description":"Approval status at the time of deletion.","type":"string"},"isBillable":{"description":"Whether the entry was billable.","type":"boolean"},"InvoiceLineItemIDFK":{"format":"int64","description":"The invoice line item ID if the entry had been invoiced.","type":"integer"},"EntryDate":{"format":"date-time","description":"The original date of the timesheet entry.","type":"string"},"Notes":{"description":"Notes attached to the timesheet entry.","type":"string"},"TaskIDFK":{"format":"int32","description":"The task ID the entry was linked to, if any.","type":"integer"},"TimerStartedAtUTC":{"format":"date-time","description":"The UTC time the timer was started, if a timer was running.","type":"string"},"HasTimer":{"description":"Whether a timer was running on this entry at the time of deletion.","type":"boolean"},"IsInvoiced":{"description":"Whether the entry had been invoiced.","type":"boolean"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated before deletion (UTC).","type":"string"},"DateCreated":{"format":"date-time","description":"Date and time the record was originally created (UTC).","type":"string"},"DateApproved":{"format":"date-time","description":"Date and time the entry was approved, if applicable.","type":"string"},"ApprovedBy":{"description":"Name or email of the user who approved this entry.","type":"string"},"StartTimeLocal":{"format":"date-time","description":"The local start time of the entry, if start/end time tracking was enabled.","type":"string"},"StartTimeUTC":{"format":"date-time","description":"The UTC start time of the entry, if start/end time tracking was enabled.","type":"string"},"EndTimeLocal":{"format":"date-time","description":"The local end time of the entry, if start/end time tracking was enabled.","type":"string"},"EndTimeUTC":{"format":"date-time","description":"The UTC end time of the entry, if start/end time tracking was enabled.","type":"string"},"TimesheetUserTimeZone":{"description":"The IANA time zone ID of the user who owned the timesheet.","type":"string"},"CustomMetadata":{"description":"Custom metadata stored on the entry.","type":"string"},"isPayable":{"description":"Whether the entry was payable.","type":"boolean"},"BillLineItemIDFK":{"format":"int64","description":"The bill line item ID if the entry had been included on a supplier bill.","type":"integer"},"isPaid":{"description":"Whether the entry had been paid.","type":"boolean"},"RateAmount":{"format":"double","description":"The billing rate amount. Only visible to Admin role users.","type":"number"},"CostAmount":{"format":"double","description":"The cost rate amount. Only visible to Admin role users.","type":"number"},"DeletedDate":{"format":"date-time","description":"The date and time the entry was deleted (UTC).","type":"string"},"DeletedByUserIDFK":{"format":"int32","description":"The user ID of the user who deleted this entry.","type":"integer"}}},"TimesheetList":{"description":"Paginated collection of timesheet entries.","type":"object","properties":{"Timesheets":{"description":"The list of timesheet entries for the current page.","type":"array","items":{"$ref":"#/definitions/TimesheetListDetails"}},"TotalCount":{"format":"int32","description":"Total number of timesheet entries matching the filter criteria.","type":"integer"},"PageNumber":{"format":"int32","description":"The current page number (1-based).","type":"integer"},"PageSize":{"format":"int32","description":"Number of results per page.","type":"integer"}}},"TimesheetListDetails":{"description":"A timesheet entry in a list response, including user, project, category, duration, status, timer state, and optional invoice linkage.","type":"object","properties":{"TimesheetEntryID":{"format":"int64","description":"Unique identifier for the timesheet entry.","type":"integer"},"UserIDFK":{"format":"int32","description":"The ID of the user who owns this timesheet entry.","type":"integer"},"Firstname":{"description":"First name of the timesheet user.","type":"string"},"Lastname":{"description":"Last name of the timesheet user.","type":"string"},"Email":{"description":"Email address of the timesheet user.","type":"string"},"ProjectIDFK":{"format":"int32","description":"The project ID this timesheet entry is associated with.","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"ProjectCode":{"description":"Project code of the associated project, if project codes are enabled.","type":"string"},"CustomerIDFK":{"format":"int32","description":"The customer/company ID associated with the project.","type":"integer"},"CustomerName":{"description":"Name of the customer/company associated with the project.","type":"string"},"TimesheetCategoryIDFK":{"format":"int32","description":"The timesheet category ID applied to this entry.","type":"integer"},"CategoryName":{"description":"Name of the timesheet category applied to this entry.","type":"string"},"Duration":{"format":"double","description":"Duration of the timesheet entry in decimal hours.","type":"number"},"TimesheetEntryApprovalStatusCode":{"description":"Approval status of the entry. Values: Draft, Pending, Approved, Rejected, AutoApproved.","type":"string"},"HasTimer":{"description":"Whether a timer is currently running on this entry.","type":"boolean"},"TimerStartedAtUTC":{"format":"date-time","description":"The UTC date and time at which the timer was started, if a timer is running.","type":"string"},"isBillable":{"description":"Whether this timesheet entry is billable to the client.","type":"boolean"},"isInvoiced":{"description":"Whether this timesheet entry has been included on an invoice.","type":"boolean"},"EntryDate":{"format":"date-time","description":"The date of the timesheet entry.","type":"string"},"StartTimeLocal":{"format":"date-time","description":"The local start time of the entry, if start/end time tracking is enabled.","type":"string"},"StartTimeUTC":{"format":"date-time","description":"The UTC start time of the entry, if start/end time tracking is enabled.","type":"string"},"EndTimeLocal":{"format":"date-time","description":"The local end time of the entry, if start/end time tracking is enabled.","type":"string"},"EndTimeUTC":{"format":"date-time","description":"The UTC end time of the entry, if start/end time tracking is enabled.","type":"string"},"TimesheetUserTimeZone":{"description":"The IANA time zone ID of the user who owns the timesheet.","type":"string"},"Notes":{"description":"Free-text notes attached to this timesheet entry.","type":"string"},"TaskIDFK":{"format":"int32","description":"The task ID this timesheet entry is linked to, if any.","type":"integer"},"TaskTitle":{"description":"Title of the task this entry is linked to.","type":"string"},"SectionIDFK":{"format":"int32","description":"The section ID of the task this entry is linked to.","type":"integer"},"SectionTitle":{"description":"Title of the section the linked task belongs to.","type":"string"},"InvoiceIDFK":{"format":"int64","description":"This InvoiceIDFK is only included when the api get parameter includeInvoiceDetails==true","type":"integer"},"InvoiceLineItemIDFK":{"format":"int64","description":"The invoice line item ID this entry was billed on, if invoiced.","type":"integer"},"DateCreated":{"format":"date-time","description":"Date and time the record was created (UTC).","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated (UTC).","type":"string"},"DateApproved":{"format":"date-time","description":"Date and time the entry was approved, if applicable.","type":"string"},"ApprovedBy":{"description":"Name or email of the user who approved this entry.","type":"string"},"CustomMetadata":{"description":"Optional free-form metadata field for storing additional information. Maximum 1000 characters.","type":"string"},"RateAmount":{"format":"double","description":"Only visible to Admin role users","type":"number"},"CostAmount":{"format":"double","description":"Only visible to Admin role users","type":"number"},"ViewTimesheetURL":{"description":"URL to view this timesheet entry's day in the Avaza web application.","type":"string"}}},"NewTimesheet":{"description":"Request model for creating a new timesheet entry. If Duration is null or 0, a timer is started automatically.","type":"object","properties":{"UserIDFK":{"format":"int32","description":"UserID for a Timesheet user in Avaza","type":"integer"},"ProjectIDFK":{"format":"int32","description":"The project to associate the timesheet with.","type":"integer"},"TimesheetCategoryIDFK":{"format":"int32","description":"The Project timesheet category to link the timesheet to","type":"integer"},"Duration":{"format":"double","description":"The duration of the timesheet, in decimal hours. If null or 0, a timer will be started.","type":"number"},"isInvoiced":{"description":"Optional. False by default. Allows you to mark the timesheet as invoiced in an external system.","type":"boolean"},"EntryDate":{"format":"date-time","description":"The date of the timesheet entry, with an optional start time component.","type":"string"},"hasStartEndTime":{"description":"If true, the start time will be take from the time component of the Entry Date field, and the end time will be calculated by adding the Duration to the StartDate","type":"boolean"},"Notes":{"description":"Timesheet Notes","type":"string"},"TaskIDFK":{"format":"int32","description":"Optional. Link the timesheet to a specific task","type":"integer"},"CustomMetadata":{"description":"Optional. free nvarchar field available via Api to store any additional metadata against a timesheet. We suggest you use Json or your preferred serialisation format. 1000 characters max.","type":"string"},"SendWebhooks":{"description":"If true, fires the timesheet_created webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"TimesheetDetails":{"description":"Full details of a single timesheet entry including user, project, category, approval, timer, and rate information.","type":"object","properties":{"TimesheetEntryID":{"format":"int64","description":"Unique identifier for the timesheet entry.","type":"integer"},"UserIDFK":{"format":"int32","description":"The ID of the user who owns this timesheet entry.","type":"integer"},"Firstname":{"description":"First name of the timesheet user.","type":"string"},"Lastname":{"description":"Last name of the timesheet user.","type":"string"},"Email":{"description":"Email address of the timesheet user.","type":"string"},"ProjectIDFK":{"format":"int32","description":"The project ID this timesheet entry is associated with.","type":"integer"},"ProjectTitle":{"description":"Title of the associated project.","type":"string"},"ProjectCode":{"description":"Project code of the associated project, if project codes are enabled.","type":"string"},"CustomerIDFK":{"format":"int32","description":"The customer/company ID associated with the project.","type":"integer"},"CustomerName":{"description":"Name of the customer/company associated with the project.","type":"string"},"TimesheetCategoryIDFK":{"format":"int32","description":"The timesheet category ID applied to this entry.","type":"integer"},"CategoryName":{"description":"Name of the timesheet category applied to this entry.","type":"string"},"Duration":{"format":"double","description":"Duration of the timesheet entry in decimal hours.","type":"number"},"TimesheetEntryApprovalStatusCode":{"description":"Approval status of the entry. Values: Draft, Pending, Approved, Rejected, AutoApproved.","type":"string"},"HasTimer":{"description":"Whether a timer is currently running on this entry.","type":"boolean"},"TimerStartedAtUTC":{"format":"date-time","description":"The UTC date and time at which the timer was started, if a timer is running.","type":"string"},"isBillable":{"description":"Whether this timesheet entry is billable to the client.","type":"boolean"},"isInvoiced":{"description":"Whether this timesheet entry has been included on an invoice.","type":"boolean"},"EntryDate":{"format":"date-time","description":"The date of the timesheet entry.","type":"string"},"StartTimeLocal":{"format":"date-time","description":"The local start time of the entry, if start/end time tracking is enabled.","type":"string"},"StartTimeUTC":{"format":"date-time","description":"The UTC start time of the entry, if start/end time tracking is enabled.","type":"string"},"EndTimeLocal":{"format":"date-time","description":"The local end time of the entry, if start/end time tracking is enabled.","type":"string"},"EndTimeUTC":{"format":"date-time","description":"The UTC end time of the entry, if start/end time tracking is enabled.","type":"string"},"TimesheetUserTimeZone":{"description":"The IANA time zone ID of the user who owns the timesheet.","type":"string"},"Notes":{"description":"Free-text notes attached to this timesheet entry.","type":"string"},"TaskIDFK":{"format":"int32","description":"The task ID this timesheet entry is linked to, if any.","type":"integer"},"TaskTitle":{"description":"Title of the task this entry is linked to.","type":"string"},"InvoiceIDFK":{"format":"int64","description":"The invoice Transaction ID this entry was billed on, if invoiced.","type":"integer"},"InvoiceLineItemIDFK":{"format":"int64","description":"The invoice line item ID this entry was billed on, if invoiced.","type":"integer"},"DateCreated":{"format":"date-time","description":"Date and time the record was created (UTC).","type":"string"},"DateUpdated":{"format":"date-time","description":"Date and time the record was last updated (UTC).","type":"string"},"DateApproved":{"format":"date-time","description":"Date and time the entry was approved, if applicable.","type":"string"},"ApprovedBy":{"description":"Name or email of the user who approved this entry.","type":"string"},"CustomMetadata":{"description":"Optional free-form metadata field for storing additional information. Maximum 1000 characters.","type":"string"},"RateAmount":{"format":"double","description":"Only visible to Admin role users","type":"number"},"CostAmount":{"format":"double","description":"Only visible to Admin role users","type":"number"},"ViewTimesheetURL":{"description":"URL to view this timesheet entry's day in the Avaza web application.","type":"string"}}},"UpdateTimesheetModel":{"description":"Request model for updating an existing timesheet entry. Only fields in FieldsToUpdate are modified. ProjectIDFK is always required.","required":["TimeSheetEntryID","FieldsToUpdate","ProjectIDFK"],"type":"object","properties":{"TimeSheetEntryID":{"format":"int64","description":"The ID of the timesheet entry to update.","type":"integer"},"FieldsToUpdate":{"description":"Array of field names to update. Only listed fields will be modified.","type":"array","items":{"type":"string"}},"ProjectIDFK":{"format":"int32","description":"The project ID for the timesheet entry. Always required.","type":"integer"},"TimesheetCategoryIDFK":{"format":"int32","description":"The timesheet category ID to apply to this entry.","type":"integer"},"TaskIDFK":{"format":"int32","description":"The task ID to link this entry to, if any.","type":"integer"},"Duration":{"format":"double","description":"Duration of the timesheet entry in decimal hours.","type":"number"},"EntryDate":{"format":"date-time","description":"The date of the timesheet entry.","type":"string"},"hasStartEndTime":{"description":"If true, the start time is taken from the time component of EntryDate and the end time is calculated by adding Duration.","type":"boolean"},"Notes":{"description":"Free-text notes for the timesheet entry.","type":"string"},"CustomMetadata":{"description":"Optional. free nvarchar field available via Api to store any additional metadata against a timesheet. We suggest you use Json or your preferred serialisation format. 1000 characters max.","type":"string"},"SendWebhooks":{"description":"If true, fires the timesheet_updated webhook event to any subscribed endpoints. Defaults to false to preserve existing integration behaviour.","type":"boolean"}}},"TimesheetApprovalRequest":{"description":"Request body for approving a batch of timesheet entries by their IDs.","type":"object","properties":{"TimeSheetEntryIDs":{"description":"(Required) List of TimeSheetEntryIDs to approve. 1-500 unique positive integers.","type":"array","items":{"format":"int64","type":"integer"}},"ApprovalNote":{"description":"(Optional) Free-text approval note. Max 1000 characters. Currently accepted but not persisted.","type":"string"}}},"TimesheetApprovalBatchResponse":{"description":"Response envelope for batch approve and reject endpoints.","type":"object","properties":{"Summary":{"$ref":"#/definitions/TimesheetApprovalSummary","description":"Aggregate counts for the batch."},"Results":{"description":"One result entry per supplied TimeSheetEntryID, in the same order as the request.","type":"array","items":{"$ref":"#/definitions/TimesheetApprovalResultItem"}}}},"TimesheetApprovalSummary":{"description":"Aggregated counts for a batch approve or reject request.","type":"object","properties":{"Requested":{"format":"int32","description":"Number of TimeSheetEntryIDs supplied in the request.","type":"integer"},"Processed":{"format":"int32","description":"Number of entries the server inspected (always equals Requested).","type":"integer"},"Succeeded":{"format":"int32","description":"Number of entries that successfully transitioned to the target status.","type":"integer"},"AlreadyInTargetState":{"format":"int32","description":"Number of entries that were already in the target status.","type":"integer"},"Failed":{"format":"int32","description":"Number of entries that could not be processed (forbidden, not found, ineligible, invoiced/paid, etc).","type":"integer"}}},"TimesheetApprovalResultItem":{"description":"Per-entry result for a batch approve or reject request.","type":"object","properties":{"TimeSheetEntryID":{"format":"int64","description":"The TimeSheetEntryID supplied by the caller.","type":"integer"},"Status":{"description":"Result status: Approved, Rejected, AlreadyApproved, AlreadyRejected, or Failed.","type":"string"},"ActedByUserID":{"format":"int32","description":"UserID of the caller, populated only when the status changed as a result of this request.","type":"integer"},"ActedAt":{"format":"date-time","description":"UTC timestamp of the state change, populated only when the status changed as a result of this request.","type":"string"},"ErrorCode":{"description":"Machine-readable error code when Status=Failed.","type":"string"},"Message":{"description":"Human-readable failure message when Status=Failed.","type":"string"}}},"TimesheetRejectionRequest":{"description":"Request body for rejecting a batch of timesheet entries by their IDs.","type":"object","properties":{"TimeSheetEntryIDs":{"description":"(Required) List of TimeSheetEntryIDs to reject. 1-500 unique positive integers.","type":"array","items":{"format":"int64","type":"integer"}},"RejectionReason":{"description":"(Optional) Free-text rejection reason included in the rejection notification email. Max 1000 characters.","type":"string"},"SendNotifications":{"description":"(Optional) When true (default), sends the standard rejection notification email to each affected timesheet user. Set to false to suppress emails.","type":"boolean"}}},"TimesheetSummaryRequest":{"description":"Request parameters for generating aggregated timesheet statistics with optional multi-level grouping.","type":"object","properties":{"GroupBy":{"description":"(Optional) Combine one, two or three levels of Grouping. Combine these possible grouping values: \"Customer\", \"Project\", \"Category\", \"User\", \"Task\", \"Year\", \"Month\", \"Day\", \"Week\".","type":"array","items":{"type":"string"}},"EntryDateFrom":{"format":"date-time","description":"(Required) Filter for timesheets greater or equal to the specified date. e.g. 2019-01-25. You can optionally include a time component, otherwise it assumes 00:00","type":"string"},"EntryDateTo":{"format":"date-time","description":"(Required) Filter for timesheets with an entry date smaller or equal to the specified  date. e.g. 2019-01-25. You can optionally include a time component, otherwise it assumes 00:00","type":"string"},"UserID":{"description":"(Optional) Defaults to the current user. Provide one or more UserIDs of Users whose timesheets should be retrieved. If the current user doesn't have impersonation rights, then they will only see their own data.","type":"array","items":{"format":"int32","type":"integer"}},"ProjectID":{"format":"int32","description":"(Optional) Filter by Project","type":"integer"},"isBillable":{"description":"(Optional) Filter by the billable status of Timesheets.","type":"boolean"},"isInvoiced":{"description":"(Optional) Filter for timesheets by whether they have been Invoiced or not.","type":"boolean"},"TimesheetEntryApprovalStatusCode":{"description":"(Optional) Filter for timesheets that belong to one of the specified statuses (Draft, Pending, Approved, AutoApproved, Rejected)","type":"array","items":{"type":"string"}}}},"TimesheetSummaryResult":{"description":"Aggregated timesheet statistics for a date range, including total hours, billable hours, and grouped sub-totals.","type":"object","properties":{"EntryDateFrom":{"format":"date-time","description":"The start of the date range used for this summary.","type":"string"},"EntryDateTo":{"format":"date-time","description":"The end of the date range used for this summary.","type":"string"},"TotalHours":{"format":"double","description":"Total hours across all timesheet entries in the result set.","type":"number"},"BillableHours":{"format":"double","description":"Total billable hours across all timesheet entries in the result set.","type":"number"},"UserID":{"description":"The list of user IDs included in this summary.","type":"array","items":{"format":"int32","type":"integer"}},"GroupingLevels":{"description":"The grouping dimensions applied to this summary result.","type":"array","items":{"type":"string"}},"GroupData":{"description":"The grouped data rows, each representing totals for a grouping dimension value.","type":"array","items":{"$ref":"#/definitions/TimesheetSummaryGroup"}}}},"TimesheetSummaryGroup":{"description":"A group within aggregated timesheet data, representing totals for one grouping dimension (e.g. a specific project or user).","type":"object","properties":{"GroupID":{"description":"The ID of the group value (e.g. Project ID, User ID).","type":"string"},"GroupName":{"description":"The display name of the group value (e.g. project title, user name).","type":"string"},"TotalHours":{"format":"double","description":"Total hours for this group.","type":"number"},"BillableHours":{"format":"double","description":"Total billable hours for this group.","type":"number"},"GroupData":{"description":"Nested group data for the next grouping level, if applicable.","type":"array","items":{"$ref":"#/definitions/TimesheetSummaryGroup"}}}},"UserProfileIDRequest":{"description":"Request body for POST /api/UserProfile/Archive and POST /api/UserProfile/Unarchive.","type":"object","properties":{"UserID":{"format":"int32","description":"UserID of the existing UserProfile to archive or unarchive.","type":"integer"}}},"UserDetails":{"description":"A user/team member record with profile information, availability hours, billing rates, roles, and tags.","type":"object","properties":{"UserID":{"format":"int32","description":"Unique identifier for the user.","type":"integer"},"AccountIDFK":{"format":"int32","description":"The Avaza account this user belongs to.","type":"integer"},"Email":{"description":"User's email address.","type":"string"},"Firstname":{"description":"User's first name.","type":"string"},"Lastname":{"description":"User's last name.","type":"string"},"PositionTitle":{"description":"User's job title or position.","type":"string"},"Phone":{"description":"User's phone number.","type":"string"},"Mobile":{"description":"User's mobile phone number.","type":"string"},"TimeZone":{"description":"Windows Timezone ID","type":"string"},"IANATimezone":{"description":"IANA tz database timezone name","type":"string"},"isTeamMember":{"description":"Whether the user is an internal team member (true) or external contact (false).","type":"boolean"},"CompanyIDFK":{"format":"int32","description":"The company the user is associated with (for external contacts).","type":"integer"},"CompanyName":{"description":"Name of the user's associated company.","type":"string"},"DefaultBillableRate":{"format":"double","description":"The user's default billing rate per hour.","type":"number"},"DefaultCostRate":{"format":"double","description":"The user's default cost rate per hour.","type":"number"},"MondayAvailableHours":{"format":"double","description":"Available working hours on Mondays.","type":"number"},"TuesdayAvailableHours":{"format":"double","description":"Available working hours on Tuesdays.","type":"number"},"WednesdayAvailableHours":{"format":"double","description":"Available working hours on Wednesdays.","type":"number"},"ThursdayAvailableHours":{"format":"double","description":"Available working hours on Thursdays.","type":"number"},"FridayAvailableHours":{"format":"double","description":"Available working hours on Fridays.","type":"number"},"SaturdayAvailableHours":{"format":"double","description":"Available working hours on Saturdays.","type":"number"},"SundayAvailableHours":{"format":"double","description":"Available working hours on Sundays.","type":"number"},"Roles":{"description":"List of security roles assigned to the user.","type":"array","items":{"$ref":"#/definitions/RoleDetails"}},"Tags":{"description":"List of tags applied to the user for categorisation.","type":"array","items":{"$ref":"#/definitions/UserTagDetails"}}}},"RoleDetails":{"description":"A security role assigned to a user, with role code and display name.","type":"object","properties":{"RoleCode":{"description":"Unique code for the role (e.g. Admin, PM, TimesheetUser).","type":"string"},"RoleName":{"description":"Display name of the role.","type":"string"}}},"UserTagDetails":{"description":"A tag applied to a user for categorisation, with tag ID and name.","type":"object","properties":{"UserTagID":{"format":"int32","description":"Unique identifier for the user tag.","type":"integer"},"UserTagName":{"description":"Display name of the user tag.","type":"string"}}},"UserList":{"description":"Collection of users/team members in the Avaza account.","type":"object","properties":{"Users":{"description":"The list of user records.","type":"array","items":{"$ref":"#/definitions/UserDetails"}}}},"NewUserProfile":{"description":"Request body for POST /api/UserProfile. Creates a team member (CompanyIDFK = null) or a customer contact (CompanyIDFK set).","type":"object","properties":{"Email":{"description":"Email address. Must be a valid format and unique within the current account.","type":"string"},"Firstname":{"description":"First name. Max 100 characters.","type":"string"},"Lastname":{"description":"Last name. Max 100 characters.","type":"string"},"TimeZone":{"description":"Windows Time Zone ID (e.g. \"Pakistan Standard Time\"). If omitted, defaults to the account's timezone.","type":"string"},"CompanyIDFK":{"format":"int32","description":"If set, creates a Customer Contact linked to this Company. If null, creates a Team Member.","type":"integer"},"PositionTitle":{"description":"User's job title. Max 100 characters.","type":"string"},"Mobile":{"description":"Mobile phone number. Max 50 characters.","type":"string"},"Phone":{"description":"Phone number. Max 50 characters.","type":"string"},"DefaultBillableRate":{"format":"double","description":"Default billable rate per hour. Team members only. Must be non-negative.","type":"number"},"DefaultCostRate":{"format":"double","description":"Default cost rate per hour. Team members only. Must be non-negative.","type":"number"},"Roles":{"description":"Role codes to assign. Each entry must be a RoleCode from the Roles table that is assignable for the user type (UserAssignable=1 for team members, CustomerAssignable=1 for customer contacts). Empty/null = no roles (InvitationStatusCode = \"NoRoles\").","type":"array","items":{"type":"string"}},"SendInviteEmail":{"description":"If true and at least one role is assigned, sends an invitation email and sets InvitationStatusCode = \"InviteSent\". See spec for the full matrix.","type":"boolean"}}},"UpdateUserProfile":{"description":"Request body for PUT /api/UserProfile. Only fields named in FieldsToUpdate are written.","type":"object","properties":{"UserID":{"format":"int32","description":"UserID of the existing, non-archived UserProfile to update.","type":"integer"},"FieldsToUpdate":{"description":"Allowlist of field names to update (case-insensitive, matches JSON keys). Other fields in the payload are ignored.","type":"array","items":{"type":"string"}},"Email":{"description":"New email address. Must be a valid format and unique within the account. If changed, the GlobalUser link is rebuilt.","type":"string"},"Firstname":{"description":"New first name. Max 100 characters.","type":"string"},"Lastname":{"description":"New last name. Max 100 characters.","type":"string"},"TimeZone":{"description":"New Windows Time Zone ID.","type":"string"},"PositionTitle":{"description":"New position title. Max 100 characters.","type":"string"},"Mobile":{"description":"New mobile. Max 50 characters.","type":"string"},"Phone":{"description":"New phone. Max 50 characters.","type":"string"},"DefaultBillableRate":{"format":"double","description":"New default billable rate. Team members only. Non-negative.","type":"number"},"DefaultCostRate":{"format":"double","description":"New default cost rate. Team members only. Non-negative.","type":"number"},"Roles":{"description":"When included in FieldsToUpdate, fully replaces the existing role set (pass [] to remove all). Each entry must be a RoleCode that is valid for the user's existing type (UserAssignable=1 for team members, CustomerAssignable=1 for customer contacts).","type":"array","items":{"type":"string"}},"SendInviteEmail":{"description":"Only meaningful when Roles is in FieldsToUpdate. Drives invite-email behaviour after roles are replaced — see spec matrix.","type":"boolean"}}},"CreateSubscription":{"description":"New Subscription to be Created","required":["target_url","event"],"type":"object","properties":{"target_url":{"description":"The URL that should be notified of the event.","type":"string"},"event":{"description":"The event code to be notified about. Possible values: company_created, company_deleted, company_updated, contact_created, contact_deleted, contact_updated, invoice_created, invoice_sent, invoice_updated, invoice_deleted, project_created, project_deleted, project_updated, task_created, task_updated, task_deleted, timesheet_created, timesheet_deleted, timesheet_updated, bill_created, bill_updated, estimate_created, estimate_updated, estimate_deleted","type":"string"},"secret":{"description":"Optional Secret string (255 char max). If provided, the secret will be BASE 64 encoded and used as a basic authentication http header with webhook notifications. i.e. Authorization Basic [BASE64 of Secret]\"","type":"string"}}},"SubscribeResult":{"description":"Result of creating a webhook subscription, containing the new Subscription ID.","type":"object","properties":{"ID":{"format":"int32","description":"The ID of the newly created webhook subscription.","type":"integer"}}},"WebhookList":{"description":"Collection of active webhook subscriptions.","type":"object","properties":{"Webhooks":{"description":"The list of webhook subscriptions.","type":"array","items":{"$ref":"#/definitions/WebhookDetails"}}}},"WebhookDetails":{"description":"A webhook subscription including the subscribed event, callback URL, and owner user.","type":"object","properties":{"SubscriptionID":{"format":"int32","description":"Unique identifier for the webhook subscription.","type":"integer"},"EventCode":{"description":"The event type this webhook is subscribed to (e.g. 'task.created', 'invoice.created').","type":"string"},"NotificationURL":{"description":"The callback URL that receives webhook POST notifications.","type":"string"},"UserIDFK":{"format":"int32","description":"The user ID who created this webhook subscription.","type":"integer"}}}},"securityDefinitions":{"oauth2":{"type":"oauth2","description":"OAuth2 Implicit Grant","flow":"implicit","authorizationUrl":"https://any.avaza.com/oauth2/authorize","scopes":{"read_contacts":"Read access to Customers, Contacts","read_account":"Read access to Account metadata","read_users":"Read access to User Profiles","read_financials":"Read access to Estimates, Invoices, Payments, Credit Notes","read_projects":"Read access to Projects, Project Settings, Tasks","read_schedule":"Read access to Schedule Details","read_timesheets":"Read access to Timesheet Details","read_expenses":"Read access to Expense Details","write_contacts":"Write access to Customers, Contacts","write_account":"Write access to Account metadata","write_users":"Write access to User Profiles","write_financials":"Write access to Estimates, Invoices, Payments, Credit Notes","write_projects":"Write access to Projects, Project Settings, Tasks","write_schedule":"Write access to Schedule module","write_timesheets":"Write access to Timesheets module","write_expenses":"Write access to Expense module","upload_attachment":"Upload file attachments","webhook_notifications":"Read access to webhook notification events"}}}}