AnsweredAssumed Answered

My Curl options are right?

Question asked by jeeva on Sep 20, 2018
Latest reply on Sep 20, 2018 by jeeva

-X POST https://restapi.e-conomic.com/journals-experimental/1/vouchers  \

--header "X-AppSecretToken: Mytoken"  \

--header"X-AgreementGrantToken: Mytoken"  \

--header "Content-Type: application/json" \

--data @{

            "accountingYear" :

            {

               

                "year" : "2018"

            },

           

            "entries" :

            {

                "financeVouchers" :

                [

                    {

                        "account" :

                        {

                            "accountNumber" : 1050,

                           

                        },

                        "amount" : -500,

                        "amountDefaultCurrency" : -100,

                        "currency" :

                        {

                            "code" : "DKK",

                           

                        },

                        "date" : "2018-09-20",

                        "entryType" : "financeVoucher",

                        "exchangeRate" : 100,

                        "journal" :

                        {

                            "journalNumber" : 1,

                           

                        },

                        "journalEntryNumber" : 1,

                       

                        "remainder" : -100,

                        "remainderDefaultCurrency" : -100,

                       

                        "vatAccount" :

                        {

                           

                            "vatCode" : "U25  "

                        },

                        "voucher" :

                        {

                            "accountingYear" :

                            {

                               

                                "year" : "2018"

                            },

                           

                            "voucherNumber" : 5

                        }

                    }

                ]

            }

        }

 

Hello Friend,

 

What is wrong with above code. I get 400 error code while request post.

 

Thanks in advance for your reply.

Outcomes