| GET | /api/History360 |
|---|
"use strict";
export class BaseRequest {
/** @param {{ApiKey?:string,OAuthToken?:string,DeviceId?:string,AppId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description This is your AIM API Key provided by Tri-Tech */
ApiKey;
/**
* @type {string}
* @description The OAuthToken token return by AeServices30 */
OAuthToken;
/**
* @type {string}
* @description The Device ID of the Mobile Device. Not used for non-mobile devices. */
DeviceId;
/**
* @type {string}
* @description An identifier for your integration */
AppId;
}
export class BaseSecureRequest extends BaseRequest {
/** @param {{Token?:string,ApiKey?:string,OAuthToken?:string,DeviceId?:string,AppId?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description The Login Token return by the Security API. Required for secured calls. */
Token;
}
export class BaseResponseResult {
/** @param {{StatusCode?:string,Login?:string,ErrorCode?:string,ErrorDisplayText?:string,ErrorMessage?:string,DomainName?:string,IpAddress?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
StatusCode;
/** @type {string} */
Login;
/** @type {string} */
ErrorCode;
/** @type {string} */
ErrorDisplayText;
/** @type {string} */
ErrorMessage;
/** @type {string} */
DomainName;
/** @type {string} */
IpAddress;
}
export class BaseResponse {
/** @param {{Status?:BaseResponseResult}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BaseResponseResult} */
Status;
}
export class Item360 {
/** @param {{PslrId?:number,Quantity?:number,Price?:number,TotalDiscountAmount?:number,SerialNumber?:string,Condition?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
PslrId;
/** @type {number} */
Quantity;
/** @type {number} */
Price;
/** @type {number} */
TotalDiscountAmount;
/** @type {string} */
SerialNumber;
/** @type {string} */
Condition;
}
export class Invoice360 {
/** @param {{Id?:string,DueDate?:string,Total?:number,Status?:string,AmountPaid?:number,PaymentType?:string,LateFeeAmount?:number,PurchaseDate?:string,StoreLocationId?:number,Discount?:number,Tax?:number,Shipping?:number,Items?:Item360[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {?string} */
DueDate;
/** @type {number} */
Total;
/** @type {string} */
Status;
/** @type {number} */
AmountPaid;
/** @type {string} */
PaymentType;
/** @type {number} */
LateFeeAmount;
/** @type {string} */
PurchaseDate;
/** @type {?number} */
StoreLocationId;
/** @type {number} */
Discount;
/** @type {number} */
Tax;
/** @type {number} */
Shipping;
/** @type {Item360[]} */
Items;
}
export class Order360 {
/** @param {{Id?:number,Date?:string,Discount?:number,PaymentType?:string,SubTotal?:number,Tax?:number,ShippingAmount?:number,Total?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
Date;
/** @type {number} */
Discount;
/** @type {string} */
PaymentType;
/** @type {number} */
SubTotal;
/** @type {number} */
Tax;
/** @type {number} */
ShippingAmount;
/** @type {number} */
Total;
}
export class Job360 {
/** @param {{ItemId?:string,ItemType?:string,Title?:string,Quantity?:number,Price?:number,TotalDiscountAmount?:number,SerialNumber?:string,Condition?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ItemId;
/** @type {string} */
ItemType;
/** @type {string} */
Title;
/** @type {number} */
Quantity;
/** @type {number} */
Price;
/** @type {number} */
TotalDiscountAmount;
/** @type {string} */
SerialNumber;
/** @type {string} */
Condition;
}
export class WorkOrder360 {
/** @param {{Id?:string,Status?:string,Deposit?:number,StoreLocationId?:number,CreationDate?:string,CompletedDate?:string,Price?:number,LocationName?:string,Jobs?:Job360[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Status;
/** @type {number} */
Deposit;
/** @type {?number} */
StoreLocationId;
/** @type {string} */
CreationDate;
/** @type {?string} */
CompletedDate;
/** @type {number} */
Price;
/** @type {string} */
LocationName;
/** @type {Job360[]} */
Jobs;
}
export class Contract360 {
/** @param {{Id?:string,PaymentDate?:string,StoreLocationId?:number,AmountDue?:number,LateFee?:number,ContractStatus?:string,Amount?:number,LocationName?:string,ContractItems?:Item360[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
PaymentDate;
/** @type {?number} */
StoreLocationId;
/** @type {number} */
AmountDue;
/** @type {number} */
LateFee;
/** @type {string} */
ContractStatus;
/** @type {number} */
Amount;
/** @type {string} */
LocationName;
/** @type {Item360[]} */
ContractItems;
}
export class History360Response extends BaseResponse {
/** @param {{Invoices?:Invoice360[],Orders?:Order360[],WorkOrders?:WorkOrder360[],Contracts?:Contract360[],Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {Invoice360[]} */
Invoices;
/** @type {Order360[]} */
Orders;
/** @type {WorkOrder360[]} */
WorkOrders;
/** @type {Contract360[]} */
Contracts;
}
export class History360Request extends BaseSecureRequest {
/** @param {{CustomerAccount?:number,IncludeInvoices?:boolean,IncludeOrders?:boolean,IncludeWorkOrders?:boolean,IncludeContracts?:boolean,IncludeClosed?:boolean,ClosedStartDate?:string,Token?:string,ApiKey?:string,OAuthToken?:string,DeviceId?:string,AppId?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
CustomerAccount;
/** @type {boolean} */
IncludeInvoices;
/** @type {boolean} */
IncludeOrders;
/** @type {boolean} */
IncludeWorkOrders;
/** @type {boolean} */
IncludeContracts;
/** @type {boolean} */
IncludeClosed;
/** @type {?string} */
ClosedStartDate;
}
JavaScript History360Request 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/History360 HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<History360Response 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>
<Contracts>
<Contract360>
<Amount>0</Amount>
<AmountDue>0</AmountDue>
<ContractItems>
<Item360>
<Condition>String</Condition>
<Price>0</Price>
<PslrId>0</PslrId>
<Quantity>0</Quantity>
<SerialNumber>String</SerialNumber>
<TotalDiscountAmount>0</TotalDiscountAmount>
</Item360>
</ContractItems>
<ContractStatus>String</ContractStatus>
<Id>String</Id>
<LateFee>0</LateFee>
<LocationName>String</LocationName>
<PaymentDate>0001-01-01T00:00:00</PaymentDate>
<StoreLocationId>0</StoreLocationId>
</Contract360>
</Contracts>
<Invoices>
<Invoice360>
<AmountPaid>0</AmountPaid>
<Discount>0</Discount>
<DueDate>0001-01-01T00:00:00</DueDate>
<Id>String</Id>
<Items>
<Item360>
<Condition>String</Condition>
<Price>0</Price>
<PslrId>0</PslrId>
<Quantity>0</Quantity>
<SerialNumber>String</SerialNumber>
<TotalDiscountAmount>0</TotalDiscountAmount>
</Item360>
</Items>
<LateFeeAmount>0</LateFeeAmount>
<PaymentType>String</PaymentType>
<PurchaseDate>0001-01-01T00:00:00</PurchaseDate>
<Shipping>0</Shipping>
<Status>String</Status>
<StoreLocationId>0</StoreLocationId>
<Tax>0</Tax>
<Total>0</Total>
</Invoice360>
</Invoices>
<Orders>
<Order360>
<Date>0001-01-01T00:00:00</Date>
<Discount>0</Discount>
<Id>0</Id>
<PaymentType>String</PaymentType>
<ShippingAmount>0</ShippingAmount>
<SubTotal>0</SubTotal>
<Tax>0</Tax>
<Total>0</Total>
</Order360>
</Orders>
<WorkOrders>
<WorkOrder360>
<CompletedDate>0001-01-01T00:00:00</CompletedDate>
<CreationDate>0001-01-01T00:00:00</CreationDate>
<Deposit>0</Deposit>
<Id>String</Id>
<Jobs>
<Job360>
<Condition>String</Condition>
<ItemId>String</ItemId>
<ItemType>String</ItemType>
<Price>0</Price>
<Quantity>0</Quantity>
<SerialNumber>String</SerialNumber>
<Title>String</Title>
<TotalDiscountAmount>0</TotalDiscountAmount>
</Job360>
</Jobs>
<LocationName>String</LocationName>
<Price>0</Price>
<Status>String</Status>
<StoreLocationId>0</StoreLocationId>
</WorkOrder360>
</WorkOrders>
</History360Response>