Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending UBL EInvoice
Message
De
17/11/2022 08:21:11
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Titre:
Sending UBL EInvoice
Divers
Thread ID:
01685364
Message ID:
01685364
Vues:
57
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform