POS365.VN APIs

<back to all web services

OrderSave

Requires Authentication
Requires any of the permissions:Order_Update, Order_Create
The following routes are available for this service:
POST/api/orders
OrderSave Parameters:
NameParameterData TypeRequiredDescription
OrderbodyOrderNo
ExcessCashTypebodyint?No
DontSetTimebodyboolNo
DeliveryBybodylong?No
ShippingCostbodyfloatNo
LadingCodebodystringNo
QrCodeEnablebodyboolNo
MerchantNamebodystringNo
MerchantCodebodystringNo
OrderDetailBuilderbodyboolNo
Order Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
CodeformstringNo
PurchaseDateformDateTimeNo
EndPurchaseDateformDateTime?No
BranchIdformintNo
DescriptionformstringNo
StatusformbyteNo
ModifiedDateformDateTime?No
RetailerIdformintNo
Discountformdecimal?No
SoldByIdformlong?No
RoomIdformlong?No
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedByformlong?No
DiscountToViewformstringNo
TotalformdecimalNo
TotalPaymentformdecimalNo
TotalAdditionalServicesformdecimalNo
PartnerIdformlong?No
ExcessCashformdecimal?No
AmountReceivedformdecimalNo
ShippingCostformdecimalNo
PriceBookIdformlong?No
AccountIdformint?No
PosformstringNo
NumberOfGuestsformintNo
VATformdecimalNo
VoucherformdecimalNo
MoreAttributesformstringNo
ChannelIdformlong?No
TaxPrivateCodeformstringNo
EInvoiceRequestTypeformEInvoiceRequestTypeNo
SyncEInvoiceformboolNo
AccountformAccountNo
ChannelformOrderChannelNo
PartnerformPartnerNo
PriceBookformPriceBookNo
RoomformRoomNo
DuplicateIdformGuid?No
OrderDetailsformICollection<OrderDetail>No
VATInvoicesformICollection<VATInvoice>No
EInvoiceRequestType Enum:
NotExport
WaitForExport
ExportImmediately
Account Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
DescriptionformstringNo
RetailerIdformintNo
CreatedByformlongNo
CreatedDateformDateTimeNo
ModifiedByformlong?No
ModifiedDateformDateTime?No
OrderChannel Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
NameformstringNo
ImageformstringNo
RetailerIdformintNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
Partner Parameters:
NameParameterData TypeRequiredDescription
PlainPasswordformstringNo
IdformlongNo
CodeformstringNo
NameformstringNo
AddressformstringNo
PhoneformstringNo
DOBformDateTime?No
EmailformstringNo
TypeformbyteNo
GenderformbyteNo
TaxCodeformstringNo
TotalDebtformdecimalNo
LoyaltyformdecimalNo
DescriptionformstringNo
CreatedByformlongNo
CreatedDateformDateTimeNo
ModifiedByformlong?No
ModifiedDateformDateTime?No
RetailerIdformintNo
ImageformstringNo
IdentifyNoformstringNo
LeadOwnerIdformlong?No
CompanyformstringNo
DepartmentformstringNo
PasswordformstringNo
ProvinceformstringNo
PointformlongNo
ShippingAddressformstringNo
Phone2formstringNo
MemberJoinDateformDateTime?No
TransactionvalueformdecimalNo
LeadOwnerformUserNo
PartnerGroupMembersformICollection<PartnerGroupMember>No
User Parameters:
NameParameterData TypeRequiredDescription
PlainPasswordformstringNo
IdformlongNo
EmailformstringNo
UserNameformstringNo
PasswordformstringNo
NameformstringNo
DOBformDateTime?No
AddressformstringNo
PhoneformstringNo
CreatedDateformDateTimeNo
IsActiveformboolNo
IsAdminformboolNo
RetailerIdformintNo
CreatedByformlongNo
AdminGroupformbyteNo
ManagedByformlong?No
IdentityCardNumberformstringNo
ManagedByNavigationformUserNo
PartnerGroupMember Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
PartnerIdformlongNo
GroupIdformlongNo
PriceBook Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
NameformstringNo
IsActiveformboolNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
RetailerIdformintNo
StartDateformDateTimeNo
EndDateformDateTimeNo
LimitUsersformstringNo
LimitBranchsformstringNo
LimitCustomerGroupsformstringNo
PriceBookDetailsformICollection<PriceBookDetail>No
PriceBookDetail Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
PriceBookIdformlongNo
ProductIdformlongNo
PriceformdecimalNo
CreatedDateformDateTimeNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
PriceLargeUnitformdecimalNo
ProductformProductNo
Product Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
CodeformstringNo
NameformstringNo
AttributesNameformstringNo
CategoryIdformlong?No
DescriptionformstringNo
PriceformdecimalNo
PriceLargeUnitformdecimalNo
ProductTypeformbyteNo
ConversionValueformdoubleNo
UnitformstringNo
LargeUnitformstringNo
IsSerialNumberTrackingformboolNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
RetailerIdformintNo
IsPercentageOfTotalOrderformboolNo
SplitForSalesOrderformboolNo
OrderQuickNotesformstringNo
PrinterformstringNo
Hiddenformbool?No
IsTimerformbool?No
Coefficientformdouble?No
BonusPointformdoubleNo
ShowOnBranchIdformstringNo
BonusPointForAssistantformdoubleNo
BonusPointForAssistant2formdoubleNo
BonusPointForAssistant3formdoubleNo
PriceConfigformstringNo
BlockOfTimeToUseServiceformintNo
IsPriceForBlockformboolNo
FormularformstringNo
PositionformlongNo
LargeUnitCodeformstringNo
Code2formstringNo
Code3formstringNo
Code4formstringNo
Code5formstringNo
CategoryformCategoryNo
CompositeItemProductsformICollection<CompositeItem>No
ProductAttributesformICollection<ProductAttribute>No
ProductImagesformICollection<ProductImage>No
Category Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
NameformstringNo
ImageURLformstringNo
DescriptionformstringNo
ParentIdformlong?No
RetailerIdformintNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
ShowOnBranchIdformstringNo
PositionformlongNo
ParentformCategoryNo
CompositeItem Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
ProductIdformlongNo
ItemIdformlongNo
QuantityformdoubleNo
RetailerIdformintNo
QuantityLargeUnitformdoubleNo
ItemformProductNo
ProductAttribute Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
ProductIdformlongNo
AttributeNameformstringNo
AttributeValueformstringNo
RetailerIdformintNo
ProductImage Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
ProductIdformlongNo
ImageURLformstringNo
ThumbnailUrlformstringNo
IsDefaultformboolNo
Room Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
NameformstringNo
PositionformintNo
BranchIdformintNo
RetailerIdformintNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedByformlong?No
ModifiedDateformDateTime?No
DescriptionformstringNo
ProductIdformlong?No
RoomGroupIdformlong?No
PrinterformstringNo
QRCodeformstringNo
ConfigformstringNo
ProductformProductNo
RoomGroupformRoomGroupNo
RoomGroup Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
NameformstringNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
BranchIdformintNo
RetailerIdformintNo
OrderDetail Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
OrderIdformlongNo
ProductIdformlongNo
QuantityformdoubleNo
PriceformdecimalNo
BasePriceformdecimalNo
SerialNumbersformstringNo
DescriptionformstringNo
ComboItemsformstringNo
IsLargeUnitformboolNo
ConversionValueformdoubleNo
SpreadsheetsformstringNo
Coefficientformdouble?No
ExpiryDateformDateTime?No
ToppingformstringNo
ProcessedformdoubleNo
ModifiedDateformDateTime?No
ModifiedByformlong?No
StartTimingFromformDateTime?No
SoldByIdformlong?No
AssistantByIdformlong?No
AssistantById2formlong?No
AssistantById3formlong?No
IsPromotionformboolNo
NameformstringNo
CodeformstringNo
MoreAttributesformstringNo
ProductformProductNo
VATInvoice Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
OrderIdformlongNo
Key_RecformstringNo
SignedDateformDateTimeNo
SignValueformstringNo
ProviderCodeformstringNo
MaCQTformstringNo
PatternformstringNo
SerialformstringNo
InvoiceNoformstringNo
UrlSearchformstringNo
KeySearchformstringNo
RawDataformstringNo
DataformstringNo
BranchIdformintNo
RetailerIdformintNo
CreatedDateformDateTimeNo
CreatedByformlongNo
ModifiedByformlong?No
ModifiedDateformDateTime?No
DescriptionformstringNo
InvoiceChannelformintNo
ErrorMessageformstringNo
StatusformintNo

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 /api/orders HTTP/1.1 
Host: api.pos365.vn 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Order: 
	{
		Id: 0,
		Code: String,
		PurchaseDate: 0001-01-01,
		EndPurchaseDate: 0001-01-01,
		BranchId: 0,
		Description: String,
		Status: 0,
		ModifiedDate: 0001-01-01,
		RetailerId: 0,
		Discount: 0,
		SoldById: 0,
		RoomId: 0,
		CreatedDate: 0001-01-01,
		CreatedBy: 0,
		ModifiedBy: 0,
		DiscountToView: String,
		Total: 0,
		TotalPayment: 0,
		TotalAdditionalServices: 0,
		PartnerId: 0,
		ExcessCash: 0,
		AmountReceived: 0,
		ShippingCost: 0,
		PriceBookId: 0,
		AccountId: 0,
		Pos: String,
		NumberOfGuests: 0,
		VAT: 0,
		Voucher: 0,
		MoreAttributes: String,
		ChannelId: 0,
		TaxPrivateCode: String,
		EInvoiceRequestType: NotExport,
		SyncEInvoice: False,
		Account: 
		{
			Id: 0,
			Name: String,
			Description: String,
			RetailerId: 0,
			CreatedBy: 0,
			CreatedDate: 0001-01-01,
			ModifiedBy: 0,
			ModifiedDate: 0001-01-01
		},
		Channel: 
		{
			Id: 0,
			Name: String,
			Image: String,
			RetailerId: 0,
			CreatedDate: 0001-01-01,
			CreatedBy: 0,
			ModifiedDate: 0001-01-01,
			ModifiedBy: 0
		},
		Partner: 
		{
			PlainPassword: String,
			Id: 0,
			Code: String,
			Name: String,
			Address: String,
			Phone: String,
			DOB: 0001-01-01,
			Email: String,
			Type: 0,
			Gender: 0,
			TaxCode: String,
			TotalDebt: 0,
			Loyalty: 0,
			Description: String,
			CreatedBy: 0,
			CreatedDate: 0001-01-01,
			ModifiedBy: 0,
			ModifiedDate: 0001-01-01,
			RetailerId: 0,
			Image: String,
			IdentifyNo: String,
			LeadOwnerId: 0,
			Company: String,
			Department: String,
			Password: String,
			Province: String,
			Point: 0,
			ShippingAddress: String,
			Phone2: String,
			MemberJoinDate: 0001-01-01,
			Transactionvalue: 0,
			LeadOwner: 
			{
				PlainPassword: String,
				Id: 0,
				Email: String,
				UserName: String,
				Password: String,
				Name: String,
				DOB: 0001-01-01,
				Address: String,
				Phone: String,
				CreatedDate: 0001-01-01,
				IsActive: False,
				IsAdmin: False,
				RetailerId: 0,
				CreatedBy: 0,
				AdminGroup: 0,
				ManagedBy: 0,
				IdentityCardNumber: String,
				ManagedByNavigation: 
				{
					PlainPassword: String,
					Id: 0,
					Email: String,
					UserName: String,
					Password: String,
					Name: String,
					DOB: 0001-01-01,
					Address: String,
					Phone: String,
					CreatedDate: 0001-01-01,
					IsActive: False,
					IsAdmin: False,
					RetailerId: 0,
					CreatedBy: 0,
					AdminGroup: 0,
					ManagedBy: 0,
					IdentityCardNumber: String,
					ManagedByNavigation: 
					{
						PlainPassword: String,
						Id: 0,
						Email: String,
						UserName: String,
						Password: String,
						Name: String,
						DOB: 0001-01-01,
						Address: String,
						Phone: String,
						CreatedDate: 0001-01-01,
						IsActive: False,
						IsAdmin: False,
						RetailerId: 0,
						CreatedBy: 0,
						AdminGroup: 0,
						ManagedBy: 0,
						IdentityCardNumber: String
					}
				}
			}
		},
		PriceBook: 
		{
			Id: 0,
			Name: String,
			IsActive: False,
			CreatedDate: 0001-01-01,
			CreatedBy: 0,
			ModifiedDate: 0001-01-01,
			ModifiedBy: 0,
			RetailerId: 0,
			StartDate: 0001-01-01,
			EndDate: 0001-01-01,
			LimitUsers: String,
			LimitBranchs: String,
			LimitCustomerGroups: String
		},
		Room: 
		{
			Id: 0,
			Name: String,
			Position: 0,
			BranchId: 0,
			RetailerId: 0,
			CreatedDate: 0001-01-01,
			CreatedBy: 0,
			ModifiedBy: 0,
			ModifiedDate: 0001-01-01,
			Description: String,
			ProductId: 0,
			RoomGroupId: 0,
			Printer: String,
			QRCode: String,
			Config: String,
			Product: 
			{
				Id: 0,
				Code: String,
				Name: String,
				AttributesName: String,
				CategoryId: 0,
				Description: String,
				Price: 0,
				PriceLargeUnit: 0,
				ProductType: 0,
				ConversionValue: 0,
				Unit: String,
				LargeUnit: String,
				IsSerialNumberTracking: False,
				CreatedDate: 0001-01-01,
				CreatedBy: 0,
				ModifiedDate: 0001-01-01,
				ModifiedBy: 0,
				RetailerId: 0,
				IsPercentageOfTotalOrder: False,
				SplitForSalesOrder: False,
				OrderQuickNotes: String,
				Printer: String,
				Hidden: False,
				IsTimer: False,
				Coefficient: 0,
				BonusPoint: 0,
				ShowOnBranchId: String,
				BonusPointForAssistant: 0,
				BonusPointForAssistant2: 0,
				BonusPointForAssistant3: 0,
				PriceConfig: String,
				BlockOfTimeToUseService: 0,
				IsPriceForBlock: False,
				Formular: String,
				Position: 0,
				LargeUnitCode: String,
				Code2: String,
				Code3: String,
				Code4: String,
				Code5: String,
				Category: 
				{
					Id: 0,
					Name: String,
					ImageURL: String,
					Description: String,
					ParentId: 0,
					RetailerId: 0,
					CreatedDate: 0001-01-01,
					CreatedBy: 0,
					ModifiedDate: 0001-01-01,
					ModifiedBy: 0,
					ShowOnBranchId: String,
					Position: 0,
					Parent: 
					{
						Id: 0,
						Name: String,
						ImageURL: String,
						Description: String,
						ParentId: 0,
						RetailerId: 0,
						CreatedDate: 0001-01-01,
						CreatedBy: 0,
						ModifiedDate: 0001-01-01,
						ModifiedBy: 0,
						ShowOnBranchId: String,
						Position: 0,
						Parent: 
						{
							Id: 0,
							Name: String,
							ImageURL: String,
							Description: String,
							ParentId: 0,
							RetailerId: 0,
							CreatedDate: 0001-01-01,
							CreatedBy: 0,
							ModifiedDate: 0001-01-01,
							ModifiedBy: 0,
							ShowOnBranchId: String,
							Position: 0
						}
					}
				}
			},
			RoomGroup: 
			{
				Id: 0,
				Name: String,
				CreatedDate: 0001-01-01,
				CreatedBy: 0,
				ModifiedDate: 0001-01-01,
				ModifiedBy: 0,
				BranchId: 0,
				RetailerId: 0
			}
		},
		DuplicateId: 00000000000000000000000000000000
	},
	ExcessCashType: 0,
	DontSetTime: False,
	DeliveryBy: 0,
	ShippingCost: 0,
	LadingCode: String,
	QrCodeEnable: False,
	MerchantName: String,
	MerchantCode: String,
	OrderDetailBuilder: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}