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

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<InvoiceSave xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/POS.Services">
  <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</ErrorMessage>
  <amount xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">0</amount>
  <amountInWords xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</amountInWords>
  <currency xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</currency>
  <cusAddress xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusAddress>
  <cusCitizenId xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusCitizenId>
  <cusCode xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusCode>
  <cusCompanyName xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusCompanyName>
  <cusEmail xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusEmail>
  <cusName xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusName>
  <cusPhone xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusPhone>
  <cusTaxCode xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</cusTaxCode>
  <description xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</description>
  <discountAmount xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">0</discountAmount>
  <edited xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">false</edited>
  <exchangeRate xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">0</exchangeRate>
  <invoiceTime xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</invoiceTime>
  <orderId xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</orderId>
  <paymentMethod xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">String</paymentMethod>
  <products xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">
    <ProductInvoice>
      <amount>0</amount>
      <commodityType>0</commodityType>
      <discount>0</discount>
      <discountAmount>0</discountAmount>
      <note>String</note>
      <prodCode>String</prodCode>
      <prodName>String</prodName>
      <prodPrice>0</prodPrice>
      <prodQuantity>0</prodQuantity>
      <prodUnit>String</prodUnit>
      <total>0</total>
      <vatAmount>0</vatAmount>
      <vatRate>0</vatRate>
    </ProductInvoice>
  </products>
  <rawData xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">
    <AccountId>0</AccountId>
    <AmountReceived>0</AmountReceived>
    <Code>String</Code>
    <Description>String</Description>
    <Discount>0</Discount>
    <DiscountToView>String</DiscountToView>
    <ExcessCash>0</ExcessCash>
    <Id>0</Id>
    <MoreAttributes>String</MoreAttributes>
    <OrderDetails>
      <OrderDetailRawData>
        <AttributesName>String</AttributesName>
        <BasePrice>0</BasePrice>
        <Code>String</Code>
        <ConversionValue>0</ConversionValue>
        <Description>String</Description>
        <ExpiryDate>0001-01-01T00:00:00</ExpiryDate>
        <IsLargeUnit>false</IsLargeUnit>
        <IsTimer>false</IsTimer>
        <LargeUnit>String</LargeUnit>
        <Name>String</Name>
        <Price>0</Price>
        <Quantity>0</Quantity>
        <SerialNumbers>String</SerialNumbers>
        <Unit>String</Unit>
      </OrderDetailRawData>
    </OrderDetails>
    <Partner>
      <Address>String</Address>
      <Code>String</Code>
      <LeadOwnerId>0</LeadOwnerId>
      <Name>String</Name>
      <Phone>String</Phone>
      <ShippingAddress>String</ShippingAddress>
      <TaxCode>String</TaxCode>
    </Partner>
    <PurchaseDate>0001-01-01T00:00:00</PurchaseDate>
    <Room>
      <Name>String</Name>
    </Room>
    <ShippingCost>0</ShippingCost>
    <SoldById>0</SoldById>
    <Total>0</Total>
    <TotalAdditionalServices>0</TotalAdditionalServices>
    <TotalPayment>0</TotalPayment>
    <VAT>0</VAT>
    <Voucher>0</Voucher>
  </rawData>
  <taxBreakDowns xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">
    <TaxBreakDown>
      <total>0</total>
      <vatAmount>0</vatAmount>
      <vatRate>0</vatRate>
    </TaxBreakDown>
  </taxBreakDowns>
  <total xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">0</total>
  <vatAmount xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">0</vatAmount>
  <vatRate xmlns="http://schemas.datacontract.org/2004/07/POS.Repositories">0</vatRate>
</InvoiceSave>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />