Mavenlink

Timesheet Submission

TimesheetSubmissions hold a set of time entries for a specified week, which can be approved or rejected. TimesheetSubmission can be turned on through a project setting. Once turned on time entries must be approved through a TimesheetSubmission before it is invoiceable.

TimesheetSubmissions objects have the following readable attributes:

  • title - The title of the TimesheetSubmission.
  • user - The creator of the TimesheetSubmission.
  • workspace - The owning workspace of the TimesheetSubmission.
  • resolution_description - The description of the last resolution applied to the TimesheetSubmission.
  • line_item_total_formatted - A formatted currency total of the total time.
  • line_item_total_in_cents - The total time in cents.
  • currency - The symbol of the currency.
  • currency_symbol - The symbol of the currency.
  • currency_base_unit - The currency base unit.
  • current_resolution_description The most recent resolution's comment.
  • current_resolution_creator_id The most recent resolution's creator.
  • current_resolution_created_at_date The date of the most recent resolution.

Getting a Single TimesheetSubmission

You can access a single TimesheetSubmission through the API as follows:

curl "https://app.mavenlink.com/api/v1/timesheet_submissions/1"

The resulting JSON will be the TimesheetSubmission that has an id of 1.

Creating a new TimesheetSubmission

Mavenlink TimesheetSubmissions belong to a Workspace and take the following parameters:

  • line_item_ids - The associated submission time_entry - required".
  • title - A descriptive title of the submission - required".
  • workspace_id - The ID of the workspaces that owns the submission - required".
  • comment - A comment describing the submission.

You can create story tasks as follows:

curl -X POST -d "timesheet_submission[line_item_ids]=[5]" -d "timesheet_submission[title]=A new submission" -d "timesheet_submission[workspace_id]=1" "https://app.mavenlink.com/api/v1/timesheet_submissions"

Associated Objects

You can include the time_entries associations with the include param.

  • time_entries - An array of TimeEntries within the submission
  • workspace - The submissions's workspace

Resolutions

TimesheetSubmissions can be approved, rejected, or canceled.

Approve

You can approve a TimesheetSubmission by accessing the approve endpoint.

curl -X PUT -d "resolution[description]=I am approving this" "https://api.mavenlink.com/api/v1/timesheet_submissions/1/approve"

Reject

You can reject a TimesheetSubmission by accessing the reject endpoint.

 curl -X PUT -d "resolution[description]=I am rejecting this" "https://api.mavenlink.com/api/v1/timesheet_submissions/1/reject"

Cancel

You can cancel a TimesheetSubmission by accessing the cancel endpoint.

 curl -X PUT -d "resolution[description]=I am canceling this" "https://api.mavenlink.com/api/v1/timesheet_submissions/1/cancel"