{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"e0d1580c-5a30-4abd-86db-2fc691170821","name":"SMARTapi SaaS","description":"# Getting started\n\nSMARTapi is a RESTful web service and uses HTTP as its underlying protocol. The resources will be in JSON format.\n\nThere is a rate limiter per Company; 10 requests pr 30 seconds. There will be queued 5 and afterwards an error will be displayed. If you have pooling data: to get the newest - consider using Webhooks.\n\nTo use SMARTapi, go to AppSource and acquire the app. Then walk through the Assisted setup to be ready to use SMARTapi.\n\n## **Prerequisites**\n\nIt is crucial that you (or your Business Central partner if you are an external developer) can access the desired Business Central company to administer the access to the APIs.\n\nIn the \"SMARTapi Tables\" page (\"SMARTapi Tabeller\" in Danish) in Business Central you can add available tables. For your desired tables to be exposed for api use, it is necessary to add the tables in the SMARTapi Tables page.\n\n<img src=\"https://content.pstmn.io/b198e707-3abf-42c4-ac9e-e251f24ddf9f/aW1hZ2UucG5n\" width=\"1085\" height=\"500\">\n\n## Activate GET, POST, PUT and DELETE in Business Central\n\nFor every table you want to expose, you have to activate GET, POST, PUT and DELETE in the SMARTapi Tables as well.\n\nNotice that the Debitor table says 173 on the fourth field \"Aktiveret GET\" (\"Activated GET\" in Danish), but it says 0 in the others. This is because only GET is activated.\n\n<img src=\"https://content.pstmn.io/38b19469-57e6-4c44-a7a8-bb0444145c3d/aW1hZ2UucG5n\" width=\"1462\" height=\"553\">\n\nTo activate GET, POST, PUT or DELETE select the table (like I have selected Debitor in the screenshot) and click the relevant \"Aktiver valgte ... felter\" (Activate chosen ... fields) button highlighted in the screenshot.\n\n<img src=\"https://content.pstmn.io/3996f914-d184-4358-a50c-2d315a976cc8/aW1hZ2UucG5n\" width=\"1472\" height=\"576\">\n\n### **Base URL**\n\n`https://smartapi.inventio.it`\n\nOr:\n\n`https://smartapiservice.azurewebsites.net`\n\n### URL Template\n\nThis is how the api url should be constructed:\n\n`{baseurl}/SMARTapi/get/{TENANT-ID}/{ENVIRONMENT-NAME}/{ACTION}?Company={COMPANY-NAME}`\n\n**This is how you get the required information for the api url:**\n\n- The `{ACTION}` can be found in SMARTapi Tables as shown in the screenshot above.\n    \n- If you have the Business Central url for the specific company you can extract the `{TENANT-ID}`, `{ENVIRONMENT-NAME}` and `{COMPANY-NAME}`. The Business Central url should look like this:  \n    [https://businesscentral.dynamics.com/<b>{TENANT-ID}</b>/<b>{ENVIRONMENT-NAME}</b>?company=<b>{COMPANY-NAME}</b>](https://businesscentral.dynamics.com/3588efd4-f9db-4d49-bdb5-2c8473586019/production?company=CRONUS%20Danmark%20A%2FS)\n    \n\n_The_ `{COMPANY-NAME}` _in the Business Central url is going to be encoded - just copy paste it with the encoding._\n\n_If you are an external developer, you can ask your Business Central partner to send you the url from their Business Central company (make sure they are in the right company when they copy the url and send it to you)._\n\n# Authentication\n\nFor all requests to SMARTapi, you need to add 2 access keys as headers in the request:\n\nHeader 1:\n\n**Key**: AccessKey1\n\n**Value**: e0MzMzEyN0NCLTU1RkEt...\n\nHeader 2:\n\n**Key**: AccessKey2\n\n**Value**: e0M2MTZGQTg3LUQ2MT...\n\nSometimes the values end with two equal signs (==), these should be included.\n\nIt is only possible to get the access keys from Business Central under the \"SMART Integration Profiles\" page. The access keys are shown once in a pop-up message, after this they will not be shown again.  \nIf they are lost, you have to use the \"Update AccessKey\" button In Business Central. This will invalidate the old access keys and new access keys will be provided.\n\n<img src=\"https://content.pstmn.io/a7b9e51c-2197-4635-adca-7e388e8fbf7c/aW1hZ2UucG5n\" width=\"1586\" height=\"411\">\n\nIf you are an external developer, ask your Business Central partner to go to the \"SMART Integration Profiles\" page in their Business Central and click \"Create New Profile\". A message will pop up with the access keys that should be copied, saved and sent to you._\n\n# Filter\n\nYou can use filter in all standard GET, PUT, DELETE requests. Add filter as part of the query-string in the url.\n\n## General Rules\n\nThe filter function is based on the property names used in Business Central. Trying to filter 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 (if you are an external developer, ask your Business Central partner to do so) and pres Ctrl + Alt + F1 on the page where the desired field is located to open a side inspection page that shows \"back end\" information on the fields.\n    \n2. Take note of the field's name as displayed on the side inspection page.\n    \n3. Utilize this fields name in the url query to perform the desired fillter.\n    \n\n**Example:**\n\nLet's say we want to filter Customers' names (Customer is Debitor in Danish).\n\n- I go to the Customer Card page.\n    \n- I press Ctrl + Alt + F1.\n    \n- Side inspection pops up and shows that:\n    \n    - Nummer (Name in Danish) is called \"No.\"\n        \n    - Navn (Name in Danish) is called Name.\n        \n\n<img src=\"https://content.pstmn.io/6c909f7f-b8c4-45ef-a060-bd9b5dae41b3/aW1hZ2UucG5n\" width=\"615\" height=\"290\">\n\nThis API supports five filter parameters: `Limit`, `Offset`, `Filter`, `Sorting`, and `Order`.\n\n- **Limit**: Specifies the maximum number of records to return. For example, to limit the response to one instance, use `&limit=1`.\n    \n- **Offset**: Defines the number of records to skip before returning results. To set an offset of one, use `&offset=1`.\n    \n- **Order**: Determines the sorting order of the results. It accepts two values: `Ascending` and `Descending`. For example, to set the order to ascending, use `&order=(Ascending)`.\n    \n- **Sorting**: Specifies the field(s) by which the results should be sorted. You can sort by any available field in the records. For example, to sort by `Name` and/or `No.`, use `&sorting=(Name,No.)`.\n    \n- **Filter**: Applies a filter to the returned records based on specified conditions. You can filter by any field in the records. For example, to filter by `Name`, `Balance`, and/or `No.`, use `&filter=(Name=J\\*,Balance>10000,No.=10000..50000)`.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"25414897","team":552356,"collectionId":"e0d1580c-5a30-4abd-86db-2fc691170821","publishedId":"2sAXjJ5sdH","public":true,"publicUrl":"https://docs.smartapisaas.inventio.it","privateUrl":"https://go.postman.co/documentation/25414897-e0d1580c-5a30-4abd-86db-2fc691170821","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"This documentation will help with interacting with the SMARTapi Endpoints"},{"name":"title","value":""}],"appearance":{"default":"dark","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2024-08-28T07:05:44.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":"This documentation will help with interacting with the SMARTapi Endpoints"},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"SMARTapiSaas","id":"250f4210-9905-4467-b5c8-1b8d6f19133f","owner":"25414897","values":[{"key":"url","value":"https://smartapi.inventio.it/","enabled":true,"type":"default"},{"key":"AccessKey1","value":"e0NEQkQwMjBELTIzRTQtNDRGNS1BNTc1LTM0MTQyNEU0NEQyRH17OUUyRTE0REMtOUY5MC00NzA2LUE2QTAtREU3QTIzREMxNzQ0fQ==","enabled":true,"type":"secret"},{"key":"AccessKey2","value":"e0RFNjRGMkM2LUQ4MTYtNDVEMS04OTlGLTFGMUNENEI2MzI5QX17M0U3ODJCNkItQzBGNS00MkExLTg2RUUtMzc3OEQxNEJFNUQ4fQ==","enabled":true,"type":"secret"}],"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/d760f53da0b777a8897cdfe684c5041570e213c6bade12261ee39d3e39c8b803","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":"SMARTapiSaas","value":"25414897-250f4210-9905-4467-b5c8-1b8d6f19133f"}],"canonicalUrl":"https://docs.smartapisaas.inventio.it/view/metadata/2sAXjJ5sdH"}