POST api/Lookup/GetLookupValues

Get generic lookup values. Use this method for getting CodeSets, Sesam status values and so on. Do not use this method to get available cost lines or available requisition functions

Request Information

URI Parameters

None.

Body Parameters

Used for telling method which look to return, for further details see definition of LookupController.GetLookupArgumentModel

GetLookupArgumentModel
NameDescriptionTypeAdditional information
LookupType

Get or set lookup type

string

None.

LookupArgument

Get or sets additional information required by the lookup.

string

None.

TicketId

Gets or sets the ticket id

string

None.

Culture

Gets or sets culture, if not specified we will use culture set on user.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "LookupType": "sample string 1",
  "LookupArgument": "sample string 2",
  "TicketId": "sample string 3",
  "Culture": "sample string 4"
}

application/xml, text/xml

Sample:
<LookupController.GetLookupArgumentModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Rostov.Controllers">
  <Culture xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 4</Culture>
  <TicketId xmlns="http://schemas.datacontract.org/2004/07/Rostov.Models">sample string 3</TicketId>
  <LookupArgument>sample string 2</LookupArgument>
  <LookupType>sample string 1</LookupType>
</LookupController.GetLookupArgumentModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'GetLookupArgumentModel'.

Response Information

Resource Description

A a hierarchical representation of the lookup values

LookupModel
NameDescriptionTypeAdditional information
LookupId

Gets or sets the lookup id

string

None.

IsCacheable

Gets or sets whether it is "safe" to cache the lookup on the client. If this is set to true it means that this lookup is changed infrequently so you it is relative safe to to reuse a cached lookup

boolean

None.

LastModified

Gets or sets the date when this lookup was last modified on the server. Only set if LookupModel.IsCacheable is true

date

Json null value handling: Ignore

Items

Gets or sets the list of items defined in this lookup

Collection of LookupItemModel

Json null value handling: Ignore

CombinedPerformanceId

Gets or sets the performance id. If performance monitoring is not turned on this property will not be present or set to null

string

Json null value handling: Ignore

Response Formats

application/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: Self referencing loop detected with type 'Rostov.Models.LookupItemModel'. Path 'Items[0].Children'.

text/json

Sample:

An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'text/json'. Exception message: Self referencing loop detected with type 'Rostov.Models.LookupItemModel'. Path 'Items[0].Children'.

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[Rostov.Models.LookupItemModel, Rostov, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[Rostov.Models.LookupItemModel, Rostov, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.