How does deep insertion operate within the Rest API of Business Central

Here's a basic overview of how deep insertion functions within the REST API of Business Central:

  1. Entity Relationships: Before performing deep insertion, you need to understand the relationships between entities in Business Central. Entities can have one-to-many or many-to-many relationships defined in the data model.
  2. Batch Requests: Deep insertion typically involves batch requests, where you send multiple operations in a single HTTP request. This allows you to create a parent record along with its related child records in a single atomic operation.
  3. Payload Structure: Your HTTP request payload should include both the data for the parent entity and the related child entities. The payload structure should adhere to the OData JSON format and follow the navigation properties defined in the metadata of the Business Central API.
  4. POST Request: Use the HTTP POST method to submit the batch request to the Business Central API endpoint. Ensure that your request includes the necessary authentication credentials and headers.
  5. Request https://api.businesscentral.dynamics.com/v2.0/TenantID/Sandbox/api/v2.0/companies(CompanyID)/purchaseInvoices
  6. Body

7. Post The Request


要查看或添加评论,请登录

社区洞察

其他会员也浏览了