{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"2179aa7f-4de2-4556-aca0-faa0357a4992","name":"SMARTapi - Doc","description":"This page describes how to get started with the SMARTapi for Microsoft Dynamics Business Central (and NAV 2016, 2017, 2018)\n\n# Getting started\n\nSMARTapi is a RESTfull Web Service and uses HTTP as its underlying protocol. The resources will be in XML-format.\n\nTo create a resource on the server, use POST.  \nTo retrieve a resource, use GET.\n\nSubscribe to SMARTapi\n\n1. Open SMARTpanel\n    \n2. Go to SMARTapi and subscribe\n    \n3. Open\n    \n4. Open Business Central\n    \n5. Search for \"SMARTapi opsætning\"\n    \n6. Create default settings\n    \n7. Publish API keys\n    \n\n# Filter\n\nYou can use filter in all standard GET calls. Add filtertext as part of querystring in the URL.\n\n### _**General rules**_\n\nThe filtering function is based on the property names used in Business Central. Filtering based on the response's property name may result in an error. To ensure the correct usage of property names in the URL query, please follow these steps:\n\n1. Navigate to Business Central and zoom in (Ctrl+Alt+F1) on the page where the desired field is located.\n    \n2. Take note of the field's name as displayed on the zoomed-in page.\n    \n3. Utilize this field name in the URL query to perform the desired filtering.\n    \n\nAn example of a mismatch can be observed in the GLEntry-get function. Suppose you wish to apply a filter on the field. In this case, the URL query should be constructed as follows: [https://app.cloud.inventio.it/20220422122248574/smartapi/?type=GLEntry-GET&amp;token={5B3C070F-BD90-4293-84BB-DCBB1E521B54}&amp;filtertext=G/L%20account=const(9510)](https://app.cloud.inventio.it/20220422122248574/smartapi/?type=GLEntry-GET&token=%7B5B3C070F-BD90-4293-84BB-DCBB1E521B54%7D&filtertext=G/L%20account=const(9510)). This is because the field is referred to as G/L account no in Business Central.\n\nWhen using filter functions, there are some general guidelines and rules to consider. However, it is important to note that these guidelines do not apply universally in all cases. The representation of spaces is usually a hyphen (-) or a percent encoding ( ), while periods (.) are typically removed. Nevertheless, it is advisable to zoom in on the relevant section in Business Central to confirm these conventions.\n\nThe Offset filter is a crucial tool for efficiently extracting a large volume of data. By utilizing the Offset filter, you can precisely define where a GET request should commence its data retrieval process. This filter essentially acts as the initial reference point for the database to initiate data fetching.\n\nFor instance, if you find yourself needing to retrieve a specific range of customer records, such as customers 100 to 200 from the database in BC, the offset filter becomes invaluable. Instead of sifting through the entire dataset, you can directly instruct the system to start retrieving data from the designated offset position, greatly enhancing the speed and efficiency of your data extraction process.\n\n### _**Filter Limits**_\n\n1. Filtertext: The maximum length allowed for the filtertext is 250 characters.\n    \n2. Sorting: The maximum length allowed for the sorting parameter is 50 characters.\n    \n3. Order: The maximum length allowed for the order parameter is 12 characters.\n    \n\n### _**Filter examples**_\n\n**GET specific vendor with \"No.\" 40000**\n\n> &filtertext=No.=CONST(40000)&token={C93F8BC6-FF44-43B7-889A-C82BF26AA78B} \n  \n\n**GET vendors in filterrange from \"No.\" 50000 to 60000**\n\n> &filtertext=No.=filter(50000..60000)&token={C93F8BC6-FF44-43B7-889A-C82BF26AA78B} \n  \n\n**GET vendors in specific \"Customer Posting Group\"**\n\n> &filtertext=Vendor Posting Group=CONST(DANMARK)&token={C93F8BC6-FF44-43B7-889A-C82BF26AA78B} \n  \n\n**Combination of more filtertexts. GET vendor from a range of \"No.\" and in specific Vendors \"Posting Group\"**\n\n> &filtertext=No.=filter(10000..30000),Vendors Posting Group=CONST(DANMARK)&token={C93F8BC6-FF44-43B7-889A-C82BF26AA78B} \n  \n\n**Date filter on Posting-date**\n\n> &filtertext=posting date=filter(2019-04-13..2019-05-05) \n  \n\n## _**Sorting example**_\n\n**You can use sorting in all standard GET calls. Add sortingtext as querystring in to your url**\n\n> &sorting=city&order=descending \n  \n\n## _**Limit (TOP) Example**_\n\n> &limit=10 \n  \n\n## _**Offset example**_\n\n> &offset=10&limit=10 \n  \n\n# API Reference","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"5222112","collectionId":"2179aa7f-4de2-4556-aca0-faa0357a4992","publishedId":"SzYT51pt","public":true,"publicUrl":"https://docs.smartapi.inventio.it","privateUrl":"https://go.postman.co/documentation/5222112-2179aa7f-4de2-4556-aca0-faa0357a4992","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2020-04-17T11:20:49.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Documentation","id":"de06719a-3843-4a3c-a100-706dfbf2f87a","owner":"5222112","values":[{"key":"token","value":"{5B3C070F-BD90-4293-84BB-DCBB1E521B54}","enabled":true},{"key":"smartalias","value":"20220422122248574","enabled":true}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":"https://inventio.it/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Documentation","value":"5222112-de06719a-3843-4a3c-a100-706dfbf2f87a"}],"canonicalUrl":"https://docs.smartapi.inventio.it/view/metadata/SzYT51pt"}