Skip to main content
POST
/
v1
/
org
/
time-reports
/
system-time-types
/
{system_integration_id}
Create System Time Type
curl --request POST \
  --url https://api.twine.se/v1/org/time-reports/system-time-types/{system_integration_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "traits": {
      "comment_as_child_name": false,
      "enabled": true,
      "must_be_full_day": true,
      "unit": "day"
    },
    "external_type_id": "42",
    "type_code": "VAC",
    "type_name": "Vacation"
  }
}
'
{
  "data": {
    "id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "inserted_at": "2023-01-15T13:45:30Z",
    "org_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "source_system": "twine",
    "system_integration_id": "018eae56-8f9d-7ca0-bea3-17f3db6cf75b",
    "traits": {
      "comment_as_child_name": false,
      "enabled": true,
      "must_be_full_day": true,
      "unit": "day"
    },
    "updated_at": "2023-01-20T09:15:00Z",
    "external_type_id": "42",
    "type_code": "VAC",
    "type_name": "Vacation"
  }
}

Authorizations

Authorization
string
header
required

Bearer token for authentication

Path Parameters

system_integration_id
string
required

Body

application/json

SystemTimeTypeUpsertRequest

System Time Type upsert request schema.

data
SystemTimeUpsertType · object
required

System Time Type upsert schema. Used to create or update an existing system time type. source_system cannot be specified and will instead by derived from the system integration ID.

Response

Response

A single System Time Type

data
SystemTimeType · object
required

System Time Type schema. Describes either local time types defined for the Twine integration, or remote time types fetched from external systems. These time types represent both absence/leave and attendance. Note that type_code and external_type_id are not required nor strictly defined and may be null depending on the source system's capabilities. Consider them as optional identifiers that can help map time types between Twine and external systems.