| GET | /v1/OrderHeaders/{ID} | ||
|---|---|---|---|
| GET,POST,OPTIONS | /v1/OrderHeaders | ||
| POST | /v1/OrderHeaders/Agent/{AgentID} |
export class Address
{
public ID: number;
public AddressTypeID: number;
public AddressContact: string;
public AttentionTo: string;
public AddressLine1: string;
public AddressLine2: string;
public AddressLine3: string;
public AddressCity: string;
public AddressState: string;
public AddressZip: string;
public AddressCountry: string;
public PhoneNumber: string;
public FaxNumber: string;
public UID: string;
public Name: string;
public constructor(init?: Partial<Address>) { (Object as any).assign(this, init); }
}
export class OrderHeader
{
public ID: number;
public AgentID: number;
public CustomerID: number;
public AgentName: string;
public CustomerName: string;
public OrderDate: string;
public OrderStatus: number;
public OrderStatusText: string;
public TotalQuantityUnits: number;
public TotalOrderCost: number;
public TotalProductCost: number;
public TotalOrderTax: number;
public TotalShippingCost: number;
public BillingAddressID: number;
public ShippingAddressID: number;
public CustomerPaidAmount: number;
public Notes: string;
public UID: string;
public Recalculate: boolean;
public PublicOrderID: string;
public Address: string;
public ShippingAddress: Address;
public BillingAddress: Address;
public isMultiShip: boolean;
public constructor(init?: Partial<OrderHeader>) { (Object as any).assign(this, init); }
}
export class OrderHeadersResponse
{
public ResponseStatus: ResponseStatus;
public OrderHeaders: OrderHeader[] = [];
public constructor(init?: Partial<OrderHeadersResponse>) { (Object as any).assign(this, init); }
}
export class OrderHeadersRequest
{
public AgentID: string;
public OrderHeaders: OrderHeader[] = [];
public constructor(init?: Partial<OrderHeadersRequest>) { (Object as any).assign(this, init); }
}
TypeScript OrderHeadersRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/OrderHeaders HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
AgentID: 00000000000000000000000000000000,
OrderHeaders:
[
{
ID: 0,
AgentID: 0,
CustomerID: 0,
AgentName: String,
CustomerName: String,
OrderDate: 0001-01-01,
OrderStatus: 0,
OrderStatusText: String,
TotalQuantityUnits: 0,
TotalOrderCost: 0,
TotalProductCost: 0,
TotalOrderTax: 0,
TotalShippingCost: 0,
BillingAddressID: 0,
ShippingAddressID: 0,
CustomerPaidAmount: 0,
Notes: String,
UID: 00000000000000000000000000000000,
Recalculate: False,
PublicOrderID: String,
Address: String,
ShippingAddress:
{
ID: 0,
AddressTypeID: 0,
AddressContact: String,
AttentionTo: String,
AddressLine1: String,
AddressLine2: String,
AddressLine3: String,
AddressCity: String,
AddressState: String,
AddressZip: String,
AddressCountry: String,
PhoneNumber: String,
FaxNumber: String,
UID: 00000000000000000000000000000000,
Name: String
},
BillingAddress:
{
ID: 0,
AddressTypeID: 0,
AddressContact: String,
AttentionTo: String,
AddressLine1: String,
AddressLine2: String,
AddressLine3: String,
AddressCity: String,
AddressState: String,
AddressZip: String,
AddressCountry: String,
PhoneNumber: String,
FaxNumber: String,
UID: 00000000000000000000000000000000,
Name: String
},
isMultiShip: False
}
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
OrderHeaders:
[
{
ID: 0,
AgentID: 0,
CustomerID: 0,
AgentName: String,
CustomerName: String,
OrderDate: 0001-01-01,
OrderStatus: 0,
OrderStatusText: String,
TotalQuantityUnits: 0,
TotalOrderCost: 0,
TotalProductCost: 0,
TotalOrderTax: 0,
TotalShippingCost: 0,
BillingAddressID: 0,
ShippingAddressID: 0,
CustomerPaidAmount: 0,
Notes: String,
UID: 00000000000000000000000000000000,
Recalculate: False,
PublicOrderID: String,
Address: String,
ShippingAddress:
{
ID: 0,
AddressTypeID: 0,
AddressContact: String,
AttentionTo: String,
AddressLine1: String,
AddressLine2: String,
AddressLine3: String,
AddressCity: String,
AddressState: String,
AddressZip: String,
AddressCountry: String,
PhoneNumber: String,
FaxNumber: String,
UID: 00000000000000000000000000000000,
Name: String
},
BillingAddress:
{
ID: 0,
AddressTypeID: 0,
AddressContact: String,
AttentionTo: String,
AddressLine1: String,
AddressLine2: String,
AddressLine3: String,
AddressCity: String,
AddressState: String,
AddressZip: String,
AddressCountry: String,
PhoneNumber: String,
FaxNumber: String,
UID: 00000000000000000000000000000000,
Name: String
},
isMultiShip: False
}
]
}