GET api/Lookups
Gets the current lookup for a given type and optionally code.
To get the lookup for a type and code use: GET .../api/Lookups?type={type}&code={code}
To get all lookups for a given type use: GET .../api/Lookups?type={type}
To get all lookups use: GET .../api/Lookup/ or: GET .../api/LookupList/
Request Information
URI Parameters
(i.e.queryString parameters in the form ?param1={param1}¶m2={param2})
Name | Description | Type | Additional information |
---|---|---|---|
type |
The type of lookups to be returned |
string |
Required |
code |
A specific code of the given lookup type to be returned |
string |
Required |
Body Parameters
None.
Response Information
Resource Description
The returned resource is a list of LookupViews followed by a PageInfo object that provides pagination information that is also contained in the X-PAGINATION header for backwards compatibility.
LookupViewName | Description | Type | Additional information |
---|---|---|---|
Type |
The lookup type (e.g. State). |
string |
Required Matching: ([^'"])* Max length: 50 |
Code |
A unique code with a lookup type (e.g. NSW within the State type). |
string |
Required Max length: 200 |
Description |
A description of the type and code. |
string |
Required Max length: 200 |
Active |
Indicates if the lookup code can be used for new transactions. |
boolean |
Required |
Response Formats
application/json, text/json
{ "type": "sample string 1", "code": "sample string 2", "description": "sample string 3", "active": true }
application/xml, text/xml
<LookupView xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Type>sample string 1</Type> <Code>sample string 2</Code> <Description>sample string 3</Description> <Active>true</Active> </LookupView>