OSZZ API

<back to all web services

AddToCart

The following routes are available for this service:
POST/addToCart
AddToCart Parameters:
NameParameterData TypeRequiredDescription
IsCashbodyboolNo
PriceListIdbodyGuidNo
CodebodystringNo
DeliverybodystringNo
ProductIdbodyGuidNo
QuantitybodyintNo
CommentbodystringNo
TokenIdbodyGuidNo
AddToCartResponse Parameters:
NameParameterData TypeRequiredDescription
ResponseStatusformResponseStatusNo
ResultformCartItemModelNo
CartItemModel Parameters:
NameParameterData TypeRequiredDescription
SupplierAliasIdformGuidNo
OrderItemIdformGuidNo
ManufacturerTitleformstringNo
ProductIdformGuidNo
ProductNumberformstringNo
ProductTitleformstringNo
QuantityformintNo
PackformintNo
PriceformdecimalNo
CommentformstringNo
PriceListLogoformstringNo
DeliveryformstringNo
ExpectedDeliveryDaysformintNo
GuaranteedDeliveryDaysformintNo
IsCashformboolNo
UseScheduleformboolNo
DeliveryDateformDateTime?No
OrderDateformDateTime?No
DateformDateTimeNo
StateformOrderItemStateNo
StateTitleformstringNo
GlobalIdformlongNo
OrderItemState Enum:
Undefined
Sold
Refused
InOrder
InSupplierCart
Purchased
NotDistributed
InCart
Ready
Distributed
SupplierRefused
Archived
GivingOutScan
InProcessing
Return
Returned
RefusedByClient
PurchasedBySupplier
InParentCart
InSupplierWebCart
WorkInSupplierWebCart
Deficit

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 /addToCart HTTP/1.1 
Host: api.oszz.ru 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	isCash: False,
	priceListId: 00000000000000000000000000000000,
	code: String,
	delivery: String,
	productId: 00000000000000000000000000000000,
	quantity: 0,
	comment: String,
	tokenId: 00000000000000000000000000000000
}
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
		}
	},
	result: 
	{
		supplierAliasId: 00000000000000000000000000000000,
		orderItemId: 00000000000000000000000000000000,
		manufacturerTitle: String,
		productId: 00000000000000000000000000000000,
		productNumber: String,
		productTitle: String,
		quantity: 0,
		pack: 0,
		price: 0,
		comment: String,
		priceListLogo: String,
		delivery: String,
		expectedDeliveryDays: 0,
		guaranteedDeliveryDays: 0,
		isCash: False,
		useSchedule: False,
		deliveryDate: 0001-01-01,
		orderDate: 0001-01-01,
		date: 0001-01-01,
		state: Undefined,
		stateTitle: String,
		globalId: 0
	}
}