API Documentation

Download OpenAPI specification:Download

Introduction

Welcome to the Karlia API documentation !

Karlia is a powerful CRM platform that brings together everything you need to better optimize your productivity in one easy-to-use tool.

The Karlia API is built around a RESTful architecture and allows you to customize, modify and integrate your Karlia organization and external services.

Authentication

Bearer token

In order to log in, you need to generate an API key via the Karlia website:

  1. Sign in with your existing account.
  2. Once logged in, click on your initial in the upper right corner.
  3. Select "Settings".
  4. In the "API" section, click on the "Use API" button. Then a unique API key will then be generated.

The API use Bearer Authorization in request header.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "xxxxxx-xxxxxx-xxxx-xxxxxx-xxxxxx"

Customers

This section lists all customer-related APIs.

List

Get a list of all customers.

Authorizations:
query Parameters
quick_search
string <= 127 characters

Quick search field
If this field is filled in, the other search fields are not taken into account. The search is then performed in the entire customer database.

name
integer <= 127 characters

Search by name

prospect
integer

Search by status

0 = Client
1 = Prospect

individual
integer

Search by type

0 = Professional
1 = Individual

client_number
string <= 30 characters

Search by client number

phone
string <= 30 characters

Search by phone number

mobile
string <= 30 characters

Search by mobile number

email
string <email> <= 127 characters

Search by email

id_client_manager
string

Search by user with group Id associated with the customer

langId
integer

Search by language

1 = French
2 = English
3 = Spanish

siret
string <= 30 characters

Search by SIRET

siren
string <= 30 characters

Search by SIREN

vat_number
string <= 30 characters

Search by VAT number

fields
string

List of fields to be returned. By default, all fields are returned.
Each field must be separated by a comma without space.

order
string <= 64 characters

Name of the field to sort on

direction
string <= 4 characters

Direction for sorting

ASC = Ascending, from A to Z.
DESC = Descending, from Z to A.

limit
integer
Default: 100

Number of objects to be returned for paging

offset
integer
Default: 0

Offset for paging

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "pagination": {
    },
  • "data": [
    ]
}

Create

Create a customer.

Authorizations:
Request Body schema: application/json
name
required
string <= 127 characters

Name for professional customer or lastname for individual customer

individual
integer

Customer type

0 = Professional
1 = Individual

id_civility
integer

Customer civility - Only for individual customer

1 = Mr
2 = Ms

firstname
string <= 127 characters

Customer firstname - Only for individual customer

prospect
integer

Customer status

0 = Client
1 = Prospect

phone
string <= 30 characters

Customer phone number

mobile
string <= 30 characters

Customer mobile number

email
string <email> <= 127 characters

Customer email address

id_client_manager
Array of strings <= 30 characters

Users with group Id associated with the customer

langId
integer

Customer language

1 = French
2 = English
3 = Spanish

siret
string <= 30 characters

Customer SIRET

siren
integer <= 30 characters

Customer SIREN

legal_form
string <= 255 characters

Customer status

main_activity
string <= 255 characters

APE/NAF code

vat_number
string <= 30 characters

VAT number

default_discount_percent
number <double>

Default discount

id_document_template
integer
id_payment_condition
integer

Id of payment condition

0 = Not filled in

id_vat
integer

VAT Id

-1 = Not filled in

description
string <= 255 characters

Customer description

client_number
string <= 30 characters

Internal number

Array of objects[ items ]

Custom fields

main_address
string <= 255 characters

Main address

main_zip_code
string <= 64 characters

ZIP code of main address

main_city
string <= 127 characters

City of main address

main_country
string <= 64 characters

Country of main address

delivery_title
string <= 127 characters

Name or company name of delivery address

delivery_address
string <= 255 characters

Delivery address

delivery_zip_code
string <= 64 characters

ZIP code of delivery address

delivery_city
string <= 127 characters

City of delivery address

delivery_country
string <= 64 characters

Country of delivery address

invoice_title
string <= 127 characters

Name or company name of invoice address

invoice_address
string <= 255 characters

Invoice address

invoice_zip_code
string <= 64 characters

ZIP code of invoice address

invoice_city
string <= 127 characters

City of invoice address

invoice_country
string <= 64 characters

Country of invoice address

Responses

Request samples

Content type
application/json
{
  • "name": "Society X",
  • "individual": 0,
  • "id_civility": "",
  • "firstname": "",
  • "prospect": 0,
  • "phone": "+33512345678",
  • "mobile": "07 98 76 54 32",
  • "email": "contact@example.com",
  • "id_client_manager": [
    ],
  • "langId": 1,
  • "siret": "123 568 941 00056",
  • "siren": "123 568 941",
  • "legal_form": "SARL",
  • "main_activity": "4616C",
  • "vat_number": "FR 32 123456789",
  • "default_discount_percent": 10.5,
  • "id_document_template": "",
  • "id_payment_condition": "0",
  • "id_vat": "-1",
  • "description": "A description or note about this customer",
  • "client_number": 123,
  • "custom_fields": [
    ],
  • "main_address": "55 Av. Louis Breguet",
  • "main_zip_code": 31400,
  • "main_city": "Toulouse",
  • "main_country": "France",
  • "delivery_title": "My delivery address",
  • "delivery_address": "1 place du Capitole",
  • "delivery_zip_code": 31000,
  • "delivery_city": "Toulouse",
  • "delivery_country": "France",
  • "invoice_title": "My invoice address",
  • "invoice_address": "55 Rue du Faubourg Saint-Honoré",
  • "invoice_zip_code": 75000,
  • "invoice_city": "Paris",
  • "invoice_country": "France"
}

Response samples

Content type
application/json
{
  • "id": "28496",
  • "title": "Society X",
  • "individual": "0",
  • "prospect": "0",
  • "id_client_manager": [
    ],
  • "phone": "+33512345678",
  • "mobile": "07 98 76 54 32",
  • "email": "contact@example.com",
  • "langId": "1",
  • "siret": "123 568 941 00056",
  • "siren": "123 568 941",
  • "legal_form": "SARL",
  • "main_activity": "4616C",
  • "vat_number": "FR 32 123456789",
  • "id_parent": "0",
  • "id_products_prices_category": "0",
  • "id_payment_condition": "0",
  • "id_vat": "-1",
  • "description": "A description or note about this customer",
  • "client_number": "123",
  • "address_list": [