sprTimeSheetJournals

Prev Next

Represents timesheet journals (spr) in Business Central.

Method Return Type Description
GET sprTimeSheetJournals sprTimeSheetJournals Gets a timesheet journal object.
DELETE sprTimeSheetJournals none Deletes a timesheet journal object.
POST sprTimeSheetJournals sprTimeSheetJournals Creates a timesheet journal object.
PATCH sprTimeSheetJournals sprTimeSheetJournals Updates a timesheet journal object.

The timesheet journal resource type offers bound actions:

  1. Microsoft.NAV.deleteJournalLines which deletes the related journal lines. This is illustrated in the following example: POST ..companies({id})/sprTimeSheetJournals({id})/Microsoft.NAV.deleteJournalLines The response has no content, success response code is 204.
  2. Microsoft.NAV.postJournalLines which converts related journal lines to time sheet entries. Journal lines are then deleted, but the journal is not deleted. POST ..companies({id})/sprTimeSheetJournals({id})/Microsoft.NAV.postJournalLines The response has no content, success response code is 204.
Navigation Return Type Description
sprTimeSheetJournalLines Collection(sprTimeSheetJournalLine) Gets the timesheet journal lines of the journal.
Property Type Description Relation to
systemId Guid Specifies the timesheet journal's ID. Non-editable.
name String[10] Specifies the timesheet journal's name.
description String[50] Specifies the timesheet journal's description.
Post Journal

Entries created in Journal and Journal Lines has no effect to payroll calculation until Journal is Posted. Call bound action Microsoft.NAV.postJournalLines on sprTimeSheetJournals API

POST URI: /companies({{companyId}})/sprTimeSheetJournals

Request

{
    "name": "2511301300",
    "description": "2025-11-30 13:00"
}
JSON

POST URI: /companies({{companyId}})/sprTimeSheetJournals?$expand=sprTimeSheetJournalLines($expand=sprDimensionSetLines)

Request

{
    "name": "2511291300",
    "description": "2025-11-29 13:00"
    "sprTimeSheetJournalLines" : [
        {
            "changeType": "2",
            "employeeId": "{{employeeId}}",
            "activityCode": "DD",
            "dateFrom": "2025-11-01",
            "dateTo": "2025-11-05",
            "hours": 8,
            "sprDimensionSetLines": [
                {
                    "id": "2595b73b-74e5-ec11-9449-000d3aac342b",
                    "code": "PADALINYS",
                    "valueId": "1a03b6c0-74e5-ec11-9449-000d3aac342b",
                    "valueCode": "ADM"
                },
                {
                    "id": "2695b73b-74e5-ec11-9449-000d3aac342b",
                    "code": "REGIONAS",
                    "valueId": "1d0bbaae-74e5-ec11-9449-000d3aac342b",
                    "valueCode": "AUKŠTAITIJA"
                }
            ]
        },
        {
            "changeType": "2",
            "employeeId": "{{employeeId}}",
            "activityCode": "P",
            "dateFrom": "2025-11-06",
            "sprDimensionSetLines": []
        },
        {
            "changeType": "2",
            "employeeId": "{{employeeId}}",
            "activityCode": "P",
            "dateFrom": "2025-11-07",
        }
    ]
}
JSON

POST URI: /companies({{companyId}})/sprTimeSheetJournals({{timeSheetJournalId}})/Microsoft.NAV.postJournalLines

Request and Response

No request body.
No response body on success.
Standard response body on error.
Plain text