| GET | /api/ShippingAddressLookup |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using AIM.WebService;
namespace AIM.WebService
{
[DataContract]
public partial class BaseRequest
{
///<summary>
///This is your AIM API Key provided by Tri-Tech
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="Header")]
public virtual string ApiKey { get; set; }
///<summary>
///The OAuthToken token return by AeServices30
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")]
public virtual string OAuthToken { get; set; }
///<summary>
///The Device ID of the Mobile Device. Not used for non-mobile devices.
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="The Device ID of the Mobile Device. Not used for non-mobile devices.", Name="DeviceId", ParameterType="Header")]
public virtual string DeviceId { get; set; }
///<summary>
///An identifier for your integration
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")]
public virtual string AppId { get; set; }
}
[DataContract]
public partial class BaseResponse
{
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")]
public virtual BaseResponseResult Status { get; set; }
[DataContract]
public partial class BaseResponseResult
{
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")]
public virtual string StatusCode { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")]
public virtual string Login { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")]
public virtual string ErrorCode { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")]
public virtual string ErrorDisplayText { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")]
public virtual string ErrorMessage { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")]
public virtual string DomainName { get; set; }
///<summary>
///
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")]
public virtual string IpAddress { get; set; }
}
}
[DataContract]
public partial class BaseSecureRequest
: BaseRequest
{
///<summary>
///The Login Token return by the Security API. Required for secured calls.
///</summary>
[DataMember]
[ApiMember(DataType="string", Description="The Login Token return by the Security API. Required for secured calls.", Name="Token", ParameterType="Header")]
public virtual string Token { get; set; }
}
///<summary>
///ShippingAddressLookupRequires active-e Customer Service.
///</summary>
[DataContract]
public partial class ShippingAddressLookupRequest
: BaseSecureRequest
{
///<summary>
///Pass in this parameter if you want to lookup all shipping addresses linked to a customer. Not required if using a customer login. Do not pass in this parameter if passing in the ShipId parameter.
///</summary>
[DataMember]
[ApiMember(Description="Pass in this parameter if you want to lookup all shipping addresses linked to a customer. Not required if using a customer login. Do not pass in this parameter if passing in the ShipId parameter.", Name="Acct", ParameterType="query")]
public virtual int? Acct { get; set; }
///<summary>
///Use this parameter to lookup a single Shipping Address with this ID. Do not pass in this parameter if passing in the Acct parameter.
///</summary>
[DataMember]
[ApiMember(Description="Use this parameter to lookup a single Shipping Address with this ID. Do not pass in this parameter if passing in the Acct parameter.", Name="ShipId", ParameterType="query")]
public virtual long? ShipId { get; set; }
}
[DataContract]
public partial class ShippingAddressLookupResponse
: BaseResponse
{
public ShippingAddressLookupResponse()
{
ShipTos = new List<ShipToInfo>{};
}
[DataMember]
public virtual List<ShipToInfo> ShipTos { get; set; }
}
[DataContract]
public partial class ShipToInfo
{
[DataMember]
public virtual long Id { get; set; }
[DataMember]
public virtual string Name { get; set; }
[DataMember]
public virtual string Attention { get; set; }
[DataMember]
public virtual string Address1 { get; set; }
[DataMember]
public virtual string Address2 { get; set; }
[DataMember]
public virtual string City { get; set; }
[DataMember]
public virtual string State { get; set; }
[DataMember]
public virtual string Zip { get; set; }
[DataMember]
public virtual string Country { get; set; }
[DataMember]
public virtual string Email { get; set; }
[DataMember]
public virtual string Phone { get; set; }
[DataMember]
public virtual string Phone2 { get; set; }
[DataMember]
public virtual string Notes { get; set; }
[DataMember]
public virtual bool Primary { get; set; }
[DataMember]
public virtual string TaxLoc { get; set; }
[DataMember]
public virtual bool Active { get; set; }
}
}
C# ShippingAddressLookupRequest 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/ShippingAddressLookup HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ShippingAddressLookupResponse 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>
<ShipTos>
<ShipToInfo>
<Active>false</Active>
<Address1>String</Address1>
<Address2>String</Address2>
<Attention>String</Attention>
<City>String</City>
<Country>String</Country>
<Email>String</Email>
<Id>0</Id>
<Name>String</Name>
<Notes>String</Notes>
<Phone>String</Phone>
<Phone2>String</Phone2>
<Primary>false</Primary>
<State>String</State>
<TaxLoc>String</TaxLoc>
<Zip>String</Zip>
</ShipToInfo>
</ShipTos>
</ShippingAddressLookupResponse>