Create new records with OData

Completed

To add new records by using OData, you need to publish an object that allows record creation. If you want to create new customer records, you need to publish the Customer Card object as an OData web service because the card has the InsertAllowed and ModifyAllowed properties set to true. You can use this object to create new records by using OData, but only when the object allows for inserts or modifications.

To create new records, you need to send a POST request to the Business Central web service with the record as a JSON document in the body of the request. Tools like Postman are useful when you want to start testing your services.

The following example uses Postman to set the request to POST and, in the body, you can find a new customer structured in a JSON document.

Base URL: https://api.businesscentral.dynamics.com/v2.0/<tenant>/Sandbox/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/Customers

Screenshot example of Postman POST to OData.