Postman is an API platform for developers to design, build, test, and iterate their APIs.
In this article, will explain about creating a record in Accounts Table in the Dataverse environment from Postman.
Will create an Account record with the below values.
Field Display Name |
Field Schema Name |
Data Type |
Field Value |
Account Name |
name |
Single Line of Text |
Arun Potti – Microsoft |
Contact Method |
preferredcontactmethodcode |
Choice |
1 (Email) |
Phone |
donotphone |
Boolean |
true |
Primary Contact |
primarycontactid |
Lookup (Contact) |
13736f40-3955-ed11-bba2-000d3a36d83f
(Provide existing contact GUID) |
Last On Hold Time |
lastonholdtime |
Date |
2022-10-26 |
Annual Revenue |
revenue |
Currency |
15000000 |
Latitude |
address1_latitude |
Float |
17.38714 |
Description |
description |
Multiple Lines of Text |
Record created from Postman |
Pre-requisite
Follow all the steps mentioned in the article mentioned above and then follow the below steps.
Step 1
Click on the Collection … and Click on Add request to create a new Web API Request.
Step 2
Click on Rename to change the Web API Request name.
Renamed to Create Account record.
Step 3
Select POST Http Verb and provide the below text to create the Account record.
{{webapiurl}}accounts
Step 4
Provide the below values under Headers section.
If-None-Match |
null |
OData-Version |
4.0 |
OData-MaxVersion |
4.0 |
Content-Type |
application/json |
Accept |
application/json |
Headers will look like below.
Step 5
Click on Body, select raw and make sure that JSON is selected.
Step 6
Copy and paste the below JSON text to create Account record.
{
"name": "Arun Potti – Microsoft",
"preferredcontactmethodcode": 2,
"donotphone": true,
"[email protected]": "/contacts(13736f40-3955-ed11-bba2-000d3a36d83f)",
"lastonholdtime": "2022-10-26",
"revenue": 5000000,
"address1_latitude": 17.38714,
"description": "Record created from Postman"
}
You can find the JSON in the article attachment.
Step 7
Click on Save and Send.
You can see a message 204 No Content, which means the request was executed successfully, and can see the Account GUID in the Headers section in the OData-EntityId key value pair in the Web API URL format.
Note: If you see 401 Unauthorized access issue on Send, then follow the below article and fix the problem and try again.
How to resolve 401 Unauthorized access issue in Postman while connecting to Dataverse?
You can check the record created information in the Power Platform Solutions or from any other Apps.
Hope you have followed all the steps and created the Account record from Postman.
Like and share your valuable feedback on this article.