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

Discussions

Ask a Question

Where is the avatar stored and how do I get access for a list of contacts?

I was searching through the forum and a few people have mentioned that the avatar is stored in PartyImage. Thing is, there doesn't appear to be a mention of PartyImage anywhere in the database. Also, different people have mentioned that all of the avatars are stored in BLOBs, I have partly confirmed this with a request to the PartyImage endpoint. When I inspect the image elements in staff views, they exist as hotlinks to JPGs in the "/web/images/profile" directory. What's with this? Does the image actually exist anywhere in a filesystem or is this a bit of temporary fakery in the api? I need to grab profile images for a list of contacts, but I don't want a base64 encoded image. I want a list of thumbnails that I can efficiently link to and load aynchronously. As far as I can tell, the PartyImage that is returned is far too large (full res looks like). What's the best way to do this? Thanks

_Validate on ComboOrder Returning Empty Lines Array

Hi all, I've been trying to get the pricing data for a combo order from iMIS using the REST API. Unfortunately, every time I try to make a call with the relevant customer Id and the event code, I get an empty lines array back. The event code does exist and does currently allow registrations. I'm not sure if this is an issue with the request I'm making or if it's got something to do with the pricing data in the desktop client. Has anyone got any ComboOrder examples that I can use as a basis? Is there any documentation I haven't found that I could potentially use to help me? The HTTP request/response is below. Request: ```json { "$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2 }, "Order": { "$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts", "BillToCustomerParty": { "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts", "Id": 671147 }, "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2 }, "Lines": { "$type":"Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.EventOrderLineData, Asi.Contracts", "Event": { "$type": "Asi.Soa.Core.DataContracts.EventSummaryData, Asi.Contracts", "EventCode": "T18104-07" } } ] } } } ``` Response: ```json { "$type": "Asi.Soa.Core.DataContracts.ValidateResults`1[[Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts]], Asi.Contracts", "Entity": { "$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "Order": { "$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts", "BillToCustomerParty": { "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts", "Id": "671147", "Party": { "$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts", "Gender": 0, "PersonName": { "$type": "Asi.Soa.Membership.DataContracts.PersonNameData, Asi.Contracts", "FirstName": "John", "InformalName": "John", "LastName": "Smith", "NamePrefix": "Mr", "FullName": "Mr John Smith" }, "AdditionalAttributes": { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "CustomerTypeDescription", "Value": "Individual/Employee" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "IsMemberRecord", "Value": { "$type": "System.Boolean", "$value": false } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "CustomerTypeCode", "Value": "IND" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "IsMember", "Value": { "$type": "System.Boolean", "$value": false } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "IsInactiveMember", "Value": { "$type": "System.Boolean", "$value": false } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "AllowAdvanceRenewal", "Value": { "$type": "System.Boolean", "$value": false } }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "JoinDate", "Value": "0001-01-01T00:00:00" } ] }, "Addresses": { "$type": "Asi.Soa.Membership.DataContracts.FullAddressDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Membership.DataContracts.FullAddressData, Asi.Contracts", "AdditionalLines": { "$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts", "$values": [] }, "Address": { "$type": "Asi.Soa.Membership.DataContracts.AddressData, Asi.Contracts", "AddressId": "450093", "AddressLines": { "$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts", "$values": [ "123 John St" ] }, "CarrierRoute": "", "CityName": "Perth", "CountryCode": "AU", "CountryName": "Australia", "CountrySubEntityCode": "WA", "CountrySubEntityName": "Western Australia", "FullAddress": "123 John St\rPerth, WA 6000\rAUSTRALIA", "PostalCode": "6000", "VerificationStatus": 0 }, "AddresseeText": "Mr John Smith\r\n123 John St\rPerth, WA 6000\rAUSTRALIA", "AddressPurpose": "Postal Address", "CommunicationPreferences": { "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts", "Reason": "default" }, { "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts", "Reason": "mail" }, { "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts", "Reason": "bill" }, { "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts", "Reason": "ship" } ] }, "Email": "[email protected]", "Fax": "123456789", "FullAddressId": "450093", "Phone": "123456789", "Salutation": { "$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts", "SalutationMethod": { "$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts", "PartySalutationMethodId": "main" }, "Text": "Mr John Smith" }, "DisplayName": "John" } ] }, "AlternateIds": { "$type": "Asi.Soa.Core.DataContracts.AlternateIdDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.AlternateIdData, Asi.Contracts", "Id": "671147", "IdType": "Id" } ] }, "Emails": { "$type": "Asi.Soa.Membership.DataContracts.EmailDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Membership.DataContracts.EmailData, Asi.Contracts", "Address": "[email protected]", "EmailType": "Postal Address" } ] }, "FinancialInformation": { "$type": "Asi.Soa.Membership.DataContracts.FinancialInformationData, Asi.Contracts" }, "Phones": { "$type": "Asi.Soa.Membership.DataContracts.PhoneDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Membership.DataContracts.PhoneData, Asi.Contracts", "Number": "123456789", "PhoneType": "Postal Address" }, { "$type": "Asi.Soa.Membership.DataContracts.PhoneData, Asi.Contracts", "Number": "123456789", "PhoneType": "Postal Address Fax" } ] }, "Salutations": { "$type": "Asi.Soa.Membership.DataContracts.PartySalutationDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts", "SalutationId": "671147:LIST_AS", "SalutationMethod": { "$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts", "PartySalutationMethodId": "LIST_AS" }, "Text": "Mr John Smith" } ] }, "SocialNetworks": { "$type": "Asi.Soa.Membership.DataContracts.PartySocialNetworkDataCollection, Asi.Contracts", "$values": [] }, "CommunicationTypePreferences": { "$type": "Asi.Soa.Membership.DataContracts.PartyCommunicationTypePreferenceDataCollection, Asi.Contracts", "$values": [] }, "SortIsOverridden": false, "UpdateInformation": { "$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts", "CreatedBy": "MANAGER", "CreatedOn": "2019-03-15T15:00:12.547", "UpdatedBy": "MANAGER", "UpdatedOn": "2019-03-15T15:00:13.827" }, "PartyId": "671147", "Id": "671147", "UniformId": "62ad5092-65ee-4662-97e7-7fabd8db0755", "Status": { "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts", "PartyStatusId": "A", "Name": "Active", "Description": "Active" }, "Name": "Mr John Smith", "Sort": "Smith, John" }, "PartyId": "671147" }, "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "OrderDiscount": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "LineDiscountTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "Lines": { "$type": "Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts", "$values": [] }, "LineTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "MiscellaneousChargesTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "OrderDate": "2019-03-15T15:16:31.9553096Z", "OrderTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "ShippingTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "AdditionalCharges": { "$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeData, Asi.Contracts", "AdditionalChargeId": "EventCredits", "Description": "Credits", "TotalAmount": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "Tax": { "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts", "Details": { "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts", "$values": [] }, "TaxTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "InclusiveTaxTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true } } } ] }, "TaxInformation": { "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxInformationData, Asi.Contracts", "InclusiveTaxTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "TaxTotal": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "OrderTaxes": { "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDataCollection, Asi.Contracts", "$values": [] } }, "TotalBasePrice": { "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib", "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "AUD", "DecimalPositions": 2, "ExtensionData": null }, "IsAmountDefined": true }, "AdditionalAttributes": { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "OrderTotalExcludingCredits", "Value": { "$type": "System.Decimal", "$value": 0.0 } } ] } } }, "IsValid": true, "ValidationResults": { "$type": "Asi.Soa.Core.DataContracts.ValidationResultsData, Asi.Contracts", "Errors": { "$type": "Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts", "$values": [] }, "Warnings": { "$type": "Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts", "$values": [] } } } ``` Cheers, Jordan.

Dues Join through C# SOA

I've taken a look at the example here: https://developer.imis.com/docs/dues And tried to adapt it to our system, substituting in the proper product codes, etc. The products are found, and the order line is added to the cart properly... all except the pricing data. When I inspect the order line, there is no amount due. Not on the cart total, nor on the order line or child order line. The user I'm testing with is not a member, so that doesn't seem to be the issue. I've checked directly by doing a query against the PartyItemPrice entity as well, only to draw the same results. The product pricing works fine on the normal Rise site, just not through the API. Any thoughts on what might be going awry? Code below: var findResultsData = entities.Find( new QueryData(ItemData.EntityTypeName) .AddCriteria(new CriteriaData("ItemCode", OperationData.Equal, "JOIN_NOW_NONMEMBER"))).Result; ItemData item = findResultsData[0] as ItemData; //returns no price QueryData query = new QueryData("PartyItemPrice"); query.AddCriteria(CriteriaData.Equal("ItemId", "JOIN_NOW_NONMEMBER")); query.AddCriteria(CriteriaData.Equal("PartyId", "632389")); var findPrice = entities.Find(query).Result; //returns no price QueryData query2 = new QueryData("PartyItemPrice"); query.AddCriteria(CriteriaData.Equal("ItemId", "JOIN_NOW_NONMEMBER/DUES")); query.AddCriteria(CriteriaData.Equal("PartyId", "632389")); var findPrice2 = entities.Find(query).Result; //returns no price Dictionary<string, int> quantities = new Dictionary<string, int> { {"JOIN_NOW_NONMEMBER/DUES", 1}, }; var orderLineData = ConstructOrderLine(item, quantities);

Other token grant_types or ways to get the token?

For our interaction with iMIS another application will be requesting the api's via scheduled jobs and not via user interaction. For other application api's we are using using Keycloak for the authentication. Do the iMIS apis use a url to get the JWK or possibly have the key somewhere on the server so that that key can be replaced or the location overridden via a property? If not does it allow a grant type of client_credentials and do you have any examples? Thanks

Get shopping cart of currently logged-in user or on-behalf of user

Hi all, How can I pick up the current cart of the logged in user? I have a button on one of the content pages which should ideally pick up the cart ID of the current cart. I have tried using the parameter userid which returns all carts of the specific user but a bit stuck in how to pick-up the current one. I can see that the cart created by the user has additional UpdateInformation in which CreatedBy and UpdatedBy are set to the user but would not know how to filter on this one via the endpoint request. ?userid=18052&CreatedBy=18052&UpdatedBy=18502 does not yield any results although there is one. It also does not feel entirely right because there may be another cart instance with both informations set. Is there a way to get the current shopping cart id of the logged-in or on-behalf-of user with the cart endpoint? var data = JSON.stringify(false); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open("GET", "https://imistour832.imiscloud.com/api/cart?userid=18052"); xhr.send(data); Thank you very much for any pointers in the right direction! Alex

Object reference not set to an instance of an object.

I submitted a cart and received this nondescript error message back from SOA. Object reference not set to an instance of an object. Does REST/SOA produce detailed logs that we can inspect upon such an error? I tried editing the Scheduler web.config, to log at an INFO threshold as follows: ``` <appender name="FileAppender" type="log4net.Appender.FileAppender"> <file value="..\Asi.Scheduler_IMISDemo.log" /> <appendToFile value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%d{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff} %p %t %c - %m%n" /> </layout> <filter type="log4net.Filter.LevelRangeFilter"> <levelMin value="INFO" /> <acceptOnMatch value="true" /> </filter> </appender> ``` But I didn't see any error messages when I experienced the Object reference error in the API. Is there anyway we can drill down when we receive general errors such as this from the API?

Cart payment receipt

I need to process a credit card transaction and use the GatewayRef as the receipt reference. How do I obtain the GatewayRef from a successful CC Payment? Alternatively, I could process the CC prior to processing the cart and use a MANUAL gateway to write the transaction. However, if I do this, how do I write to the CC_Authorize and Gateway_Ref fields? I have tried writing to remittance.PaymentToken but this results in a null object reference error. Writing to remittance.CreditCardInformation.AuthorizationCode does nothing. Any ideas are appreciated.
ANSWERED

How can I submit a cart through REST

Hi all, I am trying to submit a payment through the https://{{URL}}/api/cart/ endpoint. I have tried all various permutations of the comborder JSON and have had no luck. I did try PUT which updates the cart item and POST which creates a new cart but none of those push through a CASH payment. Below is the part I inject into the CartData. Is there a special Http Verb I should be using? Is there anything missing in the payments object? I am really stuck. Thanks a lot for you all of your help! Alex "Payments": { "$type": "Asi.Soa.Commerce.DataContracts.RemittanceDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Commerce.DataContracts.RemittanceData, Asi.Contracts", "Amount": { "$type": "Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts", "Amount": 2.12, "Currency": { "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts", "CurrencyCode": "USD", "DecimalPositions": 2, "ExtensionData": { "$type": "System.Runtime.Serialization.ExtensionDataObject, System.Runtime.Serialization" } }, "IsAmountDefined": true }, "PaymentMethod": { "$type": "Asi.Soa.Commerce.DataContracts.PaymentMethodData, Asi.Contracts", "Message": "CASH", "Name": "Main Checking Account", "PaymentMethodId": "CASH", "PaymentType": "CASH" }, "PayorParty": { "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts", "PartyId": "18052" } } ] }

Maternity Leave - non billing period

We have a Maternity leave category that is not charged during the time they are on leave. The paid thru date is put through to the day/month/year, they are due back and the EFT module date is set to the next month. What is the best way to have these people included in the billing cycle?
ANSWERED

Enabling CORS on Asi.Scheduler API with IIS 8

I am trying to enable CORS on the api so I can make cross-origin calls. The API does not understand the OPTIONS method that is being sent by the browser when I make an XHR request using axios. This results in a 405 for the options preflight request and a CORS failure. What is the quickest way to enable this? I am unsure how to enable the necessary CORS features on a WCF service without access to the entry point.