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

Discussions

Ask a Question
ANSWERED

Creating Pricing Groups

Making a POST call to /api/PriceSheetGroup/ returns back a required PriceSheetId If I attempt to POST to /api/PriceSheet/ I get back a 500 error. Below is a sample body request. ```json { "$type": "Asi.Soa.Commerce.DataContracts.PriceSheetData, Asi.Contracts", "PriceSheetGroups": { "$type": "Asi.Soa.Commerce.DataContracts.PriceSheetGroupDataCollection, Asi.Contracts", "$values": [ { "$type": "Asi.Soa.Commerce.DataContracts.PriceSheetGroupData, Asi.Contracts", "Group": { "$type": "Asi.Soa.Membership.DataContracts.GroupSummaryData, Asi.Contracts", "GroupId": "CHAPT/EAST" } } ] }, "Description": "Product grouping price", "Name": "Test Pricing 3", "PriceCustomerType": "3" } ``` Works fine if I do a PUT with PriceSheetId but can't seem to create a new price sheet. Any special trick to this? Tested on 20.3.180.315
ANSWERED

JSON payload needed to insert data into EventProductExtension

Hello everyone, I'm feeling my way around here- looking to insert data into the EventProductExtension table with the API so I'm looking for any assistance with the JSON payload / syntax that can be provided. Similarly, I have a custom table (vBoSpecialActivities) I need to insert data into - any insight into that syntax - or maybe it's similar - would be apprecaited! Thanks so much for pointing me in the right direction here! \-Robert
ANSWERED

Generate invoices parameters with iMIS REST API

Looking at the [Executes a LegacyOrder operation](https://developer.imis.com/reference/executelegacyorder) endpoint we can use the [Invoice](https://developer.imis.com/reference/executelegacyorder#invoice) operation. What are the different parameters available there? Looking at iMIS RiSE website we found a couple of options: [block:image] { "images": [ { "image": [ "https://files.readme.io/018f98b-image.png", null, "Generate invoices" ], "align": "left" } ] } [/block] For example: - Send options: Email, Print, or Do not send - Print the template attachment only How do we set those options with the iMIS REST API? Kinds regards, Molivouth.
ANSWERED

POST to panel: Unable to cast object of type

From the documentation: <https://developer.imis.com/reference/postpanelsourcedata-1> I am trying to post to my panel, I took the "$type" from either the documentation or from the GET request returned from my panel. I have tried a few different variations and still get a similar error: System.InvalidCastException: Unable to cast object of type 'Asi.Soa.Core.DataContracts.GenericExecuteRequest' to type 'Asi.Soa.Core.DataContracts.GenericEntityData'. at Asi.Services.Core.EntityServiceToCommonServiceAdapter`1.Add(Object dataContract) at Asi.Services.Core.EntityServiceToCommonServiceAdapter`1.AddAsync(Object dataContract) at Castle.Proxies.Invocations.ICommonServiceAsync_AddAsync.InvokeMethodOnTarget() at Castle.DynamicProxy.AbstractInvocation.Proceed() at Asi.Shared.Aspects.AsyncInterceptor.\<>c**DisplayClass2_0\`1.<Intercept2Async>b**0() at Asi.Shared.Aspects.CacheAspect.<InterceptAsync>d**5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Asi.Services.Core.Interceptors.CommonSecurityAspect.<InterceptAsync>d**1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Asi.Shared.Aspects.PerformanceAspect.<InterceptAsync>d**3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Asi.ImisService.Controllers.CommonServiceController.<Post>d**14.MoveNext() <br /> <br /> <br /> Next my request: <br /> const settings = { async: true, crossDomain: true, url: 'https\://.ca/api/Comments', method: 'POST', headers: { accept: 'application/json', 'content-type': 'application/json', "RequestVerificationToken": document.getElementById("\_\_RequestVerificationToken").value }, processData: false, data: JSON.stringify({ "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts", "Properties": { "$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts", ``` "$values": [{ "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "Name": "ID", "Value": "79887" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "DateTime", "Value": "2012-06-12T16:16:29.013" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "Body", "Value": "The addendum to the article is that the Supreme Court of Canada has granted leave to appeal the Federal Court of Appeal’s." }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "Link", "Value": "www.google.ca/en/newsletters/canadian_tax_focus/2012/2/120508" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "SubmittedID", "Value": "79887" }, { "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts", "Name": "User", "Value": "Adriana Escalante" }] } ``` })} jQuery.ajax(settings).done(function (response) { console.log(response); }); <br /> Thank you in advance for your help. Regards, Adriana E
ANSWERED

Cancelling orders with iMIS REST API

Is it possible to [cancel order](https://help.imis.com/enterprise/features/commerce/orders/cancelling_orders.htm) using iMIS REST API? Would that operation be missing from [LegacyOrder](https://developer.imis.com/reference/executelegacyorder) endpoint? Please advise. Thank you.
ANSWERED

Arbitrary Cart Charges

Hello, We are in need of applying a surcharge to the cart dependant on a few things which we will calculate. There seems to be no path within iMIS to allow us to charge a user a dynamic, not predefined cost. I have found a few old conversations asking this: <https://developer.imis.com/v20.3.44/discuss/604fa3fa0b7ce000183a3c13> According to this discussion, the solution of updating the comboorder and adding "IsUnitPriceOverridden": true, to the line item works, but I don't think it actually does. If you try to update a members cart using this method, and try to checkout, it results in the error "Insufficient permissions to override item price" This makes sense, we wouldn't want members being able to manually set prices to something _lower_ in their cart and checkout. I am just confused why this is being offered as the solution, the only way to have the cart accept an order like this is to be logged in as a staff member, which defeats the purpose as they could just override the price manually anyway. I feel like a solution could be to allow users to checkout with overridden prices **only if** the manual price is higher than the items default price (fixes the surcharge use case perfectly) I am wondering what a solution is to adding dynamic charges to a users cart? Thankyou,
ANSWERED

Update Order Confirmation Date Time via REST API

Is it possible to set the `Orders.CONFIRMATION_DATE_TIME` property using iMIS REST API?

2 Questions About the iMIS APIs

Dear colleagues, I hope this email finds you well! I am reaching out to see if anyone has insight into the following: Instead of updating, deleting, etc. from panel sources using the APIs (which is fairly straightforward), does anyone have any insight into performing an update, delete, and edit using an IQA ? If so, would you be able to provide C# or PHP examples demonstrating this process? Alternately, worst case scenario, is there a comprehensive list of panel sources by name or a better way to get a handle on that data structure? Last, but not least, if there are any webinars or resources that you recommend I explore, I would greatly appreciate your suggestions! My goal is to avoid reinventing the wheel and to leverage existing knowledge and best practices. Thank you in advance for any help or guidance you can provide. Your assistance is highly valued and appreciated.

PUT at https://{{URL}}/api/Event/:EventId

Good afternoon, While PUT is not documented for events, I tested it in our development environment and it seemed to work as I saw functions updated with the data I passed; however, when I looked more closely at what was updated, the updates seemed random. In an event with around 100 event functions, a good number of them were properly updated while the others were unchanged. Any idea as to why this may be happening? I first got the event data, then updated the JSON, keeping all of the event functions in the Functions object. The result was what was described previously. I thought maybe the JSON is too long; so, I removed all the functions but one and pretty much everything else in the event object except for EventCode and type and resubmitted. The one function in the functions object did not update. If this worked properly, it would save my staff significant time over having to go into each event function through the interface and wait on iMIS to save and reload. In a complex event, that is very time consuming. Thanks, Korey
ANSWERED

Overriding taxes, shipping and handling for commerce orders in 2017

Is it possible to override taxes, shipping and handling fees using iMIS REST API in 2017 version? - [Overriding taxes for commerce orders](https://developer.imis.com/docs/overriding-taxes-on-orders) - [Overriding shipping and handling for commerce orders](https://developer.imis.com/docs/overriding-shipping-and-handling-for-commerce-orders)