| POST,PUT,DELETE,OPTIONS | /v1/OrderLines | ||
|---|---|---|---|
| GET | /v1/OrderLines/OrderHeaders/{OrderHeaderUID} |
export class OrderLine
{
public ID: number;
public OrderHeaderID: string;
public OrderLineNumber: number;
public ProductID: number;
public StripeProductId: string;
public ProductCategory: number;
public ProductSubCategory: number;
public Quantity: number;
public TotalOrderLineCost: number;
public ProductCost: number;
public PerUnitProductCost: number;
public OrderLineTax: number;
public OrderLineShippingCost: number;
public PerUnitShippingCost: number;
public OrderLineStatusID: number;
public ShipMethodID: number;
public EstimatedShipDate: string;
public EstimatedDeliveryDate: string;
public ActualShipDate: string;
public ActualDeliveryDate: string;
public OrderLineCreatedDate: string;
public OrderLineModifiedDate: string;
public UID: string;
public ProductName: string;
public AgentId: number;
public Street: string;
public City: string;
public State: string;
public Zip: string;
public PhoneNumber: string;
public AddressId: number;
public ShippingAddress: string;
public FullName: string;
public constructor(init?: Partial<OrderLine>) { (Object as any).assign(this, init); }
}
export class OrderLinesResponse
{
public ResponseStatus: ResponseStatus;
public OrderLines: OrderLine[] = [];
public constructor(init?: Partial<OrderLinesResponse>) { (Object as any).assign(this, init); }
}
export class OrderLinesRequest
{
public OrderHeaderUID: string;
public OrderLines: OrderLine[] = [];
public constructor(init?: Partial<OrderLinesRequest>) { (Object as any).assign(this, init); }
}
TypeScript OrderLinesRequest 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/OrderLines HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
OrderHeaderUID: 00000000000000000000000000000000,
OrderLines:
[
{
ID: 0,
OrderHeaderID: 00000000000000000000000000000000,
OrderLineNumber: 0,
ProductID: 0,
StripeProductId: String,
ProductCategory: 0,
ProductSubCategory: 0,
Quantity: 0,
TotalOrderLineCost: 0,
ProductCost: 0,
PerUnitProductCost: 0,
OrderLineTax: 0,
OrderLineShippingCost: 0,
PerUnitShippingCost: 0,
OrderLineStatusID: 0,
ShipMethodID: 0,
EstimatedShipDate: 0001-01-01,
EstimatedDeliveryDate: 0001-01-01,
ActualShipDate: 0001-01-01,
ActualDeliveryDate: 0001-01-01,
OrderLineCreatedDate: 0001-01-01,
OrderLineModifiedDate: 0001-01-01,
UID: 00000000000000000000000000000000,
ProductName: String,
AgentId: 0,
Street: String,
City: String,
State: String,
Zip: String,
PhoneNumber: String,
AddressId: 0,
ShippingAddress: String,
FullName: String
}
]
}
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
}
},
OrderLines:
[
{
ID: 0,
OrderHeaderID: 00000000000000000000000000000000,
OrderLineNumber: 0,
ProductID: 0,
StripeProductId: String,
ProductCategory: 0,
ProductSubCategory: 0,
Quantity: 0,
TotalOrderLineCost: 0,
ProductCost: 0,
PerUnitProductCost: 0,
OrderLineTax: 0,
OrderLineShippingCost: 0,
PerUnitShippingCost: 0,
OrderLineStatusID: 0,
ShipMethodID: 0,
EstimatedShipDate: 0001-01-01,
EstimatedDeliveryDate: 0001-01-01,
ActualShipDate: 0001-01-01,
ActualDeliveryDate: 0001-01-01,
OrderLineCreatedDate: 0001-01-01,
OrderLineModifiedDate: 0001-01-01,
UID: 00000000000000000000000000000000,
ProductName: String,
AgentId: 0,
Street: String,
City: String,
State: String,
Zip: String,
PhoneNumber: String,
AddressId: 0,
ShippingAddress: String,
FullName: String
}
]
}