# Time logs

A time log is a chronological record of the events that take place while a vessel is calling a port. The time log is used to calculate how much time a vessel stayed at a port and if any of that time is considered as delay.

To retrieve and submit time logs, an authorized party can use the following endpoints.

# Data Model

Field Type Description
workspace reference ​ Workspace ID
parent reference ​ ID of the job document for this timelog
type Catalog reference Event type
category string event or delay
start datetime Date and time of the recorded event beginning
end datetime Date and time of the recorded event ending
notes string Additional comments, notes, etc.

# API

# List all time log events for a given job

GET /workspaces/{workspace_id}/jobs/{job_id}/timelog

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference

# Query parameters

​ Parameter Description Format Default
limit Maximum number of records to return integer
offset The number of records to skip integer 0
sort List of comma-separated ordering criteria field:asc|desc

# Create a time log event/delay record

POST /workspaces/{workspace_id}/jobs/{job_id}/timelog

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference

# Request body

See data model

# Request example:

hide code
{
    "type": {
        "name": "Vessel Arrived",
        "xref": "vessel_arrived"
    },
    "category": "event",
    "start": "2019-06-28T14:00:00.000Z",
    "end": "2019-06-28T14:05:00.000Z",
    "notes": ""
}

# Response example:

hide code
{
    "id": "8c5fa3f9-3128-49d8-bb7f-178e0cd5f4fb",
    "body": {
        "type": "d67fbd1c-c609-4051-a489-921a42e791b7",
        "category": "event",
        "start": "2019-06-28T14:00:00.000Z",
        "end": "2019-06-28T14:05:00.000Z",
        "notes": ""
    }
}

Creation of a time log adds missing records to the catalogs. Mapped catalogs include: methods, locations, transports, products, uom, tests, timelogEvents.

# Get a specific time log

GET /workspaces/{workspace_id}/jobs/{job_id}/timelog/{timelog_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
timelog_id Timelog id reference

# Response example:

hide code
{
    "type": "7a215032-bbf7-4f08-af8a-3b59f7f516f7",
    "category": "event",
    "start": "2019-06-28T14:00:00.000Z",
    "end": "2019-06-28T14:05:00.000Z",
    "notes": ""
}

# Update a time log

PATCH /workspaces/{workspace_id}/jobs/{job_id}/timelog/{timelog_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
timelog_id Timelog id reference

# Request body

See data model

# Request example:

hide code
{
    "category": "delay",
    "notes": "delayed"
}

# Response example:

hide code
{
    "type": "97b5f767-7d8d-40d7-b641-b0f82ffdb325",
    "category": "delay",
    "start": "2019-06-28T14:00:00.000Z",
    "end": "2019-06-28T14:05:00.000Z",
    "notes": "delayed"
}

# Delete a time log

DELETE /workspaces/{workspace_id}/jobs/{job_id}/timelog/{timelog_id}

# URL parameters

Parameter Description Format
workspace_id Integration workspace id reference
job_id Job id reference
timelog_id Timelog id reference

# Response example:

hide code
{
    "type": "7a215032-bbf7-4f08-af8a-3b59f7f516f7",
    "category": "event",
    "start": "2019-06-28T14:00:00.000Z",
    "end": "2019-06-28T14:05:00.000Z",
    "notes": ""
}
Last Updated: 5/11/2021, 6:25:06 PM