POST | /api/ContractFulfillment | ||
---|---|---|---|
POST | /api/C2BSetContractSerial |
// @DataContract
export class BaseRequest
{
/** @description 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")
public ApiKey: string;
/** @description The OAuthToken token return by AeServices30 */
// @DataMember
// @ApiMember(DataType="string", Description="The OAuthToken token return by AeServices30", IsRequired=true, Name="OAuthToken", ParameterType="Header")
public OAuthToken: string;
/** @description 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")
public DeviceId: string;
/** @description An identifier for your integration */
// @DataMember
// @ApiMember(DataType="string", Description="An identifier for your integration", IsRequired=true, Name="AppId", ParameterType="Header")
public AppId: string;
public constructor(init?: Partial<BaseRequest>) { (Object as any).assign(this, init); }
}
// @DataContract
export class BaseSecureRequest extends BaseRequest
{
/** @description 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")
public Token: string;
public constructor(init?: Partial<BaseSecureRequest>) { super(init); (Object as any).assign(this, init); }
}
// @DataContract
export class BaseResponseResult
{
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
public StatusCode: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
public Login: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
public ErrorCode: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
public ErrorDisplayText: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
public ErrorMessage: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
public DomainName: string;
/** @description */
// @DataMember
// @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
public IpAddress: string;
public constructor(init?: Partial<BaseResponseResult>) { (Object as any).assign(this, init); }
}
// @DataContract
export class BaseResponse
{
/** @description */
// @DataMember
// @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
public Status: BaseResponseResult;
public constructor(init?: Partial<BaseResponse>) { (Object as any).assign(this, init); }
}
// @DataContract
export class UpdateContractErrorObj
{
// @DataMember
public Ref: string;
// @DataMember
public ErrorMessage: string;
public constructor(init?: Partial<UpdateContractErrorObj>) { (Object as any).assign(this, init); }
}
// @DataContract
export class ContractFulfillmentResponse extends BaseResponse
{
// @DataMember
public MassUpdateErrors: UpdateContractErrorObj[];
public constructor(init?: Partial<ContractFulfillmentResponse>) { super(init); (Object as any).assign(this, init); }
}
// @DataContract
export class DeliveredAccessory
{
// @DataMember
public Id: number;
// @DataMember
public Delivered: boolean;
public constructor(init?: Partial<DeliveredAccessory>) { (Object as any).assign(this, init); }
}
// @DataContract(Name="Accessory")
export class Accessory
{
/** @description The description to be used for the Accessory */
// @DataMember
// @ApiMember(DataType="string", Description="The description to be used for the Accessory", IsRequired=true, Name="Desc", ParameterType="body")
public Desc: string;
/** @description The price to be used for the Accessory */
// @DataMember
// @ApiMember(DataType="decimal", Description="The price to be used for the Accessory", Name="Price", ParameterType="body")
public Price: number;
/** @description The type of Accessory. A is Accessory, D is Delivery Option, and M is Maintenance */
// @DataMember
// @ApiMember(DataType="string", Description="The type of Accessory. A is Accessory, D is Delivery Option, and M is Maintenance", Name="Type", ParameterType="body")
public Type: string;
/** @description The category # in AIM to be linked to this accessory. */
// @DataMember
// @ApiMember(DataType="int", Description="The category # in AIM to be linked to this accessory.", Name="CatNum", ParameterType="body")
public CatNum: number;
/** @description A SKU or Package Deal package SKU can be sent here to link the accessory to that SKU or package. */
// @DataMember
// @ApiMember(DataType="string", Description="A SKU or Package Deal package SKU can be sent here to link the accessory to that SKU or package.", Name="Sku", ParameterType="body")
public Sku: string;
/** @description Internal Use Only */
// @DataMember
// @ApiMember(DataType="bool", Description="Internal Use Only", Name="Report", ParameterType="body")
public Report?: boolean;
public constructor(init?: Partial<Accessory>) { (Object as any).assign(this, init); }
}
// @DataContract
export class UpdateContractObj
{
// @DataMember
public Ref: string;
// @DataMember
public Serial: string;
// @DataMember
public SerialPk?: number;
// @DataMember
public CashPrice?: number;
// @DataMember
public NewStatus: string;
// @DataMember
public Notes: string;
// @DataMember
public DeliveryDate?: string;
// @DataMember
public DeliveredAccessories: DeliveredAccessory[];
// @DataMember
public DeletedAccessoryIds: number[];
// @DataMember
public AddedAccessories: Accessory[];
// @DataMember
public FirstDue?: string;
// @DataMember
public NewCustomerAcct?: number;
// @DataMember
public Unlock: boolean;
public constructor(init?: Partial<UpdateContractObj>) { (Object as any).assign(this, init); }
}
/** @description ContractFulfillmentRequires active-e Contracts Service.This API call used to be named C2BSetContractSerial. */
// @DataContract
export class ContractFulfillmentRequest extends BaseSecureRequest
{
// @DataMember
public Ref: string;
// @DataMember
public Serial: string;
// @DataMember
public SerialPk?: number;
// @DataMember
public CashPrice?: number;
// @DataMember
public NewStatus: string;
// @DataMember
public Notes: string;
// @DataMember
public DeliveryDate?: string;
// @DataMember
public DeliveredAccessories: DeliveredAccessory[];
// @DataMember
public DeletedAccessoryIds: number[];
// @DataMember
public AddedAccessories: Accessory[];
// @DataMember
public FirstDue?: string;
// @DataMember
public CustomerAcct?: number;
// @DataMember
public Unlock: boolean;
// @DataMember
public MassUpdateItems: UpdateContractObj[];
public constructor(init?: Partial<ContractFulfillmentRequest>) { super(init); (Object as any).assign(this, init); }
}
TypeScript ContractFulfillmentRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/ContractFulfillment HTTP/1.1
Host: active-ewebservice.biz
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Ref":"String","Serial":"String","SerialPk":0,"CashPrice":0,"NewStatus":"String","Notes":"String","DeliveryDate":"0001-01-01T00:00:00.0000000","DeliveredAccessories":[{"Id":0,"Delivered":false}],"DeletedAccessoryIds":[0],"AddedAccessories":[{"Desc":"String","Price":0,"Type":"String","CatNum":0,"Sku":"String","Report":false}],"FirstDue":"0001-01-01T00:00:00.0000000","CustomerAcct":0,"Unlock":false,"MassUpdateItems":[{"Ref":"String","Serial":"String","SerialPk":0,"CashPrice":0,"NewStatus":"String","Notes":"String","DeliveryDate":"0001-01-01T00:00:00.0000000","DeliveredAccessories":[{"Id":0,"Delivered":false}],"DeletedAccessoryIds":[0],"AddedAccessories":[{"Desc":"String","Price":0,"Type":"String","CatNum":0,"Sku":"String","Report":false}],"FirstDue":"0001-01-01T00:00:00.0000000","NewCustomerAcct":0,"Unlock":false}],"Token":"String","ApiKey":"String","OAuthToken":"String","DeviceId":"String","AppId":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"MassUpdateErrors":[{"Ref":"String","ErrorMessage":"String"}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}