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 Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.