| GET | /v1/OrderHeaders/Open |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Address:
id: int = 0
address_type_i_d: int = 0
address_contact: Optional[str] = None
attention_to: Optional[str] = None
address_line1: Optional[str] = None
address_line2: Optional[str] = None
address_line3: Optional[str] = None
address_city: Optional[str] = None
address_state: Optional[str] = None
address_zip: Optional[str] = None
address_country: Optional[str] = None
phone_number: Optional[str] = None
fax_number: Optional[str] = None
uid: Optional[str] = None
name: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OrderHeader:
id: int = 0
agent_i_d: int = 0
customer_i_d: int = 0
agent_name: Optional[str] = None
customer_name: Optional[str] = None
order_date: datetime.datetime = datetime.datetime(1, 1, 1)
order_status: int = 0
order_status_text: Optional[str] = None
total_quantity_units: int = 0
total_order_cost: Decimal = decimal.Decimal(0)
total_product_cost: Decimal = decimal.Decimal(0)
total_order_tax: Decimal = decimal.Decimal(0)
total_shipping_cost: Decimal = decimal.Decimal(0)
billing_address_i_d: int = 0
shipping_address_i_d: int = 0
customer_paid_amount: Decimal = decimal.Decimal(0)
notes: Optional[str] = None
uid: Optional[str] = None
recalculate: bool = False
public_order_i_d: Optional[str] = None
address: Optional[str] = None
shipping_address: Optional[Address] = None
billing_address: Optional[Address] = None
is_multi_ship: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OrderHeadersResponse:
response_status: Optional[ResponseStatus] = None
order_headers: List[OrderHeader] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OpenOrderRequest:
pass
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.
GET /v1/OrderHeaders/Open HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
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
}
]
}