NAV
Samples

Introduction

sticky.de offers you JSON API access so that you can access your company or user profile to automate calls or processes.

Endpoints

We provide our API in production as well as in a sandbox environment.

Production System

https://app.sticky.de

Sandbox System

https://dvl.sticky.de

Please note:

Authentication

Sample request

curl -X POST https://dvl.sticky.de \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Sticky-Token: 2a3b301d-73c9-e31b-eab4-xxxxxxxxxxxx" \
-H "Sticky-User: 5ef5d753a91766xxxxxxxxxx" \
-H "Sticky-Company: 2f8c1f2bcfa625xxxxxxxxxx" \
-d '{
    ... JSON payload ...
}
'

Authentication on the Sticky API always consists of three different "tokens". These three tokens are specified as HTTP headers with each call. API access is disabled for users by default. You can activate the API for your account in your profile under the API access menu item, where you will also find the three tokens.

Tokens

Title Datatype Length Description
Sticky-Token string 36-digits This token is your personal secret
Sticky-User string 24-digits This token identifies the user context
Sticky-Company string 24-digits This token identifies the company context

In Sticky, it is of course possible for you as a user to have access to multiple companies with a single account. For this reason, you specify both your user context (which user rights you want to act with) and a company context (which company you want to act in) in an API call.

Logging

All API calls (including all parameters) are logged in your company log.

Encoding

We expect RAW data without any HTML entity masking or similar.

Characters such as &, <, >, ”, ' are processed without any corresponding HTML masking. Responses also contain the RAW version.

Request

Sample cURL request

curl -X POST https://dvl.sticky.de \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Sticky-Token: 2a3b301d-73c9-e31b-eab4-xxxxxxxxxxxx" \
-H "Sticky-User: 5ef5d753a91766xxxxxxxxxx" \
-H "Sticky-Company: 2f8c1f2bcfa625xxxxxxxxxx" \
-d '{
    "m": "articles",
    "method": "create_article",
    "msg": {
        "title": "Reifen",
        "type": "product",
        "unit_name": "Stück",
        "price_net": 16.99,
        "tax_rate": 19
    }
}
'

Sample PHP request

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => 'https://dvl.sticky.de',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        "Content-Type: application/json",
        "Accept: application/json",
        "Sticky-Token: 2a3b301d-73c9-e31b-eab4-xxxxxxxxxxxx",
        "Sticky-User: 5ef5d753a91766xxxxxxxxxx",
        "Sticky-Company: 2f8c1f2bcfa625xxxxxxxxxx",
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "m" => "articles",
        "method" => "create_article",
        "msg" => [
            'title' => 'Reifen',
            'type' => 'product',
            'unit_name' => 'Stück',
            'price_net' => 16.99,
            'tax_rate' => 19
        ]
    ]),
]);

$response = json_decode(curl_exec($ch), true);
print_r($response);

Sample Javascript request

"use strict";

let api_request = await fetch("https://dvl.sticky.de", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Accept": "application/json",
        "Sticky-Token": '2a3b301d-73c9-e31b-eab4-xxxxxxxxxxxx',
        "Sticky-User": '5ef5d753a91766xxxxxxxxxx',
        "Sticky-Company": '2f8c1f2bcfa625xxxxxxxxxx'
    },
    body: JSON.stringify({
        m: "articles",
        method: "create_article",
        "msg": {
            "title": "Reifen",
            "type": "product",
            "unit_name": "Stück",
            "price_net": 16.99,
            "tax_rate": 19
        }
    })
});

let response = await api_request.json();
console.log(response);

Our API expects basic POST requests with a JSON payload and the following properties.

Property Datatype Required Description
m string Yes used "module"
method string Yes used "method"
msg string / object / bool No depend on method
id string No depend on method

Response

Sample response payload

{
    "src": "server",
    "time": 1656960905,
    "module": "articles",               
    "method": "create_article",
    "msg": "ok",
    "id": "103ed61f-2b76-4780-a0a0-8421750a7b15",
}

Sample response payload with an array as payload

{
    "src": "server",
    "time": 1656960905,
    "module": "articles",
    "method": "get_all",
    "msg": [
        { "id": 1234, "title": "Datensatz Titel 1", ... },
        { "id": 1235, "title": "Datensatz Titel 2", ... }
    ],
    "id": ""
}

Sample response payload with an error

{
    "src": "server",
    "time": 1656960905,
    "module": "system",
    "method": "access",
    "msg": "ERROR_API_INVALID_USER",
    "id": "",
    "error": 1
}

Endpoints return JSON formated responses with the following properties.

Property Datatype Required Description
src string Yes source of this packet. Here it is "server" every time
time int Yes serverside timestamp at packet creation
module string Yes used module
method string Yes used method
msg string / array / object Yes the response to your request
id string Yes if a new resource has been created, its ID is returned.
error bool No true if an error occurs, otherwise this property did not exists

Scopes: Modules

Here you will find a list of all documented endpoints. If you find something missing, just let us know or send us an email at support@sticky.de.

We are sure that the endpoint you are looking for already exists, but it has not yet anybody wrote it into the documentation ;-}

Articles

Create article

Sample request

{
    "m": "articles",               
    "method": "create_article",
    "msg": {
        "title": "Reifen",
        "type": "product",
        "unit_name": "Stück",
        "price_net": 16.99,
        "tax_rate": 19
    }
}

Sample response

{
    "src": "server",
    "time": 1757673247,
    "module": "articles",
    "method": "create_article",
    "msg": "ok",
    "id": "103ed61f-2b76-4780-a0a0-8421750a7b15"
}
Property Datatype Required Description
m string Yes static: articles
method string Yes static: create_article
msg object Yes see article - msg object

Article - msg object

Property Datatype Required Description
title string Yes
description string No
type string Yes service or product
article_number string No has to be unique. Maximum length is 18 chars.
gtin string No GTIN (Global Trade Item Number)
note string No
unit_name string Yes if the unit does not yet exist, it will be created automatically.
price_net float Yes
tax_rate int Yes 0, 7 or 19

Possible error messages

Contacts

Update customer number

Updates the customer number for a contact who has not been booked.

Vouchers

Create invoice

Sample request

{ 
    "m": "vouchers",
    "method": "create_invoice", 
    "msg": { 
        "date": "31.01.2024",
        "title": "Rechnung",
        "header": "Unsere Lieferungen/Leistungen stellen wir Ihnen wie folgt in Rechnung.", 
        "footer": "Vielen Dank für die gute Zusammenarbeit", 
        "contact": "6560566ed737c363eb3ce4d2", 
        "address": {
            "address_supplement": "2345",
            "street": "Blumenstraße 43", 
            "zip": "77777", 
            "city": "Blumenstadt"
        }, 
        "delivery_type": "serviceperiod", 
        "delivery_date": "31.01.2024", 
        "delivery_date_end": "29.02.2024", 
        "billing_label": "SEPA Lastschrift", 
        "billing_days": "14",
        "language": "de",
        "items": [
            {
                "title": "Textposition", 
                "description": "Description"
            }, 
            {
                "title": "Artikel 1", 
                "description": "Hochwertig", 
                "quantity": 34, 
                "unit": "Stück", 
                "price": 12, 
                "taxrate": 19, 
                "discount": 0
            }
        ]
    }
}

Sample response

{ 
    "src": "server",
    "time": 1706700087,
    "module": "vouchers",
    "method": "create_invoice",
    "msg": "ok",
    "id": "900365ec-25a7-467a-92a8-09d0ac57c0a5"
}

Create a new invoice

Property Datatype Required Description
m string Yes static: vouchers
method string Yes static: create_invoice
msg object Yes see invoice - msg object

Invoice - msg object

Property Datatype Required Description
date string Yes (format: dd.mm.yyyy)
title string Yes
header string Yes
footer string Yes
contact string Yes Id of the customer
address object No see invoice - address object. If empty default address from contact will be used
delivery_type string Yes service, delivery, serviceperiod, deliveryperiod or none
delivery_date string Depends (format: dd.mm.yyyy) required if delivery_type is not equal none
delivery_date_end string Depends (format: dd.mm.yyyy) required if delivery_type is not equal none
billing_label string Yes
billing_days string Yes
draft bool No default is false
language bool No de, en. default is de
items array Yes see invoice - item object

Invoice - address object

Property Datatype Required Description
supplement string No
street string Yes
zip string Yes
city string Yes

Invoice - item object

Text-position

Property Datatype Required Description
title string Yes
description string No

Article-Position

Property Datatype Required Description
id string No Sticky-articleId
title string Yes
description string No
quantity float Yes
unit string Yes
price int / float Yes net-price
taxrate int / float Yes
discount int / float No default is 0

Possible error messages

Create invoice (asynchron)

Sample request

{ 
    "m": "vouchers",
    "method": "create_invoice_async", 
    "msg": { 
        "date": "31.01.2024",
        "title": "Rechnung",
        "header": "Unsere Lieferungen/Leistungen stellen wir Ihnen wie folgt in Rechnung.", 
        "footer": "Vielen Dank für die gute Zusammenarbeit", 
        "contact": "6560566ed737c363eb3ce4d2", 
        "address": {
            "address_supplement": "2345",
            "street": "Blumenstraße 43", 
            "zip": "77777", 
            "city": "Blumenstadt"
        }, 
        "delivery_type": "serviceperiod", 
        "delivery_date": "31.01.2024", 
        "delivery_date_end": "29.02.2024", 
        "billing_label": "SEPA Lastschrift", 
        "billing_days": "14",
        "language": "de",
        "items": [
            {
                "title": "Textposition", 
                "description": "Description"
            }, 
            {
                "title": "Artikel 1", 
                "description": "Hochwertig", 
                "quantity": 34, 
                "unit": "Stück", 
                "price": 12, 
                "taxrate": 19, 
                "discount": 0
            }
        ]
    }
}

Sample response

{ 
    "src": "server",
    "time": 1752742991,
    "module": "vouchers",
    "method": "create_invoice_async",
    "msg": "ok",
    "id": "68c297a4932f7eab030fe13d"
}

The endpoint immediately returns the Sticky-ID of the new invoice object. The invoice is processed (checked, created, imported into Sticky) in the background. With this endpoint, you can generate many invoices without having to wait for them to be created.

After a while, you can use the returned ID to query the get_voucher endpoint to check whether the job has been completed. You can then retrieve the document ID of the source accounting system from the source_id attribute.

Property Datatype Required Description
m string Yes static: vouchers
method string Yes static: create_invoice_async
msg object Yes see invoice - msg object

Possible error messages

Possible errors generate a log entry of type Error (If email notification is enabled, the administrator will receive information about this)

See details in the endpoint create_invoice

Get voucher

Sample request

{
    "m": "vouchers",
    "method": "get_voucher",
    "id": "6878c2a0c6a82a00ee02b458"
}

Sample response

{
    "src": "server",
    "time": 1752745171,
    "module": "vouchers",
    "method": "get_voucher",
    "msg": "{
        \"_id\": \"6878c2a0c6a82a00ee02b458\",
        \"module\": \"vouchers\",
        \"module_sub\": \"invoices\",
        \"updated\": 1752744691,
        \"created\": 1752744608,
        \"created_by\": \"651d1ed06579733bdb241ce4\",
        \"data\": {
            \"type\": \"Rechnung\",
            \"state\": \"Offen\",
            \"title\": \"RE0587\",
            \"date\": 1706655600,
            \"due_date\": 1707865200,
            \"contact\": \"6852ade205750a6fd90ba47b\",
            \"positions\": [
                {
                    \"type\": \"text\",
                    \"name\": \"Textposition\",
                    \"description\": \"Description\"
                },
                {
                    \"type\": \"custom\",
                    \"name\": \"Artikel 1\",
                    \"description\": \"Hochwertig\",
                    \"quantity\": 34,
                    \"unitName\": \"Stck\",
                    \"unitPrice\": {
                        \"currency\": \"EUR\",
                        \"netAmount\": 12,
                        \"grossAmount\": 14.28,
                        \"taxRatePercentage\": 19
                    },
                    \"discountPercentage\": 0,
                    \"lineItemAmount\": 408
                }
            ],
            \"amount_brutto\": 485.52,
            \"amount_netto\": 408,
            \"amount_tax\": 77.52,
            \"open_amount\": 485.52
        },
        \"source\": \"lexoffice\",
        \"source_id\": \"f203904c-93f6-4e3f-bfa1-6e822eefd918\",
        \"archived\": false,
        \"source_resync_down\": true,
        \"source_updated\": 1752744610,
        \"source_version\": 1
    }",
    "id": ""
}

Sample response (not found)

{
    "src": "server",
    "time": 1752745686,
    "module": "vouchers",
    "method": "get_voucher",
    "msg": false,
    "id": ""
}

Retrieve a specific document using its ID. The full voucher will delivered as JSON String in the msg property.

Property Datatype Required Description
m string Yes static: vouchers
method string Yes static: get_voucher
id string Yes

Possible error messages

Send voucher

Sample request

{
    "m": "vouchers",
    "method": "send_voucher",
    "id": "RE0265"
}

Sample response

{
    "src": "server",
    "time": 1656968326,
    "module": "vouchers",
    "method": "send_voucher",
    "msg": "ok",
    "id": ""
}

Invoices (PDF files) are sent by email to the customer's primary email address using the SMTP data and standard texts stored in the module settings.

Property Datatype Required Description
m string Yes static: vouchers
method string Yes static: send_voucher
id string Yes Invoice number or Sticky ID

Possible error messages

Set payment

Set payments or partial payments for a voucher.

Scopes: Company

Here you will find a list of all documented endpoints. If you find something missing, just let us know or send us an email at support@sticky.de.

We are sure that the endpoint you are looking for already exists, but it has not yet anybody wrote it into the documentation ;-}

Scopes: User

Here you will find a list of all documented endpoints. If you find something missing, just let us know or send us an email at support@sticky.de.

We are sure that the endpoint you are looking for already exists, but it has not yet anybody wrote it into the documentation ;-}

Historical information

Name change Lexware Office (formerly lexoffice)

The product "lexoffice" was renamed "Lexware Office" on October 1, 2024. Internally, Sticky continues to refer to the connection as "lexoffice". This means that in all API requests, the string "lexoffice" must continue to be used as the "source" if the connection to "Lexware Office" is to be used as the source.