API POST method upload ubl file (invoice)

API POST method upload ubl file (invoice)

Postby mtajkov » Wed Jan 05, 2022 8:20 am

Hi,

Please does anyone know how to send (attach) the ubl file?

Code: Select all  Expand view

   Try
        oHttp := CreateObject( 'MSXML2.ServerXMLHTTP.6.0' )
    Catch
         oHttp := CreateObject( 'Microsoft.XMLHTTP' )
    End

    oHttp:Open( "POST" ,"https://demoefaktura.mfin.gov.rs/api/publicApi/sales-invoice/ubl/upload?requestId=999", .F.)
    oHttp:SetRequestHeader( "Accept","text/plain")
    oHttp:SetRequestHeader( "Content-Type","multipart/form-data")
    oHttp:SetRequestHeader( "ApiKey","17d897ab-da9a-44c0-a809-268bf252a93e")

 
    Try
    oHttp:Send( oHttp )
    Catch
    MsgInfo("no send")
    End

 
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
mtajkov
 
Posts: 127
Joined: Sun Mar 08, 2009 4:33 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 47 guests