OVIRO LogoOVIRO
OMSOrder Promotion

Danh sách Order Promotion

Trả về danh sách khuyến mãi đã áp dụng trên đơn hàng, hỗ trợ phân trang và nhiều bộ lọc.

Endpoint

GET /v1/orderpromotions

Query Parameters

TênKiểuBắt buộcMô tả
pageintTrang hiện tại (mặc định 1)
limitintSố bản ghi mỗi trang (mặc định 20, tối đa 200)
sort_bystringSắp xếp theo: id, date_created, date_modified, ymd. Mặc định: id
sort_typestringKiểu sắp xếp: ASC, DESC. Mặc định: DESC
idintLọc theo ID order promotion
statusintLọc theo trạng thái (1: Hoạt động, 3: Vô hiệu hóa)
date_startedintThời gian tạo từ (UNIX timestamp)
date_endedintThời gian tạo đến (UNIX timestamp)
sale_order_idintLọc theo ID đơn hàng
customer_idintLọc theo ID khách hàng
product_idintLọc theo ID sản phẩm
product_variant_idintLọc theo ID biến thể sản phẩm
ymdintLọc theo ngày (định dạng YYYYMMDD)
promotion_idintLọc theo ID chương trình khuyến mãi
promotion_typeintLọc theo loại khuyến mãi
promotion_scopeintLọc theo phạm vi khuyến mãi
coupon_codestringLọc theo mã coupon

Response Schema

HTTP 200 - JSON Object

{
    "total": 150,
    "currentpage": 1,
    "limit": 20,
    "items": [
        {
            "id": 5001,
            "company_id": 10311,
            "sale_order_id": 10002414,
            "promotion_id": 200,
            "discount_amount": 98180,
            "status": 1,
            "...": "..."
        }
    ]
}

Mỗi item trong mảng items là một đối tượng Order Promotion Object, bao gồm các enriched fields (promotion, customer, customer_name, customer_phone).

Error Codes

HTTPCodeMô tả
401ERR_AUTH_REQUIREDThiếu token xác thực
403ERR_NO_PERMISSIONKhông có quyền order.view
500ERR_INTERNALLỗi máy chủ

On this page