Hi,
API documentation: https://developer.suralink.com/endpoint-docs
API URL: https://api.suralink.com/v1/
I've created a workflow to POST new clients to Suralink but having problems trying to create multiple clients at once. As I am relatively new to working with APIs, I'm guessing that I need to create each client individually. I've tried encapsulating multiple objects in brackets and curly brackets but no success. Also, when using the JSON Build tool, when I don't group by any field, why does it not create the close and open curly brackets in between each object separated by a comma or the regular brackets to open and close?
JSON Build output:
{"clientIdNumber": "STRING","departmentId": INTEGER,"name": "STRING","customId": "STRING","clientIdNumber":"STRING","departmentId": INTEGER,"name": "STRING","customId": "STRING"}
Testing in Postman
Single client, works:
{
"clientIdNumber": "STRING",
"departmentId": INTEGER,
"name": "STRING",
"customId": "STRING"
}
Multiple clients, does not work: Error message, "You must provide property "name" of type string."
I'm able to create an iterative macro for pagination but getting stuck on looping to POST each individual record. Can someone help with this?
Solved! Go to Solution.
Still haven't found a solution. Hoping someone has created something similar. TIA
1) you probably don't need an iterative macro.
2) I did a cursory look through your api documentation - and I do not believe it supports batched operations.
Assuming you create each record individually - where are you hitting a stumbling block?
@apathetichell thanks for the reply. Digging deeper into my workflow I found the issue. It was such a 'FACEPALM' moment! I failed to enter the below header:
Content-Type: application/json
After entering that I was able to create 6 test clients at once.
@BonusCup common problem!