Updates multiple time entries using the operation.

POSThttps://api.awork.com/api/v1/timeentries/batch/{operation}
POST https://api.awork.com/api/v1/timeentries/batch/{operation}

Updates multiple time entries using the operation. Each requested change is reported separately.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Path parameters

operationstringRequired

The batch operation type.

Request body Required

The time entry batch operation data.

application/json

timeEntryIdsarray of stringRequired
maxItems: 1000

Time entry IDs to change, with at most 1000 entries per request.

newTypeOfWorkIdstring or nullOptional
format: uuid

The id of the new type of work. Required for operation 'setTypeOfWork'.

isBillableboolean or nullOptional

Set the billable flag for time entries. Required for operation 'setIsBillable'.

isBilledboolean or nullOptional

Set the billed flag for time entries. Required for operation 'setIsBilled'.

requireAllTimeEntriesbooleanOptional

Whether the operation must leave every requested time entry unchanged when any entry cannot be updated.

newUserIdstring or nullOptional
format: uuid

The id of the new user to assign the time entries to. Required for operation 'setUser'.

newProjectIdstring or nullOptional
format: uuid

The id of the new project to assign the time entries to. Required for operation 'setProject'.

newTaskIdstring or nullOptional
format: uuid

The id of the new task to assign the time entries to. Required for operation 'setTask'.

Responses

207 Multi-Status

application/json

okobjectOptional

The entity IDs with the same batch operation outcome.

Show 1 properties
idsarray of string or nullOptional

The affected entity IDs.

notFoundobjectOptional

The entity IDs with the same batch operation outcome.

Show 1 properties
idsarray of string or nullOptional

The affected entity IDs.

unauthorizedobjectOptional

The entity IDs with the same batch operation outcome.

Show 1 properties
idsarray of string or nullOptional

The affected entity IDs.

badRequestobjectOptional

The entity IDs with the same batch operation outcome.

Show 1 properties
idsarray of string or nullOptional

The affected entity IDs.

400 Bad Request

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

404 Not Found

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation