NAV
cURL

Introduction

Welcome to the Bilendo API-V2! You can use this API to access and modify data in your bilendo account.

This API uses the JSON-API Format.

Environments

Staging

You can request a Developer account via E-Mail at operations@bilendo.de

The API-Endpoints for this environment all start with https://apisandbox.bilendo.de

Production

The API-Endpoints for this environment all start with https://api.bilendo.de

Authentication

Bilendo uses API tokens to allow access to the API. You can get your API-Token in your Bilendo-Account under your account settings.

Header Name Header Value
Authorization Token token=YOUR-API-TOKEN

Customers

Customer Object

{
    "data": {
        "id": "<customer-id>",
        "type": "customer",
        "attributes": {
            "id": "<customer-id>",
            "external_id": "<your-customer-id>",
            "name": "New Company",
            "customer_number": "10001",
            "additional_number": "20002",
            "phone": "123456",
            "notice": "Lorem Ipsum",
            "dunning_stop": false,
            "dunning_stop_date": null,
            "enforce_shipping_mode": false,
            "letters_shipping_via_email": true,
            "letters_shipping_via_post": false,
            "media_files_shipping_via_email": true,
            "media_files_shipping_via_post": false,
            "reminders_shipping_via_email": true,
            "reminders_shipping_via_post": false,
            "revenue": "123.45",
            "saldo": "123.45",
            "credit_limit": "1000.00",
            "current_reminder_stage": 0,
            "historical_max_reminder_stage": 3,
            "customer_group_id": "<customer-group-id>",
            "template_setting_id": "<template-setting-id>",
            "template_invoice_id": "<template-invoice-id>",
            "template_email_id": "<template-email-id>",
            "template_post_id": "<template-post-id>",
            "created_at": "2020-05-15T15:53:44+02:00",
            "updated_at": "2020-05-15T15:53:44+02:00"
        },
        "relationships": {
            "addresses": {
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses"
                }
            },
            "contacts": {
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts"
                }
            }
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the customer
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the customer
name string name of the customer
customer_number string customer number
additional_number string optional additional customer number
phone string phone number of the customer
notice string optional note
dunning_stop boolean prevents reminders
dunning_stop_date date the dunning_stop ends on this date
enforce_shipping_mode boolean when true, takes shipping information from customer itself and discards all shipping settings from templates.
.
letters_shipping_via_email boolean letter shipping via email
letters_shipping_via_post boolean letter shipping via post
media_files_shipping_via_email boolean media file shipping via email
media_files_shipping_via_post boolean media file shipping via post
reminders_shipping_via_email boolean reminder shipping via email
reminders_shipping_via_post boolean reminder shipping via post
revenue string the total revenue
saldo string the current saldo
credit_limit string current credit limit of the customer
current_reminder_stage integer current reminder stage
historical_max_reminder_stage integer highest reminder stage in the past
customer_group_id UUID the customer's group id
template_setting_id UUID the customer's template setting id
template_invoice_id UUID the customer's template invoice id
template_email_id UUID the customer's template email id
template_post_id UUID the customer's template post id
created_at datetime datetime of creation
updated_at datetime datetime of last update

customers#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the customers for a company.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers

{
    "data": [
        {
            "id": "<customer-id>",
            "type": "customer",
            "attributes": {
                "id": "<customer-id>",
                "external_id": "<your-customer-id>",
                "name": "New Company",
                "customer_number": "10001",
                "additional_number": "20002",
                "phone": "123456",
                "notice": "Lorem Ipsum",
                "dunning_stop": false,
                "dunning_stop_date": null,
                "enforce_shipping_mode": false,
                "letters_shipping_via_email": true,
                "letters_shipping_via_post": false,
                "media_files_shipping_via_email": true,
                "media_files_shipping_via_post": false,
                "reminders_shipping_via_email": true,
                "reminders_shipping_via_post": false,
                "revenue": "123.45",
                "saldo": "123.45",
                "credit_limit": "1000.00",
                "current_reminder_stage": 0,
                "historical_max_reminder_stage": 3,
                "customer_group_id": "<customer-group-id>",
                "template_setting_id": "<template-setting-id>",
                "template_invoice_id": "<template-invoice-id>",
                "template_email_id": "<template-email-id>",
                "template_post_id": "<template-post-id>",
                "created_at": "2020-05-15T15:53:44+02:00",
                "updated_at": "2020-05-15T15:53:44+02:00"
            },
            "relationships": {
                "addresses": {
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses"
                    }
                },
                "contacts": {
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts"
                    }
                }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/customers?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/customers?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/customers?page=1"
    }
}

customers#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/customers" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "external_id=<your-customer-id>" \
  -d "name=New Company" \
  -d "customer_number=10001" \
  -d "additional_number=20002" \
  -d "phone=123456" \
  -d "note=Lorem Ipsum" \
  -d "customer_group_id=<customer-group-id>" \
  -d "template_email_id=<template-email-id>" \
  -d "template_invoice_id=<template-invoice-id>" \
  -d "template_post_id=<template-post-id>" \
  -d "template_setting_id=<template-setting-id>"

This endpoint will create a new customer for a company.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/customers

Attribute Type Description
external_id optional your id of the customer
customer_number optional optional customer number
additional_number optional optional additional customer number
name mandatory name of the customer
phone optional phone number of the customer
notice optional optional note
customer_group_id optional the customer's group id
template_setting_id optional the customer's template setting id
template_invoice_id optional the customer's template invoice id
template_email_id optional the customer's template email id
template_post_id optional the customer's template post id

customers#update

curl -X "PATCH" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "name=New Companyname Inc." \

This endpoint will update the details of customer for a company.

API Endpoint

PATCH https://apisandbox.bilendo.de/api/v2/customers/<customer-id>

Attribute Type Description
external_id optional your id of the customer
customer_number optional optional customer number
additional_number optional optional additional customer number
name mandatory name of the customer
phone optional phone number of the customer
notice optional optional note
customer_group_id optional the customer's group id
template_setting_id optional the customer's template setting id
template_invoice_id optional the customer's template invoice id
template_email_id optional the customer's template email id
template_post_id optional the customer's template post id

customers#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the information of a particular customer.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>

customers#find

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/find/<your-customer-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to find a customer by your own id.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/find/<your-customer-id>

customers/dunning_stop#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/dunning_stop" \
  -H "Authorization: Token token=YOUR-API-TOKEN"
  -d "dunning_stop_type=external" \
  -d "dunning_stop_date=2020.01.01"

Use this endpoint to add a dunning stop to a customer

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/dunning_stop

Attribute Type Description
dunning_stop_type mandatory values: manual or external
dunning_stop_date optional Date on which you want to stop the manual dunning stop
Optional, only for manual dunning stop

customers/dunning_stop#delete

curl -X "DELETE" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/dunning_stop" \
  -H "Authorization: Token token=YOUR-API-TOKEN"
  -d "dunning_stop_type=external"

Use this endpoint to deactivate dunning stop service.

API Endpoint

DELETE https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/dunning_stop

Attribute Type Description
dunning_stop_type mandatory values: manual or external

customers/credit_limit#update

curl -X "PATCH" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/credit_limit" \
  -H "Authorization: Token token=YOUR-API-TOKEN"
  -d "amount=1000.0"

Use this endpoint to set the credit limit of the customer. If you want to remove an existing credit limit, provide an empty string as new credit limit.

API Endpoint

PATCH https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/credit_limit

Attribute Type Description
amount mandatory credit limit amount or null

Contacts

Contact Object

{
    "data": {
        "id": "<contact-id>",
        "type": "contact",
        "attributes": {
            "id": "<contact-id>",
            "external_id": "<your-contact-id>",
            "name": "John",
            "gender": 1,
            "email": "john@bilendo.de",
            "phone": "0123456789",
            "main_contact": true,
            "created_at": "2020-05-15T17:35:00+02:00",
            "updated_at": "2020-05-15T17:35:00+02:00"
        },
        "relationships": {
            "customer": {
                "data": {
                    "id": "<customer-id>",
                    "type": "customer"
                },
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/<contact-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>"
                }
            }
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the contact
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the contact
name string name of the contact
gender integer 0 = unknown
1 = male
2 = female
email string email
phone string phone number of the contact
main_contact boolean true = main contact
false = not main contact

contacts#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the contacts for a customer.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts

{
    "data": [
        {
            "id": "<contact-id>",
            "type": "contact",
            "attributes": {
                "id": "<contact-id>",
                "external_id": "<your-contact-id>",
                "name": "John",
                "gender": 1,
                "email": "john@bilendo.de",
                "phone": "0123456789",
                "main_contact": true,
                "created_at": "2020-05-15T17:35:00+02:00",
                "updated_at": "2020-05-15T17:35:00+02:00"
            },
            "relationships": {
                "customer": {
                    "data": {
                        "id": "<customer-id>",
                        "type": "customer"
                    },
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/<contact-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>"
                    }
                }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts?page=1"
    }
}

contacts#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "external_id=<your-contact-id>" \
  -d "name=John" \
  -d "gender=1" \
  -d "phone=0123456789" \
  -d "email=john@bilendo.de"

This endpoint allows you to create contact for a customer.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts

Parameter Type Description
external_id optional your contact id
name option name of the contact
gender mandatory 0 = unknown
1 = male
2 = female
phone optional phone number of the contact
email optional email
main_contact optional true = make this contact a main contact,
false = make this contact not a main contact

contacts#update

curl -X "PATCH" "https://apisandbox.bilendo.de/api/v2/customer/<customer-id>/contacts/<contact-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "name=New name"

This endpoint allows you to update the information of a contact for a customer.

API Endpoint

PATCH https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/<contact-id>

Parameter Type Description
external_id optional your contact id
name option name of the contact
gender mandatory 0 = unknown
1 = male
2 = female
phone optional phone number of the contact
email optional email
main_contact optional true = make this contact a main contact,
false = make this contact not a main contact

contacts#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/<contact-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the information of a particular contact for a customer.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/<contact-id>

contacts#find

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/find/<your-contact-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to find a contact by your own id.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/contacts/find/<your-contact-id>

Addresses

Address Object

{
    "data": {
        "id": "<address-id>",
        "type": "address",
        "attributes": {
            "id": "<address-id>",
            "external_id": "<your-address-id>",
            "line1": "New GmbH",
            "line2": null,
            "line3": "Sendlinger Str. 85",
            "line4": null,
            "zip": "81735",
            "city": "Munich",
            "country": "Deutschland",
            "default_address": true,
            "created_at": "2020-05-15T18:22:10+02:00",
            "updated_at": "2020-05-15T18:22:10+02:00"
        },
        "relationships": {
            "customer": {
                "data": {
                    "id": "<customer-id>",
                    "type": "customer"
                },
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/<address-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/customers/<address-id>"
                }
            }
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the address
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the address
line1 string customer’s address line 1 (customer name)
line2 string customer’s address line 2 (contact name)
line3 string customer’s address line 3 (street and house number)
line4 string customer’s address line 4 (additional address)
zip string customer’s zip code
city string customer’s city
country string customer’s country
default_address boolean true = default address
false = not default address

addresses#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \

This endpoint will display all the addresses for a customer.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses

{
    "data": [
        {
            "id": "<address-id>",
            "type": "address",
            "attributes": {
                "id": "<address-id>",
                "external_id": "<your-address-id>",
                "line1": "New GmbH",
                "line2": null,
                "line3": "Sendlinger Str. 85",
                "line4": null,
                "zip": "81735",
                "city": "Munich",
                "country": "Deutschland",
                "default_address": true,
                "created_at": "2020-05-15T18:22:10+02:00",
                "updated_at": "2020-05-15T18:22:10+02:00"
            },
            "relationships": {
                "customer": {
                    "data": {
                        "id": "<customer-id>",
                        "type": "customer"
                    },
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/<address-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/customers/<address-id>"
                    }
                }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses?page=1"
    }
}

addresses#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "line1=New GmbH" \
  -d "line3=Sendlinger Str. 85" \
  -d "zip=81735" \
  -d "city=Munich" \
  -d "country_code=de"

This endpoint allows you to create a new address for a customer.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses

Attribute Type Description
external_id optional your id of the address
line1 mandatory customer’s address line 1 (customer name)
line2 optional customer’s address line 2 (contact name)
line3 mandatory customer’s address line 3 (street and house number)
line4 optional customer’s address line 4 (additional address)
zip mandatory customer’s zip code
city mandatory customer’s city
country_code optional customer’s country isocode
country optional customer’s country name
default_address optional true = default address
false = not default address

Important: Either country_code or country are mandatory

addresses#update

curl -X "PATCH" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/<address-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "city=Munich"

This endpoint allows you to update the information of an address for a customer.

API Endpoint

PATCH https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/<address-id>

Attribute Type Description
external_id optional your id of the address
line1 mandatory customer’s address line 1 (customer name)
line2 optional customer’s address line 2 (contact name)
line3 mandatory customer’s address line 3 (street and house number)
line4 optional customer’s address line 4 (additional address)
zip mandatory customer’s zip code
city mandatory customer’s city
country_code optional customer’s country isocode
country optional customer’s country name
default_address optional true = default address
false = not default address

Important: Either country_code or country are mandatory

addresses#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/<address-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the information of a particular address for a customer.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/<address-id>

addresses#find

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/find/<your-address-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to find an address by your own id.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customers/<customer-id>/addresses/find/<your-address-id>

Customers Groups

Customers Group Object

{
    "data": [
        {
            "id": "<customer_group-id>",
            "type": "customer_group",
            "attributes": {
                "id": "<customer-group-id>",
                "external_id": "<your-customer-group-id>",
                "name": "Example Group",
                "description": "Lorem ipsum",
            },
            "relationships": {
                "customers": {
                    "data": [],
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/customers?customer_group_id=<customer-group-id>"
                    }
                }
            }
        }
    ]
}
Attribute Type Description
id UUID Bilendo id of the customers group
Example: 00000000-0000-0000-0000-000000000000
external_id string Your id for the customers group
name text customers group name
description text customers group description

customer_groups#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customer_groups" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customer_groups

{
    "data": [
        {
            "id": "<customer_group-id>",
            "type": "customer_group",
            "attributes": {
                "id": "<customer-group-id>",
                "external_id": "<your-customer-group-id>",
                "name": "Example Group",
                "description": "Lorem ipsum",
            },
            "relationships": {
                "customers": {
                    "data": [],
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/customers?customer_group_id=<customer-group-id>"
                    }
                }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/customer_groups?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/customer_groups?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/customer_groups?page=1"
    }
}

customer_groups#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>

customer_groups#find

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/customer_groups/find/<your-customer-group-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to find a customer_group by your own id.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/customer_groups/find/<your-customer-group-id>

customer_groups#add_customers

curl -X "PUT" "https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>/add" \
     -H "Authorization: Token token=YOUR-API-TOKEN" \
     -d $'{ "customers": [
            "<customer-id1>",
            "<customer-id2>"
          ]}'
Parameter Type Description
customers mandatory array of customer ids

API Endpoint

PUT https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>/add

customer_groups#remove_customers

curl -X "PUT" "https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>/remove" \
     -H "Authorization: Token token=YOUR-API-TOKEN" \
     -d $'{ "customers": [
            "<customer-id1>",
            "<customer-id2>"
          ]}'
Parameter Type Description
customers mandatory array of customer ids

API Endpoint

PUT https://apisandbox.bilendo.de/api/v2/customer_groups/<customer-group-id>/remove

Journal Entries (BETA)

Journal Entries Object

{
    "data": {
        "id" : "<journal-entry-id>",
        "type" : "journal_entry",
        "attributes" : {
            "id": "<journal-entry-id>",
            "external_id": "1234567890",
            "amount": "123.45",
            "currency": "EUR",
            "journal_type": "receivable",
            "invoice_number": null,
            "entry_date": "1998-02-01",
            "receipt_date": "1998-01-28",
            "due_date": "1998-02-19",
            "imported_doctype": "SaP123",
            "imported_difference_reason": null,
            "notice": null,
            "external_notice": null,
            "text": "This is a journal entry",
            "reminder_stage": 0,
            "dunning_stop": false,
            "dunning_stop_date": null,
            "custom_fields": {
                 "additional_info": "additional info",
                 "more_info": "more info"
            },
            "created_at": "2020-06-03T14:18:27+02:00",
            "updated_at": "2020-06-03T14:18:27+02:00"
        },
        "relationships": {
          "customer": {
            "data": {
              "id": "<customer-id>",
              "type": "customer"
            },
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/customers/<customer-id>"
            }
          },
          "clearing": {
            "data": {
              "id": "<clearing-id>",
              "type": "clearing"
            },
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/clearings/<clearing-id>"
            }
          },
          "area": {
            "data": {
              "id": "<area-id>",
              "type": "area"
            },
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/areas/<area-id>"
            }
          },
          "business_unit": {
            "data": {
              "id": "<business_unit-id>",
              "type": "business_unit"
            },
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/business_units/<business_unit-id>"
            }
          },
          "service_user": {
            "data": {
              "id": "<service_user-id>",
              "type": "service_user"
            },
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/service_users/<service_user-id>"
            }
          },
          "sales_unit": {
            "data": {
              "id": "<sales_unit-id>",
              "type": "sales_unit"
            },
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/sales_units/<sales_unit-id>"
            }
          },
          "media_files": {
            "links": {
              "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
              "related": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>/media_files"
            }
          }
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the journal entry
Example: 00000000-0000-0000-0000-000000000000
external_id string unique external id of the journal entry
amount decimal
currency string
journal_type string
invoice_number string
entry_date date the date of the creation of the Journal Entry in the external system
receipt_date date The date of the document
due_date date
imported_doctype string
imported_difference_reason string
notice string optional note
external_notice string
text string
reminder_stage integer the current reminder stage
dunning_stop boolean prevents reminders
dunning_stop_date date the dunning_stop ends on this date
custom_fields object

journal_entries#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/journal_entries" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \

This endpoint will display all the journal entries.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/journal_entries

{
    "data": [
        {
            "id" : "<journal-entry-id>",
            "type" : "journal_entry",
            "attributes" : {
                "id": "<journal-entry-id>",
                "external_id": "1234567890",
                "amount": "123.45",
                "currency": "EUR",
                "journal_type": "receivable",
                "invoice_number": null,
                "entry_date": "1998-02-01",
                "receipt_date": "1998-01-28",
                "due_date": "1998-02-19",
                "imported_doctype": "SaP123",
                "imported_difference_reason": null,
                "notice": null,
                "external_notice": null,
                "text": "This is a journal entry",
                "reminder_stage": 0,
                "dunning_stop": false,
                "dunning_stop_date": null,
                "custom_fields": {
                     "additional_info": "additional info",
                     "more_info": "more info"
                },
                "created_at": "2020-06-03T14:18:27+02:00",
                "updated_at": "2020-06-03T14:18:27+02:00"
            },
            "relationships": {
              "customer": {
                "data": {
                  "id": "<customer-id>",
                  "type": "customer"
                },
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/customers/<customer-id>"
                }
              },
              "clearing": {
                "data": {
                  "id": "<clearing-id>",
                  "type": "clearing"
                },
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/clearings/<clearing-id>"
                }
              },
              "area": {
                "data": {
                  "id": "<area-id>",
                  "type": "area"
                },
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/areas/<area-id>"
                }
              },
              "business_unit": {
                "data": {
                  "id": "<business_unit-id>",
                  "type": "business_unit"
                },
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/business_units/<business_unit-id>"
                }
              },
              "service_user": {
                "data": {
                  "id": "<service_user-id>",
                  "type": "service_user"
                },
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/service_users/<service_user-id>"
                }
              },
              "sales_unit": {
                "data": {
                  "id": "<sales_unit-id>",
                  "type": "sales_unit"
                },
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/sales_units/<sales_unit-id>"
                }
              },
              "media_files": {
                "links": {
                  "self": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>",
                  "related": "https://localhost:3000/api/v2/journal_entries/<journal-entry-id>/media_files"
                }
              }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/journal_entries?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/journal_entries?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/journal_entries?page=1"
    }
}

journal_entries#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/journal_entries" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "external_id=<your-contact-id>" \
  -d "name=John" \
  -d "gender=1" \
  -d "phone=0123456789" \
  -d "email=john@bilendo.de"

This endpoint allows you to create contact for a customer.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/journal_entries

Parameter Type Description
amount mandatory The amount of the journal entry
currency mandatory The currency, e.g. EUR
due_date mandatory The due date
external_id mandatory unique ID in your system
erp_receipt_number mandatory The receipt number in your system
imported_doctype mandatory The ID of your Doytype
invoice_number mandatory invoice number
journal_type mandatory "receivable" or "credit"
receipt_date mandatory the date on the document
customer_id mandatory the bilendo_id of the customer
area_id optional the bilendo_id of the area
business_unit_id optional the bilendo_id of the business unit
service_user_id optional the bilendo_id of the service user
sales_user_id optional the bilendo_id of the sales user
erp_association optional
erp_reference optional
erp_reference_key_1 optional
erp_reference_key_2 optional
notice optional
external_notice optional
text optional

journal_entries#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the information of a particular journal entry.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>

journal_entries#find

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/journal_entries/find/<external-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to find a journal entry by external id.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/journal_entries/find/<external-id>

journal_entries/dunning_stop#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/dunning_stop" \
  -H "Authorization: Token token=YOUR-API-TOKEN"
  -d "dunning_stop_type=external" \
  -d "dunning_stop_date=2020.01.01"

Use this endpoint to activate dunning stop service.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/dunning_stop

Attribute Type Description
dunning_stop_type mandatory values: manual or external
dunning_stop_date optional Date on which you want to stop the manual dunning stop
Optional, only for manual dunning stop

journal_entries/dunning_stop#delete

curl -X "DELETE" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/dunning_stop" \
  -H "Authorization: Token token=YOUR-API-TOKEN"
  -d "dunning_stop_type=external" \

Use this endpoint to deactivate dunning stop service.

API Endpoint

DELETE https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/dunning_stop

Attribute Type Description
dunning_stop_type mandatory values: manual or external

Clearings (BETA)

Clearing Object

{
    "data": {
        "id": "<clearing-id>",
        "type": "clearing",
        "attributes": {
            "id": "<clearing-id>",
            "clearing_type": "balanced",
            "clearing_number": "abc1234",
            "created_at": "2020-05-15T15:53:44+02:00",
            "updated_at": "2020-05-15T15:53:44+02:00"
        },
        "relationships": {
            "journal_entries": {
                "data": [
                    [0] {
                        "id": "<journal-entry-id>",
                        "type": "journal_entry"
                    },
                    [1] {
                        "id": "<journal-entry-id>",
                        "type": "journal_entry"
                    }
                ],
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/clearings/<clearing-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/journal_entries?jes_clearing_id=<clearing-id>"
                }
            }
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the clearing
Example: 00000000-0000-0000-0000-000000000000
clearing_type string values: balanced, unbalanced
clearing_number string Receipt number of Journal entry

clearings#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/clearings" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the clearings.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/clearings

{
    "data": [
        {
            "id": "<clearing-id>",
            "type": "clearing",
            "attributes": {
                "id": "<clearing-id>",
                "clearing_type": "balanced",
                "clearing_number": "abc1234",
                "created_at": "2020-05-15T15:53:44+02:00",
                "updated_at": "2020-05-15T15:53:44+02:00"
            },
            "relationships": {
                "journal_entries": {
                    "data": [
                        [0] {
                            "id": "<journal-entry-id>",
                            "type": "journal_entry"
                        },
                        [1] {
                            "id": "<journal-entry-id>",
                            "type": "journal_entry"
                        }
                    ],
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/clearings/<clearing-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/journal_entries?jes_clearing_id=<clearing-id>"
                    }
                }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/clearings?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/clearings?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/clearings?page=1"
    }
}

clearings#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/clearings/<clearing-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the information of a clearing.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/clearings/<clearing-id>

clearings#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/clearings" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "clearing_number=<your-clearing-number>" \
  -d $'{ "journal_entry_ids": [
         "<journal-entry1-id>",
         "<journal-entry2-id>"
       ]}'

This endpoint allows you to create clearings for journal entries

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/clearings

Parameter Type Description
journal_entry_ids mandatory array of bilendo journal entry ids
clearing_number mandatory your clearing number

clearings#delete

curl -X "DELETE" "https://apisandbox.bilendo.de/api/v2/clearings/<clearing-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to delete a clearing.

API Endpoint

DELETE https://apisandbox.bilendo.de/api/v2/clearings/<clearing-id>

ERP Files

ERP File Object

{
    "data": {
        "id": "<erp-file-id>",
        "type": "erp_file",
        "attributes": {
            "id": "<erp-file-id>",
            "file_type": "customer_file",
            "processing_status": "done",
            "rows_count": 123,
            "file": {
                "url": "<url-of-file>"
            },
            "created_at": "2020-05-15T17:35:00+02:00",
            "updated_at": "2020-05-15T17:35:00+02:00"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the ERP file
Example: 00000000-0000-0000-0000-000000000000
file_type string customer_file, journal_file or unknown
processing_status string waiting, in_progress done or canceled
rows_count integer number of rows in file
file URL URL of the uploaded file

erp_files#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/erp_files" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \

This endpoint will display all the ERP files for a company.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/erp_files

{
    "data": [
        {
            "id": "<erp-file-id>",
            "type": "erp_file",
            "attributes": {
                "id": "<erp-file-id>",
                "file_type": "customer_file",
                "processing_status": "done",
                "rows_count": 123,
                "file": {
                    "url": "<url-of-file>"
                },
                "created_at": "2020-05-15T17:35:00+02:00",
                "updated_at": "2020-05-15T17:35:00+02:00"
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/erp_files?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/erp_files?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/erp_files?page=1"
    }
}

erp_files#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/erp_files" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -F "file=@path/to/local/file.xlsx"

This endpoint allows you to upload an ERP file.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/erp_files

Parameter Type Description
file mandatory your ERP file

erp_files#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/erp_files/<erp-file-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display the details of an ERP file.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/erp_files/<erp-file-id>

erp_files#delete

curl -X "DELETE" "https://apisandbox.bilendo.de/api/v2/erp_files/<erp-file-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to delete an ERP file.

API Endpoint

DELETE https://apisandbox.bilendo.de/api/v2/erp_files/<erp-file-id>

Media Files

Media File Object

{
    "data": {
        "id": "<media-file-id>",
        "type": "media_file",
        "attributes": {
            "id": "<media-file-id>",
            "file": {
                "url": "<link-to-file>"
            },
            "created_at": "2020-05-15T17:35:00+02:00",
            "updated_at": "2020-05-15T17:35:00+02:00"
        },
        "relationships": {
            "media_file_type": {
                "data": [
                    {
                        "id": "<media-file-type-id>",
                        "type": "media_file_type"
                    }
                ],
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id-id>/media_files/<media-file-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/media_file_types/<media-file-type-id>"
                }
            },
            "journal_entry": {
                "data": [
                    {
                        "id": "<journal-entry-id>",
                        "type": "journal_entry"
                    }
                ],
                "links": {
                    "self": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id-id>/media_files/<media-file-id>",
                    "related": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id-id>"
                }
            }
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the media file
Example: 00000000-0000-0000-0000-000000000000
file URL URL of the uploaded file

media_files#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display all the media files for a journal entry.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files

{
    "data": [
        {
            "id": "<media-file-id>",
            "type": "media_file",
            "attributes": {
                "id": "<media-file-id>",
                "file": {
                    "url": "<link-to-file>"
                },
                "created_at": "2020-05-15T17:35:00+02:00",
                "updated_at": "2020-05-15T17:35:00+02:00"
            },
            "relationships": {
                "media_file_type": {
                    "data": [
                        {
                            "id": "<media-file-type-id>",
                            "type": "media_file_type"
                        }
                    ],
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id-id>/media_files/<media-file-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/media_file_types/<media-file-type-id>"
                    }
                },
                "journal_entry": {
                    "data": [
                        {
                            "id": "<journal-entry-id>",
                            "type": "journal_entry"
                        }
                    ],
                    "links": {
                        "self": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id-id>/media_files/<media-file-id>",
                        "related": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id-id>"
                    }
                }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files?page=1"
    }
}

media_files#create

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -F "file=@path/to/local/file.pdf"

This endpoint allows you to upload media file for a journal entry.

API Endpoint

POST https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files

Parameter Type Description
file mandatory the media file
media_file_type_id optional the bilendo id of the media file type

media_files#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files/<media-file-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

This endpoint will display the media file for a journal entry.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files/<media-file-id>

media_files#delete

curl -X "DELETE" "https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files/<media-file-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

Use this endpoint to delete a media file of a journal entry.

API Endpoint

DELETE https://apisandbox.bilendo.de/api/v2/journal_entries/<journal-entry-id>/media_files/<media-file-id>

Media File Types

Media File Type Object

{
    "data": {
        "id": "<media-file-type-id>",
        "type": "media_file_type",
        "attributes": {
            "id": "<media-file-type-id>",
            "name": "text",
            "description": "text",
            "created_at": "2021-05-15T17:35:00+02:00",
            "updated_at": "2021-05-15T17:35:00+02:00"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the media file
Example: 00000000-0000-0000-0000-000000000000
name string name of media file type
description text description for the media file type

media_file_types#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/media_file_types" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \

This endpoint will display all the media file types for the company.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/media_file_types

{
    "data": [
        {
            "id": "<media-file-type-id>",
            "type": "media_file_type",
            "attributes": {
                "id": "<media-file-type-id>",
                "name": "text",
                "description": "text",
                "created_at": "2021-05-15T17:35:00+02:00",
                "updated_at": "2021-05-15T17:35:00+02:00"
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/media_file_types?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/media_file_types?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/media_file_types?page=1"
    }
}

media_file_types#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/media_file_types/<media-file-type-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \

This endpoint will display all the information of a particular media file type.

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/media_file_types/<media-file-type-id>

{
    "data": {
        "id": "<media-file-type-id>",
        "type": "media_file_type",
        "attributes": {
            "id": "<media-file-type-id>",
            "name": "text",
            "description": "text",
            "created_at": "2021-05-15T17:35:00+02:00",
            "updated_at": "2021-05-15T17:35:00+02:00"
        }
    }
}

Template Emails

Template email are used to define the design of letter, media_file and reminder emails.

Template Email Object

{
    "data": {
        "id": "<template-email-id>",
        "type": "template_email",
        "attributes": {
            "id": "<template-email-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the template email
Example: 00000000-0000-0000-0000-000000000000
title string The name of the template

template_emails#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_emails" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_emails

{
    "data": [
        {
            "id": "<template-email-id>",
            "type": "template_email",
            "attributes": {
                "id": "<template-email-id>",
                "title": "Standard"
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/template_emails?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/template_emails?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/template_emails?page=1"
    }
}

template_emails#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_emails/<template-email-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_emails/<template-email-id>

Template Invoices

Template invoices are used to define the behaviour of media_files and reminders.

Template Invoice Object

{
    "data": {
        "id": "<template-invoice-id>",
        "type": "template_invoice",
        "attributes": {
            "id": "<template-invoice-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the template invoice
Example: 00000000-0000-0000-0000-000000000000
title string The name of the template

template_invoices#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_invoices" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_invoices

{
    "data": [
        {
            "id": "<template-invoice-id>",
            "type": "template_invoice",
            "attributes": {
                "id": "<template-invoice-id>",
                "title": "Standard"
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/template_invoices?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/template_invoices?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/template_invoices?page=1"
    }
}

template_invoices#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_invoices/<template-invoice-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_invoices/<template-invoice-id>

Template Posts

Template posts are used to define the design of letter and reminder PDF files for postal shipping.

Template Post Object

{
    "data": {
        "id": "<template-post-id>",
        "type": "template_post",
        "attributes": {
            "id": "<template-post-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the template post
Example: 00000000-0000-0000-0000-000000000000
title string The name of the template

template_posts#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_posts" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_posts

{
    "data": [
        {
            "id": "<template-post-id>",
            "type": "template_post",
            "attributes": {
                "id": "<template-post-id>",
                "title": "Standard"
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/template_posts?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/template_posts?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/template_posts?page=1"
    }
}

template_posts#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_posts/<template-post-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_posts/<template-post-id>

Template Settings

Template settingsare used to define the behaviour of Bilendo's modules like shipping and automatic dunning.

Template Setting Object

{
    "data": {
        "id": "<template-setting-id>",
        "type": "template_setting",
        "attributes": {
            "id": "<template-setting-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the template setting
Example: 00000000-0000-0000-0000-000000000000
title string The name of the template

template_settings#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_settings" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_settings

{
    "data": [
        {
            "id": "<template-setting-id>",
            "type": "template_setting",
            "attributes": {
                "id": "<template-setting-id>",
                "title": "Standard"
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/template_settings?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/template_settings?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/template_settings?page=1"
    }
}

template_settings#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/template_settings/<template-setting-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/template_settings/<template-setting-id>

Areas

Areas are an organizational structure object.

Area Object

{
    "data": {
        "id": "<area-id>",
        "type": "area",
        "attributes": {
            "id": "<area-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the area
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the area
name string The name of the area
description string The description of the area

areas#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/areas" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/areas

{
    "data": [
        {
            "id": "<area-id>",
            "type": "area",
            "attributes": {
                "id": "<area-id>",
                "external_id": "<your-area-id>",
                "name": "Example Area",
                "description": "This is Area one",
            },
            "relationships": {
              "business_units": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/areas/<area-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/business_units?area_id=<area-id>"
                }
              },
              "journal_entries": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/areas/<area-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/journal_entries?jes_area_id=<area-id>"
                }
              }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/areas?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/areas?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/areas?page=1"
    }
}

areas#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/areas/<area-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/areas/<area-id>

Business Units

Business Units are an organizational structure object.

Business Unit Object

{
    "data": {
        "id": "<business_unit-id>",
        "type": "business_unit",
        "attributes": {
            "id": "<business_unit-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the Business Unit
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the Business Unit
name string The name of the Business Unit
description string The description of the Business Unit

business_units#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/business_units" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/business_units

{
    "data": [
        {
            "id": "<business_unit-id>",
            "type": "business_unit",
            "attributes": {
                "id": "<business_unit-id>",
                "external_id": "<your-business_unit-id>",
                "name": "Example Business Unit",
                "description": "This is Business Unit one",
            },
            "relationships": {
              "area": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/business_units/<business_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/areas/<area-id>"
                }
              },
              "sales_units": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/business_units/<business_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/sales_units?business_unit_id=<business_unit-id>"
                }
              },
              "journal_entries": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/business_units/<business_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/journal_entries?jes_business_unit_id=<business_unit-id>"
                }
              }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/business_units?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/business_units?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/business_units?page=1"
    }
}

business_units#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/business_units/<business_unit-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/business_units/<business_unit-id>

Sales Units

Sales Units are an organizational structure object.

Sales Unit Object

{
    "data": {
        "id": "<sales_unit-id>",
        "type": "sales_unit",
        "attributes": {
            "id": "<sales_unit-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the Sales Unit
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the Sales Unit
name string The name of the Sales Unit
description string The description of the Sales Unit

sales_units#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/sales_units" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/sales_units

{
    "data": [
        {
            "id": "<sales_unit-id>",
            "type": "sales_unit",
            "attributes": {
                "id": "<sales_unit-id>",
                "external_id": "<your-sales_unit-id>",
                "name": "Example Sales Unit",
                "description": "This is Sales Unit one",
            },
            "relationships": {
              "area": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/sales_units/<sales_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/areas/<area-id>"
                }
              },
              "business_unit": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/sales_units/<sales_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/business_units/<business_unit-id>"
                }
              },
              "service_user": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/sales_units/<sales_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/service_user/<service-user-id>"
                }
              },
              "journal_entries": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/sales_units/<sales_unit-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/journal_entries?jes_sales_unit_id=<sales_unit-id>"
                }
              }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/sales_units?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/sales_units?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/sales_units?page=1"
    }
}

sales_units#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/sales_units/<sales_unit-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/sales_units/<sales_unit-id>

Service Users

Service Users are an organizational structure object.

Service User Object

{
    "data": {
        "id": "<service_user-id>",
        "type": "service_user",
        "attributes": {
            "id": "<service_user-id>",
            "title": "Standard"
        }
    }
}
Attribute Type Description
id UUID Bilendo id of the Service User
Example: 00000000-0000-0000-0000-000000000000
external_id string your id of the Service User
first_name string The first name of the Service User
last_name string The last name of the Service User
email string The E-Mail of the Service User
phone string The phone number of the Service User
employee_number string The employee number number of the Service User
description string The description of the Service User

service_users#index

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/service_users" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/service_users

{
    "data": [
        {
            "id": "<service_user-id>",
            "type": "service_user",
            "attributes": {
                "id": "<service_user-id>",
                "external_id": "<your-service_user-id>",
                "first_name": "John",
                "last_name": "Doe",
                "email": "john.doe@Example.com",
                "phone": "0123 45678",
                "description": "This is a description",
            },
            "relationships": {
              "sales_units": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/service_users/<service_user-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/sales_units?service_user_id=<service_user-id>"
                }
              },
              "journal_entries": {
                "links": {
                  "self": "https://apisandbox.bilendo.de/api/v2/service_users/<service_user-id>",
                  "related": "https://apisandbox.bilendo.de/api/v2/journal_entries?jes_service_user_id=<service_user-id>"
                }
              }
            }
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_entries": 1,
        "per_page": 100
    },
    "links": {
        "self": "https://apisandbox.bilendo.de/api/v2/service_users?page=1",
        "first": "https://apisandbox.bilendo.de/api/v2/service_users?page=1",
        "prev": null,
        "next": null,
        "last": "https://apisandbox.bilendo.de/api/v2/service_users?page=1"
    }
}

service_users#show

curl -X "GET" "https://apisandbox.bilendo.de/api/v2/service_users/<service_user-id>" \
  -H "Authorization: Token token=YOUR-API-TOKEN"

API Endpoint

GET https://apisandbox.bilendo.de/api/v2/service_users/<service_user-id>

Errors

HTTP Status Codes

The Bilendo API uses the following HTTP error status codes:

Status Code Meaning
400 Bad Request Your request is invalid
401 Unauthorized Your API token is wrong
403 Forbidden The server understood the request but refuses to authorize it
404 Not Found The specified object could not be found
406 Not Acceptable You requested a format that isn't json
410 Gone The object requested has been removed from our servers
422 Unprocessable Entity The object is not valid
429 Too Many Requests You're requesting too many objects! Slow down!
500 Internal Server Error We had a problem with our server. Try again later.
503 Service Unavailable We're temporarially offline for maintanance. Please try again later.

Bilendo Error Codes

In case an API Call fails, the API will respond with an HTTP Status Code other than 200 and a JSON Response that indicates, what whent wrong.

Error Meaning
blank A mandatory field was not provided
taken Another object with the same value already exists
invalid The provided value for this field is invalid
# Example: A Request to customers#create without the mandatoy field name.

curl -X "POST" "https://apisandbox.bilendo.de/api/v2/customers" \
  -H "Authorization: Token token=YOUR-API-TOKEN" \
  -d "customer_number=123
{
  "error": {
    "name": [
      {
        "error": "blank"
      }
    ]
  }
}