Hello,
I am testing Dynamics 365 CRM web API calls with Postman.
Using this URI: https://<mysite>.crm.dynamics.com/api/data/v8.2/contacts
If I POST this JSON code:
{
"firstname": "Joe",
"lastname": "Doakes"
}
The new contact record is created perfectly.
But if I try to POST an array of two records:
[
{
"firstname": "Joe",
"lastname": "Doakes"
},
{
"firstname": "John",
"lastname": "Doakes"
}
]
I get this error: "An unexpected 'StartArray' node was found when reading from the JSON reader. A 'StartObject' node was expected."
Is it not possible to post more that one record at a time? Or is my syntax faulty?
Thanks for any help on this.
Bryan Hunt
*This post is locked for comments
Hi Bryan,
I am trying to create contact in MS CRM using postman . i have done the same thing but getting 401 unauthorised error. i am using basic authentication. Can you help me here.
Rinkesh Rathor
Thanks Ben. I had seen that article, but wasn't sure if it was strictly for transactional integrity, or if it pertained to any form of batched inserts/updates.
Now that I know that it is the only supported method for multi-record updates, I will incorporate it into my code.
Bryan Hunt
Hi Bryan,
you need to use a batch request to create multiple records of the same type in same operation.
MSDN: Execute batch operations using the Web API
Regards,
Ben
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156