Laurel Time Service API

The Time Service is the core of the Laurel platform: it holds entries (the units of captured and enriched time), timers, and the reference data time is booked against — clients, initiatives (matters/engagements), code types and billing codes. It also carries the access restrictions and validation rules that decide who may bill to a matter and which codes are valid on it, and it is the surface a firm reads from to release reviewed time into billing. 241 operations across v1, v2 and v3, served from a region-specific host issued per customer.

OpenAPI Specification

laurel-time-openapi-original.json Raw ↑
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/initiative-props/recent": {
      "get": {
        "operationId": "InitiativeUsageController_findManyByRange_v1",
        "parameters": [
          {
            "name": "usedAfter",
            "required": true,
            "in": "query",
            "description": "the date to get initiative props that their used at time is greater than this date",
            "schema": {
              "format": "iso-date-time",
              "example": "2022-08-12T20:44:48Z",
              "type": "string"
            }
          },
          {
            "name": "usedOnOrBefore",
            "required": true,
            "in": "query",
            "description": "the date to get initiative props that their used at time is equal or less than this date",
            "schema": {
              "format": "iso-date-time",
              "example": "2022-08-12T20:44:48Z",
              "type": "string"
            }
          },
          {
            "name": "workDate",
            "required": false,
            "in": "query",
            "description": "When set (and restrictions are enabled), excludes recent initiatives restricted on this date.",
            "schema": {
              "format": "iso-date",
              "nullable": true,
              "example": "2022-08-12",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "items": {
                        "$ref": "#/components/schemas/PmsInitiativePropsResponseDto"
                      },
                      "type": "array"
                    },
                    {
                      "items": {
                        "$ref": "#/components/schemas/UserInitiativePropsResponseDto"
                      },
                      "type": "array"
                    }
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "Initiative Props"
        ]
      }
    },
    "/api/v2/initiative-props/recent": {
      "get": {
        "operationId": "InitiativeUsageController_findManyByRangeV2_v2",
        "parameters": [
          {
            "name": "usedAfter",
            "required": true,
            "in": "query",
            "description": "the date to get initiative props that their used at time is greater than this date",
            "schema": {
              "format": "iso-date-time",
              "example": "2022-08-12T20:44:48Z",
              "type": "string"
            }
          },
          {
            "name": "usedOnOrBefore",
            "required": true,
            "in": "query",
            "description": "the date to get initiative props that their used at time is equal or less than this date",
            "schema": {
              "format": "iso-date-time",
              "example": "2022-08-12T20:44:48Z",
              "type": "string"
            }
          },
          {
            "name": "workDate",
            "required": false,
            "in": "query",
            "description": "When set (and restrictions are enabled), excludes recent initiatives restricted on this date.",
            "schema": {
              "format": "iso-date",
              "nullable": true,
              "example": "2022-08-12",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/UserInitiativeDto"
                      },
                      {
                        "$ref": "#/components/schemas/PmsInitiativeDto"
                      }
                    ]
                  },
                  "type": "array"
                }
              }
            }
          }
        },
        "tags": [
          "Initiative Props"
        ]
      }
    },
    "/api/v1/initiative-props/{initiativeId}/recent": {
      "delete": {
        "operationId": "InitiativeUsageController_deleteManyByInitiativeId_v1",
        "parameters": [
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Initiative Props"
        ]
      }
    },
    "/api/v1/clients/{clientId}": {
      "get": {
        "operationId": "ClientController_findOneById_v1",
        "parameters": [
          {
            "name": "clientId",
            "required": true,
            "in": "path",
            "description": "client's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          }
        },
        "summary": "gets one client by its id",
        "tags": [
          "Clients"
        ]
      }
    },
    "/api/v1/customers/{customerId}/clients": {
      "get": {
        "operationId": "CustomerClientController_search_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "format": "int64",
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 150,
              "format": "int64",
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "minLength": 2,
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "name": "type",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "client",
                "parent"
              ]
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "callSign",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "clientIds",
            "required": false,
            "in": "query",
            "description": "Comma-separated client IDs or array (max 50)",
            "schema": {
              "minItems": 1,
              "maxItems": 50,
              "allOf": [
                {
                  "$ref": "#/components/schemas/Object"
                }
              ]
            }
          },
          {
            "name": "parentClientIds",
            "required": false,
            "in": "query",
            "description": "Comma-separated parent client IDs or array (max 50)",
            "schema": {
              "minItems": 1,
              "maxItems": 50,
              "allOf": [
                {
                  "$ref": "#/components/schemas/Object"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Clients"
        ]
      }
    },
    "/api/v1/customers/{customerId}/clients/external-id/{externalId}": {
      "get": {
        "operationId": "CustomerClientController_getByExternalId_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "externalId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Clients"
        ]
      }
    },
    "/api/v1/customers/{customerId}/clients/import": {
      "post": {
        "operationId": "CustomerClientController_import_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportCustomerClientDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "tags": [
          "Clients",
          "Public"
        ]
      }
    },
    "/api/v1/customers/{customerId}/clients/{clientId}": {
      "get": {
        "operationId": "CustomerClientController_getClient_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "clientId",
            "required": true,
            "in": "path",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "populate",
            "required": false,
            "in": "query",
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientDto"
                }
              }
            }
          }
        },
        "tags": [
          "Clients",
          "Clients"
        ]
      }
    },
    "/api/v1/customers/{customerId}/clients/override-compliance-rules/affected-count": {
      "post": {
        "operationId": "CustomerClientController_getAffectedCount_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverrideComplianceRulesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AffectedCountResponseDto"
                }
              }
            }
          }
        },
        "tags": [
          "Clients",
          "Clients"
        ]
      }
    },
    "/api/v1/customers/{customerId}/clients/override-compliance-rules": {
      "post": {
        "operationId": "CustomerClientController_overrideComplianceRules_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OverrideComplianceRulesDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "tags": [
          "Clients",
          "Clients"
        ]
      }
    },
    "/api/v1/code-types": {
      "get": {
        "operationId": "CodeTypeController_findMany_v1",
        "parameters": [
          {
            "name": "customerDefaultable",
            "required": false,
            "in": "query",
            "description": "return codes that are defaultable at the customer-level",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "userDefaultable",
            "required": false,
            "in": "query",
            "description": "return codes that are defaultable at the user-level",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "orderingSequence",
            "required": false,
            "in": "query",
            "description": "ordering sequence for UI sorting (alphanumeric)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeType"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Code Types"
        ]
      }
    },
    "/api/v1/code-types/{codeTypeId}": {
      "get": {
        "operationId": "CodeTypeController_findOneById_v1",
        "parameters": [
          {
            "name": "codeTypeId",
            "required": true,
            "in": "path",
            "description": "code type's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeType"
                }
              }
            }
          }
        },
        "tags": [
          "Code Types"
        ]
      }
    },
    "/api/v1/customers/{customerId}/code-types/import": {
      "post": {
        "operationId": "CustomerCodeTypeController_import_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportCustomerCodeTypeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "tags": [
          "Code Types",
          "Public"
        ]
      }
    },
    "/api/v1/customers/{customerId}/code-types": {
      "get": {
        "operationId": "CustomerCodeTypeController_findManyForCurrentCustomer_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "customerDefaultable",
            "required": false,
            "in": "query",
            "description": "return codes that are defaultable at the customer-level",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "userDefaultable",
            "required": false,
            "in": "query",
            "description": "return codes that are defaultable at the user-level",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "orderingSequence",
            "required": false,
            "in": "query",
            "description": "ordering sequence for UI sorting (alphanumeric)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeType"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Code Types"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives": {
      "get": {
        "operationId": "CustomerInitiativeController_search_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "page",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "format": "int64",
              "type": "number"
            }
          },
          {
            "name": "pageSize",
            "required": false,
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 150,
              "format": "int64",
              "type": "number"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "schema": {
              "minLength": 2,
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "name",
                "callSign",
                "createdAt",
                "updatedAt"
              ]
            }
          },
          {
            "name": "sortOrder",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "status",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive"
              ]
            }
          },
          {
            "name": "billingType",
            "required": false,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "billable",
                "non-billable"
              ]
            }
          },
          {
            "name": "initiativeIds",
            "required": false,
            "in": "query",
            "schema": {
              "minItems": 1,
              "maxItems": 50,
              "allOf": [
                {
                  "$ref": "#/components/schemas/Object"
                }
              ]
            }
          },
          {
            "name": "clientIds",
            "required": false,
            "in": "query",
            "schema": {
              "minItems": 1,
              "maxItems": 50,
              "allOf": [
                {
                  "$ref": "#/components/schemas/Object"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Initiatives"
        ]
      },
      "post": {
        "operationId": "CustomerInitiativeDtoController_createPmsInitiativeWithLaurelUser_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportCustomerInitiativeDto"
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/PmsInitiativeDto"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "InitiativeDto"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives/{initiativeId}": {
      "get": {
        "operationId": "CustomerInitiativeController_findOneById_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "tags": [
          "Initiatives"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives/import": {
      "post": {
        "operationId": "CustomerInitiativeController_import_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImportCustomerInitiativeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "tags": [
          "Initiatives",
          "Public"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives/{initiativeExternalId}/access": {
      "post": {
        "operationId": "CustomerInitiativeController_setInitiativeAccess_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeExternalId",
            "required": true,
            "in": "path",
            "description": "initiative's external id",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInitiativeAccessRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "tags": [
          "Initiatives",
          "Public"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives/{initiativeId}/internal-access": {
      "post": {
        "operationId": "CustomerInitiativeController_setInitiativeInternalAccess_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInitiativeInternalAccessRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PmsInitiativeAdminResponseDto"
                }
              }
            }
          }
        },
        "tags": [
          "Initiatives"
        ]
      },
      "get": {
        "operationId": "CustomerInitiativeController_getInitiativeInternalAccess_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "tags": [
          "Initiatives"
        ]
      },
      "delete": {
        "operationId": "CustomerInitiativeController_deleteInitiativeInternalAccess_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "tags": [
          "Initiatives"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives/{initiativeId}/internal-access/users": {
      "post": {
        "operationId": "CustomerInitiativeController_addInternalAccessUsers_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInternalAccessUsersRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InitiativeInternalAccessResponseDto"
                }
              }
            }
          }
        },
        "tags": [
          "Initiatives"
        ]
      },
      "delete": {
        "operationId": "CustomerInitiativeController_removeInternalAccessUsers_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInternalAccessUsersRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "tags": [
          "Initiatives"
        ]
      }
    },
    "/api/v1/customers/{customerId}/initiatives/{initiativeId}/internal-groups": {
      "post": {
        "operationId": "CustomerInitiativeController_setInitiativeInternalGroupRestrictions_v1",
        "parameters": [
          {
            "name": "customerId",
            "required": true,
            "in": "path",
            "description": "customer id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          },
          {
            "name": "initiativeId",
            "required": true,
            "in": "path",
            "description": "Initiative's id",
            "schema": {
              "format": "objectid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetInitiativeInternalGroupRestrictionsRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
        

# --- truncated at 32 KB (766 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/laurel/refs/heads/main/openapi/laurel-time-openapi-original.json