Introduction

This documentation aims to provide all the information you need to work with our API.

Authenticating requests

This API is not authenticated.

Authentication

Get the authenticated user and their team information.

GET
https://lumerel.com
/api/v1/user
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "[email protected]"
    },
    "team": {
        "id": 1,
        "name": "Team Name",
        "subdomain": "team"
    }
}

Clients

Get all clients with their associated team, projects, and tasks.

GET
https://lumerel.com
/api/v1/clients
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/clients" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "clients": [
        {
            "id": 1,
            "name": "Client Name",
            "email": "[email protected]",
            "phone": "+1234567890",
            "team": {
                "id": 1,
                "name": "Team Name"
            },
            "projects": [],
            "tasks": []
        }
    ]
}

Create a new client.

POST
https://lumerel.com
/api/v1/clients
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://lumerel.com/api/v1/clients" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Acme Corp\",
    \"email\": \"[email protected]\",
    \"phone\": \"+1234567890\"
}"
Example response:
{
  "client": {
    "id": 1,
    "name": "Acme Corp",
    "email": "[email protected]",
    "phone": "+1234567890",
  }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}

Update an existing client.

PUT
https://lumerel.com
/api/v1/clients/{client_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

client_id
integer
required

The ID of the client.

Example:
1
client
integer
required

The client ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://lumerel.com/api/v1/clients/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Acme Corp\",
    \"email\": \"[email protected]\",
    \"phone\": \"+1234567890\"
}"
Example response:
{
  "client": {
    "id": 1,
    "name": "Acme Corp",
    "email": "[email protected]",
    "phone": "+1234567890",
  }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}

Delete a client.

DELETE
https://lumerel.com
/api/v1/clients/{client_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

client_id
integer
required

The ID of the client.

Example:
1
client
integer
required

The client ID.

Example:
1
Example request:
curl --request DELETE \
    "https://lumerel.com/api/v1/clients/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "message": "Client deleted successfully"
}

Groups

Get all groups with their associated team, client, project, and tasks.

GET
https://lumerel.com
/api/v1/groups
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "groups": [
        {
            "id": 1,
            "name": "Development",
            "code": "DEV",
            "is_expanded": true,
            "client_id": 1,
            "project_id": 1,
            "team": {
                "id": 1,
                "name": "Team Name"
            },
            "client": {
                "id": 1,
                "name": "Client Name"
            },
            "project": {
                "id": 1,
                "name": "Project Name"
            },
            "tasks": []
        }
    ]
}

Create a new group.

POST
https://lumerel.com
/api/v1/groups
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://lumerel.com/api/v1/groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Development\",
    \"client_id\": 1,
    \"project_id\": 1,
    \"code\": \"DEV\",
    \"is_expanded\": true
}"
Example response:
{
    "group": {
        "id": 1,
        "name": "Development",
        "code": "DEV",
        "client_id": 1,
        "project_id": 1,
        "is_expanded": true
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Update an existing group.

PUT
https://lumerel.com
/api/v1/groups/{group_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

group_id
integer
required

The ID of the group.

Example:
1
group
integer
required

The group ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://lumerel.com/api/v1/groups/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Development\",
    \"client_id\": 1,
    \"project_id\": 1,
    \"code\": \"DEV\",
    \"is_expanded\": true
}"
Example response:
{
    "group": {
        "id": 1,
        "name": "Development",
        "code": "DEV",
        "client_id": 1,
        "project_id": 1,
        "is_expanded": true
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Delete a group.

DELETE
https://lumerel.com
/api/v1/groups/{group_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

group_id
integer
required

The ID of the group.

Example:
1
group
integer
required

The group ID.

Example:
1
Example request:
curl --request DELETE \
    "https://lumerel.com/api/v1/groups/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "message": "Group deleted successfully"
}

Invoices

Get all invoices with their associated team, client, line items, and payments.

GET
https://lumerel.com
/api/v1/invoices
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/invoices" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "invoices": [
        {
            "id": 1,
            "number": "00001",
            "total": 1000,
            "paid": 500,
            "balance": 500,
            "due_date": "2024-01-31",
            "client_id": 1,
            "team": {
                "id": 1,
                "name": "Team Name"
            },
            "client": {
                "id": 1,
                "name": "Client Name"
            },
            "lineItems": [],
            "payments": [],
            "status": "Created"
        }
    ]
}

Create a new invoice.

POST
https://lumerel.com
/api/v1/invoices
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://lumerel.com/api/v1/invoices" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"client_id\": 1,
    \"due_date\": \"2024-01-31\",
    \"discount\": 10
}"
Example response:
{
    "invoice": {
        "id": 1,
        "number": "00001",
        "client_id": 1,
        "due_date": "2024-01-31",
        "discount": 10,
        "total": 0,
        "paid": 0,
        "balance": 0
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Update an existing invoice.

PUT
https://lumerel.com
/api/v1/invoices/{invoice_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

invoice_id
integer
required

The ID of the invoice.

Example:
58
invoice
integer
required

The invoice ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://lumerel.com/api/v1/invoices/58" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"client_id\": 1,
    \"due_date\": \"2024-01-31\",
    \"discount\": 10
}"
Example response:
{
    "invoice": {
        "id": 1,
        "number": "00001",
        "client_id": 1,
        "due_date": "2024-01-31",
        "discount": 10,
        "total": 0,
        "paid": 0,
        "balance": 0
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Delete an invoice.

DELETE
https://lumerel.com
/api/v1/invoices/{invoice_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

invoice_id
integer
required

The ID of the invoice.

Example:
58
invoice
integer
required

The invoice ID.

Example:
1
Example request:
curl --request DELETE \
    "https://lumerel.com/api/v1/invoices/58" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "message": "Invoice deleted successfully"
}

Projects

Get all projects with their associated team, client, and tasks.

GET
https://lumerel.com
/api/v1/projects
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/projects" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "projects": [
        {
            "id": 1,
            "name": "Project Name",
            "description": "Project description",
            "status": "active",
            "client_id": 1,
            "team": {
                "id": 1,
                "name": "Team Name"
            },
            "client": {
                "id": 1,
                "name": "Client Name"
            },
            "tasks": []
        }
    ]
}

Create a new project.

POST
https://lumerel.com
/api/v1/projects
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://lumerel.com/api/v1/projects" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Website Redesign\",
    \"description\": \"Complete redesign of the company website\",
    \"client_id\": 1,
    \"status\": \"active\"
}"
Example response:
{
    "project": {
        "id": 1,
        "name": "Website Redesign",
        "description": "Complete redesign of the company website",
        "client_id": 1,
        "status": "active"
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Update an existing project.

PUT
https://lumerel.com
/api/v1/projects/{project}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

project
integer
required

The project ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://lumerel.com/api/v1/projects/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Website Redesign\",
    \"description\": \"Complete redesign of the company website\",
    \"client_id\": 1,
    \"status\": \"active\"
}"
Example response:
{
    "project": {
        "id": 1,
        "name": "Website Redesign",
        "description": "Complete redesign of the company website",
        "client_id": 1,
        "status": "active"
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "name": [
            "The name field is required."
        ],
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Delete a project.

DELETE
https://lumerel.com
/api/v1/projects/{project}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

project
integer
required

The project ID.

Example:
1
Example request:
curl --request DELETE \
    "https://lumerel.com/api/v1/projects/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "message": "Project deleted successfully"
}

Tasks

Get all tasks with their associated client, project, and time logs.

GET
https://lumerel.com
/api/v1/tasks
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/tasks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "tasks": [
        {
            "id": 1,
            "title": "Task Title",
            "description": "Task description",
            "status": "pending",
            "priority": "medium",
            "client_id": 1,
            "project_id": 1,
            "client": {
                "id": 1,
                "name": "Client Name"
            },
            "project": {
                "id": 1,
                "name": "Project Name"
            },
            "timeLogs": []
        }
    ]
}

Create a new task.

POST
https://lumerel.com
/api/v1/tasks
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

Body Parameters

Example request:
curl --request POST \
    "https://lumerel.com/api/v1/tasks" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Fix login bug\",
    \"description\": \"Users are unable to login with correct credentials\",
    \"client_id\": 1,
    \"project_id\": 1,
    \"status\": \"pending\",
    \"priority\": \"high\"
}"
Example response:
{
    "task": {
        "id": 1,
        "title": "Fix login bug",
        "description": "Users are unable to login with correct credentials",
        "client_id": 1,
        "project_id": 1,
        "status": "pending",
        "priority": "high"
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Update an existing task.

PUT
https://lumerel.com
/api/v1/tasks/{task_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

task_id
integer
required

The ID of the task.

Example:
38
task
integer
required

The task ID.

Example:
1

Body Parameters

Example request:
curl --request PUT \
    "https://lumerel.com/api/v1/tasks/38" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"Fix login bug\",
    \"description\": \"Users are unable to login with correct credentials\",
    \"client_id\": 1,
    \"project_id\": 1,
    \"group_id\": 1,
    \"status\": \"pending\",
    \"priority\": \"high\"
}"
Example response:
{
    "task": {
        "id": 1,
        "title": "Fix login bug",
        "description": "Users are unable to login with correct credentials",
        "client_id": 1,
        "project_id": 1,
        "group_id": 1,
        "status": "pending",
        "priority": "high"
    }
}
{
    "message": "The given data was invalid.",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "client_id": [
            "The selected client id is invalid."
        ]
    }
}

Delete a task.

DELETE
https://lumerel.com
/api/v1/tasks/{task_id}
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json

URL Parameters

task_id
integer
required

The ID of the task.

Example:
38
task
integer
required

The task ID.

Example:
1
Example request:
curl --request DELETE \
    "https://lumerel.com/api/v1/tasks/38" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "message": "Task deleted successfully"
}

Teams

Get all teams with their users.

GET
https://lumerel.com
/api/v1/teams
requires authentication

Headers

Content-Type
Example:
application/json
Accept
Example:
application/json
Example request:
curl --request GET \
    --get "https://lumerel.com/api/v1/teams" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
Example response:
{
    "teams": [
        {
            "id": 1,
            "name": "Team Name",
            "subdomain": "team",
            "users": [
                {
                    "id": 1,
                    "name": "John Doe",
                    "email": "[email protected]"
                }
            ]
        }
    ]
}