Error with REST API call

Hi all,

We are trying to POST to Web/Session on our Rest API with these parameters: 

{
"IpAddress": "127.0.0.1",
"BusinessUnitId": 1
}

and we got this error: 

[
{
"Code": null,
"Description": "Invalid Source_no",
"Details": " at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)\r\n at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)\r\n at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)\r\n at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)\r\n at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)\r\n at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at Tessitura.Service.DataAccess.Repositories.Web.SessionRepository.CreateSession(String ipAddress, Int32 businessUnit, Int32 batchNo, Int32 modeOfSale, Int32 promotionCode, String organization, Boolean businessFacing)\r\n at Tessitura.Service.Impl.Web.SessionService.CreateSession(SessionRequestEntity request)\r\n at Tessitura.Service.Web.Controllers.Web.SessionController.<>c__DisplayClass4_0.<CreateSession>b__0()\r\n at Tessitura.Service.Web.Controllers.Base.BaseController.RunInTransaction[T](Func`1 func)\r\n at Tessitura.Service.Web.Controllers.Web.SessionController.CreateSession(SessionRequest request)\r\n at lambda_method(Closure , Object , Object[] )\r\n at .....
}
]




At first, I thought the source numbers in T_DEFAULTS are expired, but upon checking, they are still ok because we just did a LIVE to TEST copy down. If they are expired on LIVE, then we would get noticed immediately. 

Has any of you come across this error before? Please advise on how to get past it. Thank you!

Best,
Tom Nguyen 
  • Source needs to be visible to the user/usergroup you are using for the request.  If you are able, determine if control grouping on the Appeal may be preventing this source from being visible. Try logging into the client application using that usergroup, open an order window and see if the source is viewable from the source window.

    Alternately, from the API, you can do a GET from /Finance/Sources/## where ## is the id (source_no) using the same REST credentials.  it should be returned as a valid response and should show as active.