AIM Web Services

<back to all web services

CustomerOrdersRequest

CustomerOrders
Requires active-e 3rd Party E-Commerce or active-e Vortx E-Commerce.

The following routes are available for this service:
POST/api/CustomerOrders
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports AIM.WebService
Imports AIM.BL.Core.Misc

Namespace Global

    Namespace AIM.BL.Core.Misc

        <DataContract>
        Public Partial Class ThirdPartyOrder
            Public Sub New()
                LineItems = New List(Of ThirdPartyOrderItem)
            End Sub

            <DataMember>
            Public Overridable Property OrderNumber As String

            <DataMember>
            Public Overridable Property OrderDate As Date

            <DataMember>
            Public Overridable Property TransactionState As String

            <DataMember>
            Public Overridable Property PaymentMethod As String

            <DataMember>
            Public Overridable Property OrderNotes As String

            <DataMember>
            Public Overridable Property AuthorizationCode As String

            <DataMember>
            Public Overridable Property ShippingMethod As String

            <DataMember>
            Public Overridable Property Total As Decimal

            <DataMember>
            Public Overridable Property SubTotal As Decimal

            <DataMember>
            Public Overridable Property TaxTotal As Decimal

            <DataMember>
            Public Overridable Property ShippingTotal As Decimal

            <DataMember>
            Public Overridable Property CardType As String

            <DataMember>
            Public Overridable Property CardToken As String

            <DataMember>
            Public Overridable Property CardSpan As String

            <DataMember>
            Public Overridable Property CardExpirationMonth As String

            <DataMember>
            Public Overridable Property CardExpirationYear As String

            <DataMember>
            Public Overridable Property CustomerAcct As Integer

            <DataMember>
            Public Overridable Property Email As String

            <DataMember>
            Public Overridable Property PO As String

            <DataMember>
            Public Overridable Property EmployeeUsername As String

            <DataMember>
            Public Overridable Property AeOnApprovalOrderSubtotal As Decimal

            <DataMember>
            Public Overridable Property AeOnApprovalOrderShipping As Decimal

            <DataMember>
            Public Overridable Property ShippingAttn As String

            <DataMember>
            Public Overridable Property ShippingName As String

            <DataMember>
            Public Overridable Property ShippingFirstName As String

            <DataMember>
            Public Overridable Property ShippingLastName As String

            <DataMember>
            Public Overridable Property ShippingCompany As String

            <DataMember>
            Public Overridable Property ShippingAddr1 As String

            <DataMember>
            Public Overridable Property ShippingAddr2 As String

            <DataMember>
            Public Overridable Property ShippingCity As String

            <DataMember>
            Public Overridable Property ShippingSt As String

            <DataMember>
            Public Overridable Property ShippingZip As String

            <DataMember>
            Public Overridable Property ShippingCountry As String

            <DataMember>
            Public Overridable Property ShippingPhone As String

            <DataMember>
            Public Overridable Property BillingAttn As String

            <DataMember>
            Public Overridable Property BillingName As String

            <DataMember>
            Public Overridable Property BillingFirstName As String

            <DataMember>
            Public Overridable Property BillingLastName As String

            <DataMember>
            Public Overridable Property BillingCompany As String

            <DataMember>
            Public Overridable Property BillingAddr1 As String

            <DataMember>
            Public Overridable Property BillingAddr2 As String

            <DataMember>
            Public Overridable Property BillingCity As String

            <DataMember>
            Public Overridable Property BillingSt As String

            <DataMember>
            Public Overridable Property BillingZip As String

            <DataMember>
            Public Overridable Property BillingCountry As String

            <DataMember>
            Public Overridable Property BillingPhone As String

            <DataMember>
            Public Overridable Property OrderSource As String

            <DataMember>
            Public Overridable Property CardName As String

            <DataMember>
            Public Overridable Property PnRef As String

            <DataMember>
            Public Overridable Property LineItems As List(Of ThirdPartyOrderItem)

            <DataContract>
            Public Partial Class ThirdPartyOrderItem
                <DataMember>
                Public Overridable Property ProductName As String

                <DataMember>
                Public Overridable Property Sku As String

                <DataMember>
                Public Overridable Property SerialNumber As String

                <DataMember>
                Public Overridable Property WebNumber As String

                <DataMember>
                Public Overridable Property Location As String

                <DataMember>
                Public Overridable Property Qty As Decimal

                <DataMember>
                Public Overridable Property QtyPicked As Decimal

                <DataMember>
                Public Overridable Property UseQtyPicked As Boolean

                <DataMember>
                Public Overridable Property Price As Decimal

                <DataMember>
                Public Overridable Property OnApproval As Boolean

                <DataMember>
                Public Overridable Property IsECard As Boolean

                <DataMember>
                Public Overridable Property NiCat As Nullable(Of Integer)

                <DataMember>
                Public Overridable Property NiSub As Nullable(Of Integer)

                <DataMember>
                Public Overridable Property ExtPk As Nullable(Of Long)
            End Class
        End Class
    End Namespace

    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 Overridable Property ApiKey As String

            <DataMember>
            <ApiMember(DataType:="string", Name:="OAuthToken", ParameterType:="header")>
            Public Overridable Property OAuthToken As String
        End Class

        <DataContract>
        Public Partial Class BaseResponse
            '''<Summary>
            '''
            '''</Summary>
            <DataMember>
            <ApiMember(DataType:="BaseResponseResult", Description:="", Name:="Status", ParameterType:="body")>
            Public Overridable Property Status As BaseResponseResult

            <DataContract>
            Public Partial Class BaseResponseResult
                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", Name:="StatusCode", ParameterType:="body")>
                Public Overridable Property StatusCode As String

                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", Name:="Login", ParameterType:="body")>
                Public Overridable Property Login As String

                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", Name:="ErrorCode", ParameterType:="body")>
                Public Overridable Property ErrorCode As String

                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", Name:="ErrorDisplayText", ParameterType:="body")>
                Public Overridable Property ErrorDisplayText As String

                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", Name:="ErrorMessage", ParameterType:="body")>
                Public Overridable Property ErrorMessage As String

                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="DomainName", ParameterType:="body")>
                Public Overridable Property DomainName As String

                '''<Summary>
                '''
                '''</Summary>
                <DataMember>
                <ApiMember(DataType:="string", Description:="", ExcludeInSchema:=true, Name:="IPAddress", ParameterType:="body")>
                Public Overridable Property IpAddress As String
            End Class
        End Class

        <DataContract>
        Public Partial Class BaseSecureRequest
            Inherits BaseRequest
            '''<Summary>
            '''
            '''</Summary>
            <DataMember>
            <ApiMember(DataType:="string", Description:="", Name:="Token", ParameterType:="Header")>
            Public Overridable Property Token As String

            '''<Summary>
            '''
            '''</Summary>
            <DataMember>
            <ApiMember(DataType:="string", Description:="", Name:="DeviceId", ParameterType:="Header")>
            Public Overridable Property DeviceId As String

            '''<Summary>
            '''
            '''</Summary>
            <DataMember>
            <ApiMember(DataType:="string", Description:="", IsRequired:=true, Name:="AppId", ParameterType:="Header")>
            Public Overridable Property AppId As String
        End Class

        '''<Summary>
        '''CustomerOrdersRequires active-e 3rd Party E-Commerce or active-e Vortx E-Commerce.
        '''</Summary>
        <DataContract>
        Public Partial Class CustomerOrdersRequest
            Inherits BaseSecureRequest
            Public Sub New()
                Orders = New List(Of ThirdPartyOrder)
            End Sub

            <DataMember>
            Public Overridable Property Orders As List(Of ThirdPartyOrder)
        End Class

        <DataContract>
        Public Partial Class CustomerOrdersResponse
            Inherits BaseResponse
        End Class
    End Namespace
End Namespace

VB.NET CustomerOrdersRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/CustomerOrders HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CustomerOrdersRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <ApiKey>String</ApiKey>
  <OAuthToken>String</OAuthToken>
  <AppId>String</AppId>
  <DeviceId>String</DeviceId>
  <Token>String</Token>
  <Orders xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM.BL.Core.Misc">
    <d2p1:ThirdPartyOrder>
      <d2p1:AeOnApprovalOrderShipping>0</d2p1:AeOnApprovalOrderShipping>
      <d2p1:AeOnApprovalOrderSubtotal>0</d2p1:AeOnApprovalOrderSubtotal>
      <d2p1:AuthorizationCode>String</d2p1:AuthorizationCode>
      <d2p1:BillingAddr1>String</d2p1:BillingAddr1>
      <d2p1:BillingAddr2>String</d2p1:BillingAddr2>
      <d2p1:BillingAttn>String</d2p1:BillingAttn>
      <d2p1:BillingCity>String</d2p1:BillingCity>
      <d2p1:BillingCompany>String</d2p1:BillingCompany>
      <d2p1:BillingCountry>String</d2p1:BillingCountry>
      <d2p1:BillingFirstName>String</d2p1:BillingFirstName>
      <d2p1:BillingLastName>String</d2p1:BillingLastName>
      <d2p1:BillingName>String</d2p1:BillingName>
      <d2p1:BillingPhone>String</d2p1:BillingPhone>
      <d2p1:BillingSt>String</d2p1:BillingSt>
      <d2p1:BillingZip>String</d2p1:BillingZip>
      <d2p1:CardExpirationMonth>String</d2p1:CardExpirationMonth>
      <d2p1:CardExpirationYear>String</d2p1:CardExpirationYear>
      <d2p1:CardName>String</d2p1:CardName>
      <d2p1:CardSpan>String</d2p1:CardSpan>
      <d2p1:CardToken>String</d2p1:CardToken>
      <d2p1:CardType>String</d2p1:CardType>
      <d2p1:CustomerAcct>0</d2p1:CustomerAcct>
      <d2p1:Email>String</d2p1:Email>
      <d2p1:EmployeeUsername>String</d2p1:EmployeeUsername>
      <d2p1:LineItems>
        <d2p1:ThirdPartyOrder.ThirdPartyOrderItem>
          <d2p1:ExtPk>0</d2p1:ExtPk>
          <d2p1:IsECard>false</d2p1:IsECard>
          <d2p1:Location>String</d2p1:Location>
          <d2p1:NiCat>0</d2p1:NiCat>
          <d2p1:NiSub>0</d2p1:NiSub>
          <d2p1:OnApproval>false</d2p1:OnApproval>
          <d2p1:Price>0</d2p1:Price>
          <d2p1:ProductName>String</d2p1:ProductName>
          <d2p1:Qty>0</d2p1:Qty>
          <d2p1:QtyPicked>0</d2p1:QtyPicked>
          <d2p1:SerialNumber>String</d2p1:SerialNumber>
          <d2p1:Sku>String</d2p1:Sku>
          <d2p1:UseQtyPicked>false</d2p1:UseQtyPicked>
          <d2p1:WebNumber>String</d2p1:WebNumber>
        </d2p1:ThirdPartyOrder.ThirdPartyOrderItem>
      </d2p1:LineItems>
      <d2p1:OrderDate>0001-01-01T00:00:00</d2p1:OrderDate>
      <d2p1:OrderNotes>String</d2p1:OrderNotes>
      <d2p1:OrderNumber>String</d2p1:OrderNumber>
      <d2p1:OrderSource>String</d2p1:OrderSource>
      <d2p1:PO>String</d2p1:PO>
      <d2p1:PaymentMethod>String</d2p1:PaymentMethod>
      <d2p1:PnRef>String</d2p1:PnRef>
      <d2p1:ShippingAddr1>String</d2p1:ShippingAddr1>
      <d2p1:ShippingAddr2>String</d2p1:ShippingAddr2>
      <d2p1:ShippingAttn>String</d2p1:ShippingAttn>
      <d2p1:ShippingCity>String</d2p1:ShippingCity>
      <d2p1:ShippingCompany>String</d2p1:ShippingCompany>
      <d2p1:ShippingCountry>String</d2p1:ShippingCountry>
      <d2p1:ShippingFirstName>String</d2p1:ShippingFirstName>
      <d2p1:ShippingLastName>String</d2p1:ShippingLastName>
      <d2p1:ShippingMethod>String</d2p1:ShippingMethod>
      <d2p1:ShippingName>String</d2p1:ShippingName>
      <d2p1:ShippingPhone>String</d2p1:ShippingPhone>
      <d2p1:ShippingSt>String</d2p1:ShippingSt>
      <d2p1:ShippingTotal>0</d2p1:ShippingTotal>
      <d2p1:ShippingZip>String</d2p1:ShippingZip>
      <d2p1:SubTotal>0</d2p1:SubTotal>
      <d2p1:TaxTotal>0</d2p1:TaxTotal>
      <d2p1:Total>0</d2p1:Total>
      <d2p1:TransactionState>String</d2p1:TransactionState>
    </d2p1:ThirdPartyOrder>
  </Orders>
</CustomerOrdersRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CustomerOrdersResponse 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>
</CustomerOrdersResponse>