These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question

Issue with Serialize and Deserialize the <MonetaryAmountData>.

Hi, I tried to use Json.Net to deserialize the result from the API call, I got the following error: "Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Asi.Soa.Core.DataContracts.MonetaryAmountData' because the type requires a JSON primitive value (e.g. string, number, boolean, null) to deserialize correctly. To fix this error either change the JSON to a JSON primitive value (e.g. string, number, boolean, null) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object. You could see the same error with this test: string testString = "{ \"$type\":\"System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib\", \"Amount\":345.0, \"Currency\":{ \"$type\":\"Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts\", \"CurrencyCode\":\"AUD\", \"DecimalPositions\":2, \"ExtensionData\":{ \"$type\":\"System.Runtime.Serialization.ExtensionDataObject, System.Runtime.Serialization\" } }, \"IsAmountDefined\":true }"; MonetaryAmountData test = JsonConvert.DeserializeObject<MonetaryAmountData>(testString, settings); It seems that it asks for a primitive string instead of a JSON string. Then, I tried to serialize a MonetaryAmountData object and got "345". And the error became "Newtonsoft.Json.JsonSerializationException: 'Error converting value "345" to type 'Asi.Soa.Core.DataContracts.MonetaryAmountData'. " when to deserialize it, which meant it didn't accept the primitive string. MonetaryAmountData testAmount = new MonetaryAmountData((decimal)345.0, new CurrencyData("AUD")); // testAmount = {345.00}, the currency part was missing. string testSerialize = JsonConvert.SerializeObject(testAmount, Formatting.Indented); // testSerialize = "345", it was a primitive string. MonetaryAmountData testDeserialize = JsonConvert.DeserializeObject<MonetaryAmountData>(testSerialize); Is there anything I am doing wrong? Anyone successfully deserialized JSON to <MonetaryAmountData> object in ASP.NET? Cheers, Fred
ANSWERED

Gen Table endpoint missing after 20.3.85 update

Hello, We noticed that the GenTable endpoint (documented here: https://developer.imis.com/reference/gentable ) no longer works for iMIS Cloud Clients who have been upgraded to the latest version 20.3.85 Calls to this endpoint now return a 503 error. (service Unavailable) Was this an intentional change with this update? We found that we can get the data using the business object: /api/CsGeneralLookupTables is this the correct way we should do this now moving forward? Why was this endpoint removed? are there any other endpoints removed with the 20.3.85 update? Thanks for your help James

CORS Policies and Developing Client-Based iParts

We are attempting to create an iPart that make an API call to a 3rd party endpoint and can successfully make the call using Postman and in the console on the 3rd party's website where the origin is the same. However, if we attempt this call from our iMIS website, we receive a CORS exception because there is no Access-Control-Allow-Origin header in the response. Ultimately, this means that server to server calls are acceptable while client to server calls are not. Is there a way in developing these client-based iParts to make the call server to server so as to avoid the CORS issue? I do not see anything regarding this in the documentation here, https://developer.imis.com/docs/developing-a-client-based-ipart, and it appears that developing webform-based iParts (ASCX), https://developer.imis.com/docs/developing-webform-based-iparts-ascx, is now deprecated and not usable in the cloud.
ANSWERED

API - Get/Post/Put to Order Lines in 20.3

Hello, I know as of 20.3 you are no longer able to access the tables via the API directly such something like: "https://imisurl.com/api/cart". How is something like this done to the Order Lines table in 20.3, or how do developers recommend it now? Thanks.

REST API General Usage Questions

Hi, 1) What is the recommended way to build a solution using the swagger models? 2) What version of iMIS was used to generate these swagger models https://developer.imis.com/docs/imis-rest-api-data-models-and-swagger-json-files 3) Is there a way to get the swagger model for the version of iMIS that I am using, whether that be iMIS 2017 or the cloud? I've tried using nswag to generate client models to deserialize the iMIS responses into but I've not yet been successful with this approach. I'm curious to hear what others suggest. Thanks

How to access (SSO) Link using client ipart at angular

Hi Team , We have a client application(SSO) that application link should return a JSON value. If I tried to access the return values using angular client iPartin client application(SSO) link using below method: this.http.get<any>("https://****.imiscloud.com/******.aspx") I am getting the below values. Its not return actual value: "<html><body onload='document.forms["form"].submit()'> <form name='form' action='https://bottomline.ifinity.co.uk/ValidateUKBankAccount.aspx' method='post'> <input type='hidden' name='refresh_token' value='58955b60528a4443af56e4bc9810b64e'> </form></body></html> " How can I access the client application link in angular client iPART? Do I need to pass any data to access the link ?

iMIS Desktop .NET Pulling Currently Logged In User and Setting Current iMIS User Programatically

I have created a custom integration in iMIS Desktop as a contractor for P.E.O. We recently updated to version 20.2.65.9541. We were using the Standard iMIS Callback/Event Interface to pull the current logged in user and update which client was selected in iMIS Desktop. Now, we are not able to pull this info except on the original server. Is there something that we are missing?
ANSWERED

How do I work with the Communication Preferences Link?

When you create a communication in the Staff site, you can put a [INSERT COMMUNICATION PREFERENCES LINK], which generates a link with a token for managing a contacts communicaiton preferences. Is there anything with in the API that will generate these tokens?
ANSWERED

update trans.transaction_date and trans.entered_by

I'm so new with Imis and .net I have this app that reads data from a file then update imis records from the data in that file. I have a code that update the trans table. Part of the code is below ComboOrderData comboOrderData = new ComboOrderData { Currency = new CurrencyData { CurrencyCode = "USD" }, Order = new OrderData { Currency = new CurrencyData("USD"), LineTotal = new MonetaryAmountData(donation.Amount, new CurrencyData("USD")), Lines = orderLineDataCollection, OrderDate = OrderDate = DateTime.Now, OrderState = OrderStateData.Entered, OrderTotal = new MonetaryAmountData(donation.Amount, new CurrencyData("USD")), SoldToCustomerParty = new CustomerPartyData { PartyId = donation.DonorId }, TotalBasePrice = new MonetaryAmountData(donation.Amount, new CurrencyData("USD")), SourceCode = donation.SourceCode }, Payments = remittanceDataCollection }; Currently, the trans.transaction_date is pulling the current date and the trans.entered_by is pulling "Manager". This part is seems like done by Imis automatically. I think. We would like the trans.transaction_date to be the donation_date from the file and the trans_entered_by will be the file_name that we read the data from or uploaded What fields do I need to set to update the trans.transaction_date and trans.entered_by? I thought OrderDate from OrderData will update the trans.transaction_date but it's not. It updates the trans.effective_date instead. Thank you.
ANSWERED

Paying Open Invoice

We are trying to pay an open invoice, specifically for dues. We are currently trying to post to payment API endpoint, example post below. Is this the best endpoint to use? What fields are needed to successfully post a payment to an open invoice? jQuery.ajax("/api/Payment", { type: "POST", headers: { "RequestVerificationToken": document.getElementById("__RequestVerificationToken").value }, "dataType": "json", "contentType": "application/json", "body": "{ "$type": "Asi.Soa.Commerce.DataContracts.PaymentData, Asi.Contracts", "IsReversible": true, "PaymentApplications": { "$type": "Asi.Soa.Commerce.DataContracts.PaymentApplicationDataCollection, Asi.Contracts", "$values": [{ "$type": "Asi.Soa.Commerce.DataContracts.LegacyPaymentApplicationData, Asi.Contracts", "ApplicationAmount": { "$type": "Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts", "Amount": 20 , "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "USD", "DecimalPositions": 2 }, "IsAmountDefined": true }, "InvoiceNumber": 2320 }] }, "PayorParty": { "$type": "Asi.Soa.Membership.DataContracts.PartySummaryData, Asi.Contracts", "PartyId": "23216", "Id": "23216" }, "PaymentDate":"11/30/2020" , "Amount": { "$type": "Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts", "Amount": 20, "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "USD", "DecimalPositions": 2 }, "IsAmountDefined": true }, "Description": "Main Checking Account", "PaymentMethodId": "CASH", "FinancialEntityId": "DEMO", "CashFinancialAccount": { "$type": "Asi.Soa.Commerce.DataContracts.FinancialAccountData, Asi.Contracts", "GLAccount": { "$type": "Asi.Soa.Commerce.DataContracts.GLAccountData, Asi.Contracts", "GLAccountId": "1-1100", "GLAccountCode": "1-1100" } } }" }) ;