Discussions
can't get a bearer token :(
page not found
Posted by Larry Allen over 5 years ago
Hi, Is it possible to Insert activity using REST API? Thanks
Posted by Mythili Parthasarathy over 5 years ago
REST API The requested resource does not support http method 'OPTIONS'
I am trying to make a REST API call using AJAX to IMIS using bearer token (which is retrieved using C#) from another site. In other words I am making REST API call to IMIS scheduler endpoint from a different domain.
I know I need to handle the CORS issue so I put in the statements like
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="*" />
....
and stuff like that.
But I am still getting 405 ERROR from the response saying "The requested resource does not support http method 'OPTIONS'".
Does anyone get the same issue and have that resolved successfully ?
Posted by Tim over 5 years ago
REST API and Currency Code
Our partners in Asia-Pac are using SOA to change the currency code when passing to a gateway so that iMIS Cart can process NZD with one gateway and AUD with another gateway. However I am being advised that they cannot do this in a cloud-friendly manner with REST APIs as even if they can change the gateway being used, the currency will remain fixed (mostly as AUD) even if they are passing to a gateway connection for the purpose of NZD transactions.
Is there a RESTful way around this? or is there an option in REST to change the currency?
I recognise iMIS20-300 is not multi-currency by nature, but Australasian clients have been processing two currencies iMIS for decades and we need to do this going forward.
Advice appreciated.
Posted by Colin Bryant over 5 years ago
Certification Completion Dates
We have a function to update certification module completion dates/earned units through SQL. Is there any way to update the ActionManifest when we do this?
Posted by Joshua Deville over 5 years ago
Pulling Personal Schedules from IMIS
I have a potential client that wants me to pull some information from IMIS into our Event App. This includes registrant information and associated fields (name, email, etc) as well as personal sessions they will attend which have been selected during registration.
The registrant information looks clear but I can't tell which API call to use in order to pull the personal schedules since you never use the word sessions, agenda, or schedules. Would you be able to clarify? I'd need to know the call to make and the field.
Posted by Ishwant Sodhi over 5 years ago
ASI - ReST API call Enhancement
Good morning,
We are attempting to update a record in a multi-instance panel created through staff site using an Ajax request. In ASI documentation it states to use a URL with both Primary Keys like this: https://testapi.com/api/TABLE/~123|2. When submitting the request through PostMan for testing it works fine. When the ajax call gets submitted the URL gets encoded and ends up looking like this: https://testapi.com/api/TABLE/~123%7C2. The pipe gets encoded to the ASCII value and so far we have not found a way to get around the encoding as it is automatic. The problem is that ASI’s ReST API does not seem to account for Encoded URL’s so it just throws an error.
Is there any solution already in place to accomplish what we are talking about?
Thanks,
Posted by Josh Deville over 5 years ago
REST API - Creating a discount in a Cart
I´ve added an ipart in 'shopping cart page' to opt between 'Single Payment' or 'Automatically pay future renewals' and
would like to give a discount when user selects one of those but before submitting the cart.
Questions:
1) How can I trigger an event when user picks some option to give a discount before submitting the cart?
2) Where (table) are these 2 option stored?. Are they properties of the cart 'json' structure?
Posted by Roberto over 5 years ago
Registering for an event via SOAP API
Hello,
I am attempting to register for an event and functions of the event via the SOAP API. I am able to get a cart line to show however the cart line for the event has red text saying:
"No registration option has been selected."
Here is my code:
CartData cart = null;
bool newCartCreated = false;
string EventId = "AHTEST";
string EventFunctionId = "A_MAIN";
string EventName = "Event Test";
RegistrationTypeData RTD = (RegistrationTypeData)3;
EntityManager entityManager = new EntityManager(uri, userName, password, EndpointType.Soap11);
CartManager cartManager = new CartManager(entityManager, partyId);
OptionEventFunctionDataCollection OEFDC = new OptionEventFunctionDataCollection();
OptionEventFunctionData OEFD = new OptionEventFunctionData
{
RegistrationType = RTD,
IsEventRegistrationOption = true
};
OEFDC.Add(OEFD);
EventData EventD = new EventData
{
EventId = EventId,
Name = EventName,
RegistrationType = RTD,
RegistrationOptions = OEFDC
};
EventSummaryData EventSumData = new EventSummaryData
{
EventId = EventId,
Name = EventName,
RegistrationType = RTD,
};
EventManager eventManager = new EventManager(entityManager, EventD);
//See if a cart is existing
QueryData query = new QueryData("Cart")
{
Criteria = new CriteriaDataCollection
{
CriteriaData.Equal("UserId", partyId)
}
};
FindResultsData queryResults = entityManager.Find(query);
if (queryResults.Result.Count > 0)
{
cart = (CartData)queryResults.Result[0];
linecount = cart.ComboOrder.Order.Lines.Count;
newCartCreated = false;
}
else
{
cartManager.DeleteCart();
cart = new CartData
{
UserId = partyId,
UpdateInformation = new EntityUpdateInformationData
{
CreatedBy = createdbyId,
CreatedOn = DateTime.UtcNow,
UpdatedBy = createdbyId,
UpdatedOn = DateTime.UtcNow
}
};
newCartCreated = true;
}
if (partyId != "")
{
var findResultsData =
entityManager.Find(
new QueryData(PartyCommercePreferencesData.EntityTypeName)
.AddCriteria(new CriteriaData("PartyId",
OperationData.Equal, partyId))).Result;
PartyCommercePreferencesData partyCommercePreferencesData = findResultsData[0] as PartyCommercePreferencesData;
var currency = partyCommercePreferencesData.DefaultCurrency;
var comboOrder = new ComboOrderData { Currency = currency };
OrderData order = comboOrder.Order = new OrderData { Currency = currency };
var partyCommPreferences = entityManager.FindByIdentity<PartyCommercePreferencesData>(partyId);
var customer = new CustomerPartyData { PartyId = partyId };
order.SoldToCustomerParty = customer;
comboOrder = cart.ComboOrder;
//add new product
order.Lines = new OrderLineDataCollection();
foreach (string item in productArray)
{
var line = new OrderLineData
{
Item = new ItemData { ItemId = item },
LineNumber = count,
QuantityOrdered = new QuantityData(1),
OrderLineId = linecount.ToString()
};
count++;
linecount++;
cart.ComboOrder.Order.Lines.Insert(index, line);
index++;
}
var line2 = new EventOrderLineData
{
Item = new EventItemData { ItemId = EventD.ToString() },
LineNumber = count,
QuantityOrdered = new QuantityData(1),
OrderLineId = linecount.ToString(),
Event = EventSumData
};
count++;
linecount++;
cart.ComboOrder.Order.Lines.Insert(index, line2);
index++;
index = 0;
eventManager.Register(partyId);
eventManager.RegistrationEventSettings(partyId);
eventManager.GetRegistrationData(partyId);
EventRegistrationData em = eventManager.GetRegistrationData(partyId);
ValidateResultsData vrdevent = eventManager.ValidateEventRegistration(em);
/*order.Delivery = new DeliveryDataCollection();
order.Delivery.Add(new DeliveryData
{
DeliveryMethod = new DeliveryMethodData { DeliveryMethodId = "UPS_GROUND" },
CustomerParty = customer,
//Address = new FullAddressData { Address = new AddressData { AddressLines = new AddressLineDataCollection { addressLines } } }
});*/
// DeliveryDataCollection deliverydata = order.Delivery;
//Validate will calculate pricing for us
var comboOrderValidation = entityManager.Validate(comboOrder);
comboOrder = comboOrderValidation.Entity;
cart.ComboOrder = comboOrder;
ValidateResultsData results = newCartCreated ? entityManager.Add(cart) : entityManager.Update(cart);
Response.Write(cart.CartId);
Response.Write(cart.ComboOrder.Order.Lines.Count.ToString());
}
else
{
Response.Write("Invalid PartyId");
}
}
}
}
So in summary I am attempting to register a user for an event and have filed EventData with EventId, Name, RegistrationType, and RegistrationOption
But am still getting this error about registration Option so if someone could explain what other properties are required that would be a big help.
Thank you.
Posted by Austin Harmon over 5 years ago
Resetting passwords
Are there any other ways to reset passwords in iMIS besides clicking 'Forgot password' and getting a password reset email?
I ask since we are developing in one of our environments however its not set up for SMTP, so I was curious if there is any developer tool or way that we could reset the password without setting up SMTP.
Thanks.
Posted by Julie over 5 years ago