VBH API version 1
https://www.vbh.ee:8007/api
Web api for accessing VBH databases
/session
User authentication
Get the session access and refresh tokens. Access token will be valid for 5 minutes by default, after that you should request a new token by GET /api/session/refresh.
post /session/signin
Get the session access and refresh tokens. Access token will be valid for 5 minutes by default, after that you should request a new token by GET /api/session/refresh.
Body
Media type: application/json
Type: object
Properties- username: required(string)
- password: required(string)
Example:
{
"username": "user1",
"password": "somepassword"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- sessionId: required(string)
JWT access token
- sessionExpireIn: required(integer)
Access token expiration time in seconds
- refreshId: required(string)
JWT refresh token
- refreshExpireIn: required(integer)
Refresh token expiration time in seconds
Example:
{
"sessionId": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS",
"sessionExpireIn": 300,
"refreshId": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS",
"refreshExpireIn": 86400
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get a new access token
Get a new access token by providing a valid refresh token
get /session/refresh
Get a new access token by providing a valid refresh token
Query Parameters
- token: required(string)
Valid refresh token
Example:
eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- sessionId: required(string)
JWT access token
- sessionExpireIn: required(integer)
Access token expiration time in seconds
Example:
{
"sessionId": "eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS",
"sessionExpireIn": 300
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Logout the current user
Invalidate the current user refresh token
post /session/logout
Invalidate the current user refresh token
/vbhapi/users
User requests
Get all users
get /vbhapi/users
Get all users
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"name",
"email",
"web_laoseis"
],
"rows": [
[
1,
"Mati",
"mati@server.com",
"true"
],
[
2,
"Leida",
"leida@pood.ee",
"false"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all clients for the user.
get /vbhapi/users/{user_id}/clients
Get all clients for the user.
URI Parameters
- user_id: required(string)
User id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"code",
"name"
],
"rows": [
[
123,
"Firma 1",
"Firma nimi 1"
],
[
456,
"Firma 2",
"Firma nimi 2"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
/vbhapi/clients
Client requests
Get all clients.
get /vbhapi/clients
Get all clients.
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"code",
"name"
],
"rows": [
[
123,
"Firma 1",
"Firma nimi 1"
],
[
456,
"Firma 2",
"Firma nimi 2"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the client data by id
Update the client data. Correct 'user_name' must be provided.
get /vbhapi/clients/{client_id}
Get the client data by id
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- description: required(Client fields)
- type: required(object)
Example:
{
"category": "c",
"channelid": "",
"code": "Firma AS",
"country": "",
"creditlimit": 15000.0,
"deliveryaddr": "Panni põik, 51013 Tartu",
"deliverylocation": "",
"directdebit": 0,
"disablekmdinf": 0,
"dxcode": "Firma AS",
"einvoicepresent": 1,
"exportcode": "Firma AS",
"e_mail": "test77@mail.ee",
"fax": "",
"id": 1122,
"iddebtaccount": 20211,
"iddrintrcustomsproc": "",
"iddrintrtermdelivery": "",
"iddrintrtransport": 16,
"idfirst": "",
"idgrclass": "",
"idgrcompanypricecat": 342,
"idgrcompanypricecatp": "",
"idgrcurrency": "",
"idgrpricelist": "",
"idgrpricelistc": "",
"idgrpricelistp": "",
"idgrtax": 53,
"idgrtermdelivery": "",
"idgrtermdeliveryp": "",
"idgrtermpayment": 14,
"idgrtermpaymentp": "",
"idpadvanceaccount": "",
"idpurchaseaccount": 1717,
"idpurchasingagent": "",
"idsadvanceaccount": "",
"idsalesmanager": 40,
"idsettlcompany": 11337,
"inregionflow": "",
"invoicee_mail": "",
"ir_creditordebt": 0.0,
"ir_financelabel": 0,
"ir_financerating": 0.0,
"ir_reputationscore": 0.0,
"ir_taxdebt": 0.0,
"i_xml_ladu": "",
"i_consignment_printout": "",
"i_orderconf_printout": 478,
"i_pricelist_printout": "",
"i_printout": 221,
"legaladdr": "Vanni tee, 11313 Tallinn",
"locationaddr": "Panni põik, 51013 Tartu",
"message": "mingi teade",
"name": "Firma AS",
"notcreateinvoice": 0,
"notmaildocuments": 0,
"paymentbalancecode": 0,
"paymentcost": "",
"penaltypercent": 0.0,
"phone": "",
"pricecut": 0.0,
"pricecutp": 0.0,
"pricelist": "price1",
"record_state": "",
"referenceno": "",
"referencenoreq": 0,
"referencenos": "",
"regno": "123456",
"safindex": "",
"sys_flags": 0,
"taxofficecode": "ee123456",
"ts": "2013-04-08t14:36:36",
"unitpriceaccuracy": 0,
"u_xml_firma": "",
"u_client_id": "",
"u_kindlustusleping": 1,
"u_kindlustusleping_alates": "2013-04-01",
"u_kindlustusleping_kuni": "",
"u_koef_kv1": 0.0,
"u_koef_kv2": 0.0,
"u_koef_kv3": 0.0,
"u_koef_kv4": 0.0,
"u_mail_consignment": "",
"u_mail_invoice": "mati@mail.ee; kati@mail.ee",
"u_mail_kinnitus": "mati@mail.ee; kati@mail.ee",
"u_send_mail_invoice": 1,
"u_send_mail_orderconf": 1,
"u_tarnekindluse_protsent": 0,
"u_web_hk_prots": 0.0,
"u_web_oh_prots": 0.0,
"wwwaddr": "",
"i_web_makseting": "",
"mt_code": "45",
"mt_name": "maksetähtaeg 45 päeva",
"mt_name_eng": "maksetähtaeg 45 päeva"
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
post /vbhapi/clients/{client_id}
Update the client data. Correct 'user_name' must be provided.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Body
Media type: application/json
Type: object
Properties- description: required(Client fields. All fields except 'user_name' are optional )
- type: required(object)
Example:
{
"user_name": "Mati",
"locationaddr": "Panni põik, 51013 Tartu",
"phone": "",
"fax": "",
"e_mail": "test77@vbh.ee",
"contact_firstname": "Mati",
"contact_surname": "Sepp",
"contact_phone": "",
"contact_cellular": "",
"contact_fax": "",
"contact_e_mail": "mati@mail.ee",
"contact_position": ""
}
Get all users for the client.
get /vbhapi/clients/{client_id}/users
Get all users for the client.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"name",
"email",
"web_laoseis"
],
"rows": [
[
1,
"Mati",
"mati@server.com",
"true"
],
[
2,
"Leida",
"leida@pood.ee",
"false"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get credit information for the client.
get /vbhapi/clients/{client_id}/credit
Get credit information for the client.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- description: required(Credit fields)
- type: required(object)
Example:
{
"invoices": 0,
"owninvoices": 0,
"sold": 0,
"paid": 0,
"prepaid": 0,
"due_wo_pre": 0,
"due": 0,
"overdue": 0,
"overduecnt": 0,
"ownoverduecnt": 0,
"free_wo_pre": 0,
"free": 0,
"creditlimit": 0,
"id": 12834,
"idpartner": 1000,
"code": "Demo Company",
"weborders": 1
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get client turnover.
get /vbhapi/clients/{client_id}/turnover
Get client turnover.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"idgrarticle",
"code",
"name",
"k1",
"k2",
"k3",
"k4",
"k5",
"k6",
"k7",
"k8",
"k9",
"k10",
"k11",
"k12",
"s1",
"s2",
"s3",
"s4",
"s5",
"s6",
"s7",
"s8",
"s9",
"s10",
"s11",
"s12",
"basequantity",
"amountbase",
"ak1",
"ak2",
"ak3",
"ak4",
"ak5",
"ak6",
"ak7",
"ak8",
"ak9",
"ak10",
"ak11",
"ak12"
],
"rows": [
[
10878,
"010878",
"GEZE OL90N juhtlati lisakinnitus",
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1.15,
0,
0,
0,
0,
5,
1.15,
"10.2018",
"11.2018",
"12.2018",
"01.2019",
"02.2019",
"03.2019",
"04.2019",
"05.2019",
"06.2019",
"07.2019",
"08.2019",
"09.2019"
],
[
1012166,
"016592",
"GEZE OL90N juhtlatt 8mm L=6000mm galv.",
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4.67,
0,
0,
0,
0,
1,
4.67,
"10.2018",
"11.2018",
"12.2018",
"01.2019",
"02.2019",
"03.2019",
"04.2019",
"05.2019",
"06.2019",
"07.2019",
"08.2019",
"09.2019"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all articles for the client.
get /vbhapi/clients/{client_id}/articles
Get all articles for the client.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Query Parameters
- cat_id: (number)
Category id
Example:
12
- last6m: (number (1 or 0))
Ordered during last 6 months
Example:
1
- keyword: (string)
Search keyword
Example:
aken
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"companyid",
"productid",
"code",
"name",
"unitcode",
"price",
"pricecut",
"finalprice",
"cprice",
"deliverydate",
"contentquantity",
"lastsale",
"name_eng",
"unitcode_eng",
"cuttable",
"storeid",
"laoseis",
"omalaoseis",
"img_path",
"quantity",
"reccount",
"u_aktiivne",
"u_projektikaup",
"ean"
],
"rows": [
[
1521632,
12834,
1020637,
"0/45KAWILKA",
"WILKA südamik 0/45N nupp",
"tk",
19.32,
-5,
18.35,
0,
"",
0,
"",
"WILKA cylinder 0/45 knob",
"pc",
0,
952,
0,
0,
"",
7,
1242,
1,
0,
[
[
"4012789591828",
20.00000,
"tk"
],
[
"4012789728460",
0.00000,
""
]
]
],
[
1521605,
12834,
1020422,
"0/55KAWILKA",
"WILKA südamik 0/55N nupp",
"tk",
19.32,
-5,
18.35,
0,
"",
0,
"",
"WILKA cylinder 0/55 knob",
"pc",
0,
952,
0,
0,
"",
3,
1242,
0,
1,
[
[
"4012789687361",
8.00000,
"kg"
]
]
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get an article info for the client.
get /vbhapi/clients/{client_id}/articles/{article_id}
Get an article info for the client.
URI Parameters
- client_id: required(string)
Client id
- article_id: required(string)
Article id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- description: required(Article fields)
- type: required(object)
Example:
{
"id": 1517624,
"companyid": 12834,
"productid": 1006085,
"code": "1655084",
"name": "HOPPE link HCS Bonn WC A197S F1-2 70mm",
"unitcode": "tk",
"price": 39.32,
"pricecut": -5,
"finalprice": 37.35,
"cprice": 0,
"deliverydate": "",
"contentquantity": 1,
"lastsale": "",
"name_eng": "HOPPE HCS A197S F1-3 70mm",
"unitcode_eng": "pc",
"cuttable": 0,
"storeid": 952,
"laoseis": 0,
"omalaoseis": 0,
"img_path": "",
"quantity": "",
"ettetellimisel": 0,
"u_aktiivne": 1,
"u_projektikaup": 0,
"files": [
[
"pdf\\Q-Lon_EN_2017.pdf",
"",
"Q-Lon_kataloog_2017",
"",
"",
""
],
[
"pdf\\ql-9646.pdf",
"",
"QL9646_tooteleht",
"",
"",
""
],
[
"pdf\\QL9646_flyer_EE.pdf",
"",
"QL9646_flaier",
"",
"",
""
]
],
"pictures": [
[
"QL9646.JPG",
""
],
[
"Q-Lon_PVC-akendele.JPG",
""
],
[
"Q-Lon_serdid-katsetused.JPG",
""
]
],
"texts": [
[
"QL9646 on paljudel juhtudel väga hea ja universaalne tihend PVC-akende ja -uste renoveerimisel. Paigaldamisel ei tehta nurkadesse sisselõikeid. Paigaldamist alustada alati aknaraami või -lengi ülalt ja keskelt. Täna hoiame laoseisus musta värvi tihendit, mida müüme meetri kaupa.",
"QL9646 is in many cases a very good and universal seal for renovating PVC-windows and -doors. In the installation cuts are not made into the corners.;Installation should always start from the top and centre of the window frame of- sill. Today we keep in inventory a black seal, which we selle by the meter.",
"",
""
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all article categories for the client.
get /vbhapi/clients/{client_id}/article_cats
Get all article categories for the client.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"code",
"category",
"cat_name",
"cat_name_est",
"cat_name_eng"
],
"rows": [
[
138,
"greenteQ kruvid",
"",
"greenteQ kruvid",
"greenteQ kruvid",
"EN: greenteQ kruvid"
],
[
2,
"HOPPE GRUPP",
"",
"HOPPE GRUPP",
"HOPPE GRUPP",
"EN: HOPPE GRUPP"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the not sent articles.
get /vbhapi/clients/{client_id}/articles_not_sent
Get the not sent articles.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"ID",
"SourceDocNo",
"DocDate",
"DeliveryDate",
"Code",
"Name",
"Amount",
"AmountBase",
"cur_code",
"Unit",
"name_eng",
"unitcode_eng",
"OQuantity",
"SQuantity",
"DQuantity",
"IDPartner",
"u_clientorderno",
"reccount"
],
"rows": [
[
1159481,
"WT-13/03176",
"2013-07-19",
"",
"0/45KAWILKA",
"WILKA südamik 0/45N nupp",
36.7,
36.7,
"EUR",
"tk",
"WILKA cylinder 0/45 knob",
"pc",
2,
0,
2,
12834,
"",
99
],
[
1159482,
"WT-13/03177",
"2013-07-19",
"",
"0/45KAWILKA",
"WILKA südamik 0/45N nupp",
18.35,
18.35,
"EUR",
"tk",
"WILKA cylinder 0/45 knob",
"pc",
1,
0,
1,
12834,
"",
99
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the total quantity of not sent articles.
get /vbhapi/clients/{client_id}/articles_not_sent_total
Get the total quantity of not sent articles.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"unsentq",
"unsentrows",
"unsentarts"
],
"rows": [
[
776.93,
98,
65
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the client sales turnover.
get /vbhapi/clients/{client_id}/sales
Get the client sales turnover.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"companyid",
"productid",
"code",
"name",
"unitcode",
"price",
"pricecut",
"finalprice",
"cprice",
"deliverydate",
"contentquantity",
"lastsale",
"name_eng",
"unitcode_eng",
"cuttable",
"storeid",
"laoseis",
"omalaoseis",
"img_path",
"quantity",
"reccount"
],
"rows": [
[
1521632,
12834,
1020637,
"0/45KAWILKA",
"WILKA südamik 0/45N nupp",
"tk",
19.32,
-5,
18.35,
0,
"",
0,
"",
"WILKA cylinder 0/45 knob",
"pc",
0,
952,
0,
0,
"",
"",
1242
],
[
1521605,
12834,
1020422,
"0/55KAWILKA",
"WILKA südamik 0/55N nupp",
"tk",
19.32,
-5,
18.35,
0,
"",
0,
"",
"WILKA cylinder 0/55 knob",
"pc",
0,
952,
0,
0,
"",
"",
1242
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get deactivated clients. (Not implemented)
get /vbhapi/clients/deactivated
Get deactivated clients. (Not implemented)
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"code",
"name"
],
"rows": [
[
123,
"Firma 1",
"Firma nimi 1"
],
[
456,
"Firma 2",
"Firma nimi 2"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
/vbhapi/articles
Get all articles.
get /vbhapi/articles
Get all articles.
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Query Parameters
- cat_id: (number)
Category id
Example:
12
- last6m: (number (1 or 0))
Ordered during last 6 months
Example:
1
- keyword: (string)
Search keyword
Example:
aken
- updated_from: (string)
Articles updated on or after this date
Example:
20201231
- updated_to: (string)
Articles updated up to this date
Example:
20200721
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"companyid",
"productid",
"code",
"name",
"unitcode",
"price",
"pricecut",
"finalprice",
"cprice",
"deliverydate",
"contentquantity",
"lastsale",
"name_eng",
"unitcode_eng",
"cuttable",
"storeid",
"laoseis",
"omalaoseis",
"img_path",
"quantity",
"reccount",
"u_aktiivne",
"u_projektikaup",
"ean"
],
"rows": [
[
1521632,
12834,
1020637,
"0/45KAWILKA",
"WILKA südamik 0/45N nupp",
"tk",
19.32,
-5,
18.35,
0,
"",
0,
"",
"WILKA cylinder 0/45 knob",
"pc",
0,
952,
0,
0,
"",
0,
1242,
1,
0,
[
[
"4012789591828",
20.00000,
"tk"
],
[
"4012789728460",
0.00000,
""
]
]
],
[
1521605,
12834,
1020422,
"0/55KAWILKA",
"WILKA südamik 0/55N nupp",
"tk",
19.32,
-5,
18.35,
0,
"",
0,
"",
"WILKA cylinder 0/55 knob",
"pc",
0,
952,
0,
0,
"",
0,
1242,
0,
1,
[
[
"4012789687361",
8.00000,
"kg"
]
]
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
/vbhapi/clients/{client_id}/sales_orders
Sales order requests
Get all sales orders for the client.
Create a new sales order
get /vbhapi/clients/{client_id}/sales_orders
Get all sales orders for the client.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"docdate",
"sourcedocno",
"deliverydate",
"deliverylocation",
"totalamount",
"explanation",
"u_trn_kinnitus_kpv",
"olek",
"stldate",
"stlnum",
"stlid",
"stlcount",
"u_komplekteeritud",
"u_clientorderno",
"cperson",
"reccount"
],
"rows": [
[
1159492,
"2013-12-19",
"WT-13/03181",
"",
"",
110.1,
"teeme aga uue",
"",
"",
"",
"",
"",
0,
0,
"",
"Kelsie, Yost,",
9
],
[
1159491,
"2013-12-19",
"WT-13/03180",
"2013-12-20",
"",
96.66,
"",
"",
"",
"",
"",
"",
0,
0,
"",
"Kelsie, Yost,",
9
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
post /vbhapi/clients/{client_id}/sales_orders
Create a new sales order
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Body
Media type: application/json
Type: object
Properties- description: required(Sales order fields. All fields except 'idgrarticle' are optional )
- type: required(object)
Example:
{
"document": {
"iduser": 488,
"deliverydate": "2019-01-30",
"deliverylocation": "Pood",
"customerdocno": "X8899",
"doctype": "ST",
"explanation": "Ostu selgitus"
},
"rows": [
{
"idgrarticle": 1016555,
"pieces": 7,
"length": 8.3,
"quantity": 32,
"deliverydate": "2019-02-08",
"explanation": "rea info"
},
{
"idgrarticle": 1028227,
"pieces": 1,
"length": 2.0,
"quantity": 2,
"explanation": "teine rida"
}
]
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- order_id: required(string)
New sales order id
- error_code: required(string)
Possible error code
-1 töötlemata
0 korras
1 firma vmt puudub või vigane
2 viga lisamisel
3 viga muutmisel
4 pole õigust lisada
5 pole õigust muuta
7 ostukorvi id puudub
8 ostukorvis pole aktiivseid ridu
Example:
{
"order_id": 1159529,
"error_code": 0
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the sales order header.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}
Get the sales order header.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- description: required(Sales order header fields)
- type: required(object)
Example:
{
"id": 1159492,
"sourcedocno": "WT-13/03181",
"docdate": "2013-12-19",
"companyname": "Demo Company",
"companyaddr": "Silicon valley 3",
"totalamount": 110.1,
"promptdate": "2013-12-26",
"explanation": "teeme aga uue",
"idgrcompany": 12834,
"idpartner": 1000,
"deliverydate": "",
"deliverylocation": "",
"u_trn_kinnitus_kpv": "",
"u_clientorderno": "",
"curr_code": "EUR",
"e_mail": "Pedro.Baumbach20@yahoo.com,",
"phone": "025.548.6830 x722,",
"taxofficecode": "12345678",
"firstname": "Kelsie,",
"surname": "Yost,",
"contact_phone": "837.296.5039 x562,",
"contact_email": "Braulio_Bins8@yahoo.com,",
"cperson": "Kelsie, Yost,",
"olek": ""
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all rows for the sales order.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}/rows
Get all rows for the sales order.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Get all taxes for the sales order.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}/taxes
Get all taxes for the sales order.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Get all consignments for the sales order.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}/sales_consignments
Get all consignments for the sales order.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"stldate",
"stlnum",
"stlid",
"u_komplekteeritud"
],
"rows": [
[
"2013-07-10",
"11310199",
1159452,
1
],
[
"2014-04-22",
"11300001",
1159493,
0
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the consignment header.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}/sales_consignments/{consignment_id}
Get the consignment header.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
- consignment_id: required(string)
Consignment id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- description: required(Sales consignment header fields)
- type: required(object)
Example:
{
"id": 1159452,
"sourcedocno": "11310199",
"docdate": "2013-07-10",
"companyname": "Demo Company",
"companyaddr": "Silicon valley 3",
"totalamount": 240,
"promptdate": "2013-09-08",
"explanation": "Georg 10.07.2013",
"idgrcompany": 12834,
"idpartner": 1000,
"partnername": "VBH Estonia AS",
"partneraddr": "Läike tee 12, 75301 Peetri küla, Rae vald, Estonia",
"curr_code": "EUR",
"e_mail": "Pedro.Baumbach20@yahoo.com,",
"phone": "025.548.6830 x722,",
"taxofficecode": "12345678",
"firstname": "Kelsie,",
"surname": "Yost,",
"contact_phone": "837.296.5039 x562,",
"contact_email": "Braulio_Bins8@yahoo.com,",
"olek": ""
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all rows for the consignment.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}/sales_consignments/{consignment_id}/rows
Get all rows for the consignment.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
- consignment_id: required(string)
Consignment id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Get all taxes for the consignment.
get /vbhapi/clients/{client_id}/sales_orders/{order_id}/sales_consignments/{consignment_id}/taxes
Get all taxes for the consignment.
URI Parameters
- client_id: required(string)
Client id
- order_id: required(string)
Sales order id
- consignment_id: required(string)
Consignment id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
/vbhapi/clients/{client_id}/sales_invoices
Sales invoice requests
Get all sales invoices for the client.
get /vbhapi/clients/{client_id}/sales_invoices
Get all sales invoices for the client.
URI Parameters
- client_id: required(string)
Client id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"docdate",
"sourcedocno",
"promptdate",
"totalamount",
"explanation",
"olek",
"paidamount",
"reccount"
],
"rows": [
[
1159485,
"2013-07-10",
"11310199",
"2013-09-08",
240,
"Georg 10.07.2013",
"",
0,
2
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get the sales invoice header.
get /vbhapi/clients/{client_id}/sales_invoices/{invoice_id}
Get the sales invoice header.
URI Parameters
- client_id: required(string)
Client id
- invoice_id: required(string)
Sales invoice id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- description: required(Sales invoice header fields)
- type: required(object)
Example:
{
"id": 1159485,
"sourcedocno": "11310199",
"docdate": "2013-07-10",
"companyname": "Demo Company",
"companyaddr": "Silicon valley 3",
"totalamount": 240,
"promptdate": "2013-09-08",
"explanation": "Georg 10.07.2013",
"idgrcompany": 12834,
"idpartner": 1000,
"partnername": "VBH Estonia AS",
"partneraddr": "Läike tee 12, 75301 Peetri küla, Rae vald, Estonia",
"curr_code": "EUR",
"e_mail": "Pedro.Baumbach20@yahoo.com,",
"phone": "025.548.6830 x722,",
"taxofficecode": "12345678",
"firstname": "Kelsie,",
"surname": "Yost,",
"contact_phone": "837.296.5039 x562,",
"contact_email": "Braulio_Bins8@yahoo.com,",
"olek": ""
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all rows for the sales invoice.
get /vbhapi/clients/{client_id}/sales_invoices/{invoice_id}/rows
Get all rows for the sales invoice.
URI Parameters
- client_id: required(string)
Client id
- invoice_id: required(string)
Sales invoice id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Get all taxes for the sales invoice.
get /vbhapi/clients/{client_id}/sales_invoices/{invoice_id}/taxes
Get all taxes for the sales invoice.
URI Parameters
- client_id: required(string)
Client id
- invoice_id: required(string)
Sales invoice id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
/vbhapi/signpad
SignPad requests
Get all active clients.
get /vbhapi/signpad/active_clients
Get all active clients.
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"code",
"name",
"e_mail"
],
"rows": [
[
1146,
"Espak AS",
"Espak AS",
"eda.pang@espak.ee; tanel.laas@espak.ee"
],
[
12313,
"DeRossi OÜ",
"DeRossi OÜ",
"info@derossi.ee; raivo@derossi.ee"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get sales consignments for clients.
get /vbhapi/signpad/sales_consignments
Get sales consignments for clients.
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
Query Parameters
- company_id_list: required(string)
List of company ids
Example:
12, 567
- begindate: (string)
Active sales orders from this date
Example:
20201231
- enddate: (string)
Active sales orders up to this date
Example:
20210721
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"id",
"sourcedocno",
"docdate",
"company_id",
"order_id",
"order_sourcedocno",
"order_docdate",
"row_count"
],
"rows": [
[
1909233,
"12002296",
"2020-02-06",
16203,
1898179,
"MT19-15247",
"2019-12-20",
5
],
[
1912030,
"12002851",
"2020-02-13",
16203,
1898179,
"MT19-15247",
"2019-12-20",
6
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
/vbhapi/catalogs
Catalogs
Get all catalogs
get /vbhapi/catalogs
Get all catalogs
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"pakkumise_id",
"pakkumise_nr",
"pakkumise_kpv",
"kehtivuse_kpv",
"viimati_muudetud",
"koostaja_id",
"koostaja_email",
"kliendi_id",
"kliendi_kood",
"kliendi_nimi",
"kliendi_aadress",
"maksja_id",
"maksja_kood",
"maksja_nimi",
"maksja_aadress",
"kontaktisik",
"kontaktisik_telefon",
"kontaktisik_email"
],
"rows": [
[
2296246,
"HP22-04137",
"2022-12-14",
"",
"2022-12-14T14:18:22",
40,
"tarmo.vali@vbh.ee",
20859,
"Bestor Grupp Tartu",
"Bestor Grupp Tartu",
"Tööstuse tee 3, 61715 Tartu",
2310,
"Bestor Grupp AS",
"Bestor Grupp AS",
"Valdeku tn 168 Nõmme linnaosa, Tallinn Harju maakond 11217",
"Triinu Raamat",
"",
"triinu.raamat@bestor.ee"
],
[
2296207,
"HP22-04136",
"2022-12-14",
"",
"2022-12-14T13:24:40",
10,
"jan.poldver@vbh.ee",
19791,
"Designwild OÜ",
"Designwild OÜ",
"Poe tn 8 Lähte alevik, Tartu vald 60502 Tartu maakond",
19791,
"Designwild OÜ",
"Designwild OÜ",
"Poe tn 8 Lähte alevik, Tartu vald 60502 Tartu maakond",
"Kristjan Kanniste",
"+37259043643",
"kristjan.kanniste@dwild.ee"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all rows for the catalog.
get /vbhapi/catalogs/{catalog_id}/catalog_rows
Get all rows for the catalog.
URI Parameters
- catalog_id: required(string)
Catalog id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"toote_id",
"toote_kood",
"toote_nimi",
"kogus",
"tykke",
"pikkus",
"hind",
"summa"
],
"rows": [
[
1078425,
"839082",
"Katuseaken ROTO R49 H WD 7/11 (74x118 cm) Puit profiil; 3x klaas Ug=0,7W/m²K; Uw=1,1W/m²K; Alt avatav",
1.00000,
0,
0.00000,
1.0000,
292.9400
],
[
1076508,
"614971",
"Katuseakna plekk ROTO Rx HZI WD 7/11",
1.00000,
0,
0.00000,
1.0000,
87.0100
],
[
1016678,
"611838",
"ROTO Aknapaigalduspõll 7/xx ECO",
1.00000,
0,
0.00000,
1.0000,
23.7000
],
[
940001,
"Transport",
"Transport",
1.00000,
0,
0.00000,
1.0000,
10.0000
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
Get all product balances for the catalog.
get /vbhapi/catalogs/{catalog_id}/catalog_balances
Get all product balances for the catalog.
URI Parameters
- catalog_id: required(string)
Catalog id
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"toote_id",
"laoseis"
],
"rows": [
[
940001,
0.00000
],
[
1016678,
6.00000
],
[
1076508,
2.00000
],
[
1078425,
1.00000
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied
/vbhapi/catalog_products
Catalog products
Get all products
get /vbhapi/catalog_products
Get all products
Headers
- Authorization: required(string)
JWT token needed for authorization
Example:
Bearer eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZS
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- columns: required(array of )
- rows: required(array of )
Example:
{
"columns": [
"toote_id",
"toote_kood",
"toote_nimi",
"toote_nimi_eng",
"pilt",
"kogus_pakendis",
"tarneaeg",
"ts"
],
"rows": [
[
138,
"1931755",
"HOPPE välisukselink 1500/3357SN \"Luxembourg\" RAL9016(valge)/8mm/PZ92 sisemine",
"HOPPE 1500/3357SN 9016/8/PZ92 inneseite",
"\\\\db\\images\\1931755.JPG",
10.00000,
0,
"2022-12-05T12:08:22"
],
[
143,
"1931659",
"HOPPE välisukselink 1500/3357SN \"Luxembourg\" F1E6(hõbe)/8mm/PZ92 sisemine",
"HOPPE 1500/3357SN F1E6/8/PZ92 innenseite",
"\\\\db\\images\\1931659.JPG",
0.00000,
0,
"2022-12-05T12:08:22"
]
]
}
HTTP status code 401
Invalid credentials or bearer token has expired
Body
Media type: text/plain
Type: any
Example:
Access denied