POS365.VN APIs

<back to all web services

InvoiceSave

Requires Authentication
The following routes are available for this service:
POST/api/eInvoice/issueEInvoice/{orderId}
Invoice Parameters:
NameParameterData TypeRequiredDescription
rawDataformRawDataNo
orderIdformstringNo
cusCodeformstringNo
cusNameformstringNo
cusCompanyNameformstringNo
cusAddressformstringNo
cusPhoneformstringNo
cusEmailformstringNo
cusTaxCodeformstringNo
cusCitizenIdformstringNo
paymentMethodformstringNo
productsformList<ProductInvoice>No
taxBreakDownsformList<TaxBreakDown>No
totalformdecimalNo
discountAmountformdecimalNo
vatRateformdecimalNo
vatAmountformdecimalNo
amountformdecimalNo
amountInWordsformstringNo
currencyformstringNo
descriptionformstringNo
exchangeRateformintNo
invoiceTimeformstringNo
editedformboolNo
ErrorMessageformstringNo
RawData Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
CodeformstringNo
PurchaseDateformDateTimeNo
DescriptionformstringNo
SoldByIdformlong?No
Discountformdecimal?No
TotalformdecimalNo
VATformdecimalNo
MoreAttributesformstringNo
TotalAdditionalServicesformdecimalNo
ShippingCostformdecimalNo
DiscountToViewformstringNo
VoucherformdecimalNo
AccountIdformint?No
TotalPaymentformdecimalNo
AmountReceivedformdecimalNo
ExcessCashformdecimal?No
RoomformRoomRawDataNo
PartnerformPartnerRawDataNo
OrderDetailsformList<OrderDetailRawData>No
RoomRawData Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
PartnerRawData Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
CodeformstringNo
TaxCodeformstringNo
AddressformstringNo
ShippingAddressformstringNo
PhoneformstringNo
LeadOwnerIdformlong?No
OrderDetailRawData Parameters:
NameParameterData TypeRequiredDescription
NameformstringNo
CodeformstringNo
UnitformstringNo
QuantityformdoubleNo
BasePriceformdecimalNo
PriceformdecimalNo
IsTimerformbool?No
AttributesNameformstringNo
SerialNumbersformstringNo
ExpiryDateformDateTime?No
DescriptionformstringNo
IsLargeUnitformboolNo
LargeUnitformstringNo
ConversionValueformdoubleNo
ProductInvoice Parameters:
NameParameterData TypeRequiredDescription
prodNameformstringNo
prodCodeformstringNo
prodUnitformstringNo
prodQuantityformdecimalNo
prodPriceformdecimalNo
amountformdecimalNo
totalformdecimalNo
vatRateformdecimalNo
vatAmountformdecimalNo
discountformdecimalNo
discountAmountformdecimalNo
commodityTypeformintNo
noteformstringNo
TaxBreakDown Parameters:
NameParameterData TypeRequiredDescription
vatRateformdecimalNo
vatAmountformdecimalNo
totalformdecimalNo

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

{
	rawData: 
	{
		Id: 0,
		Code: String,
		PurchaseDate: 0001-01-01,
		Description: String,
		SoldById: 0,
		Discount: 0,
		Total: 0,
		VAT: 0,
		MoreAttributes: String,
		TotalAdditionalServices: 0,
		ShippingCost: 0,
		DiscountToView: String,
		Voucher: 0,
		AccountId: 0,
		TotalPayment: 0,
		AmountReceived: 0,
		ExcessCash: 0,
		Room: 
		{
			Name: String
		},
		Partner: 
		{
			Name: String,
			Code: String,
			TaxCode: String,
			Address: String,
			ShippingAddress: String,
			Phone: String,
			LeadOwnerId: 0
		},
		OrderDetails: 
		[
			{
				Name: String,
				Code: String,
				Unit: String,
				Quantity: 0,
				BasePrice: 0,
				Price: 0,
				IsTimer: False,
				AttributesName: String,
				SerialNumbers: String,
				ExpiryDate: 0001-01-01,
				Description: String,
				IsLargeUnit: False,
				LargeUnit: String,
				ConversionValue: 0
			}
		]
	},
	orderId: String,
	cusCode: String,
	cusName: String,
	cusCompanyName: String,
	cusAddress: String,
	cusPhone: String,
	cusEmail: String,
	cusTaxCode: String,
	cusCitizenId: String,
	paymentMethod: String,
	products: 
	[
		{
			prodName: String,
			prodCode: String,
			prodUnit: String,
			prodQuantity: 0,
			prodPrice: 0,
			amount: 0,
			total: 0,
			vatRate: 0,
			vatAmount: 0,
			discount: 0,
			discountAmount: 0,
			commodityType: 0,
			note: String
		}
	],
	taxBreakDowns: 
	[
		{
			vatRate: 0,
			vatAmount: 0,
			total: 0
		}
	],
	total: 0,
	discountAmount: 0,
	vatRate: 0,
	vatAmount: 0,
	amount: 0,
	amountInWords: String,
	currency: String,
	description: String,
	exchangeRate: 0,
	invoiceTime: String,
	edited: False,
	ErrorMessage: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	
}