@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Avaza API Documentation
@base https://api.avaza.com
@version v1
@auth OAuth2
@endpoints 94
@hint download_for_search
@toc api(90), ScheduleSeries(4)

@group api
@endpoint GET /api/Account
@desc Account Details
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/Bill
@desc Gets list of Bills
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any, CompanyIDFK: any}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/Bill
@desc Create a new draft Bill
@required {model: map}
@returns(200) OK

@endpoint GET /api/Bill/{id}
@desc Gets a Bill by Bill ID
@required {id: any # Bill Transaction ID number}
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/BillPayment
@desc Gets list of Bill Payments
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1.}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/BillPayment
@desc Create new Bill Payment and optionally assign payment allocations to Bills
@required {model: map}
@returns(200) OK

@endpoint GET /api/BillPayment/{id}
@desc Gets a Bill Payment by Payment Transaction ID
@required {id: any # Invoice Transaction ID Number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/Company/Lookup
@desc Gets minimal list of Companies.
@optional {pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., search: any # Search string to match against Company title}
@returns(200) OK

@endpoint GET /api/Company
@desc Gets list of Companies
@optional {UpdatedAfter: any, pageSize: any # Number of results per page, pageNumber: any # 1 based page number to retrieve, Sort: any # (optional) Supply one of: "DateUpdated", "DateCreated", "CompanyName","DateUpdated desc","DateCreated desc", "CompanyName desc"}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/Company
@desc Update a Company record.
@required {model: map}
@returns(200) OK

@endpoint POST /api/Company
@desc Create a Company
@required {model: map}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/Company/{id}
@desc Gets Company by Company ID
@required {id: any # Company ID Number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/Contact
@desc Gets list of Contacts
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any, CompanyIDFK: any}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/Contact
@desc Create a Contact
@required {model: map}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/Contact/{id}
@desc Gets Contact by Contact ID
@required {id: any # Contact ID number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/CreditNote
@desc Gets list of CreditNotes
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1.}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/CreditNote/{id}
@desc Gets Credit Note by CreditNoteID
@required {id: any # Credit Note ID Number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/Currency
@desc Gets list of Currencies
@returns(200) Success

@endpoint GET /api/Estimate
@desc Gets list of Estimates
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any, CompanyIDFK: any}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/Estimate
@desc Create a new draft Estimate
@required {model: map}
@returns(200) OK

@endpoint GET /api/Estimate/{id}
@desc Gets Estimate by Estimate ID
@required {id: any # Estimate Estimate ID number}
@errors {401: Unauthorized, 404: Not Found}

@endpoint POST /api/Expense/Attachment
@required {File: any # Upload software package}
@returns(200) OK

@endpoint POST /api/ExpenseApproval/Submit
@desc Submit Expenses for Approval.
@required {ExpenseIDs: [int(int64)] # A collection of ExpenseID's that should be submitted for approval. If not provided, submits all verified expenses for approval.}
@optional {UserID: any # 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., SendNotifications: any # Send email alerts to expense approvers. Defaults to true}
@returns(200) OK

@endpoint GET /api/Expense
@desc Gets list of Expenses
@optional {UpdatedAfter: any, ExpenseDateFrom: any, ExpenseDateTo: any, UserEmail: any, UserID: any, CategoryName: any, CustomerID: any, ProjectID: any, isChargeable: any, isInvoiced: any, ExpenseReimbursementIDFK: any, ExpensePaymentMethodIDFK: any, ExpenseApprovalStatusCode: any, Search: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/Expense
@desc Update an Expense
@required {model: map}
@returns(200) OK

@endpoint POST /api/Expense
@desc Create an Expense
@required {model: map}
@returns(200) OK

@endpoint DELETE /api/Expense
@desc Delete Expense Entries
@required {ExpenseIDs: [int(int64)] # A collection of ExpenseIDs to delete}
@returns(200) OK

@endpoint GET /api/Expense/{id}
@desc Gets an Expense Entry by Expense ID
@required {id: any # Expense ID number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/ExpenseCategory
@desc Gets list of Expense Categories
@optional {isEnabled: any # Optional filter on for enabled/disabled categories. Defaults to true.}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/ExpenseGroup/Lookup
@desc Gets minimal list of Expense Groups.
@optional {pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., search: any # Search string to match against Expense Group Name}
@returns(200) OK

@endpoint GET /api/ExpenseMerchant/Lookup
@desc Gets minimal list of Expense Merchants.
@optional {pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., search: any # Search string to match against Expense Group Name}
@returns(200) OK

@endpoint GET /api/ExpensePaymentMethod/Lookup
@desc Gets minimal list of Expense Payment Methods.
@returns(200) OK

@endpoint GET /api/ExpenseSummary
@desc Gets Basic Summary of Expense Statistics
@optional {model.groupBy: any # (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"., model.expenseDateFrom: any # (Required) Filter for expenses with expense dates greater or equal to the specified date. e.g. 2019-01-25., model.expenseDateTo: any # (Required) Filter for expenses with an expense date smaller or equal to the specified  date. e.g. 2019-01-25., model.userID: any # (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., model.projectID: any # (Optional) Filter by Project}
@returns(200) OK

@endpoint GET /api/FixedAmount
@desc Gets list of Fixed Amounts
@optional {UpdatedAfter: any, ProjectID: any # (Optional) The ProjectID of a Project to filter Fixed Amounts for, TaskID: any # (Optional) The TaskID of a Task to filter Fixed Amounts for, isInvoiced: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any # Optional sorting instruction. Currently possible values: "DateUpdated", "DateCreated", "DateUpdated desc", "DateCreated desc","EntryDate", "EntryDate desc", "StartTimeLocal","StartTimeLocal desc", "TimeSheetEntryID", "TimeSheetEntryID desc"}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/Inventory
@desc Gets list of Inventory
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1.}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/Inventory/{id}
@desc Gets InventoryItem by InventoryItem ID
@required {id: any # InventoryItem ID number}
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/Invoice
@desc Gets list of Invoices
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., TransactionStatusCode: any, IssueDateFrom: any, IssueDateTo: any, DueDateFrom: any, DueDateTo: any, Sort: any, CompanyIDFK: any}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/Invoice
@desc Update an Invoice
@required {model: map}
@returns(200) OK

@endpoint POST /api/Invoice
@desc Create a new draft invoice
@required {model: map}
@returns(200) OK

@endpoint GET /api/Invoice/{id}
@desc Gets Invoice by Invoice ID
@required {id: any # Invoice Transaction ID number}
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/Payment
@desc Gets list of Payments
@optional {InvoiceTransactionID: any # Filter for Payments that have at least one allocation against a given Invoice Transaction ID, UpdatedAfter: any # Filter for Payments updated after a given date, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1.}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/Payment
@desc Create new Payment and optionally assign payment allocations to Invoices
@required {model: map}
@returns(200) OK

@endpoint GET /api/Payment/{id}
@desc Gets Payment by Payment Transaction ID
@required {id: any # Invoice Transaction ID Number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/Project/Lookup
@desc Gets minimal list of active Projects for the current user
@optional {pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., TimesheetUserID: any # Optionally Filter to the projects that the supplied UserID can add timesheets to, CompanyIDFK: any # Optionally Filter for a specific Company ID, search: any # Optional Search string to match against Project title and Customer name, ProjectCode: any # Optional string to exact match against Project Code}
@returns(200) OK

@endpoint GET /api/Project
@desc Gets list of Projects
@optional {UpdatedAfter: any # Only show project records updated after a certain date (UTC), pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any # A column to sort on. Current possible values: "DateUpdated", "DateCreated", "DateUpdated desc", "DateCreated desc", TimesheetUserID: any # Filter to the projects that the supplied UserID can add timesheets to, CompanyID: any, ProjectCategoryID: any, ProjectOwnerUserID: any, ProjectStatusCode: any, ProjectBillableTypeCode: any, ProjectBudgetTypeCode: any, DateCreatedFrom: any, DateCreatedTo: any, includeArchived: any # Include Archived Projects in the results}
@returns(200) OK

@endpoint PUT /api/Project
@desc Update an Project
@required {model: map}
@returns(200) OK

@endpoint POST /api/Project
@desc Create a Project
@required {model: map}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/Project/{id}
@desc Gets Project by Project ID
@required {id: any # Project ID number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/ProjectMember
@desc Gets list of Project Members
@optional {ProjectID: any # Get Project members filtered by ProjectID, UserID: any # Get Project members filtered by UserID}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/ProjectMember
@desc Update a Member of a Project
@required {model: map}
@returns(200) OK

@endpoint POST /api/ProjectMember
@desc Assign a user as a Member of a Project
@required {model: map}
@returns(200) OK

@endpoint GET /api/ProjectTimesheetCategory
@desc Gets list of Project Timesheet Categories
@optional {ProjectID: any # Get categories filtered by ProjectID}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/ProjectTimesheetCategory
@desc Update a TimeSheetCategory on a Project.
@required {model: map}
@returns(200) OK

@endpoint POST /api/ProjectTimesheetCategory
@desc Assign a TimeSheetCategory to a Project.
@required {model: map}
@returns(200) OK

@endpoint GET /api/RecurringInvoice
@desc Gets list of Recurring Invoices
@optional {UpdatedAfter: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any, CompanyIDFK: any}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint GET /api/RecurringInvoice/{id}
@desc Gets RecurringInvoice by ID
@required {id: any # Recurring Invoice Profile ID number}
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/ScheduleAssignment
@desc Gets list of Schedule Assignments.
@optional {UpdatedAfter: any # Limit results to records updated after the specified date, ScheduleDateFrom: any # Filter for schedule assignement  that are  on or after a specific date, ScheduleDateTo: any # Filter for schedules that are on or before a specific date, ScheduleSeriesID: any # Filter to records for a particular Schedule Series, UserID: any # 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., UserEmail: any # The email of the user who has been scheduled, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any # Optional sorting instruction. Currently possible values: "DateUpdated", "DateCreated", "DateUpdated desc", "DateCreated desc"}
@returns(200) Success
@errors {401: Unauthorized}

@endgroup

@group ScheduleSeries
@endpoint POST /ScheduleSeries/AddBooking
@desc Create new Schedule Booking
@required {model: map}
@returns(200) OK

@endpoint POST /ScheduleSeries/AddLeave
@desc Create new Leave Booking
@required {model: map}
@returns(200) OK

@endpoint PUT /ScheduleSeries/EditLeave
@desc Edit Leave Booking
@required {model: map}
@returns(200) OK

@endpoint PUT /ScheduleSeries/EditBooking
@desc Edit Booking
@required {model: map}
@returns(200) OK

@endgroup

@group api
@endpoint GET /api/ScheduleSeries
@desc Gets list of Schedule Series
@optional {UpdatedAfter: any # Limit results to records updated after the specified date, ScheduleStartDateFrom: any # Filter for schedules that start on or after a specific date, ScheduleStartDateTo: any # Filter for schedules that start on or before a specific date, ScheduleEndDateFrom: any # Filter for schedules that end on or after a specific date, ScheduleEndDateTo: any # Filter for schedules that end on or before a specific date, UserID: any # 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., UserEmail: any # The email of the user who has been scheduled, TimeSheetCategoryID: any # Filter for schedule records linked to a specific timesheeet category, TimeSheetCategoryName: any # Filter for schedule records with a specific timesheeet category name (exact string match), LeaveTypeID: any # Filter to records of a particular leave type, ProjectID: any # Filter to only include books linked to a specific project, CompanyID: any # Filter to only include records linked to projects, where that project belongs to a specific customer company, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., Sort: any # Optional sorting instruction. Currently possible values: "DateUpdated", "DateCreated", "DateUpdated desc", "DateCreated desc"}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/ScheduleSeries
@desc Retrieves a list of Schedule Series. This Http Post version adds a ScheduleSeriesIDs collection filter.
@required {seriesFilter: map}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint DELETE /api/ScheduleSeries/{id}
@desc Delete a Schedule Series entry
@required {id: any # The ID of the Schedule Series to delete}
@returns(200) OK

@endpoint GET /api/Section
@desc Gets list of Sections
@required {ProjectID: any # Get sections for Project with ProjectID}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint POST /api/Section
@desc Create a Section
@required {model: map}
@returns(200) OK

@endpoint DELETE /api/Section
@desc Delete a Section
@required {SectionID: any}
@returns(200) OK

@endpoint GET /api/Task/Lookup
@desc Gets minimal list of Tasks for the current user
@required {projectID: any # (required) The ProjectID to use when filtering Tasks}
@optional {pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., hideCompleted: any # (optional) true/false to hide completed tasks. Defaults false, search: any # (optional) Search string to match against Task title. Performs begins-with match}
@returns(200) OK

@endpoint GET /api/Task
@desc Gets list of Tasks
@optional {UpdatedAfter: any # Optional filter to records updated after a specific date., pageSize: any # Number of items per page. Defaults to 20., pageNumber: any # Page to display. Starts from 1. Defaults to 1, Sort: any # Optional sorting instruction. Currently possible values: "DateUpdated", "DateCreated", "DateUpdated desc", "DateCreated desc", "SectionTitle", "Title", isComplete: any # Optional filter to only display tasks linked to a Task Status where isComplete=false, or where isComplete=true, ProjectID: any # Optional filter to only display tasks belonging to a specific ProjectID, TaskStatusCode: any # Optional filter to only display tasks with a specific status, TaskPriorityCode: any # Optional filter to only display tasks with a specific priority, DueDateFrom: any # Optional filter to only display tasks with a Due Date after DueDateFrom, DueDateTo: any # Optional filter to only display tasks with a Due Date before DueDateTo, AssignedToUserIDs: any # Optional filter to only display tasks with at least one of the provided UserIDs set as the Assigned User.}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/Task
@desc Update a Task.
@required {model: map}
@returns(200) OK

@endpoint POST /api/Task
@desc Create a Task
@required {model: map}
@returns(200) OK

@endpoint DELETE /api/Task
@desc Delete a Task
@required {TaskID: any}
@returns(200) OK

@endpoint GET /api/Task/{id}
@desc Gets Task by Task ID
@required {id: any # Task ID number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint GET /api/TaskDiscussion
@desc Gets list of Task Discussion Messages
@required {TaskID: any # The TaskID of the Task to retrieve messages for}
@optional {pageSize: any # The max number of responses to return in this page, startItem: any # the ReponseID of the comment from which the page of results should start.}
@returns(200) Success

@endpoint GET /api/TaskStatus
@desc Gets list of Task Statuses
@returns(200) Success

@endpoint GET /api/TaskType
@desc Gets list of Task Types
@returns(200) Success

@endpoint GET /api/Tax
@desc Get List of Taxes configured in the Avaza account.
@returns(200) OK

@endpoint GET /api/Timesheet/deleted
@desc Retrieves deleted (tombstone) timesheet entries. Admin access only.
@optional {UserID: any # Filter by user ID, DeletedAfter: any # Filter entries deleted after this UTC date, EntryDateFrom: any # Filter by original timesheet entry date (start), EntryDateTo: any # Filter by original timesheet entry date (end), Sort: any # Sort expression (e.g. 'DeletedDate desc', 'EntryDate'), PageSize: any # Number of items per page, PageNumber: any # Page number (starts from 1)}
@returns(200) OK

@endpoint GET /api/Timesheet
@desc Gets list of Timsheets
@optional {UpdatedAfter: any, EntryDateFrom: any, EntryDateTo: any, UserID: any # The UserID of a timesheet user to filter timesheets for. Only api users with certain higher roles can see timesheets across multiple users., UserEmail: any, CategoryName: any, TimesheetEntryApprovalStatusCode: any, ProjectID: any, TaskID: any, isBillable: any, isInvoiced: any, isTimerRunning: any, pageSize: any # Number of items per page (max 1000), pageNumber: any # Page to display. Starts from 1., includeInvoiceDetails: any # Defaults to false. When true, the InvoiceIDFK value will be included in the response., Sort: any # Optional sorting instruction. Currently possible values: "DateUpdated", "DateCreated", "DateUpdated desc", "DateCreated desc","EntryDate", "EntryDate desc", "StartTimeLocal","StartTimeLocal desc", "TimeSheetEntryID", "TimeSheetEntryID desc"}
@returns(200) Success
@errors {401: Unauthorized}

@endpoint PUT /api/Timesheet
@desc Update a Timesheet
@required {model: map}
@returns(200) OK

@endpoint POST /api/Timesheet
@desc Create a new Timesheet Entry
@required {model: map}
@returns(200) OK

@endpoint GET /api/Timesheet/{id}
@desc Gets a Timesheet Entry by Timesheet ID
@required {id: any # Timesheet ID number}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint DELETE /api/Timesheet/{id}
@desc Delete a Timesheet Entry
@required {id: any # The id of the timesheet entry to be deleted}
@returns(200) OK

@endpoint POST /api/TimesheetSubmission
@desc Submit Timesheets for Approval.
@optional {SendNotifications: any # Send email alerts to timesheet approvers. Defaults to true, WholeWeekOf: any # 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., WholeDayOf: any # A date (yyyy-MM-dd) to submit all timesheets on this day, UserID: any # 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.}
@returns(200) OK

@endpoint GET /api/TimesheetSummary
@desc Gets Basic Summary of Timesheet Statistics
@optional {model.groupBy: any # (Optional) Combine one, two or three levels of Grouping. Combine these possible grouping values: "Customer", "Project", "Category", "User", "Task", "Year", "Month", "Day", "Week"., model.entryDateFrom: any # (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, model.entryDateTo: any # (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, model.userID: any # (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., model.projectID: any # (Optional) Filter by Project, model.isBillable: any # (Optional) Filter by the billable status of Timesheets., model.isInvoiced: any # (Optional) Filter for timesheets by whether they have been Invoiced or not., model.timesheetEntryApprovalStatusCode: any # (Optional) Filter for timesheets that belong to one of the specified statuses (Draft, Pending, Approved, AutoApproved, Rejected)}
@returns(200) OK

@endpoint GET /api/TimesheetTimer
@desc Gets the  Running Timer if there is one for a user.
@optional {UserID: any # 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}
@returns(200) Success
@errors {401: Unauthorized, 404: Not Found}

@endpoint POST /api/TimesheetTimer/{id}
@desc Starts a Timer running on an existing Timesheet Entry
@required {id: any # id of timesheet entry that should be used as the basis for running a timer. If the existing timesheet is not on the current day, or you have start/end times enabled, then a new timesheet will be created for the timer.}
@optional {UserID: any # 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}
@returns(200) Success
@errors {400: Bad Request, 401: Unauthorized, 404: Not Found}

@endpoint DELETE /api/TimesheetTimer/{id}
@desc Stop the timer running on an existing Timesheet Entry
@required {id: any # The ID of the existing timesheet entry that needs its timer stopped}
@optional {UserID: any # 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}
@returns(200) Success
@errors {400: Bad Request, 401: Unauthorized, 404: Not Found}

@endpoint GET /api/UserProfile
@desc Get Collection of Users who have roles in the current Avaza account.
@optional {Roles: any # Optional list of comma separated role codes to filter users by (e.g. "TimesheetUser,Admin"), Tags: any, CurrentUserOnly: any # Optional boolean (true/false) to filter to only show current authenticated user (always true for non Admin/Finance Manager users), CompanyIDFK: any # Optionally filter by Company ID, Email: any # Optionally filter by user email address}
@returns(200) OK

@endpoint GET /api/Webhook
@desc Get list of Webhook Subscriptions
@returns(200) OK

@endpoint POST /api/Webhook
@desc Subscribe to Webhook. On success, returns ID of webhook subscription.
@required {model: map}
@returns(201) Subscription created
@errors {401: Unauthorized, 409: Duplicate subscription already exists}

@endpoint DELETE /api/Webhook
@desc Delete webhook subscription by URL
@required {target_url: any # Target URL that should be used to delete subscriptions}
@returns(200) Subscription Deleted OK
@errors {401: Unauthorized}

@endpoint GET /api/Webhook/{id}
@desc Get Webhook Subscription by SubscriptionID
@required {id: any}
@returns(200) OK

@endpoint DELETE /api/Webhook/{id}
@desc Delete Webhook Subscription by ID
@required {id: any # Subscription id to be deleted}
@returns(200) Subscription deleted ok
@errors {401: Unauthorized}

@endgroup

@end
