Lấy mẫu hóa đơn
1. Link API
Tên | Phương thức | Url | |
---|---|---|---|
Môi trường test không mã | post | https://testapp.meinvoice.vn/api/v2/v3common/template | |
Môi trường test có mã | post | https://testapp.meinvoice.vn/api/v2/v3common/code/template | |
Môi trường chính thức không mã | post | https://app.meinvoice.vn/api/v2/v3common/template | |
Môi trường chính thức có mã | post | https://app.meinvoice.vn/api/v2/v3common/code/template |
2. Header
Authorization: Bearer {access_token lấy ở api lấy token}
TaxCode: {mã số thuế}
Content-Type: application/json
3. body
{
"TypeInvoice": {loại hóa đơn: 0,1,2,3,4,5,6},
"TaxCode": "{mã số thuế}",
"UserName": "{tài khoản đăng nhập}",
"Password": "{mật khẩu}"
}
3. ví dụ
3.1 Request
https://testapp.meinvoice.vn/api/v2/v3common/code/template
Content-Type: application/json
{
"TypeInvoice": 0,
"TaxCode": "2222222222-433",
"UserName": "testmisa@yahoo.com",
"Password": "123456Aa"
}
3.2 Respone
{
"SerializeConfig": null,
"data": "[{\"IPTemplateID\":\"0c202916-a8c8-4f13-97ba-ecdf8e97d4e9\",\"CompanyID\":110817,\"TemplateName\":\"Hóa đơn GTGT khởi tạo từ máy tính tiền SP\",\"InvTemplateNo\":\"1\",\"InvSeries\":\"1C23MSP\",\"OrgInvSeries\":\"1CMSP\",\"TemplateType\":1,\"InvoiceType\":10,\"BusinessAreas\":0,\"SortOrder\":0,\"SignedDate\":null,\"CreatedDate\":\"0001-01-01T00:00:00+07:06\",\"CreatedBy\":null,\"ModifiedDate\":\"0001-01-01T00:00:00+07:06\",\"ModifiedBy\":null,\"Inactive\":false,\"TemplateContent\":null,\"DefaultTemplateID\":\"3a5e2bde-1316-11ed-8e9b-005056beb3e2\",\"IsCustomTemplate\":false,\"IsInheritFromOldTemplate\":false,\"XsltVersion\":null,\"IsPublished\":true,\"IsSendSummary\":false,\"IsPetrol\":null}]",
"newdata": "",
"dataError": null,
"success": true,
"recordsTotal": 0,
"recordsFiltered": 0,
"content": null,
"error": null,
"dataAdditional": null,
"errorCode": []
}
4 Mô tả thuộc tính
{
// id mẫu hóa đơn ( sẽ dùng nhiều khi đẩy hd)
public Guid IPTemplateID { get; set; }
// id công ty
public int CompanyID { get; set; }
// tên mẫu HD
public string TemplateName { get; set; }
// mẫu số HD
public string InvTemplateNo { get; set; }
// ký hiệu HD
public string InvSeries { get; set; }
// ký hiệu gốc HD
public string OrgInvSeries { get; set; }
// kiểu mẫu HD
public int TemplateType { get; set; }
// Loại HD
public int InvoiceType { get; set; }
public int BusinessAreas { get; set; }
// thứ tự mẫu
public int SortOrder { get; set; }
// ngày ký số mẫu
public datetime SignedDate { get; set; }
// ngày tạo mẫu
public datetime CreatedDate { get; set; }
// người tạo mẫu
public string CreatedBy { get; set; }
// ngày sửa mẫu
public datetime ModifiedDate { get; set; }
// người sửa mẫu
public string ModifiedBy { get; set; }
// tình trạng hoạt động
public bool Inactive { get; set; }
public string TemplateContent { get; set; }
public guid DefaultTemplateID { get; set; }
public bool IsCustomTemplate { get; set; }
public bool IsInheritFromOldTemplate { get; set; }
public int XsltVersion { get; set; }
public bool IsPublished { get; set; }
public bool IsSendSummary { get; set; }
public bool IsPetrol { get; set; }
}