knowledgecenter-breadcrum

Knowledge Center

21 Dec, 2021

Use postman to Create record in Dynamics with the Web API

Posted on 21 Dec, 2021 by Admin, Posted in Dynamics 365 Web Api Dynamics 365

Use postman to Create record in Dynamics with the Web API Blogs

Use postman to Create record in Dynamics with the Web API

POST request is used to send data to create a record. Select the POST request, Set the Dynamics API URL and entity set name in the header.

How to get API URL :

Advance Settings >> Customizations >> Developer Resources

Create a Contact Entity Record with all Data Types

Request Body Data:

{
    //Single line of text
    "firstname":"Young",
    "lastname":"God",
    //Option Set
    "familystatuscode":"1",
    //Two Options
    "followemail":true,
    //Multi Select Option Set
    "nisl_city":"345080000,345080001",
    //Decimal Number
    "nisl_decimalnumber":55.07,
    //Lookup
    "parentcustomerid@odata.bind":"/accounts(DFE54660-37CD-E511-80DE-6C3BE5A831DC)",
    //Currency
    "creditlimit":15000,
    //Date
    "birthdate":"2021-12-13"
}

Now navigate to Headers tab and click on Bulk Edit and add below Key-Value (Details of the headers can be referenced from the reference link at the end of blog):

OData-MaxVersion:4.0
OData-Version:4.0
Accept:application/json
Content-Type:application/json; charset=utf-8
Prefer:odata.include-annotations=”*”,return=representation

Now click on Send Request and Select the JSON object in the response because we have selected JSON type object in the request body.

This POST request will create record in Contact Entity with status “201 Created” in the response body. The mechanism of authentication and authorization for D365 Web API is explained in detail in the below links.

Happy D365ing.

Reference Links:

Tutorial: Register an app with Azure Active Directory (Microsoft Dataverse for Apps) – Power Apps

Create Application User In Dynamics CRM

Compose HTTP requests and handle errors (Microsoft Dataverse for Apps) – Power Apps

Comment

This is a Required Field

Loading

Recent Updates

Blogs
07 Sep, 2023

Optimizing Storage with SubscriptionTrackingDeletedObject Cleanup

What is SubscriptionTrackingDeletedObject? The "SubscriptionTrackingDeletedObject" table is linked to the "DeletionService," which handles two types of cleanup: organization-wide and record-specific.…

READ MORE
Blogs
05 Sep, 2023

How to create real-time customer journeys in Dynamics 365 Marketing

Introduction: This blog will show how to create real-time customer journeys in Dynamics 365 Marketing. Customer journeys can be either…

READ MORE
Blogs
30 Aug, 2023

D365 CUSTOMER SERVICE: CUSTOMER 360 COMPONENT

Introduction: In Dynamics 365 (D365) Customer Service, the 'Customer 360' Component provides a comprehensive view of information and enables users…

READ MORE