Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
time-tracking
/
time-entries
Create time entry
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/time-tracking/time-entries \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "date": "2023-12-25",
  "duration_minutes": 123,
  "external_id": "<string>",
  "service_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "service_external_id": "<string>",
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_external_id": "<string>",
  "billable": false,
  "description": "<string>",
  "memo": "<string>",
  "metadata": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "service": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "external_id": "<string>",
    "account_identifier": {
      "type": "AccountId",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    },
    "ledger_account": {
      "id": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "name": "Current Assets",
      "account_number": "4000",
      "stable_name": {
        "type": "StableName",
        "stable_name": "CURRENT_ASSETS"
      },
      "normality": "CREDIT",
      "account_type": {
        "value": "ASSET",
        "display_name": "Asset"
      },
      "account_subtype": {
        "value": "BANK_ACCOUNTS",
        "display_name": "Current Assets"
      }
    },
    "billable_rate_per_minute_amount": 123,
    "memo": "<string>",
    "metadata": {},
    "deleted_at": "2023-11-07T05:31:56Z"
  },
  "date": "2023-12-25",
  "duration_minutes": 123,
  "billable": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "external_id": "<string>",
  "customer": "<unknown>",
  "description": "<string>",
  "invoice_line_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "memo": "<string>",
  "metadata": {},
  "deleted_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

businessId
string<uuid>
required

The UUID of the business

Body

application/json
date
string<date>
required

The date the work was performed

duration_minutes
integer
required

Duration of the time entry in minutes

external_id
string | null

An optional external identifier. If provided and a time entry with this external_id already exists, the existing entry will be updated.

service_id
string<uuid>

The UUID of the service. Either service_id or service_external_id must be provided.

service_external_id
string

The external ID of the service. Either service_id or service_external_id must be provided.

customer_id
string<uuid> | null

The UUID of the customer to bill (optional)

customer_external_id
string | null

The external ID of the customer to bill (optional)

billable
boolean
default:false

Whether this time entry is billable

description
string | null

Description of the work performed

memo
string | null

Optional memo or notes

metadata
object

Custom metadata

Response

Time entry already exists and was updated

id
string<uuid>
required

The unique identifier of the time entry

business_id
string<uuid>
required

The UUID of the business this time entry belongs to

service
object
required

The service this time entry is associated with

date
string<date>
required

The date the work was performed

duration_minutes
integer
required

Duration of the time entry in minutes

billable
boolean
required

Whether this time entry is billable

created_at
string<date-time>
required

Timestamp when the time entry was created

updated_at
string<date-time>
required

Timestamp when the time entry was last updated

external_id
string | null

An optional external identifier for the time entry

customer
any | null

The customer this time entry is billed to (optional)

description
string | null

Description of the work performed

invoice_line_item_id
string<uuid> | null

The invoice line item ID if this time entry has been invoiced

memo
string | null

Optional memo or notes

metadata
object

Custom metadata

deleted_at
string<date-time> | null

Timestamp when deleted, or null if not deleted