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 .jsv suffix or ?format=jsv

HTTP + JSV

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

POST /jsv/reply/Orders HTTP/1.1 
Host: northwind.servicestack.net 
Content-Type: text/jsv
Content-Length: length

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

{
	Results: 
	[
		{
			Order: 
			{
				Id: 0,
				CustomerId: String,
				EmployeeId: 0,
				OrderDate: 0001-01-01,
				RequiredDate: 0001-01-01,
				ShippedDate: 0001-01-01,
				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
		}
	}
}