> For the complete documentation index, see [llms.txt](https://apidocs.abit.vn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.abit.vn/don-hang/danh-sach-don-hang.md).

# Danh sách đơn hàng

API cho phép lấy danh sách đơn hàng gần nhất trên shop, hỗ trợ lọc theo ngày, có phân trang, lấy danh sách đơn hàng tối đa trong vòng 3 tháng gần đây

URL API: [https://new.abitstore.vn](https://new.abitstore.vn/invoices/getlistInvoicebyPartner)

<mark style="color:green;">`POST /`</mark>`invoices/getlistInvoicebyPartner`

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

<table><thead><tr><th width="149">Name</th><th width="95">Type</th><th>Description</th></tr></thead><tbody><tr><td>access_token</td><td>string</td><td>Mã Access token được khởi tạo và cấp quyền bởi chủ tài khoản Abit, Xem hướng dẫn tạo <a href="/gioi-thieu-ve-abit-open-api.md#khoi-tao-access-token"><mark style="color:red;"><strong>Access Token</strong></mark> </a></td></tr><tr><td>partner_name</td><td>string</td><td>Mã shop khi đăng ký Abit</td></tr><tr><td>invoicestatus</td><td>arrray</td><td><p>Mặc định là [] , nếu bạn muốn lọc theo nhiều trạng thái đơn hàng trên Abit thì truyền theo định dạng , Danh sách Mã trạng thái đơn hàng lấy trong API <strong>Trạng thái đơn hàng ,</strong> <br>Đơn hoả tốc truyền trạng thái <mark style="color:red;"><strong>Donhoatoc</strong></mark></p><pre class="language-postman_json"><code class="lang-postman_json">
[
  "AutoCreated",
  "Thanhcong"
]
</code></pre></td></tr><tr><td>ecommerce_id</td><td>string</td><td>ID gian hàng Shopee , TikTok Shop , ID Fanpage... được kết nối vào Abit, lấy thông tin ID trong mục <strong>Kết nối đa kênh =⇒ Kết nối sàn TMĐT</strong></td></tr><tr><td>productstoreid</td><td>int</td><td>ID Kho hàng, lấy danh sách này ở API <a href="/api-mo-rong/danh-sach-kho-chi-nhanh.md"><strong>Danh sách kho - Chi nhán</strong>h</a></td></tr><tr><td>filter_by</td><td>string</td><td>filter_by có 2 giá trị <strong>UPDATE</strong> và <strong>CREATE</strong></td></tr><tr><td>order_by</td><td>string</td><td>order_by có 2 giá trị <strong>DESC</strong> và <strong>ASC</strong></td></tr><tr><td>date_time_start</td><td>datetime</td><td>Thời gian bắt đầu lọc , định dạng Y-m-d H:i:s <br>Ví dụ : <strong>2025-03-13 08:00:00</strong></td></tr><tr><td>date_time_end</td><td>datetime</td><td>Thời gian kết thúc lọc , định dạng Y-m-d H:i:s <br>Ví dụ : <strong>2025-03-13 23:59:59</strong></td></tr><tr><td>page</td><td>int</td><td>Phân trang, lấy kết quả ở trang thứ mấy, mặc định giá trị là <strong>0</strong></td></tr><tr><td>limit</td><td>int</td><td>Giới hạn kết quả trả ra, mặc định là <strong>10</strong></td></tr></tbody></table>

{% tabs %}
{% tab title="Body" %}

```json
{
    "access_token": "MWM4MmFjYjYzYzYwOTkxOTg1OGVjNTA1NjcxY2QwZDc=",
    "partner_name": "bizfly",
    "ecommerce_id": "1234567",
    "productstoreid": 1,
    "invoicestatus": [
        "AutoCreated",
        "Thanhcong"
    ],
    "filter_by": "UPDATE",
    "order_by": "DESC",
    "date_time_start": "2023-05-01 00:00:00",
    "date_time_end": "2023-08-08 23:59:59",
    "page": 0,
    "limit": 10
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "total": 1,
    "data": [
        {
            "invoiceid": 79003479,
            "invoice_no": "EG71346245A72",
            "subject": "Vy",
            "dienthoai": "0988800090",
            "diachigiaohang": "203 Minh Khai, Hai Bà Trưng, Hà Nội",
            "pushed": 0,
            "storeid": "1",
            "invoicestatus": "AutoCreated",
            "createdtime": "2025-04-29 12:06:05",
            "modifiedtime": "2025-06-14 09:39:48",
            "smownerid": 14166,
            "total": "770000.000",
            "accountid": 0,
            "total_giavon": "100000.000",
            "subtotal": "770000.000",
            "s_h_amount": "0.000",
            "discount_amount": "0.000",
            "mavandon": "",
            "donvi_vc": "",
            "phivanchuyenthuctra": "0.000",
            "giamgiadonhang": "0.000",
            "tiendatcoc": "0.000",
            "cuoccod": "",
            "CodAmount": 0,
            "cf_889": "0",
            "tongcuocdi": "",
            "ngaygui": null,
            "idprofile": "23928637000116784",
            "type_invoice": "1",
            "trungdon": "",
            "nguoinhanhang": "Vy",
            "ngayxacnhan": null,
            "confirm_order": null,
            "mahang": "(1)BN0097,(1)120L-DEN-19082024...",
            "ghichu1": "",
            "notevanchuyen": "",
            "provinceCode": "01",
            "districtcode": "007",
            "is_print": 0,
            "tracking_no": null,
            "chanel": "Fanpage",
            "nhanvien": "",
            "staff_cskh": 0,
            "type_client": 0,
            "other_vandon": null,
            "idpage": "2013792605578989",
            "idpost": "",
            "paymentby_voucher": "0.000",
            "paymentby_card": "0.000",
            "paymentby_cash": "0.000",
            "paymentby_other": "0.000",
            "thongdiep": "0988800090...",
            "taxtotal_invoice": "0.000",
            "taxtype": "individual",
            "eoi_fee_and_tax_amount": null,
            "commission_value": null,
            "eoi_escrow_amount": null,
            "eoi_refund_amount_to_buyer": null,
            "is_doisoat": 0,
            "eoi_service_fee": null,
            "eoi_commission_fee": null,
            "salescommission": "0",
            "eoi_fee_voucher_xtra_service_fee_amount": null,
            "eoi_fee_flash_sales_service_fee_amount": null,
            "eoi_actual_shipping_fee": null,
            "ecommerce_id": "0",
            "eoi_buyer_total_amount": null,
            "eoi_original_price": null,
            "eoi_seller_discount": "0.00",
            "eoi_platform_discount": null,
            "eoi_shippingprovider_discount": null,
            "eoi_voucher_from_seller": null,
            "eoi_voucher_from_platform": null,
            "eoi_coins": null,
            "eoi_buyer_paid_shipping_fee": "0.00",
            "eoi_buyer_transaction_fee": null,
            "eoi_cross_border_tax": null,
            "eoi_payment_promotion": null,
            "eoi_seller_transaction_fee": null,
            "eoi_seller_lost_compensation": null,
            "eoi_seller_coin_cash_back": null,
            "eoi_final_shipping_fee": null,
            "eoi_final_seller_service_fee_list_fee_amount": null,
            "eoi_shopee_shipping_rebate": null,
            "eoi_shipping_fee_discount_from_3pl": null,
            "eoi_seller_shipping_discount": null,
            "eoi_estimated_shipping_fee": null,
            "eoi_seller_voucher_code": null,
            "eoi_drc_adjustable_refund": null,
            "eoi_cost_of_goods_sold": null,
            "eoi_original_cost_of_goods_sold": "750000.00",
            "eoi_original_platform_discount": null,
            "eoi_seller_return_refund": null,
            "eoi_reverse_shipping_fee": null,
            "eoi_final_product_vat_tax": null,
            "eoi_rts_sla": null,
            "eoi_rts_time": null,
            "eoi_tts_sla": null,
            "eoi_order_id": null,
            "eoi_cancel_order_sla": null,
            "eoi_cancel_reason": null,
            "eoi_cancel_user": null,
            "eoi_fulfillment_type": 0,
            "return_order_id": null,
            "return_tracking_no": null,
            "return_shipping_provider": null,
            "is_trahang_hoantien": 0,
            "eoi_fee_affiliate_ads_commission_amount": null,
            "eoi_fee_affiliate_commission_amount_before_pit": null,
            "eoi_fee_affiliate_partner_commission_amount": null,
            "eoi_fee_bonus_cashback_service_fee_amount": null,
            "eoi_fee_cofunded_promotion_service_fee_amount": null,
            "eoi_fee_credit_card_handling_fee_amount": null,
            "eoi_fee_dt_handling_fee_amount": null,
            "eoi_fee_epr_pob_service_fee_amount": null,
            "eoi_fee_live_specials_fee_amount": null,
            "eoi_fee_mall_service_fee_amount": null,
            "eoi_fee_pre_order_service_fee_amount": null,
            "eoi_fee_referral_fee_amount": null,
            "eoi_fee_refund_administration_fee_amount": null,
            "eoi_fee_sfp_service_fee_amount": null,
            "eoi_fee_tsp_commission_amount": null,
            "eoi_tax_anti_dumping_duty_amount": null,
            "eoi_tax_customs_clearance_amount": null,
            "eoi_tax_customs_duty_amount": null,
            "eoi_tax_gst_amount": null,
            "eoi_tax_import_vat_amount": null,
            "eoi_tax_isr_amount": null,
            "eoi_tax_iva_amount": null,
            "eoi_tax_local_vat_amount": null,
            "eoi_tax_pit_amount": null,
            "eoi_tax_sst_amount": null,
            "eoi_tax_vat_amount": null,
            "eoi_revenue_breakdown_cod_service_fee_amount": null,
            "eoi_revenue_breakdown_refund_cod_service_fee_amount": null,
            "eoi_revenue_breakdown_refund_subtotal_before_discount_amount": null,
            "eoi_revenue_breakdown_seller_discount_amount": null,
            "eoi_revenue_breakdown_seller_discount_refund_amount": null,
            "eoi_revenue_breakdown_subtotal_before_discount_amount": null,
            "eoi_return_shipping_fee_amount": null,
            "eoi_exchange_shipping_fee_amount": null,
            "eoi_replacement_shipping_fee_amount": null,
            "eoi_return_shipping_label_fee_amount": null,
            "eoi_shipping_insurance_fee_amount": null,
            "eoi_signature_confirmation_fee_amount": null,
            "eoi_customer_shipping_fee_offset_amount": null,
            "eoi_fbm_shipping_cost_amount": null,
            "eoi_fbt_fulfillment_fee_amount": null,
            "eoi_fbt_shipping_cost_amount": null,
            "eoi_promo_shipping_incentive_amount": null,
            "eoi_shipping_fee_subsidy_amount": null,
            "is_hachtoan": 0,
            "hachtoan_datetime": "0000-00-00 00:00:00",
            "deliveried_date": "2026-05-20 15:30:20",
            "shiped_return_date": "2026-05-24 15:30:20",
            "date_scanreturned": "2026-05-26 15:30:20",
            "listProduct": [
                {
                    "productid": 67098801,
                    "price": "250000.000",
                    "amount": "1.000",
                    "storeId": 1,
                    "productName": "GIÀY SNEAKER NAM BN0097 - Đen đỏ - 161218640236",
                    "productcode": "BN0097",
                    "usageunit": "Cái",
                    "unit_price": "250000.000",
                    "weight": "0",
                    "imagename": "[{\"isDefault\":true,\"imgSrc\":\"https://cf.shopee.vn/file/fafef0cff452975bc6a87a8a7a67ef7a\"}]",
                    "discount_percent": "0.000",
                    "discount_amount": "0.000",
                    "tax1": "8.000",
                    "vitri": "",
                    "qtyinstock": null
                },
                {
                    "productid": 80243256,
                    "price": "500000.000",
                    "amount": "1.000",
                    "storeId": 1,
                    "productName": "Thùng rác 120 lít-GT 120 A",
                    "productcode": "120L-DEN-19082024",
                    "usageunit": "Cái",
                    "unit_price": "500000.000",
                    "weight": "10000",
                    "imagename": "[{\"id\":1,\"isDefault\":true,\"imgSrc\":\"https://static.abit.vn/sanpham/shop_1/2025/06/08/jpg/2025-06-08-11-24-10-6845106a13defC2_ZPzr6h7.jpg\"}]",
                    "discount_percent": "0.000",
                    "discount_amount": "0.000",
                    "tax1": "0.000",
                    "vitri": "",
                    "qtyinstock": null
                }
            ]
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.abit.vn/don-hang/danh-sach-don-hang.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
