Northwind Web Services

<back to all web services

Orders

The following routes are available for this service:
All Verbs/orders
All Verbs/orders/page/{Page}
All Verbs/customers/{CustomerId}/orders
Orders Parameters:
NameParameterData TypeRequiredDescription
Pagepathint?No
CustomerIdpathstringNo
OrdersResponse Parameters:
NameParameterData TypeRequiredDescription
ResultsformList<CustomerOrder>No
ResponseStatusformResponseStatusNo
CustomerOrder Parameters:
NameParameterData TypeRequiredDescription
OrderformOrderNo
OrderDetailsformList<OrderDetail>No
Order Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CustomerIdformstringNo
EmployeeIdformintNo
OrderDateformDateTime?No
RequiredDateformDateTime?No
ShippedDateformDateTime?No
ShipViaformint?No
FreightformdecimalNo
ShipNameformstringNo
ShipAddressformstringNo
ShipCityformstringNo
ShipRegionformstringNo
ShipPostalCodeformstringNo
ShipCountryformstringNo
OrderDetail Parameters:
NameParameterData TypeRequiredDescription
OrderIdformintNo
ProductIdformintNo
UnitPriceformdecimalNo
QuantityformshortNo
DiscountformdoubleNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /orders HTTP/1.1 
Host: northwind.servicestack.net 
Accept: text/x-vcard
Content-Type: text/x-vcard
Content-Length: length

{"Page":0,"CustomerId":"String"}
HTTP/1.1 200 OK
Content-Type: text/x-vcard
Content-Length: length

{"Results":[{"Order":{"Id":0,"CustomerId":"String","EmployeeId":0,"OrderDate":"\/Date(-62135596800000-0000)\/","RequiredDate":"\/Date(-62135596800000-0000)\/","ShippedDate":"\/Date(-62135596800000-0000)\/","ShipVia":0,"Freight":0,"ShipName":"String","ShipAddress":"String","ShipCity":"String","ShipRegion":"String","ShipPostalCode":"String","ShipCountry":"String"},"OrderDetails":[{"OrderId":0,"ProductId":0,"UnitPrice":0,"Quantity":0,"Discount":0}]}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}