{"id":769,"date":"2023-03-07T20:54:32","date_gmt":"2023-03-07T20:54:32","guid":{"rendered":"http:\/\/fredborg.org\/?p=769"},"modified":"2023-03-08T06:27:16","modified_gmt":"2023-03-08T06:27:16","slug":"become-a-business-central-api-superhero","status":"publish","type":"post","link":"https:\/\/fredborg.org\/?p=769","title":{"rendered":"Become a Business Central API Superhero"},"content":{"rendered":"\n<p>We are living in a very connected world, all our devices have the ability to talk together and the same goes for our IT systems, so one of the things that pretty much every BC developer will face at one time or another is that someone needs to connect to a BC, luckily this is easy in BC so let us take a look at how we can accomplish this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exposing data<\/h2>\n\n\n\n<p>The first thing that we will cover is how to expose data in BC, you have two ways of exposing data in BC the first way is to publish either a page, query or XMLPort as a web service, to do this create the object that you wish to expose and go to web services in BC and add it.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"921\" height=\"347\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image.png\" alt=\"\" class=\"wp-image-770\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image.png 921w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-300x113.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-768x289.png 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/figure>\n\n\n\n<p>However, there is a better way, and that is using API pages an API page is a regular page with some extra properties and it is created with the only goal of exposing data, another great thing about API pages is that you do need to publish API pages as web services because all pages of type API will automatically be exposed in BC, although we can also automatically publish web services we will get back to that later.<\/p>\n\n\n\n<p>A simple API page could look like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\npage 50100 &quot;API Items&quot;\n{\n    APIGroup = &#039;demo&#039;;\n    APIPublisher = &#039;fredborg&#039;;\n    APIVersion = &#039;v1.0&#039;;\n    ApplicationArea = All;\n    Caption = &#039;apiItems&#039;;\n    DelayedInsert = true;\n    EntityName = &#039;apiItem&#039;;\n    EntityCaption = &#039;apiItem&#039;;\n    EntitySetName = &#039;apiItems&#039;;\n    EntitySetCaption = &#039;apiItems&#039;;\n    PageType = API;\n    SourceTable = Item;\n    ODataKeyFields = SystemId;\n    Editable = false;\n    DataAccessIntent = ReadOnly;\n\n    layout\n    {\n        area(content)\n        {\n            repeater(General)\n            {\n                field(systemId; Rec.SystemId)\n                {\n                    Caption = &#039;SystemId&#039;;\n                }\n                field(no; Rec.&quot;No.&quot;)\n                {\n                    Caption = &#039;No.&#039;;\n                }\n                field(description; Rec.Description)\n                {\n                    Caption = &#039;Description&#039;;\n                }\n            }\n        }\n    }\n\n}\n\n<\/pre><\/div>\n\n\n<p>Besides setting the PageType to API the properties that you need to add are<strong> APIGroup, APIPublisher, APIVersion, EntityName, EntitySetName<\/strong>, and <strong>ODataKeyFields<\/strong>. All of these properties are used to call your API page except the ODataKeyFields, which is used as the unique key for your record, it is recommended to always use the SystemId as ODataKeyFields, because it will always be unique and the value will never change, another thing that is a good idea when creating API pages is to set the <strong>DataAccessIntent <\/strong>this will improve the performance of your application <a href=\"https:\/\/learn.microsoft.com\/en-us\/dynamics365\/business-central\/dev-itpro\/developer\/properties\/devenv-dataaccessintent-property\">DataAccessIntent Property &#8211; Business Central | Microsoft Learn<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Bound and UnBound Actions<\/strong><\/h2>\n\n\n\n<p>Many times when we expose services to the world we also need to expose some functions, this can be done in two ways in BC we have what we call bound actions, which are actions that are bound to a certain record, these are the ones that we have on our API pages to add a bound action to our API page you must add <strong>[ServiceEnabled]<\/strong> above your function so a function could look like this.  <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n&#x5B;ServiceEnabled]\n procedure UpdateUnitPrice(var actionContext: WebServiceActionContext; unitPrice: Decimal)\n    begin\n        rec.&quot;Unit Price&quot; := unitPrice;\n        Rec.Modify();\n        actionContext.SetResultCode(WebServiceActionResultCode::Updated);\n    end;\n\n<\/pre><\/div>\n\n\n<p> An UnBound action is a procedure in a codeunit that can be called without having to do so on a record, so a simple UnBound action could look like this.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ncodeunit 50100 MyApiDemo\n{\n    procedure myUnbound(itemDescription: text&#x5B;50]; itemNo: Code&#x5B;20])\n    var\n        Item: Record Item;\n    begin\n        Item.Get(itemNo);\n        Item.Description := itemDescription;\n        Item.Modify();\n    end;\n}\n\n<\/pre><\/div>\n\n\n<p>Which looks like any other function, however when working with UnBound actions we must expose the codeuint as a web service, and this can be done by manually setting it up like I showed earlier or we can create an XML file that will automatically publish our web service when the extension is installed you can call the XML file anything you want I have called mine WS.xml and added this to the file. <span style=\"font-size: revert; color: initial; font-family: var(--shapla-body-font-family,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif);\">&nbsp;&nbsp;&nbsp; <\/span> <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: xml; title: ; notranslate\" title=\"\">\n&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;\n&lt;ExportedData&gt;\n    &lt;TenantWebServiceCollection&gt;\n        &lt;TenantWebService&gt;\n            &lt;ObjectType&gt;CodeUnit&lt;\/ObjectType&gt;\n            &lt;ObjectID&gt;50100&lt;\/ObjectID&gt;\n            &lt;ServiceName&gt;MyApiDemo&lt;\/ServiceName&gt;\n            &lt;Published&gt;true&lt;\/Published&gt;\n        &lt;\/TenantWebService&gt;\n    &lt;\/TenantWebServiceCollection&gt;\n&lt;\/ExportedData&gt;\n\n<\/pre><\/div>\n\n\n<p>  <\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Setting up OAuth<\/strong><\/h2>\n\n\n\n<p>We have now created some API endpoints next we need to be able to call them, this is done by using Rest calls with OAuth as authentification, to set up OAuth, you must log in to your Azure Portal and go to App Registrations and create a new one:<span style=\"font-size: revert; color: initial; font-family: var(--shapla-body-font-family,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif);\"> <\/span> <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"597\" height=\"278\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-18.png\" alt=\"\" class=\"wp-image-795\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-18.png 597w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-18-300x140.png 300w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><\/figure>\n\n\n\n<p> <\/p>\n\n\n\n<p>Choose a name for your App registration choose single tenant and choose web as redirect and enter a redirect URL I have entered https:\/\/businesscentral.dynamics.com\/OAuthLanding.htm in mine.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"641\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-19.png\" alt=\"\" class=\"wp-image-796\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-19.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-19-300x200.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-19-768x513.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p> <\/p>\n\n\n\n<p>Press register, then go to API permissions and add a permission<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"317\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-20.png\" alt=\"\" class=\"wp-image-797\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-20.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-20-300x99.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-20-768x254.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>And here you must add both business central permissions Delegated and Application, and under these also add all permissions.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"697\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-21.png\" alt=\"\" class=\"wp-image-799\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-21.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-21-300x218.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-21-768x558.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"848\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-22.png\" alt=\"\" class=\"wp-image-800\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-22.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-22-300x265.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-22-768x678.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>Next press Grant admin consent<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"306\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-23.png\" alt=\"\" class=\"wp-image-801\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-23.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-23-300x96.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-23-768x245.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>Now go to Certificates &amp; secrets and create a new client secret<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"311\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-24.png\" alt=\"\" class=\"wp-image-803\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-24.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-24-300x97.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-24-768x249.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>This will generate a new value and Secret ID copy the value and store it somewhere because you will not be able to see it again; next, go Overview and copy the Application (client) ID<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"343\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-25.png\" alt=\"\" class=\"wp-image-804\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-25.png 960w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-25-300x107.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/image-25-768x274.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/figure>\n\n\n\n<p>Head over to BC and go to the page Azure <strong>Active Directory Applications<\/strong> and press new enter your Application (client) ID as the Client ID set the state to Enabled and set permissions I have given mine D365 ADMINISTRATOR and D365 BUS FULL ACCESS and then press Grant Consent.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"893\" height=\"669\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_sHvyC8yAwb.png\" alt=\"\" class=\"wp-image-815\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_sHvyC8yAwb.png 893w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_sHvyC8yAwb-300x225.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_sHvyC8yAwb-768x575.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/figure>\n\n\n\n<p>Once this is done we can now start calling your API&#8217;s so head over to Postman create a GET request and enter the following URL https:\/\/api.businesscentral.dynamics.com\/v2.0\/<strong>{enviromentName}<\/strong>\/api\/microsoft\/automation\/v2.0\/companies next head over to Authorization and choose OAuth 2.0<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"318\" height=\"310\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_OpB8ab8oWl.png\" alt=\"\" class=\"wp-image-816\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_OpB8ab8oWl.png 318w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_OpB8ab8oWl-300x292.png 300w\" sizes=\"auto, (max-width: 318px) 100vw, 318px\" \/><\/figure>\n\n\n\n<p>Then head down to Configure New Token and enter your information:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"528\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_rTH5Ui3S8h.png\" alt=\"\" class=\"wp-image-818\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_rTH5Ui3S8h.png 683w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_rTH5Ui3S8h-300x232.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/figure>\n\n\n\n<p><strong>Access Token URL<\/strong>: https:\/\/login.microsoftonline.com\/<strong>{TeantID}<\/strong>\/oauth2\/v2.0\/token<br><strong>Client ID<\/strong>: Is the Application (client) ID from Azure Portal<br><strong>Client Secret<\/strong>: is the value of the Client secrets that you generated in Azure Portal (the one that you have to copy because you could only see it once )<br><strong>Scope<\/strong>: Enter URL https:\/\/api.businesscentral.dynamics.com\/.default<br>And press Get New Access Token<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"488\" height=\"265\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_31Npu1Z40U.png\" alt=\"\" class=\"wp-image-819\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_31Npu1Z40U.png 488w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_31Npu1Z40U-300x163.png 300w\" sizes=\"auto, (max-width: 488px) 100vw, 488px\" \/><\/figure>\n\n\n\n<p>And choose Use token:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"865\" height=\"218\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_UyG0fObfky.png\" alt=\"\" class=\"wp-image-820\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_UyG0fObfky.png 865w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_UyG0fObfky-300x76.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_UyG0fObfky-768x194.png 768w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/figure>\n\n\n\n<p>You should now be able to press send in Postman and get a list of your companies<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"438\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_AmlJ2MJSKQ-1024x438.png\" alt=\"\" class=\"wp-image-821\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_AmlJ2MJSKQ-1024x438.png 1024w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_AmlJ2MJSKQ-300x128.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_AmlJ2MJSKQ-768x329.png 768w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_AmlJ2MJSKQ.png 1177w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Copy the id and try to change your URL so it looks like the following https:\/\/api.businesscentral.dynamics.com\/v2.0\/dev\/api\/fredborg\/demo\/v1.0\/companies(<strong>{companyID}<\/strong>)\/apiItems this should give you a list of all your items using your new API page<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"723\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_lrLyeOdBLv-1024x723.png\" alt=\"\" class=\"wp-image-822\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_lrLyeOdBLv-1024x723.png 1024w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_lrLyeOdBLv-300x212.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_lrLyeOdBLv-768x543.png 768w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_lrLyeOdBLv.png 1175w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Next Copy the systemId of one of your items, and change the URL to the following https:\/\/api.businesscentral.dynamics.com\/v2.0\/dev\/api\/fredborg\/demo\/v1.0\/companies(<strong>{CompanyId}<\/strong>)\/apiItems(<strong>{systemId}<\/strong>)\/Microsoft.NAV.updateUnitPrice and change the type to Post, and add the following to your body { &#8220;unitPrice&#8221;:&nbsp;123456 } and press send:<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"278\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZC4tqpnDa-1024x278.png\" alt=\"\" class=\"wp-image-823\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZC4tqpnDa-1024x278.png 1024w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZC4tqpnDa-300x81.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZC4tqpnDa-768x208.png 768w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZC4tqpnDa.png 1165w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And this will update the Unit Price of your Item <strong>OBS you might have noticed that my function name has been changed to start with lowercase, this is very important because even if your function starts with an uppercase in BC it will automatically be converted to lowercase in the API<\/strong><\/p>\n\n\n\n<p>Next, let us try to call our UnBound action to do this change the URL to this https:\/\/api.businesscentral.dynamics.com\/v2.0\/<strong>{teantId}<\/strong>\/dev\/ODataV4\/MyApiDemo_myUnbound?company=<strong>{companyId}<\/strong> and set the body to {&nbsp;&nbsp;&#8220;itemDescription&#8221;:&nbsp;&#8220;My&nbsp;Item&#8221;,&nbsp;&nbsp;&#8220;itemNo&#8221;:&nbsp;&#8220;1896-S&#8221; } and press send.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"259\" src=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZ0hZZsvVD-1024x259.png\" alt=\"\" class=\"wp-image-824\" srcset=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZ0hZZsvVD-1024x259.png 1024w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZ0hZZsvVD-300x76.png 300w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZ0hZZsvVD-768x194.png 768w, https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/vmconnect_bZ0hZZsvVD.png 1172w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And this will update the Item Description of your Item.<\/p>\n\n\n\n<p>And that is all there is to working with API&#8217;s in BC, until next time stay safe.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\"  id=\"_ytid_17028\"  width=\"1140\" height=\"641\"  data-origwidth=\"1140\" data-origheight=\"641\" src=\"https:\/\/www.youtube.com\/embed\/RTbY4MqaaIQ?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  epyt-is-override  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>We are living in a very connected world, all our devices have the ability to talk together and the same&#8230; <a class=\"read-more\" href=\"https:\/\/fredborg.org\/?p=769\" rel=\"nofollow\"> Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":827,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-769","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-business-central","shapla-grid-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Become a Business Central API Superhero - Fredborg<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fredborg.org\/?p=769\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Become a Business Central API Superhero - Fredborg\" \/>\n<meta property=\"og:description\" content=\"We are living in a very connected world, all our devices have the ability to talk together and the same... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fredborg.org\/?p=769\" \/>\n<meta property=\"og:site_name\" content=\"Fredborg\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-07T20:54:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-08T06:27:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"dfredborg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dfredborg\" \/>\n<meta name=\"twitter:site\" content=\"@dfredborg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"dfredborg\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fredborg.org\/?p=769#article\",\"isPartOf\":{\"@id\":\"https:\/\/fredborg.org\/?p=769\"},\"author\":{\"name\":\"dfredborg\",\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\"},\"headline\":\"Become a Business Central API Superhero\",\"datePublished\":\"2023-03-07T20:54:32+00:00\",\"dateModified\":\"2023-03-08T06:27:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fredborg.org\/?p=769\"},\"wordCount\":1097,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\"},\"image\":{\"@id\":\"https:\/\/fredborg.org\/?p=769#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png\",\"articleSection\":[\"Business Central\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fredborg.org\/?p=769#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fredborg.org\/?p=769\",\"url\":\"https:\/\/fredborg.org\/?p=769\",\"name\":\"Become a Business Central API Superhero - Fredborg\",\"isPartOf\":{\"@id\":\"https:\/\/fredborg.org\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fredborg.org\/?p=769#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fredborg.org\/?p=769#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png\",\"datePublished\":\"2023-03-07T20:54:32+00:00\",\"dateModified\":\"2023-03-08T06:27:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fredborg.org\/?p=769#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fredborg.org\/?p=769\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fredborg.org\/?p=769#primaryimage\",\"url\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png\",\"contentUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png\",\"width\":2560,\"height\":1440},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fredborg.org\/?p=769#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fredborg.org\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Become a Business Central API Superhero\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fredborg.org\/#website\",\"url\":\"https:\/\/fredborg.org\/\",\"name\":\"Fredborg\",\"description\":\"Business Central and Azure\",\"publisher\":{\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fredborg.org\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d\",\"name\":\"dfredborg\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png\",\"contentUrl\":\"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png\",\"width\":256,\"height\":256,\"caption\":\"dfredborg\"},\"logo\":{\"@id\":\"https:\/\/fredborg.org\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:fredborg.org\",\"https:\/\/www.linkedin.com\/in\/dfredborg\/\",\"https:\/\/x.com\/dfredborg\",\"https:\/\/www.youtube.com\/channel\/UCUNZglLDMjBlOK_T9JtI8UA\"],\"url\":\"https:\/\/fredborg.org\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Become a Business Central API Superhero - Fredborg","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fredborg.org\/?p=769","og_locale":"en_US","og_type":"article","og_title":"Become a Business Central API Superhero - Fredborg","og_description":"We are living in a very connected world, all our devices have the ability to talk together and the same... Read more","og_url":"https:\/\/fredborg.org\/?p=769","og_site_name":"Fredborg","article_published_time":"2023-03-07T20:54:32+00:00","article_modified_time":"2023-03-08T06:27:16+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png","type":"image\/png"}],"author":"dfredborg","twitter_card":"summary_large_image","twitter_creator":"@dfredborg","twitter_site":"@dfredborg","twitter_misc":{"Written by":"dfredborg","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fredborg.org\/?p=769#article","isPartOf":{"@id":"https:\/\/fredborg.org\/?p=769"},"author":{"name":"dfredborg","@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d"},"headline":"Become a Business Central API Superhero","datePublished":"2023-03-07T20:54:32+00:00","dateModified":"2023-03-08T06:27:16+00:00","mainEntityOfPage":{"@id":"https:\/\/fredborg.org\/?p=769"},"wordCount":1097,"commentCount":0,"publisher":{"@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d"},"image":{"@id":"https:\/\/fredborg.org\/?p=769#primaryimage"},"thumbnailUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png","articleSection":["Business Central"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fredborg.org\/?p=769#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fredborg.org\/?p=769","url":"https:\/\/fredborg.org\/?p=769","name":"Become a Business Central API Superhero - Fredborg","isPartOf":{"@id":"https:\/\/fredborg.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fredborg.org\/?p=769#primaryimage"},"image":{"@id":"https:\/\/fredborg.org\/?p=769#primaryimage"},"thumbnailUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png","datePublished":"2023-03-07T20:54:32+00:00","dateModified":"2023-03-08T06:27:16+00:00","breadcrumb":{"@id":"https:\/\/fredborg.org\/?p=769#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fredborg.org\/?p=769"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fredborg.org\/?p=769#primaryimage","url":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png","contentUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/03\/header.png","width":2560,"height":1440},{"@type":"BreadcrumbList","@id":"https:\/\/fredborg.org\/?p=769#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fredborg.org\/"},{"@type":"ListItem","position":2,"name":"Become a Business Central API Superhero"}]},{"@type":"WebSite","@id":"https:\/\/fredborg.org\/#website","url":"https:\/\/fredborg.org\/","name":"Fredborg","description":"Business Central and Azure","publisher":{"@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fredborg.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/fredborg.org\/#\/schema\/person\/59a5520cbf04c6bd1267f30b4488e71d","name":"dfredborg","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fredborg.org\/#\/schema\/person\/image\/","url":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png","contentUrl":"https:\/\/fredborg.org\/wp-content\/uploads\/2023\/06\/download.png","width":256,"height":256,"caption":"dfredborg"},"logo":{"@id":"https:\/\/fredborg.org\/#\/schema\/person\/image\/"},"sameAs":["https:fredborg.org","https:\/\/www.linkedin.com\/in\/dfredborg\/","https:\/\/x.com\/dfredborg","https:\/\/www.youtube.com\/channel\/UCUNZglLDMjBlOK_T9JtI8UA"],"url":"https:\/\/fredborg.org\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts\/769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=769"}],"version-history":[{"count":18,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts\/769\/revisions"}],"predecessor-version":[{"id":832,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/posts\/769\/revisions\/832"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=\/wp\/v2\/media\/827"}],"wp:attachment":[{"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fredborg.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}