Invoke url does not send valid json

Invoke url does not send valid json

Hi!

I'm having a script sending a http post action to a third party software when a new record is created. 

The response I get is "error deserializing json" as if the code is not valid json. 

The simple code I'm sending is: {"Customer":{"Name":"Sven Eriksson"}}

I have tried the code in another service and it works fine. I can't understand why it doesn't work in Creator. 

Here is my code (I have masked access-token and client-secret):

header_data = Map(); header_data.put("Access-Token","xxxxxxxxxxxxxxxx"); header_data.put("Client-Secret","xxxxxxxxxxxxx"); header_data.put("Content-Type","application/json"); header_data.put("Accept","application/json"); namn = Map({"Name":"Sven Eriksson"}); parameter_data = Map({"Customer":namn}); url = "https://api.fortnox.se/3/customers"; response = invokeurl [ url :url type :POST parameters:parameter_data headers:header_data ]; info "Svar"; info response; info parameter_data;

    Zoho Developer Community






                              Zoho Desk Resources

                              • Desk Community Learning Series


                              • Digest


                              • Functions


                              • Meetups


                              • Kbase


                              • Resources


                              • Glossary


                              • Desk Marketplace


                              • MVP Corner


                              • Word of the Day



                                  Zoho Marketing Automation


                                          Manage your brands on social media



                                                Zoho TeamInbox Resources

                                                  Zoho DataPrep Resources



                                                    Zoho CRM Plus Resources

                                                      Zoho Books Resources


                                                        Zoho Subscriptions Resources

                                                          Zoho Projects Resources


                                                            Zoho Sprints Resources


                                                              Qntrl Resources


                                                                Zoho Creator Resources


                                                                  Zoho WorkDrive Resources



                                                                    Zoho Campaigns Resources

                                                                      Zoho CRM Resources

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series


                                                                      • Tips

                                                                        Tips

                                                                      • Functions

                                                                        Functions

                                                                      • Meetups

                                                                        Meetups

                                                                      • Kbase

                                                                        Kbase

                                                                      • Resources

                                                                        Resources

                                                                      • Digest

                                                                        Digest

                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner

                                                                      





                                                                      




                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now