Hotline: 08 6868 1600
Hỗ trợ - Hướng dẫn - Sinvoice Viettel
Đăng ký Sinvoice
  • Bảng giá
  • Lợi ích
  • Thủ tục đăng ký
  • Văn bản
  • Hướng dẫn sử dụng
  • Câu hỏi thường gặp
  • Video hướng dẫn chi tiết
  • Tiến trình sử dụng HDĐT
Đăng ký Sinvoice
  • Thủ tục đăng ký
  • Văn bản
  • Hướng dẫn sử dụng
  • Câu hỏi thường gặp
  • Video hướng dẫn chi tiết
  • Tiến trình sử dụng HDĐT
Hỗ trợ - Hướng dẫn - Sinvoice Viettel
No Result
View All Result

35. Sử dụng Postman gọi API webservice hóa đơn điện tử

1. Tải và cài đặt postman

Truy cập link https://www.getpostman.com/apps, chọn tải postman tương ứng với hệ điều hành của máy tính đang dùng

2. Các bước gọi một API

  • Bước 1: Chạy postman, Chọn New > Create new request

  • Bước 2: nhập tên, chọn thư mục lưu

  • Bước 3: Nhập các tham số

Tab Authorization: Nhập user/pass

Tab Header: Nhập nội dung content-type, accept

Tab Body: chọn raw (input là json) hoặc x-www-form-urlencoded

  • Bước 4: gửi request và nhận kết quả trả về

3. Các lỗi thường gặp

Với mỗi user, hệ thống chỉ cho phép một vài địa chỉ IP nhất định truy cập đến web service. IP phải là IP public của hệ thống đối tác. Để cập nhật IP, người dùng có thể tự cập nhật thông qua các bước như sau:

  • Bước 1: Vào hệ thống trên web, sử dụng đúng acc đang sử dụng để tích hợp
  • Bước 2: Vào chức năng: Quản lý thông tin doanh nghiệp/ Quản lý người dùng
  • Bước 3: Tìm đến user cần add IP, chọn buttom Cập nhật
  • Bước 4: Trên màn hình cập nhật thông tin, trường thông tin địa chỉ IP được khai báo theo quy định như sau: Các IP liên tiếp phân cách bằng ký tự |.

Ví dụ: 2.2.2.2|3.3.3.3|4.4.4.4

Bất cứ trường hợp nào sai tài khoản/mật khẩu hay IP sẽ nhận về kết quả trả về là 500 Request Fail

4. Tham số đầu vào các api mẫu

      (1) Lập hóa đơn

  • Api:

https://demo-sinvoice.viettel.vn:8443/InvoiceAPI/InvoiceWS/createInvoice/{supplierCode}

Ví dụ:

https://demo-sinvoice.viettel.vn:8443/InvoiceAPI/InvoiceWS/createInvoice/0100109106-968

  • Method: POST
  • Content-type json: application/json
  • Input json:

{

“generalInvoiceInfo”:{

“invoiceType”:”02GTTT”,

“templateCode”:”02GTTT0/001″,

“currencyCode”:”VND”,

“adjustmentType”:”1″,

“paymentStatus”:true,

“paymentType”:”TM”,

“paymentTypeName”:”TM”,

“cusGetInvoiceRight”:true,

“userName”:”user 1″

},

“buyerInfo”:{

“buyerName”:”Đặng thị thanh tâm”,

“buyerLegalName”:””,

“buyerTaxCode”:””,

“buyerAddressLine”:”HN VN”,

“buyerPhoneNumber”:”11111″,

“buyerEmail”:””,

“buyerIdNo”:”123456789″,

“buyerIdType”:”1″

},

“sellerInfo”:{

“sellerLegalName”:”Đặng thị thanh tâm”,

“sellerTaxCode”:”0100109106-501″,

“sellerAddressLine”:”test”,

“sellerPhoneNumber”:”0123456789″,

“sellerEmail”:”PerformanceTest1@viettel.com.vn”,

“sellerBankName”:”vtbank”,

“sellerBankAccount”:”23423424″

},

“payments”:[

{

“paymentMethodName”:”TM”

}

],

“itemInfo”:[

{

“lineNumber”:1,

“itemCode”:”ENGLISH_COURSE”,

“itemName”:”Khóa học tiếng anh”,

“unitName”:”khóa học”,

“unitPrice”:3500000.0,

“quantity”:10.0,

“itemTotalAmountWithoutTax”:35000000,

“taxPercentage”:10.0,

“taxAmount”:0.0,

“discount”:0.0,

“itemDiscount”:150000.0

}

],

“summarizeInfo”:{

“sumOfTotalLineAmountWithoutTax”:35000000,

“totalAmountWithoutTax”:35000000,

“totalTaxAmount”:3500000.0,

“totalAmountWithTax”:38500000,

“totalAmountWithTaxInWords”:”Ba mươi tám triệu năm trăm nghìn đồng chẵn”,

“discountAmount”:0.0,

“settlementDiscountAmount”:0.0,

“taxPercentage”:10.0

},

“taxBreakdowns”:[

{

“taxPercentage”:10.0,

“taxableAmount”:35000000,

“taxAmount”:3500000.0

}

]

}

  • Content-type xml: application/xml
  • Input xml:

<?xml version=”1.0″ encoding=”UTF-8″ ?>

<commonDataInput>

<generalInvoiceInfo>

<invoiceType>02GTTT</invoiceType>

<templateCode>02GTTT0/001</templateCode>

<currencyCode>VND</currencyCode>

<adjustmentType>1</adjustmentType>

<paymentStatus>true</paymentStatus>

<paymentType>TM</paymentType>

<paymentTypeName>TM</paymentTypeName>

<cusGetInvoiceRight>true</cusGetInvoiceRight>

<userName>user 1</userName>

</generalInvoiceInfo>

<buyerInfo>

<buyerName>Đặng thị thanh tâm</buyerName>

<buyerLegalName></buyerLegalName>

<buyerTaxCode></buyerTaxCode>

<buyerAddressLine>HN VN</buyerAddressLine>

<buyerPhoneNumber>11111</buyerPhoneNumber>

<buyerEmail></buyerEmail>

<buyerIdNo>123456789</buyerIdNo>

<buyerIdType>1</buyerIdType>

</buyerInfo>

<sellerInfo>

<sellerLegalName>Đặng thị thanh tâm</sellerLegalName>

<sellerTaxCode>0100109106-501</sellerTaxCode>

<sellerAddressLine>test</sellerAddressLine>

<sellerPhoneNumber>0123456789</sellerPhoneNumber>

<sellerEmail>PerformanceTest1@viettel.com.vn</sellerEmail>

<sellerBankName>vtbank</sellerBankName>

<sellerBankAccount>23423424</sellerBankAccount>

</sellerInfo>

<payments>

<paymentMethodName>TM</paymentMethodName>

</payments>

<itemInfo>

<lineNumber>1</lineNumber>

<itemCode>ENGLISH_COURSE</itemCode>

<itemName>Khóa học tiếng anh</itemName>

<unitName>khóa học</unitName>

<unitPrice>3500000</unitPrice>

<quantity>10</quantity>

<itemTotalAmountWithoutTax>35000000</itemTotalAmountWithoutTax>

<taxPercentage>10</taxPercentage>

<taxAmount>0</taxAmount>

<discount>0</discount>

<itemDiscount>150000</itemDiscount>

</itemInfo>

<summarizeInfo>

<sumOfTotalLineAmountWithoutTax>35000000</sumOfTotalLineAmountWithoutTax>

<totalAmountWithoutTax>35000000</totalAmountWithoutTax>

<totalTaxAmount>3500000</totalTaxAmount>

<totalAmountWithTax>38500000</totalAmountWithTax>

<totalAmountWithTaxInWords>Ba mươi tám triệu năm trăm nghìn đồng chẵn</totalAmountWithTaxInWords>

<discountAmount>0</discountAmount>

<settlementDiscountAmount>0</settlementDiscountAmount>

<taxPercentage>10</taxPercentage>

</summarizeInfo>

<taxBreakdowns>

<taxPercentage>10</taxPercentage>

<taxableAmount>35000000</taxableAmount>

<taxAmount>3500000</taxAmount>

</taxBreakdowns>

</commonDataInput>

      (2) Hủy hóa đơn

  • Api:

https://demo-sinvoice.viettel.vn:8443/InvoiceAPI/InvoiceWS/cancelTransactionInvoice

  • Method: POST
  • Content-type: application/x-www-form-urlencoded
  • Input:

supplierTaxCode=0100109106-968&invoiceNo=AA%2F18E0000011&strIssueDate=20180627081259&additionalReferenceDesc=hello&additionalReferenceDate=20180627081259

     (3) Lấy file bản thể hiện

  • Api:

https://demo-sinvoice.viettel.vn:8443/InvoiceAPI/InvoiceUtilsWS/getInvoiceRepresentationFile

  • Method: POST
  • Đầu vào json:

Content-type json: application/json

Input json:

{

“supplierTaxCode”:”0100109106-968″,

“invoiceNo”:”AA/18E0000011″,

“pattern”:”02GTTT0/001″,

“fileType”:”ZIP”

}

  • Đầu vào xml:

Content-type xml: application/xml

Input xml:

<?xml version=”1.0″ encoding=”UTF-8″ ?>

<commonDataInput>

<supplierTaxCode>0100109106-968</supplierTaxCode>

< invoiceNo>AA/18E0000011</invoiceNo >

< pattern>02GTTT0/001</ pattern >

< fileType>ZIP</fileType >

</commonDataInput>

      (4) Lấy file bản chuyển đổi

  • Api:

https://demo-sinvoice.viettel.vn:8443/InvoiceAPI/InvoiceWS/createExchangeInvoiceFile

  • Method: POST
  • Content-type: application/x-www-form-urlencoded
  • Input:

supplierTaxCode=0100109106-968&invoiceNo=AA%2F18E0000010&strIssueDate=20180627081259&exchangeUser=%C4%90%E1%BA%B7ng%20T.T%20T%C3%A2m

No Result
View All Result

HƯỚNG DẪN SỬ DỤNG

  • ĐĂNG KÝ  MỚI TÀI KHOẢN TẠI HỆ THỐNG THUẾ ĐIỆN TỬ
  • HƯỚNG DẪN NỘP THÔNG BÁO PHÁT HÀNH
  • NỘP THÔNG BÁO KẾT QUẢ HỦY HÓA ĐƠN
  • HƯỚNG DẪN CÀI ĐẶT JAVA
  • Điều chỉnh thông tin trên mẫu hóa đơn
  • Các bước đăng ký và sử dụng dịch vụ hóa đơn điện tử
  • TÀI LIỆU NGHIỆP VỤ HÓA ĐƠN ĐIỆN TỬ
  • TÀI LIỆU THÔNG TƯ 32-2011-TT-BTC, NGHỊ ĐỊNH 119-2018-NĐ-CP
  • TỔNG HỢP NỘI DUNG NGHỊ ĐỊNH 119/2018/NĐ-CP VỀ HÓA ĐƠN ĐIỆN TỬ
  • Hướng dẫn xử lý lỗi người mua không nhận được email hóa đơn của doanh nghiệp
  • Ghi chú về mẫu hóa đơn
  • Link Video sử dụng các chức năng trên hệ thống Hóa đơn điện tử
  • Các khái niệm, thành phần trong hệ thống hóa đơn điện tử
  • Các bước kiểm tra ký USB Token
  • 1. Danh sách lỗi thường gặp
  • Trình duyệt, hệ điều hành hỗ trợ
  • 2. Cập nhật thông tin doanh nghiệp
  • 3. Cập nhật chứng thư số
  • 4. Cấu hình doanh nghiệp – Cấu hình chung/Email/Biểu mẫu Email/Trường hiển thị Quản lý hóa đơn
  • 5.Cấu hình cho Gmail, Hotmail, Yahoo, Outlook
  • 6. Cập nhật danh mục chi nhánh
  • 7. Cập nhật quản lý người dùng
  • 8. Cập nhật quản lý nhóm người dùng
  • 9. Cập nhật danh mục khách hàng
  • 10. Cập nhật hàng hóa
  • 11. Khai báo loại hóa đơn
  • 12. Khai báo dải hóa đơn
  • 13. Chọn mẫu hóa đơn
  • 14. Cập nhật SMS
  • 15. Lập thông báo phát hành
  • 16. Gửi phê duyệt thông báo phát hành
  • 17. Lập hóa đơn và Lập hóa đơn nháp
  • 18. Tra cứu, Sửa, xem hóa đơn chưa phát hành
  • 19. Phát hành hóa đơn nháp
  • 20. Lập hóa đơn thay thế
  • 21. Lập hóa đơn điều chỉnh tiền
  • 22. Lập hóa đơn điều chỉnh thông tin
  • 23. Lập hóa đơn xóa bỏ
  • 24. Lập hóa đơn chuyển đổi
  • 25. Lập hóa đơn theo file
  • 26. Cập nhật kê khai thuế
  • 27. Xem báo cáo
  • 28. Xem tình trạng sử dụng hóa đơn
  • 29. Tra cứu hóa đơn
  • 30. Quản lý hóa đơn, lưu trữ hóa đơn, xem chi tiết hóa đơn
  • 31. Thay đổi mật khẩu, quên mật khẩu
  • 32. Cấu hình doanh nghiệp – số thập phân
  • 33. Sử dụng Tool xử lý ảnh Online
  • 34. Thực hiện IN hóa đơn từ trên WEB
  • 35. Sử dụng Postman gọi API webservice hóa đơn điện tử

MỤC CHÍNH

  • Thủ tục đăng ký
  • Văn bản
  • Hướng dẫn sử dụng
  • Câu hỏi thường gặp
  • Video hướng dẫn chi tiết
  • Tiến trình sử dụng HDĐT

SINVOICE

ĐĂNG KÝ SINVOICE
  • Bảng giá
  • Lợi ích

LIÊN HỆ

Phòng Khách hàng Doanh nghiệp – Viettel TP.HCM
Tầng 16, toà nhà Viettel, 285 Cách Mạng Tháng 8, Phường 12, Quận 10, Tp.HCM
Điện thoại: 08 6868 1800
Email: cskh@sinvoice-viettel.vn
  • Câu hỏi thường gặp
  • Thủ tục đăng ký
  • Tiến trình sử dụng HDĐT
  • Trang chủ
  • Văn bản
  • Video hướng dẫn chi tiết

© 2020 Sinvoice Viettel.

No Result
View All Result
  • Thủ tục đăng ký
  • Hướng dẫn sử dụng
  • Văn bản
  • Câu hỏi thường gặp
  • Đăng ký Sinvoice
  • Bảng giá
  • Lợi ích

© 2020 Sinvoice Viettel.

08 6868 1600