| GET | /api/CategoryListing |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
/**
* CategoryListingRequires active-e Inventory Service.
*/
@DataContract
open class CategoryListingRequest : BaseSecureRequest()
{
/**
* If true, Inactive Categories and Subcategories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Inactive Categories and Subcategories will be returned. Defaults to false.", Name="IncludeInactive", ParameterType="query")
var IncludeInactive:Boolean? = null
/**
* Category Number lookup. If sent, only this category and it's subs will be returned. Further parameters will be ignored.
*/
@DataMember
@ApiMember(DataType="integer", Description="Category Number lookup. If sent, only this category and it's subs will be returned. Further parameters will be ignored.", Format="int64", Name="CategoryNumber", ParameterType="query")
var CategoryNumber:Int? = null
/**
* If true, Inventory Categories will be returned. Defaults to true.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Inventory Categories will be returned. Defaults to true.", Name="IncludeInventory", ParameterType="query")
var IncludeInventory:Boolean? = null
/**
* If true, Non-Inventory Categories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Non-Inventory Categories will be returned. Defaults to false.", Name="IncludeNonInventory", ParameterType="query")
var IncludeNonInventory:Boolean? = null
/**
* If true, Return Payment Categories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Return Payment Categories will be returned. Defaults to false.", Name="IncludeReturn", ParameterType="query")
var IncludeReturn:Boolean? = null
/**
* If true, Payment Categories will be returned. Defaults to false.
*/
@DataMember
@ApiMember(DataType="boolean", Description="If true, Payment Categories will be returned. Defaults to false.", Name="IncludePayment", ParameterType="query")
var IncludePayment:Boolean? = null
}
@DataContract
open class BaseSecureRequest : BaseRequest()
{
/**
* The Login Token return by the Security API. Required for secured calls.
*/
@DataMember
@ApiMember(DataType="string", Description="The Login Token return by the Security API. Required for secured calls.", Name="Token", ParameterType="Header")
var Token:String? = null
}
@DataContract
open class BaseRequest
{
/**
* This is your AIM API Key provided by Tri-Tech
*/
@DataMember
@ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="Header")
var ApiKey:String? = null
/**
* The OAuthToken token return by AeServices30
*/
@DataMember
@ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")
var OAuthToken:String? = null
/**
* The Device ID of the Mobile Device. Not used for non-mobile devices.
*/
@DataMember
@ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")
var DeviceId:String? = null
/**
* An identifier for your integration
*/
@DataMember
@ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")
var AppId:String? = null
}
@DataContract
open class CategoryListingResponse : BaseResponse()
{
@DataMember
var CategoryListing:ArrayList<CategoryInfo> = ArrayList<CategoryInfo>()
}
@DataContract
open class BaseResponse
{
/**
*
*/
@DataMember
@ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
var Status:BaseResponseResult? = null
}
@DataContract
open class BaseResponseResult
{
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
var StatusCode:String? = null
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
var Login:String? = null
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
var ErrorCode:String? = null
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
var ErrorDisplayText:String? = null
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
var ErrorMessage:String? = null
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
var DomainName:String? = null
/**
*
*/
@DataMember
@ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
var IpAddress:String? = null
}
@DataContract
open class CategoryInfo
{
@DataMember
var CategoryNumber:Int? = null
@DataMember
var CategoryType:String? = null
@DataMember
var Description:String? = null
@DataMember
var Active:Boolean? = null
@DataMember
var SubCategoryListing:ArrayList<SubCategoryInfo> = ArrayList<SubCategoryInfo>()
@DataMember
var PaymentCategoryType:String? = null
@DataMember
var AllowedOnMobile:Boolean? = null
}
@DataContract
open class SubCategoryInfo
{
@DataMember
var SubNumber:Int? = null
@DataMember
var Description:String? = null
@DataMember
var Active:Boolean? = null
@DataMember
var Price:BigDecimal? = null
@DataMember
var SkuAttributes:ArrayList<SubCategoryAttributeInfo> = ArrayList<SubCategoryAttributeInfo>()
@DataMember
var SerialAttributes:ArrayList<SubCategoryAttributeInfo> = ArrayList<SubCategoryAttributeInfo>()
}
@DataContract
open class SubCategoryAttributeInfo
{
@DataMember
var AttributeName:String? = null
@DataMember
var Priority:Int? = null
}
Kotlin CategoryListingRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/CategoryListing HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CategoryListingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
<Status>
<DomainName>String</DomainName>
<ErrorCode>String</ErrorCode>
<ErrorDisplayText>String</ErrorDisplayText>
<ErrorMessage>String</ErrorMessage>
<IpAddress>String</IpAddress>
<Login>String</Login>
<StatusCode>String</StatusCode>
</Status>
<CategoryListing>
<CategoryInfo>
<Active>false</Active>
<AllowedOnMobile>false</AllowedOnMobile>
<CategoryNumber>0</CategoryNumber>
<CategoryType>String</CategoryType>
<Description>String</Description>
<PaymentCategoryType>String</PaymentCategoryType>
<SubCategoryListing>
<SubCategoryInfo>
<Active>false</Active>
<Description>String</Description>
<Price>0</Price>
<SerialAttributes>
<SubCategoryAttributeInfo>
<AttributeName>String</AttributeName>
<Priority>0</Priority>
</SubCategoryAttributeInfo>
</SerialAttributes>
<SkuAttributes>
<SubCategoryAttributeInfo>
<AttributeName>String</AttributeName>
<Priority>0</Priority>
</SubCategoryAttributeInfo>
</SkuAttributes>
<SubNumber>0</SubNumber>
</SubCategoryInfo>
</SubCategoryListing>
</CategoryInfo>
</CategoryListing>
</CategoryListingResponse>