Costlocker guide
  • GETTING STARTED
    • What is Costlocker and who is it for
    • Registration and Company setup
    • Quick start in 5 steps
      • 1. Add People
      • 2. Create Activities
      • 3. Create Clients
      • 4. Create Projects
      • 5. Time Tracking
    • What's next?
  • Projects
    • Managing a Project
      • Creating a Project
      • Creating a Project by Duplication
      • Auto ID
      • Tags
      • Responsible People
      • Discount on the project
      • Project Billing
      • Finishing a Project
      • Exporting the Budget
      • Locking a Project
    • Recurring project
      • Creating a Recurring Project
      • Working with a Recurring Project
      • Manually Duplicating a Recurring Project
    • Types of Budgets
    • Project Detail
      • Overview
      • Report
      • Alerts
      • Cost Estimate
      • Billing
      • Rates
      • Business Reports
      • Timesheet
      • Notes
    • Project Expenses
      • Project Expenses Report
    • Billable vs. Non-Billable Hours
  • People
    • Adding people
    • User Roles
    • Activating / Deactivating a Person
    • Salary
    • Bonuses
    • Calculating an Employee's Hourly Rate
  • Activities
    • Creating Activities
    • Activating / Deactivating an Activity
  • CLIENTS
    • Creating a Client
    • Activating / Deactivating a Client
    • Setting Default Client Rates
  • Time Tracking
    • Time Tracking
  • Timesheet
    • Daily Time Entry
    • Weekly Time Entry
    • Timesheet Views
      • Summary
      • Day by Day
      • Weekly
      • Live
  • Reports
    • Company Performance
    • Report of Finished Project
    • Workload
    • Business Reports
    • Project Expenses
    • Billing
  • Profitability
  • Your Company
    • Basic Overviews
    • Alerts
    • Overhead Costs
    • Fixed and Monthly Rate
    • Calculation of Overhead Cost per Worked Hour
    • Analysis Cost Allocation in projects
  • Settings
    • My Account
    • Desktop Application
    • Company
    • Groups
    • API
  • Applications
    • MacOS Application
    • Windows application
    • iOS Mobile Application
  • Integrations
    • Integration with Make
    • API
  • Subscription
    • Trial period
    • Switching to a Paid Account
    • Subscription Settings
    • Billing email adress
Powered by GitBook
On this page
  • Basic Information
  • REST API
  • GraphQL
  • Authorization
  • API Token
  • JWT Token
  • Deprecation and Warning Handling
  1. Integrations

API

PreviousIntegration with MakeNextTrial period

Last updated 6 months ago

For simple integrations, we recommend using the make.com integration, which we regularly maintain.

If you want to program your own integration, here you will find the basic necessary information.

Basic Information

Costlocker currently offers 2 APIs - REST and GraphQL.

REST API

The original Costlocker API, whose operation will be terminated on March 31, 2025.

You can find the original documentation on Apiary .

If you need help migrating to the new API, please contact our support.

GraphQL

Costlocker now uses the GraphQL API, which powers our Frontend - you can use it to perform anything available in the user interface.

GraphQL documentation is available directly at the API endpoint itself - https://api.costlocker.com/graphql

Authorization

The GraphQL API utilizes two methods of authorization:

API Token

The basic form uses the Personal API Token for authorization. To authorize, you need to use the following header:

Authorization: Static ${PERSONAL_API_TOKEN}

JWT Token

The second option uses a JWT Token, generated by the backend upon login (mutation Login). It uses a set of two headers:

Authorization: JWT ${JWT_TOKEN}
Person-Id: ${personId}

With the JWT Token, the Person-Id header is also used because Costlocker is a multi-tenant platform, allowing you to have multiple accounts under a single login. The Person ID is the ID from the People module (visible in the URL parameter).

Deprecation and Warning Handling

The GraphQL API does not use versioning but instead marks individual queries/mutations or fields as deprecated and subsequently removes them.

Warnings then contain information about the deprecation of the queries/mutations or their fields you are using:

{
    β€œdata”: …,
    β€œerror”: …,
    β€œextras”: null | {
        β€œwarnings”: null | string
    }
}

Deprecation information is formatted as follows:

DEPRECATED: Field ${FIELD_NAME} is deprecated: ${DEPRECATION_DETAILS}

For example:

DEPRECATED: Field revenue_loss is deprecated: Use field metrics.revenue_loss instead. Will be removed on 03/31/2025.

Migration to GraphQL is not yet complete - if you do not find the necessary endpoint that would be equivalent to the original REST API, please contact us.

To monitor these changes, we recommend implementing warning logging into a logging tool, such as Sentry .

All responses from the Costlocker API may include Extensions with a warnings attribute.

πŸ”—
πŸ”—
πŸ”—
πŸ”—