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

Discussions

Ask a Question

Best approach to update a custom field at the Member/Party level?

Hi, I'm looking to know whether custom fields can be created/added to GroupMember/Party entities, and if so, can they be updated via the REST API? I couldn't find an endpoint for that specific matter, so perhaps there is another way? Thank you
ANSWERED

Calling an IQA using the REST API

I have created an IQA with a url filter (@url:PartyId) and I am trying to call the IQA with: api/IQA?QueryName=Real_IQA_Path?PartyId=12345. I get a response status code of 500, Internal Server Error. But when I hard code the filter in iMIS and change my call to: api/IQA?QueryName=Real_IQA_Path Then it works just fine. What is the syntax for calling an IQA with a url filter?

REST API: Creating a cart with MISC, SEC & SUB with custom pricing.

Hi All, I´ve created a json Cart with MISC, SEC & SUB product types but was not able to override theirs pricing. Looks like "IsUnitPriceOverridden" property does not affect it. Does anyone know if it is possible to override pricing for those product types? Any help would be appreciate. Thanks. Roberto.

Is there a way to dynamically look for parameters in an IQA REST Webservice?

If we have an application where the user puts in the path to an IQA on their iMIS site, would there be a way to look up the parameters of the IQA they selected?

Getting error while renewing dues subscription

Hi, When I renew a dues product, I am getting a 'ComponentNotRegisteredError' The error details is The requested service 'Asi.Soa.Commerce.ServiceContracts.ILegacyBillingService' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency. I am using the ASI code sample from the following url https://developer.imis.com/docs/dues <%@ Page Language="C#" Debug="true" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="System.Linq" %> <%@ Import Namespace="Asi.Core.Ioc" %> <%@ Import Namespace="Asi.Soa.ClientServices" %> <%@ Import Namespace="Asi.Soa.Commerce.DataContracts" %> <%@ Import Namespace="Asi.Soa.Commerce.ServiceContracts" %> <%@ Import Namespace="Asi.Soa.Core.DataContracts" %> <%@ Import Namespace="Asi.Soa.Core.ServiceContracts" %> <%@ Import Namespace="Asi.Soa.Membership.DataContracts" %> <%@ Import Namespace="Asi.Soa.Core.Interfaces" %> <%@ Import Namespace="Autofac" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script runat="server" language="cs"> protected override void OnLoad(EventArgs e) &#123; PayRenewalDuesExample(); &#125; public void PayRenewalDuesExample() &#123; // Initialize entity and cart managers, party ID that will be joining and renewing EntityManager entityManager = new EntityManager(); string partyId = "18052"; // Brian Murphy CartManager joinCartManager = new CartManager(entityManager, partyId); // Get membership fees item, set item quantities and construct order line using helper method var findResultsData = entityManager.Find( new QueryData(ItemData.EntityTypeName) .AddCriteria(new CriteriaData("ItemCode", OperationData.Equal, "REGULAR_MEMBERSHIP_FEES"))).Result; ItemData item = findResultsData[0] as ItemData; Dictionary<string, int> quantities = new Dictionary<string, int> &#123; &#123;"REGULAR_MEMBERSHIP_FEES/REG", 1&#125;, &#123;"REGULAR_MEMBERSHIP_FEES/PAC", 1&#125;, &#123;"REGULAR_MEMBERSHIP_FEES/NORTH", 1&#125; &#125;; OrderLineData joinOrderLine = ConstructOrderLine(item, quantities); // Add line to cart manager, and add payment based off of order total joinCartManager.AddLine(joinOrderLine); joinCartManager.Cart.ComboOrder.Payments = new RemittanceDataCollection &#123; new RemittanceData &#123; Amount = new MonetaryAmountData( joinCartManager.Cart.ComboOrder.Order.OrderTotal.Value.Amount, joinCartManager.Cart.ComboOrder.Order.Currency), PaymentMethod = new PaymentMethodData &#123;PaymentMethodId = "Cash"&#125; &#125; &#125;; // Submit the cart joinCartManager.SubmitCart(); // Need at least a one day offset from the join date to create a renewal billing DateTime tomorrow = Asi.AppTime.Now.Date.AddDays(1); DateTime effectiveDate = new DateTime(Asi.AppTime.Now.Year, Asi.AppTime.Now.Month, 1).AddMonths(1).AddYears(1); // Run membership fees billing cycle string billingCycle = "Regular Membership Fees"; using (var scope = IocSupport.GetRequestLifetimeScope().BeginLifetimeScope()) &#123; var billingService = scope.Resolve<ILegacyBillingService>(); LegacyBillingData runData = new LegacyBillingData &#123; BillingCycleId = billingCycle, IsRenewal = true, IndividualBillingPartyId = partyId, RunDate = tomorrow, EffectiveDate = effectiveDate &#125;; billingService.Run(runData); /* var builder = new ContainerBuilder(); builder.RegisterType<ILegacyBillingService>(); using (var container = builder.Build()) &#123; var billingService = container.Resolve<ILegacyBillingService>(); billingService.Run(runData); &#125;*/ &#125; // Instantiate invoice ID, cart manager for renewal invoice, and find invoice by the ID string invoiceId = string.Format("CASH:&#123;0&#125;:&#123;1:yyyyMMdd&#125;-1", partyId, Asi.AppTime.Now.Date); CartManager invoiceCartManager = new CartManager(entityManager, partyId); InvoiceData invoice = entityManager.FindByIdentity<InvoiceData>(invoiceId); invoiceCartManager.AddInvoice(invoice); // Instantiate membership manager and find Party by ID MembershipManager membershipManager = new MembershipManager(entityManager); PartyData party = membershipManager.FindPartyByPartyId(partyId); // Initialize order line from invoice, add it to the cart and create associated payment var orderLine = ComboOrderManager.GetOrderLineFromInvoice(invoice, invoiceCartManager.Cart.ComboOrder.Order, party, entityManager); invoiceCartManager.AddLine(orderLine); invoiceCartManager.Cart.ComboOrder.Payments = new RemittanceDataCollection &#123; new RemittanceData &#123; Amount = new MonetaryAmountData( invoiceCartManager.Cart.ComboOrder.Order.OrderTotal.Value.Amount, invoiceCartManager.Cart.ComboOrder.Order.Currency), PaymentMethod = new PaymentMethodData &#123;PaymentMethodId = "Cash"&#125; &#125; &#125;; // Submit the cart var results = invoiceCartManager.SubmitCart(); Response.Write(results.ValidationResults.Summary); &#125; internal static OrderLineData ConstructOrderLine(ItemSummaryData item, Dictionary<string, int> quantitiesOrdered) &#123; OrderLineData orderLine = new OrderLineData &#123; Item = item &#125;; ItemSetItemData itemSet = item as ItemSetItemData; if (itemSet != null) &#123; orderLine.ChildOrderLines = new OrderLineDataCollection(); foreach (ItemSetComponentData component in itemSet.Components) &#123; orderLine.ChildOrderLines.Add(ConstructOrderLine(component.Item, quantitiesOrdered)); &#125; if (orderLine.ChildOrderLines.Any( x => x.QuantityOrdered.HasValue && x.QuantityOrdered.Value.Amount > 0m)) &#123; orderLine.QuantityOrdered = new QuantityData(1m); &#125; &#125; else &#123; int quantity; if (quantitiesOrdered.TryGetValue(item.ItemCode, out quantity)) &#123; orderLine.QuantityOrdered = new QuantityData(quantity); &#125; &#125; return orderLine; &#125; </script> </head> <body> <form id="form1" runat="server"> <asp:Label id="lbl1" runat="server" /> </form> </body> </html> Could any one help to resolve this issue. I am using iMIS version 20.2.64.8807 Thanks, Prakasam
ANSWERED

How to fetch the entire list of active members at once?

Hi, I've been through the documentation and fiddled with your test API, however I'm unsure which endpoint I should use and how I can filter by the member status (PartyStatusData.PartyStatusId) and get only the active ones. Additionally, how can I get each member's matching User? Do I need to query the https://testapi.imis.com/Asi.Scheduler_SDKDemo/api/User endpoint instead? Lastly, can do all members have a corresponding User record or can a member exist without User login credentials? Thank you

REST API: Updating a custom table (non iMIS).

Hello, I´ve created a custom table and inserted some records using REST API. But I couldn´t update some record using PUT or PATCH verb. Is it possible to update a record in a custom table (non iMIS)? Below is the json structure: { "$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts", "EntityTypeName": "Background", "PrimaryParentEntityTypeName": "Party", "Identity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Background", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "194", "10" ] } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Party", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values": [ "194" ] } }, "Properties": { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "CManager", "Value": { "$type": "System.Boolean", "$value": true } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "EducationLevel", "Value": "Test Update Post" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "EndYear", "Value": { "$type": "System.Int32", "$value": 2019 } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "PartyId", "Value": "194" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "JobTitle", "Value": "Test Update JobTitle" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "Manager", "Value": "Test Update Manager" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "Responsibilities", "Value": "Test Update Responsibilities" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "SEQN", "Value": { "$type": "System.Int32", "$value": 10 } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "StartYear", "Value": { "$type": "System.Int32", "$value": 2018 } } ] } } Any help would be appreciate. Regards, Roberto.

Stored Procedures with REST

Can we run stored procedures like "asi_RebuildCounters" or any custom stored procedures with current imis REST API? Is this a possibility with current API or we can expect it in the future?

REST API - POST VERB : JSON --> How can we easily create a JSON Object of UD Defined MultiInstance Table.

This is the sample JSON that is needed to create a record in Name_CEU table. My Question is how can we easily create this for other custom iMIS tables? ``` { "$type":"Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts", "EntityTypeName":"Name_CEU", "PrimaryParentEntityTypeName":"Party", "Identity":{ "$type":"Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName":"Name_CEU", "IdentityElements":{ "$type":"System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values":[ "23179", "2" ] } }, "PrimaryParentIdentity":{ "$type":"Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName":"Party", "IdentityElements":{ "$type":"System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib", "$values":[ "23179" ] } }, "Properties":{ "$type":"Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts", "$values":[ { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Course" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Date_Reported" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Event" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Followup" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Hours", "Value":{ "$type":"System.Double", "$value":10 } }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Notes", "Value":"These are some notes on the subject!" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Source" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Type" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"CEU_Year" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"PartyId", "Value":"23179" }, { "$type":"Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name":"SEQN", "Value":{ "$type":"System.Int32", "$value":2 } } ] } }```
ANSWERED

Rest Permissions Check

Do you know of an endpoint that we can do security checks for when using an OAuth type call? I found a discussion on using the DocumentSummary endpoint and then the Document endpoint to get access to documents that are uploaded to RiSE. What I don't know is if there is a security endpoint in which I can check if the document requested is viewable to the public? Since the OAuth user has access to pull the doc data, I don't want to just allow full access to a document that would require a certain level of access. I haven't seen a way to get access to a document other than using the download document link in the html content widget, so was looking for another option so that I could use it with a UD BO and a public IQA. Pull the data back out from the public IQA and display a link to download/open the document. So I have the REST calls now to search and fetch the doc, just want to make sure the security for the doc is allowed. I don't want to just have an open download feature that if you guess the right path and doc name, you can access a secured document.