API Documentation

Welcome to the SyncoCRM API. This documentation provides information about how to integrate with our system, authenticate requests, and manage resources programmatically.

Base URL

https://www.synco-crm.cz/api/v1

Authentication

All API requests require a Personal Access Token (PAT). You can generate your tokens in the system settings under the API section.

Always keep your API tokens secure. Never share them or include them in client-side code.

Request Header

Authorization: Bearer YOUR_API_TOKEN

Profile

Information about the currently authenticated user and the token being used.

GET /me

Retrieve details about the current user and the API token used for the request.

User Profile Object

Field Type Description
id uuid Unique identifier of the user.
email string Email address.
firstName string User's first name.
lastName string User's last name.
roles array List of assigned security roles.
tokenName string The name of the API token used for this request.

Response Example

Status 200
{
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "roles": [
        "ROLE_USER",
        "ROLE_ADMIN"
    ],
    "tokenName": "My Development Token"
}

Dictionaries

Access system-wide lookup data such as countries, currencies, units, and VAT rates.

Note: Global system items are read-only. You can only create, update, or delete your own company-specific dictionary entries.
GET /dictionaries/countries

Retrieve a list of all supported countries.

Required Scope: core:dictionary:read

Country Object

Field Type Description
id uuid Unique identifier.
code string ISO 3166-1 alpha-2 code.
name string Localized country name.

Response Example

Status 200
[
    {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "code": "CZ",
        "name": "Czech Republic"
    }
]
GET /dictionaries/currencies

Retrieve a list of available currencies.

Required Scope: core:dictionary:read

Currency Object

Field Type Description
id uuid Unique identifier.
code string ISO 4217 code.
name string Full name.
symbol string Symbol (e.g. Kč, €).

Response Example

Status 200
[
    {
        "id": "...",
        "code": "CZK",
        "name": "Czech Koruna",
        "symbol": "Kč"
    }
]

Customers

Manage your customer database, including individual contacts and companies.

GET /customers

Retrieve a list of all customers.

Required Scope: customer:read

Customer Resource

Field Type Description
id uuid Unique identifier.
name string Primary name.
email string Contact email.
status string Current status.

Response Example

Status 200
[
    {
        "id": "...",
        "name": "Acme Corp",
        "status": "Active"
    }
]
GET /customers/{id}

Retrieve detailed information about a specific customer.

Required Scope: customer:read

Customer Resource

Field Type Description
id uuid Unique identifier.
name string Primary name.
companyName string Legal company name.
identificationNumber string Company ID (IČO).
vatNumber string VAT number (DIČ).
billable boolean Invoicing eligibility.

Response Example

Status 200
{
    "id": "...",
    "name": "Acme Corp"
}
POST /customers

Create a new customer.

Required Scope: customer:write

Request Body

Field Type Description
name string Required.
email string Primary email.

Response Example

Status 201
{
    "id": "...",
    "name": "New Customer"
}
PUT /customers/{id}

Update a customer record.

Required Scope: customer:write

Request Body (Partial support)

Field Type Description
name string Optional.
email string Optional.

Response Example

Status 200
{
    "id": "...",
    "name": "Updated Name"
}
DELETE /customers/{id}

Delete a customer record.

Required Scope: customer:write

Response Example

Status 204
[]

Projects

Manage projects and track budgets.

GET /projects

Retrieve all projects.

Required Scope: project:read

Project Resource

Field Type Description
id uuid Unique identifier.
name string Project name.
code string Reference code.

Response Example

Status 200
[
    {
        "id": "...",
        "name": "Website Redesign"
    }
]
GET /projects/{id}

Detailed project information.

Required Scope: project:read

Project Resource

Field Type Description
id uuid Unique identifier.
name string Name.
budget decimal Project budget.

Response Example

Status 200
{
    "id": "...",
    "name": "Website Redesign"
}
POST /projects

Create a new project.

Required Scope: project:write

Request Body

Field Type Description
customerId uuid Required.
name string Required.

Response Example

Status 201
{
    "id": "...",
    "name": "New Project"
}
PUT /projects/{id}

Update project details.

Required Scope: project:write

Response Example

Status 200
{
    "id": "...",
    "name": "Updated Project"
}
DELETE /projects/{id}

Delete a project.

Required Scope: project:write

Response Example

Status 204
[]

Tasks

Manage tasks within projects.

GET /tasks

Retrieve tasks.

Required Scope: project:read

Task Resource

Field Type Description
id uuid Unique identifier.
title string Title.
priority string LOW, MEDIUM, HIGH, URGENT

Response Example

Status 200
[
    {
        "id": "...",
        "title": "Setup Database"
    }
]
GET /tasks/{id}

Detailed task info.

Required Scope: project:read

Response Example

Status 200
{
    "id": "...",
    "title": "Setup Database"
}
POST /tasks

Create a new task.

Required Scope: project:write

Request Body

Field Type Description
projectId uuid Required.
title string Required.

Response Example

Status 201
{
    "id": "...",
    "title": "New Task"
}
PUT /tasks/{id}

Update task details.

Required Scope: project:write

Response Example

Status 200
{
    "id": "...",
    "title": "Updated Task"
}
DELETE /tasks/{id}

Delete a task.

Required Scope: project:write

Response Example

Status 204
[]

Price Quotes

Manage price quotes for potential or existing customers.

GET /price-quotes

Retrieve all price quotes.

Required Scope: price:quote:read

Price Quote Resource

Field Type Description
id uuid Unique identifier.
number string Quote number.
totalNet decimal Total without VAT.

Response Example

Status 200
[
    {
        "id": "...",
        "number": "PQ-2024001"
    }
]
GET /price-quotes/{id}

Detailed quote information.

Required Scope: price:quote:read

Response Example

Status 200
{
    "id": "...",
    "number": "PQ-2024001"
}
POST /price-quotes

Create a new price quote.

Required Scope: price:quote:write

Request Body

Field Type Description
customerId uuid Required.
items array List of quote items.

Response Example

Status 201
{
    "id": "...",
    "number": "PQ-2024002"
}
PUT /price-quotes/{id}

Update quote details.

Required Scope: price:quote:write

Response Example

Status 200
{
    "id": "...",
    "totalNet": "100.00"
}
DELETE /price-quotes/{id}

Delete a price quote.

Required Scope: price:quote:write

Response Example

Status 204
[]

Invoices

Manage invoices and billing.

GET /invoices

Retrieve all invoices.

Required Scope: invoicing:read

Invoice Resource

Field Type Description
id uuid Unique identifier.
number string Invoice number.
total decimal Total amount.

Response Example

Status 200
[
    {
        "id": "...",
        "number": "2024001"
    }
]
GET /invoices/{id}

Detailed invoice info.

Required Scope: invoicing:read

Response Example

Status 200
{
    "id": "...",
    "number": "2024001"
}
POST /invoices

Create a new invoice.

Required Scope: invoicing:write

Response Example

Status 201
{
    "id": "...",
    "number": "2024002"
}
PUT /invoices/{id}

Update an invoice (if not locked).

Required Scope: invoicing:write

Response Example

Status 200
{
    "id": "...",
    "total": "500.00"
}
DELETE /invoices/{id}

Delete an invoice (if not locked).

Required Scope: invoicing:write

Response Example

Status 204
[]

Time Tracking

Track time entries for projects and tasks.

GET /time-entries

Retrieve time entries.

Required Scope: time:tracking:read

Time Entry Resource

Field Type Description
id uuid Unique identifier.
userName string User who logged the time.
duration integer Duration in seconds.
date date Logged date.

Response Example

Status 200
[
    {
        "id": "...",
        "userName": "John Doe",
        "duration": 3600
    }
]
POST /time-entries

Create a new time entry.

Required Scope: time:tracking:write

Request Body

Field Type Description
projectId uuid Required.
taskId uuid Optional.
duration integer Required. Seconds.
date date Required.

Response Example

Status 201
{
    "id": "...",
    "duration": 3600
}
PUT /time-entries/{id}

Update a time entry.

Required Scope: time:tracking:write

Response Example

Status 200
{
    "id": "...",
    "duration": 7200
}
DELETE /time-entries/{id}

Delete a time entry.

Required Scope: time:tracking:write

Response Example

Status 204
[]