POST
/
timmi-timesheet
/
api
/
timesheets
/
{id}
/
approve
curl --request POST \
  --url https://{account}-{sandboxName}.sandbox.{server}.luccasoftware.com/timmi-timesheet/api/timesheets/{id}/approve \
  --header 'Content-Type: application/json' \
  --data '{
  "transfers": [
    {
      "transferAuthorizationId": 2,
      "amount": {
        "iso": "PT7H30M",
        "unit": "day"
      },
      "comment": "<string>"
    }
  ]
}'
[
  {
    "id": 123,
    "exceptionMessage": "<string>",
    "startsOn": "2023-12-25",
    "endsOn": "2023-12-25",
    "expectedNextActor": {},
    "status": "<string>"
  }
]

Path Parameters

id
integer
required

timesheet id

Body

transfers
object[]

If you want to edit the original Transfer, send a new Transfer with the new duration. To cancel a transfer, send a Transfer with a duration of PT0S. To keep the same original transfer, send an empty array.

Define the amount to be transferred from the debited account to the credited account of referenced transferAuthorization.

Two Timesheet accounts can be linked with a transfer authorization, allowing upon timesheet submission or approval workflow steps to adjust a certain duration amount from the to-be-debited account to the to-be-credited account.

Such transfer authorization must be setup at the statute level.

Response

200
application/json
OK
id
integer

Unique id of the WorkflowItem.

exceptionMessage
string

Any human readable error message.

startsOn
string

The Timesheet the WorkflowItem is related on starting date (included).

endsOn
string

The Timesheet the WorkflowItem is related on ending date (excluded).

expectedNextActor
object

A Directory 'User'. See API reference for up-to-date attributes.

status
string
  • "success" for a succesfull workflow operation.
  • "error" if any error was met, and therefore an excetion message is set.
  • "noAction" if the workflow operation was not performed.

Was this page helpful?