My Products
Help

Knowledge base in Developers Visma.net

Sort by:
Have you ever wanted to add a button in one of the Visma.net ERP screens that allows the user to call custom functionality you have made? By combining the the feature Automation Actions and Webhooks you can. This article shows you how you can create a custom action that will be visible under the Actions toolbar item, and how you can connect this to your custom logic using webhooks.
View full article
20-10-2020 12:13 (Updated 09-08-2024)
  • 0 Replies
  • 2 kudos
  • 2951 Views
Using webhooks can significantly improve the performance of your integration. With webhooks you can subscribe to changes and actions that happens in Visma.net and trigger functionality in your application.  This article explains how webhooks works, and how you can implement this.
View full article
22-01-2020 15:52 (Updated 24-06-2024)
  • 3 Replies
  • 1 kudos
  • 10749 Views
In this article, you can find guidelines on utilizing Visma.Net API Endpoints using DateTime parameters, as well as their associated condition and operators. For more information regarding the endpoints, query parameters and other endpoints for all areas, Please read the documentation found here: Swagger - Visma.Net Integrations Documentation lastModifiedDateTimeCondition=Operator Supported comparative operators for LastModifiedDateTime Conditions on filtering  > - Greater than < - Less than <= - Less than or equal to >= - Greater than or equal to   Explanation:   ?lastModifiedDateTime=2024-05-25 &lastModifiedDateTimeCondition=>- Retrieve records after and on the given DateTime ?lastModifiedDateTime=2024-05-25 &lastModifiedDateTimeCondition=<- Retrieve records before and on the given DateTime ?lastModifiedDateTime=2024-05-25 &lastModifiedDateTimeCondition=>= Retrieve records after and on the given DateTime ?lastModifiedDateTime=2024-05-25 &lastModifiedDateTimeCondition=<= Retrieve records before and on the given DateTime Usage example: This query will return customers updated on 2024-05-25 or later. GET https://integration.visma.net/API/controller/api/v1/Customer ?lastModifiedDateTime=2024-05-25 &lastModifiedDateTimeCondition=>= ( Lines are separated for readability)   The operators are used the same for: createdDateTimeCondition=Operator dunningLetterDateTimeCondition=Operator
View full article
29-05-2024 10:51
  • 0 Replies
  • 0 kudos
  • 447 Views
Webhook notification system is available at https://status.visma.com With this feature, Visma Cloud Services Status page can send notifications via webhooks when there are incidents & scheduled maintenance or status update on a component status. Webhooks contain information about the Product / Component / Status these changed. We would highly appreciate your feedback about this feature, so please feel free to inform us after implementing this. How to enable webhook notifications ? After navigating to the https://status.visma.com, please follow the steps shown below respectively. Immediately afterwards, you'll receive an email from "noreply@statuspage.visma.com" that is informing you about Webhook subscription confirmation. If Status.Visma is unable to communicate with your Http listener domain, it will be sending you another email as a warning.   For further information please see the following articles.  What is a component? Enable webhook notifications (JSON Schema)
View full article
18-12-2020 15:03 (Updated 13-11-2023)
  • 0 Replies
  • 0 kudos
  • 1249 Views
Did you know that Visma.net ERP API supports different compression algorithm? We support brotli, gzip and deflate. They can be used by adding Accept-Encoding: <compression type> in your request header. More info and sample code can be found at: Response compression in ASP.NET Core
View full article
09-02-2022 18:47
  • 0 Replies
  • 0 kudos
  • 728 Views
Setup up your user rights To be able to use Visma.Net API you need to make sure your visma user have the correct roles on the Financials company you want to use it for. Login with your Visma.Net Account : https://signin.visma.net and go to Admin Panel. 1- Visma.Net Admin 1.A- To be able to edit the access rights you need to be logged in with a user with “Customer administrator” role.   1.B- To set your rights, click on Visma.Net Financials in the top left corner and choose Admin.   2-User and roles 2.A- When you have accessed Visma.net Admin click on “User and roles”.  2.B- Head to the “User” tab. 2.C- Search for your username and click your name. 3-Company access and rights 3.A- If the company you want to edit roles for does not exist in the list under your username, click the “Add access to” menu and look for the company you wish to add.      3.B- Find the company you want to edit roles for.     3.C- On the line for the desired company, press the field for “Financials” and add the roles “Financial Administrator” & “Financials User”.   Swagger Our Swagger is a good point for you to start using the API.   Connect to your Visma.Net account Authorize and get a VNF token to use in Swagger. Click “Authorize” on the right side of the interface.     Tick the box for “financialstasks” and press “Authorize”     You will be directed to a Visma.net login, enter your credentials and sign in.(If you are not asked to enter your credentials but get directed to the next step straight away, please clear your cookies in your browser and retry)     Allow Visma.net Integrations to connect to your account.     When you have allowed the connection you see that you are now authorized in Swagger. Close the window and proceed to use Swagger.   Start using Swagger The first thing you need to do is check what companies your visma.net financials user have access to. You can find the names and Ids via the “Context” endpoint. Scroll down to the “Context” endpoint and expand it.     Expand the first GET method - Get the companies available for this token, and press “Try it out”.     You will now see a button, “Execute”, press it and you’ll notice the result below will have updated to show your available companies. You’ll also see the request URL.     In the list, decide which company you want to use and copy the “id:”, this is the Id you will add to your “ipp-company-id” header when you are making requests. For now scroll back up to the top and paste the ID in the field “ipp-company-id”. When you have filled this field, the requests you execute via Swagger will target that company.     We also recommend taking a look at : OAuth 2.0 Authorization Flow  
View full article
27-01-2020 10:29 (Updated 25-11-2021)
  • 0 Replies
  • 1 kudos
  • 6614 Views
Visma.Net Integrations - API Client Configuration In this document we will go through what needs to be done after you completed your Visma.Net Integration certification.  Redirect_URI The first thing you need to do to configure your API client is to set up a redirect_URI.  Redirect URIs are a critical part of the OAuth flow. After a user successfully authorizes an application, the authorization server will redirect the user back to the application with an authorization code in the URL. Because the URL will contain sensitive information, it is critical that the service doesn’t redirect the user to arbitrary locations.    Due to this, it is required to specify one or more redirect URIs when you register your integration with Visma.Net. For production, it is required that the provided URI is set up with HTTPS.    When you have a redirect URI, this should be sent to your partner service in order to be able to get your Client_ID and Client_Secret. When this has been processed, you will receive an Activation email for your registration, the link to activate your Client_Id will be active for 5 days, so make sure to do this when the email is received:     API client types For Visma.Net there are two client types available, API “test client” and “production client” (also known as live) Test Clients All new API clients are generated as the type “Test”. In the test client there is a limit to the allowed calls per hour, which is set 500 calls/hour/per company.   ℹ️ When you are ready to go live with your integration you need to contact your partner service to obtain the "production" type API Client. Production Clients In the Production Client, the limit for calls  is ​15,000 calls / per hour & per company (since version: 8.25) Please also see, Why am I receiving "HTTP 429 - Too many request / throttling" response from API ? Visma.Net Integrations Startup Guide Visma.Net API International Support Policy Contacting the Visma.Net ERP Support / Partner Service API incidents - Troubleshooting and reporting
View full article
29-10-2020 11:57 (Updated 29-10-2021)
  • 0 Replies
  • 2 kudos
  • 4482 Views
TaxID '01' cannot be found in the system To diagnose why you get this error message, you must check a couple of things. The process flow of applying VAT in Visma.Net Financials follows this flow:     First, the VAT Zone ID is collected from the Supplier or Customer, check the following: Supplier(ScreenId=AP303000) Purchase settings tab:   Customer(ScreenId=AR303000) Delivery settings tab:       For this article, we’ll have a look at the Customer. VAT Zone ID To check the VAT Zones, go to ScreenId=TX2060PL and click on the Zone ID of your customer(Here it is Zone 01).     Clicking on the Zone will show the different VAT ID’s available for this zone.     VAT Category Next, you need to check the VAT category of the Item you are going to use, this is found under the “General Information” tab of the item (Non-Stock: ScreenId=IN202000, Stock Item: ScreenId=IN202500).     Clicking on the pencil next to the category will open the window for that category(ScreenId=TX2055PL). Here you need to make sure that the category has the correct VAT type for the document you are creating. You will also see a list of available VAT Ids for this category.     Visma.Net Financials will select the VAT ID based on the the ID where Category and Zone match. Opening VAT Id 3 will show you that both Zone 01 and Category 03 will be present here, and will therefore be valid on the line when you are creating your invoice.     Posting the invoice without specifying the VAT id:     Generates invoice in VNF:     Specifying the VAT ID based on this will create the invoice, however posting a VAT ID that does not comply with the points in this article(eg. A VAT ID that has a category that is not does not match the type of document you want to create, a VAT Category / Zone combination that does not exist) will give you an error message. ℹ️For further information regarding how to set up VAT zones/ids and categories, contact your partner service / ERP Support.
View full article
10-02-2020 12:25 (Updated 10-06-2021)
  • 0 Replies
  • 0 kudos
  • 2656 Views
Override Visma.net Financials ERP number-series via API function has been implemented in Visma.net Financials ERP API version 8.25 (September 2020) With this function, we can set different asset number / ID via API than the Number-series that have been configured in the Visma.net Financials ERP UI without breaking the auto-numbering sequence. Currently, available in the following endpoints POST Customer POST CustomerDebitNote V2 POST SalesOrder POST Supplier POST Journal Transaction V2 POST PurchaseOrder POST Supplier Invoice POST CustomerCreditNote V2 POST CustomerInvoice V2   How to set it up? 1) Set "Allow manual numbering on imports" true in the Visma.net Financials ERP UI. (Number Series - ScreenId=CS201010)   2) Include the following key-value pairs in the payload based on the aforementioned endpoint DTO syntax. ("ReferenceNumber" field may vary depending on the resource.) Visma.net ERP API - Endpoint Documentation       ... "overrideNumberSeries": { "value": true }, "referenceNumber": { "value": "string" } ...         After a successful POST request, the value specified in the "ReferenceNumber" field would be assigned to the resource as an identifier. Afterward, the end-user or any integration can continue using Financial Company's automatic numbering setup in the transactions without any number skipped from the defined number series.
View full article
25-03-2021 15:20 (Updated 07-06-2021)
  • 0 Replies
  • 0 kudos
  • 1233 Views
In order to be able to add a new "Contact" to a Supplier or Customer via Visma.net ERP API, we can use the POST - Contact Endpoint.  Visma.net ERP API - Endpoint Documentation     Visma.net Financials ERP - Contact Module - ScreenID=CR302000     The connection between Supplier / Customer and Contact will be established by "businessAccount" field which is available in the POST - Contact DTO. "businessAccount": { "value": "string"   We need to set POST - Contact:"businessAccount" field's value with the "Customer ID" or "Supplier ID" depending on where you'd like to assign the "Contact". 1) POST Contact Endpoint (Sample payload) https://integration.visma.net/API/controller/api/v1/contact { "active": { "value": true }, "title": { "value": "Doctor" }, "firstName": { "value": "Crowley" }, "lastName": { "value": "Ozy" }, "position": { "value": "Position" }, "businessAccount": { "value": "Supplier or Customer ID" }, "sameAsAccount": { "value": false }, "address": { "value": { "addressLine1": { "value": "A1" }, "addressLine2": { "value": "A2" }, "addressLine3": { "value": "A3" }, "postalCode": { "value": "1313" }, "city": { "value": "test" }, "countryId": { "value": "01" }, "county": { "value": "02" } } }, "email": { "value": "test@gmail.com" }, "web": { "value": "web" }, "phone1": { "value": "0002" }, "phone2": { "value": "56565655" }, "phone3": { "value": "656565" }, "fax": { "value": "65656565" }, "contactMethod": { "value": "Any" }, "doNotCall": { "value": true }, "doNotFax": { "value": true }, "doNotEmail": { "value": true }, "doNotMail": { "value": true }, "noMassMail": { "value": true }, "noMarketing": { "value": true } }   2) Financials ERP UI Output Customer: Supplier:
View full article
07-06-2021 15:41 (Updated 07-06-2021)
  • 0 Replies
  • 0 kudos
  • 1057 Views
Manage environments Creating a new environment You can create a new environment from the: Manage Environments icon New button Launch screen Manage environments icon Click "Manage Environments" icon in the upper right corner of the Postman app. Select “Manage Environments”. Click the Add button. New button In the header toolbar, click the New button or click the “Gear” Manage Environments icon   Click "Environment" and enter a name for the new environment.   Add the variables you want to save as key-value pairs.   Click the Add/Update button. Manage Environments to change the values with your own   base_uri:currently pointing to API environment <https://integration.visma.net/API> client_id: The client identifier given to the client during the Application registration process. client_secret: The client secret given to the client during the Application registration process. redirect_uri: (CallbackURL)The Application’s callback URL that’s registered with the server. If not provided, Postman uses a default empty URL and extracts the code or access token from it. company_id: Financials companyId that will be used on API calls   scope:The scope of the access request {financialstasks} state: An opaque value that prevents cross-site request forgery auth_URL: The endpoint for authorization server, which retrieves the authorization code.<https://integration.visma.net/API/resources/oauth/authorize> Access_Token_URL: The endpoint for the resource server, which exchanges the authorization code for an access token. <https://integration.visma.net/API/security/api/v2/token>     oAuth2 OAuth 2.0 is an authorization type that enables you to approve an application that contacts another application for you without exposing your password. To use the OAuth 2.0 authorization in Postman In the Authorization tab, select "OAuth 2.0" from the TYPE drop down menu. From the "Add authorization data to" drop down menu, select either "Request URL" or "Request Headers". To set the authorization parameters for a request, you have three options: Click the Get New Access Token button. The screen appears.  Enter the appropriate values, click the Request Token button to populate the "Access Token" field, and then click the Send button. In the "Access Token" field, enter a token, or an environment defined variable, and click the Send button. In the "Available Tokens" drop down menu, select an existing token and click the Send button.     Get New Access Token After clicking the Get New Access Token button , Postman brings the following screen where user should fill out the parameters.     The values used here are the variables defined in the environment. After filling the parameters user needs to click Request Token button.   You will be directed to a Visma.net login, enter your credentials and sign in.     Allow Visma.net Integrations to connect to your account.     After you click the Allow button and if entered data is correct, you will see the Postman window that has the token. By default Postman expects to find a field named: access_token in the response. Since the Visma.Net response contains a field named  token , instead of access_token, Postman cannot auto-detect it as an access_token     Copy the value of token , close the MANAGE ACCESS TOKENS screen and paste it in the Access Token field.       We also recommend taking a look at : Connecting your Visma.Net Financials company to the API OAuth 2.0 Authorization Flow
View full article
28-01-2020 15:28 (Updated 23-05-2021)
  • 0 Replies
  • 1 kudos
  • 7672 Views
Currently, the "Attributes" parameter is exposed on the following endpoints.  Endpoint Customer CustomerContract Inventory Project Supplier   Setting the attributes for other assets works in the same way as for e.g. customer.    To set Attributes on Customers and Inventory Items you first need to Create the attributes in the UI. Assign the attributes to the Customer/Inventory etc. Classes respectively. Assign the class to the Customer/Inventory Item you want to use them on. Set the values of the attributes. 1. Creating the attributes: You can do this in the Attributes screen(ScreenId=CS205000): 2. Assigning the attributes to the class: Customer You can either reach the customer classes by Going to screen ScreenId=AR2010PL Clicking on the pen next to the class in the customer card: Here you then add attributes based on the attributes you have created in the attributes screen. Inventory You can either find the Item classes by: Going to the Item class screen(ScreenId=IN201000) Or clicking in the pen next to the Item class in the Inventory screen: Same as for customer, you can add attributes here based on the attributes you have created in the Attributes screen.   3/4. Setting the attributes and their values When this has been done, you can under the Attributes tab add the attributes from the classes the Customer/Inventory belongs to and set their values:   Using the attribute parameter via the API   To use these attributes, below is the syntax to use in your query: Filtering on several attributes. {{base}}/inventory?attributes={"AttributeID1":"ValueID1","AttributeID2":"ValueID2"} Filtering on date time {{base}}/inventory?attributes={"DATETIME":"2019-04-19"} Filtering on text. It will not match partial strings. only exact string. {{base}}/inventory?attributes={"TEXT":"long text to filter upon"} Filtering on True/False {{base}}/inventory?attributes={"ACTIVE":"1"} With special case for Multiple selection combo: {{base}}/inventory?attributes={"AttributeID":"ValueID1,ValueID2"}​ When encoding your query, the "equal sign" should not be encoded, below is an example for the customer endpoint and accepted forms of encoding it: Customer Endpoint: GET {baseUrl}customer?attributes={"DATETEST":"2019-01-01","TEST":"testvalue"} Encoded: (both encoding examples below are accepted) customer?attributes=%7B"DATETEST":"2019-01-01","TEST":"testvalue"%7D customer?attributes=%7B%22DATETEST%22%3A%222019-01-01%22%2C%22TEST%22%3A%22testvalue%22%7D Inventory Endpoint Inventory?attributes={"TEST":"testvalue"} Encoded: (both encoding examples below are accepted) inventory?attributes=%7B"TEST":"testvalue"%7D inventory?attributes=%7B%22TEST%22%3A%22testvalue%22%7D
View full article
19-04-2021 16:20 (Updated 21-05-2021)
  • 0 Replies
  • 1 kudos
  • 3052 Views
Since version 8.19 (18.02.2020), a method for retrieving resources with base64url encoded values has been available for all resource endpoints.   This makes it possible to use characters otherwise reserved in URL, i.e: : / ? # [ ] @ & * + ;  To use it, one simply adds b64(encodedValue) in place of the resource name when you make your request.   Below is an example of how this works. Inventory item with several reserved characters: Getting this without encoding the resource name will result in an error: GET /Inventory/:/?#[]@&*+;   If you instead encode the value with base64Url encoding: :/?#[]@&*+;  ⇾ Oi8_I1tdQCYqKzs, and insert it in the b64 method you will get the wanted item: GET /inventory/b64(Oi8_I1tdQCYqKzs)   If you want to read more about base64Url encoding, please have a look at the following links: RFC 4648 § 5  Base64Guru base64encode
View full article
11-01-2021 13:06
  • 1 Replies
  • 0 kudos
  • 2187 Views
In this article we'll review an error message that can be returned when invoking POST > Timecard operation via Timecard Endpoint as well as how to resolve this issue. Timecard endpoint is corresponding with "Employee time card" module in the Visma.Net ERP. (Document View "ScreenID=EP305000"  / Module View ScreenID=EP406000 )   Employee field indicates the employee's reference ID that who we want to create a time card for. The correspondent field in the API POST/PUT DTO is  "employee": { "value": "string" },   Based on your Financials ERP Company setup , The ID of the currently signed-in employee is selected by default on the identifier of the employee whose time cards you want to manage. If your Visma.net User which is used while generating an API Token isn't member of a group that is not hierarchically higher order in the company tree than the desired Employee ID  you want to create a time card, TimeCard POST operation returns the following error: "message": "You cannot create timecards for the selected user. Please review the company tree." The same scenario is valid for ERP UI as one cannot select different employee unless above-mentioned settings are configured. Since this is related to your Financials ERP Company configuration, you need to adjust organization/company tree setup. In order to be able to configure this, please follow the instructions below. 1) Workgroup assignment for the Employee Go to Company Tree (ScreenId=EP204060)  Click your Company Name on top left Add a group by clicking (+) under List of Groups Add a Group Member  Update Tree Save                   2) Continuing with, Create a new group under the recently created one.  Click Test Group on the hierarchy tree (left)  Add a group by clicking (+) under List of Groups Add a Group Member (That is different from your current Login, this employee must be registered in the company) Update Tree Save                 3) Then select newly created group e.g (A Group) and click (=>) right arrow, this will give transaction access to your current user on the users these grouped below in the hierarchy.                     4) Now this employee can be selected / used with both UI Employee Time Card and API.
View full article
31-08-2020 15:43 (Updated 31-08-2020)
  • 0 Replies
  • 0 kudos
  • 1241 Views
Please see attachment specific endpoints at https://integration.visma.net/API-index/ Webclient Class public void postAttachment(string[] files, string <objectID>, string token, string companyId) { using (WebClient client = new WebClient()) { client.Headers.Add("ipp-company-id", "<companyId>"); client.Headers.Add("ipp-application-type", "Visma.net Financials"); client.Headers.Add("Authorization", "bearer<token>"); for (int i = 0; i < files.Length; i++) // Multiple { byte[] responseArray = client.UploadFile(@"https://integration.visma.net/API/controller/api/v1/<Endpoint>/"+<objectID>+"/Attachment", "POST", files[i]); } } } HttpClient Class public void postAttachmentHttpClient() { using (var client = new HttpClient()) { client.DefaultRequestHeaders.Add("ipp-application-type", "Visma.net Financials"); client.DefaultRequestHeaders.Add("ipp-company-id", "<companyID>"); client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); HttpResponseMessage response; var content = new MultipartFormDataContent(); var path = Path.Combine(@"<path>"); string fileName = Path.GetFileName(path); FileStream fs = File.OpenRead(path); var sc = new StreamContent(fs); sc.Headers.Add("Content-Type", "application/octet-stream"); sc.Headers.Add("Content-Disposition","form-data; name=\"file\"; filename=\"" + Path.GetFileName(path) + "\""); content.Add(sc, "file", fileName); response = client.PostAsync(@"https://integration.visma.net/API/controller/api/v1/<endpoint>/<objectID>/Attachment", content).Result; } } Disclaimer The sample code on Visma Community > Visma.Net API is provided “AS IS” and any express or implied warranties, including the implied warranties of merchantability and fitness for a particular purpose, are disclaimed. In no event shall Visma or contributors be liable for any direct, indirect, incidental, special, exemplary or consequential damages.
View full article
07-02-2020 12:45 (Updated 10-07-2020)
  • 0 Replies
  • 0 kudos
  • 2479 Views
  You can get a recently created object ID by looking into the Response Headers{Location} of the HTTP Response Headers. HttpResponse.GetResponseHeader("location"); This is one of the Response Headers (LOCATION) that API returns after each successful POST Operation which contains created object ID. public string readLocation(string json) { string[] headers = new string[2]; string strResponse = string.Empty; string location = string.Empty; var httpWebRequest = (HttpWebRequest)WebRequest.Create(endPoint); httpWebRequest.ContentType = "application/json"; httpWebRequest.Method = httpVerb.POST.ToString(); httpWebRequest.Headers.Add("ipp-company-id", "<CompanyID>"); httpWebRequest.Headers.Add("ipp-application-type", "Visma.net Financials"); httpWebRequest.Headers.Add("Authorization", "<token>"); using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream())) { streamWriter.Write(json); streamWriter.Flush(); streamWriter.Close(); } var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse(); using (var streamReader = new StreamReader(httpResponse.GetResponseStream())) { var result = streamReader.ReadToEnd(); headers[0] = httpResponse.GetResponseHeader("location"); headers[1] = httpResponse.GetResponseHeader("date"); strResponse = ("ID: "+headers[0].Substring(headers[0].LastIndexOf('/') + 1)+" // Date: "+headers[1]); //Seperate Resource URL - Created Object ID } return strResponse ; } } Disclaimer The sample code on Visma Community > Visma.Net API is provided “AS IS” and any express or implied warranties, including the implied warranties of merchantability and fitness for a particular purpose, are disclaimed. In no event shall Visma or contributors be liable for any direct, indirect, incidental, special, exemplary or consequential damages.
View full article
07-02-2020 10:57 (Updated 07-02-2020)
  • 0 Replies
  • 0 kudos
  • 2211 Views
In this article, you can find guidelines for how to use Visma.Net API Endpoints connected to the Customer Ledger from Visma.Net Financials.          
View full article
22-01-2020 15:53 (Updated 24-01-2020)
  • 0 Replies
  • 0 kudos
  • 5083 Views
  In this article, you can find guidelines for how to use Visma.Net API Endpoints connected to the Customer Ledger from Visma.Net Financials. For more information regarding the endpoints, query parameters and other endpoints for all areas, Please read the documentation found here: Swagger - Visma.Net Integrations Documentation     Supplier  Common usage example for Supplier(ScreenId=AP303000) URL: https://integration.visma.net/API/controller/api/v1/Supplier Methods: GET All Suppliers URL: https://integration.visma.net/API/controller/api/v1/Supplier   Example of usage with parameters Query parameters: lastModifiedDateTime=YYYY-MM-DD As of today Filtering Parameters does not accept certain characters such as W-Z These are the formats for Filtering *2001-01-01 *2001-01-01 13:13:13 *2001-01-01 13:13:13.133   lastModifiedDateTimeCondition=Operator Supported comparative operators for LastModifiedDateTime Conditions on filtering  > - Greater than < - Less than <= - Less than or equal to >= - Greater than or equal to   Usage example: This query will return suppliers updated on 2020-01-14 or later. GET https://integration.visma.net/API/controller/api/v1/Supplier ?lastModifiedDateTime=2020-01-14 &l astModifiedDateTimeCondition=>= ( Lines are separated for readability) POST Supplier URL: https://integration.visma.net/API/controller/api/v1/Supplier   This example shows the minimum fields you should send to be able to post a new Supplier, if you are using automatic numbering you can omit the “number” field. JSON Request body {     "number": {         "value": "50002"     },     "name": {         "value": "NewSupplier"     },     "mainAddress": {         "addressId": 3001,         "addressLine1": "Testroad 5",         "postalCode": "0110",         "city": "OSLO",         "country": {             "id": "NO",             "name": "NORGE"         },         "county": {             "id": "0301",             "name": "OSLO"         }     },     "supplierClassId": {         "value": "1"     } }   If sent successfully, the API will return: Status 201 Created   Supplier Invoice Common usage example for Supplier Invoice(ScreenId=AP301000) URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice Methods: GET All Supplier Invoices URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice   Example of usage with parameters Query parameters: Project=String Will limit response to documents with the specified project   Usage example: This will return Supplier Invoices with projectID 20. GET https://integration.visma.net/API/controller/api/v1/customerDebitNote ?project=20 POST SupplierInvoice URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice   This example shows the minimum fields you should send to be able to post a new Supplier Invoice, if you are using automatic numbering you can omit the “referenceNumber” field. JSON Request body {     "date": {         "value": "2019-11-08T00:00:00"     },     "documentType": {         "value": "Invoice"     },     "referenceNumber": {         "value": "000357"     },     "invoiceLines": [         {             "inventoryNumber": {                 "value": "test*test"             },             "lineNumber": {                 "value": "1"             },             "operation": "Insert",             "projectId": {                 "value": "X"             },             "quantity": {                 "value": 1             },             "subaccount": [                 {                     "segmentId": 1,                     "segmentValue": "00"                 }             ],             "unitCostInCurrency": {                 "value": "1.60"             },             "vatCodeId": {                 "value": "1"             }         }     ],     "paymentRefNo": {         "value": "test"     },     "postPeriod": {         "value": "112019"     },     "supplierNumber": {         "value": "50000"     },     "supplierReference": {         "value": "test"     } }   If sent successfully, the API will return: Status 201 Created   PUT PurchaseOrder URL: https://integration.visma.net/API/controller/api/v1/SupplierInvoice/{debitNoteNumber}   When using PUT, you only send the fields you want to update. In the below example, we update the first line of the Credit Note: URL PUT https://integration.visma.net/API/controller/api/v1/SupplierInvoice/000050 JSON Request body {     "lines": [         {             "operation": "Insert",             "lineNumber": {                 "value": 1             },             "inventoryNumber": {                 "value": "6"             },             "quantity": {                 "value": 1             },             "unitPriceInCurrency": {                 "value": 1             }         }     ] }   If successful, the API will return: Status: 204 No Content   Purchase Order Common usage example for Endpoint(ScreenId=PO301000) URL: https://integration.visma.net/API/controller/api/v1/PurchaseOrder Methods: GET All Purchase Orders URL: https://integration.visma.net/API/controller/api/v1/PurchaseOrder   Example of usage with parameters Query parameters: Supplier=string Lets you search for Purchase Orders registered to one supplier   orderStatus=string Lets you define what orderStatuses to return, these are the Statuses of Purchase Order: On hold - The purchase order is a draft and can be edited manually. Open - The order was processed in accordance but has not been completed yet. Pending approval - The purchase order has not been approved by all the assigned persons. Rejected - The order was rejected by one of the persons assigned to approve it. Pending printing - Printing is required for the document but has not been performed yet. Pending e-mail - E-mailing is required for this document, but it has not been performed yet. Closed - All the ordered goods were received. Cancelled - The order was cancelled through the “ Cancel order” action - An order with this status cannot be edited, and purchase receipts cannot be based on it.   Usage example: This will return Purchase Orders registered on supplier “50000” that are in status OPEN. GET https://integration.visma.net/API/controller/api/v1/purchaseorder ?Supplier=50000 &status=open (Lines are separated for readability) POST PurchaseOrder URL: https://integration.visma.net/API/controller/api/v1/PurchaseOrder   This example shows the minimum fields you should send to be able to post a new Purchase Order, if you are using automatic numbering you can omit the “referenceNumber” field. JSON Request body {     "orderType": {         "value": "RegularOrder"     },     "date": {         "value": "2019-12-27T09:46:11.202Z"     },     "supplier": {         "value": "50000"     },     "lines": [         {             "operation": "Insert",             "inventory": {                 "value": "teststock"             },             "lineType": {                 "value": "GoodsForInventory"             },             "warehouse": {                 "value": "2"             },             "uom": {                 "value": "PALL"             },             "orderQty": {                 "value": 2             },             "unitCost": {                 "value": 2000             }         }     ] }   If sent successfully, the API will return: Status 201 Created PUT PurchaseOrder URL: https://integration.visma.net/API/controller/api/v1/PurchaseOrder/{purchaseOrder}   When using PUT, you only send the fields you want to update. In the below example, we update the first line of the Credit Note: URL PUT https://integration.visma.net/API/controller/api/v1/PurchaseOrder/25698 JSON Request body {     "lines": [         {             "operation": "Update",             "lineNumber": {                 "value": 1             },             "inventoryNumber": {                 "value": "6"             },             "quantity": {                 "value": 1             },             "unitPriceInCurrency": {                 "value": 1             }         }     ] }   If successful, the API will return: Status: 204 No Content   Supplier Payment Common usage example for Endpoint(ScreenId=AP302000) URL: https://integration.visma.net/API/controller/api/v1/SupplierPayment Methods: GET All Supplier Payments URL: https://integration.visma.net/API/controller/api/v1/SupplierPayment   Example of usage with parameters Query parameters: SupplierId=String This will limit the response to the provided SupplierId   Usage example: This will return Purchase Orders registered on supplier “50000”  GET https://integration.visma.net/API/controller/api/v1/purchaseorder ?Supplier=50000 (Lines are separated for readability)
View full article
24-01-2020 11:51 (Updated 24-01-2020)
  • 0 Replies
  • 0 kudos
  • 2144 Views