Endpoint: api/HDon/GetPDFDraft
Phương thức: GET
Mô tả: API này cho phép người dùng tạo PDF từ thông tin hóa đơn từ hệ thống
| Tham số | Kiểu dữ liệu | Ràng buộc | Mô tả |
|---|---|---|---|
| MBMat | (string) | Bắt buộc |
Mã bí mật (GuideId) là một mã duy nhất được sử dụng để định dạng hóa đơn đã tạo. Mã này có thể được sử dụng để truy xuất lại hóa đơn khi cần thiết. |
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://apiehd.smartsign.com.vn/api/HDon/GetPDF?MBMat=SmartVasTest01");
request.Headers.Add("Authorization", "Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
var settings = {
"url": "https://apiehd.smartsign.com.vn/api/HDon/GetPDF?MBMat=SmartVasTest01",
"method": "PUT",
"timeout": 0,
"headers": {
"Authorization": "Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
},
};
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require('request');
var options = {
'method': 'PUT',
'url': 'https://apiehd.smartsign.com.vn/api/HDon/GetPDF?MBMat=SmartVasTest01',
'headers': {
'Authorization': 'Token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
},
form: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
| Đối tượng | Mô tả |
|---|---|
| File PDF | Nội dung hoá đơn được hiện trên file PDF |
| Đối tượng | Mô tả |
|---|---|
| Status |
Mã lỗi:
406: Không tìm thấy hóa đơn |
| Error | Mô tả lỗi |
{"error":"Không tìm thấy hóa đơn!"}