Skip to main content

Ladu20 andmesideliides (L20_API)

API structure

Ladu20 API is REST based, queries are processed via CURL POST requests.

API base URL: henceforth BASEURL, will be provided by KMA.
API key: henceforth APIKEY, will be provided by KMA
Request data is posted in CURLOPT_POSTFIELDS as JSON.

HTTP header Content-Type needs to be set to application/json

PHP sample request
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://baseurl/product',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"id":"21161"}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'x-api-key: APIKEY'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

Getting data from Ladu20

API requests serve data from Ladu20 by predefined filterable POST requests. Filter parameters are defined per request

Customer data

URL: apiurl/customer

Filter parameters
PARAMETER NAME TYPE DESCRIPTION
last_update string format: 2023-10-11T00:00:00
old bit  
id string customer id
page int 1-n, default 1
rowcount int 1-300, default 300
Response
FIELD NAME TYPE DESCRIPTION
customer_code int  
main_customer_code int payer customer code
receiving_customer_code int  
last_update date format: 2023-10-11T00:00:00, created date
name string  
reg_code string  
vat_in_use int  
vat_no string  
is_private_person boolean  
customer boolean customer status
supplier boolean customer status
producer boolean customer status
transporter boolean customer status
owner string  
info string  
phone string  
address1 string street
address2 string city
address3 string county
postcode string  
country string  
language string  
email string  
currency decimal  
bank string bank name
bankaccount string  
ref_no int reference no
glncode int  
lat int latitude
long int longitude
credit_limit decimal  
debt_min_amount decimal  
debt_from int debt from days
owner_customer string