Kapcsolódó információk:
Paraméterezési útmutatók

Összehasonlított verziók

Kulcs

  • Beillesztett sor.
  • Törölt sor.
  • Formázás megváltoztatva.

The API interface associated with the DbConnector  delivers some of the features of the app as an intranet web servicefunction can automate the creation of outgoing invoices.

Az API felület a DbConnector alkalmazás Kimenő számlák automatizált készítése funkciót teszi elérhetővé webszolgáltatásként.
The web service is available can be operated with XML-based REST API management.

 

...

calls.

The API is available at the

...

next entry point. The server name depends on the local intranet environment.

General use of REST API calls can be found on the DbConnector REST API - basic informations page.

the local intranet.
Panel
bgColorAliceBlue
titleBGColorTan
title
POST | GET
    

http://server/dbconnector/api/v1

/

Header parameters: pkod, lickod parameters required for API use.

The billing API is asynchronous.

Requests submitted

Submitted requests will be placed in a queue. There is a separate API call to

call enquire about

query the

state of

processing status.

Responses

The response are in XML.

Oszlop
width50 %
Panel
bgColorBeige

Content

Tartalomjegyzék
maxLevel1

...

The queue is processed by a timed processor. New items

...

that are queued during processing

...

are added to the next processing period.

The authentication data should be sent in the HTTP header at every API call.

Header parameters
   pkod:SajatSupPartnerKod
   lickod:SajatSupLicKod 

The data can be found in the company's SUP license datasheet.

  • pkod - SUP partner code
  • lickod - SUP licence code

...

GET | POST 
     http://server/dbconnector/api/v1/test.

The purpose of this call is to test the API's availability. This test can be done by any browser. For complex testing, use CURL.

Body parameter (optional raw data)
   dummy

Result
   XML - <Success>    :  true | false
   XML - <StatusCode> :  The HTML status code is more detailed.

Normally, we only test the existence of the API. This is almost the same method as the one called by the browser title bar.

Kódblokk
languagebash
titleCall sample - API availability
CURL.EXE    ^
  -X GET    ^
     http://server/dbconnector/api/v1/test

 

You must also provide credentials for the full testing. In case of success, a version number is the answer.

Kódblokk
languagebash
titleCall sample - Testing Authentication Data
CURL.EXE 	^
  -X POST   ^
     http://server:8080/dbconnector/api/v1/test	^
	-H pkod:SajatSupPartnerKod	^
	-H lickod:SajatSupLicKod
Kódblokk
languagexml
titleResponse sample
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DbConnectorResponse>
    <Success>true</Success>
    <StatusCode>200</StatusCode>
    <Message>API build: 1.0.6536M (2018.08.09. 16:07:30) DbConnector DLL: 15.1 (2018.08.01. 8:16:32)</Message>
</DbConnectorResponse>

...

Tartalom

Tartalomjegyzék
maxLevel1

Rögzítés
xmlSzamla
xmlSzamla
Invoice Submission

...

Panel
bgColorAliceBlue
titleBGColorDarkSalmon
titlePOST
bash

http://server/dbconnector/api/v1/postxml

The aim of the call is to make the module of the Dbconnector of the SUP System, which is based on an externally produced invoicing command in the form of the Outgoing invoices to import XML scheme, accessible on a webpage as well.

Qsboxmegjegyz

The submitting method is asynchronous. Requests submitted in XML will be placed in a queue, the processing status should be questioned later. In case of appropriate server settings, the PDF image of the invoice will be returned to the buyer with the successful processing status.

Parameter (required)
   XML : The ivoicing request (any invoice attachments must be pre-uploaded)

Result
   XML - <Token> : In case of successful submission, the received data should be retained. The result of the processing can be requested with this ID.

Kódblokk
language
java
titleCall sample
CURL.EXE    ^
  -X POST   ^
     http://server:8080/dbconnector/api/v1/postxml ^
  -H pkod:SajatSupPartnerKod  ^
  -H lickod:SajatSupLicKod    ^
  -H "Content-Type: text/html; charset=UTF-8" ^
  --data-ascii @testUpload.xml
Kódblokk
languagexml
titleResponse sample
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DbConnectorResponse>
    <Success>true</Success>
    <StatusCode>200</StatusCode>
    <Token>7085BEEC-93B0-4FE1-88BB-F531EDAC38D6</Token>
</DbConnectorResponse>

Rögzítés
upload
upload
Invoice attachment upload

Panel
bgColorAliceBlue
titleBGColorDarkSalmon
titlePOST

...

http://server/dbconnector/api/v1/upload

An attachment can be optionally uploaded for the invoice. The following file formats can be uploaded: JPG, PDF.  If the prepared invoice is in PDF format, the attachments are embedded in a PDF.

Attachments must be uploaded to the server before the invoice XML is submitted. The identifiers (tokens) received in response must be placed in a comma-listed list

...

bash

in <Elojegyzett_Szamlak><Szamlak><Szamla><Csatolmanyok> data tag.

Kódblokk
language
java
titleCall sample
CURL.EXE    ^
  -X POST   ^
     http://server:8080/dbconnector/api/v1/upload ^
  -H pkod:SajatSupPartnerKod  ^
  -H lickod:SajatSupLicKod    ^
  -F file=@testupload.jpg
Kódblokk
languagexml
titleResponse sample
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DbConnectorResponse>
    <Success>true</Success>
    <StatusCode>200</StatusCode>
    <Message>File feltöltés sikeres</Message>
    <Token>74cc7200-b9fc-4fd8-a1cf-8942c09afc35</Token>
</DbConnectorResponse>



Rögzítés
getStatus
getStatus

...

Guery processing status

...

Panel
bgColorAliceBlue
titleBGColorLightSteelBlue
titleGET

http://server/dbconnector/api/v1/getstatus

 

The purpose of this call is to enquire about the processing status of an XML document submitted to the processing queue. To identify a request, a token that is returned in the XML should be used.

In case of successful processing, it returns the number in the SUP system (log | invoice number) as well as the PDF image of the invoice- encoded in base 64 format.

...

Parameter (required)
   token : The token received when submitting XML.

Result
   XML - <BizonylatAzon> :

...

Identifier of the

...

invoice in

...

SUP system (

...

acc.group| invoice number).
   XML - <DocumentType>, <DocumentData>   :

...

The PDF file of the completed invoice (

...

bash

with appropriate settings).

Kódblokk
language
java
titleCall sample
CURL.EXE    ^
  -X GET    ^
     http://server:8080/dbconnector/api/v1/getstatus?token=
B03D8188
7085BEEC-
2159
93B0-
4174
4FE1-
A866
88BB-
E214988DFB2A
F531EDAC38D6 
^
 ^
  -H pkod:SajatSupPartnerKod   ^
  -H lickod:SajatSupLicKod
Kódblokk
languagexml
titleResponse sample #1
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DbConnectorResponse>
    <Success>false</Success>
    <StatusCode>290</StatusCode>
    <Message>A tetel feldolgozasra var</Message>  <!-- waiting for processing  --> 
</DbConnectorResponse>
Kódblokk
languagexml
titleResponse sample #2
 <
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DbConnectorResponse>
    <Success>true</Success>
    <StatusCode>200</StatusCode>
    
<BizonylatAzon>499
<BizonylatAzon>411|
DBC0001
KI-0001/
18<
22</BizonylatAzon>
</DbConnectorResponse>

Response XML

The response to the API call is generated by a <DbConnectorResponse> schema.


Data members

SuccessIn case of sucessful processing, true, otherwise false
StatusCodeIn case of failed processing, more detailed information will be returned.
MessageIn case of failed processing, text information will be returned in accordance with StatusCode response.
Token

When submitting a request, this identifier can be used to retrieve status information from queue.

BizonylatAzon

When invoice instructions are submitted, and the processing is successful, the invoice can be found on the given ID in the SUP system

DocumentType
DocumentData

When invoice instructions are submitted and the processing is successful, the completed PDF image of the invoice is encoded in base64 format. Additional settings are required on the server-side to receive the PDF image of the invoice. In absence of these, only the BizonylatAzon information is returned.

Rögzítés
statusKodok
statusKodok
Error codes

...

API access error

Authentication error

...