Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending UBL EInvoice
Message
From
17/11/2022 08:21:11
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Web Services
Title:
Sending UBL EInvoice
Miscellaneous
Thread ID:
01685364
Message ID:
01685364
Views:
56
I am trying to consume rest api to send EInvoice and error appears. Could you help me to find error?
lcHTTP = "https://demoefaktura.mfin.gov.rs/api/publicApi/sales-invoice/ubl/upload"

lcApiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxx"

UBLFajl = "SomeFile.XML"
UblFajl = FILETOSTR((UblFajl))

BrojFakture = "1234567901234567890"
m.Http = Createobject("Msxml2.ServerXMLHTTP.6.0")

m.Http.Open("Post",lcHTTP,.F.)

m.Http.setRequestHeader("requestId", BrojFakture)
m.Http.setRequestHeader("sendToCir", "Auto")
m.Http.setRequestHeader("apikey", lcApiKey)

m.Http.setRequestHeader("Content-Type", "multipart/form-data")

m.Http.Send(UBLFajl)

IF m.http.status # 200
	some code
ENDIF

m.Http = .NULL.
RELEASE m.Http
Status is 400.
Response text is
{"Message":"Missing content-type boundary.","FieldName":"","ErrorCode":"XmlInvalid"}

Data from swagger and documentation are in attachment.
Next
Reply
Map
View

Click here to load this message in the networking platform